* main: init implement rpc.Discover RPC method This implement the basic functionality for the method over HTTP RPC. Signed-off-by: meows <b5c6@protonmail.com> * main,go.mod,go.sum: init example with go-openrpc-reflect lib Signed-off-by: meows <b5c6@protonmail.com> Conflicts: go.mod go.sum * main: make variable name human-friendly Signed-off-by: meows <b5c6@protonmail.com> * main,go.mod,go.sum: init impl of go-openrp-reflect printing document Signed-off-by: meows <b5c6@protonmail.com> Conflicts: go.mod go.sum * go.mod,go.sum: use go-openrpc-reflect and open-rpc/meta-schema hackforks This is for development only. Versions need to be bumped when they're ready for use as canonical remotes. Signed-off-by: meows <b5c6@protonmail.com> * main,openrpc,main: refactor openrpc supporting code to own package This eliminates code duplication. Signed-off-by: meows <b5c6@protonmail.com> * main: add rpc.Discover to openrpc document Signed-off-by: meows <b5c6@protonmail.com> * openrpc: fix rpc.discover method name casing Also fixes casing stuff for the rest of Filecoin. methods. Signed-off-by: meows <b5c6@protonmail.com> * Revert "main: add rpc.Discover to openrpc document" This reverts commit 116898efb10f33e405ac74acb1aa6daefcd46a62. * main: fix document creation method name This fixes an issue caused with the latest reverting commit. Signed-off-by: meows <b5c6@protonmail.com> * main,docgen,openrpc: refactor to share api parsing, etc as docgen exported stuff Signed-off-by: meows <b5c6@protonmail.com> Makefile: fix docgen refactoring for makefile use of command Signed-off-by: meows <b5c6@protonmail.com> * openrpc: add schema.examples to app reflector There are quite of few of these already registered for the docgen command, so it makes sense to use those! Signed-off-by: meows <b5c6@protonmail.com> * openrpc: init method pairing examples Signed-off-by: meows <b5c6@protonmail.com> * go.mod,go.sum: bump go.mod to use latest meta-schema and openrpc-reflect versions Signed-off-by: meows <b5c6@protonmail.com> * openrpc: init SchemaType mapper function This function will handle the manual configurations for app-specific data types w/r/t their json schema representation. This is useful for cases where the reflect library is unable to provide a sufficient representation automatically. Provided in this commit is an initial implementation for the integerD type (assuming number are represented in the API as hexs), and a commonly used cid.Cid type. Signed-off-by: meows <b5c6@protonmail.com> * go.mod,go.sum: tame dependencies by bumping etclabscore/go-openrpc-reflect This removes a problematic dependency on github.com/ethereum/go-ethereum, which was imported as a dependency for a couple github.com/etclabscore/go-openrpc-reflect tests. etclabscore/go-openrpc-reflect v0.0.36 has removed this dependency, so this commit is the result of bumping that version and then running 'go mod tidy' This is in response to a review at https://github.com/filecoin-project/lotus/pull/4711#pullrequestreview-535686205 Date: 2020-11-21 06:52:48-06:00 Signed-off-by: meows <b5c6@protonmail.com> * main: add 'miner' arg to openrpc gen cmd This allows the command to EITHER generate the doc for Full or Miner APIs. See comment for usage. Date: 2020-11-21 07:48:05-06:00 Signed-off-by: meows <b5c6@protonmail.com> * docgen: add missing examples for Miner API Generating the Miner API OpenRPC doc (via 'go run ./api/openrpc/cmd miner') caused the example logic to panic because some types were missing. This commit adds those missing types, although I'm not an expert in the API so I can't suggest that the example values provided are ideal or well representative. Date: 2020-11-21 07:50:21-06:00 Signed-off-by: meows <b5c6@protonmail.com> * build/openrpc/full.json,build/openrpc/miner.json: add build/openrpc/[full/miner].json docs These will be used as static documents provided by the rpc.discover method. Date: 2020-11-21 07:51:39-06:00 Signed-off-by: meows <b5c6@protonmail.com> * build: init go-rice openrpc static assets Date: 2020-11-21 08:23:06-06:00 Signed-off-by: meows <b5c6@protonmail.com> * main: remove rpc.discover implementation from runtime plugin Instead of generating the doc on the fly, we're going to serve a static asset. Rel https://github.com/filecoin-project/lotus/pull/4711#pullrequestreview-535686205 This removes the runtime implementation from the RPC server construction. Date: 2020-11-21 08:41:20-06:00 Signed-off-by: meows <b5c6@protonmail.com> * api,apistruct,common: add Discover(ctx) method to CommonAPI interface and structs Date: 2020-11-21 08:41:56-06:00 Signed-off-by: meows <b5c6@protonmail.com> * main: use rpc server method aliasing for rpc.discover This depends on a currently-forked change at filecoin-project/go-jsonrpc 8350f9463ee451b187d35c492e32f1b999e80210 which establishes this new method RPCServer.AliasMethod. This solves the problem that the OpenRPC spec says that the document should be served at the system extension-prefixed endpoing rpc.discover (not Filecoin.Discover). In fact, the document will be available at BOTH endpoints, but that duplicity is harmless. Date: 2020-11-21 09:18:26-06:00 Signed-off-by: meows <b5c6@protonmail.com> * api,apistruct,build,common: rpc.discover: return json object instead of string Instead of casting the JSON asset from bytes to string, unmarshal it to a map[string]interface{} so the server will provide it as a JSON object. Date: 2020-11-21 09:27:11-06:00 Signed-off-by: meows <b5c6@protonmail.com> * Makefile: merge resolve: docsgen command path Date: 2020-11-22 07:19:36-06:00 Signed-off-by: meows <b5c6@protonmail.com> * apistruct,main,docgen,openrpc: merge resolve: fix func exporteds, signatures Date: 2020-11-22 07:31:03-06:00 Signed-off-by: meows <b5c6@protonmail.com> * go.mod,go.sum: 'get get' auto-bumps version Date: 2020-11-22 07:31:44-06:00 Signed-off-by: meows <b5c6@protonmail.com> * Makefile,docgen,main,build/openrpc: refactor openrpc documentation generation This creates Makefile command docsgen-openrpc-json, and refactors the docsgen command to generate both the markdown and openrpc json documents, redirecting the output of the openrpc json documentation to the build/openrpc/ directory, where those json files will be compiled as static assets via go-rice boxes. The api/openrpc/cmd now uses usage argumentation congruent to that of the docgen command (switching on API context). Date: 2020-11-22 08:01:18-06:00 Signed-off-by: meows <b5c6@protonmail.com> * main,docgen_openrpc: rename api/openrpc -> api/docgen-openrpc Renames the package as well. This is intended to parallel the existing docgen package and command namespacing. Date: 2020-11-22 10:34:46-06:00 Signed-off-by: meows <b5c6@protonmail.com> * api,apistruct,docgen,build,build/openrpc: use typed Discover response Instead of using a map[string]interface{}, use a typed response for the Discover method implementation. This avoids having to set a docgen Example for the generic map[string]interface{} (as an openrpc document) which both pollutes the generic type and lacks useful information for the Discover method example. Date: 2020-11-22 08:31:16-06:00 Signed-off-by: meows <b5c6@protonmail.com> * apistruct,build,main,impl: implement Discover method for Worker and StorageMiner APIs Methods return static compiled assets respective to the APIs. Date: 2020-11-22 08:57:18-06:00 Signed-off-by: meows <b5c6@protonmail.com> * docgen_openrpc,build/openrpc: remove timestamping from openrpc doc info This should allow openrpc docs generated at different times to be equal. This is important because the CI (Circle) runs the docgen command and tests that the output and the source are unchanged (via git diff). Date: 2020-11-22 10:47:07-06:00 Signed-off-by: meows <b5c6@protonmail.com> * main,docgen_openrpc,main,build: fix lint issues Fixes goimports, staticcheck, golint issues. Date: 2020-11-22 11:06:46-06:00 Signed-off-by: meows <b5c6@protonmail.com> * docgenopenrpc: fix: don't use an underscore in package name (golint) Date: 2020-11-22 11:07:53-06:00 Signed-off-by: meows <b5c6@protonmail.com> * go.sum: fix: mod-tidy-check (run 'go mod tidy') Date: 2020-11-22 11:09:48-06:00 Signed-off-by: meows <b5c6@protonmail.com> * go.mod,go.sum: bump filecoin-project/go-jsonrpc dep to latest This version includes the necessary RPCServer.AliasMethod method. Date: 2020-11-23 12:16:15-06:00 Signed-off-by: meows <b5c6@protonmail.com> * Makefile,main,build,build/openrpc: init gzipped openrpc static docs Date: 2020-11-24 06:15:06-06:00 Signed-off-by: meows <b5c6@protonmail.com> * build: refactor gzip reading Date: 2020-11-24 06:18:34-06:00 Signed-off-by: meows <b5c6@protonmail.com> * build: add basic test for openrpc doc from static assets Date: 2020-11-24 06:30:23-06:00 Signed-off-by: meows <b5c6@protonmail.com> * build: handle reader Close error This keeps the errcheck linter happy. Date: 2020-11-24 06:33:14-06:00 Signed-off-by: meows <b5c6@protonmail.com> * go.sum: run 'go mod tidy' Date: 2020-11-24 06:36:07-06:00 Signed-off-by: meows <b5c6@protonmail.com> * go.mod,go.sum: go mod tidy Tidying up after resolving the merge conflicts with master at go.mod Date: 2020-11-24 06:40:45-06:00 Signed-off-by: meows <b5c6@protonmail.com> * go.mod,go.sum: bump filecoin-project/go-jsonrpc to latest This is a repeat of 76e6fd2, since the latest merge to master seems to have reverted this. Date: 2020-11-24 06:42:30-06:00 Signed-off-by: meows <b5c6@protonmail.com> * docgenopenrpc,build/openrpc: remove method example pairings, improve schema examples Removing method example pairings since they were redundant to schema examples and were not implemented well. Improved schema examples by using the ExampleValue method instead of the map lookup. Made a note in the comment here that this is not ideal, since we have to make a shortcut assumption /workaround by using 'unknown' as the method name and the typea as its own parent. Luckily these values aren't heavily used by the method logic. Date: 2020-11-27 12:57:36-06:00 Signed-off-by: meows <b5c6@protonmail.com> * docgenopenrpc: use generic number jsonschema for number types Previously used an integer schema assuming hex encoding. It appears, based on review some of the examples, that this may not be the case. Obvioussly this schema could be more descriptive, but just shooting for mostly likely to be not wrong at this point. Date: 2020-12-15 14:44:37-06:00 Signed-off-by: meows <b5c6@protonmail.com> * cmd/lotus,go.mod,go.sum: maybe fix straggling merge resolution conflicts Date: 2021-01-19 12:30:42-06:00 Signed-off-by: meows <b5c6@protonmail.com> * build/openrpc/full.json.gz,build/openrpc/miner.json.gz,build/openrpc/worker.json.gz: run 'make docsgen' Date: 2021-01-19 12:33:55-06:00 Signed-off-by: meows <b5c6@protonmail.com> * api/apistruct,node/impl: (lint) gofmt Date: 2021-01-19 12:39:48-06:00 Signed-off-by: meows <b5c6@protonmail.com> * api/docgen: maybe fix parse error: open ./api: no such file or directory Date: 2021-01-19 12:52:04-06:00 Signed-off-by: meows <b5c6@protonmail.com> * api/docgen,build/openrpc: maybe fix no such file error and run 'make docsgen' Date: 2021-01-19 12:55:52-06:00 Signed-off-by: meows <b5c6@protonmail.com> * api/docgen: return if AST comment/groupdoc parsing encounters any error This will returns empty comments/docs maps. This should fix issues like: https://app.circleci.com/pipelines/github/filecoin-project/lotus/12445/workflows/4ebadce9-a298-4ad1-939b-f19ef4c0a5bf/jobs/107218 where the environment makes file lookups hard or impossible. Date: 2021-01-19 13:04:58-06:00 Signed-off-by: meows <b5c6@protonmail.com> * api: Don't depend on build/ * make: support parallel docsgen * openrpc gen: Use simple build version * methodgen * goimports Co-authored-by: meows <b5c6@protonmail.com>
29 KiB
Groups
- Actor
- Auth
- Check
- Create
- Deals
- DealsConsiderOfflineRetrievalDeals
- DealsConsiderOfflineStorageDeals
- DealsConsiderOnlineRetrievalDeals
- DealsConsiderOnlineStorageDeals
- DealsConsiderUnverifiedStorageDeals
- DealsConsiderVerifiedStorageDeals
- DealsImportData
- DealsList
- DealsPieceCidBlocklist
- DealsSetConsiderOfflineRetrievalDeals
- DealsSetConsiderOfflineStorageDeals
- DealsSetConsiderOnlineRetrievalDeals
- DealsSetConsiderOnlineStorageDeals
- DealsSetConsiderUnverifiedStorageDeals
- DealsSetConsiderVerifiedStorageDeals
- DealsSetPieceCidBlocklist
- I
- Log
- Market
- MarketCancelDataTransfer
- MarketDataTransferUpdates
- MarketGetAsk
- MarketGetDealUpdates
- MarketGetRetrievalAsk
- MarketImportDealData
- MarketListDataTransfers
- MarketListDeals
- MarketListIncompleteDeals
- MarketListRetrievalDeals
- MarketPendingDeals
- MarketPublishPendingDeals
- MarketRestartDataTransfer
- MarketSetAsk
- MarketSetRetrievalAsk
- Mining
- Net
- Pieces
- Pledge
- Return
- Sealing
- Sector
- Sectors
- Storage
- Worker
Closing
Perms: read
Inputs: null
Response: {}
Discover
Perms: read
Inputs: null
Response:
{
"info": {
"title": "Lotus RPC API",
"version": "1.2.1/generated=2020-11-22T08:22:42-06:00"
},
"methods": [],
"openrpc": "1.2.6"
}
Session
Perms: read
Inputs: null
Response: "07070707-0707-0707-0707-070707070707"
Shutdown
Perms: admin
Inputs: null
Response: {}
Version
Perms: read
Inputs: null
Response:
{
"Version": "string value",
"APIVersion": 65792,
"BlockDelay": 42
}
Actor
ActorAddress
There are not yet any comments for this method.
Perms: read
Inputs: null
Response: "f01234"
ActorAddressConfig
There are not yet any comments for this method.
Perms: read
Inputs: null
Response:
{
"PreCommitControl": null,
"CommitControl": null,
"TerminateControl": null,
"DisableOwnerFallback": true,
"DisableWorkerFallback": true
}
ActorSectorSize
There are not yet any comments for this method.
Perms: read
Inputs:
[
"f01234"
]
Response: 34359738368
Auth
AuthNew
Perms: admin
Inputs:
[
null
]
Response: "Ynl0ZSBhcnJheQ=="
AuthVerify
Perms: read
Inputs:
[
"string value"
]
Response: null
Check
CheckProvable
There are not yet any comments for this method.
Perms: admin
Inputs:
[
8,
null,
true
]
Response:
{
"123": "can't acquire read lock"
}
Create
CreateBackup
CreateBackup creates node backup onder the specified file name. The method requires that the lotus-miner is running with the LOTUS_BACKUP_BASE_PATH environment variable set to some path, and that the path specified when calling CreateBackup is within the base path
Perms: admin
Inputs:
[
"string value"
]
Response: {}
Deals
DealsConsiderOfflineRetrievalDeals
There are not yet any comments for this method.
Perms: read
Inputs: null
Response: true
DealsConsiderOfflineStorageDeals
There are not yet any comments for this method.
Perms: read
Inputs: null
Response: true
DealsConsiderOnlineRetrievalDeals
There are not yet any comments for this method.
Perms: read
Inputs: null
Response: true
DealsConsiderOnlineStorageDeals
There are not yet any comments for this method.
Perms: read
Inputs: null
Response: true
DealsConsiderUnverifiedStorageDeals
There are not yet any comments for this method.
Perms: read
Inputs: null
Response: true
DealsConsiderVerifiedStorageDeals
There are not yet any comments for this method.
Perms: read
Inputs: null
Response: true
DealsImportData
There are not yet any comments for this method.
Perms: write
Inputs:
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"string value"
]
Response: {}
DealsList
There are not yet any comments for this method.
Perms: read
Inputs: null
Response: null
DealsPieceCidBlocklist
There are not yet any comments for this method.
Perms: read
Inputs: null
Response: null
DealsSetConsiderOfflineRetrievalDeals
There are not yet any comments for this method.
Perms: admin
Inputs:
[
true
]
Response: {}
DealsSetConsiderOfflineStorageDeals
There are not yet any comments for this method.
Perms: admin
Inputs:
[
true
]
Response: {}
DealsSetConsiderOnlineRetrievalDeals
There are not yet any comments for this method.
Perms: admin
Inputs:
[
true
]
Response: {}
DealsSetConsiderOnlineStorageDeals
There are not yet any comments for this method.
Perms: admin
Inputs:
[
true
]
Response: {}
DealsSetConsiderUnverifiedStorageDeals
There are not yet any comments for this method.
Perms: admin
Inputs:
[
true
]
Response: {}
DealsSetConsiderVerifiedStorageDeals
There are not yet any comments for this method.
Perms: admin
Inputs:
[
true
]
Response: {}
DealsSetPieceCidBlocklist
There are not yet any comments for this method.
Perms: admin
Inputs:
[
null
]
Response: {}
I
ID
Perms: read
Inputs: null
Response: "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf"
Log
LogList
Perms: write
Inputs: null
Response: null
LogSetLevel
Perms: write
Inputs:
[
"string value",
"string value"
]
Response: {}
Market
MarketCancelDataTransfer
MarketCancelDataTransfer cancels a data transfer with the given transfer ID and other peer
Perms: write
Inputs:
[
3,
"12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf",
true
]
Response: {}
MarketDataTransferUpdates
There are not yet any comments for this method.
Perms: write
Inputs: null
Response:
{
"TransferID": 3,
"Status": 1,
"BaseCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"IsInitiator": true,
"IsSender": true,
"Voucher": "string value",
"Message": "string value",
"OtherPeer": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf",
"Transferred": 42
}
MarketGetAsk
There are not yet any comments for this method.
Perms: read
Inputs: null
Response:
{
"Ask": {
"Price": "0",
"VerifiedPrice": "0",
"MinPieceSize": 1032,
"MaxPieceSize": 1032,
"Miner": "f01234",
"Timestamp": 10101,
"Expiry": 10101,
"SeqNo": 42
},
"Signature": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
}
}
MarketGetDealUpdates
There are not yet any comments for this method.
Perms: read
Inputs: null
Response:
{
"Proposal": {
"PieceCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"PieceSize": 1032,
"VerifiedDeal": true,
"Client": "f01234",
"Provider": "f01234",
"Label": "string value",
"StartEpoch": 10101,
"EndEpoch": 10101,
"StoragePricePerEpoch": "0",
"ProviderCollateral": "0",
"ClientCollateral": "0"
},
"ClientSignature": {
"Type": 2,
"Data": "Ynl0ZSBhcnJheQ=="
},
"ProposalCid": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"AddFundsCid": null,
"PublishCid": null,
"Miner": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf",
"Client": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf",
"State": 42,
"PiecePath": ".lotusminer/fstmp123",
"MetadataPath": ".lotusminer/fstmp123",
"SlashEpoch": 10101,
"FastRetrieval": true,
"Message": "string value",
"StoreID": 12,
"FundsReserved": "0",
"Ref": {
"TransferType": "string value",
"Root": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"PieceCid": null,
"PieceSize": 1024,
"RawBlockSize": 42
},
"AvailableForRetrieval": true,
"DealID": 5432,
"CreationTime": "0001-01-01T00:00:00Z",
"TransferChannelId": {
"Initiator": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf",
"Responder": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf",
"ID": 3
},
"SectorNumber": 9
}
MarketGetRetrievalAsk
There are not yet any comments for this method.
Perms: read
Inputs: null
Response:
{
"PricePerByte": "0",
"UnsealPrice": "0",
"PaymentInterval": 42,
"PaymentIntervalIncrease": 42
}
MarketImportDealData
There are not yet any comments for this method.
Perms: write
Inputs:
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"string value"
]
Response: {}
MarketListDataTransfers
There are not yet any comments for this method.
Perms: write
Inputs: null
Response: null
MarketListDeals
There are not yet any comments for this method.
Perms: read
Inputs: null
Response: null
MarketListIncompleteDeals
There are not yet any comments for this method.
Perms: read
Inputs: null
Response: null
MarketListRetrievalDeals
There are not yet any comments for this method.
Perms: read
Inputs: null
Response: null
MarketPendingDeals
There are not yet any comments for this method.
Perms: write
Inputs: null
Response:
{
"Deals": null,
"PublishPeriodStart": "0001-01-01T00:00:00Z",
"PublishPeriod": 60000000000
}
MarketPublishPendingDeals
There are not yet any comments for this method.
Perms: admin
Inputs: null
Response: {}
MarketRestartDataTransfer
MarketRestartDataTransfer attempts to restart a data transfer with the given transfer ID and other peer
Perms: write
Inputs:
[
3,
"12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf",
true
]
Response: {}
MarketSetAsk
There are not yet any comments for this method.
Perms: admin
Inputs:
[
"0",
"0",
10101,
1032,
1032
]
Response: {}
MarketSetRetrievalAsk
There are not yet any comments for this method.
Perms: admin
Inputs:
[
{
"PricePerByte": "0",
"UnsealPrice": "0",
"PaymentInterval": 42,
"PaymentIntervalIncrease": 42
}
]
Response: {}
Mining
MiningBase
There are not yet any comments for this method.
Perms: read
Inputs: null
Response:
{
"Cids": null,
"Blocks": null,
"Height": 0
}
Net
NetAddrsListen
Perms: read
Inputs: null
Response:
{
"Addrs": null,
"ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf"
}
NetAgentVersion
Perms: read
Inputs:
[
"12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf"
]
Response: "string value"
NetAutoNatStatus
Perms: read
Inputs: null
Response:
{
"Reachability": 1,
"PublicAddr": "string value"
}
NetBandwidthStats
Perms: read
Inputs: null
Response:
{
"TotalIn": 9,
"TotalOut": 9,
"RateIn": 12.3,
"RateOut": 12.3
}
NetBandwidthStatsByPeer
Perms: read
Inputs: null
Response:
{
"12D3KooWSXmXLJmBR1M7i9RW9GQPNUhZSzXKzxDHWtAgNuJAbyEJ": {
"TotalIn": 174000,
"TotalOut": 12500,
"RateIn": 100,
"RateOut": 50
}
}
NetBandwidthStatsByProtocol
Perms: read
Inputs: null
Response:
{
"/fil/hello/1.0.0": {
"TotalIn": 174000,
"TotalOut": 12500,
"RateIn": 100,
"RateOut": 50
}
}
NetBlockAdd
Perms: admin
Inputs:
[
{
"Peers": null,
"IPAddrs": null,
"IPSubnets": null
}
]
Response: {}
NetBlockList
Perms: read
Inputs: null
Response:
{
"Peers": null,
"IPAddrs": null,
"IPSubnets": null
}
NetBlockRemove
Perms: admin
Inputs:
[
{
"Peers": null,
"IPAddrs": null,
"IPSubnets": null
}
]
Response: {}
NetConnect
Perms: write
Inputs:
[
{
"Addrs": null,
"ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf"
}
]
Response: {}
NetConnectedness
Perms: read
Inputs:
[
"12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf"
]
Response: 1
NetDisconnect
Perms: write
Inputs:
[
"12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf"
]
Response: {}
NetFindPeer
Perms: read
Inputs:
[
"12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf"
]
Response:
{
"Addrs": null,
"ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf"
}
NetPeerInfo
Perms: read
Inputs:
[
"12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf"
]
Response:
{
"ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf",
"Agent": "string value",
"Addrs": null,
"Protocols": null,
"ConnMgrMeta": {
"FirstSeen": "0001-01-01T00:00:00Z",
"Value": 123,
"Tags": {
"name": 42
},
"Conns": {
"name": "2021-03-08T22:52:18Z"
}
}
}
NetPeers
Perms: read
Inputs: null
Response: null
NetPubsubScores
Perms: read
Inputs: null
Response: null
Pieces
PiecesGetCIDInfo
There are not yet any comments for this method.
Perms: read
Inputs:
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
Response:
{
"CID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"PieceBlockLocations": null
}
PiecesGetPieceInfo
There are not yet any comments for this method.
Perms: read
Inputs:
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
]
Response:
{
"PieceCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Deals": null
}
PiecesListCidInfos
There are not yet any comments for this method.
Perms: read
Inputs: null
Response: null
PiecesListPieces
There are not yet any comments for this method.
Perms: read
Inputs: null
Response: null
Pledge
PledgeSector
Temp api for testing
Perms: write
Inputs: null
Response:
{
"Miner": 1000,
"Number": 9
}
Return
ReturnAddPiece
Perms: admin
Inputs:
[
{
"Sector": {
"Miner": 1000,
"Number": 9
},
"ID": "07070707-0707-0707-0707-070707070707"
},
{
"Size": 1032,
"PieceCID": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
},
{
"Code": 0,
"Message": "string value"
}
]
Response: {}
ReturnFetch
Perms: admin
Inputs:
[
{
"Sector": {
"Miner": 1000,
"Number": 9
},
"ID": "07070707-0707-0707-0707-070707070707"
},
{
"Code": 0,
"Message": "string value"
}
]
Response: {}
ReturnFinalizeSector
Perms: admin
Inputs:
[
{
"Sector": {
"Miner": 1000,
"Number": 9
},
"ID": "07070707-0707-0707-0707-070707070707"
},
{
"Code": 0,
"Message": "string value"
}
]
Response: {}
ReturnMoveStorage
Perms: admin
Inputs:
[
{
"Sector": {
"Miner": 1000,
"Number": 9
},
"ID": "07070707-0707-0707-0707-070707070707"
},
{
"Code": 0,
"Message": "string value"
}
]
Response: {}
ReturnReadPiece
Perms: admin
Inputs:
[
{
"Sector": {
"Miner": 1000,
"Number": 9
},
"ID": "07070707-0707-0707-0707-070707070707"
},
true,
{
"Code": 0,
"Message": "string value"
}
]
Response: {}
ReturnReleaseUnsealed
Perms: admin
Inputs:
[
{
"Sector": {
"Miner": 1000,
"Number": 9
},
"ID": "07070707-0707-0707-0707-070707070707"
},
{
"Code": 0,
"Message": "string value"
}
]
Response: {}
ReturnSealCommit1
Perms: admin
Inputs:
[
{
"Sector": {
"Miner": 1000,
"Number": 9
},
"ID": "07070707-0707-0707-0707-070707070707"
},
null,
{
"Code": 0,
"Message": "string value"
}
]
Response: {}
ReturnSealCommit2
Perms: admin
Inputs:
[
{
"Sector": {
"Miner": 1000,
"Number": 9
},
"ID": "07070707-0707-0707-0707-070707070707"
},
null,
{
"Code": 0,
"Message": "string value"
}
]
Response: {}
ReturnSealPreCommit1
Perms: admin
Inputs:
[
{
"Sector": {
"Miner": 1000,
"Number": 9
},
"ID": "07070707-0707-0707-0707-070707070707"
},
null,
{
"Code": 0,
"Message": "string value"
}
]
Response: {}
ReturnSealPreCommit2
Perms: admin
Inputs:
[
{
"Sector": {
"Miner": 1000,
"Number": 9
},
"ID": "07070707-0707-0707-0707-070707070707"
},
{
"Unsealed": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Sealed": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
},
{
"Code": 0,
"Message": "string value"
}
]
Response: {}
ReturnUnsealPiece
Perms: admin
Inputs:
[
{
"Sector": {
"Miner": 1000,
"Number": 9
},
"ID": "07070707-0707-0707-0707-070707070707"
},
{
"Code": 0,
"Message": "string value"
}
]
Response: {}
Sealing
SealingAbort
There are not yet any comments for this method.
Perms: admin
Inputs:
[
{
"Sector": {
"Miner": 1000,
"Number": 9
},
"ID": "07070707-0707-0707-0707-070707070707"
}
]
Response: {}
SealingSchedDiag
SealingSchedDiag dumps internal sealing scheduler state
Perms: admin
Inputs:
[
true
]
Response: {}
Sector
SectorGetExpectedSealDuration
SectorGetExpectedSealDuration gets the expected time for a sector to seal
Perms: read
Inputs: null
Response: 60000000000
SectorGetSealDelay
SectorGetSealDelay gets the time that a newly-created sector waits for more deals before it starts sealing
Perms: read
Inputs: null
Response: 60000000000
SectorMarkForUpgrade
There are not yet any comments for this method.
Perms: admin
Inputs:
[
9
]
Response: {}
SectorRemove
SectorRemove removes the sector from storage. It doesn't terminate it on-chain, which can be done with SectorTerminate. Removing and not terminating live sectors will cause additional penalties.
Perms: admin
Inputs:
[
9
]
Response: {}
SectorSetExpectedSealDuration
SectorSetExpectedSealDuration sets the expected time for a sector to seal
Perms: write
Inputs:
[
60000000000
]
Response: {}
SectorSetSealDelay
SectorSetSealDelay sets the time that a newly-created sector waits for more deals before it starts sealing
Perms: write
Inputs:
[
60000000000
]
Response: {}
SectorStartSealing
SectorStartSealing can be called on sectors in Empty or WaitDeals states to trigger sealing early
Perms: write
Inputs:
[
9
]
Response: {}
SectorTerminate
SectorTerminate terminates the sector on-chain (adding it to a termination batch first), then automatically removes it from storage
Perms: admin
Inputs:
[
9
]
Response: {}
SectorTerminateFlush
SectorTerminateFlush immediately sends a terminate message with sectors batched for termination. Returns null if message wasn't sent
Perms: admin
Inputs: null
Response: null
SectorTerminatePending
SectorTerminatePending returns a list of pending sector terminations to be sent in the next batch message
Perms: admin
Inputs: null
Response: null
Sectors
SectorsList
List all staged sectors
Perms: read
Inputs: null
Response:
[
123,
124
]
SectorsListInStates
List sectors in particular states
Perms: read
Inputs:
[
null
]
Response:
[
123,
124
]
SectorsRefs
There are not yet any comments for this method.
Perms: read
Inputs: null
Response:
{
"98000": [
{
"SectorID": 100,
"Offset": 10485760,
"Size": 1048576
}
]
}
SectorsStatus
Get the status of a given sector by ID
Perms: read
Inputs:
[
9,
true
]
Response:
{
"SectorID": 9,
"State": "Proving",
"CommD": null,
"CommR": null,
"Proof": "Ynl0ZSBhcnJheQ==",
"Deals": null,
"Ticket": {
"Value": null,
"Epoch": 10101
},
"Seed": {
"Value": null,
"Epoch": 10101
},
"PreCommitMsg": null,
"CommitMsg": null,
"Retries": 42,
"ToUpgrade": true,
"LastErr": "string value",
"Log": null,
"SealProof": 8,
"Activation": 10101,
"Expiration": 10101,
"DealWeight": "0",
"VerifiedDealWeight": "0",
"InitialPledge": "0",
"OnTime": 10101,
"Early": 10101
}
SectorsSummary
Get summary info of sectors
Perms: read
Inputs: null
Response:
{
"Proving": 120
}
SectorsUpdate
There are not yet any comments for this method.
Perms: admin
Inputs:
[
9,
"Proving"
]
Response: {}
Storage
StorageAddLocal
There are not yet any comments for this method.
Perms: admin
Inputs:
[
"string value"
]
Response: {}
StorageAttach
Perms: admin
Inputs:
[
{
"ID": "76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8",
"URLs": null,
"Weight": 42,
"MaxStorage": 42,
"CanSeal": true,
"CanStore": true
},
{
"Capacity": 9,
"Available": 9,
"FSAvailable": 9,
"Reserved": 9,
"Max": 9,
"Used": 9
}
]
Response: {}
StorageBestAlloc
Perms: admin
Inputs:
[
1,
34359738368,
"sealing"
]
Response: null
StorageDeclareSector
Perms: admin
Inputs:
[
"76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8",
{
"Miner": 1000,
"Number": 9
},
1,
true
]
Response: {}
StorageDropSector
Perms: admin
Inputs:
[
"76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8",
{
"Miner": 1000,
"Number": 9
},
1
]
Response: {}
StorageFindSector
Perms: admin
Inputs:
[
{
"Miner": 1000,
"Number": 9
},
1,
34359738368,
true
]
Response: null
StorageInfo
Perms: admin
Inputs:
[
"76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8"
]
Response:
{
"ID": "76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8",
"URLs": null,
"Weight": 42,
"MaxStorage": 42,
"CanSeal": true,
"CanStore": true
}
StorageList
There are not yet any comments for this method.
Perms: admin
Inputs: null
Response:
{
"76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8": [
{
"Miner": 1000,
"Number": 100,
"SectorFileType": 2
}
]
}
StorageLocal
There are not yet any comments for this method.
Perms: admin
Inputs: null
Response:
{
"76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8": "/data/path"
}
StorageLock
Perms: admin
Inputs:
[
{
"Miner": 1000,
"Number": 9
},
1,
1
]
Response: {}
StorageReportHealth
Perms: admin
Inputs:
[
"76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8",
{
"Stat": {
"Capacity": 9,
"Available": 9,
"FSAvailable": 9,
"Reserved": 9,
"Max": 9,
"Used": 9
},
"Err": "string value"
}
]
Response: {}
StorageStat
There are not yet any comments for this method.
Perms: admin
Inputs:
[
"76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8"
]
Response:
{
"Capacity": 9,
"Available": 9,
"FSAvailable": 9,
"Reserved": 9,
"Max": 9,
"Used": 9
}
StorageTryLock
Perms: admin
Inputs:
[
{
"Miner": 1000,
"Number": 9
},
1,
1
]
Response: true
Worker
WorkerConnect
WorkerConnect tells the node to connect to workers RPC
Perms: admin
Inputs:
[
"string value"
]
Response: {}
WorkerJobs
There are not yet any comments for this method.
Perms: admin
Inputs: null
Response:
{
"ef8d99a2-6865-4189-8ffa-9fef0f806eee": [
{
"ID": {
"Sector": {
"Miner": 1000,
"Number": 100
},
"ID": "76081ba0-61bd-45a5-bc08-af05f1c26e5d"
},
"Sector": {
"Miner": 1000,
"Number": 100
},
"Task": "seal/v0/precommit/2",
"RunWait": 0,
"Start": "2020-11-12T09:22:07Z",
"Hostname": "host"
}
]
}
WorkerStats
There are not yet any comments for this method.
Perms: admin
Inputs: null
Response:
{
"ef8d99a2-6865-4189-8ffa-9fef0f806eee": {
"Info": {
"Hostname": "host",
"Resources": {
"MemPhysical": 274877906944,
"MemSwap": 128849018880,
"MemReserved": 2147483648,
"CPUs": 64,
"GPUs": [
"aGPU 1337"
]
}
},
"Enabled": true,
"MemUsedMin": 0,
"MemUsedMax": 0,
"GpuUsed": false,
"CpuUse": 0
}
}