Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge releases into v1.10 release #6494

Merged
merged 90 commits into from
Jun 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
571114b
Scaffolding for API versioning
magik6k Mar 23, 2021
3fe4b50
apigen: Work with versioned apis
magik6k Mar 23, 2021
d198cf4
make docsgen work with versioned api
magik6k Mar 23, 2021
efccf7d
Generate v0 mocks
magik6k Mar 23, 2021
421338b
ci: Fix cbor gen check
magik6k Mar 23, 2021
b3774f8
openrpc: Don't use os.Args in init
magik6k Mar 23, 2021
65dcec0
api client: Use versioned api packages
magik6k Mar 23, 2021
eed5840
fix lotus-shed
magik6k Mar 23, 2021
759ea5b
Merge remote-tracking branch 'origin/master' into feat/v1-api
magik6k Mar 25, 2021
7a23b41
Merge apistruct with the api package
magik6k Mar 25, 2021
c25190b
api: struct.go -> proxy_gen.go
magik6k Mar 25, 2021
736c697
make: Fix parallel gen
magik6k Mar 25, 2021
9223a8e
Fix lotus-soup build
magik6k Mar 25, 2021
e003977
apiclient: Version client funcs
magik6k Mar 25, 2021
1e10429
api: Add basic package readme
magik6k Mar 25, 2021
ba49c62
cli: Default to v0 api for now
magik6k Apr 1, 2021
1a5c4d7
Merge remote-tracking branch 'origin/master' into feat/v1-api
magik6k Apr 1, 2021
3cac23b
cli: get raw full api correctly
magik6k Apr 2, 2021
c9866da
Merge remote-tracking branch 'origin/master' into feat/v1-api
magik6k Apr 2, 2021
64bf5b3
cliutil: cast full api to the v0 interface
magik6k Apr 2, 2021
0103d2f
v1 api: Cleanup message wait/search apis
magik6k Apr 2, 2021
1b32d7f
cli: fix build with v1 api changes
magik6k Apr 3, 2021
09c374c
api stub codegen
magik6k Apr 3, 2021
f4e46c9
implement v1 api with api modules
magik6k Apr 3, 2021
deb2b90
Fix lotus/miner build
magik6k Apr 5, 2021
d8bff4d
Make gateway work with v1 api
magik6k Apr 5, 2021
81bd279
Propagate StateMsg api changes
magik6k Apr 5, 2021
eee50ca
Fix buildall
magik6k Apr 5, 2021
e8f28d7
Fix tests
magik6k Apr 5, 2021
c3736f4
gateway: use correct path in serveRpc
magik6k Apr 6, 2021
a5921a9
fix lotus-soup build
magik6k Apr 6, 2021
cf96ad4
fix lint
magik6k Apr 6, 2021
3156bfd
Merge pull request #5970 from filecoin-project/feat/v1api-msgwait-cle…
magik6k Apr 11, 2021
a9e8695
Create codeql-analysis.yml
jfcg Apr 12, 2021
8ce9412
rm schedule, python, js from codeql
jfcg Apr 12, 2021
77f6d7c
Merge pull request #6021 from jfcg/master
magik6k Apr 13, 2021
5785054
Bump version to 1.7.1-dev
magik6k Apr 13, 2021
9e600ea
Merge pull request #6028 from filecoin-project/chore/bump-v1.8
magik6k Apr 13, 2021
e769351
Merge remote-tracking branch 'origin/master' into feat/v1-api
magik6k Apr 13, 2021
cc55aba
Docsgen
magik6k Apr 13, 2021
50b4ea3
Merge pull request #5685 from filecoin-project/feat/v1-api
magik6k Apr 13, 2021
47145b6
fix: adjust client deal collateral overestimation to 1.2
dirkmc Apr 9, 2021
53537a0
stmgr: Improve ApplyBlocks metrics
magik6k Apr 15, 2021
77d004e
Fix nonce getting on Lotus lite
Apr 15, 2021
fd0eb2e
Disable flaky checkpoint tests
Apr 15, 2021
e006310
sigs: vector tests for bls
magik6k Apr 15, 2021
6a775df
Merge pull request #6050 from filecoin-project/flake/checkpoint
magik6k Apr 15, 2021
35cf83d
Merge pull request #6047 from filecoin-project/feat/client-collat-bounds
magik6k Apr 15, 2021
4436c18
Fix v0/v1 API versions
magik6k Apr 15, 2021
0e6fe26
Remove the usless commented code
kwuaint Apr 16, 2021
1b696aa
stmgr: Fix VMApplyEarly metric
magik6k Apr 16, 2021
f97784a
Merge pull request #6053 from kwuaint/patch-1
magik6k Apr 16, 2021
66c4089
Fix signature in messagepool, wire in context
Apr 16, 2021
c118415
polish(api): expose filReserveDisbursed via CirculatingSupply API
frrist Apr 16, 2021
dab2a41
Raise client MaxFee default
ribasushi Apr 16, 2021
6762f56
Merge pull request #6060 from filecoin-project/chore/raise-default-cl…
magik6k Apr 17, 2021
5e71bce
Merge pull request #6052 from filecoin-project/fix/miner-v1api-check
magik6k Apr 17, 2021
bfecc35
Merge pull request #6051 from filecoin-project/test/bls-vectors
magik6k Apr 18, 2021
bb7801e
fix lint
magik6k Apr 18, 2021
c72eb0c
Merge pull request #6048 from filecoin-project/fix/nonce-getting
magik6k Apr 18, 2021
03df99f
make gen
magik6k Apr 18, 2021
c7a67cf
Merge pull request #6059 from filecoin-project/frrist/expose-filReser…
magik6k Apr 18, 2021
2e63690
Merge pull request #6056 from filecoin-project/feat/vm-metrics
magik6k Apr 18, 2021
508e2d5
gateway: Fix api getter
magik6k Apr 20, 2021
ad0fdd5
Merge pull request #6072 from filecoin-project/fix/gateway-api-getter
magik6k Apr 20, 2021
39e49f1
implement WalletBalance on gateway
Apr 21, 2021
fbd003a
add walletbalance to v0api
Apr 21, 2021
6134464
feat: add more debug logging for unsealing
dirkmc Apr 20, 2021
448b5cb
Shed util to sanity-check total balance is FilBase
arajasek Apr 22, 2021
7738886
fix full node painc
Reskorey Apr 23, 2021
58bee65
go fmt
Reskorey Apr 23, 2021
e5d8ae7
Merge pull request #6096 from Reskorey/master
magik6k Apr 23, 2021
ad3c588
Merge pull request #6090 from filecoin-project/feat/rtvl-prov-unseal-…
magik6k Apr 23, 2021
21de8b2
Merge pull request #6092 from filecoin-project/asr/shed-util-sanity
magik6k Apr 23, 2021
86d4f5f
Merge pull request #6075 from filecoin-project/feat/gateway-walletbal…
magik6k Apr 23, 2021
bd75393
Update CODEOWNERS
magik6k Apr 26, 2021
17e5d61
Update CODEOWNERS
magik6k Apr 26, 2021
abc8882
Merge pull request #6110 from filecoin-project/misc/update-codeowners
magik6k Apr 26, 2021
66e8517
add "expected duration" label to inspect-deals output
yusefnapora Apr 26, 2021
c88eeaa
Merge pull request #6112 from filecoin-project/ux/inspect-deal-estimates
magik6k Apr 26, 2021
bfa332c
api: Document API change process
magik6k Apr 26, 2021
86d9372
Merge pull request #6114 from filecoin-project/docs/api-makegen
magik6k Apr 26, 2021
c4137a4
Merge commit 'f1ded63d608e1b191d79c780b8065f8cff367c98' into feat/nv1…
magik6k Apr 27, 2021
1a980bf
bump version
magik6k Apr 27, 2021
dc75ad3
Merge pull request #6117 from filecoin-project/feat/nv12-1.11
magik6k Apr 27, 2021
b79861c
Merge branch 'master' into releases
arajasek Apr 27, 2021
5af3af5
Merge branch 'release/v1.9.0' into releases
jennijuju May 17, 2021
ada7f97
docsgen
jennijuju May 17, 2021
520a009
Merge branch 'releases' into release/v1.10.0
arajasek Jun 15, 2021
81b4123
sealing: Fix restartSectors race
magik6k Jun 15, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ jobs:
- run: make deps
- run: go install golang.org/x/tools/cmd/goimports
- run: go install github.com/hannahhoward/cbor-gen-for
- run: go generate ./...
- run: make type-gen
- run: git --no-pager diff
- run: git --no-pager diff --quiet

Expand All @@ -453,6 +453,7 @@ jobs:
steps:
- install-deps
- prepare
- run: go install golang.org/x/tools/cmd/goimports
- run: zcat build/openrpc/full.json.gz | jq > ../pre-openrpc-full
- run: zcat build/openrpc/miner.json.gz | jq > ../pre-openrpc-miner
- run: zcat build/openrpc/worker.json.gz | jq > ../pre-openrpc-worker
Expand Down
8 changes: 4 additions & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
## the PR before merging.

### Global owners.
* @magik6k @whyrusleeping @Kubuxu
* @magik6k @arajasek

### Conformance testing.
conformance/ @raulk
extern/test-vectors @raulk
cmd/tvx @raulk
conformance/ @ZenGround0
extern/test-vectors @ZenGround0
cmd/tvx @ZenGround0
65 changes: 65 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
37 changes: 23 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,13 @@ testground:
.PHONY: testground
BINS+=testground


tvx:
rm -f tvx
go build -o tvx ./cmd/tvx
.PHONY: tvx
BINS+=tvx

install-chainwatch: lotus-chainwatch
install -C ./lotus-chainwatch /usr/local/bin/lotus-chainwatch

Expand Down Expand Up @@ -318,47 +325,49 @@ dist-clean:
git submodule deinit --all -f
.PHONY: dist-clean

type-gen:
type-gen: api-gen
go run ./gen/main.go
go generate ./...
go generate -x ./...
goimports -w api/

method-gen:
method-gen: api-gen
(cd ./lotuspond/front/src/chain && go run ./methodgen.go)

actors-gen:
go run ./chain/actors/agen
go fmt ./...

api-gen:
go run ./gen/api > api/apistruct/struct.go
goimports -w api/apistruct
goimports -w api/apistruct
go run ./gen/api
goimports -w api
goimports -w api
.PHONY: api-gen

docsgen: docsgen-md docsgen-openrpc

docsgen-md-bin: actors-gen
docsgen-md-bin: api-gen actors-gen
go build $(GOFLAGS) -o docgen-md ./api/docgen/cmd
docsgen-openrpc-bin: actors-gen
docsgen-openrpc-bin: api-gen actors-gen
go build $(GOFLAGS) -o docgen-openrpc ./api/docgen-openrpc/cmd

docsgen-md: docsgen-md-full docsgen-md-storage docsgen-md-worker

docsgen-md-full: docsgen-md-bin
./docgen-md "api/api_full.go" "FullNode" > documentation/en/api-methods.md
./docgen-md "api/api_full.go" "FullNode" "api" "./api" > documentation/en/api-v1-unstable-methods.md
./docgen-md "api/v0api/full.go" "FullNode" "v0api" "./api/v0api" > documentation/en/api-v0-methods.md
docsgen-md-storage: docsgen-md-bin
./docgen-md "api/api_storage.go" "StorageMiner" > documentation/en/api-methods-miner.md
./docgen-md "api/api_storage.go" "StorageMiner" "api" "./api" > documentation/en/api-v0-methods-miner.md
docsgen-md-worker: docsgen-md-bin
./docgen-md "api/api_worker.go" "Worker" > documentation/en/api-methods-worker.md
./docgen-md "api/api_worker.go" "Worker" "api" "./api" > documentation/en/api-v0-methods-worker.md

docsgen-openrpc: docsgen-openrpc-full docsgen-openrpc-storage docsgen-openrpc-worker

docsgen-openrpc-full: docsgen-openrpc-bin
./docgen-openrpc "api/api_full.go" "FullNode" -gzip > build/openrpc/full.json.gz
./docgen-openrpc "api/api_full.go" "FullNode" "api" "./api" -gzip > build/openrpc/full.json.gz
docsgen-openrpc-storage: docsgen-openrpc-bin
./docgen-openrpc "api/api_storage.go" "StorageMiner" -gzip > build/openrpc/miner.json.gz
./docgen-openrpc "api/api_storage.go" "StorageMiner" "api" "./api" -gzip > build/openrpc/miner.json.gz
docsgen-openrpc-worker: docsgen-openrpc-bin
./docgen-openrpc "api/api_worker.go" "Worker" -gzip > build/openrpc/worker.json.gz
./docgen-openrpc "api/api_worker.go" "Worker" "api" "./api" -gzip > build/openrpc/worker.json.gz

.PHONY: docsgen docsgen-md-bin docsgen-openrpc-bin

Expand Down
14 changes: 14 additions & 0 deletions api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Lotus API

This package contains all lotus API definitions. Interfaces defined here are
exposed as JsonRPC 2.0 endpoints by lotus programs.

### Versions

| File | Alias File | Interface | Exposed by | Version | HTTP Endpoint | Status | Docs
|------------------|-------------------|----------------|--------------------|---------|---------------|------------------------------|------
| `api_common.go` | `v0api/latest.go` | `Common` | lotus; lotus-miner | v0 | `/rpc/v0` | Latest, Stable | [Methods](../documentation/en/api-v0-methods.md)
| `api_full.go` | `v1api/latest.go` | `FullNode` | lotus | v1 | `/rpc/v1` | Latest, **Work in progress** | [Methods](../documentation/en/api-v1-unstable-methods.md)
| `api_storage.go` | `v0api/latest.go` | `StorageMiner` | lotus-miner | v0 | `/rpc/v0` | Latest, Stable | [Methods](../documentation/en/api-v0-methods-miner.md)
| `api_worker.go` | `v0api/latest.go` | `Worker` | lotus-worker | v0 | `/rpc/v0` | Latest, Stable | [Methods](../documentation/en/api-v0-methods-worker.md)
| `v0api/full.go` | | `FullNode` | lotus | v0 | `/rpc/v0` | Stable | [Methods](../documentation/en/api-v0-methods.md)
11 changes: 11 additions & 0 deletions api/api_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ import (
apitypes "github.com/filecoin-project/lotus/api/types"
)

// MODIFYING THE API INTERFACE
//
// When adding / changing methods in this file:
// * Do the change here
// * Adjust implementation in `node/impl/`
// * Run `make gen` - this will:
// * Generate proxy structs
// * Generate mocks
// * Generate markdown docs
// * Generate openrpc blobs

type Common interface {

// MethodGroup: Auth
Expand Down
88 changes: 32 additions & 56 deletions api/api_full.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,22 @@ type ChainIO interface {
ChainHasObj(context.Context, cid.Cid) (bool, error)
}

const LookbackNoLimit = abi.ChainEpoch(-1)

// MODIFYING THE API INTERFACE
//
// NOTE: This is the V1 (Unstable) API - to add methods to the V0 (Stable) API
// you'll have to add those methods to interfaces in `api/v0api`
//
// When adding / changing methods in this file:
// * Do the change here
// * Adjust implementation in `node/impl/`
// * Run `make gen` - this will:
// * Generate proxy structs
// * Generate mocks
// * Generate markdown docs
// * Generate openrpc blobs

// FullNode API is a low-level interface to the Filecoin network full node
type FullNode interface {
Common
Expand Down Expand Up @@ -430,56 +446,24 @@ type FullNode interface {
StateSectorExpiration(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (*miner.SectorExpiration, error) //perm:read
// StateSectorPartition finds deadline/partition with the specified sector
StateSectorPartition(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tok types.TipSetKey) (*miner.SectorLocation, error) //perm:read
// StateSearchMsg searches for a message in the chain, and returns its receipt and the tipset where it was executed
//
// NOTE: If a replacing message is found on chain, this method will return
// a MsgLookup for the replacing message - the MsgLookup.Message will be a different
// CID than the one provided in the 'cid' param, MsgLookup.Receipt will contain the
// result of the execution of the replacing message.
//
// If the caller wants to ensure that exactly the requested message was executed,
// they MUST check that MsgLookup.Message is equal to the provided 'cid'.
// Without this check both the requested and original message may appear as
// successfully executed on-chain, which may look like a double-spend.
//
// A replacing message is a message with a different CID, any of Gas values, and
// different signature, but with all other parameters matching (source/destination,
// nonce, params, etc.)
StateSearchMsg(context.Context, cid.Cid) (*MsgLookup, error) //perm:read
// StateSearchMsgLimited looks back up to limit epochs in the chain for a message, and returns its receipt and the tipset where it was executed
// StateSearchMsg looks back up to limit epochs in the chain for a message, and returns its receipt and the tipset where it was executed
//
// NOTE: If a replacing message is found on chain, this method will return
// a MsgLookup for the replacing message - the MsgLookup.Message will be a different
// CID than the one provided in the 'cid' param, MsgLookup.Receipt will contain the
// result of the execution of the replacing message.
//
// If the caller wants to ensure that exactly the requested message was executed,
// they MUST check that MsgLookup.Message is equal to the provided 'cid'.
// Without this check both the requested and original message may appear as
// they must check that MsgLookup.Message is equal to the provided 'cid', or set the
// `allowReplaced` parameter to false. Without this check, and with `allowReplaced`
// set to true, both the requested and original message may appear as
// successfully executed on-chain, which may look like a double-spend.
//
// A replacing message is a message with a different CID, any of Gas values, and
// different signature, but with all other parameters matching (source/destination,
// nonce, params, etc.)
StateSearchMsgLimited(ctx context.Context, msg cid.Cid, limit abi.ChainEpoch) (*MsgLookup, error) //perm:read
// StateWaitMsg looks back in the chain for a message. If not found, it blocks until the
// message arrives on chain, and gets to the indicated confidence depth.
//
// NOTE: If a replacing message is found on chain, this method will return
// a MsgLookup for the replacing message - the MsgLookup.Message will be a different
// CID than the one provided in the 'cid' param, MsgLookup.Receipt will contain the
// result of the execution of the replacing message.
//
// If the caller wants to ensure that exactly the requested message was executed,
// they MUST check that MsgLookup.Message is equal to the provided 'cid'.
// Without this check both the requested and original message may appear as
// successfully executed on-chain, which may look like a double-spend.
//
// A replacing message is a message with a different CID, any of Gas values, and
// different signature, but with all other parameters matching (source/destination,
// nonce, params, etc.)
StateWaitMsg(ctx context.Context, cid cid.Cid, confidence uint64) (*MsgLookup, error) //perm:read
// StateWaitMsgLimited looks back up to limit epochs in the chain for a message.
StateSearchMsg(ctx context.Context, from types.TipSetKey, msg cid.Cid, limit abi.ChainEpoch, allowReplaced bool) (*MsgLookup, error) //perm:read
// StateWaitMsg looks back up to limit epochs in the chain for a message.
// If not found, it blocks until the message arrives on chain, and gets to the
// indicated confidence depth.
//
Expand All @@ -489,14 +473,15 @@ type FullNode interface {
// result of the execution of the replacing message.
//
// If the caller wants to ensure that exactly the requested message was executed,
// they MUST check that MsgLookup.Message is equal to the provided 'cid'.
// Without this check both the requested and original message may appear as
// they must check that MsgLookup.Message is equal to the provided 'cid', or set the
// `allowReplaced` parameter to false. Without this check, and with `allowReplaced`
// set to true, both the requested and original message may appear as
// successfully executed on-chain, which may look like a double-spend.
//
// A replacing message is a message with a different CID, any of Gas values, and
// different signature, but with all other parameters matching (source/destination,
// nonce, params, etc.)
StateWaitMsgLimited(ctx context.Context, cid cid.Cid, confidence uint64, limit abi.ChainEpoch) (*MsgLookup, error) //perm:read
StateWaitMsg(ctx context.Context, cid cid.Cid, confidence uint64, limit abi.ChainEpoch, allowReplaced bool) (*MsgLookup, error) //perm:read
// StateListMiners returns the addresses of every miner that has claimed power in the Power Actor
StateListMiners(context.Context, types.TipSetKey) ([]address.Address, error) //perm:read
// StateListActors returns the addresses of every actor in the state
Expand All @@ -516,16 +501,6 @@ type FullNode interface {
// StateChangedActors returns all the actors whose states change between the two given state CIDs
// TODO: Should this take tipset keys instead?
StateChangedActors(context.Context, cid.Cid, cid.Cid) (map[string]types.Actor, error) //perm:read
// StateGetReceipt returns the message receipt for the given message or for a
// matching gas-repriced replacing message
//
// NOTE: If the requested message was replaced, this method will return the receipt
// for the replacing message - if the caller needs the receipt for exactly the
// requested message, use StateSearchMsg().Receipt, and check that MsgLookup.Message
// is matching the requested CID
//
// DEPRECATED: Use StateSearchMsg, this method won't be supported in v1 API
StateGetReceipt(context.Context, cid.Cid, types.TipSetKey) (*types.MessageReceipt, error) //perm:read
// StateMinerSectorCount returns the number of sectors in a miner's sector set and proving set
StateMinerSectorCount(context.Context, address.Address, types.TipSetKey) (MinerSectors, error) //perm:read
// StateCompute is a flexible command that applies the given messages on the given tipset.
Expand Down Expand Up @@ -1038,11 +1013,12 @@ type DealCollateralBounds struct {
}

type CirculatingSupply struct {
FilVested abi.TokenAmount
FilMined abi.TokenAmount
FilBurnt abi.TokenAmount
FilLocked abi.TokenAmount
FilCirculating abi.TokenAmount
FilVested abi.TokenAmount
FilMined abi.TokenAmount
FilBurnt abi.TokenAmount
FilLocked abi.TokenAmount
FilCirculating abi.TokenAmount
FilReserveDisbursed abi.TokenAmount
}

type MiningBaseInfo struct {
Expand Down
20 changes: 17 additions & 3 deletions api/api_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@ import (
"github.com/filecoin-project/lotus/chain/types"
)

// MODIFYING THE API INTERFACE
//
// NOTE: This is the V1 (Unstable) API - to add methods to the V0 (Stable) API
// you'll have to add those methods to interfaces in `api/v0api`
//
// When adding / changing methods in this file:
// * Do the change here
// * Adjust implementation in `node/impl/`
// * Run `make gen` - this will:
// * Generate proxy structs
// * Generate mocks
// * Generate markdown docs
// * Generate openrpc blobs

type Gateway interface {
ChainHasObj(context.Context, cid.Cid) (bool, error)
ChainHead(ctx context.Context) (*types.TipSet, error)
Expand All @@ -31,7 +45,6 @@ type Gateway interface {
StateAccountKey(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error)
StateDealProviderCollateralBounds(ctx context.Context, size abi.PaddedPieceSize, verified bool, tsk types.TipSetKey) (DealCollateralBounds, error)
StateGetActor(ctx context.Context, actor address.Address, ts types.TipSetKey) (*types.Actor, error)
StateGetReceipt(context.Context, cid.Cid, types.TipSetKey) (*types.MessageReceipt, error)
StateListMiners(ctx context.Context, tsk types.TipSetKey) ([]address.Address, error)
StateLookupID(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error)
StateMarketBalance(ctx context.Context, addr address.Address, tsk types.TipSetKey) (MarketBalance, error)
Expand All @@ -40,8 +53,9 @@ type Gateway interface {
StateMinerProvingDeadline(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*dline.Info, error)
StateMinerPower(context.Context, address.Address, types.TipSetKey) (*MinerPower, error)
StateNetworkVersion(context.Context, types.TipSetKey) (apitypes.NetworkVersion, error)
StateSearchMsg(ctx context.Context, msg cid.Cid) (*MsgLookup, error)
StateSectorGetInfo(ctx context.Context, maddr address.Address, n abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorOnChainInfo, error)
StateVerifiedClientStatus(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*abi.StoragePower, error)
StateWaitMsg(ctx context.Context, msg cid.Cid, confidence uint64) (*MsgLookup, error)
StateSearchMsg(ctx context.Context, from types.TipSetKey, msg cid.Cid, limit abi.ChainEpoch, allowReplaced bool) (*MsgLookup, error)
StateWaitMsg(ctx context.Context, cid cid.Cid, confidence uint64, limit abi.ChainEpoch, allowReplaced bool) (*MsgLookup, error)
WalletBalance(context.Context, address.Address) (types.BigInt, error)
}
Loading