diff --git a/.circleci/config.yml b/.circleci/config.yml index 51993867d..0df595bfc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ executors: golang: docker: # Must match GO_VERSION_MIN in project root - - image: cimg/go:1.18.1 + - image: cimg/go:1.18.8 resource_class: 2xlarge ubuntu: docker: @@ -1073,8 +1073,6 @@ workflows: - /^v\d+\.\d+\.\d+(-rc\d+)?$/ - release: name: "Release" - context: - - filecoin-goreleaser-key requires: - "Build ( darwin / amd64 )" - "Build ( linux / amd64 )" @@ -1088,8 +1086,6 @@ workflows: - /^v\d+\.\d+\.\d+(-rc\d+)?$/ - release: name: "Release (dry-run)" - context: - - filecoin-goreleaser-key dry-run: true requires: - "Build ( darwin / amd64 )" diff --git a/.circleci/template.yml b/.circleci/template.yml index ed2b83914..8cd3e34dd 100644 --- a/.circleci/template.yml +++ b/.circleci/template.yml @@ -7,7 +7,7 @@ executors: golang: docker: # Must match GO_VERSION_MIN in project root - - image: cimg/go:1.18.1 + - image: cimg/go:1.18.8 resource_class: 2xlarge ubuntu: docker: @@ -758,8 +758,6 @@ workflows: - /^v\d+\.\d+\.\d+(-rc\d+)?$/ - release: name: "Release" - context: - - filecoin-goreleaser-key requires: - "Build ( darwin / amd64 )" - "Build ( linux / amd64 )" @@ -773,8 +771,6 @@ workflows: - /^v\d+\.\d+\.\d+(-rc\d+)?$/ - release: name: "Release (dry-run)" - context: - - filecoin-goreleaser-key dry-run: true requires: - "Build ( darwin / amd64 )" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 70d15c60c..65d5fd93a 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -37,7 +37,7 @@ jobs: - uses: actions/setup-go@v1 with: - go-version: '1.18.1' + go-version: '1.18.8' # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/Dockerfile b/Dockerfile index f3638cc46..5c147e930 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ ##################################### -FROM golang:1.18.1-buster AS lotus-builder +FROM golang:1.18.8-buster AS lotus-builder MAINTAINER Lotus Development Team RUN apt-get update && apt-get install -y ca-certificates build-essential clang ocl-icd-opencl-dev ocl-icd-libopencl1 jq libhwloc-dev diff --git a/Dockerfile.lotus b/Dockerfile.lotus index e6ae6afe9..2278e8511 100644 --- a/Dockerfile.lotus +++ b/Dockerfile.lotus @@ -1,6 +1,6 @@ ##### DEPRECATED -FROM golang:1.18.1-buster AS builder-deps +FROM golang:1.18.8-buster AS builder-deps MAINTAINER Lotus Development Team RUN apt-get update && apt-get install -y ca-certificates build-essential clang ocl-icd-opencl-dev ocl-icd-libopencl1 jq libhwloc-dev diff --git a/GO_VERSION_MIN b/GO_VERSION_MIN index ec6d649be..1a31d398c 100644 --- a/GO_VERSION_MIN +++ b/GO_VERSION_MIN @@ -1 +1 @@ -1.18.1 +1.18.8 diff --git a/README.md b/README.md index 23f3eb2d9..76cac2c7e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ - +

@@ -71,10 +71,10 @@ For other distributions you can find the required dependencies [here.](https://l #### Go -To build Lotus, you need a working installation of [Go 1.18.1 or higher](https://golang.org/dl/): +To build Lotus, you need a working installation of [Go 1.18.8 or higher](https://golang.org/dl/): ```bash -wget -c https://golang.org/dl/go1.18.1.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local +wget -c https://golang.org/dl/go1.18.8.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local ``` **TIP:** diff --git a/api/docgen/docgen.go b/api/docgen/docgen.go index 96fc068cc..efb90c533 100644 --- a/api/docgen/docgen.go +++ b/api/docgen/docgen.go @@ -24,6 +24,8 @@ import ( "github.com/libp2p/go-libp2p/core/peer" "github.com/libp2p/go-libp2p/core/protocol" "github.com/multiformats/go-multiaddr" + "golang.org/x/text/cases" + "golang.org/x/text/language" "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-bitfield" @@ -456,7 +458,8 @@ func exampleStruct(method string, t, parent reflect.Type) interface{} { if f.Type == parent { continue } - if strings.Title(f.Name) == f.Name { + caser := cases.Title(language.English) + if caser.String(f.Name) == f.Name { ns.Elem().Field(i).Set(reflect.ValueOf(ExampleValue(method, f.Type, t))) } } diff --git a/api/mocks/mock_full.go b/api/mocks/mock_full.go index 4a7cbe54a..b5bf2bfea 100644 --- a/api/mocks/mock_full.go +++ b/api/mocks/mock_full.go @@ -2394,10 +2394,10 @@ func (mr *MockFullNodeMockRecorder) StateCall(arg0, arg1, arg2 interface{}) *gom } // StateChangedActors mocks base method. -func (m *MockFullNode) StateChangedActors(arg0 context.Context, arg1, arg2 cid.Cid) (map[string]types.Actor, error) { +func (m *MockFullNode) StateChangedActors(arg0 context.Context, arg1, arg2 cid.Cid) (map[string]types.ActorV5, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StateChangedActors", arg0, arg1, arg2) - ret0, _ := ret[0].(map[string]types.Actor) + ret0, _ := ret[0].(map[string]types.ActorV5) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -2499,10 +2499,10 @@ func (mr *MockFullNodeMockRecorder) StateEncodeParams(arg0, arg1, arg2, arg3 int } // StateGetActor mocks base method. -func (m *MockFullNode) StateGetActor(arg0 context.Context, arg1 address.Address, arg2 types.TipSetKey) (*types.Actor, error) { +func (m *MockFullNode) StateGetActor(arg0 context.Context, arg1 address.Address, arg2 types.TipSetKey) (*types.ActorV5, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StateGetActor", arg0, arg1, arg2) - ret0, _ := ret[0].(*types.Actor) + ret0, _ := ret[0].(*types.ActorV5) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/api/v0api/v0mocks/mock_full.go b/api/v0api/v0mocks/mock_full.go index 2b815c4ca..3aff979ff 100644 --- a/api/v0api/v0mocks/mock_full.go +++ b/api/v0api/v0mocks/mock_full.go @@ -2249,10 +2249,10 @@ func (mr *MockFullNodeMockRecorder) StateCall(arg0, arg1, arg2 interface{}) *gom } // StateChangedActors mocks base method. -func (m *MockFullNode) StateChangedActors(arg0 context.Context, arg1, arg2 cid.Cid) (map[string]types.Actor, error) { +func (m *MockFullNode) StateChangedActors(arg0 context.Context, arg1, arg2 cid.Cid) (map[string]types.ActorV5, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StateChangedActors", arg0, arg1, arg2) - ret0, _ := ret[0].(map[string]types.Actor) + ret0, _ := ret[0].(map[string]types.ActorV5) ret1, _ := ret[1].(error) return ret0, ret1 } @@ -2324,10 +2324,10 @@ func (mr *MockFullNodeMockRecorder) StateDecodeParams(arg0, arg1, arg2, arg3, ar } // StateGetActor mocks base method. -func (m *MockFullNode) StateGetActor(arg0 context.Context, arg1 address.Address, arg2 types.TipSetKey) (*types.Actor, error) { +func (m *MockFullNode) StateGetActor(arg0 context.Context, arg1 address.Address, arg2 types.TipSetKey) (*types.ActorV5, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StateGetActor", arg0, arg1, arg2) - ret0, _ := ret[0].(*types.Actor) + ret0, _ := ret[0].(*types.ActorV5) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/build/actors/v10.tar.zst b/build/actors/v10.tar.zst new file mode 100644 index 000000000..a8e0e8378 Binary files /dev/null and b/build/actors/v10.tar.zst differ diff --git a/build/builtin_actors_gen.go b/build/builtin_actors_gen.go index 1178573a6..84c152493 100644 --- a/build/builtin_actors_gen.go +++ b/build/builtin_actors_gen.go @@ -41,6 +41,27 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet "system": MustParseCid("bafk2bzacedylltr57b2n6zpadh4i2c2kis4fzzvhao3kgvfaggrrbqyacew7q"), "verifiedregistry": MustParseCid("bafk2bzacecjkesz766626ab4svnzpq3jfs26a75vfktlfaku5fjdao2eyiqyq"), }, +}, { + Network: "butterflynet", + Version: 10, + ManifestCid: MustParseCid("bafy2bzacedrip7ekfxytqyx2dj5ggg7itm6w3lywgqsfs4lr4hlcrve6vgiqc"), + Actors: map[string]cid.Cid{ + "account": MustParseCid("bafk2bzacebui5xw2dlftdkdo7lalrcjceohc6xpqnmmyrtdhsihi555c34w3m"), + "cron": MustParseCid("bafk2bzacea7kk5jbwcl3hmy7lmuoswj2vwvm7enbibt4hwxoqdla7yuoqn3hy"), + "datacap": MustParseCid("bafk2bzacebnhnt3tubzngnzmlgxrfbjaf6dcsijplaz5nbdzye75fexdlpndq"), + "eam": MustParseCid("bafk2bzaceb5tc576ogvaafng6wm5qt5vonyha6dcfzyieu7zsaseulo6hogka"), + "embryo": MustParseCid("bafk2bzaceb5shyqwqsogg2izzfteoxcqji6pzqakuc3auvjo44uv5ndhaxt5i"), + "evm": MustParseCid("bafk2bzaceaxcgbhb2smi7yp7vjdqcclxc3iuma4rharhuavpwzgqxnhx6plss"), + "init": MustParseCid("bafk2bzaceddlj7vpdmsjhpafxfb3ltgwgzlckcss6khxllwiwwu5ml3d46pga"), + "multisig": MustParseCid("bafk2bzacecxryfy3nips4lmoehiim2gbhm5brxdeefslbenlhg2tix3rpkpnc"), + "paymentchannel": MustParseCid("bafk2bzacedu3xgcuftzf5xthcbwm55sd5rp4ptc2ulwciw56jajfy54kswiw6"), + "reward": MustParseCid("bafk2bzacedoojima37co6gllv35osnewurtycv6yudvjq2cgdwavll7sn6gbc"), + "storagemarket": MustParseCid("bafk2bzacedvtynnpaxuyunegh3x3cql3sidflwkjtrxkkaqcukdrmdox7xziw"), + "storageminer": MustParseCid("bafk2bzacednwhb2l4xth5tqgtmftybaj52rpehidesp2xjg7xbi7u62dgst6g"), + "storagepower": MustParseCid("bafk2bzacebx5cu7mkxiqxcwht3j45yd3mrstcvncpipgrqv2velnwpzkrcvzs"), + "system": MustParseCid("bafk2bzacedigfwdw7pjmmvsyzo2vajmfa53ctyp2yz35hsd5c63h4xrxskmmq"), + "verifiedregistry": MustParseCid("bafk2bzacedfq3vluteepuco72n6f7jlp6sbfsstpecjhukiou6g4jivrtkvx2"), + }, }, { Network: "calibrationnet", Version: 8, @@ -76,6 +97,27 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet "system": MustParseCid("bafk2bzaceaue3nzucbom3tcclgyaahy3iwvbqejsxrohiquakvvsjgbw3shac"), "verifiedregistry": MustParseCid("bafk2bzacebh7dj6j7yi5vadh7lgqjtq42qi2uq4n6zy2g5vjeathacwn2tscu"), }, +}, { + Network: "calibrationnet", + Version: 10, + ManifestCid: MustParseCid("bafy2bzacebenfsnosatbwn2vskkduv5dd4fclymp3szy5rudwjjnpacjwgabw"), + Actors: map[string]cid.Cid{ + "account": MustParseCid("bafk2bzacebvkqmplmi4qta56c3o7xenxfnh52ubcru4oqaavx2mel6h7f3r26"), + "cron": MustParseCid("bafk2bzaceddqlwubzbrhdnkvgzoo6jinmn35qqnh4vtmkxhhnqmvoy7z3ovm4"), + "datacap": MustParseCid("bafk2bzacedce7wj2kdujhvo55bfqwxup4gccdahvxpxtn4oqand67cnm7oaes"), + "eam": MustParseCid("bafk2bzacebvs75jzsh74vs43i5ve4ikbiy4h2sbg7fbqiv53lybwufhk6gntc"), + "embryo": MustParseCid("bafk2bzaceb5shyqwqsogg2izzfteoxcqji6pzqakuc3auvjo44uv5ndhaxt5i"), + "evm": MustParseCid("bafk2bzacebni52v7johlrrvfagunysb5b7ssruapbuw3lkw4raavhrf5dbjy2"), + "init": MustParseCid("bafk2bzacebdjvjkidqczhk2dfmmfastxihuru7qssdsegxibx2u6zsmwxbr6y"), + "multisig": MustParseCid("bafk2bzacea53zxqqchdykxyklsuuxr2nxavzym5prtw5jrnarrjldttcqxluo"), + "paymentchannel": MustParseCid("bafk2bzaceck54j7jukcc22ubrzf4yyiaxz6p5hmwkxqgzvevsn7x5nrpghxf4"), + "reward": MustParseCid("bafk2bzacedlh4i2phmiqfbfl2zyajpzaigbgqp3fcdwtphststpap6e3pe2xg"), + "storagemarket": MustParseCid("bafk2bzacednr26koccefqs3pkab4e3bu7g2hxtwodrqaidj7lmxtaj4l4qbyw"), + "storageminer": MustParseCid("bafk2bzaceb2vgdzj7ydnhfr4exyat2aiuigglhwqv7pu5p65l5syankhjbaeo"), + "storagepower": MustParseCid("bafk2bzacedbqdw62m5fah32bkvns2ubz32lgqu4fngp77aezzm3af7b6vmvsu"), + "system": MustParseCid("bafk2bzaceazgpbdm5nzg35jwmt6s4nqgy5ok2ne3ndhomkq6erits4l2ruyac"), + "verifiedregistry": MustParseCid("bafk2bzacebs7l5v7b74fy5eqkmcdccbkjqpxykn6au34p4si7m2hc3utrpwhq"), + }, }, { Network: "caterpillarnet", Version: 8, @@ -111,6 +153,27 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet "system": MustParseCid("bafk2bzacecisuqj2ln7ep72xaejvs2lrgh2logc7retxxpd3qvobymwyz7bxo"), "verifiedregistry": MustParseCid("bafk2bzacebyjosiripwqyf56yhjfs5hg26mch7totsqth4rgpt5j32hqg6ric"), }, +}, { + Network: "caterpillarnet", + Version: 10, + ManifestCid: MustParseCid("bafy2bzacecprcdvekabbiozu6jaferly4jpw4uxoxy55ouioopv2uhsyfnatg"), + Actors: map[string]cid.Cid{ + "account": MustParseCid("bafk2bzaceasuszw5iqejn3afhc2oftpmnhgwg5gt7d3fryfi3pzyuv4vaifzq"), + "cron": MustParseCid("bafk2bzaceadt6coa6p7cgwt7k7sz7hafpy3ilma4q4obghn6xsywjedar43om"), + "datacap": MustParseCid("bafk2bzacec3hswe3wucjxlqavck4ijdto65gwuzlqlhstpj22icx3xgy6y25m"), + "eam": MustParseCid("bafk2bzaceb52bwd7ikj7dnpeebaak2aaoeqdp6sm5n3qu75gyhym7o7sa64oo"), + "embryo": MustParseCid("bafk2bzaceb5shyqwqsogg2izzfteoxcqji6pzqakuc3auvjo44uv5ndhaxt5i"), + "evm": MustParseCid("bafk2bzacecw44r27pmmurhlkf5vqnqjxpivnh5oopegonnl2o7rtu3wyc4h4s"), + "init": MustParseCid("bafk2bzaceb2hcbworiltqg5227d6xcuhypgd2x2olsnqdk5ung5rzps5hze4y"), + "multisig": MustParseCid("bafk2bzacecwcqghlxf76d5a6uwn65ryb4ogrgktlfb6pc2625v5uznnz5sshc"), + "paymentchannel": MustParseCid("bafk2bzacebk5bxknqhlsrvgdnleflwpmkc25hfx4zrqxasszo3ktkkvp7w6oo"), + "reward": MustParseCid("bafk2bzacebdl4woa2et6x2cg2gnw3zpx3a6jhuw3xnkcy4vjhu2zsd52cpgbc"), + "storagemarket": MustParseCid("bafk2bzacectrnbmdzux4ktjezov2eghyf4b6khne5bbx57fbw4ubdrplpkesi"), + "storageminer": MustParseCid("bafk2bzacebzwofvflpycvpl2oikql3o4gcd2alhoa7vtz4crj34ioegzl6h7i"), + "storagepower": MustParseCid("bafk2bzaced7p4fzea2j4hs2cz52uxtxy2pie4avjs5hsdrjwxas2d247v645c"), + "system": MustParseCid("bafk2bzacea4nhoud6kwlrnayplpwfwlo5jlqqplu3gj5kp5e3i3pxzwzdmakq"), + "verifiedregistry": MustParseCid("bafk2bzacecuz22dwb56p4z67fyqsb4qfw3qk3lz6tq5kc3lsxuo7znlbjczqu"), + }, }, { Network: "devnet", Version: 8, @@ -146,6 +209,27 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet "system": MustParseCid("bafk2bzacebgafb6h2o2g5whrujc2uvsttrussyc5t56rvhrjqkqhzdu4jopwa"), "verifiedregistry": MustParseCid("bafk2bzacednorhcy446agy7ecpmfms2u4aoa3mj2eqomffuoerbik5yavrxyi"), }, +}, { + Network: "devnet", + Version: 10, + ManifestCid: MustParseCid("bafy2bzacecwysahkxh4jgpmby7lboxalqv2fbvoohi4tcf6unllzwlrgb6n3u"), + Actors: map[string]cid.Cid{ + "account": MustParseCid("bafk2bzacecui4vegcaloi3dt2rob6dytzr7iag257jfszwdtvqgcun6vi2ggi"), + "cron": MustParseCid("bafk2bzacedukjjklhrahhnbwqcbe3ppowu6cdd3ev2ncsynjg63ese36zg5es"), + "datacap": MustParseCid("bafk2bzaceaucxyfovggh3hn3iwfqm45z2wxovyasp47ji6vhwv4zlfmtcfg3s"), + "eam": MustParseCid("bafk2bzaceazgazurwhvwoj4evuxmw5sd2bje2dr4kvyklunlapvw7kyhpzn46"), + "embryo": MustParseCid("bafk2bzaceb5shyqwqsogg2izzfteoxcqji6pzqakuc3auvjo44uv5ndhaxt5i"), + "evm": MustParseCid("bafk2bzaceam256namf22qqvbj4owo6jhsz5ai2lv6bgp2cqe6mqpyklzl4v2c"), + "init": MustParseCid("bafk2bzacecwy6qxelpbblzgq5ehzqjfe2k47olme3a2kmegth6qsyvykxyfui"), + "multisig": MustParseCid("bafk2bzaceab6p4qg2jmqdylrgcam5u4md3ho7wiigxtnrj7h5qwplvuhe3qm2"), + "paymentchannel": MustParseCid("bafk2bzaceda4axurklqhlb3w3t2skgqj2xqi66cdufcdkgsl5v3f6qdvp7neg"), + "reward": MustParseCid("bafk2bzaceax2wjon7qzsfha3cm3w2cl6rplwxg4onhyvermyhmeu7gubzdcha"), + "storagemarket": MustParseCid("bafk2bzacechmh6ufrhsodqxt2kf5kys2e7mtzom73l6qqemrebsatxxzvfkfy"), + "storageminer": MustParseCid("bafk2bzacebvtukozkvkmcj74o3wvozvi5iese5ijmhjd7u73aqcp55oc3z2tq"), + "storagepower": MustParseCid("bafk2bzaceaun3ipavgb3axpt7zjkkfserw6rhnorpvoicqihdmsyxuhymv6mq"), + "system": MustParseCid("bafk2bzacecrpokwc27mww4zf3l7kaxe2m6sgbzuuvouzzpkk7uh5ax4ufrx2w"), + "verifiedregistry": MustParseCid("bafk2bzacecnbhvtkipjzczzwekkgmohikkeftconlvpdqkmuxrke24eb7trzq"), + }, }, { Network: "mainnet", Version: 8, @@ -181,6 +265,27 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet "system": MustParseCid("bafk2bzaceagvlo2jtahj7dloshrmwfulrd6e2izqev32qm46eumf754weec6c"), "verifiedregistry": MustParseCid("bafk2bzacecf3yodlyudzukumehbuabgqljyhjt5ifiv4vetcfohnvsxzynwga"), }, +}, { + Network: "mainnet", + Version: 10, + ManifestCid: MustParseCid("bafy2bzaceb2ssutz56smwc6vwigjgo2kfqirnwkwq7zthxscynvtzn7ebywt4"), + Actors: map[string]cid.Cid{ + "account": MustParseCid("bafk2bzacea34fwixc5x473laalyitolzttxxus5ulxi2ukylsubhrl2m32zhc"), + "cron": MustParseCid("bafk2bzacebxkofxwtkzmncfb77slj4hvwlhazb2x7li7gbdhfbh3gxdmud2eq"), + "datacap": MustParseCid("bafk2bzaceac4u53w2fwsez4fmk5to4u5f6tls2obsutsep24nswiclqme75uy"), + "eam": MustParseCid("bafk2bzaced25owr5v4k4ypzm5qxi7c3juobbudekogapqaqia23chcyo43ofu"), + "embryo": MustParseCid("bafk2bzaceb5shyqwqsogg2izzfteoxcqji6pzqakuc3auvjo44uv5ndhaxt5i"), + "evm": MustParseCid("bafk2bzacechckrenio2m67kvacfbzmpm2uosnrw5zmrzsj4b6cukwmhpjfg6c"), + "init": MustParseCid("bafk2bzaceblbm5moflcetob6wbl3tjbi2zhyangfrmp4jux7wyeixi7ptctu6"), + "multisig": MustParseCid("bafk2bzaceadileikmkovoi4ewl4jbyjgnntl7rqsqlxs2plj2ruv776qxp5hq"), + "paymentchannel": MustParseCid("bafk2bzaceasjtgnksm3infcphwhyg675hip3t65q3pzknatf6aqb3mi57pj2c"), + "reward": MustParseCid("bafk2bzacecozr3gal2ywayykdgrhjbttqvwktptyvlvph6dunqrlp2rnl5rbq"), + "storagemarket": MustParseCid("bafk2bzacedv5grgmgmoxjvvrszb4phdnhzvlsjv6g3ugirjhgghfuncc67zvu"), + "storageminer": MustParseCid("bafk2bzaceb7wvvvx6dduzodqanerefg5q6k2qvbrlzcbhal5yjhkzun64vtvk"), + "storagepower": MustParseCid("bafk2bzacecauoq7xxccmc3hrbbsktonlivg7pibysrnplelsvgdzpzpryv6mm"), + "system": MustParseCid("bafk2bzaceapfdn6eteiqvvhape3iyybobhcyg6lbmncmerhcpckcj444uk6qo"), + "verifiedregistry": MustParseCid("bafk2bzacec4v5cozakcgq5btelyjz6hkmcmftj35a2qvcjfcynb6hw4ifxbeq"), + }, }, { Network: "testing", Version: 8, @@ -216,6 +321,27 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet "system": MustParseCid("bafk2bzacedo4pu3iwx2gu72hinsstpiokhl5iicnb3rumzffsnhy7zhmnxhyy"), "verifiedregistry": MustParseCid("bafk2bzaceatmqip2o3ausbntvdhj7yemu6hb3b5yqv6hm42gylbbmz7geocpm"), }, +}, { + Network: "testing", + Version: 10, + ManifestCid: MustParseCid("bafy2bzaceaxppo7nkcn456lgend7oqb4pcxdtvk4rw7xqu4qfxsg76hpgjzdm"), + Actors: map[string]cid.Cid{ + "account": MustParseCid("bafk2bzacecasu6oljznrdqpljjomlstq3yf2c6jbofwn5eoivjkgnl65a52lq"), + "cron": MustParseCid("bafk2bzacec535ytbuh2ycyjwyhnnyjz2jolzfzuny6kdyg6a4h6jtjwqfwfdo"), + "datacap": MustParseCid("bafk2bzaceay7k6yf5ccms37l2pggjioffyklnzyz4b3sm6567k5dvetlpctfo"), + "eam": MustParseCid("bafk2bzaceb5c32bdqtnpteri5okrwyg6m57vvcjqf5hggvhgqxgarpdski7e6"), + "embryo": MustParseCid("bafk2bzaceb5shyqwqsogg2izzfteoxcqji6pzqakuc3auvjo44uv5ndhaxt5i"), + "evm": MustParseCid("bafk2bzacedq6wp33m7oif4hgro52g4h2gdaxoymaic5js4cyyb5emqjfevi5k"), + "init": MustParseCid("bafk2bzacedk5bo33m4bjhii6mc35wmth6sx36azjgc4qbus3q45rtsb4xwl26"), + "multisig": MustParseCid("bafk2bzaceal376rbj6h6g3wlrs2kiik57ie7rcdb4jldzhd5i2vhq6lgsek3i"), + "paymentchannel": MustParseCid("bafk2bzacec7nsh23sha54ete2jl4eupj2hz4rxzyp4wm4jfu466czhkg7vdwq"), + "reward": MustParseCid("bafk2bzacecc4kkj7shrexyjb4bamnjlficb2hfnoqnmobcflx2bmzl4b5vqay"), + "storagemarket": MustParseCid("bafk2bzaceat4aedqcvjb42nl2yotog462uy5brffvpnurrvxaghem4ppwdn3y"), + "storageminer": MustParseCid("bafk2bzaceaeefkoaj7qpae6hivizqau6me4xdbajl2eny5hnexfbzqyooe4kg"), + "storagepower": MustParseCid("bafk2bzacecgejk3gyjauoalkdbwaq5kfdx7nnlvkjh4yfa6g7a43332xc2ajm"), + "system": MustParseCid("bafk2bzacebtg7ijnioa4xmscxvu6kk4mrnehfrddqgj4nqmj6f32nmvcc2ray"), + "verifiedregistry": MustParseCid("bafk2bzacecvdxtzrbtrrgtgw6t3nxw3zsslzdz6dybefzti45qbrlvuwqqt3q"), + }, }, { Network: "testing-fake-proofs", Version: 8, @@ -251,4 +377,25 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet "system": MustParseCid("bafk2bzacedo4pu3iwx2gu72hinsstpiokhl5iicnb3rumzffsnhy7zhmnxhyy"), "verifiedregistry": MustParseCid("bafk2bzaceatmqip2o3ausbntvdhj7yemu6hb3b5yqv6hm42gylbbmz7geocpm"), }, +}, { + Network: "testing-fake-proofs", + Version: 10, + ManifestCid: MustParseCid("bafy2bzaceb2ablvyxqk2vjhwxq5f5ptat7xiv3euwshwruppxp6ui7b64tvbu"), + Actors: map[string]cid.Cid{ + "account": MustParseCid("bafk2bzacecasu6oljznrdqpljjomlstq3yf2c6jbofwn5eoivjkgnl65a52lq"), + "cron": MustParseCid("bafk2bzacec535ytbuh2ycyjwyhnnyjz2jolzfzuny6kdyg6a4h6jtjwqfwfdo"), + "datacap": MustParseCid("bafk2bzaceay7k6yf5ccms37l2pggjioffyklnzyz4b3sm6567k5dvetlpctfo"), + "eam": MustParseCid("bafk2bzaceb5c32bdqtnpteri5okrwyg6m57vvcjqf5hggvhgqxgarpdski7e6"), + "embryo": MustParseCid("bafk2bzaceb5shyqwqsogg2izzfteoxcqji6pzqakuc3auvjo44uv5ndhaxt5i"), + "evm": MustParseCid("bafk2bzacedq6wp33m7oif4hgro52g4h2gdaxoymaic5js4cyyb5emqjfevi5k"), + "init": MustParseCid("bafk2bzacedk5bo33m4bjhii6mc35wmth6sx36azjgc4qbus3q45rtsb4xwl26"), + "multisig": MustParseCid("bafk2bzaceal376rbj6h6g3wlrs2kiik57ie7rcdb4jldzhd5i2vhq6lgsek3i"), + "paymentchannel": MustParseCid("bafk2bzacec7nsh23sha54ete2jl4eupj2hz4rxzyp4wm4jfu466czhkg7vdwq"), + "reward": MustParseCid("bafk2bzacecc4kkj7shrexyjb4bamnjlficb2hfnoqnmobcflx2bmzl4b5vqay"), + "storagemarket": MustParseCid("bafk2bzaceat4aedqcvjb42nl2yotog462uy5brffvpnurrvxaghem4ppwdn3y"), + "storageminer": MustParseCid("bafk2bzacec4sgyamy6iobuxesdwkg3zwffkwxnur57tisfpotbbs6kammr4ds"), + "storagepower": MustParseCid("bafk2bzacecqxuizz2wxujshjeh7rsric3fkwpa5mucizzamevdpafqewdtm4y"), + "system": MustParseCid("bafk2bzacebtg7ijnioa4xmscxvu6kk4mrnehfrddqgj4nqmj6f32nmvcc2ray"), + "verifiedregistry": MustParseCid("bafk2bzacecvdxtzrbtrrgtgw6t3nxw3zsslzdz6dybefzti45qbrlvuwqqt3q"), + }, }} diff --git a/build/openrpc/full.json.gz b/build/openrpc/full.json.gz index 596553716..b03f845f9 100644 Binary files a/build/openrpc/full.json.gz and b/build/openrpc/full.json.gz differ diff --git a/build/openrpc/gateway.json.gz b/build/openrpc/gateway.json.gz index 75486d8cf..e1b3bd2db 100644 Binary files a/build/openrpc/gateway.json.gz and b/build/openrpc/gateway.json.gz differ diff --git a/build/openrpc/miner.json.gz b/build/openrpc/miner.json.gz index c75e86780..d69d9d519 100644 Binary files a/build/openrpc/miner.json.gz and b/build/openrpc/miner.json.gz differ diff --git a/build/openrpc/worker.json.gz b/build/openrpc/worker.json.gz index 72a40797a..271a18a0f 100644 Binary files a/build/openrpc/worker.json.gz and b/build/openrpc/worker.json.gz differ diff --git a/build/params_2k.go b/build/params_2k.go index 4c612d3ca..f822d701e 100644 --- a/build/params_2k.go +++ b/build/params_2k.go @@ -22,7 +22,7 @@ const GenesisFile = "" var NetworkBundle = "devnet" var BundleOverrides map[actorstypes.Version]string -const GenesisNetworkVersion = network.Version16 +const GenesisNetworkVersion = network.Version18 var UpgradeBreezeHeight = abi.ChainEpoch(-1) @@ -56,7 +56,7 @@ var UpgradeOhSnapHeight = abi.ChainEpoch(-18) var UpgradeSkyrHeight = abi.ChainEpoch(-19) -var UpgradeSharkHeight = abi.ChainEpoch(100) +var UpgradeSharkHeight = abi.ChainEpoch(-20) var DrandSchedule = map[abi.ChainEpoch]DrandEnum{ 0: DrandMainnet, diff --git a/build/params_shared_vals.go b/build/params_shared_vals.go index 645560d36..be6640d6f 100644 --- a/build/params_shared_vals.go +++ b/build/params_shared_vals.go @@ -33,7 +33,7 @@ const TestNetworkVersion = network.Version{{.latestNetworkVersion}} /* inline-gen start */ -const TestNetworkVersion = network.Version17 +const TestNetworkVersion = network.Version18 /* inline-gen end */ diff --git a/chain/actors/agen/main.go b/chain/actors/agen/main.go index fe47d7bfd..b9f3a22a4 100644 --- a/chain/actors/agen/main.go +++ b/chain/actors/agen/main.go @@ -28,6 +28,7 @@ var actors = map[string][]int{ "reward": lotusactors.Versions, "verifreg": lotusactors.Versions, "datacap": lotusactors.Versions[8:], + "evm": lotusactors.Versions[9:], } func main() { diff --git a/chain/actors/builtin/account/account.go b/chain/actors/builtin/account/account.go index 789f934d6..5a2d55961 100644 --- a/chain/actors/builtin/account/account.go +++ b/chain/actors/builtin/account/account.go @@ -6,7 +6,7 @@ import ( "github.com/filecoin-project/go-address" actorstypes "github.com/filecoin-project/go-state-types/actors" - builtin9 "github.com/filecoin-project/go-state-types/builtin" + builtin10 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/go-state-types/cbor" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" @@ -21,7 +21,7 @@ import ( "github.com/filecoin-project/lotus/chain/types" ) -var Methods = builtin9.MethodsAccount +var Methods = builtin10.MethodsAccount func Load(store adt.Store, act *types.Actor) (State, error) { if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { @@ -37,6 +37,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actorstypes.Version9: return load9(store, act.Head) + case actorstypes.Version10: + return load10(store, act.Head) + } } @@ -98,6 +101,9 @@ func MakeState(store adt.Store, av actorstypes.Version, addr address.Address) (S case actorstypes.Version9: return make9(store, addr) + case actorstypes.Version10: + return make10(store, addr) + } return nil, xerrors.Errorf("unknown actor version %d", av) } @@ -124,5 +130,6 @@ func AllCodes() []cid.Cid { (&state7{}).Code(), (&state8{}).Code(), (&state9{}).Code(), + (&state10{}).Code(), } } diff --git a/chain/actors/builtin/account/v10.go b/chain/actors/builtin/account/v10.go new file mode 100644 index 000000000..dbe7c609e --- /dev/null +++ b/chain/actors/builtin/account/v10.go @@ -0,0 +1,61 @@ +package account + +import ( + "fmt" + + "github.com/ipfs/go-cid" + + "github.com/filecoin-project/go-address" + actorstypes "github.com/filecoin-project/go-state-types/actors" + account10 "github.com/filecoin-project/go-state-types/builtin/v10/account" + + "github.com/filecoin-project/lotus/chain/actors" + "github.com/filecoin-project/lotus/chain/actors/adt" +) + +var _ State = (*state10)(nil) + +func load10(store adt.Store, root cid.Cid) (State, error) { + out := state10{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make10(store adt.Store, addr address.Address) (State, error) { + out := state10{store: store} + out.State = account10.State{Address: addr} + return &out, nil +} + +type state10 struct { + account10.State + store adt.Store +} + +func (s *state10) PubkeyAddress() (address.Address, error) { + return s.Address, nil +} + +func (s *state10) GetState() interface{} { + return &s.State +} + +func (s *state10) ActorKey() string { + return actors.AccountKey +} + +func (s *state10) ActorVersion() actorstypes.Version { + return actorstypes.Version10 +} + +func (s *state10) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/cron/cron.go b/chain/actors/builtin/cron/cron.go index afabb7d84..3f573789a 100644 --- a/chain/actors/builtin/cron/cron.go +++ b/chain/actors/builtin/cron/cron.go @@ -5,7 +5,7 @@ import ( "golang.org/x/xerrors" actorstypes "github.com/filecoin-project/go-state-types/actors" - builtin9 "github.com/filecoin-project/go-state-types/builtin" + builtin10 "github.com/filecoin-project/go-state-types/builtin" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" builtin3 "github.com/filecoin-project/specs-actors/v3/actors/builtin" @@ -33,6 +33,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actorstypes.Version9: return load9(store, act.Head) + case actorstypes.Version10: + return load10(store, act.Head) + } } @@ -94,13 +97,16 @@ func MakeState(store adt.Store, av actorstypes.Version) (State, error) { case actorstypes.Version9: return make9(store) + case actorstypes.Version10: + return make10(store) + } return nil, xerrors.Errorf("unknown actor version %d", av) } var ( - Address = builtin9.CronActorAddr - Methods = builtin9.MethodsCron + Address = builtin10.CronActorAddr + Methods = builtin10.MethodsCron ) type State interface { @@ -122,5 +128,6 @@ func AllCodes() []cid.Cid { (&state7{}).Code(), (&state8{}).Code(), (&state9{}).Code(), + (&state10{}).Code(), } } diff --git a/chain/actors/builtin/cron/v10.go b/chain/actors/builtin/cron/v10.go new file mode 100644 index 000000000..4e2e1c815 --- /dev/null +++ b/chain/actors/builtin/cron/v10.go @@ -0,0 +1,56 @@ +package cron + +import ( + "fmt" + + "github.com/ipfs/go-cid" + + actorstypes "github.com/filecoin-project/go-state-types/actors" + cron10 "github.com/filecoin-project/go-state-types/builtin/v10/cron" + + "github.com/filecoin-project/lotus/chain/actors" + "github.com/filecoin-project/lotus/chain/actors/adt" +) + +var _ State = (*state10)(nil) + +func load10(store adt.Store, root cid.Cid) (State, error) { + out := state10{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make10(store adt.Store) (State, error) { + out := state10{store: store} + out.State = *cron10.ConstructState(cron10.BuiltInEntries()) + return &out, nil +} + +type state10 struct { + cron10.State + store adt.Store +} + +func (s *state10) GetState() interface{} { + return &s.State +} + +func (s *state10) ActorKey() string { + return actors.CronKey +} + +func (s *state10) ActorVersion() actorstypes.Version { + return actorstypes.Version10 +} + +func (s *state10) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/datacap/actor.go.template b/chain/actors/builtin/datacap/actor.go.template index bd57f17a0..15272d7d1 100644 --- a/chain/actors/builtin/datacap/actor.go.template +++ b/chain/actors/builtin/datacap/actor.go.template @@ -43,9 +43,8 @@ func MakeState(store adt.Store, av actorstypes.Version, governor address.Address {{range .versions}} case actorstypes.Version{{.}}: return make{{.}}(store, governor, bitwidth) - - default: return nil, xerrors.Errorf("datacap actor only valid for actors v9 and above, got %d", av) {{end}} + default: return nil, xerrors.Errorf("datacap actor only valid for actors v9 and above, got %d", av) } } diff --git a/chain/actors/builtin/datacap/datacap.go b/chain/actors/builtin/datacap/datacap.go index f227181cf..977c020d3 100644 --- a/chain/actors/builtin/datacap/datacap.go +++ b/chain/actors/builtin/datacap/datacap.go @@ -7,7 +7,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" - builtin9 "github.com/filecoin-project/go-state-types/builtin" + builtin10 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/go-state-types/cbor" "github.com/filecoin-project/lotus/chain/actors" @@ -16,8 +16,8 @@ import ( ) var ( - Address = builtin9.DatacapActorAddr - Methods = builtin9.MethodsDatacap + Address = builtin10.DatacapActorAddr + Methods = builtin10.MethodsDatacap ) func Load(store adt.Store, act *types.Actor) (State, error) { @@ -31,6 +31,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actorstypes.Version9: return load9(store, act.Head) + case actorstypes.Version10: + return load10(store, act.Head) + } } @@ -43,9 +46,11 @@ func MakeState(store adt.Store, av actorstypes.Version, governor address.Address case actorstypes.Version9: return make9(store, governor, bitwidth) + case actorstypes.Version10: + return make10(store, governor, bitwidth) + default: return nil, xerrors.Errorf("datacap actor only valid for actors v9 and above, got %d", av) - } } @@ -65,5 +70,6 @@ type State interface { func AllCodes() []cid.Cid { return []cid.Cid{ (&state9{}).Code(), + (&state10{}).Code(), } } diff --git a/chain/actors/builtin/datacap/v10.go b/chain/actors/builtin/datacap/v10.go new file mode 100644 index 000000000..6f4c8593d --- /dev/null +++ b/chain/actors/builtin/datacap/v10.go @@ -0,0 +1,81 @@ +package datacap + +import ( + "fmt" + + "github.com/ipfs/go-cid" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + actorstypes "github.com/filecoin-project/go-state-types/actors" + datacap10 "github.com/filecoin-project/go-state-types/builtin/v10/datacap" + adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" + + "github.com/filecoin-project/lotus/chain/actors" + "github.com/filecoin-project/lotus/chain/actors/adt" +) + +var _ State = (*state10)(nil) + +func load10(store adt.Store, root cid.Cid) (State, error) { + out := state10{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make10(store adt.Store, governor address.Address, bitwidth uint64) (State, error) { + out := state10{store: store} + s, err := datacap10.ConstructState(store, governor, bitwidth) + if err != nil { + return nil, err + } + + out.State = *s + + return &out, nil +} + +type state10 struct { + datacap10.State + store adt.Store +} + +func (s *state10) Governor() (address.Address, error) { + return s.State.Governor, nil +} + +func (s *state10) GetState() interface{} { + return &s.State +} + +func (s *state10) ForEachClient(cb func(addr address.Address, dcap abi.StoragePower) error) error { + return forEachClient(s.store, actors.Version10, s.verifiedClients, cb) +} + +func (s *state10) verifiedClients() (adt.Map, error) { + return adt10.AsMap(s.store, s.Token.Balances, int(s.Token.HamtBitWidth)) +} + +func (s *state10) VerifiedClientDataCap(addr address.Address) (bool, abi.StoragePower, error) { + return getDataCap(s.store, actors.Version10, s.verifiedClients, addr) +} + +func (s *state10) ActorKey() string { + return actors.DatacapKey +} + +func (s *state10) ActorVersion() actorstypes.Version { + return actorstypes.Version10 +} + +func (s *state10) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/evm/actor.go.template b/chain/actors/builtin/evm/actor.go.template new file mode 100644 index 000000000..698029253 --- /dev/null +++ b/chain/actors/builtin/evm/actor.go.template @@ -0,0 +1,51 @@ +package evm + +import ( + "github.com/ipfs/go-cid" + "golang.org/x/xerrors" + + actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/cbor" + + "github.com/filecoin-project/lotus/chain/actors" + "github.com/filecoin-project/lotus/chain/actors/adt" + "github.com/filecoin-project/lotus/chain/types" + + builtin{{.latestVersion}} "github.com/filecoin-project/go-state-types/builtin" +) + +var Methods = builtin{{.latestVersion}}.MethodsEVM + +func Load(store adt.Store, act *types.Actor) (State, error) { + if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { + if name != actors.EvmKey { + return nil, xerrors.Errorf("actor code is not evm: %s", name) + } + + switch av { + {{range .versions}} + case actorstypes.Version{{.}}: + return load{{.}}(store, act.Head) + {{end}} + } + } + + return nil, xerrors.Errorf("unknown actor code %s", act.Code) +} + +func MakeState(store adt.Store, av actorstypes.Version, bytecode cid.Cid) (State, error) { + switch av { +{{range .versions}} + case actorstypes.Version{{.}}: + return make{{.}}(store, bytecode) +{{end}} + default: return nil, xerrors.Errorf("evm actor only valid for actors v10 and above, got %d", av) + } +} + +type State interface { + cbor.Marshaler + + Nonce() (uint64, error) + GetState() interface{} +} diff --git a/chain/actors/builtin/evm/evm.go b/chain/actors/builtin/evm/evm.go new file mode 100644 index 000000000..69bd90c42 --- /dev/null +++ b/chain/actors/builtin/evm/evm.go @@ -0,0 +1,51 @@ +package evm + +import ( + "github.com/ipfs/go-cid" + "golang.org/x/xerrors" + + actorstypes "github.com/filecoin-project/go-state-types/actors" + builtin10 "github.com/filecoin-project/go-state-types/builtin" + "github.com/filecoin-project/go-state-types/cbor" + + "github.com/filecoin-project/lotus/chain/actors" + "github.com/filecoin-project/lotus/chain/actors/adt" + "github.com/filecoin-project/lotus/chain/types" +) + +var Methods = builtin10.MethodsEVM + +func Load(store adt.Store, act *types.Actor) (State, error) { + if name, av, ok := actors.GetActorMetaByCode(act.Code); ok { + if name != actors.EvmKey { + return nil, xerrors.Errorf("actor code is not evm: %s", name) + } + + switch av { + + case actorstypes.Version10: + return load10(store, act.Head) + + } + } + + return nil, xerrors.Errorf("unknown actor code %s", act.Code) +} + +func MakeState(store adt.Store, av actorstypes.Version, bytecode cid.Cid) (State, error) { + switch av { + + case actorstypes.Version10: + return make10(store, bytecode) + + default: + return nil, xerrors.Errorf("evm actor only valid for actors v10 and above, got %d", av) + } +} + +type State interface { + cbor.Marshaler + + Nonce() (uint64, error) + GetState() interface{} +} diff --git a/chain/actors/builtin/evm/state.go.template b/chain/actors/builtin/evm/state.go.template new file mode 100644 index 000000000..acc78dc0f --- /dev/null +++ b/chain/actors/builtin/evm/state.go.template @@ -0,0 +1,45 @@ +package evm + +import ( + "github.com/ipfs/go-cid" + + "github.com/filecoin-project/lotus/chain/actors/adt" + + evm{{.v}} "github.com/filecoin-project/go-state-types/builtin{{.import}}evm" +) + +var _ State = (*state{{.v}})(nil) + +func load{{.v}}(store adt.Store, root cid.Cid) (State, error) { + out := state{{.v}}{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make{{.v}}(store adt.Store, bytecode cid.Cid) (State, error) { + out := state{{.v}}{store: store} + s, err := evm{{.v}}.ConstructState(store, bytecode) + if err != nil { + return nil, err + } + + out.State = *s + + return &out, nil +} + +type state{{.v}} struct { + evm{{.v}}.State + store adt.Store +} + +func (s *state{{.v}}) Nonce() (uint64, error) { + return s.State.Nonce, nil +} + +func (s *state{{.v}}) GetState() interface{} { + return &s.State +} \ No newline at end of file diff --git a/chain/actors/builtin/evm/v10.go b/chain/actors/builtin/evm/v10.go new file mode 100644 index 000000000..78a4a2383 --- /dev/null +++ b/chain/actors/builtin/evm/v10.go @@ -0,0 +1,45 @@ +package evm + +import ( + "github.com/ipfs/go-cid" + + evm10 "github.com/filecoin-project/go-state-types/builtin/v10/evm" + + "github.com/filecoin-project/lotus/chain/actors/adt" +) + +var _ State = (*state10)(nil) + +func load10(store adt.Store, root cid.Cid) (State, error) { + out := state10{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make10(store adt.Store, bytecode cid.Cid) (State, error) { + out := state10{store: store} + s, err := evm10.ConstructState(store, bytecode) + if err != nil { + return nil, err + } + + out.State = *s + + return &out, nil +} + +type state10 struct { + evm10.State + store adt.Store +} + +func (s *state10) Nonce() (uint64, error) { + return s.State.Nonce, nil +} + +func (s *state10) GetState() interface{} { + return &s.State +} diff --git a/chain/actors/builtin/init/init.go b/chain/actors/builtin/init/init.go index 7248bd870..a97d40297 100644 --- a/chain/actors/builtin/init/init.go +++ b/chain/actors/builtin/init/init.go @@ -7,7 +7,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" - builtin9 "github.com/filecoin-project/go-state-types/builtin" + builtin10 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/go-state-types/cbor" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" @@ -24,8 +24,8 @@ import ( ) var ( - Address = builtin9.InitActorAddr - Methods = builtin9.MethodsInit + Address = builtin10.InitActorAddr + Methods = builtin10.MethodsInit ) func Load(store adt.Store, act *types.Actor) (State, error) { @@ -42,6 +42,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actorstypes.Version9: return load9(store, act.Head) + case actorstypes.Version10: + return load10(store, act.Head) + } } @@ -103,6 +106,9 @@ func MakeState(store adt.Store, av actorstypes.Version, networkName string) (Sta case actorstypes.Version9: return make9(store, networkName) + case actorstypes.Version10: + return make10(store, networkName) + } return nil, xerrors.Errorf("unknown actor version %d", av) } @@ -152,5 +158,6 @@ func AllCodes() []cid.Cid { (&state7{}).Code(), (&state8{}).Code(), (&state9{}).Code(), + (&state10{}).Code(), } } diff --git a/chain/actors/builtin/init/v10.go b/chain/actors/builtin/init/v10.go new file mode 100644 index 000000000..761f9dacc --- /dev/null +++ b/chain/actors/builtin/init/v10.go @@ -0,0 +1,146 @@ +package init + +import ( + "crypto/sha256" + "fmt" + + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + "golang.org/x/xerrors" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + actorstypes "github.com/filecoin-project/go-state-types/actors" + builtin10 "github.com/filecoin-project/go-state-types/builtin" + init10 "github.com/filecoin-project/go-state-types/builtin/v10/init" + adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" + + "github.com/filecoin-project/lotus/chain/actors" + "github.com/filecoin-project/lotus/chain/actors/adt" + "github.com/filecoin-project/lotus/node/modules/dtypes" +) + +var _ State = (*state10)(nil) + +func load10(store adt.Store, root cid.Cid) (State, error) { + out := state10{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make10(store adt.Store, networkName string) (State, error) { + out := state10{store: store} + + s, err := init10.ConstructState(store, networkName) + if err != nil { + return nil, err + } + + out.State = *s + + return &out, nil +} + +type state10 struct { + init10.State + store adt.Store +} + +func (s *state10) ResolveAddress(address address.Address) (address.Address, bool, error) { + return s.State.ResolveAddress(s.store, address) +} + +func (s *state10) MapAddressToNewID(address address.Address) (address.Address, error) { + return s.State.MapAddressToNewID(s.store, address) +} + +func (s *state10) ForEachActor(cb func(id abi.ActorID, address address.Address) error) error { + addrs, err := adt10.AsMap(s.store, s.State.AddressMap, builtin10.DefaultHamtBitwidth) + if err != nil { + return err + } + var actorID cbg.CborInt + return addrs.ForEach(&actorID, func(key string) error { + addr, err := address.NewFromBytes([]byte(key)) + if err != nil { + return err + } + return cb(abi.ActorID(actorID), addr) + }) +} + +func (s *state10) NetworkName() (dtypes.NetworkName, error) { + return dtypes.NetworkName(s.State.NetworkName), nil +} + +func (s *state10) SetNetworkName(name string) error { + s.State.NetworkName = name + return nil +} + +func (s *state10) SetNextID(id abi.ActorID) error { + s.State.NextID = id + return nil +} + +func (s *state10) Remove(addrs ...address.Address) (err error) { + m, err := adt10.AsMap(s.store, s.State.AddressMap, builtin10.DefaultHamtBitwidth) + if err != nil { + return err + } + for _, addr := range addrs { + if err = m.Delete(abi.AddrKey(addr)); err != nil { + return xerrors.Errorf("failed to delete entry for address: %s; err: %w", addr, err) + } + } + amr, err := m.Root() + if err != nil { + return xerrors.Errorf("failed to get address map root: %w", err) + } + s.State.AddressMap = amr + return nil +} + +func (s *state10) SetAddressMap(mcid cid.Cid) error { + s.State.AddressMap = mcid + return nil +} + +func (s *state10) GetState() interface{} { + return &s.State +} + +func (s *state10) AddressMap() (adt.Map, error) { + return adt10.AsMap(s.store, s.State.AddressMap, builtin10.DefaultHamtBitwidth) +} + +func (s *state10) AddressMapBitWidth() int { + return builtin10.DefaultHamtBitwidth +} + +func (s *state10) AddressMapHashFunction() func(input []byte) []byte { + return func(input []byte) []byte { + res := sha256.Sum256(input) + return res[:] + } +} + +func (s *state10) ActorKey() string { + return actors.InitKey +} + +func (s *state10) ActorVersion() actorstypes.Version { + return actorstypes.Version10 +} + +func (s *state10) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/market/market.go b/chain/actors/builtin/market/market.go index 3f15d6355..e96484d64 100644 --- a/chain/actors/builtin/market/market.go +++ b/chain/actors/builtin/market/market.go @@ -48,6 +48,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actorstypes.Version9: return load9(store, act.Head) + case actorstypes.Version10: + return load10(store, act.Head) + } } @@ -109,6 +112,9 @@ func MakeState(store adt.Store, av actorstypes.Version) (State, error) { case actorstypes.Version9: return make9(store) + case actorstypes.Version10: + return make10(store) + } return nil, xerrors.Errorf("unknown actor version %d", av) } @@ -198,6 +204,9 @@ func DecodePublishStorageDealsReturn(b []byte, nv network.Version) (PublishStora case actorstypes.Version9: return decodePublishStorageDealsReturn9(b) + case actorstypes.Version10: + return decodePublishStorageDealsReturn10(b) + } return nil, xerrors.Errorf("unknown actor version %d", av) } @@ -282,5 +291,6 @@ func AllCodes() []cid.Cid { (&state7{}).Code(), (&state8{}).Code(), (&state9{}).Code(), + (&state10{}).Code(), } } diff --git a/chain/actors/builtin/market/state.go.template b/chain/actors/builtin/market/state.go.template index bbce812f8..ef5dff0a5 100644 --- a/chain/actors/builtin/market/state.go.template +++ b/chain/actors/builtin/market/state.go.template @@ -208,16 +208,17 @@ func (s *dealStates{{.v}}) array() adt.Array { } func fromV{{.v}}DealState(v{{.v}} market{{.v}}.DealState) DealState { - {{if (le .v 8)}} - return DealState{ + ret := DealState{ SectorStartEpoch: v{{.v}}.SectorStartEpoch, LastUpdatedEpoch: v{{.v}}.LastUpdatedEpoch, SlashEpoch: v{{.v}}.SlashEpoch, VerifiedClaim: 0, } - {{else}} - return (DealState)(v{{.v}}) + {{if (ge .v 9)}} + ret.VerifiedClaim = verifregtypes.AllocationId(v{{.v}}.VerifiedClaim) {{end}} + + return ret } type dealProposals{{.v}} struct { @@ -373,7 +374,7 @@ func (s *state{{.v}}) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifreg {{if (le .v 8)}} return verifregtypes.NoAllocationID, xerrors.Errorf("unsupported before actors v9") {{else}} - allocations, err := adt9.AsMap(s.store, s.PendingDealAllocationIds, builtin.DefaultHamtBitwidth) + allocations, err := adt{{.v}}.AsMap(s.store, s.PendingDealAllocationIds, builtin.DefaultHamtBitwidth) if err != nil { return verifregtypes.NoAllocationID, xerrors.Errorf("failed to load allocation id for %d: %w", dealId, err) } diff --git a/chain/actors/builtin/market/v0.go b/chain/actors/builtin/market/v0.go index fe50dc04e..4af5fe9b0 100644 --- a/chain/actors/builtin/market/v0.go +++ b/chain/actors/builtin/market/v0.go @@ -187,14 +187,14 @@ func (s *dealStates0) array() adt.Array { } func fromV0DealState(v0 market0.DealState) DealState { - - return DealState{ + ret := DealState{ SectorStartEpoch: v0.SectorStartEpoch, LastUpdatedEpoch: v0.LastUpdatedEpoch, SlashEpoch: v0.SlashEpoch, VerifiedClaim: 0, } + return ret } type dealProposals0 struct { diff --git a/chain/actors/builtin/market/v10.go b/chain/actors/builtin/market/v10.go new file mode 100644 index 000000000..21acf15ac --- /dev/null +++ b/chain/actors/builtin/market/v10.go @@ -0,0 +1,376 @@ +package market + +import ( + "bytes" + "fmt" + + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + "golang.org/x/xerrors" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-bitfield" + rlepluslazy "github.com/filecoin-project/go-bitfield/rle" + "github.com/filecoin-project/go-state-types/abi" + actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/builtin" + market10 "github.com/filecoin-project/go-state-types/builtin/v10/market" + adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" + markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market" + verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + + "github.com/filecoin-project/lotus/chain/actors" + "github.com/filecoin-project/lotus/chain/actors/adt" + "github.com/filecoin-project/lotus/chain/types" +) + +var _ State = (*state10)(nil) + +func load10(store adt.Store, root cid.Cid) (State, error) { + out := state10{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make10(store adt.Store) (State, error) { + out := state10{store: store} + + s, err := market10.ConstructState(store) + if err != nil { + return nil, err + } + + out.State = *s + + return &out, nil +} + +type state10 struct { + market10.State + store adt.Store +} + +func (s *state10) TotalLocked() (abi.TokenAmount, error) { + fml := types.BigAdd(s.TotalClientLockedCollateral, s.TotalProviderLockedCollateral) + fml = types.BigAdd(fml, s.TotalClientStorageFee) + return fml, nil +} + +func (s *state10) BalancesChanged(otherState State) (bool, error) { + otherState10, ok := otherState.(*state10) + if !ok { + // there's no way to compare different versions of the state, so let's + // just say that means the state of balances has changed + return true, nil + } + return !s.State.EscrowTable.Equals(otherState10.State.EscrowTable) || !s.State.LockedTable.Equals(otherState10.State.LockedTable), nil +} + +func (s *state10) StatesChanged(otherState State) (bool, error) { + otherState10, ok := otherState.(*state10) + if !ok { + // there's no way to compare different versions of the state, so let's + // just say that means the state of balances has changed + return true, nil + } + return !s.State.States.Equals(otherState10.State.States), nil +} + +func (s *state10) States() (DealStates, error) { + stateArray, err := adt10.AsArray(s.store, s.State.States, market10.StatesAmtBitwidth) + if err != nil { + return nil, err + } + return &dealStates10{stateArray}, nil +} + +func (s *state10) ProposalsChanged(otherState State) (bool, error) { + otherState10, ok := otherState.(*state10) + if !ok { + // there's no way to compare different versions of the state, so let's + // just say that means the state of balances has changed + return true, nil + } + return !s.State.Proposals.Equals(otherState10.State.Proposals), nil +} + +func (s *state10) Proposals() (DealProposals, error) { + proposalArray, err := adt10.AsArray(s.store, s.State.Proposals, market10.ProposalsAmtBitwidth) + if err != nil { + return nil, err + } + return &dealProposals10{proposalArray}, nil +} + +func (s *state10) EscrowTable() (BalanceTable, error) { + bt, err := adt10.AsBalanceTable(s.store, s.State.EscrowTable) + if err != nil { + return nil, err + } + return &balanceTable10{bt}, nil +} + +func (s *state10) LockedTable() (BalanceTable, error) { + bt, err := adt10.AsBalanceTable(s.store, s.State.LockedTable) + if err != nil { + return nil, err + } + return &balanceTable10{bt}, nil +} + +func (s *state10) VerifyDealsForActivation( + minerAddr address.Address, deals []abi.DealID, currEpoch, sectorExpiry abi.ChainEpoch, +) (weight, verifiedWeight abi.DealWeight, err error) { + w, vw, _, err := market10.ValidateDealsForActivation(&s.State, s.store, deals, minerAddr, sectorExpiry, currEpoch) + return w, vw, err +} + +func (s *state10) NextID() (abi.DealID, error) { + return s.State.NextID, nil +} + +type balanceTable10 struct { + *adt10.BalanceTable +} + +func (bt *balanceTable10) ForEach(cb func(address.Address, abi.TokenAmount) error) error { + asMap := (*adt10.Map)(bt.BalanceTable) + var ta abi.TokenAmount + return asMap.ForEach(&ta, func(key string) error { + a, err := address.NewFromBytes([]byte(key)) + if err != nil { + return err + } + return cb(a, ta) + }) +} + +type dealStates10 struct { + adt.Array +} + +func (s *dealStates10) Get(dealID abi.DealID) (*DealState, bool, error) { + var deal10 market10.DealState + found, err := s.Array.Get(uint64(dealID), &deal10) + if err != nil { + return nil, false, err + } + if !found { + return nil, false, nil + } + deal := fromV10DealState(deal10) + return &deal, true, nil +} + +func (s *dealStates10) ForEach(cb func(dealID abi.DealID, ds DealState) error) error { + var ds10 market10.DealState + return s.Array.ForEach(&ds10, func(idx int64) error { + return cb(abi.DealID(idx), fromV10DealState(ds10)) + }) +} + +func (s *dealStates10) decode(val *cbg.Deferred) (*DealState, error) { + var ds10 market10.DealState + if err := ds10.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil { + return nil, err + } + ds := fromV10DealState(ds10) + return &ds, nil +} + +func (s *dealStates10) array() adt.Array { + return s.Array +} + +func fromV10DealState(v10 market10.DealState) DealState { + ret := DealState{ + SectorStartEpoch: v10.SectorStartEpoch, + LastUpdatedEpoch: v10.LastUpdatedEpoch, + SlashEpoch: v10.SlashEpoch, + VerifiedClaim: 0, + } + + ret.VerifiedClaim = verifregtypes.AllocationId(v10.VerifiedClaim) + + return ret +} + +type dealProposals10 struct { + adt.Array +} + +func (s *dealProposals10) Get(dealID abi.DealID) (*DealProposal, bool, error) { + var proposal10 market10.DealProposal + found, err := s.Array.Get(uint64(dealID), &proposal10) + if err != nil { + return nil, false, err + } + if !found { + return nil, false, nil + } + + proposal, err := fromV10DealProposal(proposal10) + if err != nil { + return nil, true, xerrors.Errorf("decoding proposal: %w", err) + } + + return &proposal, true, nil +} + +func (s *dealProposals10) ForEach(cb func(dealID abi.DealID, dp DealProposal) error) error { + var dp10 market10.DealProposal + return s.Array.ForEach(&dp10, func(idx int64) error { + dp, err := fromV10DealProposal(dp10) + if err != nil { + return xerrors.Errorf("decoding proposal: %w", err) + } + + return cb(abi.DealID(idx), dp) + }) +} + +func (s *dealProposals10) decode(val *cbg.Deferred) (*DealProposal, error) { + var dp10 market10.DealProposal + if err := dp10.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil { + return nil, err + } + + dp, err := fromV10DealProposal(dp10) + if err != nil { + return nil, err + } + + return &dp, nil +} + +func (s *dealProposals10) array() adt.Array { + return s.Array +} + +func fromV10DealProposal(v10 market10.DealProposal) (DealProposal, error) { + + label, err := fromV10Label(v10.Label) + + if err != nil { + return DealProposal{}, xerrors.Errorf("error setting deal label: %w", err) + } + + return DealProposal{ + PieceCID: v10.PieceCID, + PieceSize: v10.PieceSize, + VerifiedDeal: v10.VerifiedDeal, + Client: v10.Client, + Provider: v10.Provider, + + Label: label, + + StartEpoch: v10.StartEpoch, + EndEpoch: v10.EndEpoch, + StoragePricePerEpoch: v10.StoragePricePerEpoch, + + ProviderCollateral: v10.ProviderCollateral, + ClientCollateral: v10.ClientCollateral, + }, nil +} + +func fromV10Label(v10 market10.DealLabel) (DealLabel, error) { + if v10.IsString() { + str, err := v10.ToString() + if err != nil { + return markettypes.EmptyDealLabel, xerrors.Errorf("failed to convert string label to string: %w", err) + } + return markettypes.NewLabelFromString(str) + } + + bs, err := v10.ToBytes() + if err != nil { + return markettypes.EmptyDealLabel, xerrors.Errorf("failed to convert bytes label to bytes: %w", err) + } + return markettypes.NewLabelFromBytes(bs) +} + +func (s *state10) GetState() interface{} { + return &s.State +} + +var _ PublishStorageDealsReturn = (*publishStorageDealsReturn10)(nil) + +func decodePublishStorageDealsReturn10(b []byte) (PublishStorageDealsReturn, error) { + var retval market10.PublishStorageDealsReturn + if err := retval.UnmarshalCBOR(bytes.NewReader(b)); err != nil { + return nil, xerrors.Errorf("failed to unmarshal PublishStorageDealsReturn: %w", err) + } + + return &publishStorageDealsReturn10{retval}, nil +} + +type publishStorageDealsReturn10 struct { + market10.PublishStorageDealsReturn +} + +func (r *publishStorageDealsReturn10) IsDealValid(index uint64) (bool, int, error) { + + set, err := r.ValidDeals.IsSet(index) + if err != nil || !set { + return false, -1, err + } + maskBf, err := bitfield.NewFromIter(&rlepluslazy.RunSliceIterator{ + Runs: []rlepluslazy.Run{rlepluslazy.Run{Val: true, Len: index}}}) + if err != nil { + return false, -1, err + } + before, err := bitfield.IntersectBitField(maskBf, r.ValidDeals) + if err != nil { + return false, -1, err + } + outIdx, err := before.Count() + if err != nil { + return false, -1, err + } + return set, int(outIdx), nil + +} + +func (r *publishStorageDealsReturn10) DealIDs() ([]abi.DealID, error) { + return r.IDs, nil +} + +func (s *state10) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes.AllocationId, error) { + + allocations, err := adt10.AsMap(s.store, s.PendingDealAllocationIds, builtin.DefaultHamtBitwidth) + if err != nil { + return verifregtypes.NoAllocationID, xerrors.Errorf("failed to load allocation id for %d: %w", dealId, err) + } + + var allocationId cbg.CborInt + found, err := allocations.Get(abi.UIntKey(uint64(dealId)), &allocationId) + if err != nil { + return verifregtypes.NoAllocationID, xerrors.Errorf("failed to load allocation id for %d: %w", dealId, err) + } + if !found { + return verifregtypes.NoAllocationID, nil + } + + return verifregtypes.AllocationId(allocationId), nil + +} + +func (s *state10) ActorKey() string { + return actors.MarketKey +} + +func (s *state10) ActorVersion() actorstypes.Version { + return actorstypes.Version10 +} + +func (s *state10) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/market/v2.go b/chain/actors/builtin/market/v2.go index a10895dc7..45a357f33 100644 --- a/chain/actors/builtin/market/v2.go +++ b/chain/actors/builtin/market/v2.go @@ -187,14 +187,14 @@ func (s *dealStates2) array() adt.Array { } func fromV2DealState(v2 market2.DealState) DealState { - - return DealState{ + ret := DealState{ SectorStartEpoch: v2.SectorStartEpoch, LastUpdatedEpoch: v2.LastUpdatedEpoch, SlashEpoch: v2.SlashEpoch, VerifiedClaim: 0, } + return ret } type dealProposals2 struct { diff --git a/chain/actors/builtin/market/v3.go b/chain/actors/builtin/market/v3.go index c207ebab1..ec745f5a0 100644 --- a/chain/actors/builtin/market/v3.go +++ b/chain/actors/builtin/market/v3.go @@ -182,14 +182,14 @@ func (s *dealStates3) array() adt.Array { } func fromV3DealState(v3 market3.DealState) DealState { - - return DealState{ + ret := DealState{ SectorStartEpoch: v3.SectorStartEpoch, LastUpdatedEpoch: v3.LastUpdatedEpoch, SlashEpoch: v3.SlashEpoch, VerifiedClaim: 0, } + return ret } type dealProposals3 struct { diff --git a/chain/actors/builtin/market/v4.go b/chain/actors/builtin/market/v4.go index e90f67720..03e728c15 100644 --- a/chain/actors/builtin/market/v4.go +++ b/chain/actors/builtin/market/v4.go @@ -182,14 +182,14 @@ func (s *dealStates4) array() adt.Array { } func fromV4DealState(v4 market4.DealState) DealState { - - return DealState{ + ret := DealState{ SectorStartEpoch: v4.SectorStartEpoch, LastUpdatedEpoch: v4.LastUpdatedEpoch, SlashEpoch: v4.SlashEpoch, VerifiedClaim: 0, } + return ret } type dealProposals4 struct { diff --git a/chain/actors/builtin/market/v5.go b/chain/actors/builtin/market/v5.go index 0015389b0..98d498258 100644 --- a/chain/actors/builtin/market/v5.go +++ b/chain/actors/builtin/market/v5.go @@ -182,14 +182,14 @@ func (s *dealStates5) array() adt.Array { } func fromV5DealState(v5 market5.DealState) DealState { - - return DealState{ + ret := DealState{ SectorStartEpoch: v5.SectorStartEpoch, LastUpdatedEpoch: v5.LastUpdatedEpoch, SlashEpoch: v5.SlashEpoch, VerifiedClaim: 0, } + return ret } type dealProposals5 struct { diff --git a/chain/actors/builtin/market/v6.go b/chain/actors/builtin/market/v6.go index 0856bed48..5966f2f8b 100644 --- a/chain/actors/builtin/market/v6.go +++ b/chain/actors/builtin/market/v6.go @@ -184,14 +184,14 @@ func (s *dealStates6) array() adt.Array { } func fromV6DealState(v6 market6.DealState) DealState { - - return DealState{ + ret := DealState{ SectorStartEpoch: v6.SectorStartEpoch, LastUpdatedEpoch: v6.LastUpdatedEpoch, SlashEpoch: v6.SlashEpoch, VerifiedClaim: 0, } + return ret } type dealProposals6 struct { diff --git a/chain/actors/builtin/market/v7.go b/chain/actors/builtin/market/v7.go index 3df6cef31..df910cd4a 100644 --- a/chain/actors/builtin/market/v7.go +++ b/chain/actors/builtin/market/v7.go @@ -184,14 +184,14 @@ func (s *dealStates7) array() adt.Array { } func fromV7DealState(v7 market7.DealState) DealState { - - return DealState{ + ret := DealState{ SectorStartEpoch: v7.SectorStartEpoch, LastUpdatedEpoch: v7.LastUpdatedEpoch, SlashEpoch: v7.SlashEpoch, VerifiedClaim: 0, } + return ret } type dealProposals7 struct { diff --git a/chain/actors/builtin/market/v8.go b/chain/actors/builtin/market/v8.go index c73eed137..1c0bfd3c5 100644 --- a/chain/actors/builtin/market/v8.go +++ b/chain/actors/builtin/market/v8.go @@ -185,14 +185,14 @@ func (s *dealStates8) array() adt.Array { } func fromV8DealState(v8 market8.DealState) DealState { - - return DealState{ + ret := DealState{ SectorStartEpoch: v8.SectorStartEpoch, LastUpdatedEpoch: v8.LastUpdatedEpoch, SlashEpoch: v8.SlashEpoch, VerifiedClaim: 0, } + return ret } type dealProposals8 struct { diff --git a/chain/actors/builtin/market/v9.go b/chain/actors/builtin/market/v9.go index 230ea5a01..9335a235a 100644 --- a/chain/actors/builtin/market/v9.go +++ b/chain/actors/builtin/market/v9.go @@ -186,9 +186,16 @@ func (s *dealStates9) array() adt.Array { } func fromV9DealState(v9 market9.DealState) DealState { + ret := DealState{ + SectorStartEpoch: v9.SectorStartEpoch, + LastUpdatedEpoch: v9.LastUpdatedEpoch, + SlashEpoch: v9.SlashEpoch, + VerifiedClaim: 0, + } - return (DealState)(v9) + ret.VerifiedClaim = verifregtypes.AllocationId(v9.VerifiedClaim) + return ret } type dealProposals9 struct { diff --git a/chain/actors/builtin/miner/actor.go.template b/chain/actors/builtin/miner/actor.go.template index c23cbec7e..74923a453 100644 --- a/chain/actors/builtin/miner/actor.go.template +++ b/chain/actors/builtin/miner/actor.go.template @@ -17,7 +17,7 @@ import ( "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/types" - miner{{.latestVersion}} "github.com/filecoin-project/go-state-types/builtin{{import .latestVersion}}miner" + minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" {{range .versions}} {{if (le . 7)}} @@ -82,8 +82,8 @@ type State interface { GetSector(abi.SectorNumber) (*SectorOnChainInfo, error) FindSector(abi.SectorNumber) (*SectorLocation, error) GetSectorExpiration(abi.SectorNumber) (*SectorExpiration, error) - GetPrecommittedSector(abi.SectorNumber) (*miner{{.latestVersion}}.SectorPreCommitOnChainInfo, error) - ForEachPrecommittedSector(func(miner{{.latestVersion}}.SectorPreCommitOnChainInfo) error) error + GetPrecommittedSector(abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) + ForEachPrecommittedSector(func(SectorPreCommitOnChainInfo) error) error LoadSectors(sectorNos *bitfield.BitField) ([]*SectorOnChainInfo, error) NumLiveSectors() (uint64, error) IsAllocated(abi.SectorNumber) (bool, error) @@ -112,7 +112,7 @@ type State interface { sectors() (adt.Array, error) decodeSectorOnChainInfo(*cbg.Deferred) (SectorOnChainInfo, error) precommits() (adt.Map, error) - decodeSectorPreCommitOnChainInfo(*cbg.Deferred) (miner{{.latestVersion}}.SectorPreCommitOnChainInfo, error) + decodeSectorPreCommitOnChainInfo(*cbg.Deferred) (SectorPreCommitOnChainInfo, error) GetState() interface{} } @@ -150,7 +150,7 @@ type Partition interface { UnprovenSectors() (bitfield.BitField, error) } -type SectorOnChainInfo = miner{{.latestVersion}}.SectorOnChainInfo +type SectorOnChainInfo = minertypes.SectorOnChainInfo func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.RegisteredPoStProof) (abi.RegisteredSealProof, error) { // We added support for the new proofs in network version 7, and removed support for the old @@ -205,9 +205,12 @@ func WinningPoStProofTypeFromWindowPoStProofType(nver network.Version, proof abi } } -type MinerInfo = miner{{.latestVersion}}.MinerInfo -type WorkerKeyChange = miner{{.latestVersion}}.WorkerKeyChange -type SectorPreCommitOnChainInfo = miner{{.latestVersion}}.SectorPreCommitOnChainInfo +type MinerInfo = minertypes.MinerInfo +type BeneficiaryTerm = minertypes.BeneficiaryTerm +type PendingBeneficiaryChange = minertypes.PendingBeneficiaryChange +type WorkerKeyChange = minertypes.WorkerKeyChange +type SectorPreCommitOnChainInfo = minertypes.SectorPreCommitOnChainInfo +type SectorPreCommitInfo = minertypes.SectorPreCommitInfo type WindowPostVerifyInfo = proof.WindowPoStVerifyInfo type SectorExpiration struct { @@ -235,8 +238,8 @@ type SectorExtensions struct { } type PreCommitChanges struct { - Added []miner{{.latestVersion}}.SectorPreCommitOnChainInfo - Removed []miner{{.latestVersion}}.SectorPreCommitOnChainInfo + Added []SectorPreCommitOnChainInfo + Removed []SectorPreCommitOnChainInfo } type LockedFunds struct { diff --git a/chain/actors/builtin/miner/miner.go b/chain/actors/builtin/miner/miner.go index 65bf97e37..8d1dc89e9 100644 --- a/chain/actors/builtin/miner/miner.go +++ b/chain/actors/builtin/miner/miner.go @@ -9,7 +9,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" - miner9 "github.com/filecoin-project/go-state-types/builtin/v9/miner" + minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/go-state-types/cbor" "github.com/filecoin-project/go-state-types/dline" "github.com/filecoin-project/go-state-types/network" @@ -41,6 +41,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actorstypes.Version9: return load9(store, act.Head) + case actorstypes.Version10: + return load10(store, act.Head) + } } @@ -102,6 +105,9 @@ func MakeState(store adt.Store, av actors.Version) (State, error) { case actors.Version9: return make9(store) + case actors.Version10: + return make10(store) + } return nil, xerrors.Errorf("unknown actor version %d", av) } @@ -124,8 +130,8 @@ type State interface { GetSector(abi.SectorNumber) (*SectorOnChainInfo, error) FindSector(abi.SectorNumber) (*SectorLocation, error) GetSectorExpiration(abi.SectorNumber) (*SectorExpiration, error) - GetPrecommittedSector(abi.SectorNumber) (*miner9.SectorPreCommitOnChainInfo, error) - ForEachPrecommittedSector(func(miner9.SectorPreCommitOnChainInfo) error) error + GetPrecommittedSector(abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) + ForEachPrecommittedSector(func(SectorPreCommitOnChainInfo) error) error LoadSectors(sectorNos *bitfield.BitField) ([]*SectorOnChainInfo, error) NumLiveSectors() (uint64, error) IsAllocated(abi.SectorNumber) (bool, error) @@ -154,7 +160,7 @@ type State interface { sectors() (adt.Array, error) decodeSectorOnChainInfo(*cbg.Deferred) (SectorOnChainInfo, error) precommits() (adt.Map, error) - decodeSectorPreCommitOnChainInfo(*cbg.Deferred) (miner9.SectorPreCommitOnChainInfo, error) + decodeSectorPreCommitOnChainInfo(*cbg.Deferred) (SectorPreCommitOnChainInfo, error) GetState() interface{} } @@ -192,7 +198,7 @@ type Partition interface { UnprovenSectors() (bitfield.BitField, error) } -type SectorOnChainInfo = miner9.SectorOnChainInfo +type SectorOnChainInfo = minertypes.SectorOnChainInfo func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.RegisteredPoStProof) (abi.RegisteredSealProof, error) { // We added support for the new proofs in network version 7, and removed support for the old @@ -247,9 +253,12 @@ func WinningPoStProofTypeFromWindowPoStProofType(nver network.Version, proof abi } } -type MinerInfo = miner9.MinerInfo -type WorkerKeyChange = miner9.WorkerKeyChange -type SectorPreCommitOnChainInfo = miner9.SectorPreCommitOnChainInfo +type MinerInfo = minertypes.MinerInfo +type BeneficiaryTerm = minertypes.BeneficiaryTerm +type PendingBeneficiaryChange = minertypes.PendingBeneficiaryChange +type WorkerKeyChange = minertypes.WorkerKeyChange +type SectorPreCommitOnChainInfo = minertypes.SectorPreCommitOnChainInfo +type SectorPreCommitInfo = minertypes.SectorPreCommitInfo type WindowPostVerifyInfo = proof.WindowPoStVerifyInfo type SectorExpiration struct { @@ -277,8 +286,8 @@ type SectorExtensions struct { } type PreCommitChanges struct { - Added []miner9.SectorPreCommitOnChainInfo - Removed []miner9.SectorPreCommitOnChainInfo + Added []SectorPreCommitOnChainInfo + Removed []SectorPreCommitOnChainInfo } type LockedFunds struct { @@ -302,5 +311,6 @@ func AllCodes() []cid.Cid { (&state7{}).Code(), (&state8{}).Code(), (&state9{}).Code(), + (&state10{}).Code(), } } diff --git a/chain/actors/builtin/miner/state.go.template b/chain/actors/builtin/miner/state.go.template index 8fae02565..e6994daa3 100644 --- a/chain/actors/builtin/miner/state.go.template +++ b/chain/actors/builtin/miner/state.go.template @@ -18,7 +18,6 @@ import ( "github.com/filecoin-project/lotus/chain/actors/adt" "github.com/filecoin-project/lotus/chain/actors" actorstypes "github.com/filecoin-project/go-state-types/actors" - minertypes "github.com/filecoin-project/go-state-types/builtin/v{{.latestVersion}}/miner" {{if (le .v 7)}} {{if (ge .v 3)}} @@ -218,7 +217,7 @@ func (s *state{{.v}}) GetSectorExpiration(num abi.SectorNumber) (*SectorExpirati return &out, nil } -func (s *state{{.v}}) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state{{.v}}) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { info, ok, err := s.State.GetPrecommittedSector(s.store, num) if !ok || err != nil { return nil, err @@ -229,7 +228,7 @@ func (s *state{{.v}}) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.S return &ret, nil } -func (s *state{{.v}}) ForEachPrecommittedSector(cb func(minertypes.SectorPreCommitOnChainInfo) error) error { +func (s *state{{.v}}) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { {{if (ge .v 3) -}} precommitted, err := adt{{.v}}.AsMap(s.store, s.State.PreCommittedSectors, builtin{{.v}}.DefaultHamtBitwidth) {{- else -}} @@ -417,9 +416,10 @@ func (s *state{{.v}}) Info() (MinerInfo, error) { WindowPoStPartitionSectors: info.WindowPoStPartitionSectors, ConsensusFaultElapsed: {{if (ge .v 2)}}info.ConsensusFaultElapsed{{else}}-1{{end}}, {{if (ge .v 9)}} - Beneficiary: info.Beneficiary, - BeneficiaryTerm: info.BeneficiaryTerm, - PendingBeneficiaryTerm: info.PendingBeneficiaryTerm,{{end}} + Beneficiary: info.Beneficiary, + BeneficiaryTerm: BeneficiaryTerm(info.BeneficiaryTerm), + PendingBeneficiaryTerm: (*PendingBeneficiaryChange)(info.PendingBeneficiaryTerm), + {{end}} } return mi, nil @@ -451,11 +451,11 @@ func (s *state{{.v}}) precommits() (adt.Map, error) { return adt{{.v}}.AsMap(s.store, s.PreCommittedSectors{{if (ge .v 3)}}, builtin{{.v}}.DefaultHamtBitwidth{{end}}) } -func (s *state{{.v}}) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state{{.v}}) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { var sp miner{{.v}}.SectorPreCommitOnChainInfo err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) if err != nil { - return minertypes.SectorPreCommitOnChainInfo{}, err + return SectorPreCommitOnChainInfo{}, err } return fromV{{.v}}SectorPreCommitOnChainInfo(sp), nil @@ -586,9 +586,9 @@ func fromV{{.v}}SectorOnChainInfo(v{{.v}} miner{{.v}}.SectorOnChainInfo) SectorO return info } -func fromV{{.v}}SectorPreCommitOnChainInfo(v{{.v}} miner{{.v}}.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { - {{if (le .v 8)}}return minertypes.SectorPreCommitOnChainInfo{ - Info: minertypes.SectorPreCommitInfo{ +func fromV{{.v}}SectorPreCommitOnChainInfo(v{{.v}} miner{{.v}}.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ SealProof: v{{.v}}.Info.SealProof, SectorNumber: v{{.v}}.Info.SectorNumber, SealedCID: v{{.v}}.Info.SealedCID, @@ -599,7 +599,13 @@ func fromV{{.v}}SectorPreCommitOnChainInfo(v{{.v}} miner{{.v}}.SectorPreCommitOn }, PreCommitDeposit: v{{.v}}.PreCommitDeposit, PreCommitEpoch: v{{.v}}.PreCommitEpoch, - }{{else}}return v{{.v}}{{end}} + } + + {{if (ge .v 9)}} + ret.Info.UnsealedCid = v{{.v}}.Info.UnsealedCid + {{end}} + + return ret } func (s *state{{.v}}) GetState() interface{} { diff --git a/chain/actors/builtin/miner/v0.go b/chain/actors/builtin/miner/v0.go index e518ba82e..d053df0ac 100644 --- a/chain/actors/builtin/miner/v0.go +++ b/chain/actors/builtin/miner/v0.go @@ -14,7 +14,6 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/go-state-types/dline" miner0 "github.com/filecoin-project/specs-actors/actors/builtin/miner" adt0 "github.com/filecoin-project/specs-actors/actors/util/adt" @@ -198,7 +197,7 @@ func (s *state0) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, e return &out, nil } -func (s *state0) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state0) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { info, ok, err := s.State.GetPrecommittedSector(s.store, num) if !ok || err != nil { return nil, err @@ -209,7 +208,7 @@ func (s *state0) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.Sector return &ret, nil } -func (s *state0) ForEachPrecommittedSector(cb func(minertypes.SectorPreCommitOnChainInfo) error) error { +func (s *state0) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { precommitted, err := adt0.AsMap(s.store, s.State.PreCommittedSectors) if err != nil { return err @@ -422,11 +421,11 @@ func (s *state0) precommits() (adt.Map, error) { return adt0.AsMap(s.store, s.PreCommittedSectors) } -func (s *state0) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state0) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { var sp miner0.SectorPreCommitOnChainInfo err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) if err != nil { - return minertypes.SectorPreCommitOnChainInfo{}, err + return SectorPreCommitOnChainInfo{}, err } return fromV0SectorPreCommitOnChainInfo(sp), nil @@ -512,9 +511,9 @@ func fromV0SectorOnChainInfo(v0 miner0.SectorOnChainInfo) SectorOnChainInfo { return info } -func fromV0SectorPreCommitOnChainInfo(v0 miner0.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { - return minertypes.SectorPreCommitOnChainInfo{ - Info: minertypes.SectorPreCommitInfo{ +func fromV0SectorPreCommitOnChainInfo(v0 miner0.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ SealProof: v0.Info.SealProof, SectorNumber: v0.Info.SectorNumber, SealedCID: v0.Info.SealedCID, @@ -526,6 +525,8 @@ func fromV0SectorPreCommitOnChainInfo(v0 miner0.SectorPreCommitOnChainInfo) mine PreCommitDeposit: v0.PreCommitDeposit, PreCommitEpoch: v0.PreCommitEpoch, } + + return ret } func (s *state0) GetState() interface{} { diff --git a/chain/actors/builtin/miner/v10.go b/chain/actors/builtin/miner/v10.go new file mode 100644 index 000000000..3cd3974b5 --- /dev/null +++ b/chain/actors/builtin/miner/v10.go @@ -0,0 +1,589 @@ +package miner + +import ( + "bytes" + "errors" + "fmt" + + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + "golang.org/x/xerrors" + + "github.com/filecoin-project/go-bitfield" + rle "github.com/filecoin-project/go-bitfield/rle" + "github.com/filecoin-project/go-state-types/abi" + actorstypes "github.com/filecoin-project/go-state-types/actors" + builtin10 "github.com/filecoin-project/go-state-types/builtin" + miner10 "github.com/filecoin-project/go-state-types/builtin/v10/miner" + adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" + "github.com/filecoin-project/go-state-types/dline" + + "github.com/filecoin-project/lotus/chain/actors" + "github.com/filecoin-project/lotus/chain/actors/adt" +) + +var _ State = (*state10)(nil) + +func load10(store adt.Store, root cid.Cid) (State, error) { + out := state10{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make10(store adt.Store) (State, error) { + out := state10{store: store} + out.State = miner10.State{} + return &out, nil +} + +type state10 struct { + miner10.State + store adt.Store +} + +type deadline10 struct { + miner10.Deadline + store adt.Store +} + +type partition10 struct { + miner10.Partition + store adt.Store +} + +func (s *state10) AvailableBalance(bal abi.TokenAmount) (available abi.TokenAmount, err error) { + defer func() { + if r := recover(); r != nil { + err = xerrors.Errorf("failed to get available balance: %w", r) + available = abi.NewTokenAmount(0) + } + }() + // this panics if the miner doesnt have enough funds to cover their locked pledge + available, err = s.GetAvailableBalance(bal) + return available, err +} + +func (s *state10) VestedFunds(epoch abi.ChainEpoch) (abi.TokenAmount, error) { + return s.CheckVestedFunds(s.store, epoch) +} + +func (s *state10) LockedFunds() (LockedFunds, error) { + return LockedFunds{ + VestingFunds: s.State.LockedFunds, + InitialPledgeRequirement: s.State.InitialPledge, + PreCommitDeposits: s.State.PreCommitDeposits, + }, nil +} + +func (s *state10) FeeDebt() (abi.TokenAmount, error) { + return s.State.FeeDebt, nil +} + +func (s *state10) InitialPledge() (abi.TokenAmount, error) { + return s.State.InitialPledge, nil +} + +func (s *state10) PreCommitDeposits() (abi.TokenAmount, error) { + return s.State.PreCommitDeposits, nil +} + +func (s *state10) GetSector(num abi.SectorNumber) (*SectorOnChainInfo, error) { + info, ok, err := s.State.GetSector(s.store, num) + if !ok || err != nil { + return nil, err + } + + ret := fromV10SectorOnChainInfo(*info) + return &ret, nil +} + +func (s *state10) FindSector(num abi.SectorNumber) (*SectorLocation, error) { + dlIdx, partIdx, err := s.State.FindSector(s.store, num) + if err != nil { + return nil, err + } + return &SectorLocation{ + Deadline: dlIdx, + Partition: partIdx, + }, nil +} + +func (s *state10) NumLiveSectors() (uint64, error) { + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return 0, err + } + var total uint64 + if err := dls.ForEach(s.store, func(dlIdx uint64, dl *miner10.Deadline) error { + total += dl.LiveSectors + return nil + }); err != nil { + return 0, err + } + return total, nil +} + +// GetSectorExpiration returns the effective expiration of the given sector. +// +// If the sector does not expire early, the Early expiration field is 0. +func (s *state10) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, error) { + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return nil, err + } + // NOTE: this can be optimized significantly. + // 1. If the sector is non-faulty, it will expire on-time (can be + // learned from the sector info). + // 2. If it's faulty, it will expire early within the first 42 entries + // of the expiration queue. + + stopErr := errors.New("stop") + out := SectorExpiration{} + err = dls.ForEach(s.store, func(dlIdx uint64, dl *miner10.Deadline) error { + partitions, err := dl.PartitionsArray(s.store) + if err != nil { + return err + } + quant := s.State.QuantSpecForDeadline(dlIdx) + var part miner10.Partition + return partitions.ForEach(&part, func(partIdx int64) error { + if found, err := part.Sectors.IsSet(uint64(num)); err != nil { + return err + } else if !found { + return nil + } + if found, err := part.Terminated.IsSet(uint64(num)); err != nil { + return err + } else if found { + // already terminated + return stopErr + } + + q, err := miner10.LoadExpirationQueue(s.store, part.ExpirationsEpochs, quant, miner10.PartitionExpirationAmtBitwidth) + if err != nil { + return err + } + var exp miner10.ExpirationSet + return q.ForEach(&exp, func(epoch int64) error { + if early, err := exp.EarlySectors.IsSet(uint64(num)); err != nil { + return err + } else if early { + out.Early = abi.ChainEpoch(epoch) + return nil + } + if onTime, err := exp.OnTimeSectors.IsSet(uint64(num)); err != nil { + return err + } else if onTime { + out.OnTime = abi.ChainEpoch(epoch) + return stopErr + } + return nil + }) + }) + }) + if err == stopErr { + err = nil + } + if err != nil { + return nil, err + } + if out.Early == 0 && out.OnTime == 0 { + return nil, xerrors.Errorf("failed to find sector %d", num) + } + return &out, nil +} + +func (s *state10) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { + info, ok, err := s.State.GetPrecommittedSector(s.store, num) + if !ok || err != nil { + return nil, err + } + + ret := fromV10SectorPreCommitOnChainInfo(*info) + + return &ret, nil +} + +func (s *state10) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { + precommitted, err := adt10.AsMap(s.store, s.State.PreCommittedSectors, builtin10.DefaultHamtBitwidth) + if err != nil { + return err + } + + var info miner10.SectorPreCommitOnChainInfo + if err := precommitted.ForEach(&info, func(_ string) error { + return cb(fromV10SectorPreCommitOnChainInfo(info)) + }); err != nil { + return err + } + + return nil +} + +func (s *state10) LoadSectors(snos *bitfield.BitField) ([]*SectorOnChainInfo, error) { + sectors, err := miner10.LoadSectors(s.store, s.State.Sectors) + if err != nil { + return nil, err + } + + // If no sector numbers are specified, load all. + if snos == nil { + infos := make([]*SectorOnChainInfo, 0, sectors.Length()) + var info10 miner10.SectorOnChainInfo + if err := sectors.ForEach(&info10, func(_ int64) error { + info := fromV10SectorOnChainInfo(info10) + infos = append(infos, &info) + return nil + }); err != nil { + return nil, err + } + return infos, nil + } + + // Otherwise, load selected. + infos10, err := sectors.Load(*snos) + if err != nil { + return nil, err + } + infos := make([]*SectorOnChainInfo, len(infos10)) + for i, info10 := range infos10 { + info := fromV10SectorOnChainInfo(*info10) + infos[i] = &info + } + return infos, nil +} + +func (s *state10) loadAllocatedSectorNumbers() (bitfield.BitField, error) { + var allocatedSectors bitfield.BitField + err := s.store.Get(s.store.Context(), s.State.AllocatedSectors, &allocatedSectors) + return allocatedSectors, err +} + +func (s *state10) IsAllocated(num abi.SectorNumber) (bool, error) { + allocatedSectors, err := s.loadAllocatedSectorNumbers() + if err != nil { + return false, err + } + + return allocatedSectors.IsSet(uint64(num)) +} + +func (s *state10) GetProvingPeriodStart() (abi.ChainEpoch, error) { + return s.State.ProvingPeriodStart, nil +} + +func (s *state10) UnallocatedSectorNumbers(count int) ([]abi.SectorNumber, error) { + allocatedSectors, err := s.loadAllocatedSectorNumbers() + if err != nil { + return nil, err + } + + allocatedRuns, err := allocatedSectors.RunIterator() + if err != nil { + return nil, err + } + + unallocatedRuns, err := rle.Subtract( + &rle.RunSliceIterator{Runs: []rle.Run{{Val: true, Len: abi.MaxSectorNumber}}}, + allocatedRuns, + ) + if err != nil { + return nil, err + } + + iter, err := rle.BitsFromRuns(unallocatedRuns) + if err != nil { + return nil, err + } + + sectors := make([]abi.SectorNumber, 0, count) + for iter.HasNext() && len(sectors) < count { + nextNo, err := iter.Next() + if err != nil { + return nil, err + } + sectors = append(sectors, abi.SectorNumber(nextNo)) + } + + return sectors, nil +} + +func (s *state10) GetAllocatedSectors() (*bitfield.BitField, error) { + var allocatedSectors bitfield.BitField + if err := s.store.Get(s.store.Context(), s.State.AllocatedSectors, &allocatedSectors); err != nil { + return nil, err + } + + return &allocatedSectors, nil +} + +func (s *state10) LoadDeadline(idx uint64) (Deadline, error) { + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return nil, err + } + dl, err := dls.LoadDeadline(s.store, idx) + if err != nil { + return nil, err + } + return &deadline10{*dl, s.store}, nil +} + +func (s *state10) ForEachDeadline(cb func(uint64, Deadline) error) error { + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return err + } + return dls.ForEach(s.store, func(i uint64, dl *miner10.Deadline) error { + return cb(i, &deadline10{*dl, s.store}) + }) +} + +func (s *state10) NumDeadlines() (uint64, error) { + return miner10.WPoStPeriodDeadlines, nil +} + +func (s *state10) DeadlinesChanged(other State) (bool, error) { + other10, ok := other.(*state10) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + + return !s.State.Deadlines.Equals(other10.Deadlines), nil +} + +func (s *state10) MinerInfoChanged(other State) (bool, error) { + other0, ok := other.(*state10) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + return !s.State.Info.Equals(other0.State.Info), nil +} + +func (s *state10) Info() (MinerInfo, error) { + info, err := s.State.GetInfo(s.store) + if err != nil { + return MinerInfo{}, err + } + + mi := MinerInfo{ + Owner: info.Owner, + Worker: info.Worker, + ControlAddresses: info.ControlAddresses, + + PendingWorkerKey: (*WorkerKeyChange)(info.PendingWorkerKey), + + PeerId: info.PeerId, + Multiaddrs: info.Multiaddrs, + WindowPoStProofType: info.WindowPoStProofType, + SectorSize: info.SectorSize, + WindowPoStPartitionSectors: info.WindowPoStPartitionSectors, + ConsensusFaultElapsed: info.ConsensusFaultElapsed, + + Beneficiary: info.Beneficiary, + BeneficiaryTerm: BeneficiaryTerm(info.BeneficiaryTerm), + PendingBeneficiaryTerm: (*PendingBeneficiaryChange)(info.PendingBeneficiaryTerm), + } + + return mi, nil +} + +func (s *state10) DeadlineInfo(epoch abi.ChainEpoch) (*dline.Info, error) { + return s.State.RecordedDeadlineInfo(epoch), nil +} + +func (s *state10) DeadlineCronActive() (bool, error) { + return s.State.DeadlineCronActive, nil +} + +func (s *state10) sectors() (adt.Array, error) { + return adt10.AsArray(s.store, s.Sectors, miner10.SectorsAmtBitwidth) +} + +func (s *state10) decodeSectorOnChainInfo(val *cbg.Deferred) (SectorOnChainInfo, error) { + var si miner10.SectorOnChainInfo + err := si.UnmarshalCBOR(bytes.NewReader(val.Raw)) + if err != nil { + return SectorOnChainInfo{}, err + } + + return fromV10SectorOnChainInfo(si), nil +} + +func (s *state10) precommits() (adt.Map, error) { + return adt10.AsMap(s.store, s.PreCommittedSectors, builtin10.DefaultHamtBitwidth) +} + +func (s *state10) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { + var sp miner10.SectorPreCommitOnChainInfo + err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) + if err != nil { + return SectorPreCommitOnChainInfo{}, err + } + + return fromV10SectorPreCommitOnChainInfo(sp), nil +} + +func (s *state10) EraseAllUnproven() error { + + dls, err := s.State.LoadDeadlines(s.store) + if err != nil { + return err + } + + err = dls.ForEach(s.store, func(dindx uint64, dl *miner10.Deadline) error { + ps, err := dl.PartitionsArray(s.store) + if err != nil { + return err + } + + var part miner10.Partition + err = ps.ForEach(&part, func(pindx int64) error { + _ = part.ActivateUnproven() + err = ps.Set(uint64(pindx), &part) + return nil + }) + + if err != nil { + return err + } + + dl.Partitions, err = ps.Root() + if err != nil { + return err + } + + return dls.UpdateDeadline(s.store, dindx, dl) + }) + if err != nil { + return err + } + + return s.State.SaveDeadlines(s.store, dls) + +} + +func (d *deadline10) LoadPartition(idx uint64) (Partition, error) { + p, err := d.Deadline.LoadPartition(d.store, idx) + if err != nil { + return nil, err + } + return &partition10{*p, d.store}, nil +} + +func (d *deadline10) ForEachPartition(cb func(uint64, Partition) error) error { + ps, err := d.Deadline.PartitionsArray(d.store) + if err != nil { + return err + } + var part miner10.Partition + return ps.ForEach(&part, func(i int64) error { + return cb(uint64(i), &partition10{part, d.store}) + }) +} + +func (d *deadline10) PartitionsChanged(other Deadline) (bool, error) { + other10, ok := other.(*deadline10) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + + return !d.Deadline.Partitions.Equals(other10.Deadline.Partitions), nil +} + +func (d *deadline10) PartitionsPoSted() (bitfield.BitField, error) { + return d.Deadline.PartitionsPoSted, nil +} + +func (d *deadline10) DisputableProofCount() (uint64, error) { + + ops, err := d.OptimisticProofsSnapshotArray(d.store) + if err != nil { + return 0, err + } + + return ops.Length(), nil + +} + +func (p *partition10) AllSectors() (bitfield.BitField, error) { + return p.Partition.Sectors, nil +} + +func (p *partition10) FaultySectors() (bitfield.BitField, error) { + return p.Partition.Faults, nil +} + +func (p *partition10) RecoveringSectors() (bitfield.BitField, error) { + return p.Partition.Recoveries, nil +} + +func (p *partition10) UnprovenSectors() (bitfield.BitField, error) { + return p.Partition.Unproven, nil +} + +func fromV10SectorOnChainInfo(v10 miner10.SectorOnChainInfo) SectorOnChainInfo { + info := SectorOnChainInfo{ + SectorNumber: v10.SectorNumber, + SealProof: v10.SealProof, + SealedCID: v10.SealedCID, + DealIDs: v10.DealIDs, + Activation: v10.Activation, + Expiration: v10.Expiration, + DealWeight: v10.DealWeight, + VerifiedDealWeight: v10.VerifiedDealWeight, + InitialPledge: v10.InitialPledge, + ExpectedDayReward: v10.ExpectedDayReward, + ExpectedStoragePledge: v10.ExpectedStoragePledge, + + SectorKeyCID: v10.SectorKeyCID, + } + return info +} + +func fromV10SectorPreCommitOnChainInfo(v10 miner10.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ + SealProof: v10.Info.SealProof, + SectorNumber: v10.Info.SectorNumber, + SealedCID: v10.Info.SealedCID, + SealRandEpoch: v10.Info.SealRandEpoch, + DealIDs: v10.Info.DealIDs, + Expiration: v10.Info.Expiration, + UnsealedCid: nil, + }, + PreCommitDeposit: v10.PreCommitDeposit, + PreCommitEpoch: v10.PreCommitEpoch, + } + + ret.Info.UnsealedCid = v10.Info.UnsealedCid + + return ret +} + +func (s *state10) GetState() interface{} { + return &s.State +} + +func (s *state10) ActorKey() string { + return actors.MinerKey +} + +func (s *state10) ActorVersion() actorstypes.Version { + return actorstypes.Version10 +} + +func (s *state10) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/miner/v2.go b/chain/actors/builtin/miner/v2.go index 48a46ba7c..33c00ae62 100644 --- a/chain/actors/builtin/miner/v2.go +++ b/chain/actors/builtin/miner/v2.go @@ -13,7 +13,6 @@ import ( rle "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/go-state-types/dline" miner2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/miner" adt2 "github.com/filecoin-project/specs-actors/v2/actors/util/adt" @@ -197,7 +196,7 @@ func (s *state2) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, e return &out, nil } -func (s *state2) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state2) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { info, ok, err := s.State.GetPrecommittedSector(s.store, num) if !ok || err != nil { return nil, err @@ -208,7 +207,7 @@ func (s *state2) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.Sector return &ret, nil } -func (s *state2) ForEachPrecommittedSector(cb func(minertypes.SectorPreCommitOnChainInfo) error) error { +func (s *state2) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { precommitted, err := adt2.AsMap(s.store, s.State.PreCommittedSectors) if err != nil { return err @@ -421,11 +420,11 @@ func (s *state2) precommits() (adt.Map, error) { return adt2.AsMap(s.store, s.PreCommittedSectors) } -func (s *state2) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state2) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { var sp miner2.SectorPreCommitOnChainInfo err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) if err != nil { - return minertypes.SectorPreCommitOnChainInfo{}, err + return SectorPreCommitOnChainInfo{}, err } return fromV2SectorPreCommitOnChainInfo(sp), nil @@ -543,9 +542,9 @@ func fromV2SectorOnChainInfo(v2 miner2.SectorOnChainInfo) SectorOnChainInfo { return info } -func fromV2SectorPreCommitOnChainInfo(v2 miner2.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { - return minertypes.SectorPreCommitOnChainInfo{ - Info: minertypes.SectorPreCommitInfo{ +func fromV2SectorPreCommitOnChainInfo(v2 miner2.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ SealProof: v2.Info.SealProof, SectorNumber: v2.Info.SectorNumber, SealedCID: v2.Info.SealedCID, @@ -557,6 +556,8 @@ func fromV2SectorPreCommitOnChainInfo(v2 miner2.SectorPreCommitOnChainInfo) mine PreCommitDeposit: v2.PreCommitDeposit, PreCommitEpoch: v2.PreCommitEpoch, } + + return ret } func (s *state2) GetState() interface{} { diff --git a/chain/actors/builtin/miner/v3.go b/chain/actors/builtin/miner/v3.go index 77490ec6b..c59a053bd 100644 --- a/chain/actors/builtin/miner/v3.go +++ b/chain/actors/builtin/miner/v3.go @@ -13,7 +13,6 @@ import ( rle "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/go-state-types/dline" builtin3 "github.com/filecoin-project/specs-actors/v3/actors/builtin" miner3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/miner" @@ -198,7 +197,7 @@ func (s *state3) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, e return &out, nil } -func (s *state3) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state3) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { info, ok, err := s.State.GetPrecommittedSector(s.store, num) if !ok || err != nil { return nil, err @@ -209,7 +208,7 @@ func (s *state3) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.Sector return &ret, nil } -func (s *state3) ForEachPrecommittedSector(cb func(minertypes.SectorPreCommitOnChainInfo) error) error { +func (s *state3) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { precommitted, err := adt3.AsMap(s.store, s.State.PreCommittedSectors, builtin3.DefaultHamtBitwidth) if err != nil { return err @@ -417,11 +416,11 @@ func (s *state3) precommits() (adt.Map, error) { return adt3.AsMap(s.store, s.PreCommittedSectors, builtin3.DefaultHamtBitwidth) } -func (s *state3) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state3) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { var sp miner3.SectorPreCommitOnChainInfo err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) if err != nil { - return minertypes.SectorPreCommitOnChainInfo{}, err + return SectorPreCommitOnChainInfo{}, err } return fromV3SectorPreCommitOnChainInfo(sp), nil @@ -543,9 +542,9 @@ func fromV3SectorOnChainInfo(v3 miner3.SectorOnChainInfo) SectorOnChainInfo { return info } -func fromV3SectorPreCommitOnChainInfo(v3 miner3.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { - return minertypes.SectorPreCommitOnChainInfo{ - Info: minertypes.SectorPreCommitInfo{ +func fromV3SectorPreCommitOnChainInfo(v3 miner3.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ SealProof: v3.Info.SealProof, SectorNumber: v3.Info.SectorNumber, SealedCID: v3.Info.SealedCID, @@ -557,6 +556,8 @@ func fromV3SectorPreCommitOnChainInfo(v3 miner3.SectorPreCommitOnChainInfo) mine PreCommitDeposit: v3.PreCommitDeposit, PreCommitEpoch: v3.PreCommitEpoch, } + + return ret } func (s *state3) GetState() interface{} { diff --git a/chain/actors/builtin/miner/v4.go b/chain/actors/builtin/miner/v4.go index 0120d5913..0eecd89f3 100644 --- a/chain/actors/builtin/miner/v4.go +++ b/chain/actors/builtin/miner/v4.go @@ -13,7 +13,6 @@ import ( rle "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/go-state-types/dline" builtin4 "github.com/filecoin-project/specs-actors/v4/actors/builtin" miner4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/miner" @@ -198,7 +197,7 @@ func (s *state4) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, e return &out, nil } -func (s *state4) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state4) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { info, ok, err := s.State.GetPrecommittedSector(s.store, num) if !ok || err != nil { return nil, err @@ -209,7 +208,7 @@ func (s *state4) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.Sector return &ret, nil } -func (s *state4) ForEachPrecommittedSector(cb func(minertypes.SectorPreCommitOnChainInfo) error) error { +func (s *state4) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { precommitted, err := adt4.AsMap(s.store, s.State.PreCommittedSectors, builtin4.DefaultHamtBitwidth) if err != nil { return err @@ -417,11 +416,11 @@ func (s *state4) precommits() (adt.Map, error) { return adt4.AsMap(s.store, s.PreCommittedSectors, builtin4.DefaultHamtBitwidth) } -func (s *state4) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state4) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { var sp miner4.SectorPreCommitOnChainInfo err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) if err != nil { - return minertypes.SectorPreCommitOnChainInfo{}, err + return SectorPreCommitOnChainInfo{}, err } return fromV4SectorPreCommitOnChainInfo(sp), nil @@ -543,9 +542,9 @@ func fromV4SectorOnChainInfo(v4 miner4.SectorOnChainInfo) SectorOnChainInfo { return info } -func fromV4SectorPreCommitOnChainInfo(v4 miner4.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { - return minertypes.SectorPreCommitOnChainInfo{ - Info: minertypes.SectorPreCommitInfo{ +func fromV4SectorPreCommitOnChainInfo(v4 miner4.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ SealProof: v4.Info.SealProof, SectorNumber: v4.Info.SectorNumber, SealedCID: v4.Info.SealedCID, @@ -557,6 +556,8 @@ func fromV4SectorPreCommitOnChainInfo(v4 miner4.SectorPreCommitOnChainInfo) mine PreCommitDeposit: v4.PreCommitDeposit, PreCommitEpoch: v4.PreCommitEpoch, } + + return ret } func (s *state4) GetState() interface{} { diff --git a/chain/actors/builtin/miner/v5.go b/chain/actors/builtin/miner/v5.go index 6d834be76..f667a7149 100644 --- a/chain/actors/builtin/miner/v5.go +++ b/chain/actors/builtin/miner/v5.go @@ -13,7 +13,6 @@ import ( rle "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/go-state-types/dline" builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin" miner5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/miner" @@ -198,7 +197,7 @@ func (s *state5) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, e return &out, nil } -func (s *state5) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state5) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { info, ok, err := s.State.GetPrecommittedSector(s.store, num) if !ok || err != nil { return nil, err @@ -209,7 +208,7 @@ func (s *state5) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.Sector return &ret, nil } -func (s *state5) ForEachPrecommittedSector(cb func(minertypes.SectorPreCommitOnChainInfo) error) error { +func (s *state5) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { precommitted, err := adt5.AsMap(s.store, s.State.PreCommittedSectors, builtin5.DefaultHamtBitwidth) if err != nil { return err @@ -417,11 +416,11 @@ func (s *state5) precommits() (adt.Map, error) { return adt5.AsMap(s.store, s.PreCommittedSectors, builtin5.DefaultHamtBitwidth) } -func (s *state5) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state5) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { var sp miner5.SectorPreCommitOnChainInfo err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) if err != nil { - return minertypes.SectorPreCommitOnChainInfo{}, err + return SectorPreCommitOnChainInfo{}, err } return fromV5SectorPreCommitOnChainInfo(sp), nil @@ -543,9 +542,9 @@ func fromV5SectorOnChainInfo(v5 miner5.SectorOnChainInfo) SectorOnChainInfo { return info } -func fromV5SectorPreCommitOnChainInfo(v5 miner5.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { - return minertypes.SectorPreCommitOnChainInfo{ - Info: minertypes.SectorPreCommitInfo{ +func fromV5SectorPreCommitOnChainInfo(v5 miner5.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ SealProof: v5.Info.SealProof, SectorNumber: v5.Info.SectorNumber, SealedCID: v5.Info.SealedCID, @@ -557,6 +556,8 @@ func fromV5SectorPreCommitOnChainInfo(v5 miner5.SectorPreCommitOnChainInfo) mine PreCommitDeposit: v5.PreCommitDeposit, PreCommitEpoch: v5.PreCommitEpoch, } + + return ret } func (s *state5) GetState() interface{} { diff --git a/chain/actors/builtin/miner/v6.go b/chain/actors/builtin/miner/v6.go index 2f1ae310a..37e4aba0b 100644 --- a/chain/actors/builtin/miner/v6.go +++ b/chain/actors/builtin/miner/v6.go @@ -13,7 +13,6 @@ import ( rle "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/go-state-types/dline" builtin6 "github.com/filecoin-project/specs-actors/v6/actors/builtin" miner6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/miner" @@ -198,7 +197,7 @@ func (s *state6) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, e return &out, nil } -func (s *state6) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state6) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { info, ok, err := s.State.GetPrecommittedSector(s.store, num) if !ok || err != nil { return nil, err @@ -209,7 +208,7 @@ func (s *state6) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.Sector return &ret, nil } -func (s *state6) ForEachPrecommittedSector(cb func(minertypes.SectorPreCommitOnChainInfo) error) error { +func (s *state6) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { precommitted, err := adt6.AsMap(s.store, s.State.PreCommittedSectors, builtin6.DefaultHamtBitwidth) if err != nil { return err @@ -417,11 +416,11 @@ func (s *state6) precommits() (adt.Map, error) { return adt6.AsMap(s.store, s.PreCommittedSectors, builtin6.DefaultHamtBitwidth) } -func (s *state6) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state6) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { var sp miner6.SectorPreCommitOnChainInfo err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) if err != nil { - return minertypes.SectorPreCommitOnChainInfo{}, err + return SectorPreCommitOnChainInfo{}, err } return fromV6SectorPreCommitOnChainInfo(sp), nil @@ -543,9 +542,9 @@ func fromV6SectorOnChainInfo(v6 miner6.SectorOnChainInfo) SectorOnChainInfo { return info } -func fromV6SectorPreCommitOnChainInfo(v6 miner6.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { - return minertypes.SectorPreCommitOnChainInfo{ - Info: minertypes.SectorPreCommitInfo{ +func fromV6SectorPreCommitOnChainInfo(v6 miner6.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ SealProof: v6.Info.SealProof, SectorNumber: v6.Info.SectorNumber, SealedCID: v6.Info.SealedCID, @@ -557,6 +556,8 @@ func fromV6SectorPreCommitOnChainInfo(v6 miner6.SectorPreCommitOnChainInfo) mine PreCommitDeposit: v6.PreCommitDeposit, PreCommitEpoch: v6.PreCommitEpoch, } + + return ret } func (s *state6) GetState() interface{} { diff --git a/chain/actors/builtin/miner/v7.go b/chain/actors/builtin/miner/v7.go index f876d1d85..4d330a4e7 100644 --- a/chain/actors/builtin/miner/v7.go +++ b/chain/actors/builtin/miner/v7.go @@ -13,7 +13,6 @@ import ( rle "github.com/filecoin-project/go-bitfield/rle" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/go-state-types/dline" builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin" miner7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/miner" @@ -197,7 +196,7 @@ func (s *state7) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, e return &out, nil } -func (s *state7) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state7) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { info, ok, err := s.State.GetPrecommittedSector(s.store, num) if !ok || err != nil { return nil, err @@ -208,7 +207,7 @@ func (s *state7) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.Sector return &ret, nil } -func (s *state7) ForEachPrecommittedSector(cb func(minertypes.SectorPreCommitOnChainInfo) error) error { +func (s *state7) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { precommitted, err := adt7.AsMap(s.store, s.State.PreCommittedSectors, builtin7.DefaultHamtBitwidth) if err != nil { return err @@ -416,11 +415,11 @@ func (s *state7) precommits() (adt.Map, error) { return adt7.AsMap(s.store, s.PreCommittedSectors, builtin7.DefaultHamtBitwidth) } -func (s *state7) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state7) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { var sp miner7.SectorPreCommitOnChainInfo err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) if err != nil { - return minertypes.SectorPreCommitOnChainInfo{}, err + return SectorPreCommitOnChainInfo{}, err } return fromV7SectorPreCommitOnChainInfo(sp), nil @@ -544,9 +543,9 @@ func fromV7SectorOnChainInfo(v7 miner7.SectorOnChainInfo) SectorOnChainInfo { return info } -func fromV7SectorPreCommitOnChainInfo(v7 miner7.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { - return minertypes.SectorPreCommitOnChainInfo{ - Info: minertypes.SectorPreCommitInfo{ +func fromV7SectorPreCommitOnChainInfo(v7 miner7.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ SealProof: v7.Info.SealProof, SectorNumber: v7.Info.SectorNumber, SealedCID: v7.Info.SealedCID, @@ -558,6 +557,8 @@ func fromV7SectorPreCommitOnChainInfo(v7 miner7.SectorPreCommitOnChainInfo) mine PreCommitDeposit: v7.PreCommitDeposit, PreCommitEpoch: v7.PreCommitEpoch, } + + return ret } func (s *state7) GetState() interface{} { diff --git a/chain/actors/builtin/miner/v8.go b/chain/actors/builtin/miner/v8.go index 21d5b1cbf..1822a3c25 100644 --- a/chain/actors/builtin/miner/v8.go +++ b/chain/actors/builtin/miner/v8.go @@ -16,7 +16,6 @@ import ( builtin8 "github.com/filecoin-project/go-state-types/builtin" miner8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" adt8 "github.com/filecoin-project/go-state-types/builtin/v8/util/adt" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" "github.com/filecoin-project/go-state-types/dline" "github.com/filecoin-project/lotus/chain/actors" @@ -197,7 +196,7 @@ func (s *state8) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, e return &out, nil } -func (s *state8) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state8) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { info, ok, err := s.State.GetPrecommittedSector(s.store, num) if !ok || err != nil { return nil, err @@ -208,7 +207,7 @@ func (s *state8) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.Sector return &ret, nil } -func (s *state8) ForEachPrecommittedSector(cb func(minertypes.SectorPreCommitOnChainInfo) error) error { +func (s *state8) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { precommitted, err := adt8.AsMap(s.store, s.State.PreCommittedSectors, builtin8.DefaultHamtBitwidth) if err != nil { return err @@ -416,11 +415,11 @@ func (s *state8) precommits() (adt.Map, error) { return adt8.AsMap(s.store, s.PreCommittedSectors, builtin8.DefaultHamtBitwidth) } -func (s *state8) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state8) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { var sp miner8.SectorPreCommitOnChainInfo err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) if err != nil { - return minertypes.SectorPreCommitOnChainInfo{}, err + return SectorPreCommitOnChainInfo{}, err } return fromV8SectorPreCommitOnChainInfo(sp), nil @@ -544,9 +543,9 @@ func fromV8SectorOnChainInfo(v8 miner8.SectorOnChainInfo) SectorOnChainInfo { return info } -func fromV8SectorPreCommitOnChainInfo(v8 miner8.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { - return minertypes.SectorPreCommitOnChainInfo{ - Info: minertypes.SectorPreCommitInfo{ +func fromV8SectorPreCommitOnChainInfo(v8 miner8.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ SealProof: v8.Info.SealProof, SectorNumber: v8.Info.SectorNumber, SealedCID: v8.Info.SealedCID, @@ -558,6 +557,8 @@ func fromV8SectorPreCommitOnChainInfo(v8 miner8.SectorPreCommitOnChainInfo) mine PreCommitDeposit: v8.PreCommitDeposit, PreCommitEpoch: v8.PreCommitEpoch, } + + return ret } func (s *state8) GetState() interface{} { diff --git a/chain/actors/builtin/miner/v9.go b/chain/actors/builtin/miner/v9.go index 3fba60164..39328c559 100644 --- a/chain/actors/builtin/miner/v9.go +++ b/chain/actors/builtin/miner/v9.go @@ -15,7 +15,6 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" builtin9 "github.com/filecoin-project/go-state-types/builtin" miner9 "github.com/filecoin-project/go-state-types/builtin/v9/miner" - minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner" adt9 "github.com/filecoin-project/go-state-types/builtin/v9/util/adt" "github.com/filecoin-project/go-state-types/dline" @@ -197,7 +196,7 @@ func (s *state9) GetSectorExpiration(num abi.SectorNumber) (*SectorExpiration, e return &out, nil } -func (s *state9) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state9) GetPrecommittedSector(num abi.SectorNumber) (*SectorPreCommitOnChainInfo, error) { info, ok, err := s.State.GetPrecommittedSector(s.store, num) if !ok || err != nil { return nil, err @@ -208,7 +207,7 @@ func (s *state9) GetPrecommittedSector(num abi.SectorNumber) (*minertypes.Sector return &ret, nil } -func (s *state9) ForEachPrecommittedSector(cb func(minertypes.SectorPreCommitOnChainInfo) error) error { +func (s *state9) ForEachPrecommittedSector(cb func(SectorPreCommitOnChainInfo) error) error { precommitted, err := adt9.AsMap(s.store, s.State.PreCommittedSectors, builtin9.DefaultHamtBitwidth) if err != nil { return err @@ -387,8 +386,8 @@ func (s *state9) Info() (MinerInfo, error) { ConsensusFaultElapsed: info.ConsensusFaultElapsed, Beneficiary: info.Beneficiary, - BeneficiaryTerm: info.BeneficiaryTerm, - PendingBeneficiaryTerm: info.PendingBeneficiaryTerm, + BeneficiaryTerm: BeneficiaryTerm(info.BeneficiaryTerm), + PendingBeneficiaryTerm: (*PendingBeneficiaryChange)(info.PendingBeneficiaryTerm), } return mi, nil @@ -420,11 +419,11 @@ func (s *state9) precommits() (adt.Map, error) { return adt9.AsMap(s.store, s.PreCommittedSectors, builtin9.DefaultHamtBitwidth) } -func (s *state9) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (minertypes.SectorPreCommitOnChainInfo, error) { +func (s *state9) decodeSectorPreCommitOnChainInfo(val *cbg.Deferred) (SectorPreCommitOnChainInfo, error) { var sp miner9.SectorPreCommitOnChainInfo err := sp.UnmarshalCBOR(bytes.NewReader(val.Raw)) if err != nil { - return minertypes.SectorPreCommitOnChainInfo{}, err + return SectorPreCommitOnChainInfo{}, err } return fromV9SectorPreCommitOnChainInfo(sp), nil @@ -548,8 +547,24 @@ func fromV9SectorOnChainInfo(v9 miner9.SectorOnChainInfo) SectorOnChainInfo { return info } -func fromV9SectorPreCommitOnChainInfo(v9 miner9.SectorPreCommitOnChainInfo) minertypes.SectorPreCommitOnChainInfo { - return v9 +func fromV9SectorPreCommitOnChainInfo(v9 miner9.SectorPreCommitOnChainInfo) SectorPreCommitOnChainInfo { + ret := SectorPreCommitOnChainInfo{ + Info: SectorPreCommitInfo{ + SealProof: v9.Info.SealProof, + SectorNumber: v9.Info.SectorNumber, + SealedCID: v9.Info.SealedCID, + SealRandEpoch: v9.Info.SealRandEpoch, + DealIDs: v9.Info.DealIDs, + Expiration: v9.Info.Expiration, + UnsealedCid: nil, + }, + PreCommitDeposit: v9.PreCommitDeposit, + PreCommitEpoch: v9.PreCommitEpoch, + } + + ret.Info.UnsealedCid = v9.Info.UnsealedCid + + return ret } func (s *state9) GetState() interface{} { diff --git a/chain/actors/builtin/multisig/message10.go b/chain/actors/builtin/multisig/message10.go new file mode 100644 index 000000000..944911643 --- /dev/null +++ b/chain/actors/builtin/multisig/message10.go @@ -0,0 +1,76 @@ +package multisig + +import ( + "golang.org/x/xerrors" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + actorstypes "github.com/filecoin-project/go-state-types/actors" + builtintypes "github.com/filecoin-project/go-state-types/builtin" + init10 "github.com/filecoin-project/go-state-types/builtin/v10/init" + multisig10 "github.com/filecoin-project/go-state-types/builtin/v10/multisig" + + "github.com/filecoin-project/lotus/chain/actors" + init_ "github.com/filecoin-project/lotus/chain/actors/builtin/init" + "github.com/filecoin-project/lotus/chain/types" +) + +type message10 struct{ message0 } + +func (m message10) Create( + signers []address.Address, threshold uint64, + unlockStart, unlockDuration abi.ChainEpoch, + initialAmount abi.TokenAmount, +) (*types.Message, error) { + + lenAddrs := uint64(len(signers)) + + if lenAddrs < threshold { + return nil, xerrors.Errorf("cannot require signing of more addresses than provided for multisig") + } + + if threshold == 0 { + threshold = lenAddrs + } + + if m.from == address.Undef { + return nil, xerrors.Errorf("must provide source address") + } + + // Set up constructor parameters for multisig + msigParams := &multisig10.ConstructorParams{ + Signers: signers, + NumApprovalsThreshold: threshold, + UnlockDuration: unlockDuration, + StartEpoch: unlockStart, + } + + enc, actErr := actors.SerializeParams(msigParams) + if actErr != nil { + return nil, actErr + } + + code, ok := actors.GetActorCodeID(actorstypes.Version10, actors.MultisigKey) + if !ok { + return nil, xerrors.Errorf("failed to get multisig code ID") + } + + // new actors are created by invoking 'exec' on the init actor with the constructor params + execParams := &init10.ExecParams{ + CodeCID: code, + ConstructorParams: enc, + } + + enc, actErr = actors.SerializeParams(execParams) + if actErr != nil { + return nil, actErr + } + + return &types.Message{ + To: init_.Address, + From: m.from, + Method: builtintypes.MethodsInit.Exec, + Params: enc, + Value: initialAmount, + }, nil +} diff --git a/chain/actors/builtin/multisig/message8.go b/chain/actors/builtin/multisig/message8.go index f627a695f..7c79f3f50 100644 --- a/chain/actors/builtin/multisig/message8.go +++ b/chain/actors/builtin/multisig/message8.go @@ -7,8 +7,8 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" builtintypes "github.com/filecoin-project/go-state-types/builtin" + init10 "github.com/filecoin-project/go-state-types/builtin/v10/init" multisig8 "github.com/filecoin-project/go-state-types/builtin/v8/multisig" - init9 "github.com/filecoin-project/go-state-types/builtin/v9/init" "github.com/filecoin-project/lotus/chain/actors" init_ "github.com/filecoin-project/lotus/chain/actors/builtin/init" @@ -56,7 +56,7 @@ func (m message8) Create( } // new actors are created by invoking 'exec' on the init actor with the constructor params - execParams := &init9.ExecParams{ + execParams := &init10.ExecParams{ CodeCID: code, ConstructorParams: enc, } diff --git a/chain/actors/builtin/multisig/message9.go b/chain/actors/builtin/multisig/message9.go index 62f6ff558..be49894fa 100644 --- a/chain/actors/builtin/multisig/message9.go +++ b/chain/actors/builtin/multisig/message9.go @@ -7,7 +7,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" builtintypes "github.com/filecoin-project/go-state-types/builtin" - init9 "github.com/filecoin-project/go-state-types/builtin/v9/init" + init10 "github.com/filecoin-project/go-state-types/builtin/v10/init" multisig9 "github.com/filecoin-project/go-state-types/builtin/v9/multisig" "github.com/filecoin-project/lotus/chain/actors" @@ -56,7 +56,7 @@ func (m message9) Create( } // new actors are created by invoking 'exec' on the init actor with the constructor params - execParams := &init9.ExecParams{ + execParams := &init10.ExecParams{ CodeCID: code, ConstructorParams: enc, } diff --git a/chain/actors/builtin/multisig/multisig.go b/chain/actors/builtin/multisig/multisig.go index 45e196b24..adb2fcfa0 100644 --- a/chain/actors/builtin/multisig/multisig.go +++ b/chain/actors/builtin/multisig/multisig.go @@ -12,7 +12,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" builtintypes "github.com/filecoin-project/go-state-types/builtin" - msig9 "github.com/filecoin-project/go-state-types/builtin/v9/multisig" + msig10 "github.com/filecoin-project/go-state-types/builtin/v10/multisig" "github.com/filecoin-project/go-state-types/cbor" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" @@ -41,6 +41,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actorstypes.Version9: return load9(store, act.Head) + case actorstypes.Version10: + return load10(store, act.Head) + } } @@ -102,6 +105,9 @@ func MakeState(store adt.Store, av actorstypes.Version, signers []address.Addres case actorstypes.Version9: return make9(store, signers, threshold, startEpoch, unlockDuration, initialBalance) + case actorstypes.Version10: + return make10(store, signers, threshold, startEpoch, unlockDuration, initialBalance) + } return nil, xerrors.Errorf("unknown actor version %d", av) } @@ -128,7 +134,7 @@ type State interface { GetState() interface{} } -type Transaction = msig9.Transaction +type Transaction = msig10.Transaction var Methods = builtintypes.MethodsMultisig @@ -161,6 +167,9 @@ func Message(version actorstypes.Version, from address.Address) MessageBuilder { case actorstypes.Version9: return message9{message0{from}} + + case actorstypes.Version10: + return message10{message0{from}} default: panic(fmt.Sprintf("unsupported actors version: %d", version)) } @@ -184,13 +193,13 @@ type MessageBuilder interface { } // this type is the same between v0 and v2 -type ProposalHashData = msig9.ProposalHashData -type ProposeReturn = msig9.ProposeReturn -type ProposeParams = msig9.ProposeParams -type ApproveReturn = msig9.ApproveReturn +type ProposalHashData = msig10.ProposalHashData +type ProposeReturn = msig10.ProposeReturn +type ProposeParams = msig10.ProposeParams +type ApproveReturn = msig10.ApproveReturn func txnParams(id uint64, data *ProposalHashData) ([]byte, error) { - params := msig9.TxnIDParams{ID: msig9.TxnID(id)} + params := msig10.TxnIDParams{ID: msig10.TxnID(id)} if data != nil { if data.Requester.Protocol() != address.ID { return nil, xerrors.Errorf("proposer address must be an ID address, was %s", data.Requester) @@ -223,5 +232,6 @@ func AllCodes() []cid.Cid { (&state7{}).Code(), (&state8{}).Code(), (&state9{}).Code(), + (&state10{}).Code(), } } diff --git a/chain/actors/builtin/multisig/v10.go b/chain/actors/builtin/multisig/v10.go new file mode 100644 index 000000000..3b9babebe --- /dev/null +++ b/chain/actors/builtin/multisig/v10.go @@ -0,0 +1,137 @@ +package multisig + +import ( + "bytes" + "encoding/binary" + "fmt" + + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + "golang.org/x/xerrors" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + actorstypes "github.com/filecoin-project/go-state-types/actors" + builtin10 "github.com/filecoin-project/go-state-types/builtin" + msig10 "github.com/filecoin-project/go-state-types/builtin/v10/multisig" + adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" + + "github.com/filecoin-project/lotus/chain/actors" + "github.com/filecoin-project/lotus/chain/actors/adt" +) + +var _ State = (*state10)(nil) + +func load10(store adt.Store, root cid.Cid) (State, error) { + out := state10{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make10(store adt.Store, signers []address.Address, threshold uint64, startEpoch abi.ChainEpoch, unlockDuration abi.ChainEpoch, initialBalance abi.TokenAmount) (State, error) { + out := state10{store: store} + out.State = msig10.State{} + out.State.Signers = signers + out.State.NumApprovalsThreshold = threshold + out.State.StartEpoch = startEpoch + out.State.UnlockDuration = unlockDuration + out.State.InitialBalance = initialBalance + + em, err := adt10.StoreEmptyMap(store, builtin10.DefaultHamtBitwidth) + if err != nil { + return nil, err + } + + out.State.PendingTxns = em + + return &out, nil +} + +type state10 struct { + msig10.State + store adt.Store +} + +func (s *state10) LockedBalance(currEpoch abi.ChainEpoch) (abi.TokenAmount, error) { + return s.State.AmountLocked(currEpoch - s.State.StartEpoch), nil +} + +func (s *state10) StartEpoch() (abi.ChainEpoch, error) { + return s.State.StartEpoch, nil +} + +func (s *state10) UnlockDuration() (abi.ChainEpoch, error) { + return s.State.UnlockDuration, nil +} + +func (s *state10) InitialBalance() (abi.TokenAmount, error) { + return s.State.InitialBalance, nil +} + +func (s *state10) Threshold() (uint64, error) { + return s.State.NumApprovalsThreshold, nil +} + +func (s *state10) Signers() ([]address.Address, error) { + return s.State.Signers, nil +} + +func (s *state10) ForEachPendingTxn(cb func(id int64, txn Transaction) error) error { + arr, err := adt10.AsMap(s.store, s.State.PendingTxns, builtin10.DefaultHamtBitwidth) + if err != nil { + return err + } + var out msig10.Transaction + return arr.ForEach(&out, func(key string) error { + txid, n := binary.Varint([]byte(key)) + if n <= 0 { + return xerrors.Errorf("invalid pending transaction key: %v", key) + } + return cb(txid, (Transaction)(out)) //nolint:unconvert + }) +} + +func (s *state10) PendingTxnChanged(other State) (bool, error) { + other10, ok := other.(*state10) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + return !s.State.PendingTxns.Equals(other10.PendingTxns), nil +} + +func (s *state10) transactions() (adt.Map, error) { + return adt10.AsMap(s.store, s.PendingTxns, builtin10.DefaultHamtBitwidth) +} + +func (s *state10) decodeTransaction(val *cbg.Deferred) (Transaction, error) { + var tx msig10.Transaction + if err := tx.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil { + return Transaction{}, err + } + return Transaction(tx), nil +} + +func (s *state10) GetState() interface{} { + return &s.State +} + +func (s *state10) ActorKey() string { + return actors.MultisigKey +} + +func (s *state10) ActorVersion() actorstypes.Version { + return actorstypes.Version10 +} + +func (s *state10) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/paych/message10.go b/chain/actors/builtin/paych/message10.go new file mode 100644 index 000000000..03daa7bcf --- /dev/null +++ b/chain/actors/builtin/paych/message10.go @@ -0,0 +1,109 @@ +package paych + +import ( + "golang.org/x/xerrors" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + actorstypes "github.com/filecoin-project/go-state-types/actors" + builtin10 "github.com/filecoin-project/go-state-types/builtin" + init10 "github.com/filecoin-project/go-state-types/builtin/v10/init" + paych10 "github.com/filecoin-project/go-state-types/builtin/v10/paych" + paychtypes "github.com/filecoin-project/go-state-types/builtin/v8/paych" + + "github.com/filecoin-project/lotus/chain/actors" + init_ "github.com/filecoin-project/lotus/chain/actors/builtin/init" + "github.com/filecoin-project/lotus/chain/types" +) + +type message10 struct{ from address.Address } + +func (m message10) Create(to address.Address, initialAmount abi.TokenAmount) (*types.Message, error) { + + actorCodeID, ok := actors.GetActorCodeID(actorstypes.Version10, "paymentchannel") + if !ok { + return nil, xerrors.Errorf("error getting actor paymentchannel code id for actor version %d", 10) + } + + params, aerr := actors.SerializeParams(&paych10.ConstructorParams{From: m.from, To: to}) + if aerr != nil { + return nil, aerr + } + enc, aerr := actors.SerializeParams(&init10.ExecParams{ + CodeCID: actorCodeID, + ConstructorParams: params, + }) + if aerr != nil { + return nil, aerr + } + + return &types.Message{ + To: init_.Address, + From: m.from, + Value: initialAmount, + Method: builtin10.MethodsInit.Exec, + Params: enc, + }, nil +} + +func (m message10) Update(paych address.Address, sv *paychtypes.SignedVoucher, secret []byte) (*types.Message, error) { + params, aerr := actors.SerializeParams(&paych10.UpdateChannelStateParams{ + + Sv: toV10SignedVoucher(*sv), + + Secret: secret, + }) + if aerr != nil { + return nil, aerr + } + + return &types.Message{ + To: paych, + From: m.from, + Value: abi.NewTokenAmount(0), + Method: builtin10.MethodsPaych.UpdateChannelState, + Params: params, + }, nil +} + +func toV10SignedVoucher(sv paychtypes.SignedVoucher) paych10.SignedVoucher { + merges := make([]paych10.Merge, len(sv.Merges)) + for i := range sv.Merges { + merges[i] = paych10.Merge{ + Lane: sv.Merges[i].Lane, + Nonce: sv.Merges[i].Nonce, + } + } + + return paych10.SignedVoucher{ + ChannelAddr: sv.ChannelAddr, + TimeLockMin: sv.TimeLockMin, + TimeLockMax: sv.TimeLockMax, + SecretHash: sv.SecretHash, + Extra: (*paych10.ModVerifyParams)(sv.Extra), + Lane: sv.Lane, + Nonce: sv.Nonce, + Amount: sv.Amount, + MinSettleHeight: sv.MinSettleHeight, + Merges: merges, + Signature: sv.Signature, + } +} + +func (m message10) Settle(paych address.Address) (*types.Message, error) { + return &types.Message{ + To: paych, + From: m.from, + Value: abi.NewTokenAmount(0), + Method: builtin10.MethodsPaych.Settle, + }, nil +} + +func (m message10) Collect(paych address.Address) (*types.Message, error) { + return &types.Message{ + To: paych, + From: m.from, + Value: abi.NewTokenAmount(0), + Method: builtin10.MethodsPaych.Collect, + }, nil +} diff --git a/chain/actors/builtin/paych/paych.go b/chain/actors/builtin/paych/paych.go index 2e93ceb3f..537ae8d92 100644 --- a/chain/actors/builtin/paych/paych.go +++ b/chain/actors/builtin/paych/paych.go @@ -43,6 +43,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actorstypes.Version9: return load9(store, act.Head) + case actorstypes.Version10: + return load10(store, act.Head) + } } @@ -154,6 +157,9 @@ func Message(version actorstypes.Version, from address.Address) MessageBuilder { case actorstypes.Version9: return message9{from} + case actorstypes.Version10: + return message10{from} + default: panic(fmt.Sprintf("unsupported actors version: %d", version)) } @@ -193,5 +199,6 @@ func AllCodes() []cid.Cid { (&state7{}).Code(), (&state8{}).Code(), (&state9{}).Code(), + (&state10{}).Code(), } } diff --git a/chain/actors/builtin/paych/v10.go b/chain/actors/builtin/paych/v10.go new file mode 100644 index 000000000..0527c36d1 --- /dev/null +++ b/chain/actors/builtin/paych/v10.go @@ -0,0 +1,134 @@ +package paych + +import ( + "fmt" + + "github.com/ipfs/go-cid" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/big" + paych10 "github.com/filecoin-project/go-state-types/builtin/v10/paych" + adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" + + "github.com/filecoin-project/lotus/chain/actors" + "github.com/filecoin-project/lotus/chain/actors/adt" +) + +var _ State = (*state10)(nil) + +func load10(store adt.Store, root cid.Cid) (State, error) { + out := state10{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make10(store adt.Store) (State, error) { + out := state10{store: store} + out.State = paych10.State{} + return &out, nil +} + +type state10 struct { + paych10.State + store adt.Store + lsAmt *adt10.Array +} + +// Channel owner, who has funded the actor +func (s *state10) From() (address.Address, error) { + return s.State.From, nil +} + +// Recipient of payouts from channel +func (s *state10) To() (address.Address, error) { + return s.State.To, nil +} + +// Height at which the channel can be `Collected` +func (s *state10) SettlingAt() (abi.ChainEpoch, error) { + return s.State.SettlingAt, nil +} + +// Amount successfully redeemed through the payment channel, paid out on `Collect()` +func (s *state10) ToSend() (abi.TokenAmount, error) { + return s.State.ToSend, nil +} + +func (s *state10) getOrLoadLsAmt() (*adt10.Array, error) { + if s.lsAmt != nil { + return s.lsAmt, nil + } + + // Get the lane state from the chain + lsamt, err := adt10.AsArray(s.store, s.State.LaneStates, paych10.LaneStatesAmtBitwidth) + if err != nil { + return nil, err + } + + s.lsAmt = lsamt + return lsamt, nil +} + +// Get total number of lanes +func (s *state10) LaneCount() (uint64, error) { + lsamt, err := s.getOrLoadLsAmt() + if err != nil { + return 0, err + } + return lsamt.Length(), nil +} + +func (s *state10) GetState() interface{} { + return &s.State +} + +// Iterate lane states +func (s *state10) ForEachLaneState(cb func(idx uint64, dl LaneState) error) error { + // Get the lane state from the chain + lsamt, err := s.getOrLoadLsAmt() + if err != nil { + return err + } + + // Note: we use a map instead of an array to store laneStates because the + // client sets the lane ID (the index) and potentially they could use a + // very large index. + var ls paych10.LaneState + return lsamt.ForEach(&ls, func(i int64) error { + return cb(uint64(i), &laneState10{ls}) + }) +} + +type laneState10 struct { + paych10.LaneState +} + +func (ls *laneState10) Redeemed() (big.Int, error) { + return ls.LaneState.Redeemed, nil +} + +func (ls *laneState10) Nonce() (uint64, error) { + return ls.LaneState.Nonce, nil +} + +func (s *state10) ActorKey() string { + return actors.PaychKey +} + +func (s *state10) ActorVersion() actorstypes.Version { + return actorstypes.Version10 +} + +func (s *state10) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/power/power.go b/chain/actors/builtin/power/power.go index 050335d6e..893a25cd7 100644 --- a/chain/actors/builtin/power/power.go +++ b/chain/actors/builtin/power/power.go @@ -9,7 +9,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" - builtin9 "github.com/filecoin-project/go-state-types/builtin" + builtin10 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/go-state-types/cbor" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" @@ -26,8 +26,8 @@ import ( ) var ( - Address = builtin9.StoragePowerActorAddr - Methods = builtin9.MethodsPower + Address = builtin10.StoragePowerActorAddr + Methods = builtin10.MethodsPower ) func Load(store adt.Store, act *types.Actor) (State, error) { @@ -44,6 +44,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actorstypes.Version9: return load9(store, act.Head) + case actorstypes.Version10: + return load10(store, act.Head) + } } @@ -105,6 +108,9 @@ func MakeState(store adt.Store, av actorstypes.Version) (State, error) { case actorstypes.Version9: return make9(store) + case actorstypes.Version10: + return make10(store) + } return nil, xerrors.Errorf("unknown actor version %d", av) } @@ -168,5 +174,6 @@ func AllCodes() []cid.Cid { (&state7{}).Code(), (&state8{}).Code(), (&state9{}).Code(), + (&state10{}).Code(), } } diff --git a/chain/actors/builtin/power/v10.go b/chain/actors/builtin/power/v10.go new file mode 100644 index 000000000..7359ca947 --- /dev/null +++ b/chain/actors/builtin/power/v10.go @@ -0,0 +1,206 @@ +package power + +import ( + "bytes" + "fmt" + + "github.com/ipfs/go-cid" + cbg "github.com/whyrusleeping/cbor-gen" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + actorstypes "github.com/filecoin-project/go-state-types/actors" + builtin10 "github.com/filecoin-project/go-state-types/builtin" + power10 "github.com/filecoin-project/go-state-types/builtin/v10/power" + adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" + + "github.com/filecoin-project/lotus/chain/actors" + "github.com/filecoin-project/lotus/chain/actors/adt" + "github.com/filecoin-project/lotus/chain/actors/builtin" +) + +var _ State = (*state10)(nil) + +func load10(store adt.Store, root cid.Cid) (State, error) { + out := state10{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make10(store adt.Store) (State, error) { + out := state10{store: store} + + s, err := power10.ConstructState(store) + if err != nil { + return nil, err + } + + out.State = *s + + return &out, nil +} + +type state10 struct { + power10.State + store adt.Store +} + +func (s *state10) TotalLocked() (abi.TokenAmount, error) { + return s.TotalPledgeCollateral, nil +} + +func (s *state10) TotalPower() (Claim, error) { + return Claim{ + RawBytePower: s.TotalRawBytePower, + QualityAdjPower: s.TotalQualityAdjPower, + }, nil +} + +// Committed power to the network. Includes miners below the minimum threshold. +func (s *state10) TotalCommitted() (Claim, error) { + return Claim{ + RawBytePower: s.TotalBytesCommitted, + QualityAdjPower: s.TotalQABytesCommitted, + }, nil +} + +func (s *state10) MinerPower(addr address.Address) (Claim, bool, error) { + claims, err := s.claims() + if err != nil { + return Claim{}, false, err + } + var claim power10.Claim + ok, err := claims.Get(abi.AddrKey(addr), &claim) + if err != nil { + return Claim{}, false, err + } + return Claim{ + RawBytePower: claim.RawBytePower, + QualityAdjPower: claim.QualityAdjPower, + }, ok, nil +} + +func (s *state10) MinerNominalPowerMeetsConsensusMinimum(a address.Address) (bool, error) { + return s.State.MinerNominalPowerMeetsConsensusMinimum(s.store, a) +} + +func (s *state10) TotalPowerSmoothed() (builtin.FilterEstimate, error) { + return builtin.FilterEstimate(s.State.ThisEpochQAPowerSmoothed), nil +} + +func (s *state10) MinerCounts() (uint64, uint64, error) { + return uint64(s.State.MinerAboveMinPowerCount), uint64(s.State.MinerCount), nil +} + +func (s *state10) ListAllMiners() ([]address.Address, error) { + claims, err := s.claims() + if err != nil { + return nil, err + } + + var miners []address.Address + err = claims.ForEach(nil, func(k string) error { + a, err := address.NewFromBytes([]byte(k)) + if err != nil { + return err + } + miners = append(miners, a) + return nil + }) + if err != nil { + return nil, err + } + + return miners, nil +} + +func (s *state10) ForEachClaim(cb func(miner address.Address, claim Claim) error) error { + claims, err := s.claims() + if err != nil { + return err + } + + var claim power10.Claim + return claims.ForEach(&claim, func(k string) error { + a, err := address.NewFromBytes([]byte(k)) + if err != nil { + return err + } + return cb(a, Claim{ + RawBytePower: claim.RawBytePower, + QualityAdjPower: claim.QualityAdjPower, + }) + }) +} + +func (s *state10) ClaimsChanged(other State) (bool, error) { + other10, ok := other.(*state10) + if !ok { + // treat an upgrade as a change, always + return true, nil + } + return !s.State.Claims.Equals(other10.State.Claims), nil +} + +func (s *state10) SetTotalQualityAdjPower(p abi.StoragePower) error { + s.State.TotalQualityAdjPower = p + return nil +} + +func (s *state10) SetTotalRawBytePower(p abi.StoragePower) error { + s.State.TotalRawBytePower = p + return nil +} + +func (s *state10) SetThisEpochQualityAdjPower(p abi.StoragePower) error { + s.State.ThisEpochQualityAdjPower = p + return nil +} + +func (s *state10) SetThisEpochRawBytePower(p abi.StoragePower) error { + s.State.ThisEpochRawBytePower = p + return nil +} + +func (s *state10) GetState() interface{} { + return &s.State +} + +func (s *state10) claims() (adt.Map, error) { + return adt10.AsMap(s.store, s.Claims, builtin10.DefaultHamtBitwidth) +} + +func (s *state10) decodeClaim(val *cbg.Deferred) (Claim, error) { + var ci power10.Claim + if err := ci.UnmarshalCBOR(bytes.NewReader(val.Raw)); err != nil { + return Claim{}, err + } + return fromV10Claim(ci), nil +} + +func fromV10Claim(v10 power10.Claim) Claim { + return Claim{ + RawBytePower: v10.RawBytePower, + QualityAdjPower: v10.QualityAdjPower, + } +} + +func (s *state10) ActorKey() string { + return actors.PowerKey +} + +func (s *state10) ActorVersion() actorstypes.Version { + return actorstypes.Version10 +} + +func (s *state10) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/registry.go b/chain/actors/builtin/registry.go index 622bf4185..73c9c117f 100644 --- a/chain/actors/builtin/registry.go +++ b/chain/actors/builtin/registry.go @@ -9,6 +9,18 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/builtin" + account10 "github.com/filecoin-project/go-state-types/builtin/v10/account" + cron10 "github.com/filecoin-project/go-state-types/builtin/v10/cron" + datacap10 "github.com/filecoin-project/go-state-types/builtin/v10/datacap" + _init10 "github.com/filecoin-project/go-state-types/builtin/v10/init" + market10 "github.com/filecoin-project/go-state-types/builtin/v10/market" + miner10 "github.com/filecoin-project/go-state-types/builtin/v10/miner" + multisig10 "github.com/filecoin-project/go-state-types/builtin/v10/multisig" + paych10 "github.com/filecoin-project/go-state-types/builtin/v10/paych" + power10 "github.com/filecoin-project/go-state-types/builtin/v10/power" + reward10 "github.com/filecoin-project/go-state-types/builtin/v10/reward" + system10 "github.com/filecoin-project/go-state-types/builtin/v10/system" + verifreg10 "github.com/filecoin-project/go-state-types/builtin/v10/verifreg" account8 "github.com/filecoin-project/go-state-types/builtin/v8/account" cron8 "github.com/filecoin-project/go-state-types/builtin/v8/cron" _init8 "github.com/filecoin-project/go-state-types/builtin/v8/init" @@ -254,6 +266,84 @@ func MakeRegistry(av actorstypes.Version) []RegistryEntry { } } + case actorstypes.Version10: + for key, codeID := range codeIDs { + switch key { + case actors.AccountKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: account10.Methods, + state: new(account10.State), + }) + case actors.CronKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: cron10.Methods, + state: new(cron10.State), + }) + case actors.InitKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: _init10.Methods, + state: new(_init10.State), + }) + case actors.MarketKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: market10.Methods, + state: new(market10.State), + }) + case actors.MinerKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: miner10.Methods, + state: new(miner10.State), + }) + case actors.MultisigKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: multisig10.Methods, + state: new(multisig10.State), + }) + case actors.PaychKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: paych10.Methods, + state: new(paych10.State), + }) + case actors.PowerKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: power10.Methods, + state: new(power10.State), + }) + case actors.RewardKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: reward10.Methods, + state: new(reward10.State), + }) + case actors.SystemKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: system10.Methods, + state: new(system10.State), + }) + case actors.VerifregKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: verifreg10.Methods, + state: new(verifreg10.State), + }) + case actors.DatacapKey: + registry = append(registry, RegistryEntry{ + code: codeID, + methods: datacap10.Methods, + state: new(datacap10.State), + }) + } + } + default: panic("expected version v8 and up only, use specs-actors for v0-7") } diff --git a/chain/actors/builtin/reward/reward.go b/chain/actors/builtin/reward/reward.go index f91779aa4..0efbdaf79 100644 --- a/chain/actors/builtin/reward/reward.go +++ b/chain/actors/builtin/reward/reward.go @@ -6,7 +6,7 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" - builtin9 "github.com/filecoin-project/go-state-types/builtin" + builtin10 "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/go-state-types/cbor" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" reward0 "github.com/filecoin-project/specs-actors/actors/builtin/reward" @@ -24,8 +24,8 @@ import ( ) var ( - Address = builtin9.RewardActorAddr - Methods = builtin9.MethodsReward + Address = builtin10.RewardActorAddr + Methods = builtin10.MethodsReward ) func Load(store adt.Store, act *types.Actor) (State, error) { @@ -42,6 +42,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actorstypes.Version9: return load9(store, act.Head) + case actorstypes.Version10: + return load10(store, act.Head) + } } @@ -103,6 +106,9 @@ func MakeState(store adt.Store, av actorstypes.Version, currRealizedPower abi.St case actorstypes.Version9: return make9(store, currRealizedPower) + case actorstypes.Version10: + return make10(store, currRealizedPower) + } return nil, xerrors.Errorf("unknown actor version %d", av) } @@ -144,5 +150,6 @@ func AllCodes() []cid.Cid { (&state7{}).Code(), (&state8{}).Code(), (&state9{}).Code(), + (&state10{}).Code(), } } diff --git a/chain/actors/builtin/reward/v10.go b/chain/actors/builtin/reward/v10.go new file mode 100644 index 000000000..75c23e1a6 --- /dev/null +++ b/chain/actors/builtin/reward/v10.go @@ -0,0 +1,119 @@ +package reward + +import ( + "fmt" + + "github.com/ipfs/go-cid" + + "github.com/filecoin-project/go-state-types/abi" + actorstypes "github.com/filecoin-project/go-state-types/actors" + miner10 "github.com/filecoin-project/go-state-types/builtin/v10/miner" + reward10 "github.com/filecoin-project/go-state-types/builtin/v10/reward" + smoothing10 "github.com/filecoin-project/go-state-types/builtin/v10/util/smoothing" + + "github.com/filecoin-project/lotus/chain/actors" + "github.com/filecoin-project/lotus/chain/actors/adt" + "github.com/filecoin-project/lotus/chain/actors/builtin" +) + +var _ State = (*state10)(nil) + +func load10(store adt.Store, root cid.Cid) (State, error) { + out := state10{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make10(store adt.Store, currRealizedPower abi.StoragePower) (State, error) { + out := state10{store: store} + out.State = *reward10.ConstructState(currRealizedPower) + return &out, nil +} + +type state10 struct { + reward10.State + store adt.Store +} + +func (s *state10) ThisEpochReward() (abi.TokenAmount, error) { + return s.State.ThisEpochReward, nil +} + +func (s *state10) ThisEpochRewardSmoothed() (builtin.FilterEstimate, error) { + + return builtin.FilterEstimate{ + PositionEstimate: s.State.ThisEpochRewardSmoothed.PositionEstimate, + VelocityEstimate: s.State.ThisEpochRewardSmoothed.VelocityEstimate, + }, nil + +} + +func (s *state10) ThisEpochBaselinePower() (abi.StoragePower, error) { + return s.State.ThisEpochBaselinePower, nil +} + +func (s *state10) TotalStoragePowerReward() (abi.TokenAmount, error) { + return s.State.TotalStoragePowerReward, nil +} + +func (s *state10) EffectiveBaselinePower() (abi.StoragePower, error) { + return s.State.EffectiveBaselinePower, nil +} + +func (s *state10) EffectiveNetworkTime() (abi.ChainEpoch, error) { + return s.State.EffectiveNetworkTime, nil +} + +func (s *state10) CumsumBaseline() (reward10.Spacetime, error) { + return s.State.CumsumBaseline, nil +} + +func (s *state10) CumsumRealized() (reward10.Spacetime, error) { + return s.State.CumsumRealized, nil +} + +func (s *state10) InitialPledgeForPower(qaPower abi.StoragePower, networkTotalPledge abi.TokenAmount, networkQAPower *builtin.FilterEstimate, circSupply abi.TokenAmount) (abi.TokenAmount, error) { + return miner10.InitialPledgeForPower( + qaPower, + s.State.ThisEpochBaselinePower, + s.State.ThisEpochRewardSmoothed, + smoothing10.FilterEstimate{ + PositionEstimate: networkQAPower.PositionEstimate, + VelocityEstimate: networkQAPower.VelocityEstimate, + }, + circSupply, + ), nil +} + +func (s *state10) PreCommitDepositForPower(networkQAPower builtin.FilterEstimate, sectorWeight abi.StoragePower) (abi.TokenAmount, error) { + return miner10.PreCommitDepositForPower(s.State.ThisEpochRewardSmoothed, + smoothing10.FilterEstimate{ + PositionEstimate: networkQAPower.PositionEstimate, + VelocityEstimate: networkQAPower.VelocityEstimate, + }, + sectorWeight), nil +} + +func (s *state10) GetState() interface{} { + return &s.State +} + +func (s *state10) ActorKey() string { + return actors.RewardKey +} + +func (s *state10) ActorVersion() actorstypes.Version { + return actorstypes.Version10 +} + +func (s *state10) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/system/system.go b/chain/actors/builtin/system/system.go index a6daa6ce7..747563cc0 100644 --- a/chain/actors/builtin/system/system.go +++ b/chain/actors/builtin/system/system.go @@ -5,7 +5,7 @@ import ( "golang.org/x/xerrors" actorstypes "github.com/filecoin-project/go-state-types/actors" - builtin9 "github.com/filecoin-project/go-state-types/builtin" + builtin10 "github.com/filecoin-project/go-state-types/builtin" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin" builtin3 "github.com/filecoin-project/specs-actors/v3/actors/builtin" @@ -20,7 +20,7 @@ import ( ) var ( - Address = builtin9.SystemActorAddr + Address = builtin10.SystemActorAddr ) func Load(store adt.Store, act *types.Actor) (State, error) { @@ -37,6 +37,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actorstypes.Version9: return load9(store, act.Head) + case actorstypes.Version10: + return load10(store, act.Head) + } } @@ -98,6 +101,9 @@ func MakeState(store adt.Store, av actorstypes.Version, builtinActors cid.Cid) ( case actorstypes.Version9: return make9(store, builtinActors) + case actorstypes.Version10: + return make10(store, builtinActors) + } return nil, xerrors.Errorf("unknown actor version %d", av) } @@ -123,5 +129,6 @@ func AllCodes() []cid.Cid { (&state7{}).Code(), (&state8{}).Code(), (&state9{}).Code(), + (&state10{}).Code(), } } diff --git a/chain/actors/builtin/system/v10.go b/chain/actors/builtin/system/v10.go new file mode 100644 index 000000000..e6d6fbe96 --- /dev/null +++ b/chain/actors/builtin/system/v10.go @@ -0,0 +1,71 @@ +package system + +import ( + "fmt" + + "github.com/ipfs/go-cid" + + actorstypes "github.com/filecoin-project/go-state-types/actors" + system10 "github.com/filecoin-project/go-state-types/builtin/v10/system" + + "github.com/filecoin-project/lotus/chain/actors" + "github.com/filecoin-project/lotus/chain/actors/adt" +) + +var _ State = (*state10)(nil) + +func load10(store adt.Store, root cid.Cid) (State, error) { + out := state10{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make10(store adt.Store, builtinActors cid.Cid) (State, error) { + out := state10{store: store} + out.State = system10.State{ + BuiltinActors: builtinActors, + } + return &out, nil +} + +type state10 struct { + system10.State + store adt.Store +} + +func (s *state10) GetState() interface{} { + return &s.State +} + +func (s *state10) GetBuiltinActors() cid.Cid { + + return s.State.BuiltinActors + +} + +func (s *state10) SetBuiltinActors(c cid.Cid) error { + + s.State.BuiltinActors = c + return nil + +} + +func (s *state10) ActorKey() string { + return actors.SystemKey +} + +func (s *state10) ActorVersion() actorstypes.Version { + return actorstypes.Version10 +} + +func (s *state10) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/verifreg/actor.go.template b/chain/actors/builtin/verifreg/actor.go.template index fe8eb1849..97d1417f7 100644 --- a/chain/actors/builtin/verifreg/actor.go.template +++ b/chain/actors/builtin/verifreg/actor.go.template @@ -78,10 +78,10 @@ type State interface { RemoveDataCapProposalID(verifier address.Address, client address.Address) (bool, uint64, error) ForEachVerifier(func(addr address.Address, dcap abi.StoragePower) error) error ForEachClient(func(addr address.Address, dcap abi.StoragePower) error) error - GetAllocation(clientIdAddr address.Address, allocationId verifregtypes.AllocationId) (*verifregtypes.Allocation, bool, error) - GetAllocations(clientIdAddr address.Address) (map[verifregtypes.AllocationId]verifregtypes.Allocation, error) - GetClaim(providerIdAddr address.Address, claimId verifregtypes.ClaimId) (*verifregtypes.Claim, bool, error) - GetClaims(providerIdAddr address.Address) (map[verifregtypes.ClaimId]verifregtypes.Claim, error) + GetAllocation(clientIdAddr address.Address, allocationId AllocationId) (*Allocation, bool, error) + GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) + GetClaim(providerIdAddr address.Address, claimId ClaimId) (*Claim, bool, error) + GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) GetState() interface{} } @@ -91,3 +91,8 @@ func AllCodes() []cid.Cid { {{- end}} } } + +type Allocation = verifregtypes.Allocation +type AllocationId = verifregtypes.AllocationId +type Claim = verifregtypes.Claim +type ClaimId = verifregtypes.ClaimId \ No newline at end of file diff --git a/chain/actors/builtin/verifreg/state.go.template b/chain/actors/builtin/verifreg/state.go.template index 70aaf3b6e..960b2b604 100644 --- a/chain/actors/builtin/verifreg/state.go.template +++ b/chain/actors/builtin/verifreg/state.go.template @@ -24,6 +24,9 @@ import ( {{end}} {{if (ge .v 9)}} "github.com/filecoin-project/go-state-types/big" +{{if (gt .v 9)}} + verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" +{{end}} {{else}} verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" {{end}} @@ -118,35 +121,51 @@ func (s *state{{.v}}) GetState() interface{} { return &s.State } -func (s *state{{.v}}) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) { +func (s *state{{.v}}) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { {{if (le .v 8)}} return nil, false, xerrors.Errorf("unsupported in actors v{{.v}}") {{else}} - return s.FindAllocation(s.store, clientIdAddr, allocationId) -{{end}} + alloc, ok, err := s.FindAllocation(s.store, clientIdAddr, verifreg{{.v}}.AllocationId(allocationId)) + return (*Allocation)(alloc), ok, err{{end}} } -func (s *state{{.v}}) GetAllocations(clientIdAddr address.Address) (map[verifreg9.AllocationId]verifreg9.Allocation, error) { +func (s *state{{.v}}) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { {{if (le .v 8)}} return nil, xerrors.Errorf("unsupported in actors v{{.v}}") {{else}} - return s.LoadAllocationsToMap(s.store, clientIdAddr) + v{{.v}}Map, err := s.LoadAllocationsToMap(s.store, clientIdAddr) + + retMap := make(map[AllocationId]Allocation, len(v{{.v}}Map)) + for k, v := range v{{.v}}Map { + retMap[AllocationId(k)] = Allocation(v) + } + + return retMap, err {{end}} } -func (s *state{{.v}}) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*verifreg9.Claim, bool, error) { +func (s *state{{.v}}) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { {{if (le .v 8)}} return nil, false, xerrors.Errorf("unsupported in actors v{{.v}}") {{else}} - return s.FindClaim(s.store, providerIdAddr, claimId) + claim, ok, err := s.FindClaim(s.store, providerIdAddr, verifreg{{.v}}.ClaimId(claimId)) + return (*Claim)(claim), ok, err {{end}} } -func (s *state{{.v}}) GetClaims(providerIdAddr address.Address) (map[verifreg9.ClaimId]verifreg9.Claim, error) { +func (s *state{{.v}}) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { {{if (le .v 8)}} return nil, xerrors.Errorf("unsupported in actors v{{.v}}") {{else}} - return s.LoadClaimsToMap(s.store, providerIdAddr) + v{{.v}}Map, err := s.LoadClaimsToMap(s.store, providerIdAddr) + + retMap := make(map[ClaimId]Claim, len(v{{.v}}Map)) + for k, v := range v{{.v}}Map { + retMap[ClaimId(k)] = Claim(v) + } + + return retMap, err + {{end}} } diff --git a/chain/actors/builtin/verifreg/v0.go b/chain/actors/builtin/verifreg/v0.go index d8d81b4d3..4917667ea 100644 --- a/chain/actors/builtin/verifreg/v0.go +++ b/chain/actors/builtin/verifreg/v0.go @@ -93,25 +93,25 @@ func (s *state0) GetState() interface{} { return &s.State } -func (s *state0) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) { +func (s *state0) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v0") } -func (s *state0) GetAllocations(clientIdAddr address.Address) (map[verifreg9.AllocationId]verifreg9.Allocation, error) { +func (s *state0) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { return nil, xerrors.Errorf("unsupported in actors v0") } -func (s *state0) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*verifreg9.Claim, bool, error) { +func (s *state0) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v0") } -func (s *state0) GetClaims(providerIdAddr address.Address) (map[verifreg9.ClaimId]verifreg9.Claim, error) { +func (s *state0) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { return nil, xerrors.Errorf("unsupported in actors v0") diff --git a/chain/actors/builtin/verifreg/v10.go b/chain/actors/builtin/verifreg/v10.go new file mode 100644 index 000000000..a510d1970 --- /dev/null +++ b/chain/actors/builtin/verifreg/v10.go @@ -0,0 +1,151 @@ +package verifreg + +import ( + "fmt" + + "github.com/ipfs/go-cid" + "golang.org/x/xerrors" + + "github.com/filecoin-project/go-address" + "github.com/filecoin-project/go-state-types/abi" + actorstypes "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/big" + builtin10 "github.com/filecoin-project/go-state-types/builtin" + adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt" + verifreg10 "github.com/filecoin-project/go-state-types/builtin/v10/verifreg" + verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" + + "github.com/filecoin-project/lotus/chain/actors" + "github.com/filecoin-project/lotus/chain/actors/adt" +) + +var _ State = (*state10)(nil) + +func load10(store adt.Store, root cid.Cid) (State, error) { + out := state10{store: store} + err := store.Get(store.Context(), root, &out) + if err != nil { + return nil, err + } + return &out, nil +} + +func make10(store adt.Store, rootKeyAddress address.Address) (State, error) { + out := state10{store: store} + + s, err := verifreg10.ConstructState(store, rootKeyAddress) + if err != nil { + return nil, err + } + + out.State = *s + + return &out, nil +} + +type state10 struct { + verifreg10.State + store adt.Store +} + +func (s *state10) RootKey() (address.Address, error) { + return s.State.RootKey, nil +} + +func (s *state10) VerifiedClientDataCap(addr address.Address) (bool, abi.StoragePower, error) { + + return false, big.Zero(), xerrors.Errorf("unsupported in actors v10") + +} + +func (s *state10) VerifierDataCap(addr address.Address) (bool, abi.StoragePower, error) { + return getDataCap(s.store, actors.Version10, s.verifiers, addr) +} + +func (s *state10) RemoveDataCapProposalID(verifier address.Address, client address.Address) (bool, uint64, error) { + return getRemoveDataCapProposalID(s.store, actors.Version10, s.removeDataCapProposalIDs, verifier, client) +} + +func (s *state10) ForEachVerifier(cb func(addr address.Address, dcap abi.StoragePower) error) error { + return forEachCap(s.store, actors.Version10, s.verifiers, cb) +} + +func (s *state10) ForEachClient(cb func(addr address.Address, dcap abi.StoragePower) error) error { + + return xerrors.Errorf("unsupported in actors v10") + +} + +func (s *state10) verifiedClients() (adt.Map, error) { + + return nil, xerrors.Errorf("unsupported in actors v10") + +} + +func (s *state10) verifiers() (adt.Map, error) { + return adt10.AsMap(s.store, s.Verifiers, builtin10.DefaultHamtBitwidth) +} + +func (s *state10) removeDataCapProposalIDs() (adt.Map, error) { + return adt10.AsMap(s.store, s.RemoveDataCapProposalIDs, builtin10.DefaultHamtBitwidth) +} + +func (s *state10) GetState() interface{} { + return &s.State +} + +func (s *state10) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { + + alloc, ok, err := s.FindAllocation(s.store, clientIdAddr, verifreg10.AllocationId(allocationId)) + return (*Allocation)(alloc), ok, err +} + +func (s *state10) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { + + v10Map, err := s.LoadAllocationsToMap(s.store, clientIdAddr) + + retMap := make(map[AllocationId]Allocation, len(v10Map)) + for k, v := range v10Map { + retMap[AllocationId(k)] = Allocation(v) + } + + return retMap, err + +} + +func (s *state10) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { + + claim, ok, err := s.FindClaim(s.store, providerIdAddr, verifreg10.ClaimId(claimId)) + return (*Claim)(claim), ok, err + +} + +func (s *state10) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { + + v10Map, err := s.LoadClaimsToMap(s.store, providerIdAddr) + + retMap := make(map[ClaimId]Claim, len(v10Map)) + for k, v := range v10Map { + retMap[ClaimId(k)] = Claim(v) + } + + return retMap, err + +} + +func (s *state10) ActorKey() string { + return actors.VerifregKey +} + +func (s *state10) ActorVersion() actorstypes.Version { + return actorstypes.Version10 +} + +func (s *state10) Code() cid.Cid { + code, ok := actors.GetActorCodeID(s.ActorVersion(), s.ActorKey()) + if !ok { + panic(fmt.Errorf("didn't find actor %v code id for actor version %d", s.ActorKey(), s.ActorVersion())) + } + + return code +} diff --git a/chain/actors/builtin/verifreg/v2.go b/chain/actors/builtin/verifreg/v2.go index c12e3a505..28061c2d1 100644 --- a/chain/actors/builtin/verifreg/v2.go +++ b/chain/actors/builtin/verifreg/v2.go @@ -93,25 +93,25 @@ func (s *state2) GetState() interface{} { return &s.State } -func (s *state2) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) { +func (s *state2) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v2") } -func (s *state2) GetAllocations(clientIdAddr address.Address) (map[verifreg9.AllocationId]verifreg9.Allocation, error) { +func (s *state2) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { return nil, xerrors.Errorf("unsupported in actors v2") } -func (s *state2) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*verifreg9.Claim, bool, error) { +func (s *state2) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v2") } -func (s *state2) GetClaims(providerIdAddr address.Address) (map[verifreg9.ClaimId]verifreg9.Claim, error) { +func (s *state2) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { return nil, xerrors.Errorf("unsupported in actors v2") diff --git a/chain/actors/builtin/verifreg/v3.go b/chain/actors/builtin/verifreg/v3.go index 3ac18aa6d..4096059a6 100644 --- a/chain/actors/builtin/verifreg/v3.go +++ b/chain/actors/builtin/verifreg/v3.go @@ -94,25 +94,25 @@ func (s *state3) GetState() interface{} { return &s.State } -func (s *state3) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) { +func (s *state3) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v3") } -func (s *state3) GetAllocations(clientIdAddr address.Address) (map[verifreg9.AllocationId]verifreg9.Allocation, error) { +func (s *state3) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { return nil, xerrors.Errorf("unsupported in actors v3") } -func (s *state3) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*verifreg9.Claim, bool, error) { +func (s *state3) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v3") } -func (s *state3) GetClaims(providerIdAddr address.Address) (map[verifreg9.ClaimId]verifreg9.Claim, error) { +func (s *state3) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { return nil, xerrors.Errorf("unsupported in actors v3") diff --git a/chain/actors/builtin/verifreg/v4.go b/chain/actors/builtin/verifreg/v4.go index c99e84478..457704504 100644 --- a/chain/actors/builtin/verifreg/v4.go +++ b/chain/actors/builtin/verifreg/v4.go @@ -94,25 +94,25 @@ func (s *state4) GetState() interface{} { return &s.State } -func (s *state4) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) { +func (s *state4) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v4") } -func (s *state4) GetAllocations(clientIdAddr address.Address) (map[verifreg9.AllocationId]verifreg9.Allocation, error) { +func (s *state4) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { return nil, xerrors.Errorf("unsupported in actors v4") } -func (s *state4) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*verifreg9.Claim, bool, error) { +func (s *state4) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v4") } -func (s *state4) GetClaims(providerIdAddr address.Address) (map[verifreg9.ClaimId]verifreg9.Claim, error) { +func (s *state4) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { return nil, xerrors.Errorf("unsupported in actors v4") diff --git a/chain/actors/builtin/verifreg/v5.go b/chain/actors/builtin/verifreg/v5.go index 45e416693..b1e6db424 100644 --- a/chain/actors/builtin/verifreg/v5.go +++ b/chain/actors/builtin/verifreg/v5.go @@ -94,25 +94,25 @@ func (s *state5) GetState() interface{} { return &s.State } -func (s *state5) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) { +func (s *state5) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v5") } -func (s *state5) GetAllocations(clientIdAddr address.Address) (map[verifreg9.AllocationId]verifreg9.Allocation, error) { +func (s *state5) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { return nil, xerrors.Errorf("unsupported in actors v5") } -func (s *state5) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*verifreg9.Claim, bool, error) { +func (s *state5) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v5") } -func (s *state5) GetClaims(providerIdAddr address.Address) (map[verifreg9.ClaimId]verifreg9.Claim, error) { +func (s *state5) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { return nil, xerrors.Errorf("unsupported in actors v5") diff --git a/chain/actors/builtin/verifreg/v6.go b/chain/actors/builtin/verifreg/v6.go index d181366dc..d66ae105c 100644 --- a/chain/actors/builtin/verifreg/v6.go +++ b/chain/actors/builtin/verifreg/v6.go @@ -94,25 +94,25 @@ func (s *state6) GetState() interface{} { return &s.State } -func (s *state6) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) { +func (s *state6) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v6") } -func (s *state6) GetAllocations(clientIdAddr address.Address) (map[verifreg9.AllocationId]verifreg9.Allocation, error) { +func (s *state6) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { return nil, xerrors.Errorf("unsupported in actors v6") } -func (s *state6) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*verifreg9.Claim, bool, error) { +func (s *state6) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v6") } -func (s *state6) GetClaims(providerIdAddr address.Address) (map[verifreg9.ClaimId]verifreg9.Claim, error) { +func (s *state6) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { return nil, xerrors.Errorf("unsupported in actors v6") diff --git a/chain/actors/builtin/verifreg/v7.go b/chain/actors/builtin/verifreg/v7.go index 0f9a4301c..72235e268 100644 --- a/chain/actors/builtin/verifreg/v7.go +++ b/chain/actors/builtin/verifreg/v7.go @@ -93,25 +93,25 @@ func (s *state7) GetState() interface{} { return &s.State } -func (s *state7) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) { +func (s *state7) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v7") } -func (s *state7) GetAllocations(clientIdAddr address.Address) (map[verifreg9.AllocationId]verifreg9.Allocation, error) { +func (s *state7) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { return nil, xerrors.Errorf("unsupported in actors v7") } -func (s *state7) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*verifreg9.Claim, bool, error) { +func (s *state7) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v7") } -func (s *state7) GetClaims(providerIdAddr address.Address) (map[verifreg9.ClaimId]verifreg9.Claim, error) { +func (s *state7) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { return nil, xerrors.Errorf("unsupported in actors v7") diff --git a/chain/actors/builtin/verifreg/v8.go b/chain/actors/builtin/verifreg/v8.go index 8bd524635..b39895bd9 100644 --- a/chain/actors/builtin/verifreg/v8.go +++ b/chain/actors/builtin/verifreg/v8.go @@ -93,25 +93,25 @@ func (s *state8) GetState() interface{} { return &s.State } -func (s *state8) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) { +func (s *state8) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v8") } -func (s *state8) GetAllocations(clientIdAddr address.Address) (map[verifreg9.AllocationId]verifreg9.Allocation, error) { +func (s *state8) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { return nil, xerrors.Errorf("unsupported in actors v8") } -func (s *state8) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*verifreg9.Claim, bool, error) { +func (s *state8) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { return nil, false, xerrors.Errorf("unsupported in actors v8") } -func (s *state8) GetClaims(providerIdAddr address.Address) (map[verifreg9.ClaimId]verifreg9.Claim, error) { +func (s *state8) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { return nil, xerrors.Errorf("unsupported in actors v8") diff --git a/chain/actors/builtin/verifreg/v9.go b/chain/actors/builtin/verifreg/v9.go index 22768b22d..2348007e6 100644 --- a/chain/actors/builtin/verifreg/v9.go +++ b/chain/actors/builtin/verifreg/v9.go @@ -93,27 +93,42 @@ func (s *state9) GetState() interface{} { return &s.State } -func (s *state9) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) { +func (s *state9) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*Allocation, bool, error) { - return s.FindAllocation(s.store, clientIdAddr, allocationId) + alloc, ok, err := s.FindAllocation(s.store, clientIdAddr, verifreg9.AllocationId(allocationId)) + return (*Allocation)(alloc), ok, err +} + +func (s *state9) GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) { + + v9Map, err := s.LoadAllocationsToMap(s.store, clientIdAddr) + + retMap := make(map[AllocationId]Allocation, len(v9Map)) + for k, v := range v9Map { + retMap[AllocationId(k)] = Allocation(v) + } + + return retMap, err } -func (s *state9) GetAllocations(clientIdAddr address.Address) (map[verifreg9.AllocationId]verifreg9.Allocation, error) { +func (s *state9) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*Claim, bool, error) { - return s.LoadAllocationsToMap(s.store, clientIdAddr) + claim, ok, err := s.FindClaim(s.store, providerIdAddr, verifreg9.ClaimId(claimId)) + return (*Claim)(claim), ok, err } -func (s *state9) GetClaim(providerIdAddr address.Address, claimId verifreg9.ClaimId) (*verifreg9.Claim, bool, error) { +func (s *state9) GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) { - return s.FindClaim(s.store, providerIdAddr, claimId) + v9Map, err := s.LoadClaimsToMap(s.store, providerIdAddr) -} + retMap := make(map[ClaimId]Claim, len(v9Map)) + for k, v := range v9Map { + retMap[ClaimId(k)] = Claim(v) + } -func (s *state9) GetClaims(providerIdAddr address.Address) (map[verifreg9.ClaimId]verifreg9.Claim, error) { - - return s.LoadClaimsToMap(s.store, providerIdAddr) + return retMap, err } diff --git a/chain/actors/builtin/verifreg/verifreg.go b/chain/actors/builtin/verifreg/verifreg.go index 37a73842a..82c630c0f 100644 --- a/chain/actors/builtin/verifreg/verifreg.go +++ b/chain/actors/builtin/verifreg/verifreg.go @@ -7,7 +7,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" - builtin9 "github.com/filecoin-project/go-state-types/builtin" + builtin10 "github.com/filecoin-project/go-state-types/builtin" verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" "github.com/filecoin-project/go-state-types/cbor" builtin0 "github.com/filecoin-project/specs-actors/actors/builtin" @@ -24,8 +24,8 @@ import ( ) var ( - Address = builtin9.VerifiedRegistryActorAddr - Methods = builtin9.MethodsVerifiedRegistry + Address = builtin10.VerifiedRegistryActorAddr + Methods = builtin10.MethodsVerifiedRegistry ) func Load(store adt.Store, act *types.Actor) (State, error) { @@ -42,6 +42,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) { case actorstypes.Version9: return load9(store, act.Head) + case actorstypes.Version10: + return load10(store, act.Head) + } } @@ -103,6 +106,9 @@ func MakeState(store adt.Store, av actorstypes.Version, rootKeyAddress address.A case actorstypes.Version9: return make9(store, rootKeyAddress) + case actorstypes.Version10: + return make10(store, rootKeyAddress) + } return nil, xerrors.Errorf("unknown actor version %d", av) } @@ -120,10 +126,10 @@ type State interface { RemoveDataCapProposalID(verifier address.Address, client address.Address) (bool, uint64, error) ForEachVerifier(func(addr address.Address, dcap abi.StoragePower) error) error ForEachClient(func(addr address.Address, dcap abi.StoragePower) error) error - GetAllocation(clientIdAddr address.Address, allocationId verifregtypes.AllocationId) (*verifregtypes.Allocation, bool, error) - GetAllocations(clientIdAddr address.Address) (map[verifregtypes.AllocationId]verifregtypes.Allocation, error) - GetClaim(providerIdAddr address.Address, claimId verifregtypes.ClaimId) (*verifregtypes.Claim, bool, error) - GetClaims(providerIdAddr address.Address) (map[verifregtypes.ClaimId]verifregtypes.Claim, error) + GetAllocation(clientIdAddr address.Address, allocationId AllocationId) (*Allocation, bool, error) + GetAllocations(clientIdAddr address.Address) (map[AllocationId]Allocation, error) + GetClaim(providerIdAddr address.Address, claimId ClaimId) (*Claim, bool, error) + GetClaims(providerIdAddr address.Address) (map[ClaimId]Claim, error) GetState() interface{} } @@ -138,5 +144,11 @@ func AllCodes() []cid.Cid { (&state7{}).Code(), (&state8{}).Code(), (&state9{}).Code(), + (&state10{}).Code(), } } + +type Allocation = verifregtypes.Allocation +type AllocationId = verifregtypes.AllocationId +type Claim = verifregtypes.Claim +type ClaimId = verifregtypes.ClaimId diff --git a/chain/actors/manifest.go b/chain/actors/manifest.go index fdf274748..225c8b990 100644 --- a/chain/actors/manifest.go +++ b/chain/actors/manifest.go @@ -32,6 +32,9 @@ const ( SystemKey = "system" VerifregKey = "verifiedregistry" DatacapKey = "datacap" + EvmKey = "evm" + EamKey = "eam" + EmbryoKey = "embryo" ) func GetBuiltinActorsKeys(av actorstypes.Version) []string { @@ -51,6 +54,9 @@ func GetBuiltinActorsKeys(av actorstypes.Version) []string { if av >= 9 { keys = append(keys, DatacapKey) } + if av >= 10 { + keys = append(keys, EvmKey, EamKey, EmbryoKey) + } return keys } diff --git a/chain/actors/policy/policy.go b/chain/actors/policy/policy.go index eaeb326c7..eff7ba899 100644 --- a/chain/actors/policy/policy.go +++ b/chain/actors/policy/policy.go @@ -6,14 +6,18 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" + builtin10 "github.com/filecoin-project/go-state-types/builtin" builtin8 "github.com/filecoin-project/go-state-types/builtin" builtin9 "github.com/filecoin-project/go-state-types/builtin" + market10 "github.com/filecoin-project/go-state-types/builtin/v10/market" + miner10 "github.com/filecoin-project/go-state-types/builtin/v10/miner" + paych10 "github.com/filecoin-project/go-state-types/builtin/v10/paych" + verifreg10 "github.com/filecoin-project/go-state-types/builtin/v10/verifreg" market8 "github.com/filecoin-project/go-state-types/builtin/v8/market" miner8 "github.com/filecoin-project/go-state-types/builtin/v8/miner" verifreg8 "github.com/filecoin-project/go-state-types/builtin/v8/verifreg" market9 "github.com/filecoin-project/go-state-types/builtin/v9/market" miner9 "github.com/filecoin-project/go-state-types/builtin/v9/miner" - paych9 "github.com/filecoin-project/go-state-types/builtin/v9/paych" verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" "github.com/filecoin-project/go-state-types/network" market0 "github.com/filecoin-project/specs-actors/actors/builtin/market" @@ -47,10 +51,10 @@ import ( ) const ( - ChainFinality = miner9.ChainFinality + ChainFinality = miner10.ChainFinality SealRandomnessLookback = ChainFinality - PaychSettleDelay = paych9.SettleDelay - MaxPreCommitRandomnessLookback = builtin9.EpochsInDay + SealRandomnessLookback + PaychSettleDelay = paych10.SettleDelay + MaxPreCommitRandomnessLookback = builtin10.EpochsInDay + SealRandomnessLookback ) // SetSupportedProofTypes sets supported proof types, across all actor versions. @@ -159,11 +163,13 @@ func SetPreCommitChallengeDelay(delay abi.ChainEpoch) { miner9.PreCommitChallengeDelay = delay + miner10.PreCommitChallengeDelay = delay + } // TODO: this function shouldn't really exist. Instead, the API should expose the precommit delay. func GetPreCommitChallengeDelay() abi.ChainEpoch { - return miner9.PreCommitChallengeDelay + return miner10.PreCommitChallengeDelay } // SetConsensusMinerMinPower sets the minimum power of an individual miner must @@ -205,6 +211,10 @@ func SetConsensusMinerMinPower(p abi.StoragePower) { policy.ConsensusMinerMinPower = p } + for _, policy := range builtin10.PoStProofPolicies { + policy.ConsensusMinerMinPower = p + } + } // SetMinVerifiedDealSize sets the minimum size of a verified deal. This should @@ -229,6 +239,8 @@ func SetMinVerifiedDealSize(size abi.StoragePower) { verifreg9.MinVerifiedDealSize = size + verifreg10.MinVerifiedDealSize = size + } func GetMaxProveCommitDuration(ver actorstypes.Version, t abi.RegisteredSealProof) (abi.ChainEpoch, error) { @@ -270,6 +282,10 @@ func GetMaxProveCommitDuration(ver actorstypes.Version, t abi.RegisteredSealProo return miner9.MaxProveCommitDuration[t], nil + case actorstypes.Version10: + + return miner10.MaxProveCommitDuration[t], nil + default: return 0, xerrors.Errorf("unsupported actors version") } @@ -320,6 +336,11 @@ func SetProviderCollateralSupplyTarget(num, denom big.Int) { Denominator: denom, } + market10.ProviderCollateralSupplyTarget = builtin10.BigFrac{ + Numerator: num, + Denominator: denom, + } + } func DealProviderCollateralBounds( @@ -378,13 +399,18 @@ func DealProviderCollateralBounds( min, max := market9.DealProviderCollateralBounds(size, verified, rawBytePower, qaPower, baselinePower, circulatingFil) return min, max, nil + case actorstypes.Version10: + + min, max := market10.DealProviderCollateralBounds(size, verified, rawBytePower, qaPower, baselinePower, circulatingFil) + return min, max, nil + default: return big.Zero(), big.Zero(), xerrors.Errorf("unsupported actors version") } } func DealDurationBounds(pieceSize abi.PaddedPieceSize) (min, max abi.ChainEpoch) { - return market9.DealDurationBounds(pieceSize) + return market10.DealDurationBounds(pieceSize) } // Sets the challenge window and scales the proving period to match (such that @@ -446,6 +472,13 @@ func SetWPoStChallengeWindow(period abi.ChainEpoch) { // scale it if we're scaling the challenge period. miner9.WPoStDisputeWindow = period * 30 + miner10.WPoStChallengeWindow = period + miner10.WPoStProvingPeriod = period * abi.ChainEpoch(miner10.WPoStPeriodDeadlines) + + // by default, this is 2x finality which is 30 periods. + // scale it if we're scaling the challenge period. + miner10.WPoStDisputeWindow = period * 30 + } func GetWinningPoStSectorSetLookback(nwVer network.Version) abi.ChainEpoch { @@ -458,15 +491,15 @@ func GetWinningPoStSectorSetLookback(nwVer network.Version) abi.ChainEpoch { } func GetMaxSectorExpirationExtension() abi.ChainEpoch { - return miner9.MaxSectorExpirationExtension + return miner10.MaxSectorExpirationExtension } func GetMinSectorExpiration() abi.ChainEpoch { - return miner9.MinSectorExpiration + return miner10.MinSectorExpiration } func GetMaxPoStPartitions(nv network.Version, p abi.RegisteredPoStProof) (int, error) { - sectorsPerPart, err := builtin9.PoStProofWindowPoStPartitionSectors(p) + sectorsPerPart, err := builtin10.PoStProofWindowPoStPartitionSectors(p) if err != nil { return 0, err } @@ -486,7 +519,7 @@ func GetSectorMaxLifetime(proof abi.RegisteredSealProof, nwVer network.Version) return builtin4.SealProofPoliciesV0[proof].SectorMaxLifetime } - return builtin9.SealProofPoliciesV11[proof].SectorMaxLifetime + return builtin10.SealProofPoliciesV11[proof].SectorMaxLifetime } func GetAddressedSectorsMax(nwVer network.Version) (int, error) { @@ -523,6 +556,9 @@ func GetAddressedSectorsMax(nwVer network.Version) (int, error) { case actorstypes.Version9: return miner9.AddressedSectorsMax, nil + case actorstypes.Version10: + return miner10.AddressedSectorsMax, nil + default: return 0, xerrors.Errorf("unsupported network version") } @@ -572,6 +608,10 @@ func GetDeclarationsMax(nwVer network.Version) (int, error) { return miner9.DeclarationsMax, nil + case actorstypes.Version10: + + return miner10.DeclarationsMax, nil + default: return 0, xerrors.Errorf("unsupported network version") } @@ -620,6 +660,10 @@ func AggregateProveCommitNetworkFee(nwVer network.Version, aggregateSize int, ba return miner9.AggregateProveCommitNetworkFee(aggregateSize, baseFee), nil + case actorstypes.Version10: + + return miner10.AggregateProveCommitNetworkFee(aggregateSize, baseFee), nil + default: return big.Zero(), xerrors.Errorf("unsupported network version") } @@ -668,6 +712,10 @@ func AggregatePreCommitNetworkFee(nwVer network.Version, aggregateSize int, base return miner9.AggregatePreCommitNetworkFee(aggregateSize, baseFee), nil + case actorstypes.Version10: + + return miner10.AggregatePreCommitNetworkFee(aggregateSize, baseFee), nil + default: return big.Zero(), xerrors.Errorf("unsupported network version") } diff --git a/chain/actors/version.go b/chain/actors/version.go index b9f4c2034..34e9a88bf 100644 --- a/chain/actors/version.go +++ b/chain/actors/version.go @@ -14,20 +14,21 @@ const ({{range .actorVersions}} /* inline-gen start */ -var LatestVersion = 9 +var LatestVersion = 10 -var Versions = []int{0, 2, 3, 4, 5, 6, 7, 8, 9} +var Versions = []int{0, 2, 3, 4, 5, 6, 7, 8, 9, 10} const ( - Version0 Version = 0 - Version2 Version = 2 - Version3 Version = 3 - Version4 Version = 4 - Version5 Version = 5 - Version6 Version = 6 - Version7 Version = 7 - Version8 Version = 8 - Version9 Version = 9 + Version0 Version = 0 + Version2 Version = 2 + Version3 Version = 3 + Version4 Version = 4 + Version5 Version = 5 + Version6 Version = 6 + Version7 Version = 7 + Version8 Version = 8 + Version9 Version = 9 + Version10 Version = 10 ) /* inline-gen end */ diff --git a/chain/consensus/filcns/compute_state.go b/chain/consensus/filcns/compute_state.go index 6ce967947..ece973798 100644 --- a/chain/consensus/filcns/compute_state.go +++ b/chain/consensus/filcns/compute_state.go @@ -48,6 +48,7 @@ func NewActorRegistry() *vm.ActorRegistry { inv.Register(actorstypes.Version7, vm.ActorsVersionPredicate(actorstypes.Version7), builtin.MakeRegistryLegacy(exported7.BuiltinActors())) inv.Register(actorstypes.Version8, vm.ActorsVersionPredicate(actorstypes.Version8), builtin.MakeRegistry(actorstypes.Version8)) inv.Register(actorstypes.Version9, vm.ActorsVersionPredicate(actorstypes.Version9), builtin.MakeRegistry(actorstypes.Version9)) + inv.Register(actorstypes.Version10, vm.ActorsVersionPredicate(actorstypes.Version10), builtin.MakeRegistry(actorstypes.Version10)) return inv } diff --git a/chain/consensus/filcns/upgrades.go b/chain/consensus/filcns/upgrades.go index ef401b933..2f8438b10 100644 --- a/chain/consensus/filcns/upgrades.go +++ b/chain/consensus/filcns/upgrades.go @@ -208,6 +208,7 @@ func DefaultUpgradeSchedule() stmgr.UpgradeSchedule { }}, Expensive: true, }, + // TODO v10 upgrade } for _, u := range updates { @@ -1552,6 +1553,15 @@ func upgradeActorsV9Common( return newRoot, nil } +func UpgradeActorsV10(ctx context.Context, sm *stmgr.StateManager, cache stmgr.MigrationCache, cb stmgr.ExecMonitor, + root cid.Cid, epoch abi.ChainEpoch, ts *types.TipSet) (cid.Cid, error) { + + // TODO migration + // - the init actor state to include the (empty) installed actors field + // - state tree migration to v5 + return cid.Undef, fmt.Errorf("IMPLEMENTME: v10 migration") +} + // Example upgrade function if upgrade requires only code changes //func UpgradeActorsV9(ctx context.Context, sm *stmgr.StateManager, _ stmgr.MigrationCache, _ stmgr.ExecMonitor, root cid.Cid, _ abi.ChainEpoch, _ *types.TipSet) (cid.Cid, error) { // buf := blockstore.NewTieredBstore(sm.ChainStore().StateBlockstore(), blockstore.NewMemorySync()) diff --git a/chain/consensus/filcns/weight.go b/chain/consensus/filcns/weight.go index f5966aa19..ab90840c5 100644 --- a/chain/consensus/filcns/weight.go +++ b/chain/consensus/filcns/weight.go @@ -29,7 +29,7 @@ func Weight(ctx context.Context, stateBs bstore.Blockstore, ts *types.TipSet) (t // >>> wFunction(totalPowerAtTipset(ts)) * 2^8 <<< + (wFunction(totalPowerAtTipset(ts)) * sum(ts.blocks[].ElectionProof.WinCount) * wRatio_num * 2^8) / (e * wRatio_den) - tpow := big2.Zero() + var tpow big2.Int { cst := cbor.NewCborStore(stateBs) state, err := state.LoadStateTree(cst, ts.ParentState()) diff --git a/chain/gen/genesis/genesis.go b/chain/gen/genesis/genesis.go index a37cdd2e8..964dc2f1c 100644 --- a/chain/gen/genesis/genesis.go +++ b/chain/gen/genesis/genesis.go @@ -389,6 +389,7 @@ func MakeAccountActor(ctx context.Context, cst cbor.IpldStore, av actorstypes.Ve Code: actcid, Head: statecid, Balance: bal, + Address: &addr, } return act, nil diff --git a/chain/market/fundmanager_test.go b/chain/market/fundmanager_test.go index 33d057c22..d79afbc51 100644 --- a/chain/market/fundmanager_test.go +++ b/chain/market/fundmanager_test.go @@ -105,7 +105,7 @@ func TestFundManagerBasic(t *testing.T) { // Note: Expect failure because there is no available balance to withdraw: // balance - reserved = 16 - 16 = 0 amt = abi.NewTokenAmount(1) - sentinel, err = s.fm.Withdraw(s.ctx, s.walletAddr, s.acctAddr, amt) + _, err = s.fm.Withdraw(s.ctx, s.walletAddr, s.acctAddr, amt) require.Error(t, err) } diff --git a/chain/messagepool/messagepool.go b/chain/messagepool/messagepool.go index 7016b7242..0724f145f 100644 --- a/chain/messagepool/messagepool.go +++ b/chain/messagepool/messagepool.go @@ -219,6 +219,7 @@ func CapGasFee(mff dtypes.DefaultMaxFeeFunc, msg *types.Message, sendSpec *api.M totalFee := types.BigMul(msg.GasFeeCap, gl) if totalFee.LessThanEqual(maxFee) { + msg.GasPremium = big.Min(msg.GasFeeCap, msg.GasPremium) // cap premium at FeeCap return } diff --git a/chain/messagepool/messagepool_test.go b/chain/messagepool/messagepool_test.go index 37122492e..9495400c6 100644 --- a/chain/messagepool/messagepool_test.go +++ b/chain/messagepool/messagepool_test.go @@ -1081,3 +1081,40 @@ func TestRemoveMessage(t *testing.T) { assert.Len(t, msgs, 0) } } + +func TestCapGasFee(t *testing.T) { + t.Run("use default maxfee", func(t *testing.T) { + msg := &types.Message{ + GasLimit: 100_000_000, + GasFeeCap: abi.NewTokenAmount(100_000_000), + GasPremium: abi.NewTokenAmount(100_000), + } + CapGasFee(func() (abi.TokenAmount, error) { + return abi.NewTokenAmount(100_000_000_000), nil + }, msg, nil) + assert.Equal(t, msg.GasFeeCap.Int64(), int64(1000)) + assert.Equal(t, msg.GasPremium.Int.Int64(), int64(1000)) + }) + + t.Run("use spec maxfee", func(t *testing.T) { + msg := &types.Message{ + GasLimit: 100_000_000, + GasFeeCap: abi.NewTokenAmount(100_000_000), + GasPremium: abi.NewTokenAmount(100_000), + } + CapGasFee(nil, msg, &api.MessageSendSpec{MaxFee: abi.NewTokenAmount(100_000_000_000)}) + assert.Equal(t, msg.GasFeeCap.Int64(), int64(1000)) + assert.Equal(t, msg.GasPremium.Int.Int64(), int64(1000)) + }) + + t.Run("use smaller feecap value when fee is enough", func(t *testing.T) { + msg := &types.Message{ + GasLimit: 100_000_000, + GasFeeCap: abi.NewTokenAmount(100_000), + GasPremium: abi.NewTokenAmount(100_000_000), + } + CapGasFee(nil, msg, &api.MessageSendSpec{MaxFee: abi.NewTokenAmount(100_000_000_000_000)}) + assert.Equal(t, msg.GasFeeCap.Int64(), int64(100_000)) + assert.Equal(t, msg.GasPremium.Int.Int64(), int64(100_000)) + }) +} diff --git a/chain/state/statetree.go b/chain/state/statetree.go index ff921a04d..62d70eff7 100644 --- a/chain/state/statetree.go +++ b/chain/state/statetree.go @@ -14,6 +14,7 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" + builtin_types "github.com/filecoin-project/go-state-types/builtin" "github.com/filecoin-project/go-state-types/network" states0 "github.com/filecoin-project/specs-actors/actors/states" states2 "github.com/filecoin-project/specs-actors/v2/actors/states" @@ -152,16 +153,12 @@ func VersionForNetwork(ver network.Version) (types.StateTreeVersion, error) { case network.Version12: return types.StateTreeVersion3, nil - /* inline-gen template - {{$lastNv := .latestNetworkVersion}} - case{{range .networkVersions}} {{if (ge . 13.)}} network.Version{{.}}{{if (lt . $lastNv)}},{{end}}{{end}}{{end}}: - - /* inline-gen start */ - case network.Version13, network.Version14, network.Version15, network.Version16, network.Version17: - - /* inline-gen end */ return types.StateTreeVersion4, nil + + case network.Version18: + return types.StateTreeVersion5, nil + default: panic(fmt.Sprintf("unsupported network version %d", ver)) } @@ -172,7 +169,7 @@ func NewStateTree(cst cbor.IpldStore, ver types.StateTreeVersion) (*StateTree, e switch ver { case types.StateTreeVersion0: // info is undefined - case types.StateTreeVersion1, types.StateTreeVersion2, types.StateTreeVersion3, types.StateTreeVersion4: + case types.StateTreeVersion1, types.StateTreeVersion2, types.StateTreeVersion3, types.StateTreeVersion4, types.StateTreeVersion5: var err error info, err = cst.Put(context.TODO(), new(types.StateInfo0)) if err != nil { @@ -215,6 +212,13 @@ func NewStateTree(cst cbor.IpldStore, ver types.StateTreeVersion) (*StateTree, e return nil, xerrors.Errorf("failed to create state tree: %w", err) } hamt = tree.Map + case types.StateTreeVersion5: + tree, err := builtin_types.NewTree(store) + if err != nil { + return nil, xerrors.Errorf("failed to create state tree: %w", err) + } + hamt = tree.Map + default: return nil, xerrors.Errorf("unsupported state tree version: %d", ver) } @@ -276,6 +280,13 @@ func LoadStateTree(cst cbor.IpldStore, c cid.Cid) (*StateTree, error) { if tree != nil { hamt = tree.Map } + case types.StateTreeVersion5: + var tree *builtin_types.ActorTree + tree, err = builtin_types.LoadTree(store, root.Actors) + if tree != nil { + hamt = tree.Map + } + default: return nil, xerrors.Errorf("unsupported state tree version: %d", root.Version) } @@ -374,7 +385,17 @@ func (st *StateTree) GetActor(addr address.Address) (*types.Actor, error) { } var act types.Actor - if found, err := st.root.Get(abi.AddrKey(addr), &act); err != nil { + var found bool + if st.version <= types.StateTreeVersion4 { + var act4 types.ActorV4 + found, err = st.root.Get(abi.AddrKey(addr), &act4) + if found { + act = *types.AsActorV5(&act4) + } + } else { + found, err = st.root.Get(abi.AddrKey(addr), &act) + } + if err != nil { return nil, xerrors.Errorf("hamt find failed: %w", err) } else if !found { return nil, types.ErrActorNotFound @@ -423,8 +444,15 @@ func (st *StateTree) Flush(ctx context.Context) (cid.Cid, error) { return cid.Undef, err } } else { - if err := st.root.Put(abi.AddrKey(addr), &sto.Act); err != nil { - return cid.Undef, err + if st.version <= types.StateTreeVersion4 { + act4 := types.AsActorV4(&sto.Act) + if err := st.root.Put(abi.AddrKey(addr), act4); err != nil { + return cid.Undef, err + } + } else { + if err := st.root.Put(abi.AddrKey(addr), &sto.Act); err != nil { + return cid.Undef, err + } } } } @@ -532,6 +560,25 @@ func (st *StateTree) ForEach(f func(address.Address, *types.Actor) error) error } // Now walk through the saved actors. + if st.version <= types.StateTreeVersion4 { + var act types.ActorV4 + return st.root.ForEach(&act, func(k string) error { + act := act // copy + addr, err := address.NewFromBytes([]byte(k)) + if err != nil { + return xerrors.Errorf("invalid address (%x) found in state tree key: %w", []byte(k), err) + } + + // no need to record anything here, there are no duplicates in the actors HAMT + // iself. + if _, ok := seen[addr]; ok { + return nil + } + + return f(addr, types.AsActorV5(&act)) + }) + } + var act types.Actor return st.root.ForEach(&act, func(k string) error { act := act // copy @@ -567,8 +614,6 @@ func Diff(ctx context.Context, oldTree, newTree *StateTree) (map[string]types.Ac case <-ctx.Done(): return ctx.Err() default: - var act types.Actor - addr, err := address.NewFromBytes([]byte(k)) if err != nil { return xerrors.Errorf("address in state tree was not valid: %w", err) @@ -583,16 +628,33 @@ func Diff(ctx context.Context, oldTree, newTree *StateTree) (map[string]types.Ac return nil // not changed } - buf.Reset(ncval.Raw) - err = act.UnmarshalCBOR(buf) - buf.Reset(nil) + if newTree.version <= types.StateTreeVersion4 { + var act types.ActorV4 - if err != nil { - return err + buf.Reset(ncval.Raw) + err = act.UnmarshalCBOR(buf) + buf.Reset(nil) + + if err != nil { + return err + } + + out[addr.String()] = *types.AsActorV5(&act) + + } else { + var act types.Actor + + buf.Reset(ncval.Raw) + err = act.UnmarshalCBOR(buf) + buf.Reset(nil) + + if err != nil { + return err + } + + out[addr.String()] = act } - out[addr.String()] = act - return nil } }); err != nil { diff --git a/chain/types/actor.go b/chain/types/actor.go index a9974a01f..29a6865eb 100644 --- a/chain/types/actor.go +++ b/chain/types/actor.go @@ -4,14 +4,48 @@ import ( "errors" "github.com/ipfs/go-cid" + + "github.com/filecoin-project/go-address" ) var ErrActorNotFound = errors.New("actor not found") -type Actor struct { +// Actor State for state tree version up to 4 +type ActorV4 struct { // Identifies the type of actor (string coded as a CID), see `chain/actors/actors.go`. Code cid.Cid Head cid.Cid Nonce uint64 Balance BigInt } + +// Actor State for state tree version 5 +type ActorV5 struct { + // Identifies the type of actor (string coded as a CID), see `chain/actors/actors.go`. + Code cid.Cid + Head cid.Cid + Nonce uint64 + Balance BigInt + // Predictable Address + Address *address.Address +} + +type Actor = ActorV5 + +func AsActorV4(a *ActorV5) *ActorV4 { + return &ActorV4{ + Code: a.Code, + Head: a.Head, + Nonce: a.Nonce, + Balance: a.Balance, + } +} + +func AsActorV5(a *ActorV4) *ActorV5 { + return &ActorV5{ + Code: a.Code, + Head: a.Head, + Nonce: a.Nonce, + Balance: a.Balance, + } +} diff --git a/chain/types/cbor_gen.go b/chain/types/cbor_gen.go index 78a3449ee..da42d7603 100644 --- a/chain/types/cbor_gen.go +++ b/chain/types/cbor_gen.go @@ -12,6 +12,7 @@ import ( cbg "github.com/whyrusleeping/cbor-gen" xerrors "golang.org/x/xerrors" + address "github.com/filecoin-project/go-address" abi "github.com/filecoin-project/go-state-types/abi" crypto "github.com/filecoin-project/go-state-types/crypto" exitcode "github.com/filecoin-project/go-state-types/exitcode" @@ -1040,9 +1041,9 @@ func (t *MsgMeta) UnmarshalCBOR(r io.Reader) (err error) { return nil } -var lengthBufActor = []byte{132} +var lengthBufActorV4 = []byte{132} -func (t *Actor) MarshalCBOR(w io.Writer) error { +func (t *ActorV4) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err @@ -1050,7 +1051,7 @@ func (t *Actor) MarshalCBOR(w io.Writer) error { cw := cbg.NewCborWriter(w) - if _, err := cw.Write(lengthBufActor); err != nil { + if _, err := cw.Write(lengthBufActorV4); err != nil { return err } @@ -1079,8 +1080,8 @@ func (t *Actor) MarshalCBOR(w io.Writer) error { return nil } -func (t *Actor) UnmarshalCBOR(r io.Reader) (err error) { - *t = Actor{} +func (t *ActorV4) UnmarshalCBOR(r io.Reader) (err error) { + *t = ActorV4{} cr := cbg.NewCborReader(r) @@ -1152,6 +1153,142 @@ func (t *Actor) UnmarshalCBOR(r io.Reader) (err error) { return nil } +var lengthBufActorV5 = []byte{133} + +func (t *ActorV5) MarshalCBOR(w io.Writer) error { + if t == nil { + _, err := w.Write(cbg.CborNull) + return err + } + + cw := cbg.NewCborWriter(w) + + if _, err := cw.Write(lengthBufActorV5); err != nil { + return err + } + + // t.Code (cid.Cid) (struct) + + if err := cbg.WriteCid(cw, t.Code); err != nil { + return xerrors.Errorf("failed to write cid field t.Code: %w", err) + } + + // t.Head (cid.Cid) (struct) + + if err := cbg.WriteCid(cw, t.Head); err != nil { + return xerrors.Errorf("failed to write cid field t.Head: %w", err) + } + + // t.Nonce (uint64) (uint64) + + if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(t.Nonce)); err != nil { + return err + } + + // t.Balance (big.Int) (struct) + if err := t.Balance.MarshalCBOR(cw); err != nil { + return err + } + + // t.Address (address.Address) (struct) + if err := t.Address.MarshalCBOR(cw); err != nil { + return err + } + return nil +} + +func (t *ActorV5) UnmarshalCBOR(r io.Reader) (err error) { + *t = ActorV5{} + + cr := cbg.NewCborReader(r) + + maj, extra, err := cr.ReadHeader() + if err != nil { + return err + } + defer func() { + if err == io.EOF { + err = io.ErrUnexpectedEOF + } + }() + + if maj != cbg.MajArray { + return fmt.Errorf("cbor input should be of type array") + } + + if extra != 5 { + return fmt.Errorf("cbor input had wrong number of fields") + } + + // t.Code (cid.Cid) (struct) + + { + + c, err := cbg.ReadCid(cr) + if err != nil { + return xerrors.Errorf("failed to read cid field t.Code: %w", err) + } + + t.Code = c + + } + // t.Head (cid.Cid) (struct) + + { + + c, err := cbg.ReadCid(cr) + if err != nil { + return xerrors.Errorf("failed to read cid field t.Head: %w", err) + } + + t.Head = c + + } + // t.Nonce (uint64) (uint64) + + { + + maj, extra, err = cr.ReadHeader() + if err != nil { + return err + } + if maj != cbg.MajUnsignedInt { + return fmt.Errorf("wrong type for uint64 field") + } + t.Nonce = uint64(extra) + + } + // t.Balance (big.Int) (struct) + + { + + if err := t.Balance.UnmarshalCBOR(cr); err != nil { + return xerrors.Errorf("unmarshaling t.Balance: %w", err) + } + + } + // t.Address (address.Address) (struct) + + { + + b, err := cr.ReadByte() + if err != nil { + return err + } + if b != cbg.CborNull[0] { + if err := cr.UnreadByte(); err != nil { + return err + } + t.Address = new(address.Address) + if err := t.Address.UnmarshalCBOR(cr); err != nil { + return xerrors.Errorf("unmarshaling t.Address pointer: %w", err) + } + } + + } + return nil +} + var lengthBufMessageReceipt = []byte{131} func (t *MessageReceipt) MarshalCBOR(w io.Writer) error { diff --git a/chain/types/fil.go b/chain/types/fil.go index 21125e6d6..60a2940c6 100644 --- a/chain/types/fil.go +++ b/chain/types/fil.go @@ -102,7 +102,7 @@ func ParseFIL(s string) (FIL, error) { return FIL{}, fmt.Errorf("string length too large: %d", len(s)) } - r, ok := new(big.Rat).SetString(s) + r, ok := new(big.Rat).SetString(s) //nolint:gosec if !ok { return FIL{}, fmt.Errorf("failed to parse %q as a decimal number", s) } diff --git a/chain/types/state.go b/chain/types/state.go index 506840370..37757f362 100644 --- a/chain/types/state.go +++ b/chain/types/state.go @@ -17,6 +17,8 @@ const ( StateTreeVersion3 // StateTreeVersion4 corresponds to actors v5 and above. StateTreeVersion4 + // StateTreeVersion5 corresponds to actors v10 and above. + StateTreeVersion5 ) type StateRoot struct { diff --git a/chain/vm/mkactor.go b/chain/vm/mkactor.go index 3a0ee6699..b33085c05 100644 --- a/chain/vm/mkactor.go +++ b/chain/vm/mkactor.go @@ -89,7 +89,7 @@ func TryCreateAccountActor(rt *Runtime, addr address.Address) (*types.Actor, add func makeAccountActor(ver actorstypes.Version, addr address.Address) (*types.Actor, aerrors.ActorError) { switch addr.Protocol() { case address.BLS, address.SECP256K1: - return newAccountActor(ver), nil + return newAccountActor(ver, addr), nil case address.ID: return nil, aerrors.Newf(exitcode.SysErrInvalidReceiver, "no actor with given ID: %s", addr) case address.Actor: @@ -99,7 +99,7 @@ func makeAccountActor(ver actorstypes.Version, addr address.Address) (*types.Act } } -func newAccountActor(ver actorstypes.Version) *types.Actor { +func newAccountActor(ver actorstypes.Version, addr address.Address) *types.Actor { // TODO: ActorsUpgrade use a global actor registry? var code cid.Cid switch ver { @@ -124,6 +124,7 @@ func newAccountActor(ver actorstypes.Version) *types.Actor { Code: code, Balance: types.NewInt(0), Head: EmptyObjectCid, + Address: &addr, } return nact diff --git a/cli/util/api.go b/cli/util/api.go index 596322ab8..b35974c69 100644 --- a/cli/util/api.go +++ b/cli/util/api.go @@ -274,7 +274,7 @@ func FullNodeProxy[T api.FullNode](ins []T, outstr *api.FullNodeStruct) { } total := len(rins) - result, err := retry.Retry(ctx, 5, initialBackoff, errorsToRetry, func() (results []reflect.Value, err2 error) { + result, _ := retry.Retry(ctx, 5, initialBackoff, errorsToRetry, func() ([]reflect.Value, error) { curr = (curr + 1) % total result := fns[curr].Call(args) diff --git a/cmd/lotus-bench/import.go b/cmd/lotus-bench/import.go index ce0b8d86e..c0a3c4a53 100644 --- a/cmd/lotus-bench/import.go +++ b/cmd/lotus-bench/import.go @@ -149,7 +149,7 @@ var importBenchCmd = &cli.Command{ http.Handle("/debug/metrics", exporter) - http.ListenAndServe("localhost:6060", nil) //nolint:errcheck + _ = http.ListenAndServe("localhost:6060", nil) }() var tdir string @@ -771,7 +771,7 @@ var importAnalyzeCmd = &cli.Command{ } go func() { - http.ListenAndServe("localhost:6060", nil) //nolint:errcheck + _ = http.ListenAndServe("localhost:6060", nil) }() fi, err := os.Open(cctx.Args().First()) diff --git a/cmd/lotus-fountain/main.go b/cmd/lotus-fountain/main.go index 059c248f6..780aef916 100644 --- a/cmd/lotus-fountain/main.go +++ b/cmd/lotus-fountain/main.go @@ -74,6 +74,10 @@ var runCmd = &cli.Command{ Name: "captcha-threshold", Value: 0.5, }, + &cli.StringFlag{ + Name: "http-server-timeout", + Value: "30s", + }, }, Action: func(cctx *cli.Context) error { sendPerRequest, err := types.ParseFIL(cctx.String("amount")) @@ -127,7 +131,17 @@ var runCmd = &cli.Command{ os.Exit(0) }() - return http.ListenAndServe(cctx.String("front"), nil) + timeout, err := time.ParseDuration(cctx.String("http-server-timeout")) + if err != nil { + return xerrors.Errorf("invalid time string %s: %x", cctx.String("http-server-timeout"), err) + } + + server := &http.Server{ + Addr: cctx.String("front"), + ReadHeaderTimeout: timeout, + } + + return server.ListenAndServe() }, } diff --git a/cmd/lotus-pcr/main.go b/cmd/lotus-pcr/main.go index f491d9a33..57eaf0ad6 100644 --- a/cmd/lotus-pcr/main.go +++ b/cmd/lotus-pcr/main.go @@ -418,10 +418,24 @@ var runCmd = &cli.Command{ Usage: "messages with a prove cap larger than this will be skipped when processing pre commit messages", Value: "0.000000001", }, + &cli.StringFlag{ + Name: "http-server-timeout", + Value: "30s", + }, }, Action: func(cctx *cli.Context) error { + timeout, err := time.ParseDuration(cctx.String("http-timeout")) + if err != nil { + return xerrors.Errorf("invalid time string %s: %x", cctx.String("http-timeout"), err) + } + go func() { - http.ListenAndServe(":6060", nil) //nolint:errcheck + server := &http.Server{ + Addr: ":6060", + ReadHeaderTimeout: timeout, + } + + _ = server.ListenAndServe() }() ctx := context.Background() @@ -898,7 +912,7 @@ func (r *refunder) EnsureMinerMinimums(ctx context.Context, tipset *types.TipSet func (r *refunder) processTipsetStorageMarketActor(ctx context.Context, tipset *types.TipSet, msg api.Message, recp *types.MessageReceipt) (bool, string, types.BigInt, error) { m := msg.Message - refundValue := types.NewInt(0) + var refundValue types.BigInt var messageMethod string switch m.Method { @@ -925,7 +939,7 @@ func (r *refunder) processTipsetStorageMarketActor(ctx context.Context, tipset * func (r *refunder) processTipsetStorageMinerActor(ctx context.Context, tipset *types.TipSet, msg api.Message, recp *types.MessageReceipt) (bool, string, types.BigInt, error) { m := msg.Message - refundValue := types.NewInt(0) + var refundValue types.BigInt var messageMethod string if _, found := r.blockmap[m.To]; found { diff --git a/cmd/lotus-shed/fip-0036.go b/cmd/lotus-shed/fip-0036.go index 2725f205f..485302b9b 100644 --- a/cmd/lotus-shed/fip-0036.go +++ b/cmd/lotus-shed/fip-0036.go @@ -36,7 +36,7 @@ type Option uint64 const ( Approve Option = 49 - Reject = 50 + Reject Option = 50 ) type Vote struct { @@ -148,7 +148,7 @@ var finalResultCmd = &cli.Command{ } votes, err := getVotesMap(vj) if err != nil { - return xerrors.Errorf("failed to get voters: ", err) + return xerrors.Errorf("failed to get voters: %w\n", err) } type minerBriefInfo struct { @@ -160,23 +160,23 @@ var finalResultCmd = &cli.Command{ // power actor pa, err := st.GetActor(power.Address) if err != nil { - return xerrors.Errorf("failed to get power actor: \n", err) + return xerrors.Errorf("failed to get power actor: %w\n", err) } powerState, err := power.Load(store, pa) if err != nil { - return xerrors.Errorf("failed to get power state: \n", err) + return xerrors.Errorf("failed to get power state: %w\n", err) } //market actor ma, err := st.GetActor(market.Address) if err != nil { - return xerrors.Errorf("fail to get market actor: ", err) + return xerrors.Errorf("fail to get market actor: %w\n", err) } marketState, err := market.Load(store, ma) if err != nil { - return xerrors.Errorf("fail to load market state: ", err) + return xerrors.Errorf("fail to load market state: %w\n", err) } lookupId := func(addr address.Address) address.Address { @@ -219,7 +219,7 @@ var finalResultCmd = &cli.Command{ // TODO: Confirm that these are always ID addresses signers, err := ms.Signers() if err != nil { - return xerrors.Errorf("fail to get msig signers", err) + return xerrors.Errorf("fail to get msig signers: %w", err) } for _, s := range signers { signerId := lookupId(s) @@ -244,12 +244,12 @@ var finalResultCmd = &cli.Command{ if builtin.IsStorageMinerActor(act.Code) { m, err := miner.Load(store, act) if err != nil { - return xerrors.Errorf("fail to load miner actor: \n", err) + return xerrors.Errorf("fail to load miner actor: %w", err) } info, err := m.Info() if err != nil { - return xerrors.Errorf("fail to get miner info: \n", err) + return xerrors.Errorf("fail to get miner info: %w\n", err) } ownerId := lookupId(info.Owner) @@ -353,7 +353,7 @@ var finalResultCmd = &cli.Command{ //process votes for regular accounts accountActor, err := st.GetActor(signerId) if err != nil { - return xerrors.Errorf("fail to get account account for signer: ", err) + return xerrors.Errorf("fail to get account account for signer: %w\n", err) } clientBytes, ok := clientToDealStorage[signerId] diff --git a/cmd/lotus-shed/gas-estimation.go b/cmd/lotus-shed/gas-estimation.go index b05380535..cf56ea03d 100644 --- a/cmd/lotus-shed/gas-estimation.go +++ b/cmd/lotus-shed/gas-estimation.go @@ -234,6 +234,9 @@ var replayOfflineCmd = &cli.Command{ return xerrors.Errorf("could not find message within the last %d epochs", lookbackLimit) } executionTs, err := cs.GetTipsetByHeight(ctx, ts.Height()-2, ts, true) + if err != nil { + return err + } tw := tabwriter.NewWriter(os.Stdout, 8, 2, 2, ' ', tabwriter.AlignRight) res, err := sm.CallWithGas(ctx, msg, []types.ChainMsg{}, executionTs) diff --git a/cmd/lotus-shed/invariants.go b/cmd/lotus-shed/invariants.go index 9fb67393d..e48f301c4 100644 --- a/cmd/lotus-shed/invariants.go +++ b/cmd/lotus-shed/invariants.go @@ -98,6 +98,9 @@ var invariantsCmd = &cli.Command{ fmt.Println("Network Version ", nv) av, err := actorstypes.VersionForNetwork(nv) + if err != nil { + return err + } fmt.Println("Actors Version ", av) actorCodeCids, err := actors.GetActorCodeIDs(av) @@ -114,6 +117,9 @@ var invariantsCmd = &cli.Command{ } actorTree, err := builtin.LoadTree(actorStore, stateRoot.Actors) + if err != nil { + return err + } startTime := time.Now() diff --git a/cmd/lotus-shed/itestd.go b/cmd/lotus-shed/itestd.go index 3ac542d27..7b9b7460d 100644 --- a/cmd/lotus-shed/itestd.go +++ b/cmd/lotus-shed/itestd.go @@ -9,6 +9,7 @@ import ( "net/http/httptest" "os" "os/exec" + "time" "github.com/chzyer/readline" "github.com/urfave/cli/v2" @@ -25,6 +26,10 @@ var itestdCmd = &cli.Command{ Name: "listen", Value: "127.0.0.1:5674", }, + &cli.StringFlag{ + Name: "http-server-timeout", + Value: "30s", + }, }, Action: func(cctx *cli.Context) error { var nodes []kit.ItestdNotif @@ -44,9 +49,14 @@ var itestdCmd = &cli.Command{ if err != nil { return xerrors.Errorf("net listen: %w", err) } + + timeout, err := time.ParseDuration(cctx.String("http-server-timeout")) + if err != nil { + return xerrors.Errorf("invalid time string %s: %x", cctx.String("http-server-timeout"), err) + } s := &httptest.Server{ Listener: l, - Config: &http.Server{Handler: m}, + Config: &http.Server{Handler: m, ReadHeaderTimeout: timeout}, } s.Start() fmt.Printf("ITest env:\n\nLOTUS_ITESTD=%s\n\nSay 'sh' to spawn a shell connected to test nodes\n--- waiting for clients\n", s.URL) diff --git a/cmd/lotus-shed/mempool-stats.go b/cmd/lotus-shed/mempool-stats.go index 9e4a2629c..08aceb020 100644 --- a/cmd/lotus-shed/mempool-stats.go +++ b/cmd/lotus-shed/mempool-stats.go @@ -13,6 +13,7 @@ import ( "go.opencensus.io/stats" "go.opencensus.io/stats/view" "go.opencensus.io/tag" + "golang.org/x/xerrors" "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/builtin" @@ -76,8 +77,14 @@ type msgInfo struct { var mpoolStatsCmd = &cli.Command{ Name: "mpool-stats", + Flags: []cli.Flag{ + &cli.StringFlag{ + Name: "http-server-timeout", + Value: "30s", + }, + }, Action: func(cctx *cli.Context) error { - logging.SetLogLevel("rpc", "ERROR") + _ = logging.SetLogLevel("rpc", "ERROR") if err := view.Register(AgeView, SizeView, InboundRate, InclusionRate, MsgWait); err != nil { return err @@ -92,8 +99,18 @@ var mpoolStatsCmd = &cli.Command{ http.Handle("/debug/metrics", expo) + timeout, err := time.ParseDuration(cctx.String("http-server-timeout")) + if err != nil { + return xerrors.Errorf("invalid time string %s: %x", cctx.String("http-server-timeout"), err) + } + go func() { - if err := http.ListenAndServe(":10555", nil); err != nil { + server := &http.Server{ + Addr: ":10555", + ReadHeaderTimeout: timeout, + } + + if err := server.ListenAndServe(); err != nil { panic(err) } }() diff --git a/cmd/lotus-shed/migrations.go b/cmd/lotus-shed/migrations.go index c4e9af397..f23942326 100644 --- a/cmd/lotus-shed/migrations.go +++ b/cmd/lotus-shed/migrations.go @@ -239,8 +239,10 @@ func checkMigrationInvariants(ctx context.Context, v8StateRootCid cid.Cid, v9Sta if err != nil { return err } - v9actorTree, err := builtin.LoadTree(actorStore, v9stateRoot.Actors) + if err != nil { + return err + } messages, err := v9.CheckStateInvariants(v9actorTree, epoch, actorCodeCids) if err != nil { return xerrors.Errorf("checking state invariants: %w", err) @@ -465,7 +467,7 @@ func compareProposalToAllocation(prop market8.DealProposal, alloc verifreg9.Allo return xerrors.Errorf("couldnt get ID from address") } if proposalClientID != uint64(alloc.Client) { - return xerrors.Errorf("client id mismatch between proposal and allocation: %s, %s", proposalClientID, alloc.Client) + return xerrors.Errorf("client id mismatch between proposal and allocation: %v, %v", proposalClientID, alloc.Client) } proposalProviderID, err := address.IDFromAddress(prop.Provider) @@ -473,11 +475,11 @@ func compareProposalToAllocation(prop market8.DealProposal, alloc verifreg9.Allo return xerrors.Errorf("couldnt get ID from address") } if proposalProviderID != uint64(alloc.Provider) { - return xerrors.Errorf("provider id mismatch between proposal and allocation: %s, %s", proposalProviderID, alloc.Provider) + return xerrors.Errorf("provider id mismatch between proposal and allocation: %v, %v", proposalProviderID, alloc.Provider) } if prop.PieceSize != alloc.Size { - return xerrors.Errorf("piece size mismatch between proposal and allocation: %s, %s", prop.PieceSize, alloc.Size) + return xerrors.Errorf("piece size mismatch between proposal and allocation: %v, %v", prop.PieceSize, alloc.Size) } if alloc.TermMax != 540*builtin.EpochsInDay { diff --git a/cmd/lotus-shed/msig.go b/cmd/lotus-shed/msig.go index 7d37d3d2d..ccc932c93 100644 --- a/cmd/lotus-shed/msig.go +++ b/cmd/lotus-shed/msig.go @@ -121,6 +121,10 @@ var multisigGetAllCmd = &cli.Command{ } return nil }) + if err != nil { + return err + } + out, err := json.MarshalIndent(msigActorsInfo, "", " ") if err != nil { return err diff --git a/cmd/lotus-stats/main.go b/cmd/lotus-stats/main.go index 20b2ee45c..20971c1f3 100644 --- a/cmd/lotus-stats/main.go +++ b/cmd/lotus-stats/main.go @@ -12,6 +12,7 @@ import ( "github.com/urfave/cli/v2" "go.opencensus.io/stats" "go.opencensus.io/stats/view" + "golang.org/x/xerrors" "github.com/filecoin-project/go-state-types/abi" @@ -128,6 +129,10 @@ var runCmd = &cli.Command{ EnvVars: []string{"LOTUS_STATS_IPLD_STORE_CACHE_SIZE"}, Value: 2 << 15, }, + &cli.StringFlag{ + Name: "http-server-timeout", + Value: "30s", + }, }, Action: func(cctx *cli.Context) error { ctx := context.Background() @@ -158,9 +163,18 @@ var runCmd = &cli.Command{ return err } + timeout, err := time.ParseDuration(cctx.String("http-server-timeout")) + if err != nil { + return xerrors.Errorf("invalid time string %s: %x", cctx.String("http-server-timeout"), err) + } + go func() { http.Handle("/metrics", exporter) - if err := http.ListenAndServe(":6688", nil); err != nil { + server := &http.Server{ + Addr: ":6688", + ReadHeaderTimeout: timeout, + } + if err := server.ListenAndServe(); err != nil { log.Errorw("failed to start http server", "err", err) } }() diff --git a/cmd/lotus-wallet/main.go b/cmd/lotus-wallet/main.go index 75d31da56..8360dae15 100644 --- a/cmd/lotus-wallet/main.go +++ b/cmd/lotus-wallet/main.go @@ -6,6 +6,7 @@ import ( "net" "net/http" "os" + "time" "github.com/gbrlsnchs/jwt/v3" "github.com/gorilla/mux" @@ -142,6 +143,10 @@ var runCmd = &cli.Command{ Usage: "(insecure) disable api auth", Hidden: true, }, + &cli.StringFlag{ + Name: "http-server-timeout", + Value: "30s", + }, }, Description: "Needs FULLNODE_API_INFO env-var to be set before running (see lotus-wallet --help for setup instructions)", Action: func(cctx *cli.Context) error { @@ -239,8 +244,14 @@ var runCmd = &cli.Command{ } } + timeout, err := time.ParseDuration(cctx.String("http-server-timeout")) + if err != nil { + return xerrors.Errorf("invalid time string %s: %x", cctx.String("http-server-timeout"), err) + } + srv := &http.Server{ - Handler: handler, + Handler: handler, + ReadHeaderTimeout: timeout, BaseContext: func(listener net.Listener) context.Context { ctx, _ := tag.New(context.Background(), tag.Upsert(metrics.APIInterface, "lotus-wallet")) return ctx diff --git a/cmd/lotus-worker/main.go b/cmd/lotus-worker/main.go index 04f893cc9..074a6a3e5 100644 --- a/cmd/lotus-worker/main.go +++ b/cmd/lotus-worker/main.go @@ -272,6 +272,10 @@ var runCmd = &cli.Command{ Value: "30m", EnvVars: []string{"LOTUS_WORKER_TIMEOUT"}, }, + &cli.StringFlag{ + Name: "http-server-timeout", + Value: "30s", + }, }, Before: func(cctx *cli.Context) error { if cctx.IsSet("address") { @@ -562,8 +566,14 @@ var runCmd = &cli.Command{ log.Info("Setting up control endpoint at " + address) + timeout, err := time.ParseDuration(cctx.String("http-server-timeout")) + if err != nil { + return xerrors.Errorf("invalid time string %s: %x", cctx.String("http-server-timeout"), err) + } + srv := &http.Server{ - Handler: sealworker.WorkerHandler(nodeApi.AuthVerify, remoteHandler, workerApi, true), + Handler: sealworker.WorkerHandler(nodeApi.AuthVerify, remoteHandler, workerApi, true), + ReadHeaderTimeout: timeout, BaseContext: func(listener net.Listener) context.Context { ctx, _ := tag.New(context.Background(), tag.Upsert(metrics.APIInterface, "lotus-worker")) return ctx diff --git a/documentation/en/api-v0-methods-miner.md b/documentation/en/api-v0-methods-miner.md index 413499c1a..789f26a85 100644 --- a/documentation/en/api-v0-methods-miner.md +++ b/documentation/en/api-v0-methods-miner.md @@ -252,8 +252,8 @@ Response: ```json { "Version": "string value", - "APIVersion": 131840, - "BlockDelay": 42 + "APIVersion": 0, + "BlockDelay": 0 } ``` @@ -279,20 +279,12 @@ Inputs: `null` Response: ```json { - "PreCommitControl": [ - "f01234" - ], - "CommitControl": [ - "f01234" - ], - "TerminateControl": [ - "f01234" - ], - "DealPublishControl": [ - "f01234" - ], - "DisableOwnerFallback": true, - "DisableWorkerFallback": true + "PreCommitControl": null, + "CommitControl": null, + "TerminateControl": null, + "DealPublishControl": null, + "DisableOwnerFallback": false, + "DisableWorkerFallback": false } ``` @@ -410,10 +402,10 @@ Inputs: [ { "ID": { - "Miner": 1000, - "Number": 9 + "Miner": 0, + "Number": 0 }, - "ProofType": 8 + "ProofType": 0 } ] ] @@ -446,9 +438,7 @@ Response: ```json { "Size": 1032, - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } + "PieceCID": null } ``` @@ -462,17 +452,15 @@ Inputs: [ [ { - "SealProof": 8, - "SectorNumber": 9, + "SealProof": 0, + "SectorNumber": 0, "SectorKey": null, - "SealedCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } + "SealedCID": null } ], "Bw==", 10101, - 17 + 18 ] ``` @@ -480,8 +468,8 @@ Response: ```json [ { - "PoStProof": 8, - "ProofBytes": "Ynl0ZSBhcnJheQ==" + "PoStProof": 0, + "ProofBytes": null } ] ``` @@ -522,12 +510,12 @@ Response: ], "Proofs": [ { - "PoStProof": 8, - "ProofBytes": "Ynl0ZSBhcnJheQ==" + "PoStProof": 0, + "ProofBytes": null } ], - "ChainCommitEpoch": 10101, - "ChainCommitRand": "Bw==" + "ChainCommitEpoch": 0, + "ChainCommitRand": null } ] ``` @@ -591,8 +579,8 @@ Inputs: ```json [ { - "MaxConcurrency": 123, - "IncludeSealed": true + "MaxConcurrency": 0, + "IncludeSealed": false } ] ``` @@ -806,24 +794,22 @@ Response: [ { "Proposal": { - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceSize": 1032, - "VerifiedDeal": true, + "PieceCID": null, + "PieceSize": 0, + "VerifiedDeal": false, "Client": "f01234", "Provider": "f01234", "Label": "", - "StartEpoch": 10101, - "EndEpoch": 10101, + "StartEpoch": 0, + "EndEpoch": 0, "StoragePricePerEpoch": "0", "ProviderCollateral": "0", "ClientCollateral": "0" }, "State": { - "SectorStartEpoch": 10101, - "LastUpdatedEpoch": 10101, - "SlashEpoch": 10101, + "SectorStartEpoch": 0, + "LastUpdatedEpoch": 0, + "SlashEpoch": 0, "VerifiedClaim": 0 } } @@ -1010,16 +996,8 @@ Response: "Subsystem": "string value" }, "Active": true, - "LastActive": { - "Type": "string value", - "Message": "json raw message", - "Time": "0001-01-01T00:00:00Z" - }, - "LastResolved": { - "Type": "string value", - "Message": "json raw message", - "Time": "0001-01-01T00:00:00Z" - } + "LastActive": null, + "LastResolved": null } ] ``` @@ -1089,94 +1067,8 @@ Inputs: Response: ```json { - "ReceivingTransfers": [ - { - "RequestID": {}, - "RequestState": "string value", - "IsCurrentChannelRequest": true, - "ChannelID": { - "Initiator": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Responder": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "ID": 3 - }, - "ChannelState": { - "TransferID": 3, - "Status": 1, - "BaseCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "IsInitiator": true, - "IsSender": true, - "Voucher": "string value", - "Message": "string value", - "OtherPeer": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Transferred": 42, - "Stages": { - "Stages": [ - { - "Name": "string value", - "Description": "string value", - "CreatedTime": "0001-01-01T00:00:00Z", - "UpdatedTime": "0001-01-01T00:00:00Z", - "Logs": [ - { - "Log": "string value", - "UpdatedTime": "0001-01-01T00:00:00Z" - } - ] - } - ] - } - }, - "Diagnostics": [ - "string value" - ] - } - ], - "SendingTransfers": [ - { - "RequestID": {}, - "RequestState": "string value", - "IsCurrentChannelRequest": true, - "ChannelID": { - "Initiator": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Responder": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "ID": 3 - }, - "ChannelState": { - "TransferID": 3, - "Status": 1, - "BaseCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "IsInitiator": true, - "IsSender": true, - "Voucher": "string value", - "Message": "string value", - "OtherPeer": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Transferred": 42, - "Stages": { - "Stages": [ - { - "Name": "string value", - "Description": "string value", - "CreatedTime": "0001-01-01T00:00:00Z", - "UpdatedTime": "0001-01-01T00:00:00Z", - "Logs": [ - { - "Log": "string value", - "UpdatedTime": "0001-01-01T00:00:00Z" - } - ] - } - ] - } - }, - "Diagnostics": [ - "string value" - ] - } - ] + "ReceivingTransfers": null, + "SendingTransfers": null } ``` @@ -1190,16 +1082,14 @@ Inputs: `null` Response: ```json { - "TransferID": 3, + "TransferID": 0, "Status": 1, - "BaseCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "IsInitiator": true, - "IsSender": true, + "BaseCID": null, + "IsInitiator": false, + "IsSender": false, "Voucher": "string value", "Message": "string value", - "OtherPeer": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "OtherPeer": "", "Transferred": 42, "Stages": { "Stages": [ @@ -1233,12 +1123,12 @@ Response: "Ask": { "Price": "0", "VerifiedPrice": "0", - "MinPieceSize": 1032, - "MaxPieceSize": 1032, + "MinPieceSize": 0, + "MaxPieceSize": 0, "Miner": "f01234", "Timestamp": 10101, "Expiry": 10101, - "SeqNo": 42 + "SeqNo": 0 }, "Signature": { "Type": 2, @@ -1258,57 +1148,49 @@ Response: ```json { "Proposal": { - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceSize": 1032, - "VerifiedDeal": true, - "Client": "f01234", - "Provider": "f01234", + "PieceCID": null, + "PieceSize": 0, + "VerifiedDeal": false, + "Client": "\u003cempty\u003e", + "Provider": "\u003cempty\u003e", "Label": "", - "StartEpoch": 10101, - "EndEpoch": 10101, - "StoragePricePerEpoch": "0", - "ProviderCollateral": "0", - "ClientCollateral": "0" + "StartEpoch": 0, + "EndEpoch": 0, + "StoragePricePerEpoch": "\u003cnil\u003e", + "ProviderCollateral": "\u003cnil\u003e", + "ClientCollateral": "\u003cnil\u003e" }, "ClientSignature": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "ProposalCid": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + "Type": 0, + "Data": null }, + "ProposalCid": null, "AddFundsCid": null, "PublishCid": null, "Miner": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", "Client": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", "State": 42, - "PiecePath": ".lotusminer/fstmp123", - "MetadataPath": ".lotusminer/fstmp123", - "SlashEpoch": 10101, - "FastRetrieval": true, + "PiecePath": "", + "MetadataPath": "", + "SlashEpoch": 0, + "FastRetrieval": false, "Message": "string value", - "FundsReserved": "0", + "FundsReserved": "\u003cnil\u003e", "Ref": { - "TransferType": "string value", + "TransferType": "", "Root": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "PieceCid": null, - "PieceSize": 1024, - "RawBlockSize": 42 + "PieceSize": 0, + "RawBlockSize": 0 }, - "AvailableForRetrieval": true, - "DealID": 5432, + "AvailableForRetrieval": false, + "DealID": 0, "CreationTime": "0001-01-01T00:00:00Z", - "TransferChannelId": { - "Initiator": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Responder": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "ID": 3 - }, - "SectorNumber": 9, - "InboundCAR": "string value" + "TransferChannelId": null, + "SectorNumber": 0, + "InboundCAR": "" } ``` @@ -1324,8 +1206,8 @@ Response: { "PricePerByte": "0", "UnsealPrice": "0", - "PaymentInterval": 42, - "PaymentIntervalIncrease": 42 + "PaymentInterval": 0, + "PaymentIntervalIncrease": 0 } ``` @@ -1357,16 +1239,14 @@ Response: ```json [ { - "TransferID": 3, + "TransferID": 0, "Status": 1, - "BaseCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "IsInitiator": true, - "IsSender": true, + "BaseCID": null, + "IsInitiator": false, + "IsSender": false, "Voucher": "string value", "Message": "string value", - "OtherPeer": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "OtherPeer": "", "Transferred": 42, "Stages": { "Stages": [ @@ -1400,24 +1280,22 @@ Response: [ { "Proposal": { - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceSize": 1032, - "VerifiedDeal": true, + "PieceCID": null, + "PieceSize": 0, + "VerifiedDeal": false, "Client": "f01234", "Provider": "f01234", "Label": "", - "StartEpoch": 10101, - "EndEpoch": 10101, + "StartEpoch": 0, + "EndEpoch": 0, "StoragePricePerEpoch": "0", "ProviderCollateral": "0", "ClientCollateral": "0" }, "State": { - "SectorStartEpoch": 10101, - "LastUpdatedEpoch": 10101, - "SlashEpoch": 10101, + "SectorStartEpoch": 0, + "LastUpdatedEpoch": 0, + "SlashEpoch": 0, "VerifiedClaim": 0 } } @@ -1436,57 +1314,49 @@ Response: [ { "Proposal": { - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceSize": 1032, - "VerifiedDeal": true, - "Client": "f01234", - "Provider": "f01234", + "PieceCID": null, + "PieceSize": 0, + "VerifiedDeal": false, + "Client": "\u003cempty\u003e", + "Provider": "\u003cempty\u003e", "Label": "", - "StartEpoch": 10101, - "EndEpoch": 10101, + "StartEpoch": 0, + "EndEpoch": 0, "StoragePricePerEpoch": "0", "ProviderCollateral": "0", "ClientCollateral": "0" }, "ClientSignature": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "ProposalCid": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + "Type": 0, + "Data": null }, + "ProposalCid": null, "AddFundsCid": null, "PublishCid": null, "Miner": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", "Client": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", "State": 42, - "PiecePath": ".lotusminer/fstmp123", - "MetadataPath": ".lotusminer/fstmp123", - "SlashEpoch": 10101, - "FastRetrieval": true, + "PiecePath": "", + "MetadataPath": "", + "SlashEpoch": 0, + "FastRetrieval": false, "Message": "string value", "FundsReserved": "0", "Ref": { - "TransferType": "string value", + "TransferType": "", "Root": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "PieceCid": null, - "PieceSize": 1024, - "RawBlockSize": 42 + "PieceSize": 0, + "RawBlockSize": 0 }, - "AvailableForRetrieval": true, - "DealID": 5432, + "AvailableForRetrieval": false, + "DealID": 0, "CreationTime": "0001-01-01T00:00:00Z", - "TransferChannelId": { - "Initiator": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Responder": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "ID": 3 - }, - "SectorNumber": 9, - "InboundCAR": "string value" + "TransferChannelId": null, + "SectorNumber": 0, + "InboundCAR": "" } ] ``` @@ -1502,44 +1372,24 @@ Response: ```json [ { - "PayloadCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "ID": 5, - "Selector": { - "Raw": "Ynl0ZSBhcnJheQ==" - }, + "PayloadCID": null, + "ID": 0, + "Selector": null, "PieceCID": null, "PricePerByte": "0", - "PaymentInterval": 42, - "PaymentIntervalIncrease": 42, + "PaymentInterval": 0, + "PaymentIntervalIncrease": 0, "UnsealPrice": "0", - "StoreID": 42, - "ChannelID": { - "Initiator": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Responder": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "ID": 3 - }, - "PieceInfo": { - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "Deals": [ - { - "DealID": 5432, - "SectorID": 9, - "Offset": 1032, - "Length": 1032 - } - ] - }, + "StoreID": 0, + "ChannelID": null, + "PieceInfo": null, "Status": 0, "Receiver": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "TotalSent": 42, + "TotalSent": 0, "FundsReceived": "0", "Message": "string value", - "CurrentInterval": 42, - "LegacyProtocol": true + "CurrentInterval": 0, + "LegacyProtocol": false } ] ``` @@ -1557,28 +1407,26 @@ Response: "Deals": [ { "Proposal": { - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceSize": 1032, - "VerifiedDeal": true, + "PieceCID": null, + "PieceSize": 0, + "VerifiedDeal": false, "Client": "f01234", "Provider": "f01234", "Label": "", - "StartEpoch": 10101, - "EndEpoch": 10101, + "StartEpoch": 0, + "EndEpoch": 0, "StoragePricePerEpoch": "0", "ProviderCollateral": "0", "ClientCollateral": "0" }, "ClientSignature": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" + "Type": 0, + "Data": null } } ], "PublishPeriodStart": "0001-01-01T00:00:00Z", - "PublishPeriod": 60000000000 + "PublishPeriod": 0 } ``` @@ -1653,8 +1501,8 @@ Inputs: { "PricePerByte": "0", "UnsealPrice": "0", - "PaymentInterval": 42, - "PaymentIntervalIncrease": 42 + "PaymentInterval": 0, + "PaymentIntervalIncrease": 0 } ] ``` @@ -1693,7 +1541,7 @@ Inputs: `null` Response: ```json { - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "ID": "", "Addrs": [ "/ip4/52.36.61.156/tcp/1347/p2p/12D3KooWFETiESTf1v4PGUvtnxMAcEFMzLZbJGg4tjWfGEimYior" ] @@ -1725,7 +1573,7 @@ Response: ```json { "Reachability": 1, - "PublicAddr": "string value" + "PublicAddr": "" } ``` @@ -1739,10 +1587,10 @@ Inputs: `null` Response: ```json { - "TotalIn": 9, - "TotalOut": 9, - "RateIn": 12.3, - "RateOut": 12.3 + "TotalIn": 0, + "TotalOut": 0, + "RateIn": 0, + "RateOut": 0 } ``` @@ -1796,12 +1644,8 @@ Inputs: "Peers": [ "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" ], - "IPAddrs": [ - "string value" - ], - "IPSubnets": [ - "string value" - ] + "IPAddrs": null, + "IPSubnets": null } ] ``` @@ -1821,12 +1665,8 @@ Response: "Peers": [ "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" ], - "IPAddrs": [ - "string value" - ], - "IPSubnets": [ - "string value" - ] + "IPAddrs": null, + "IPSubnets": null } ``` @@ -1842,12 +1682,8 @@ Inputs: "Peers": [ "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" ], - "IPAddrs": [ - "string value" - ], - "IPSubnets": [ - "string value" - ] + "IPAddrs": null, + "IPSubnets": null } ] ``` @@ -1863,7 +1699,7 @@ Inputs: ```json [ { - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "ID": "", "Addrs": [ "/ip4/52.36.61.156/tcp/1347/p2p/12D3KooWFETiESTf1v4PGUvtnxMAcEFMzLZbJGg4tjWfGEimYior" ] @@ -1916,7 +1752,7 @@ Inputs: Response: ```json { - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "ID": "", "Addrs": [ "/ip4/52.36.61.156/tcp/1347/p2p/12D3KooWFETiESTf1v4PGUvtnxMAcEFMzLZbJGg4tjWfGEimYior" ] @@ -1964,7 +1800,7 @@ Inputs: Response: ```json { - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "ID": "", "Agent": "string value", "Addrs": [ "string value" @@ -1972,16 +1808,7 @@ Response: "Protocols": [ "string value" ], - "ConnMgrMeta": { - "FirstSeen": "0001-01-01T00:00:00Z", - "Value": 123, - "Tags": { - "name": 42 - }, - "Conns": { - "name": "2021-03-08T22:52:18Z" - } - } + "ConnMgrMeta": null } ``` @@ -1996,7 +1823,7 @@ Response: ```json [ { - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "ID": "", "Addrs": [ "/ip4/52.36.61.156/tcp/1347/p2p/12D3KooWFETiESTf1v4PGUvtnxMAcEFMzLZbJGg4tjWfGEimYior" ] @@ -2075,7 +1902,7 @@ Response: ```json [ { - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "ID": "", "Score": { "Score": 12.3, "Topics": { @@ -2086,9 +1913,9 @@ Response: "InvalidMessageDeliveries": 3 } }, - "AppSpecificScore": 12.3, - "IPColocationFactor": 12.3, - "BehaviourPenalty": 12.3 + "AppSpecificScore": 0, + "IPColocationFactor": 0, + "BehaviourPenalty": 0 } } ] @@ -2134,19 +1961,19 @@ Response: ```json { "System": { - "NumStreamsInbound": 123, - "NumStreamsOutbound": 123, - "NumConnsInbound": 123, - "NumConnsOutbound": 123, - "NumFD": 123, + "NumStreamsInbound": 0, + "NumStreamsOutbound": 0, + "NumConnsInbound": 0, + "NumConnsOutbound": 0, + "NumFD": 0, "Memory": 9 }, "Transient": { - "NumStreamsInbound": 123, - "NumStreamsOutbound": 123, - "NumConnsInbound": 123, - "NumConnsOutbound": 123, - "NumFD": 123, + "NumStreamsInbound": 0, + "NumStreamsOutbound": 0, + "NumConnsInbound": 0, + "NumConnsOutbound": 0, + "NumFD": 0, "Memory": 9 }, "Services": { @@ -2202,18 +2029,8 @@ Inputs: Response: ```json { - "CID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceBlockLocations": [ - { - "RelOffset": 42, - "BlockSize": 42, - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } - } - ] + "CID": null, + "PieceBlockLocations": null } ``` @@ -2234,13 +2051,11 @@ Inputs: Response: ```json { - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "PieceCID": null, "Deals": [ { - "DealID": 5432, - "SectorID": 9, + "DealID": 0, + "SectorID": 0, "Offset": 1032, "Length": 1032 } @@ -2345,13 +2160,11 @@ Inputs: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" }, { "Size": 1032, - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } + "PieceCID": null }, { "Code": 0, @@ -2376,13 +2189,11 @@ Inputs: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" }, { "Size": 1032, - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } + "PieceCID": null }, { "Code": 0, @@ -2406,7 +2217,7 @@ Inputs: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" }, { "Code": 0, @@ -2430,7 +2241,7 @@ Inputs: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" }, { "Code": 0, @@ -2454,7 +2265,7 @@ Inputs: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" }, { "Code": 0, @@ -2478,7 +2289,7 @@ Inputs: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" }, { "Code": 0, @@ -2502,7 +2313,7 @@ Inputs: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" }, { "Code": 0, @@ -2526,7 +2337,7 @@ Inputs: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" }, { "Code": 0, @@ -2550,7 +2361,7 @@ Inputs: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" }, [ "Ynl0ZSBhcnJheQ==" @@ -2577,7 +2388,7 @@ Inputs: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" }, "Bw==", { @@ -2602,7 +2413,7 @@ Inputs: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" }, true, { @@ -2627,7 +2438,7 @@ Inputs: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" }, { "Code": 0, @@ -2651,15 +2462,11 @@ Inputs: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" }, { - "NewSealed": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "NewUnsealed": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } + "NewSealed": null, + "NewUnsealed": null }, { "Code": 0, @@ -2683,7 +2490,7 @@ Inputs: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" }, "Bw==", { @@ -2708,7 +2515,7 @@ Inputs: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" }, "Bw==", { @@ -2733,7 +2540,7 @@ Inputs: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" }, "Bw==", { @@ -2758,7 +2565,7 @@ Inputs: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" }, { "Unsealed": { @@ -2790,7 +2597,7 @@ Inputs: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" }, { "Code": 0, @@ -2839,7 +2646,7 @@ Inputs: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" } ] ``` @@ -2909,27 +2716,13 @@ Inputs: {}, { "PublishCid": null, - "DealID": 5432, - "DealProposal": { - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceSize": 1032, - "VerifiedDeal": true, - "Client": "f01234", - "Provider": "f01234", - "Label": "", - "StartEpoch": 10101, - "EndEpoch": 10101, - "StoragePricePerEpoch": "0", - "ProviderCollateral": "0", - "ClientCollateral": "0" - }, + "DealID": 0, + "DealProposal": null, "DealSchedule": { - "StartEpoch": 10101, - "EndEpoch": 10101 + "StartEpoch": 0, + "EndEpoch": 0 }, - "KeepUnsealed": true + "KeepUnsealed": false } ] ``` @@ -2959,9 +2752,7 @@ Response: 123, 124 ], - "FailedSectors": { - "123": "can't acquire read lock" - }, + "FailedSectors": null, "Msg": null, "Error": "string value" } @@ -3051,8 +2842,7 @@ Response: 1 ], "InUse": [ - 5, - 1 + 0 ], "Next": 9 } @@ -3199,67 +2989,23 @@ Inputs: { "Piece": { "Size": 1032, - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } + "PieceCID": null }, - "DealInfo": { - "PublishCid": null, - "DealID": 5432, - "DealProposal": { - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceSize": 1032, - "VerifiedDeal": true, - "Client": "f01234", - "Provider": "f01234", - "Label": "", - "StartEpoch": 10101, - "EndEpoch": 10101, - "StoragePricePerEpoch": "0", - "ProviderCollateral": "0", - "ClientCollateral": "0" - }, - "DealSchedule": { - "StartEpoch": 10101, - "EndEpoch": 10101 - }, - "KeepUnsealed": true - } + "DealInfo": null } ], - "TicketValue": "Bw==", - "TicketEpoch": 10101, - "PreCommit1Out": "Bw==", + "TicketValue": null, + "TicketEpoch": 0, + "PreCommit1Out": null, "CommD": null, "CommR": null, - "PreCommitInfo": { - "SealProof": 8, - "SectorNumber": 9, - "SealedCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "SealRandEpoch": 10101, - "DealIDs": [ - 5432 - ], - "Expiration": 10101, - "UnsealedCid": null - }, - "PreCommitDeposit": "0", + "PreCommitInfo": null, + "PreCommitDeposit": null, "PreCommitMessage": null, - "PreCommitTipSet": [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ], - "SeedValue": "Bw==", - "SeedEpoch": 10101, - "CommitProof": "Ynl0ZSBhcnJheQ==", + "PreCommitTipSet": [], + "SeedValue": null, + "SeedEpoch": 0, + "CommitProof": null, "CommitMessage": null, "Log": [ { @@ -3269,39 +3015,12 @@ Inputs: "Message": "string value" } ], - "DataUnsealed": { - "Local": true, - "URL": "string value", - "Headers": [ - { - "Key": "string value", - "Value": "string value" - } - ] - }, - "DataSealed": { - "Local": true, - "URL": "string value", - "Headers": [ - { - "Key": "string value", - "Value": "string value" - } - ] - }, - "DataCache": { - "Local": true, - "URL": "string value", - "Headers": [ - { - "Key": "string value", - "Value": "string value" - } - ] - }, - "RemoteCommit1Endpoint": "string value", - "RemoteCommit2Endpoint": "string value", - "RemoteSealingDoneEndpoint": "string value" + "DataUnsealed": null, + "DataSealed": null, + "DataCache": null, + "RemoteCommit1Endpoint": "", + "RemoteCommit2Endpoint": "", + "RemoteSealingDoneEndpoint": "" } ] ``` @@ -3495,7 +3214,7 @@ Inputs: Response: ```json { - "SectorID": 9, + "SectorID": 0, "State": "Proving", "CommD": null, "CommR": null, @@ -3507,34 +3226,9 @@ Response: { "Piece": { "Size": 1032, - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } + "PieceCID": null }, - "DealInfo": { - "PublishCid": null, - "DealID": 5432, - "DealProposal": { - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceSize": 1032, - "VerifiedDeal": true, - "Client": "f01234", - "Provider": "f01234", - "Label": "", - "StartEpoch": 10101, - "EndEpoch": 10101, - "StoragePricePerEpoch": "0", - "ProviderCollateral": "0", - "ClientCollateral": "0" - }, - "DealSchedule": { - "StartEpoch": 10101, - "EndEpoch": 10101 - }, - "KeepUnsealed": true - } + "DealInfo": null } ], "Ticket": { @@ -3548,9 +3242,9 @@ Response: "PreCommitMsg": null, "CommitMsg": null, "Retries": 42, - "ToUpgrade": true, + "ToUpgrade": false, "ReplicaUpdateMessage": null, - "LastErr": "string value", + "LastErr": "", "Log": [ { "Kind": "string value", @@ -3559,13 +3253,13 @@ Response: "Message": "string value" } ], - "SealProof": 8, + "SealProof": 0, "Activation": 10101, "Expiration": 10101, - "DealWeight": "0", - "VerifiedDealWeight": "0", - "InitialPledge": "0", - "OnTime": 10101, + "DealWeight": "\u003cnil\u003e", + "VerifiedDealWeight": "\u003cnil\u003e", + "InitialPledge": "\u003cnil\u003e", + "OnTime": 0, "Early": 10101 } ``` @@ -3595,10 +3289,10 @@ Inputs: [ { "ID": { - "Miner": 1000, - "Number": 9 + "Miner": 0, + "Number": 0 }, - "ProofType": 8 + "ProofType": 0 }, 1040384, 1024, @@ -3663,31 +3357,23 @@ Inputs: ```json [ { - "ID": "76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8", - "URLs": [ - "string value" - ], + "ID": "", + "URLs": null, "Weight": 42, - "MaxStorage": 42, - "CanSeal": true, - "CanStore": true, + "MaxStorage": 0, + "CanSeal": false, + "CanStore": false, "Groups": [ "string value" ], - "AllowTo": [ - "string value" - ], - "AllowTypes": [ - "string value" - ], - "DenyTypes": [ - "string value" - ] + "AllowTo": null, + "AllowTypes": null, + "DenyTypes": null }, { "Capacity": 9, "Available": 9, - "FSAvailable": 9, + "FSAvailable": 0, "Reserved": 9, "Max": 9, "Used": 9 @@ -3737,26 +3423,18 @@ Response: ```json [ { - "ID": "76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8", - "URLs": [ - "string value" - ], + "ID": "", + "URLs": null, "Weight": 42, - "MaxStorage": 42, - "CanSeal": true, - "CanStore": true, + "MaxStorage": 0, + "CanSeal": false, + "CanStore": false, "Groups": [ "string value" ], - "AllowTo": [ - "string value" - ], - "AllowTypes": [ - "string value" - ], - "DenyTypes": [ - "string value" - ] + "AllowTo": null, + "AllowTypes": null, + "DenyTypes": null } ] ``` @@ -3859,23 +3537,15 @@ Response: ```json [ { - "ID": "76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8", - "URLs": [ - "string value" - ], - "BaseURLs": [ - "string value" - ], + "ID": "", + "URLs": null, + "BaseURLs": null, "Weight": 42, - "CanSeal": true, - "CanStore": true, + "CanSeal": false, + "CanStore": false, "Primary": true, - "AllowTypes": [ - "string value" - ], - "DenyTypes": [ - "string value" - ] + "AllowTypes": null, + "DenyTypes": null } ] ``` @@ -3930,26 +3600,18 @@ Inputs: Response: ```json { - "ID": "76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8", - "URLs": [ - "string value" - ], + "ID": "", + "URLs": null, "Weight": 42, - "MaxStorage": 42, - "CanSeal": true, - "CanStore": true, + "MaxStorage": 0, + "CanSeal": false, + "CanStore": false, "Groups": [ "string value" ], - "AllowTo": [ - "string value" - ], - "AllowTypes": [ - "string value" - ], - "DenyTypes": [ - "string value" - ] + "AllowTo": null, + "AllowTypes": null, + "DenyTypes": null } ``` @@ -4034,7 +3696,7 @@ Inputs: "Stat": { "Capacity": 9, "Available": 9, - "FSAvailable": 9, + "FSAvailable": 0, "Reserved": 9, "Max": 9, "Used": 9 @@ -4063,7 +3725,7 @@ Response: { "Capacity": 9, "Available": 9, - "FSAvailable": 9, + "FSAvailable": 0, "Reserved": 9, "Max": 9, "Used": 9 diff --git a/documentation/en/api-v0-methods-worker.md b/documentation/en/api-v0-methods-worker.md index dab251a7c..3b80f9ad7 100644 --- a/documentation/en/api-v0-methods-worker.md +++ b/documentation/en/api-v0-methods-worker.md @@ -75,10 +75,10 @@ Inputs: [ { "ID": { - "Miner": 1000, - "Number": 9 + "Miner": 0, + "Number": 0 }, - "ProofType": 8 + "ProofType": 0 }, 1, "sealing", @@ -93,7 +93,7 @@ Response: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" } ``` @@ -108,16 +108,14 @@ Response: ```json { "Hostname": "string value", - "IgnoreResources": true, + "IgnoreResources": false, "Resources": { - "MemPhysical": 42, - "MemUsed": 42, - "MemSwap": 42, - "MemSwapUsed": 42, - "CPUs": 42, - "GPUs": [ - "string value" - ], + "MemPhysical": 0, + "MemUsed": 0, + "MemSwap": 0, + "MemSwapUsed": 0, + "CPUs": 0, + "GPUs": null, "Resources": { "post/v0/windowproof": { "0": { @@ -1423,11 +1421,11 @@ Response: ```json [ { - "ID": "76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8", + "ID": "", "Weight": 42, - "LocalPath": "string value", - "CanSeal": true, - "CanStore": true + "LocalPath": "", + "CanSeal": false, + "CanStore": false } ] ``` @@ -1492,10 +1490,10 @@ Inputs: [ { "ID": { - "Miner": 1000, - "Number": 9 + "Miner": 0, + "Number": 0 }, - "ProofType": 8 + "ProofType": 0 }, [ 1024 @@ -1512,7 +1510,7 @@ Response: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" } ``` @@ -1540,7 +1538,7 @@ Response: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" } ``` @@ -1557,10 +1555,10 @@ Inputs: [ { "ID": { - "Miner": 1000, - "Number": 9 + "Miner": 0, + "Number": 0 }, - "ProofType": 8 + "ProofType": 0 }, true, { @@ -1580,7 +1578,7 @@ Response: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" } ``` @@ -1597,10 +1595,10 @@ Inputs: [ { "ID": { - "Miner": 1000, - "Number": 9 + "Miner": 0, + "Number": 0 }, - "ProofType": 8 + "ProofType": 0 } ] ``` @@ -1612,7 +1610,7 @@ Response: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" } ``` @@ -1626,10 +1624,10 @@ Inputs: [ { "ID": { - "Miner": 1000, - "Number": 9 + "Miner": 0, + "Number": 0 }, - "ProofType": 8 + "ProofType": 0 } ] ``` @@ -1641,7 +1639,7 @@ Response: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" } ``` @@ -1658,10 +1656,10 @@ Inputs: [ { "ID": { - "Miner": 1000, - "Number": 9 + "Miner": 0, + "Number": 0 }, - "ProofType": 8 + "ProofType": 0 }, { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" @@ -1676,7 +1674,7 @@ Response: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" } ``` @@ -1692,11 +1690,9 @@ Inputs: 1000, [ { - "SealProof": 8, - "SectorNumber": 9, - "SealedCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "SealProof": 0, + "SectorNumber": 0, + "SealedCID": null, "Challenge": [ 42 ], @@ -1712,8 +1708,8 @@ Response: ```json { "PoStProofs": { - "PoStProof": 8, - "ProofBytes": "Ynl0ZSBhcnJheQ==" + "PoStProof": 0, + "ProofBytes": null }, "Skipped": [ { @@ -1736,11 +1732,9 @@ Inputs: 1000, [ { - "SealProof": 8, - "SectorNumber": 9, - "SealedCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "SealProof": 0, + "SectorNumber": 0, + "SealedCID": null, "Challenge": [ 42 ], @@ -1755,8 +1749,8 @@ Response: ```json [ { - "PoStProof": 8, - "ProofBytes": "Ynl0ZSBhcnJheQ==" + "PoStProof": 0, + "ProofBytes": null } ] ``` @@ -1774,10 +1768,10 @@ Inputs: [ { "ID": { - "Miner": 1000, - "Number": 9 + "Miner": 0, + "Number": 0 }, - "ProofType": 8 + "ProofType": 0 }, 1 ] @@ -1790,7 +1784,7 @@ Response: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" } ``` @@ -1821,10 +1815,10 @@ Inputs: [ { "ID": { - "Miner": 1000, - "Number": 9 + "Miner": 0, + "Number": 0 }, - "ProofType": 8 + "ProofType": 0 }, { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" @@ -1845,7 +1839,7 @@ Response: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" } ``` @@ -1859,10 +1853,10 @@ Inputs: [ { "ID": { - "Miner": 1000, - "Number": 9 + "Miner": 0, + "Number": 0 }, - "ProofType": 8 + "ProofType": 0 }, { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" @@ -1886,7 +1880,7 @@ Response: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" } ``` @@ -1903,10 +1897,10 @@ Inputs: [ { "ID": { - "Miner": 1000, - "Number": 9 + "Miner": 0, + "Number": 0 }, - "ProofType": 8 + "ProofType": 0 }, [ { @@ -1924,7 +1918,7 @@ Response: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" } ``` @@ -1941,17 +1935,15 @@ Inputs: [ { "ID": { - "Miner": 1000, - "Number": 9 + "Miner": 0, + "Number": 0 }, - "ProofType": 8 + "ProofType": 0 }, [ { "Size": 1032, - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } + "PieceCID": null } ] ] @@ -1964,7 +1956,7 @@ Response: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" } ``` @@ -1981,19 +1973,17 @@ Inputs: [ { "ID": { - "Miner": 1000, - "Number": 9 + "Miner": 0, + "Number": 0 }, - "ProofType": 8 + "ProofType": 0 }, "Bw==", "Bw==", [ { "Size": 1032, - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } + "PieceCID": null } ], { @@ -2014,7 +2004,7 @@ Response: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" } ``` @@ -2028,10 +2018,10 @@ Inputs: [ { "ID": { - "Miner": 1000, - "Number": 9 + "Miner": 0, + "Number": 0 }, - "ProofType": 8 + "ProofType": 0 }, "Bw==" ] @@ -2044,7 +2034,7 @@ Response: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" } ``` @@ -2058,18 +2048,16 @@ Inputs: [ { "ID": { - "Miner": 1000, - "Number": 9 + "Miner": 0, + "Number": 0 }, - "ProofType": 8 + "ProofType": 0 }, "Bw==", [ { "Size": 1032, - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } + "PieceCID": null } ] ] @@ -2082,7 +2070,7 @@ Response: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" } ``` @@ -2096,10 +2084,10 @@ Inputs: [ { "ID": { - "Miner": 1000, - "Number": 9 + "Miner": 0, + "Number": 0 }, - "ProofType": 8 + "ProofType": 0 }, "Bw==" ] @@ -2112,7 +2100,7 @@ Response: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" } ``` @@ -2263,10 +2251,10 @@ Inputs: [ { "ID": { - "Miner": 1000, - "Number": 9 + "Miner": 0, + "Number": 0 }, - "ProofType": 8 + "ProofType": 0 }, 1040384, 1024, @@ -2284,7 +2272,7 @@ Response: "Miner": 1000, "Number": 9 }, - "ID": "07070707-0707-0707-0707-070707070707" + "ID": "00000000-0000-0000-0000-000000000000" } ``` diff --git a/documentation/en/api-v0-methods.md b/documentation/en/api-v0-methods.md index 7ee6ceaa9..bc8b2661c 100644 --- a/documentation/en/api-v0-methods.md +++ b/documentation/en/api-v0-methods.md @@ -301,8 +301,8 @@ Response: ```json { "Version": "string value", - "APIVersion": 131840, - "BlockDelay": 42 + "APIVersion": 0, + "BlockDelay": 0 } ``` @@ -441,24 +441,11 @@ Response: { "Miner": "f01234", "Ticket": { - "VRFProof": "Ynl0ZSBhcnJheQ==" + "VRFProof": null }, - "ElectionProof": { - "WinCount": 9, - "VRFProof": "Ynl0ZSBhcnJheQ==" - }, - "BeaconEntries": [ - { - "Round": 42, - "Data": "Ynl0ZSBhcnJheQ==" - } - ], - "WinPoStProof": [ - { - "PoStProof": 8, - "ProofBytes": "Ynl0ZSBhcnJheQ==" - } - ], + "ElectionProof": null, + "BeaconEntries": null, + "WinPoStProof": null, "Parents": [ { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" @@ -466,25 +453,15 @@ Response: ], "ParentWeight": "0", "Height": 10101, - "ParentStateRoot": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "ParentMessageReceipts": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "ParentStateRoot": null, + "ParentMessageReceipts": null, "Messages": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "BLSAggregate": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, + "BLSAggregate": null, "Timestamp": 42, - "BlockSig": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "ForkSignaling": 42, + "BlockSig": null, + "ForkSignaling": 0, "ParentBaseFee": "0" } ``` @@ -518,49 +495,8 @@ Inputs: Response: ```json { - "BlsMessages": [ - { - "Version": 42, - "To": "f01234", - "From": "f01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==", - "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" - } - } - ], - "SecpkMessages": [ - { - "Message": { - "Version": 42, - "To": "f01234", - "From": "f01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==", - "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" - } - }, - "Signature": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" - } - } - ], + "BlsMessages": null, + "SecpkMessages": null, "Cids": [ { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" @@ -610,13 +546,13 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ``` @@ -654,13 +590,13 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } } @@ -718,13 +654,13 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } } @@ -754,7 +690,7 @@ Response: { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 0 } ] ``` @@ -1156,16 +1092,14 @@ Inputs: `null` Response: ```json { - "TransferID": 3, + "TransferID": 0, "Status": 1, - "BaseCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "IsInitiator": true, - "IsSender": true, + "BaseCID": null, + "IsInitiator": false, + "IsSender": false, "Voucher": "string value", "Message": "string value", - "OtherPeer": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "OtherPeer": "", "Transferred": 42, "Stages": { "Stages": [ @@ -1204,11 +1138,9 @@ Inputs: Response: ```json { - "PayloadSize": 9, - "PieceSize": 1032, - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } + "PayloadSize": 0, + "PieceSize": 0, + "PieceCID": null } ``` @@ -1230,8 +1162,8 @@ Inputs: Response: ```json { - "PayloadSize": 9, - "PieceSize": 1032 + "PayloadSize": 0, + "PieceSize": 0 } ``` @@ -1264,12 +1196,12 @@ Response: "MinPrice": "0", "UnsealPrice": "0", "PricePerByte": "0", - "PaymentInterval": 42, - "PaymentIntervalIncrease": 42, + "PaymentInterval": 0, + "PaymentIntervalIncrease": 0, "Miner": "f01234", "MinerPeer": { - "Address": "f01234", - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "Address": "\u003cempty\u003e", + "ID": "", "PieceCID": null } } @@ -1287,7 +1219,7 @@ Inputs: [ { "Path": "string value", - "IsCAR": true + "IsCAR": false }, "string value" ] @@ -1313,81 +1245,21 @@ Inputs: Response: ```json { - "ProposalCid": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "ProposalCid": null, "State": 42, "Message": "string value", - "DealStages": { - "Stages": [ - { - "Name": "string value", - "Description": "string value", - "ExpectedDuration": "string value", - "CreatedTime": "0001-01-01T00:00:00Z", - "UpdatedTime": "0001-01-01T00:00:00Z", - "Logs": [ - { - "Log": "string value", - "UpdatedTime": "0001-01-01T00:00:00Z" - } - ] - } - ] - }, + "DealStages": null, "Provider": "f01234", - "DataRef": { - "TransferType": "string value", - "Root": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceCid": null, - "PieceSize": 1024, - "RawBlockSize": 42 - }, - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "DataRef": null, + "PieceCID": null, "Size": 42, "PricePerEpoch": "0", "Duration": 42, - "DealID": 5432, + "DealID": 0, "CreationTime": "0001-01-01T00:00:00Z", "Verified": true, - "TransferChannelID": { - "Initiator": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Responder": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "ID": 3 - }, - "DataTransfer": { - "TransferID": 3, - "Status": 1, - "BaseCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "IsInitiator": true, - "IsSender": true, - "Voucher": "string value", - "Message": "string value", - "OtherPeer": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Transferred": 42, - "Stages": { - "Stages": [ - { - "Name": "string value", - "Description": "string value", - "CreatedTime": "0001-01-01T00:00:00Z", - "UpdatedTime": "0001-01-01T00:00:00Z", - "Logs": [ - { - "Log": "string value", - "UpdatedTime": "0001-01-01T00:00:00Z" - } - ] - } - ] - } - } + "TransferChannelID": null, + "DataTransfer": null } ``` @@ -1417,81 +1289,21 @@ Inputs: `null` Response: ```json { - "ProposalCid": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "ProposalCid": null, "State": 42, "Message": "string value", - "DealStages": { - "Stages": [ - { - "Name": "string value", - "Description": "string value", - "ExpectedDuration": "string value", - "CreatedTime": "0001-01-01T00:00:00Z", - "UpdatedTime": "0001-01-01T00:00:00Z", - "Logs": [ - { - "Log": "string value", - "UpdatedTime": "0001-01-01T00:00:00Z" - } - ] - } - ] - }, + "DealStages": null, "Provider": "f01234", - "DataRef": { - "TransferType": "string value", - "Root": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceCid": null, - "PieceSize": 1024, - "RawBlockSize": 42 - }, - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "DataRef": null, + "PieceCID": null, "Size": 42, - "PricePerEpoch": "0", + "PricePerEpoch": "\u003cnil\u003e", "Duration": 42, - "DealID": 5432, + "DealID": 0, "CreationTime": "0001-01-01T00:00:00Z", "Verified": true, - "TransferChannelID": { - "Initiator": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Responder": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "ID": 3 - }, - "DataTransfer": { - "TransferID": 3, - "Status": 1, - "BaseCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "IsInitiator": true, - "IsSender": true, - "Voucher": "string value", - "Message": "string value", - "OtherPeer": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Transferred": 42, - "Stages": { - "Stages": [ - { - "Name": "string value", - "Description": "string value", - "CreatedTime": "0001-01-01T00:00:00Z", - "UpdatedTime": "0001-01-01T00:00:00Z", - "Logs": [ - { - "Log": "string value", - "UpdatedTime": "0001-01-01T00:00:00Z" - } - ] - } - ] - } - } + "TransferChannelID": null, + "DataTransfer": null } ``` @@ -1506,53 +1318,19 @@ Inputs: `null` Response: ```json { - "PayloadCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "ID": 5, + "PayloadCID": null, + "ID": 0, "PieceCID": null, - "PricePerByte": "0", - "UnsealPrice": "0", + "PricePerByte": "\u003cnil\u003e", + "UnsealPrice": "\u003cnil\u003e", "Status": 0, "Message": "string value", "Provider": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "BytesReceived": 42, - "BytesPaidFor": 42, - "TotalPaid": "0", - "TransferChannelID": { - "Initiator": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Responder": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "ID": 3 - }, - "DataTransfer": { - "TransferID": 3, - "Status": 1, - "BaseCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "IsInitiator": true, - "IsSender": true, - "Voucher": "string value", - "Message": "string value", - "OtherPeer": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Transferred": 42, - "Stages": { - "Stages": [ - { - "Name": "string value", - "Description": "string value", - "CreatedTime": "0001-01-01T00:00:00Z", - "UpdatedTime": "0001-01-01T00:00:00Z", - "Logs": [ - { - "Log": "string value", - "UpdatedTime": "0001-01-01T00:00:00Z" - } - ] - } - ] - } - }, + "BytesReceived": 0, + "BytesPaidFor": 0, + "TotalPaid": "\u003cnil\u003e", + "TransferChannelID": null, + "DataTransfer": null, "Event": 5 } ``` @@ -1585,7 +1363,7 @@ Inputs: [ { "Path": "string value", - "IsCAR": true + "IsCAR": false } ] ``` @@ -1596,7 +1374,7 @@ Response: "Root": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "ImportID": 50 + "ImportID": 0 } ``` @@ -1612,16 +1390,14 @@ Response: ```json [ { - "TransferID": 3, + "TransferID": 0, "Status": 1, - "BaseCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "IsInitiator": true, - "IsSender": true, + "BaseCID": null, + "IsInitiator": false, + "IsSender": false, "Voucher": "string value", "Message": "string value", - "OtherPeer": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "OtherPeer": "", "Transferred": 42, "Stages": { "Stages": [ @@ -1655,81 +1431,21 @@ Response: ```json [ { - "ProposalCid": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "ProposalCid": null, "State": 42, "Message": "string value", - "DealStages": { - "Stages": [ - { - "Name": "string value", - "Description": "string value", - "ExpectedDuration": "string value", - "CreatedTime": "0001-01-01T00:00:00Z", - "UpdatedTime": "0001-01-01T00:00:00Z", - "Logs": [ - { - "Log": "string value", - "UpdatedTime": "0001-01-01T00:00:00Z" - } - ] - } - ] - }, + "DealStages": null, "Provider": "f01234", - "DataRef": { - "TransferType": "string value", - "Root": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceCid": null, - "PieceSize": 1024, - "RawBlockSize": 42 - }, - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "DataRef": null, + "PieceCID": null, "Size": 42, "PricePerEpoch": "0", "Duration": 42, - "DealID": 5432, + "DealID": 0, "CreationTime": "0001-01-01T00:00:00Z", "Verified": true, - "TransferChannelID": { - "Initiator": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Responder": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "ID": 3 - }, - "DataTransfer": { - "TransferID": 3, - "Status": 1, - "BaseCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "IsInitiator": true, - "IsSender": true, - "Voucher": "string value", - "Message": "string value", - "OtherPeer": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Transferred": 42, - "Stages": { - "Stages": [ - { - "Name": "string value", - "Description": "string value", - "CreatedTime": "0001-01-01T00:00:00Z", - "UpdatedTime": "0001-01-01T00:00:00Z", - "Logs": [ - { - "Log": "string value", - "UpdatedTime": "0001-01-01T00:00:00Z" - } - ] - } - ] - } - } + "TransferChannelID": null, + "DataTransfer": null } ] ``` @@ -1750,8 +1466,8 @@ Response: "Err": "string value", "Root": null, "Source": "string value", - "FilePath": "string value", - "CARPath": "string value" + "FilePath": "", + "CARPath": "" } ] ``` @@ -1769,53 +1485,19 @@ Response: ```json [ { - "PayloadCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "ID": 5, + "PayloadCID": null, + "ID": 0, "PieceCID": null, "PricePerByte": "0", "UnsealPrice": "0", "Status": 0, "Message": "string value", "Provider": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "BytesReceived": 42, - "BytesPaidFor": 42, + "BytesReceived": 0, + "BytesPaidFor": 0, "TotalPaid": "0", - "TransferChannelID": { - "Initiator": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Responder": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "ID": 3 - }, - "DataTransfer": { - "TransferID": 3, - "Status": 1, - "BaseCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "IsInitiator": true, - "IsSender": true, - "Voucher": "string value", - "Message": "string value", - "OtherPeer": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Transferred": 42, - "Stages": { - "Stages": [ - { - "Name": "string value", - "Description": "string value", - "CreatedTime": "0001-01-01T00:00:00Z", - "UpdatedTime": "0001-01-01T00:00:00Z", - "Logs": [ - { - "Log": "string value", - "UpdatedTime": "0001-01-01T00:00:00Z" - } - ] - } - ] - } - }, + "TransferChannelID": null, + "DataTransfer": null, "Event": 5 } ] @@ -1847,15 +1529,15 @@ Response: }, "Piece": null, "Size": 42, - "MinPrice": "0", - "UnsealPrice": "0", - "PricePerByte": "0", - "PaymentInterval": 42, - "PaymentIntervalIncrease": 42, + "MinPrice": "\u003cnil\u003e", + "UnsealPrice": "\u003cnil\u003e", + "PricePerByte": "\u003cnil\u003e", + "PaymentInterval": 0, + "PaymentIntervalIncrease": 0, "Miner": "f01234", "MinerPeer": { - "Address": "f01234", - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "Address": "\u003cempty\u003e", + "ID": "", "PieceCID": null } } @@ -1879,12 +1561,12 @@ Response: { "Price": "0", "VerifiedPrice": "0", - "MinPieceSize": 1032, - "MaxPieceSize": 1032, + "MinPieceSize": 0, + "MaxPieceSize": 0, "Miner": "f01234", "Timestamp": 10101, "Expiry": 10101, - "SeqNo": 42 + "SeqNo": 0 } ``` @@ -1934,24 +1616,20 @@ Inputs: "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "Piece": null, - "DatamodelPathSelector": "Links/21/Hash/Links/42/Hash", + "DatamodelPathSelector": null, "Size": 42, - "FromLocalCAR": "string value", + "FromLocalCAR": "", "Total": "0", - "UnsealPrice": "0", - "PaymentInterval": 42, - "PaymentIntervalIncrease": 42, + "UnsealPrice": "\u003cnil\u003e", + "PaymentInterval": 0, + "PaymentIntervalIncrease": 0, "Client": "f01234", "Miner": "f01234", - "MinerPeer": { - "Address": "f01234", - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "PieceCID": null - } + "MinerPeer": null }, { "Path": "string value", - "IsCAR": true + "IsCAR": false } ] ``` @@ -1989,24 +1667,20 @@ Inputs: "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "Piece": null, - "DatamodelPathSelector": "Links/21/Hash/Links/42/Hash", + "DatamodelPathSelector": null, "Size": 42, - "FromLocalCAR": "string value", + "FromLocalCAR": "", "Total": "0", - "UnsealPrice": "0", - "PaymentInterval": 42, - "PaymentIntervalIncrease": 42, + "UnsealPrice": "\u003cnil\u003e", + "PaymentInterval": 0, + "PaymentIntervalIncrease": 0, "Client": "f01234", "Miner": "f01234", - "MinerPeer": { - "Address": "f01234", - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "PieceCID": null - } + "MinerPeer": null }, { "Path": "string value", - "IsCAR": true + "IsCAR": false } ] ``` @@ -2016,8 +1690,8 @@ Response: { "Event": 5, "Status": 0, - "BytesReceived": 42, - "FundsSpent": "0", + "BytesReceived": 0, + "FundsSpent": "\u003cnil\u003e", "Err": "string value" } ``` @@ -2033,22 +1707,22 @@ Inputs: [ { "Data": { - "TransferType": "string value", + "TransferType": "", "Root": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "PieceCid": null, - "PieceSize": 1024, - "RawBlockSize": 42 + "PieceSize": 0, + "RawBlockSize": 0 }, "Wallet": "f01234", "Miner": "f01234", "EpochPrice": "0", - "MinBlocksDuration": 42, + "MinBlocksDuration": 0, "ProviderCollateral": "0", - "DealStartEpoch": 10101, - "FastRetrieval": true, - "VerifiedDeal": true + "DealStartEpoch": 0, + "FastRetrieval": false, + "VerifiedDeal": false } ] ``` @@ -2066,22 +1740,22 @@ Inputs: [ { "Data": { - "TransferType": "string value", + "TransferType": "", "Root": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "PieceCid": null, - "PieceSize": 1024, - "RawBlockSize": 42 + "PieceSize": 0, + "RawBlockSize": 0 }, "Wallet": "f01234", "Miner": "f01234", "EpochPrice": "0", - "MinBlocksDuration": 42, + "MinBlocksDuration": 0, "ProviderCollateral": "0", - "DealStartEpoch": 10101, - "FastRetrieval": true, - "VerifiedDeal": true + "DealStartEpoch": 0, + "FastRetrieval": false, + "VerifiedDeal": false } ] ``` @@ -2127,13 +1801,13 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, 9, @@ -2166,13 +1840,13 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, [ @@ -2229,18 +1903,18 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, { "MaxFee": "0", - "MsgUuid": "07070707-0707-0707-0707-070707070707" + "MsgUuid": "00000000-0000-0000-0000-000000000000" }, [ { @@ -2261,13 +1935,13 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ``` @@ -2303,16 +1977,8 @@ Response: "Subsystem": "string value" }, "Active": true, - "LastActive": { - "Type": "string value", - "Message": "json raw message", - "Time": "0001-01-01T00:00:00Z" - }, - "LastResolved": { - "Type": "string value", - "Message": "json raw message", - "Time": "0001-01-01T00:00:00Z" - } + "LastActive": null, + "LastResolved": null } ] ``` @@ -2468,18 +2134,13 @@ Inputs: } ], "Ticket": { - "VRFProof": "Ynl0ZSBhcnJheQ==" + "VRFProof": null }, "Eproof": { - "WinCount": 9, - "VRFProof": "Ynl0ZSBhcnJheQ==" + "WinCount": 0, + "VRFProof": null }, - "BeaconValues": [ - { - "Round": 42, - "Data": "Ynl0ZSBhcnJheQ==" - } - ], + "BeaconValues": null, "Messages": [ { "Message": { @@ -2488,13 +2149,13 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, "Signature": { @@ -2502,18 +2163,13 @@ Inputs: "Data": "Ynl0ZSBhcnJheQ==" }, "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ], "Epoch": 10101, "Timestamp": 42, - "WinningPoStProof": [ - { - "PoStProof": 8, - "ProofBytes": "Ynl0ZSBhcnJheQ==" - } - ] + "WinningPoStProof": null } ] ``` @@ -2524,24 +2180,11 @@ Response: "Header": { "Miner": "f01234", "Ticket": { - "VRFProof": "Ynl0ZSBhcnJheQ==" + "VRFProof": null }, - "ElectionProof": { - "WinCount": 9, - "VRFProof": "Ynl0ZSBhcnJheQ==" - }, - "BeaconEntries": [ - { - "Round": 42, - "Data": "Ynl0ZSBhcnJheQ==" - } - ], - "WinPoStProof": [ - { - "PoStProof": 8, - "ProofBytes": "Ynl0ZSBhcnJheQ==" - } - ], + "ElectionProof": null, + "BeaconEntries": null, + "WinPoStProof": null, "Parents": [ { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" @@ -2549,37 +2192,19 @@ Response: ], "ParentWeight": "0", "Height": 10101, - "ParentStateRoot": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "ParentMessageReceipts": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "ParentStateRoot": null, + "ParentMessageReceipts": null, "Messages": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "BLSAggregate": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, + "BLSAggregate": null, "Timestamp": 42, - "BlockSig": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "ForkSignaling": 42, + "BlockSig": null, + "ForkSignaling": 0, "ParentBaseFee": "0" }, - "BlsMessages": [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } - ], - "SecpkMessages": [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } - ] + "BlsMessages": null, + "SecpkMessages": null } ``` @@ -2611,27 +2236,20 @@ Response: "NetworkPower": "0", "Sectors": [ { - "SealProof": 8, - "SectorNumber": 9, + "SealProof": 0, + "SectorNumber": 0, "SectorKey": null, - "SealedCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } + "SealedCID": null } ], - "WorkerKey": "f01234", - "SectorSize": 34359738368, + "WorkerKey": "\u003cempty\u003e", + "SectorSize": 0, "PrevBeaconEntry": { - "Round": 42, - "Data": "Ynl0ZSBhcnJheQ==" + "Round": 0, + "Data": null }, - "BeaconEntries": [ - { - "Round": 42, - "Data": "Ynl0ZSBhcnJheQ==" - } - ], - "EligibleForMining": true + "BeaconEntries": null, + "EligibleForMining": false } ``` @@ -2657,13 +2275,13 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, "Signature": { @@ -2671,7 +2289,7 @@ Inputs: "Data": "Ynl0ZSBhcnJheQ==" }, "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ] @@ -2703,19 +2321,19 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ], { "MaxFee": "0", - "MsgUuid": "07070707-0707-0707-0707-070707070707" + "MsgUuid": "00000000-0000-0000-0000-000000000000" } ] ``` @@ -2730,13 +2348,13 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, "Signature": { @@ -2744,7 +2362,7 @@ Response: "Data": "Ynl0ZSBhcnJheQ==" }, "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ] @@ -2767,13 +2385,13 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, "Signature": { @@ -2781,7 +2399,7 @@ Inputs: "Data": "Ynl0ZSBhcnJheQ==" }, "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ] @@ -2823,14 +2441,12 @@ Inputs: `null` Response: ```json { - "PriorityAddrs": [ - "f01234" - ], - "SizeLimitHigh": 123, - "SizeLimitLow": 123, - "ReplaceByFeeRatio": 12.3, - "PruneCooldown": 60000000000, - "GasLimitOverestimation": 12.3 + "PriorityAddrs": null, + "SizeLimitHigh": 0, + "SizeLimitLow": 0, + "ReplaceByFeeRatio": 0, + "PruneCooldown": 0, + "GasLimitOverestimation": 0 } ``` @@ -2880,13 +2496,13 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, "Signature": { @@ -2894,7 +2510,7 @@ Response: "Data": "Ynl0ZSBhcnJheQ==" }, "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ] @@ -2916,13 +2532,13 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, "Signature": { @@ -2930,7 +2546,7 @@ Inputs: "Data": "Ynl0ZSBhcnJheQ==" }, "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ] @@ -2963,18 +2579,18 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, { "MaxFee": "0", - "MsgUuid": "07070707-0707-0707-0707-070707070707" + "MsgUuid": "00000000-0000-0000-0000-000000000000" } ] ``` @@ -2988,13 +2604,13 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, "Signature": { @@ -3002,7 +2618,7 @@ Response: "Data": "Ynl0ZSBhcnJheQ==" }, "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ``` @@ -3023,13 +2639,13 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, "Signature": { @@ -3037,7 +2653,7 @@ Inputs: "Data": "Ynl0ZSBhcnJheQ==" }, "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ] @@ -3081,13 +2697,13 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, "Signature": { @@ -3095,7 +2711,7 @@ Response: "Data": "Ynl0ZSBhcnJheQ==" }, "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ] @@ -3111,14 +2727,12 @@ Inputs: ```json [ { - "PriorityAddrs": [ - "f01234" - ], - "SizeLimitHigh": 123, - "SizeLimitLow": 123, - "ReplaceByFeeRatio": 12.3, - "PruneCooldown": 60000000000, - "GasLimitOverestimation": 12.3 + "PriorityAddrs": null, + "SizeLimitHigh": 0, + "SizeLimitLow": 0, + "ReplaceByFeeRatio": 0, + "PruneCooldown": 0, + "GasLimitOverestimation": 0 } ] ``` @@ -3143,13 +2757,13 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, "Signature": { @@ -3157,7 +2771,7 @@ Response: "Data": "Ynl0ZSBhcnJheQ==" }, "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } } @@ -3408,7 +3022,7 @@ Response: ```json [ { - "ID": 9, + "ID": 0, "To": "f01234", "Value": "0", "Method": 1, @@ -3476,9 +3090,9 @@ Inputs: Response: ```json { - "InitialBalance": "0", - "StartEpoch": 10101, - "UnlockDuration": 10101 + "InitialBalance": "\u003cnil\u003e", + "StartEpoch": 0, + "UnlockDuration": 0 } ``` @@ -3627,7 +3241,7 @@ Inputs: `null` Response: ```json { - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "ID": "", "Addrs": [ "/ip4/52.36.61.156/tcp/1347/p2p/12D3KooWFETiESTf1v4PGUvtnxMAcEFMzLZbJGg4tjWfGEimYior" ] @@ -3659,7 +3273,7 @@ Response: ```json { "Reachability": 1, - "PublicAddr": "string value" + "PublicAddr": "" } ``` @@ -3673,10 +3287,10 @@ Inputs: `null` Response: ```json { - "TotalIn": 9, - "TotalOut": 9, - "RateIn": 12.3, - "RateOut": 12.3 + "TotalIn": 0, + "TotalOut": 0, + "RateIn": 0, + "RateOut": 0 } ``` @@ -3730,12 +3344,8 @@ Inputs: "Peers": [ "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" ], - "IPAddrs": [ - "string value" - ], - "IPSubnets": [ - "string value" - ] + "IPAddrs": null, + "IPSubnets": null } ] ``` @@ -3755,12 +3365,8 @@ Response: "Peers": [ "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" ], - "IPAddrs": [ - "string value" - ], - "IPSubnets": [ - "string value" - ] + "IPAddrs": null, + "IPSubnets": null } ``` @@ -3776,12 +3382,8 @@ Inputs: "Peers": [ "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" ], - "IPAddrs": [ - "string value" - ], - "IPSubnets": [ - "string value" - ] + "IPAddrs": null, + "IPSubnets": null } ] ``` @@ -3797,7 +3399,7 @@ Inputs: ```json [ { - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "ID": "", "Addrs": [ "/ip4/52.36.61.156/tcp/1347/p2p/12D3KooWFETiESTf1v4PGUvtnxMAcEFMzLZbJGg4tjWfGEimYior" ] @@ -3850,7 +3452,7 @@ Inputs: Response: ```json { - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "ID": "", "Addrs": [ "/ip4/52.36.61.156/tcp/1347/p2p/12D3KooWFETiESTf1v4PGUvtnxMAcEFMzLZbJGg4tjWfGEimYior" ] @@ -3898,7 +3500,7 @@ Inputs: Response: ```json { - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "ID": "", "Agent": "string value", "Addrs": [ "string value" @@ -3906,16 +3508,7 @@ Response: "Protocols": [ "string value" ], - "ConnMgrMeta": { - "FirstSeen": "0001-01-01T00:00:00Z", - "Value": 123, - "Tags": { - "name": 42 - }, - "Conns": { - "name": "2021-03-08T22:52:18Z" - } - } + "ConnMgrMeta": null } ``` @@ -3930,7 +3523,7 @@ Response: ```json [ { - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "ID": "", "Addrs": [ "/ip4/52.36.61.156/tcp/1347/p2p/12D3KooWFETiESTf1v4PGUvtnxMAcEFMzLZbJGg4tjWfGEimYior" ] @@ -4009,7 +3602,7 @@ Response: ```json [ { - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "ID": "", "Score": { "Score": 12.3, "Topics": { @@ -4020,9 +3613,9 @@ Response: "InvalidMessageDeliveries": 3 } }, - "AppSpecificScore": 12.3, - "IPColocationFactor": 12.3, - "BehaviourPenalty": 12.3 + "AppSpecificScore": 0, + "IPColocationFactor": 0, + "BehaviourPenalty": 0 } } ] @@ -4068,19 +3661,19 @@ Response: ```json { "System": { - "NumStreamsInbound": 123, - "NumStreamsOutbound": 123, - "NumConnsInbound": 123, - "NumConnsOutbound": 123, - "NumFD": 123, + "NumStreamsInbound": 0, + "NumStreamsOutbound": 0, + "NumConnsInbound": 0, + "NumConnsOutbound": 0, + "NumFD": 0, "Memory": 9 }, "Transient": { - "NumStreamsInbound": 123, - "NumStreamsOutbound": 123, - "NumConnsInbound": 123, - "NumConnsOutbound": 123, - "NumFD": 123, + "NumStreamsInbound": 0, + "NumStreamsOutbound": 0, + "NumConnsInbound": 0, + "NumConnsOutbound": 0, + "NumFD": 0, "Memory": 9 }, "Services": { @@ -4228,9 +3821,7 @@ Response: ```json { "Channel": "f01234", - "WaitSentinel": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } + "WaitSentinel": null } ``` @@ -4277,9 +3868,9 @@ Inputs: [ { "Amount": "0", - "TimeLockMin": 10101, - "TimeLockMax": 10101, - "MinSettle": 10101, + "TimeLockMin": 0, + "TimeLockMax": 0, + "MinSettle": 0, "Extra": { "Actor": "f01234", "Method": 1, @@ -4294,15 +3885,13 @@ Response: ```json { "Channel": "f01234", - "WaitSentinel": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "WaitSentinel": null, "Vouchers": [ { - "ChannelAddr": "f01234", - "TimeLockMin": 10101, - "TimeLockMax": 10101, - "SecretHash": "Ynl0ZSBhcnJheQ==", + "ChannelAddr": "\u003cempty\u003e", + "TimeLockMin": 0, + "TimeLockMax": 0, + "SecretHash": null, "Extra": { "Actor": "f01234", "Method": 1, @@ -4311,7 +3900,7 @@ Response: "Lane": 42, "Nonce": 42, "Amount": "0", - "MinSettleHeight": 10101, + "MinSettleHeight": 0, "Merges": [ { "Lane": 42, @@ -4361,7 +3950,7 @@ Inputs: Response: ```json { - "ControlAddr": "f01234", + "ControlAddr": "\u003cempty\u003e", "Direction": 1 } ``` @@ -4376,10 +3965,10 @@ Inputs: [ "f01234", { - "ChannelAddr": "f01234", - "TimeLockMin": 10101, - "TimeLockMax": 10101, - "SecretHash": "Ynl0ZSBhcnJheQ==", + "ChannelAddr": "\u003cempty\u003e", + "TimeLockMin": 0, + "TimeLockMax": 0, + "SecretHash": null, "Extra": { "Actor": "f01234", "Method": 1, @@ -4388,7 +3977,7 @@ Inputs: "Lane": 42, "Nonce": 42, "Amount": "0", - "MinSettleHeight": 10101, + "MinSettleHeight": 0, "Merges": [ { "Lane": 42, @@ -4417,10 +4006,10 @@ Inputs: [ "f01234", { - "ChannelAddr": "f01234", - "TimeLockMin": 10101, - "TimeLockMax": 10101, - "SecretHash": "Ynl0ZSBhcnJheQ==", + "ChannelAddr": "\u003cempty\u003e", + "TimeLockMin": 0, + "TimeLockMax": 0, + "SecretHash": null, "Extra": { "Actor": "f01234", "Method": 1, @@ -4429,7 +4018,7 @@ Inputs: "Lane": 42, "Nonce": 42, "Amount": "0", - "MinSettleHeight": 10101, + "MinSettleHeight": 0, "Merges": [ { "Lane": 42, @@ -4458,10 +4047,10 @@ Inputs: [ "f01234", { - "ChannelAddr": "f01234", - "TimeLockMin": 10101, - "TimeLockMax": 10101, - "SecretHash": "Ynl0ZSBhcnJheQ==", + "ChannelAddr": "\u003cempty\u003e", + "TimeLockMin": 0, + "TimeLockMax": 0, + "SecretHash": null, "Extra": { "Actor": "f01234", "Method": 1, @@ -4470,7 +4059,7 @@ Inputs: "Lane": 42, "Nonce": 42, "Amount": "0", - "MinSettleHeight": 10101, + "MinSettleHeight": 0, "Merges": [ { "Lane": 42, @@ -4505,10 +4094,10 @@ Response: ```json { "Voucher": { - "ChannelAddr": "f01234", - "TimeLockMin": 10101, - "TimeLockMax": 10101, - "SecretHash": "Ynl0ZSBhcnJheQ==", + "ChannelAddr": "\u003cempty\u003e", + "TimeLockMin": 0, + "TimeLockMax": 0, + "SecretHash": null, "Extra": { "Actor": "f01234", "Method": 1, @@ -4517,7 +4106,7 @@ Response: "Lane": 42, "Nonce": 42, "Amount": "0", - "MinSettleHeight": 10101, + "MinSettleHeight": 0, "Merges": [ { "Lane": 42, @@ -4549,10 +4138,10 @@ Response: ```json [ { - "ChannelAddr": "f01234", - "TimeLockMin": 10101, - "TimeLockMax": 10101, - "SecretHash": "Ynl0ZSBhcnJheQ==", + "ChannelAddr": "\u003cempty\u003e", + "TimeLockMin": 0, + "TimeLockMax": 0, + "SecretHash": null, "Extra": { "Actor": "f01234", "Method": 1, @@ -4561,7 +4150,7 @@ Response: "Lane": 42, "Nonce": 42, "Amount": "0", - "MinSettleHeight": 10101, + "MinSettleHeight": 0, "Merges": [ { "Lane": 42, @@ -4586,10 +4175,10 @@ Inputs: [ "f01234", { - "ChannelAddr": "f01234", - "TimeLockMin": 10101, - "TimeLockMax": 10101, - "SecretHash": "Ynl0ZSBhcnJheQ==", + "ChannelAddr": "\u003cempty\u003e", + "TimeLockMin": 0, + "TimeLockMax": 0, + "SecretHash": null, "Extra": { "Actor": "f01234", "Method": 1, @@ -4598,7 +4187,7 @@ Inputs: "Lane": 42, "Nonce": 42, "Amount": "0", - "MinSettleHeight": 10101, + "MinSettleHeight": 0, "Merges": [ { "Lane": 42, @@ -4672,7 +4261,7 @@ Perms: read Inputs: ```json [ - 17 + 18 ] ``` @@ -4687,7 +4276,7 @@ Perms: read Inputs: ```json [ - 17 + 18 ] ``` @@ -4748,13 +4337,13 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, [ @@ -4771,33 +4360,25 @@ Inputs: Response: ```json { - "MsgCid": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "MsgCid": null, "Msg": { "Version": 42, "To": "f01234", "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, - "MsgRct": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, + "MsgRct": null, "GasCost": { - "Message": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "Message": null, "GasUsed": "0", "BaseFeeBurn": "0", "OverEstimationBurn": "0", @@ -4807,95 +4388,12 @@ Response: "TotalCost": "0" }, "ExecutionTrace": { - "Msg": { - "Version": 42, - "To": "f01234", - "From": "f01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==", - "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" - } - }, - "MsgRct": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, - "Error": "string value", - "Duration": 60000000000, - "GasCharges": [ - { - "Name": "string value", - "loc": [ - { - "File": "string value", - "Line": 123, - "Function": "string value" - } - ], - "tg": 9, - "cg": 9, - "sg": 9, - "vtg": 9, - "vcg": 9, - "vsg": 9, - "tt": 60000000000, - "ex": {} - } - ], - "Subcalls": [ - { - "Msg": { - "Version": 42, - "To": "f01234", - "From": "f01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==", - "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" - } - }, - "MsgRct": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, - "Error": "string value", - "Duration": 60000000000, - "GasCharges": [ - { - "Name": "string value", - "loc": [ - { - "File": "string value", - "Line": 123, - "Function": "string value" - } - ], - "tg": 9, - "cg": 9, - "sg": 9, - "vtg": 9, - "vcg": 9, - "vsg": 9, - "tt": 60000000000, - "ex": {} - } - ], - "Subcalls": null - } - ] + "Msg": null, + "MsgRct": null, + "Error": "", + "Duration": 0, + "GasCharges": null, + "Subcalls": null }, "Error": "string value", "Duration": 60000000000 @@ -4932,7 +4430,8 @@ Response: "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "Nonce": 42, - "Balance": "0" + "Balance": "0", + "Address": "\u003cempty\u003e" } } ``` @@ -5008,13 +4507,13 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ], @@ -5037,33 +4536,25 @@ Response: }, "Trace": [ { - "MsgCid": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "MsgCid": null, "Msg": { "Version": 42, "To": "f01234", "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, - "MsgRct": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, + "MsgRct": null, "GasCost": { - "Message": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "Message": null, "GasUsed": "0", "BaseFeeBurn": "0", "OverEstimationBurn": "0", @@ -5073,95 +4564,12 @@ Response: "TotalCost": "0" }, "ExecutionTrace": { - "Msg": { - "Version": 42, - "To": "f01234", - "From": "f01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==", - "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" - } - }, - "MsgRct": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, - "Error": "string value", - "Duration": 60000000000, - "GasCharges": [ - { - "Name": "string value", - "loc": [ - { - "File": "string value", - "Line": 123, - "Function": "string value" - } - ], - "tg": 9, - "cg": 9, - "sg": 9, - "vtg": 9, - "vcg": 9, - "vsg": 9, - "tt": 60000000000, - "ex": {} - } - ], - "Subcalls": [ - { - "Msg": { - "Version": 42, - "To": "f01234", - "From": "f01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==", - "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" - } - }, - "MsgRct": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, - "Error": "string value", - "Duration": 60000000000, - "GasCharges": [ - { - "Name": "string value", - "loc": [ - { - "File": "string value", - "Line": 123, - "Function": "string value" - } - ], - "tg": 9, - "cg": 9, - "sg": 9, - "vtg": 9, - "vcg": 9, - "vsg": 9, - "tt": 60000000000, - "ex": {} - } - ], - "Subcalls": null - } - ] + "Msg": null, + "MsgRct": null, + "Error": "", + "Duration": 0, + "GasCharges": null, + "Subcalls": null }, "Error": "string value", "Duration": 60000000000 @@ -5257,7 +4665,8 @@ Response: "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "Nonce": 42, - "Balance": "0" + "Balance": "0", + "Address": "\u003cempty\u003e" } ``` @@ -5292,8 +4701,8 @@ Response: "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "Size": 1032, - "TermMin": 10101, - "TermMax": 10101, + "TermMin": 0, + "TermMax": 0, "Expiration": 10101 } ``` @@ -5328,8 +4737,8 @@ Response: "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "Size": 1032, - "TermMin": 10101, - "TermMax": 10101, + "TermMin": 0, + "TermMax": 0, "Expiration": 10101 } ``` @@ -5388,9 +4797,9 @@ Response: "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "Size": 1032, - "TermMin": 10101, - "TermMax": 10101, - "TermStart": 10101, + "TermMin": 0, + "TermMax": 0, + "TermStart": 0, "Sector": 9 } ``` @@ -5429,36 +4838,34 @@ Inputs: `null` Response: ```json { - "NetworkName": "lotus", - "BlockDelaySecs": 42, + "NetworkName": "", + "BlockDelaySecs": 0, "ConsensusMinerMinPower": "0", - "SupportedProofTypes": [ - 8 - ], - "PreCommitChallengeDelay": 10101, + "SupportedProofTypes": null, + "PreCommitChallengeDelay": 0, "ForkUpgradeParams": { - "UpgradeSmokeHeight": 10101, - "UpgradeBreezeHeight": 10101, - "UpgradeIgnitionHeight": 10101, - "UpgradeLiftoffHeight": 10101, - "UpgradeAssemblyHeight": 10101, - "UpgradeRefuelHeight": 10101, - "UpgradeTapeHeight": 10101, - "UpgradeKumquatHeight": 10101, - "UpgradePriceListOopsHeight": 10101, - "BreezeGasTampingDuration": 10101, - "UpgradeCalicoHeight": 10101, - "UpgradePersianHeight": 10101, - "UpgradeOrangeHeight": 10101, - "UpgradeClausHeight": 10101, - "UpgradeTrustHeight": 10101, - "UpgradeNorwegianHeight": 10101, - "UpgradeTurboHeight": 10101, - "UpgradeHyperdriveHeight": 10101, - "UpgradeChocolateHeight": 10101, - "UpgradeOhSnapHeight": 10101, - "UpgradeSkyrHeight": 10101, - "UpgradeSharkHeight": 10101 + "UpgradeSmokeHeight": 0, + "UpgradeBreezeHeight": 0, + "UpgradeIgnitionHeight": 0, + "UpgradeLiftoffHeight": 0, + "UpgradeAssemblyHeight": 0, + "UpgradeRefuelHeight": 0, + "UpgradeTapeHeight": 0, + "UpgradeKumquatHeight": 0, + "UpgradePriceListOopsHeight": 0, + "BreezeGasTampingDuration": 0, + "UpgradeCalicoHeight": 0, + "UpgradePersianHeight": 0, + "UpgradeOrangeHeight": 0, + "UpgradeClausHeight": 0, + "UpgradeTrustHeight": 0, + "UpgradeNorwegianHeight": 0, + "UpgradeTurboHeight": 0, + "UpgradeHyperdriveHeight": 0, + "UpgradeChocolateHeight": 0, + "UpgradeOhSnapHeight": 0, + "UpgradeSkyrHeight": 0, + "UpgradeSharkHeight": 0 } } ``` @@ -5549,7 +4956,7 @@ Response: { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 0 } ``` @@ -5718,24 +5125,22 @@ Response: { "t026363": { "Proposal": { - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceSize": 1032, - "VerifiedDeal": true, + "PieceCID": null, + "PieceSize": 0, + "VerifiedDeal": false, "Client": "f01234", "Provider": "f01234", "Label": "", - "StartEpoch": 10101, - "EndEpoch": 10101, + "StartEpoch": 0, + "EndEpoch": 0, "StoragePricePerEpoch": "0", "ProviderCollateral": "0", "ClientCollateral": "0" }, "State": { - "SectorStartEpoch": 10101, - "LastUpdatedEpoch": 10101, - "SlashEpoch": 10101, + "SectorStartEpoch": 0, + "LastUpdatedEpoch": 0, + "SlashEpoch": 0, "VerifiedClaim": 0 } } @@ -5797,24 +5202,22 @@ Response: ```json { "Proposal": { - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceSize": 1032, - "VerifiedDeal": true, + "PieceCID": null, + "PieceSize": 0, + "VerifiedDeal": false, "Client": "f01234", "Provider": "f01234", "Label": "", - "StartEpoch": 10101, - "EndEpoch": 10101, + "StartEpoch": 0, + "EndEpoch": 0, "StoragePricePerEpoch": "0", "ProviderCollateral": "0", "ClientCollateral": "0" }, "State": { - "SectorStartEpoch": 10101, - "LastUpdatedEpoch": 10101, - "SlashEpoch": 10101, + "SectorStartEpoch": 0, + "LastUpdatedEpoch": 0, + "SlashEpoch": 0, "VerifiedClaim": 0 } } @@ -5845,14 +5248,10 @@ Response: ```json [ { - "SectorNumber": 9, - "SealProof": 8, - "SealedCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "DealIDs": [ - 5432 - ], + "SectorNumber": 0, + "SealProof": 0, + "SealedCID": null, + "DealIDs": null, "Activation": 10101, "Expiration": 10101, "DealWeight": "0", @@ -5860,10 +5259,10 @@ Response: "InitialPledge": "0", "ExpectedDayReward": "0", "ExpectedStoragePledge": "0", - "ReplacedSectorAge": 10101, + "ReplacedSectorAge": 0, "ReplacedDayReward": "0", "SectorKeyCID": null, - "SimpleQAPower": true + "SimpleQAPower": false } ] ``` @@ -5917,10 +5316,9 @@ Response: [ { "PostSubmissions": [ - 5, - 1 + 0 ], - "DisputableProofCount": 42 + "DisputableProofCount": 0 } ] ``` @@ -5980,32 +5378,20 @@ Response: { "Owner": "f01234", "Worker": "f01234", - "NewWorker": "f01234", - "ControlAddresses": [ - "f01234" - ], - "WorkerChangeEpoch": 10101, - "PeerId": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "NewWorker": "\u003cempty\u003e", + "ControlAddresses": null, + "WorkerChangeEpoch": 0, + "PeerId": null, "Multiaddrs": [ "Ynl0ZSBhcnJheQ==" ], - "WindowPoStProofType": 8, - "SectorSize": 34359738368, - "WindowPoStPartitionSectors": 42, - "ConsensusFaultElapsed": 10101, + "WindowPoStProofType": 0, + "SectorSize": 0, + "WindowPoStPartitionSectors": 0, + "ConsensusFaultElapsed": 0, "Beneficiary": "f01234", - "BeneficiaryTerm": { - "Quota": "0", - "UsedQuota": "0", - "Expiration": 10101 - }, - "PendingBeneficiaryTerm": { - "NewBeneficiary": "f01234", - "NewQuota": "0", - "NewExpiration": 10101, - "ApprovedByBeneficiary": true, - "ApprovedByNominee": true - } + "BeneficiaryTerm": null, + "PendingBeneficiaryTerm": null } ``` @@ -6020,15 +5406,11 @@ Inputs: [ "f01234", { - "SealProof": 8, - "SectorNumber": 9, - "SealedCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "SealRandEpoch": 10101, - "DealIDs": [ - 5432 - ], + "SealProof": 0, + "SectorNumber": 0, + "SealedCID": null, + "SealRandEpoch": 0, + "DealIDs": null, "Expiration": 10101, "UnsealedCid": null }, @@ -6072,24 +5454,19 @@ Response: [ { "AllSectors": [ - 5, - 1 + 0 ], "FaultySectors": [ - 5, - 1 + 0 ], "RecoveringSectors": [ - 5, - 1 + 0 ], "LiveSectors": [ - 5, - 1 + 0 ], "ActiveSectors": [ - 5, - 1 + 0 ] } ] @@ -6127,7 +5504,7 @@ Response: "RawBytePower": "0", "QualityAdjPower": "0" }, - "HasMinPower": true + "HasMinPower": false } ``` @@ -6142,15 +5519,11 @@ Inputs: [ "f01234", { - "SealProof": 8, - "SectorNumber": 9, - "SealedCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "SealRandEpoch": 10101, - "DealIDs": [ - 5432 - ], + "SealProof": 0, + "SectorNumber": 0, + "SealedCID": null, + "SealRandEpoch": 0, + "DealIDs": null, "Expiration": 10101, "UnsealedCid": null }, @@ -6192,18 +5565,18 @@ Inputs: Response: ```json { - "CurrentEpoch": 10101, - "PeriodStart": 10101, + "CurrentEpoch": 0, + "PeriodStart": 0, "Index": 42, "Open": 10101, "Close": 10101, "Challenge": 10101, - "FaultCutoff": 10101, - "WPoStPeriodDeadlines": 42, - "WPoStProvingPeriod": 10101, - "WPoStChallengeWindow": 10101, - "WPoStChallengeLookback": 10101, - "FaultDeclarationCutoff": 10101 + "FaultCutoff": 0, + "WPoStPeriodDeadlines": 0, + "WPoStProvingPeriod": 0, + "WPoStChallengeWindow": 0, + "WPoStChallengeLookback": 0, + "FaultDeclarationCutoff": 0 } ``` @@ -6318,14 +5691,10 @@ Response: ```json [ { - "SectorNumber": 9, - "SealProof": 8, - "SealedCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "DealIDs": [ - 5432 - ], + "SectorNumber": 0, + "SealProof": 0, + "SealedCID": null, + "DealIDs": null, "Activation": 10101, "Expiration": 10101, "DealWeight": "0", @@ -6333,10 +5702,10 @@ Response: "InitialPledge": "0", "ExpectedDayReward": "0", "ExpectedStoragePledge": "0", - "ReplacedSectorAge": 10101, + "ReplacedSectorAge": 0, "ReplacedDayReward": "0", "SectorKeyCID": null, - "SimpleQAPower": true + "SimpleQAPower": false } ] ``` @@ -6371,7 +5740,7 @@ Inputs: ] ``` -Response: `17` +Response: `18` ### StateReadState StateReadState returns the indicated actor's state. @@ -6447,33 +5816,25 @@ Inputs: Response: ```json { - "MsgCid": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "MsgCid": null, "Msg": { "Version": 42, "To": "f01234", "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, - "MsgRct": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, + "MsgRct": null, "GasCost": { - "Message": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "Message": null, "GasUsed": "0", "BaseFeeBurn": "0", "OverEstimationBurn": "0", @@ -6483,95 +5844,12 @@ Response: "TotalCost": "0" }, "ExecutionTrace": { - "Msg": { - "Version": 42, - "To": "f01234", - "From": "f01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==", - "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" - } - }, - "MsgRct": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, - "Error": "string value", - "Duration": 60000000000, - "GasCharges": [ - { - "Name": "string value", - "loc": [ - { - "File": "string value", - "Line": 123, - "Function": "string value" - } - ], - "tg": 9, - "cg": 9, - "sg": 9, - "vtg": 9, - "vcg": 9, - "vsg": 9, - "tt": 60000000000, - "ex": {} - } - ], - "Subcalls": [ - { - "Msg": { - "Version": 42, - "To": "f01234", - "From": "f01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==", - "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" - } - }, - "MsgRct": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, - "Error": "string value", - "Duration": 60000000000, - "GasCharges": [ - { - "Name": "string value", - "loc": [ - { - "File": "string value", - "Line": 123, - "Function": "string value" - } - ], - "tg": 9, - "cg": 9, - "sg": 9, - "vtg": 9, - "vcg": 9, - "vsg": 9, - "tt": 60000000000, - "ex": {} - } - ], - "Subcalls": null - } - ] + "Msg": null, + "MsgRct": null, + "Error": "", + "Duration": 0, + "GasCharges": null, + "Subcalls": null }, "Error": "string value", "Duration": 60000000000 @@ -6616,17 +5894,10 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 0 }, - "ReturnDec": {}, - "TipSet": [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ], + "ReturnDec": null, + "TipSet": [], "Height": 10101 } ``` @@ -6670,17 +5941,10 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 0 }, - "ReturnDec": {}, - "TipSet": [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ], + "ReturnDec": null, + "TipSet": [], "Height": 10101 } ``` @@ -6710,7 +5974,7 @@ Inputs: Response: ```json { - "OnTime": 10101, + "OnTime": 0, "Early": 10101 } ``` @@ -6742,14 +6006,10 @@ Inputs: Response: ```json { - "SectorNumber": 9, - "SealProof": 8, - "SealedCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "DealIDs": [ - 5432 - ], + "SectorNumber": 0, + "SealProof": 0, + "SealedCID": null, + "DealIDs": null, "Activation": 10101, "Expiration": 10101, "DealWeight": "0", @@ -6757,10 +6017,10 @@ Response: "InitialPledge": "0", "ExpectedDayReward": "0", "ExpectedStoragePledge": "0", - "ReplacedSectorAge": 10101, + "ReplacedSectorAge": 0, "ReplacedDayReward": "0", "SectorKeyCID": null, - "SimpleQAPower": true + "SimpleQAPower": false } ``` @@ -6820,20 +6080,16 @@ Response: ```json { "Info": { - "SealProof": 8, - "SectorNumber": 9, - "SealedCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "SealRandEpoch": 10101, - "DealIDs": [ - 5432 - ], + "SealProof": 0, + "SectorNumber": 0, + "SealedCID": null, + "SealRandEpoch": 0, + "DealIDs": null, "Expiration": 10101, "UnsealedCid": null }, - "PreCommitDeposit": "0", - "PreCommitEpoch": 10101 + "PreCommitDeposit": "\u003cnil\u003e", + "PreCommitEpoch": 0 } ``` @@ -6861,12 +6117,12 @@ Inputs: Response: ```json { - "FilVested": "0", - "FilMined": "0", - "FilBurnt": "0", - "FilLocked": "0", - "FilCirculating": "0", - "FilReserveDisbursed": "0" + "FilVested": "\u003cnil\u003e", + "FilMined": "\u003cnil\u003e", + "FilBurnt": "\u003cnil\u003e", + "FilLocked": "\u003cnil\u003e", + "FilCirculating": "\u003cnil\u003e", + "FilReserveDisbursed": "\u003cnil\u003e" } ``` @@ -6982,17 +6238,10 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 0 }, - "ReturnDec": {}, - "TipSet": [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ], + "ReturnDec": null, + "TipSet": [], "Height": 10101 } ``` @@ -7039,17 +6288,10 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 0 }, - "ReturnDec": {}, - "TipSet": [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ], + "ReturnDec": null, + "TipSet": [], "Height": 10101 } ``` @@ -7113,24 +6355,11 @@ Response: { "Miner": "f01234", "Ticket": { - "VRFProof": "Ynl0ZSBhcnJheQ==" + "VRFProof": null }, - "ElectionProof": { - "WinCount": 9, - "VRFProof": "Ynl0ZSBhcnJheQ==" - }, - "BeaconEntries": [ - { - "Round": 42, - "Data": "Ynl0ZSBhcnJheQ==" - } - ], - "WinPoStProof": [ - { - "PoStProof": 8, - "ProofBytes": "Ynl0ZSBhcnJheQ==" - } - ], + "ElectionProof": null, + "BeaconEntries": null, + "WinPoStProof": null, "Parents": [ { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" @@ -7138,25 +6367,15 @@ Response: ], "ParentWeight": "0", "Height": 10101, - "ParentStateRoot": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "ParentMessageReceipts": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "ParentStateRoot": null, + "ParentMessageReceipts": null, "Messages": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "BLSAggregate": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, + "BLSAggregate": null, "Timestamp": 42, - "BlockSig": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "ForkSignaling": 42, + "BlockSig": null, + "ForkSignaling": 0, "ParentBaseFee": "0" } ``` @@ -7190,27 +6409,8 @@ Inputs: `null` Response: ```json { - "ActiveSyncs": [ - { - "WorkerID": 42, - "Base": { - "Cids": null, - "Blocks": null, - "Height": 0 - }, - "Target": { - "Cids": null, - "Blocks": null, - "Height": 0 - }, - "Stage": 1, - "Height": 10101, - "Start": "0001-01-01T00:00:00Z", - "End": "0001-01-01T00:00:00Z", - "Message": "string value" - } - ], - "VMApplied": 42 + "ActiveSyncs": null, + "VMApplied": 0 } ``` @@ -7228,24 +6428,11 @@ Inputs: "Header": { "Miner": "f01234", "Ticket": { - "VRFProof": "Ynl0ZSBhcnJheQ==" + "VRFProof": null }, - "ElectionProof": { - "WinCount": 9, - "VRFProof": "Ynl0ZSBhcnJheQ==" - }, - "BeaconEntries": [ - { - "Round": 42, - "Data": "Ynl0ZSBhcnJheQ==" - } - ], - "WinPoStProof": [ - { - "PoStProof": 8, - "ProofBytes": "Ynl0ZSBhcnJheQ==" - } - ], + "ElectionProof": null, + "BeaconEntries": null, + "WinPoStProof": null, "Parents": [ { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" @@ -7253,37 +6440,19 @@ Inputs: ], "ParentWeight": "0", "Height": 10101, - "ParentStateRoot": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "ParentMessageReceipts": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "ParentStateRoot": null, + "ParentMessageReceipts": null, "Messages": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "BLSAggregate": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, + "BLSAggregate": null, "Timestamp": 42, - "BlockSig": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "ForkSignaling": 42, + "BlockSig": null, + "ForkSignaling": 0, "ParentBaseFee": "0" }, - "BlsMessages": [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } - ], - "SecpkMessages": [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } - ] + "BlsMessages": null, + "SecpkMessages": null } ] ``` @@ -7399,7 +6568,7 @@ Response: ```json { "Type": "bls", - "PrivateKey": "Ynl0ZSBhcnJheQ==" + "PrivateKey": null } ``` @@ -7429,7 +6598,7 @@ Inputs: [ { "Type": "bls", - "PrivateKey": "Ynl0ZSBhcnJheQ==" + "PrivateKey": null } ] ``` @@ -7521,13 +6690,13 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ] @@ -7542,13 +6711,13 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, "Signature": { @@ -7556,7 +6725,7 @@ Response: "Data": "Ynl0ZSBhcnJheQ==" }, "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ``` diff --git a/documentation/en/api-v1-unstable-methods.md b/documentation/en/api-v1-unstable-methods.md index 9c104718c..35e63999d 100644 --- a/documentation/en/api-v1-unstable-methods.md +++ b/documentation/en/api-v1-unstable-methods.md @@ -314,8 +314,8 @@ Response: ```json { "Version": "string value", - "APIVersion": 131840, - "BlockDelay": 42 + "APIVersion": 0, + "BlockDelay": 0 } ``` @@ -453,24 +453,11 @@ Response: { "Miner": "f01234", "Ticket": { - "VRFProof": "Ynl0ZSBhcnJheQ==" + "VRFProof": null }, - "ElectionProof": { - "WinCount": 9, - "VRFProof": "Ynl0ZSBhcnJheQ==" - }, - "BeaconEntries": [ - { - "Round": 42, - "Data": "Ynl0ZSBhcnJheQ==" - } - ], - "WinPoStProof": [ - { - "PoStProof": 8, - "ProofBytes": "Ynl0ZSBhcnJheQ==" - } - ], + "ElectionProof": null, + "BeaconEntries": null, + "WinPoStProof": null, "Parents": [ { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" @@ -478,25 +465,15 @@ Response: ], "ParentWeight": "0", "Height": 10101, - "ParentStateRoot": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "ParentMessageReceipts": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "ParentStateRoot": null, + "ParentMessageReceipts": null, "Messages": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "BLSAggregate": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, + "BLSAggregate": null, "Timestamp": 42, - "BlockSig": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "ForkSignaling": 42, + "BlockSig": null, + "ForkSignaling": 0, "ParentBaseFee": "0" } ``` @@ -530,49 +507,8 @@ Inputs: Response: ```json { - "BlsMessages": [ - { - "Version": 42, - "To": "f01234", - "From": "f01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==", - "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" - } - } - ], - "SecpkMessages": [ - { - "Message": { - "Version": 42, - "To": "f01234", - "From": "f01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==", - "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" - } - }, - "Signature": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" - } - } - ], + "BlsMessages": null, + "SecpkMessages": null, "Cids": [ { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" @@ -622,13 +558,13 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ``` @@ -666,13 +602,13 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } } @@ -730,13 +666,13 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } } @@ -766,7 +702,7 @@ Response: { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 0 } ] ``` @@ -986,8 +922,8 @@ Inputs: ```json [ { - "MovingGC": true, - "RetainState": 9 + "MovingGC": false, + "RetainState": 0 } ] ``` @@ -1169,16 +1105,14 @@ Inputs: `null` Response: ```json { - "TransferID": 3, + "TransferID": 0, "Status": 1, - "BaseCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "IsInitiator": true, - "IsSender": true, + "BaseCID": null, + "IsInitiator": false, + "IsSender": false, "Voucher": "string value", "Message": "string value", - "OtherPeer": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "OtherPeer": "", "Transferred": 42, "Stages": { "Stages": [ @@ -1217,11 +1151,9 @@ Inputs: Response: ```json { - "PayloadSize": 9, - "PieceSize": 1032, - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } + "PayloadSize": 0, + "PieceSize": 0, + "PieceCID": null } ``` @@ -1243,8 +1175,8 @@ Inputs: Response: ```json { - "PayloadSize": 9, - "PieceSize": 1032 + "PayloadSize": 0, + "PieceSize": 0 } ``` @@ -1261,18 +1193,13 @@ Inputs: "Root": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "DAGs": [ - { - "DataSelector": "Links/21/Hash/Links/42/Hash", - "ExportMerkleProof": true - } - ], - "FromLocalCAR": "string value", - "DealID": 5 + "DAGs": null, + "FromLocalCAR": "", + "DealID": 0 }, { "Path": "string value", - "IsCAR": true + "IsCAR": false } ] ``` @@ -1308,12 +1235,12 @@ Response: "MinPrice": "0", "UnsealPrice": "0", "PricePerByte": "0", - "PaymentInterval": 42, - "PaymentIntervalIncrease": 42, + "PaymentInterval": 0, + "PaymentIntervalIncrease": 0, "Miner": "f01234", "MinerPeer": { - "Address": "f01234", - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "Address": "\u003cempty\u003e", + "ID": "", "PieceCID": null } } @@ -1331,7 +1258,7 @@ Inputs: [ { "Path": "string value", - "IsCAR": true + "IsCAR": false }, "string value" ] @@ -1357,81 +1284,21 @@ Inputs: Response: ```json { - "ProposalCid": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "ProposalCid": null, "State": 42, "Message": "string value", - "DealStages": { - "Stages": [ - { - "Name": "string value", - "Description": "string value", - "ExpectedDuration": "string value", - "CreatedTime": "0001-01-01T00:00:00Z", - "UpdatedTime": "0001-01-01T00:00:00Z", - "Logs": [ - { - "Log": "string value", - "UpdatedTime": "0001-01-01T00:00:00Z" - } - ] - } - ] - }, + "DealStages": null, "Provider": "f01234", - "DataRef": { - "TransferType": "string value", - "Root": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceCid": null, - "PieceSize": 1024, - "RawBlockSize": 42 - }, - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "DataRef": null, + "PieceCID": null, "Size": 42, "PricePerEpoch": "0", "Duration": 42, - "DealID": 5432, + "DealID": 0, "CreationTime": "0001-01-01T00:00:00Z", "Verified": true, - "TransferChannelID": { - "Initiator": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Responder": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "ID": 3 - }, - "DataTransfer": { - "TransferID": 3, - "Status": 1, - "BaseCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "IsInitiator": true, - "IsSender": true, - "Voucher": "string value", - "Message": "string value", - "OtherPeer": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Transferred": 42, - "Stages": { - "Stages": [ - { - "Name": "string value", - "Description": "string value", - "CreatedTime": "0001-01-01T00:00:00Z", - "UpdatedTime": "0001-01-01T00:00:00Z", - "Logs": [ - { - "Log": "string value", - "UpdatedTime": "0001-01-01T00:00:00Z" - } - ] - } - ] - } - } + "TransferChannelID": null, + "DataTransfer": null } ``` @@ -1461,81 +1328,21 @@ Inputs: `null` Response: ```json { - "ProposalCid": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "ProposalCid": null, "State": 42, "Message": "string value", - "DealStages": { - "Stages": [ - { - "Name": "string value", - "Description": "string value", - "ExpectedDuration": "string value", - "CreatedTime": "0001-01-01T00:00:00Z", - "UpdatedTime": "0001-01-01T00:00:00Z", - "Logs": [ - { - "Log": "string value", - "UpdatedTime": "0001-01-01T00:00:00Z" - } - ] - } - ] - }, + "DealStages": null, "Provider": "f01234", - "DataRef": { - "TransferType": "string value", - "Root": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceCid": null, - "PieceSize": 1024, - "RawBlockSize": 42 - }, - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "DataRef": null, + "PieceCID": null, "Size": 42, - "PricePerEpoch": "0", + "PricePerEpoch": "\u003cnil\u003e", "Duration": 42, - "DealID": 5432, + "DealID": 0, "CreationTime": "0001-01-01T00:00:00Z", "Verified": true, - "TransferChannelID": { - "Initiator": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Responder": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "ID": 3 - }, - "DataTransfer": { - "TransferID": 3, - "Status": 1, - "BaseCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "IsInitiator": true, - "IsSender": true, - "Voucher": "string value", - "Message": "string value", - "OtherPeer": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Transferred": 42, - "Stages": { - "Stages": [ - { - "Name": "string value", - "Description": "string value", - "CreatedTime": "0001-01-01T00:00:00Z", - "UpdatedTime": "0001-01-01T00:00:00Z", - "Logs": [ - { - "Log": "string value", - "UpdatedTime": "0001-01-01T00:00:00Z" - } - ] - } - ] - } - } + "TransferChannelID": null, + "DataTransfer": null } ``` @@ -1550,53 +1357,19 @@ Inputs: `null` Response: ```json { - "PayloadCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "ID": 5, + "PayloadCID": null, + "ID": 0, "PieceCID": null, - "PricePerByte": "0", - "UnsealPrice": "0", + "PricePerByte": "\u003cnil\u003e", + "UnsealPrice": "\u003cnil\u003e", "Status": 0, "Message": "string value", "Provider": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "BytesReceived": 42, - "BytesPaidFor": 42, - "TotalPaid": "0", - "TransferChannelID": { - "Initiator": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Responder": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "ID": 3 - }, - "DataTransfer": { - "TransferID": 3, - "Status": 1, - "BaseCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "IsInitiator": true, - "IsSender": true, - "Voucher": "string value", - "Message": "string value", - "OtherPeer": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Transferred": 42, - "Stages": { - "Stages": [ - { - "Name": "string value", - "Description": "string value", - "CreatedTime": "0001-01-01T00:00:00Z", - "UpdatedTime": "0001-01-01T00:00:00Z", - "Logs": [ - { - "Log": "string value", - "UpdatedTime": "0001-01-01T00:00:00Z" - } - ] - } - ] - } - }, + "BytesReceived": 0, + "BytesPaidFor": 0, + "TotalPaid": "\u003cnil\u003e", + "TransferChannelID": null, + "DataTransfer": null, "Event": 5 } ``` @@ -1629,7 +1402,7 @@ Inputs: [ { "Path": "string value", - "IsCAR": true + "IsCAR": false } ] ``` @@ -1640,7 +1413,7 @@ Response: "Root": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "ImportID": 50 + "ImportID": 0 } ``` @@ -1656,16 +1429,14 @@ Response: ```json [ { - "TransferID": 3, + "TransferID": 0, "Status": 1, - "BaseCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "IsInitiator": true, - "IsSender": true, + "BaseCID": null, + "IsInitiator": false, + "IsSender": false, "Voucher": "string value", "Message": "string value", - "OtherPeer": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "OtherPeer": "", "Transferred": 42, "Stages": { "Stages": [ @@ -1699,81 +1470,21 @@ Response: ```json [ { - "ProposalCid": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "ProposalCid": null, "State": 42, "Message": "string value", - "DealStages": { - "Stages": [ - { - "Name": "string value", - "Description": "string value", - "ExpectedDuration": "string value", - "CreatedTime": "0001-01-01T00:00:00Z", - "UpdatedTime": "0001-01-01T00:00:00Z", - "Logs": [ - { - "Log": "string value", - "UpdatedTime": "0001-01-01T00:00:00Z" - } - ] - } - ] - }, + "DealStages": null, "Provider": "f01234", - "DataRef": { - "TransferType": "string value", - "Root": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceCid": null, - "PieceSize": 1024, - "RawBlockSize": 42 - }, - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "DataRef": null, + "PieceCID": null, "Size": 42, "PricePerEpoch": "0", "Duration": 42, - "DealID": 5432, + "DealID": 0, "CreationTime": "0001-01-01T00:00:00Z", "Verified": true, - "TransferChannelID": { - "Initiator": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Responder": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "ID": 3 - }, - "DataTransfer": { - "TransferID": 3, - "Status": 1, - "BaseCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "IsInitiator": true, - "IsSender": true, - "Voucher": "string value", - "Message": "string value", - "OtherPeer": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Transferred": 42, - "Stages": { - "Stages": [ - { - "Name": "string value", - "Description": "string value", - "CreatedTime": "0001-01-01T00:00:00Z", - "UpdatedTime": "0001-01-01T00:00:00Z", - "Logs": [ - { - "Log": "string value", - "UpdatedTime": "0001-01-01T00:00:00Z" - } - ] - } - ] - } - } + "TransferChannelID": null, + "DataTransfer": null } ] ``` @@ -1794,8 +1505,8 @@ Response: "Err": "string value", "Root": null, "Source": "string value", - "FilePath": "string value", - "CARPath": "string value" + "FilePath": "", + "CARPath": "" } ] ``` @@ -1812,53 +1523,19 @@ Response: ```json [ { - "PayloadCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "ID": 5, + "PayloadCID": null, + "ID": 0, "PieceCID": null, "PricePerByte": "0", "UnsealPrice": "0", "Status": 0, "Message": "string value", "Provider": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "BytesReceived": 42, - "BytesPaidFor": 42, + "BytesReceived": 0, + "BytesPaidFor": 0, "TotalPaid": "0", - "TransferChannelID": { - "Initiator": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Responder": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "ID": 3 - }, - "DataTransfer": { - "TransferID": 3, - "Status": 1, - "BaseCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "IsInitiator": true, - "IsSender": true, - "Voucher": "string value", - "Message": "string value", - "OtherPeer": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Transferred": 42, - "Stages": { - "Stages": [ - { - "Name": "string value", - "Description": "string value", - "CreatedTime": "0001-01-01T00:00:00Z", - "UpdatedTime": "0001-01-01T00:00:00Z", - "Logs": [ - { - "Log": "string value", - "UpdatedTime": "0001-01-01T00:00:00Z" - } - ] - } - ] - } - }, + "TransferChannelID": null, + "DataTransfer": null, "Event": 5 } ] @@ -1890,15 +1567,15 @@ Response: }, "Piece": null, "Size": 42, - "MinPrice": "0", - "UnsealPrice": "0", - "PricePerByte": "0", - "PaymentInterval": 42, - "PaymentIntervalIncrease": 42, + "MinPrice": "\u003cnil\u003e", + "UnsealPrice": "\u003cnil\u003e", + "PricePerByte": "\u003cnil\u003e", + "PaymentInterval": 0, + "PaymentIntervalIncrease": 0, "Miner": "f01234", "MinerPeer": { - "Address": "f01234", - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "Address": "\u003cempty\u003e", + "ID": "", "PieceCID": null } } @@ -1924,16 +1601,14 @@ Response: "Response": { "Price": "0", "VerifiedPrice": "0", - "MinPieceSize": 1032, - "MaxPieceSize": 1032, + "MinPieceSize": 0, + "MaxPieceSize": 0, "Miner": "f01234", "Timestamp": 10101, "Expiry": 10101, - "SeqNo": 42 + "SeqNo": 0 }, - "DealProtocols": [ - "string value" - ] + "DealProtocols": null } ``` @@ -1983,20 +1658,15 @@ Inputs: "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "Piece": null, - "DataSelector": "Links/21/Hash/Links/42/Hash", + "DataSelector": null, "Size": 42, "Total": "0", - "UnsealPrice": "0", - "PaymentInterval": 42, - "PaymentIntervalIncrease": 42, + "UnsealPrice": "\u003cnil\u003e", + "PaymentInterval": 0, + "PaymentIntervalIncrease": 0, "Client": "f01234", "Miner": "f01234", - "MinerPeer": { - "Address": "f01234", - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "PieceCID": null - }, - "RemoteStore": "00000000-0000-0000-0000-000000000000" + "MinerPeer": null } ] ``` @@ -2004,7 +1674,7 @@ Inputs: Response: ```json { - "DealID": 5 + "DealID": 0 } ``` @@ -2050,22 +1720,22 @@ Inputs: [ { "Data": { - "TransferType": "string value", + "TransferType": "", "Root": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "PieceCid": null, - "PieceSize": 1024, - "RawBlockSize": 42 + "PieceSize": 0, + "RawBlockSize": 0 }, "Wallet": "f01234", "Miner": "f01234", "EpochPrice": "0", - "MinBlocksDuration": 42, + "MinBlocksDuration": 0, "ProviderCollateral": "0", - "DealStartEpoch": 10101, - "FastRetrieval": true, - "VerifiedDeal": true + "DealStartEpoch": 0, + "FastRetrieval": false, + "VerifiedDeal": false } ] ``` @@ -2083,22 +1753,22 @@ Inputs: [ { "Data": { - "TransferType": "string value", + "TransferType": "", "Root": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "PieceCid": null, - "PieceSize": 1024, - "RawBlockSize": 42 + "PieceSize": 0, + "RawBlockSize": 0 }, "Wallet": "f01234", "Miner": "f01234", "EpochPrice": "0", - "MinBlocksDuration": 42, + "MinBlocksDuration": 0, "ProviderCollateral": "0", - "DealStartEpoch": 10101, - "FastRetrieval": true, - "VerifiedDeal": true + "DealStartEpoch": 0, + "FastRetrieval": false, + "VerifiedDeal": false } ] ``` @@ -2144,13 +1814,13 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, 9, @@ -2183,13 +1853,13 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, [ @@ -2246,18 +1916,18 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, { "MaxFee": "0", - "MsgUuid": "07070707-0707-0707-0707-070707070707" + "MsgUuid": "00000000-0000-0000-0000-000000000000" }, [ { @@ -2278,13 +1948,13 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ``` @@ -2320,16 +1990,8 @@ Response: "Subsystem": "string value" }, "Active": true, - "LastActive": { - "Type": "string value", - "Message": "json raw message", - "Time": "0001-01-01T00:00:00Z" - }, - "LastResolved": { - "Type": "string value", - "Message": "json raw message", - "Time": "0001-01-01T00:00:00Z" - } + "LastActive": null, + "LastResolved": null } ] ``` @@ -2485,18 +2147,13 @@ Inputs: } ], "Ticket": { - "VRFProof": "Ynl0ZSBhcnJheQ==" + "VRFProof": null }, "Eproof": { - "WinCount": 9, - "VRFProof": "Ynl0ZSBhcnJheQ==" + "WinCount": 0, + "VRFProof": null }, - "BeaconValues": [ - { - "Round": 42, - "Data": "Ynl0ZSBhcnJheQ==" - } - ], + "BeaconValues": null, "Messages": [ { "Message": { @@ -2505,13 +2162,13 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, "Signature": { @@ -2519,18 +2176,13 @@ Inputs: "Data": "Ynl0ZSBhcnJheQ==" }, "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ], "Epoch": 10101, "Timestamp": 42, - "WinningPoStProof": [ - { - "PoStProof": 8, - "ProofBytes": "Ynl0ZSBhcnJheQ==" - } - ] + "WinningPoStProof": null } ] ``` @@ -2541,24 +2193,11 @@ Response: "Header": { "Miner": "f01234", "Ticket": { - "VRFProof": "Ynl0ZSBhcnJheQ==" + "VRFProof": null }, - "ElectionProof": { - "WinCount": 9, - "VRFProof": "Ynl0ZSBhcnJheQ==" - }, - "BeaconEntries": [ - { - "Round": 42, - "Data": "Ynl0ZSBhcnJheQ==" - } - ], - "WinPoStProof": [ - { - "PoStProof": 8, - "ProofBytes": "Ynl0ZSBhcnJheQ==" - } - ], + "ElectionProof": null, + "BeaconEntries": null, + "WinPoStProof": null, "Parents": [ { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" @@ -2566,37 +2205,19 @@ Response: ], "ParentWeight": "0", "Height": 10101, - "ParentStateRoot": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "ParentMessageReceipts": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "ParentStateRoot": null, + "ParentMessageReceipts": null, "Messages": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "BLSAggregate": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, + "BLSAggregate": null, "Timestamp": 42, - "BlockSig": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "ForkSignaling": 42, + "BlockSig": null, + "ForkSignaling": 0, "ParentBaseFee": "0" }, - "BlsMessages": [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } - ], - "SecpkMessages": [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } - ] + "BlsMessages": null, + "SecpkMessages": null } ``` @@ -2628,27 +2249,20 @@ Response: "NetworkPower": "0", "Sectors": [ { - "SealProof": 8, - "SectorNumber": 9, + "SealProof": 0, + "SectorNumber": 0, "SectorKey": null, - "SealedCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } + "SealedCID": null } ], - "WorkerKey": "f01234", - "SectorSize": 34359738368, + "WorkerKey": "\u003cempty\u003e", + "SectorSize": 0, "PrevBeaconEntry": { - "Round": 42, - "Data": "Ynl0ZSBhcnJheQ==" + "Round": 0, + "Data": null }, - "BeaconEntries": [ - { - "Round": 42, - "Data": "Ynl0ZSBhcnJheQ==" - } - ], - "EligibleForMining": true + "BeaconEntries": null, + "EligibleForMining": false } ``` @@ -2674,13 +2288,13 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, "Signature": { @@ -2688,7 +2302,7 @@ Inputs: "Data": "Ynl0ZSBhcnJheQ==" }, "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ] @@ -2720,19 +2334,19 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ], { "MaxFee": "0", - "MsgUuid": "07070707-0707-0707-0707-070707070707" + "MsgUuid": "00000000-0000-0000-0000-000000000000" } ] ``` @@ -2747,13 +2361,13 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, "Signature": { @@ -2761,7 +2375,7 @@ Response: "Data": "Ynl0ZSBhcnJheQ==" }, "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ] @@ -2784,13 +2398,13 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, "Signature": { @@ -2798,7 +2412,7 @@ Inputs: "Data": "Ynl0ZSBhcnJheQ==" }, "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ] @@ -2831,16 +2445,16 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, - "ValidNonce": true + "ValidNonce": false } ] ] @@ -2855,11 +2469,9 @@ Response: "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "Code": 0, - "OK": true, - "Err": "string value", - "Hint": { - "abc": 123 - } + "OK": false, + "Err": "", + "Hint": null } ] ] @@ -2887,11 +2499,9 @@ Response: "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "Code": 0, - "OK": true, - "Err": "string value", - "Hint": { - "abc": 123 - } + "OK": false, + "Err": "", + "Hint": null } ] ] @@ -2913,13 +2523,13 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ] @@ -2935,11 +2545,9 @@ Response: "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "Code": 0, - "OK": true, - "Err": "string value", - "Hint": { - "abc": 123 - } + "OK": false, + "Err": "", + "Hint": null } ] ] @@ -2971,14 +2579,12 @@ Inputs: `null` Response: ```json { - "PriorityAddrs": [ - "f01234" - ], - "SizeLimitHigh": 123, - "SizeLimitLow": 123, - "ReplaceByFeeRatio": 12.3, - "PruneCooldown": 60000000000, - "GasLimitOverestimation": 12.3 + "PriorityAddrs": null, + "SizeLimitHigh": 0, + "SizeLimitLow": 0, + "ReplaceByFeeRatio": 0, + "PruneCooldown": 0, + "GasLimitOverestimation": 0 } ``` @@ -3028,13 +2634,13 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, "Signature": { @@ -3042,7 +2648,7 @@ Response: "Data": "Ynl0ZSBhcnJheQ==" }, "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ] @@ -3064,13 +2670,13 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, "Signature": { @@ -3078,7 +2684,7 @@ Inputs: "Data": "Ynl0ZSBhcnJheQ==" }, "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ] @@ -3111,18 +2717,18 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, { "MaxFee": "0", - "MsgUuid": "07070707-0707-0707-0707-070707070707" + "MsgUuid": "00000000-0000-0000-0000-000000000000" } ] ``` @@ -3136,13 +2742,13 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, "Signature": { @@ -3150,7 +2756,7 @@ Response: "Data": "Ynl0ZSBhcnJheQ==" }, "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ``` @@ -3171,13 +2777,13 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, "Signature": { @@ -3185,7 +2791,7 @@ Inputs: "Data": "Ynl0ZSBhcnJheQ==" }, "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ] @@ -3229,13 +2835,13 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, "Signature": { @@ -3243,7 +2849,7 @@ Response: "Data": "Ynl0ZSBhcnJheQ==" }, "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ] @@ -3259,14 +2865,12 @@ Inputs: ```json [ { - "PriorityAddrs": [ - "f01234" - ], - "SizeLimitHigh": 123, - "SizeLimitLow": 123, - "ReplaceByFeeRatio": 12.3, - "PruneCooldown": 60000000000, - "GasLimitOverestimation": 12.3 + "PriorityAddrs": null, + "SizeLimitHigh": 0, + "SizeLimitLow": 0, + "ReplaceByFeeRatio": 0, + "PruneCooldown": 0, + "GasLimitOverestimation": 0 } ] ``` @@ -3291,13 +2895,13 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, "Signature": { @@ -3305,7 +2909,7 @@ Response: "Data": "Ynl0ZSBhcnJheQ==" }, "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } } @@ -3345,16 +2949,16 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, - "ValidNonce": true + "ValidNonce": false } ``` @@ -3386,16 +2990,16 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, - "ValidNonce": true + "ValidNonce": false } ``` @@ -3426,16 +3030,16 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, - "ValidNonce": true + "ValidNonce": false } ``` @@ -3464,16 +3068,16 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, - "ValidNonce": true + "ValidNonce": false } ``` @@ -3511,16 +3115,16 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, - "ValidNonce": true + "ValidNonce": false } ``` @@ -3549,16 +3153,16 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, - "ValidNonce": true + "ValidNonce": false } ``` @@ -3592,16 +3196,16 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, - "ValidNonce": true + "ValidNonce": false } ``` @@ -3636,16 +3240,16 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, - "ValidNonce": true + "ValidNonce": false } ``` @@ -3699,7 +3303,7 @@ Response: ```json [ { - "ID": 9, + "ID": 0, "To": "f01234", "Value": "0", "Method": 1, @@ -3767,9 +3371,9 @@ Inputs: Response: ```json { - "InitialBalance": "0", - "StartEpoch": 10101, - "UnlockDuration": 10101 + "InitialBalance": "\u003cnil\u003e", + "StartEpoch": 0, + "UnlockDuration": 0 } ``` @@ -3802,16 +3406,16 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, - "ValidNonce": true + "ValidNonce": false } ``` @@ -3844,16 +3448,16 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, - "ValidNonce": true + "ValidNonce": false } ``` @@ -3886,16 +3490,16 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, - "ValidNonce": true + "ValidNonce": false } ``` @@ -3927,16 +3531,16 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, - "ValidNonce": true + "ValidNonce": false } ``` @@ -3967,16 +3571,16 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, - "ValidNonce": true + "ValidNonce": false } ``` @@ -3993,7 +3597,7 @@ Inputs: `null` Response: ```json { - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "ID": "", "Addrs": [ "/ip4/52.36.61.156/tcp/1347/p2p/12D3KooWFETiESTf1v4PGUvtnxMAcEFMzLZbJGg4tjWfGEimYior" ] @@ -4025,7 +3629,7 @@ Response: ```json { "Reachability": 1, - "PublicAddr": "string value" + "PublicAddr": "" } ``` @@ -4039,10 +3643,10 @@ Inputs: `null` Response: ```json { - "TotalIn": 9, - "TotalOut": 9, - "RateIn": 12.3, - "RateOut": 12.3 + "TotalIn": 0, + "TotalOut": 0, + "RateIn": 0, + "RateOut": 0 } ``` @@ -4096,12 +3700,8 @@ Inputs: "Peers": [ "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" ], - "IPAddrs": [ - "string value" - ], - "IPSubnets": [ - "string value" - ] + "IPAddrs": null, + "IPSubnets": null } ] ``` @@ -4121,12 +3721,8 @@ Response: "Peers": [ "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" ], - "IPAddrs": [ - "string value" - ], - "IPSubnets": [ - "string value" - ] + "IPAddrs": null, + "IPSubnets": null } ``` @@ -4142,12 +3738,8 @@ Inputs: "Peers": [ "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" ], - "IPAddrs": [ - "string value" - ], - "IPSubnets": [ - "string value" - ] + "IPAddrs": null, + "IPSubnets": null } ] ``` @@ -4163,7 +3755,7 @@ Inputs: ```json [ { - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "ID": "", "Addrs": [ "/ip4/52.36.61.156/tcp/1347/p2p/12D3KooWFETiESTf1v4PGUvtnxMAcEFMzLZbJGg4tjWfGEimYior" ] @@ -4216,7 +3808,7 @@ Inputs: Response: ```json { - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "ID": "", "Addrs": [ "/ip4/52.36.61.156/tcp/1347/p2p/12D3KooWFETiESTf1v4PGUvtnxMAcEFMzLZbJGg4tjWfGEimYior" ] @@ -4264,7 +3856,7 @@ Inputs: Response: ```json { - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "ID": "", "Agent": "string value", "Addrs": [ "string value" @@ -4272,16 +3864,7 @@ Response: "Protocols": [ "string value" ], - "ConnMgrMeta": { - "FirstSeen": "0001-01-01T00:00:00Z", - "Value": 123, - "Tags": { - "name": 42 - }, - "Conns": { - "name": "2021-03-08T22:52:18Z" - } - } + "ConnMgrMeta": null } ``` @@ -4296,7 +3879,7 @@ Response: ```json [ { - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "ID": "", "Addrs": [ "/ip4/52.36.61.156/tcp/1347/p2p/12D3KooWFETiESTf1v4PGUvtnxMAcEFMzLZbJGg4tjWfGEimYior" ] @@ -4375,7 +3958,7 @@ Response: ```json [ { - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "ID": "", "Score": { "Score": 12.3, "Topics": { @@ -4386,9 +3969,9 @@ Response: "InvalidMessageDeliveries": 3 } }, - "AppSpecificScore": 12.3, - "IPColocationFactor": 12.3, - "BehaviourPenalty": 12.3 + "AppSpecificScore": 0, + "IPColocationFactor": 0, + "BehaviourPenalty": 0 } } ] @@ -4434,19 +4017,19 @@ Response: ```json { "System": { - "NumStreamsInbound": 123, - "NumStreamsOutbound": 123, - "NumConnsInbound": 123, - "NumConnsOutbound": 123, - "NumFD": 123, + "NumStreamsInbound": 0, + "NumStreamsOutbound": 0, + "NumConnsInbound": 0, + "NumConnsOutbound": 0, + "NumFD": 0, "Memory": 9 }, "Transient": { - "NumStreamsInbound": 123, - "NumStreamsOutbound": 123, - "NumConnsInbound": 123, - "NumConnsOutbound": 123, - "NumFD": 123, + "NumStreamsInbound": 0, + "NumStreamsOutbound": 0, + "NumConnsInbound": 0, + "NumConnsOutbound": 0, + "NumFD": 0, "Memory": 9 }, "Services": { @@ -4502,16 +4085,16 @@ Response: ```json { "SyncStatus": { - "Epoch": 42, - "Behind": 42 + "Epoch": 0, + "Behind": 0 }, "PeerStatus": { - "PeersToPublishMsgs": 123, - "PeersToPublishBlocks": 123 + "PeersToPublishMsgs": 0, + "PeersToPublishBlocks": 0 }, "ChainStatus": { - "BlocksPerTipsetLast100": 12.3, - "BlocksPerTipsetLastFinality": 12.3 + "BlocksPerTipsetLast100": 0, + "BlocksPerTipsetLastFinality": 0 } } ``` @@ -4630,9 +4213,7 @@ Response: ```json { "Channel": "f01234", - "WaitSentinel": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } + "WaitSentinel": null } ``` @@ -4655,7 +4236,7 @@ Inputs: "f01234", "0", { - "OffChain": true + "OffChain": false } ] ``` @@ -4664,9 +4245,7 @@ Response: ```json { "Channel": "f01234", - "WaitSentinel": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } + "WaitSentinel": null } ``` @@ -4713,9 +4292,9 @@ Inputs: [ { "Amount": "0", - "TimeLockMin": 10101, - "TimeLockMax": 10101, - "MinSettle": 10101, + "TimeLockMin": 0, + "TimeLockMax": 0, + "MinSettle": 0, "Extra": { "Actor": "f01234", "Method": 1, @@ -4730,15 +4309,13 @@ Response: ```json { "Channel": "f01234", - "WaitSentinel": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "WaitSentinel": null, "Vouchers": [ { - "ChannelAddr": "f01234", - "TimeLockMin": 10101, - "TimeLockMax": 10101, - "SecretHash": "Ynl0ZSBhcnJheQ==", + "ChannelAddr": "\u003cempty\u003e", + "TimeLockMin": 0, + "TimeLockMax": 0, + "SecretHash": null, "Extra": { "Actor": "f01234", "Method": 1, @@ -4747,7 +4324,7 @@ Response: "Lane": 42, "Nonce": 42, "Amount": "0", - "MinSettleHeight": 10101, + "MinSettleHeight": 0, "Merges": [ { "Lane": 42, @@ -4797,7 +4374,7 @@ Inputs: Response: ```json { - "ControlAddr": "f01234", + "ControlAddr": "\u003cempty\u003e", "Direction": 1 } ``` @@ -4812,10 +4389,10 @@ Inputs: [ "f01234", { - "ChannelAddr": "f01234", - "TimeLockMin": 10101, - "TimeLockMax": 10101, - "SecretHash": "Ynl0ZSBhcnJheQ==", + "ChannelAddr": "\u003cempty\u003e", + "TimeLockMin": 0, + "TimeLockMax": 0, + "SecretHash": null, "Extra": { "Actor": "f01234", "Method": 1, @@ -4824,7 +4401,7 @@ Inputs: "Lane": 42, "Nonce": 42, "Amount": "0", - "MinSettleHeight": 10101, + "MinSettleHeight": 0, "Merges": [ { "Lane": 42, @@ -4853,10 +4430,10 @@ Inputs: [ "f01234", { - "ChannelAddr": "f01234", - "TimeLockMin": 10101, - "TimeLockMax": 10101, - "SecretHash": "Ynl0ZSBhcnJheQ==", + "ChannelAddr": "\u003cempty\u003e", + "TimeLockMin": 0, + "TimeLockMax": 0, + "SecretHash": null, "Extra": { "Actor": "f01234", "Method": 1, @@ -4865,7 +4442,7 @@ Inputs: "Lane": 42, "Nonce": 42, "Amount": "0", - "MinSettleHeight": 10101, + "MinSettleHeight": 0, "Merges": [ { "Lane": 42, @@ -4894,10 +4471,10 @@ Inputs: [ "f01234", { - "ChannelAddr": "f01234", - "TimeLockMin": 10101, - "TimeLockMax": 10101, - "SecretHash": "Ynl0ZSBhcnJheQ==", + "ChannelAddr": "\u003cempty\u003e", + "TimeLockMin": 0, + "TimeLockMax": 0, + "SecretHash": null, "Extra": { "Actor": "f01234", "Method": 1, @@ -4906,7 +4483,7 @@ Inputs: "Lane": 42, "Nonce": 42, "Amount": "0", - "MinSettleHeight": 10101, + "MinSettleHeight": 0, "Merges": [ { "Lane": 42, @@ -4941,10 +4518,10 @@ Response: ```json { "Voucher": { - "ChannelAddr": "f01234", - "TimeLockMin": 10101, - "TimeLockMax": 10101, - "SecretHash": "Ynl0ZSBhcnJheQ==", + "ChannelAddr": "\u003cempty\u003e", + "TimeLockMin": 0, + "TimeLockMax": 0, + "SecretHash": null, "Extra": { "Actor": "f01234", "Method": 1, @@ -4953,7 +4530,7 @@ Response: "Lane": 42, "Nonce": 42, "Amount": "0", - "MinSettleHeight": 10101, + "MinSettleHeight": 0, "Merges": [ { "Lane": 42, @@ -4985,10 +4562,10 @@ Response: ```json [ { - "ChannelAddr": "f01234", - "TimeLockMin": 10101, - "TimeLockMax": 10101, - "SecretHash": "Ynl0ZSBhcnJheQ==", + "ChannelAddr": "\u003cempty\u003e", + "TimeLockMin": 0, + "TimeLockMax": 0, + "SecretHash": null, "Extra": { "Actor": "f01234", "Method": 1, @@ -4997,7 +4574,7 @@ Response: "Lane": 42, "Nonce": 42, "Amount": "0", - "MinSettleHeight": 10101, + "MinSettleHeight": 0, "Merges": [ { "Lane": 42, @@ -5022,10 +4599,10 @@ Inputs: [ "f01234", { - "ChannelAddr": "f01234", - "TimeLockMin": 10101, - "TimeLockMax": 10101, - "SecretHash": "Ynl0ZSBhcnJheQ==", + "ChannelAddr": "\u003cempty\u003e", + "TimeLockMin": 0, + "TimeLockMax": 0, + "SecretHash": null, "Extra": { "Actor": "f01234", "Method": 1, @@ -5034,7 +4611,7 @@ Inputs: "Lane": 42, "Nonce": 42, "Amount": "0", - "MinSettleHeight": 10101, + "MinSettleHeight": 0, "Merges": [ { "Lane": 42, @@ -5135,7 +4712,7 @@ Perms: read Inputs: ```json [ - 17 + 18 ] ``` @@ -5150,7 +4727,7 @@ Perms: read Inputs: ```json [ - 17 + 18 ] ``` @@ -5211,13 +4788,13 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, [ @@ -5234,33 +4811,25 @@ Inputs: Response: ```json { - "MsgCid": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "MsgCid": null, "Msg": { "Version": 42, "To": "f01234", "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, - "MsgRct": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, + "MsgRct": null, "GasCost": { - "Message": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "Message": null, "GasUsed": "0", "BaseFeeBurn": "0", "OverEstimationBurn": "0", @@ -5270,95 +4839,12 @@ Response: "TotalCost": "0" }, "ExecutionTrace": { - "Msg": { - "Version": 42, - "To": "f01234", - "From": "f01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==", - "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" - } - }, - "MsgRct": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, - "Error": "string value", - "Duration": 60000000000, - "GasCharges": [ - { - "Name": "string value", - "loc": [ - { - "File": "string value", - "Line": 123, - "Function": "string value" - } - ], - "tg": 9, - "cg": 9, - "sg": 9, - "vtg": 9, - "vcg": 9, - "vsg": 9, - "tt": 60000000000, - "ex": {} - } - ], - "Subcalls": [ - { - "Msg": { - "Version": 42, - "To": "f01234", - "From": "f01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==", - "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" - } - }, - "MsgRct": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, - "Error": "string value", - "Duration": 60000000000, - "GasCharges": [ - { - "Name": "string value", - "loc": [ - { - "File": "string value", - "Line": 123, - "Function": "string value" - } - ], - "tg": 9, - "cg": 9, - "sg": 9, - "vtg": 9, - "vcg": 9, - "vsg": 9, - "tt": 60000000000, - "ex": {} - } - ], - "Subcalls": null - } - ] + "Msg": null, + "MsgRct": null, + "Error": "", + "Duration": 0, + "GasCharges": null, + "Subcalls": null }, "Error": "string value", "Duration": 60000000000 @@ -5395,7 +4881,8 @@ Response: "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "Nonce": 42, - "Balance": "0" + "Balance": "0", + "Address": "\u003cempty\u003e" } } ``` @@ -5471,13 +4958,13 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ], @@ -5500,33 +4987,25 @@ Response: }, "Trace": [ { - "MsgCid": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "MsgCid": null, "Msg": { "Version": 42, "To": "f01234", "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, - "MsgRct": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, + "MsgRct": null, "GasCost": { - "Message": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "Message": null, "GasUsed": "0", "BaseFeeBurn": "0", "OverEstimationBurn": "0", @@ -5536,95 +5015,12 @@ Response: "TotalCost": "0" }, "ExecutionTrace": { - "Msg": { - "Version": 42, - "To": "f01234", - "From": "f01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==", - "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" - } - }, - "MsgRct": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, - "Error": "string value", - "Duration": 60000000000, - "GasCharges": [ - { - "Name": "string value", - "loc": [ - { - "File": "string value", - "Line": 123, - "Function": "string value" - } - ], - "tg": 9, - "cg": 9, - "sg": 9, - "vtg": 9, - "vcg": 9, - "vsg": 9, - "tt": 60000000000, - "ex": {} - } - ], - "Subcalls": [ - { - "Msg": { - "Version": 42, - "To": "f01234", - "From": "f01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==", - "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" - } - }, - "MsgRct": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, - "Error": "string value", - "Duration": 60000000000, - "GasCharges": [ - { - "Name": "string value", - "loc": [ - { - "File": "string value", - "Line": 123, - "Function": "string value" - } - ], - "tg": 9, - "cg": 9, - "sg": 9, - "vtg": 9, - "vcg": 9, - "vsg": 9, - "tt": 60000000000, - "ex": {} - } - ], - "Subcalls": null - } - ] + "Msg": null, + "MsgRct": null, + "Error": "", + "Duration": 0, + "GasCharges": null, + "Subcalls": null }, "Error": "string value", "Duration": 60000000000 @@ -5771,7 +5167,8 @@ Response: "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "Nonce": 42, - "Balance": "0" + "Balance": "0", + "Address": "\u003cempty\u003e" } ``` @@ -5806,8 +5203,8 @@ Response: "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "Size": 1032, - "TermMin": 10101, - "TermMax": 10101, + "TermMin": 0, + "TermMax": 0, "Expiration": 10101 } ``` @@ -5843,8 +5240,8 @@ Response: "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "Size": 1032, - "TermMin": 10101, - "TermMax": 10101, + "TermMin": 0, + "TermMax": 0, "Expiration": 10101 } ``` @@ -5926,9 +5323,9 @@ Response: "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "Size": 1032, - "TermMin": 10101, - "TermMax": 10101, - "TermStart": 10101, + "TermMin": 0, + "TermMax": 0, + "TermStart": 0, "Sector": 9 } ``` @@ -5967,36 +5364,34 @@ Inputs: `null` Response: ```json { - "NetworkName": "lotus", - "BlockDelaySecs": 42, + "NetworkName": "", + "BlockDelaySecs": 0, "ConsensusMinerMinPower": "0", - "SupportedProofTypes": [ - 8 - ], - "PreCommitChallengeDelay": 10101, + "SupportedProofTypes": null, + "PreCommitChallengeDelay": 0, "ForkUpgradeParams": { - "UpgradeSmokeHeight": 10101, - "UpgradeBreezeHeight": 10101, - "UpgradeIgnitionHeight": 10101, - "UpgradeLiftoffHeight": 10101, - "UpgradeAssemblyHeight": 10101, - "UpgradeRefuelHeight": 10101, - "UpgradeTapeHeight": 10101, - "UpgradeKumquatHeight": 10101, - "UpgradePriceListOopsHeight": 10101, - "BreezeGasTampingDuration": 10101, - "UpgradeCalicoHeight": 10101, - "UpgradePersianHeight": 10101, - "UpgradeOrangeHeight": 10101, - "UpgradeClausHeight": 10101, - "UpgradeTrustHeight": 10101, - "UpgradeNorwegianHeight": 10101, - "UpgradeTurboHeight": 10101, - "UpgradeHyperdriveHeight": 10101, - "UpgradeChocolateHeight": 10101, - "UpgradeOhSnapHeight": 10101, - "UpgradeSkyrHeight": 10101, - "UpgradeSharkHeight": 10101 + "UpgradeSmokeHeight": 0, + "UpgradeBreezeHeight": 0, + "UpgradeIgnitionHeight": 0, + "UpgradeLiftoffHeight": 0, + "UpgradeAssemblyHeight": 0, + "UpgradeRefuelHeight": 0, + "UpgradeTapeHeight": 0, + "UpgradeKumquatHeight": 0, + "UpgradePriceListOopsHeight": 0, + "BreezeGasTampingDuration": 0, + "UpgradeCalicoHeight": 0, + "UpgradePersianHeight": 0, + "UpgradeOrangeHeight": 0, + "UpgradeClausHeight": 0, + "UpgradeTrustHeight": 0, + "UpgradeNorwegianHeight": 0, + "UpgradeTurboHeight": 0, + "UpgradeHyperdriveHeight": 0, + "UpgradeChocolateHeight": 0, + "UpgradeOhSnapHeight": 0, + "UpgradeSkyrHeight": 0, + "UpgradeSharkHeight": 0 } } ``` @@ -6239,24 +5634,22 @@ Response: { "t026363": { "Proposal": { - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceSize": 1032, - "VerifiedDeal": true, + "PieceCID": null, + "PieceSize": 0, + "VerifiedDeal": false, "Client": "f01234", "Provider": "f01234", "Label": "", - "StartEpoch": 10101, - "EndEpoch": 10101, + "StartEpoch": 0, + "EndEpoch": 0, "StoragePricePerEpoch": "0", "ProviderCollateral": "0", "ClientCollateral": "0" }, "State": { - "SectorStartEpoch": 10101, - "LastUpdatedEpoch": 10101, - "SlashEpoch": 10101, + "SectorStartEpoch": 0, + "LastUpdatedEpoch": 0, + "SlashEpoch": 0, "VerifiedClaim": 0 } } @@ -6318,24 +5711,22 @@ Response: ```json { "Proposal": { - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceSize": 1032, - "VerifiedDeal": true, + "PieceCID": null, + "PieceSize": 0, + "VerifiedDeal": false, "Client": "f01234", "Provider": "f01234", "Label": "", - "StartEpoch": 10101, - "EndEpoch": 10101, + "StartEpoch": 0, + "EndEpoch": 0, "StoragePricePerEpoch": "0", "ProviderCollateral": "0", "ClientCollateral": "0" }, "State": { - "SectorStartEpoch": 10101, - "LastUpdatedEpoch": 10101, - "SlashEpoch": 10101, + "SectorStartEpoch": 0, + "LastUpdatedEpoch": 0, + "SlashEpoch": 0, "VerifiedClaim": 0 } } @@ -6366,14 +5757,10 @@ Response: ```json [ { - "SectorNumber": 9, - "SealProof": 8, - "SealedCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "DealIDs": [ - 5432 - ], + "SectorNumber": 0, + "SealProof": 0, + "SealedCID": null, + "DealIDs": null, "Activation": 10101, "Expiration": 10101, "DealWeight": "0", @@ -6381,10 +5768,10 @@ Response: "InitialPledge": "0", "ExpectedDayReward": "0", "ExpectedStoragePledge": "0", - "ReplacedSectorAge": 10101, + "ReplacedSectorAge": 0, "ReplacedDayReward": "0", "SectorKeyCID": null, - "SimpleQAPower": true + "SimpleQAPower": false } ] ``` @@ -6466,10 +5853,9 @@ Response: [ { "PostSubmissions": [ - 5, - 1 + 0 ], - "DisputableProofCount": 42 + "DisputableProofCount": 0 } ] ``` @@ -6529,32 +5915,20 @@ Response: { "Owner": "f01234", "Worker": "f01234", - "NewWorker": "f01234", - "ControlAddresses": [ - "f01234" - ], - "WorkerChangeEpoch": 10101, - "PeerId": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "NewWorker": "\u003cempty\u003e", + "ControlAddresses": null, + "WorkerChangeEpoch": 0, + "PeerId": null, "Multiaddrs": [ "Ynl0ZSBhcnJheQ==" ], - "WindowPoStProofType": 8, - "SectorSize": 34359738368, - "WindowPoStPartitionSectors": 42, - "ConsensusFaultElapsed": 10101, + "WindowPoStProofType": 0, + "SectorSize": 0, + "WindowPoStPartitionSectors": 0, + "ConsensusFaultElapsed": 0, "Beneficiary": "f01234", - "BeneficiaryTerm": { - "Quota": "0", - "UsedQuota": "0", - "Expiration": 10101 - }, - "PendingBeneficiaryTerm": { - "NewBeneficiary": "f01234", - "NewQuota": "0", - "NewExpiration": 10101, - "ApprovedByBeneficiary": true, - "ApprovedByNominee": true - } + "BeneficiaryTerm": null, + "PendingBeneficiaryTerm": null } ``` @@ -6569,15 +5943,11 @@ Inputs: [ "f01234", { - "SealProof": 8, - "SectorNumber": 9, - "SealedCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "SealRandEpoch": 10101, - "DealIDs": [ - 5432 - ], + "SealProof": 0, + "SectorNumber": 0, + "SealedCID": null, + "SealRandEpoch": 0, + "DealIDs": null, "Expiration": 10101, "UnsealedCid": null }, @@ -6621,24 +5991,19 @@ Response: [ { "AllSectors": [ - 5, - 1 + 0 ], "FaultySectors": [ - 5, - 1 + 0 ], "RecoveringSectors": [ - 5, - 1 + 0 ], "LiveSectors": [ - 5, - 1 + 0 ], "ActiveSectors": [ - 5, - 1 + 0 ] } ] @@ -6676,7 +6041,7 @@ Response: "RawBytePower": "0", "QualityAdjPower": "0" }, - "HasMinPower": true + "HasMinPower": false } ``` @@ -6691,15 +6056,11 @@ Inputs: [ "f01234", { - "SealProof": 8, - "SectorNumber": 9, - "SealedCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "SealRandEpoch": 10101, - "DealIDs": [ - 5432 - ], + "SealProof": 0, + "SectorNumber": 0, + "SealedCID": null, + "SealRandEpoch": 0, + "DealIDs": null, "Expiration": 10101, "UnsealedCid": null }, @@ -6741,18 +6102,18 @@ Inputs: Response: ```json { - "CurrentEpoch": 10101, - "PeriodStart": 10101, + "CurrentEpoch": 0, + "PeriodStart": 0, "Index": 42, "Open": 10101, "Close": 10101, "Challenge": 10101, - "FaultCutoff": 10101, - "WPoStPeriodDeadlines": 42, - "WPoStProvingPeriod": 10101, - "WPoStChallengeWindow": 10101, - "WPoStChallengeLookback": 10101, - "FaultDeclarationCutoff": 10101 + "FaultCutoff": 0, + "WPoStPeriodDeadlines": 0, + "WPoStProvingPeriod": 0, + "WPoStChallengeWindow": 0, + "WPoStChallengeLookback": 0, + "FaultDeclarationCutoff": 0 } ``` @@ -6867,14 +6228,10 @@ Response: ```json [ { - "SectorNumber": 9, - "SealProof": 8, - "SealedCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "DealIDs": [ - 5432 - ], + "SectorNumber": 0, + "SealProof": 0, + "SealedCID": null, + "DealIDs": null, "Activation": 10101, "Expiration": 10101, "DealWeight": "0", @@ -6882,10 +6239,10 @@ Response: "InitialPledge": "0", "ExpectedDayReward": "0", "ExpectedStoragePledge": "0", - "ReplacedSectorAge": 10101, + "ReplacedSectorAge": 0, "ReplacedDayReward": "0", "SectorKeyCID": null, - "SimpleQAPower": true + "SimpleQAPower": false } ] ``` @@ -6920,7 +6277,7 @@ Inputs: ] ``` -Response: `17` +Response: `18` ### StateReadState StateReadState returns the indicated actor's state. @@ -6996,33 +6353,25 @@ Inputs: Response: ```json { - "MsgCid": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "MsgCid": null, "Msg": { "Version": 42, "To": "f01234", "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, - "MsgRct": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, + "MsgRct": null, "GasCost": { - "Message": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "Message": null, "GasUsed": "0", "BaseFeeBurn": "0", "OverEstimationBurn": "0", @@ -7032,95 +6381,12 @@ Response: "TotalCost": "0" }, "ExecutionTrace": { - "Msg": { - "Version": 42, - "To": "f01234", - "From": "f01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==", - "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" - } - }, - "MsgRct": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, - "Error": "string value", - "Duration": 60000000000, - "GasCharges": [ - { - "Name": "string value", - "loc": [ - { - "File": "string value", - "Line": 123, - "Function": "string value" - } - ], - "tg": 9, - "cg": 9, - "sg": 9, - "vtg": 9, - "vcg": 9, - "vsg": 9, - "tt": 60000000000, - "ex": {} - } - ], - "Subcalls": [ - { - "Msg": { - "Version": 42, - "To": "f01234", - "From": "f01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==", - "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" - } - }, - "MsgRct": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, - "Error": "string value", - "Duration": 60000000000, - "GasCharges": [ - { - "Name": "string value", - "loc": [ - { - "File": "string value", - "Line": 123, - "Function": "string value" - } - ], - "tg": 9, - "cg": 9, - "sg": 9, - "vtg": 9, - "vcg": 9, - "vsg": 9, - "tt": 60000000000, - "ex": {} - } - ], - "Subcalls": null - } - ] + "Msg": null, + "MsgRct": null, + "Error": "", + "Duration": 0, + "GasCharges": null, + "Subcalls": null }, "Error": "string value", "Duration": 60000000000 @@ -7176,17 +6442,10 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 0 }, - "ReturnDec": {}, - "TipSet": [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ], + "ReturnDec": null, + "TipSet": [], "Height": 10101 } ``` @@ -7216,7 +6475,7 @@ Inputs: Response: ```json { - "OnTime": 10101, + "OnTime": 0, "Early": 10101 } ``` @@ -7248,14 +6507,10 @@ Inputs: Response: ```json { - "SectorNumber": 9, - "SealProof": 8, - "SealedCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "DealIDs": [ - 5432 - ], + "SectorNumber": 0, + "SealProof": 0, + "SealedCID": null, + "DealIDs": null, "Activation": 10101, "Expiration": 10101, "DealWeight": "0", @@ -7263,10 +6518,10 @@ Response: "InitialPledge": "0", "ExpectedDayReward": "0", "ExpectedStoragePledge": "0", - "ReplacedSectorAge": 10101, + "ReplacedSectorAge": 0, "ReplacedDayReward": "0", "SectorKeyCID": null, - "SimpleQAPower": true + "SimpleQAPower": false } ``` @@ -7331,20 +6586,16 @@ Response: ```json { "Info": { - "SealProof": 8, - "SectorNumber": 9, - "SealedCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "SealRandEpoch": 10101, - "DealIDs": [ - 5432 - ], + "SealProof": 0, + "SectorNumber": 0, + "SealedCID": null, + "SealRandEpoch": 0, + "DealIDs": null, "Expiration": 10101, "UnsealedCid": null }, "PreCommitDeposit": "0", - "PreCommitEpoch": 10101 + "PreCommitEpoch": 0 } ``` @@ -7372,12 +6623,12 @@ Inputs: Response: ```json { - "FilVested": "0", - "FilMined": "0", - "FilBurnt": "0", - "FilLocked": "0", - "FilCirculating": "0", - "FilReserveDisbursed": "0" + "FilVested": "\u003cnil\u003e", + "FilMined": "\u003cnil\u003e", + "FilBurnt": "\u003cnil\u003e", + "FilLocked": "\u003cnil\u003e", + "FilCirculating": "\u003cnil\u003e", + "FilReserveDisbursed": "\u003cnil\u003e" } ``` @@ -7497,17 +6748,10 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 0 }, - "ReturnDec": {}, - "TipSet": [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ], + "ReturnDec": null, + "TipSet": [], "Height": 10101 } ``` @@ -7571,24 +6815,11 @@ Response: { "Miner": "f01234", "Ticket": { - "VRFProof": "Ynl0ZSBhcnJheQ==" + "VRFProof": null }, - "ElectionProof": { - "WinCount": 9, - "VRFProof": "Ynl0ZSBhcnJheQ==" - }, - "BeaconEntries": [ - { - "Round": 42, - "Data": "Ynl0ZSBhcnJheQ==" - } - ], - "WinPoStProof": [ - { - "PoStProof": 8, - "ProofBytes": "Ynl0ZSBhcnJheQ==" - } - ], + "ElectionProof": null, + "BeaconEntries": null, + "WinPoStProof": null, "Parents": [ { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" @@ -7596,25 +6827,15 @@ Response: ], "ParentWeight": "0", "Height": 10101, - "ParentStateRoot": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "ParentMessageReceipts": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "ParentStateRoot": null, + "ParentMessageReceipts": null, "Messages": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "BLSAggregate": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, + "BLSAggregate": null, "Timestamp": 42, - "BlockSig": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "ForkSignaling": 42, + "BlockSig": null, + "ForkSignaling": 0, "ParentBaseFee": "0" } ``` @@ -7648,27 +6869,8 @@ Inputs: `null` Response: ```json { - "ActiveSyncs": [ - { - "WorkerID": 42, - "Base": { - "Cids": null, - "Blocks": null, - "Height": 0 - }, - "Target": { - "Cids": null, - "Blocks": null, - "Height": 0 - }, - "Stage": 1, - "Height": 10101, - "Start": "0001-01-01T00:00:00Z", - "End": "0001-01-01T00:00:00Z", - "Message": "string value" - } - ], - "VMApplied": 42 + "ActiveSyncs": null, + "VMApplied": 0 } ``` @@ -7686,24 +6888,11 @@ Inputs: "Header": { "Miner": "f01234", "Ticket": { - "VRFProof": "Ynl0ZSBhcnJheQ==" + "VRFProof": null }, - "ElectionProof": { - "WinCount": 9, - "VRFProof": "Ynl0ZSBhcnJheQ==" - }, - "BeaconEntries": [ - { - "Round": 42, - "Data": "Ynl0ZSBhcnJheQ==" - } - ], - "WinPoStProof": [ - { - "PoStProof": 8, - "ProofBytes": "Ynl0ZSBhcnJheQ==" - } - ], + "ElectionProof": null, + "BeaconEntries": null, + "WinPoStProof": null, "Parents": [ { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" @@ -7711,37 +6900,19 @@ Inputs: ], "ParentWeight": "0", "Height": 10101, - "ParentStateRoot": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "ParentMessageReceipts": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, + "ParentStateRoot": null, + "ParentMessageReceipts": null, "Messages": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "BLSAggregate": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, + "BLSAggregate": null, "Timestamp": 42, - "BlockSig": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "ForkSignaling": 42, + "BlockSig": null, + "ForkSignaling": 0, "ParentBaseFee": "0" }, - "BlsMessages": [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } - ], - "SecpkMessages": [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } - ] + "BlsMessages": null, + "SecpkMessages": null } ] ``` @@ -7857,7 +7028,7 @@ Response: ```json { "Type": "bls", - "PrivateKey": "Ynl0ZSBhcnJheQ==" + "PrivateKey": null } ``` @@ -7887,7 +7058,7 @@ Inputs: [ { "Type": "bls", - "PrivateKey": "Ynl0ZSBhcnJheQ==" + "PrivateKey": null } ] ``` @@ -7979,13 +7150,13 @@ Inputs: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ] @@ -8000,13 +7171,13 @@ Response: "From": "f01234", "Nonce": 42, "Value": "0", - "GasLimit": 9, + "GasLimit": 0, "GasFeeCap": "0", "GasPremium": "0", "Method": 1, "Params": "Ynl0ZSBhcnJheQ==", "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } }, "Signature": { @@ -8014,7 +7185,7 @@ Response: "Data": "Ynl0ZSBhcnJheQ==" }, "CID": { - "/": "bafy2bzacebbpdegvr3i4cosewthysg5xkxpqfn2wfcz6mv2hmoktwbdxkax4s" + "/": "bafy2bzacebnkgxcy5pyk763pyw5l2sbltrai3qga5k2rcvvpgpdx2stlegnz4" } } ``` diff --git a/documentation/en/cli-lotus-worker.md b/documentation/en/cli-lotus-worker.md index 392534e80..74b7a19b8 100644 --- a/documentation/en/cli-lotus-worker.md +++ b/documentation/en/cli-lotus-worker.md @@ -40,6 +40,7 @@ USAGE: OPTIONS: --addpiece enable addpiece (default: true) [$LOTUS_WORKER_ADDPIECE] --commit enable commit (32G sectors: all cores or GPUs, 128GiB Memory + 64GiB swap) (default: true) [$LOTUS_WORKER_COMMIT] + --http-server-timeout value (default: "30s") --listen value host address and port the worker api will listen on (default: "0.0.0.0:3456") [$LOTUS_WORKER_LISTEN] --name value custom worker name (default: hostname) [$LOTUS_WORKER_NAME] --no-default disable all default compute tasks, use the worker for storage/fetching only (default: false) [$LOTUS_WORKER_NO_DEFAULT] diff --git a/extern/filecoin-ffi b/extern/filecoin-ffi index bad0c9c81..6bde8568a 160000 --- a/extern/filecoin-ffi +++ b/extern/filecoin-ffi @@ -1 +1 @@ -Subproject commit bad0c9c81dc8a1415f214f58e62c785dbf1c775f +Subproject commit 6bde8568a206ee28ed0344341026ff97af4fe824 diff --git a/gen/inlinegen-data.json b/gen/inlinegen-data.json index e767f990a..8384e749d 100644 --- a/gen/inlinegen-data.json +++ b/gen/inlinegen-data.json @@ -1,7 +1,7 @@ { - "actorVersions": [0, 2, 3, 4, 5, 6, 7, 8, 9], - "latestActorsVersion": 9, + "actorVersions": [0, 2, 3, 4, 5, 6, 7, 8, 9, 10], + "latestActorsVersion": 10, - "networkVersions": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], - "latestNetworkVersion": 17 + "networkVersions": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], + "latestNetworkVersion": 18 } diff --git a/gen/main.go b/gen/main.go index 439194ef4..38ec5935d 100644 --- a/gen/main.go +++ b/gen/main.go @@ -27,7 +27,8 @@ func main() { types.Message{}, types.SignedMessage{}, types.MsgMeta{}, - types.Actor{}, + types.ActorV4{}, + types.ActorV5{}, types.MessageReceipt{}, types.BlockMsg{}, types.ExpTipSet{}, diff --git a/go.mod b/go.mod index fcfabf554..443a6faaf 100644 --- a/go.mod +++ b/go.mod @@ -115,7 +115,6 @@ require ( github.com/libp2p/go-libp2p-consensus v0.0.1 github.com/libp2p/go-libp2p-gorpc v0.4.0 github.com/libp2p/go-libp2p-kad-dht v0.18.0 - github.com/libp2p/go-libp2p-peerstore v0.8.0 github.com/libp2p/go-libp2p-pubsub v0.8.1 github.com/libp2p/go-libp2p-raft v0.1.8 github.com/libp2p/go-libp2p-record v0.2.0 @@ -156,6 +155,7 @@ require ( golang.org/x/net v0.0.0-20220920183852-bf014ff85ad5 golang.org/x/sync v0.0.0-20220907140024-f12130a52804 golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 + golang.org/x/text v0.3.7 golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 golang.org/x/tools v0.1.12 golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 @@ -265,6 +265,7 @@ require ( github.com/libp2p/go-libp2p-gostream v0.5.0 // indirect github.com/libp2p/go-libp2p-kbucket v0.5.0 // indirect github.com/libp2p/go-libp2p-noise v0.5.0 // indirect + github.com/libp2p/go-libp2p-peerstore v0.8.0 // indirect github.com/libp2p/go-libp2p-tls v0.5.0 // indirect github.com/libp2p/go-nat v0.1.0 // indirect github.com/libp2p/go-netroute v0.2.0 // indirect @@ -333,7 +334,6 @@ require ( golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect - golang.org/x/text v0.3.7 // indirect google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4 // indirect google.golang.org/grpc v1.45.0 // indirect google.golang.org/protobuf v1.28.1 // indirect diff --git a/itests/kit/ensemble_opts_nv.go b/itests/kit/ensemble_opts_nv.go index 64bed559b..67dcbfd2e 100644 --- a/itests/kit/ensemble_opts_nv.go +++ b/itests/kit/ensemble_opts_nv.go @@ -49,12 +49,12 @@ func LatestActorsAt(upgradeHeight abi.ChainEpoch) EnsembleOpt { }) /* inline-gen start */ return UpgradeSchedule(stmgr.Upgrade{ - Network: network.Version16, + Network: network.Version17, Height: -1, }, stmgr.Upgrade{ - Network: network.Version17, + Network: network.Version18, Height: upgradeHeight, - Migration: filcns.UpgradeActorsV9, + Migration: filcns.UpgradeActorsV10, }) /* inline-gen end */ } diff --git a/itests/kit/rpc.go b/itests/kit/rpc.go index 684742ad3..f8c2c6e53 100644 --- a/itests/kit/rpc.go +++ b/itests/kit/rpc.go @@ -7,6 +7,7 @@ import ( "net/http" "net/http/httptest" "testing" + "time" "github.com/multiformats/go-multiaddr" manet "github.com/multiformats/go-multiaddr/net" @@ -22,7 +23,10 @@ type Closer func() func CreateRPCServer(t *testing.T, handler http.Handler, listener net.Listener) (*httptest.Server, multiaddr.Multiaddr, Closer) { testServ := &httptest.Server{ Listener: listener, - Config: &http.Server{Handler: handler}, + Config: &http.Server{ + Handler: handler, + ReadHeaderTimeout: 30 * time.Second, + }, } testServ.Start() diff --git a/itests/migration_nv17_test.go b/itests/migration_nv17_test.go index 445bd34cd..1b0d13ae1 100644 --- a/itests/migration_nv17_test.go +++ b/itests/migration_nv17_test.go @@ -38,8 +38,6 @@ import ( ) func TestMigrationNV17(t *testing.T) { - ctx := context.Background() - kit.QuietMiningLogs() rootKey, err := key.GenerateKey(types.KTSecp256k1) @@ -201,6 +199,7 @@ func TestMigrationNV17(t *testing.T) { require.NoError(t, err) sig, err := clientApi.WalletSign(ctx, verifiedClientAddr, serializedProposal.Bytes()) + require.NoError(t, err) publishDealParams := markettypes.PublishStorageDealsParams{ Deals: []markettypes.ClientDealProposal{{ @@ -407,6 +406,7 @@ func TestMigrationNV17(t *testing.T) { require.NoError(t, err) sig, err = clientApi.WalletSign(ctx, verifiedClientAddr, serializedProposal.Bytes()) + require.NoError(t, err) publishDealParams = markettypes.PublishStorageDealsParams{ Deals: []markettypes.ClientDealProposal{{ diff --git a/itests/multisig_test.go b/itests/multisig_test.go index 63cc2f511..6a68ec3f7 100644 --- a/itests/multisig_test.go +++ b/itests/multisig_test.go @@ -2,26 +2,9 @@ package itests import ( - "bytes" - "context" "testing" "time" - cbor "github.com/ipfs/go-ipld-cbor" - "github.com/stretchr/testify/require" - - "github.com/filecoin-project/go-address" - "github.com/filecoin-project/go-state-types/big" - "github.com/filecoin-project/go-state-types/builtin" - inittypes "github.com/filecoin-project/go-state-types/builtin/v8/init" - multisigtypes "github.com/filecoin-project/go-state-types/builtin/v8/multisig" - "github.com/filecoin-project/go-state-types/exitcode" - - "github.com/filecoin-project/lotus/blockstore" - "github.com/filecoin-project/lotus/chain/actors" - "github.com/filecoin-project/lotus/chain/actors/adt" - lmultisig "github.com/filecoin-project/lotus/chain/actors/builtin/multisig" - "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/itests/kit" "github.com/filecoin-project/lotus/itests/multisig" ) @@ -44,101 +27,101 @@ func TestMultisig(t *testing.T) { } // TestMultisigReentrant sends an infinitely recursive message to a multisig. -func TestMultisigReentrant(t *testing.T) { - //stm: @CHAIN_SYNCER_LOAD_GENESIS_001, @CHAIN_SYNCER_FETCH_TIPSET_001, - //stm: @CHAIN_SYNCER_START_001, @CHAIN_SYNCER_SYNC_001, @BLOCKCHAIN_BEACON_VALIDATE_BLOCK_VALUES_01 - //stm: @CHAIN_SYNCER_COLLECT_CHAIN_001, @CHAIN_SYNCER_COLLECT_HEADERS_001, @CHAIN_SYNCER_VALIDATE_TIPSET_001 - //stm: @CHAIN_SYNCER_NEW_PEER_HEAD_001, @CHAIN_SYNCER_VALIDATE_MESSAGE_META_001, @CHAIN_SYNCER_STOP_001 - - //stm: @CHAIN_INCOMING_HANDLE_INCOMING_BLOCKS_001, @CHAIN_INCOMING_VALIDATE_BLOCK_PUBSUB_001, @CHAIN_INCOMING_VALIDATE_MESSAGE_PUBSUB_001 - kit.QuietMiningLogs() - - ctx := context.Background() - - blockTime := 5 * time.Millisecond - client, _, ens := kit.EnsembleMinimal(t, kit.MockProofs(), kit.ThroughRPC()) - ens.InterconnectAll().BeginMining(blockTime) - store := adt.WrapStore(ctx, cbor.NewCborStore(blockstore.NewAPIBlockstore(client))) - - signer := client.DefaultKey.Address - - // Create the multisig - cp, err := client.MsigCreate(ctx, 1, []address.Address{signer}, 0, big.Zero(), signer, big.Zero()) - require.NoError(t, err, "failed to create multisig (MsigCreate)") - - cm, err := client.MpoolPushMessage(ctx, &cp.Message, nil) - require.NoError(t, err, "failed to create multisig (MpooPushMessage)") - - ml, err := client.StateWaitMsg(ctx, cm.Cid(), 5, 100, false) - require.NoError(t, err, "failed to create multisig (StateWaitMsg)") - require.Equal(t, ml.Receipt.ExitCode, exitcode.Ok) - - var execreturn inittypes.ExecReturn - err = execreturn.UnmarshalCBOR(bytes.NewReader(ml.Receipt.Return)) - require.NoError(t, err, "failed to decode multisig create return") - - multisigAddress := execreturn.IDAddress - - // Add the multisig itself as a signer, do NOT increase the threshold - ap, err := client.MsigAddPropose(ctx, multisigAddress, signer, multisigAddress, false) - require.NoError(t, err, "failed to add multisig as signer (MsigAddPropose)") - - am, err := client.MpoolPushMessage(ctx, &ap.Message, nil) - require.NoError(t, err, "failed to add multisig as signer (MpooPushMessage)") - - al, err := client.StateWaitMsg(ctx, am.Cid(), 5, 100, false) - require.NoError(t, err, "failed to add multisig as signer (StateWaitMsg)") - require.Equal(t, al.Receipt.ExitCode, exitcode.Ok) - - var propReturn multisigtypes.ProposeReturn - err = propReturn.UnmarshalCBOR(bytes.NewReader(al.Receipt.Return)) - require.NoError(t, err, "failed to decode multisig propose return") - require.True(t, propReturn.Applied, "expected proposal to apply the message") - - head, err := client.ChainHead(ctx) - require.NoError(t, err) - - multisigActor, err := client.StateGetActor(ctx, multisigAddress, head.Key()) - require.NoError(t, err) - - mstate, err := lmultisig.Load(store, multisigActor) - require.NoError(t, err) - - signers, err := mstate.Signers() - require.NoError(t, err) - - require.Equal(t, 2, len(signers)) - require.Equal(t, multisigAddress, signers[1]) - - // Send the reentrant tx -- it will try to approve itself (expects to be txid 1) - - approveParams, err := actors.SerializeParams(&multisigtypes.TxnIDParams{ID: 1}) - require.NoError(t, err) - - pp, err := client.MsigPropose(ctx, multisigAddress, multisigAddress, big.Zero(), signer, uint64(builtin.MethodsMultisig.Approve), approveParams) - require.NoError(t, err) - - pm, err := client.MpoolPushMessage(ctx, &pp.Message, nil) - require.NoError(t, err, "failed to send reentrant propose message (MpooPushMessage)") - - pl, err := client.StateWaitMsg(ctx, pm.Cid(), 5, 100, false) - require.NoError(t, err, "failed to send reentrant propose message (StateWaitMsg)") - require.Equal(t, pl.Receipt.ExitCode, exitcode.Ok) - - err = propReturn.UnmarshalCBOR(bytes.NewReader(pl.Receipt.Return)) - require.NoError(t, err, "failed to decode multisig propose return") - require.True(t, propReturn.Applied, "expected proposal to apply the message") - require.Equal(t, exitcode.Ok, propReturn.Code) - - sl, err := client.StateReplay(ctx, types.EmptyTSK, pm.Cid()) - require.NoError(t, err, "failed to replay reentrant propose message (StateWaitMsg)") - - require.Equal(t, 1025, countDepth(sl.ExecutionTrace)) -} - -func countDepth(trace types.ExecutionTrace) int { - if len(trace.Subcalls) == 0 { - return 0 - } - return countDepth(trace.Subcalls[0]) + 1 -} +//func TestMultisigReentrant(t *testing.T) { +// //stm: @CHAIN_SYNCER_LOAD_GENESIS_001, @CHAIN_SYNCER_FETCH_TIPSET_001, +// //stm: @CHAIN_SYNCER_START_001, @CHAIN_SYNCER_SYNC_001, @BLOCKCHAIN_BEACON_VALIDATE_BLOCK_VALUES_01 +// //stm: @CHAIN_SYNCER_COLLECT_CHAIN_001, @CHAIN_SYNCER_COLLECT_HEADERS_001, @CHAIN_SYNCER_VALIDATE_TIPSET_001 +// //stm: @CHAIN_SYNCER_NEW_PEER_HEAD_001, @CHAIN_SYNCER_VALIDATE_MESSAGE_META_001, @CHAIN_SYNCER_STOP_001 +// +// //stm: @CHAIN_INCOMING_HANDLE_INCOMING_BLOCKS_001, @CHAIN_INCOMING_VALIDATE_BLOCK_PUBSUB_001, @CHAIN_INCOMING_VALIDATE_MESSAGE_PUBSUB_001 +// kit.QuietMiningLogs() +// +// ctx := context.Background() +// +// blockTime := 5 * time.Millisecond +// client, _, ens := kit.EnsembleMinimal(t, kit.MockProofs(), kit.ThroughRPC()) +// ens.InterconnectAll().BeginMining(blockTime) +// store := adt.WrapStore(ctx, cbor.NewCborStore(blockstore.NewAPIBlockstore(client))) +// +// signer := client.DefaultKey.Address +// +// // Create the multisig +// cp, err := client.MsigCreate(ctx, 1, []address.Address{signer}, 0, big.Zero(), signer, big.Zero()) +// require.NoError(t, err, "failed to create multisig (MsigCreate)") +// +// cm, err := client.MpoolPushMessage(ctx, &cp.Message, nil) +// require.NoError(t, err, "failed to create multisig (MpooPushMessage)") +// +// ml, err := client.StateWaitMsg(ctx, cm.Cid(), 5, 100, false) +// require.NoError(t, err, "failed to create multisig (StateWaitMsg)") +// require.Equal(t, ml.Receipt.ExitCode, exitcode.Ok) +// +// var execreturn inittypes.ExecReturn +// err = execreturn.UnmarshalCBOR(bytes.NewReader(ml.Receipt.Return)) +// require.NoError(t, err, "failed to decode multisig create return") +// +// multisigAddress := execreturn.IDAddress +// +// // Add the multisig itself as a signer, do NOT increase the threshold +// ap, err := client.MsigAddPropose(ctx, multisigAddress, signer, multisigAddress, false) +// require.NoError(t, err, "failed to add multisig as signer (MsigAddPropose)") +// +// am, err := client.MpoolPushMessage(ctx, &ap.Message, nil) +// require.NoError(t, err, "failed to add multisig as signer (MpooPushMessage)") +// +// al, err := client.StateWaitMsg(ctx, am.Cid(), 5, 100, false) +// require.NoError(t, err, "failed to add multisig as signer (StateWaitMsg)") +// require.Equal(t, al.Receipt.ExitCode, exitcode.Ok) +// +// var propReturn multisigtypes.ProposeReturn +// err = propReturn.UnmarshalCBOR(bytes.NewReader(al.Receipt.Return)) +// require.NoError(t, err, "failed to decode multisig propose return") +// require.True(t, propReturn.Applied, "expected proposal to apply the message") +// +// head, err := client.ChainHead(ctx) +// require.NoError(t, err) +// +// multisigActor, err := client.StateGetActor(ctx, multisigAddress, head.Key()) +// require.NoError(t, err) +// +// mstate, err := lmultisig.Load(store, multisigActor) +// require.NoError(t, err) +// +// signers, err := mstate.Signers() +// require.NoError(t, err) +// +// require.Equal(t, 2, len(signers)) +// require.Equal(t, multisigAddress, signers[1]) +// +// // Send the reentrant tx -- it will try to approve itself (expects to be txid 1) +// +// approveParams, err := actors.SerializeParams(&multisigtypes.TxnIDParams{ID: 1}) +// require.NoError(t, err) +// +// pp, err := client.MsigPropose(ctx, multisigAddress, multisigAddress, big.Zero(), signer, uint64(builtin.MethodsMultisig.Approve), approveParams) +// require.NoError(t, err) +// +// pm, err := client.MpoolPushMessage(ctx, &pp.Message, nil) +// require.NoError(t, err, "failed to send reentrant propose message (MpooPushMessage)") +// +// pl, err := client.StateWaitMsg(ctx, pm.Cid(), 5, 100, false) +// require.NoError(t, err, "failed to send reentrant propose message (StateWaitMsg)") +// require.Equal(t, pl.Receipt.ExitCode, exitcode.Ok) +// +// err = propReturn.UnmarshalCBOR(bytes.NewReader(pl.Receipt.Return)) +// require.NoError(t, err, "failed to decode multisig propose return") +// require.True(t, propReturn.Applied, "expected proposal to apply the message") +// require.Equal(t, exitcode.Ok, propReturn.Code) +// +// sl, err := client.StateReplay(ctx, types.EmptyTSK, pm.Cid()) +// require.NoError(t, err, "failed to replay reentrant propose message (StateWaitMsg)") +// +// require.Equal(t, 1025, countDepth(sl.ExecutionTrace)) +//} +// +//func countDepth(trace types.ExecutionTrace) int { +// if len(trace.Subcalls) == 0 { +// return 0 +// } +// return countDepth(trace.Subcalls[0]) + 1 +//} diff --git a/itests/pending_deal_allocation_test.go b/itests/pending_deal_allocation_test.go index 9ca1772e4..c1e0531cf 100644 --- a/itests/pending_deal_allocation_test.go +++ b/itests/pending_deal_allocation_test.go @@ -31,8 +31,6 @@ import ( ) func TestGetAllocationForPendingDeal(t *testing.T) { - ctx := context.Background() - rootKey, err := key.GenerateKey(types.KTSecp256k1) require.NoError(t, err) @@ -146,6 +144,7 @@ func TestGetAllocationForPendingDeal(t *testing.T) { require.NoError(t, err) sig, err := api.WalletSign(ctx, verifiedClientAddr, serializedProposal.Bytes()) + require.NoError(t, err) publishDealParams := markettypes.PublishStorageDealsParams{ Deals: []markettypes.ClientDealProposal{{ @@ -196,5 +195,6 @@ func TestGetAllocationForPendingDeal(t *testing.T) { } marketDeal, err := api.StateMarketStorageDeal(ctx, dealIds[0], types.EmptyTSK) + require.NoError(t, err) require.Equal(t, marketDeal.State.SectorStartEpoch, abi.ChainEpoch(-1)) } diff --git a/itests/raft_messagesigner_test.go b/itests/raft_messagesigner_test.go index f94095b90..22dd7a5eb 100644 --- a/itests/raft_messagesigner_test.go +++ b/itests/raft_messagesigner_test.go @@ -79,7 +79,6 @@ func setup(ctx context.Context, t *testing.T, node0 *kit.TestFullNode, node1 *ki node.Override(node.GoRPCServer, modules.NewRPCServer), ) //raftOps := kit.ConstructorOpts() - kit.ThroughRPC() ens := kit.NewEnsemble(t).FullNode(node0, raftOps, kit.ThroughRPC()).FullNode(node1, raftOps, kit.ThroughRPC()).FullNode(node2, raftOps, kit.ThroughRPC()) node0.AssignPrivKey(pkey0) @@ -527,7 +526,6 @@ func TestGoRPCAuth(t *testing.T) { node.Override(node.GoRPCServer, modules.NewRPCServer), ) //raftOps := kit.ConstructorOpts() - kit.ThroughRPC() ens := kit.NewEnsemble(t).FullNode(&node0, raftOps, kit.ThroughRPC()).FullNode(&node1, raftOps, kit.ThroughRPC()).FullNode(&node2, raftOps, kit.ThroughRPC()).FullNode(&node3, raftOps) node0.AssignPrivKey(pkey0) diff --git a/itests/remove_verifreg_datacap_test.go b/itests/remove_verifreg_datacap_test.go index a0ef1b1c6..3fd241748 100644 --- a/itests/remove_verifreg_datacap_test.go +++ b/itests/remove_verifreg_datacap_test.go @@ -29,8 +29,6 @@ import ( ) func TestNoRemoveDatacapFromVerifreg(t *testing.T) { - ctx := context.Background() - kit.QuietMiningLogs() rootKey, err := key.GenerateKey(types.KTSecp256k1) @@ -185,6 +183,7 @@ func TestNoRemoveDatacapFromVerifreg(t *testing.T) { require.NoError(t, err) sig, err := clientApi.WalletSign(ctx, verifiedClientAddr, serializedProposal.Bytes()) + require.NoError(t, err) publishDealParams := markettypes.PublishStorageDealsParams{ Deals: []markettypes.ClientDealProposal{{ @@ -276,6 +275,7 @@ func TestNoRemoveDatacapFromVerifreg(t *testing.T) { Params: params, Value: big.Zero(), }, types.EmptyTSK) + require.Error(t, err) require.False(t, callResult.MsgRct.ExitCode.IsSuccess()) verifregDatacapAfter, err := clientApi.StateVerifiedClientStatus(ctx, builtin.VerifiedRegistryActorAddr, types.EmptyTSK) diff --git a/itests/sector_unseal_test.go b/itests/sector_unseal_test.go index 735548486..5d05cb0e3 100644 --- a/itests/sector_unseal_test.go +++ b/itests/sector_unseal_test.go @@ -33,7 +33,7 @@ func TestUnsealPiece(t *testing.T) { ens.Worker(miner, &worker, kit.ThroughRPC(), kit.NoStorage(), // no storage to have better control over path settings kit.WithTaskTypes([]sealtasks.TaskType{ sealtasks.TTFetch, sealtasks.TTAddPiece, - sealtasks.TTCommit1, sealtasks.TTFinalize, sealtasks.TTPreCommit1, sealtasks.TTPreCommit2, sealtasks.TTCommit2, + sealtasks.TTCommit1, sealtasks.TTFinalize, sealtasks.TTFinalizeUnsealed, sealtasks.TTPreCommit1, sealtasks.TTPreCommit2, sealtasks.TTCommit2, sealtasks.TTReplicaUpdate, sealtasks.TTUnseal, // only first update step, later steps will not run and we'll abort }), ) diff --git a/itests/wdpost_test.go b/itests/wdpost_test.go index a3d157ef0..f77b5cd1b 100644 --- a/itests/wdpost_test.go +++ b/itests/wdpost_test.go @@ -52,6 +52,10 @@ func TestWindowedPost(t *testing.T) { } func testWindowPostUpgrade(t *testing.T, blocktime time.Duration, nSectors int, upgradeHeight abi.ChainEpoch) { + + /// XXX TEMPORARILY DISABLED UNTIL NV18 MIGRATION IS IMPLEMENTED + t.Skip("temporarily disabled as nv18 migration is not yet implemented") + ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/lib/consensus/raft/consensus.go b/lib/consensus/raft/consensus.go index 085f94c72..60d9dc305 100644 --- a/lib/consensus/raft/consensus.go +++ b/lib/consensus/raft/consensus.go @@ -152,6 +152,12 @@ func NewConsensus(host host.Host, cfg *ClusterRaftConfig, mpool *messagepool.Mes peers := []peer.ID{} addrInfos, err := addrutil.ParseAddresses(ctx, cfg.InitPeerset) + if err != nil { + logger.Error("error parsing addresses: ", err) + cancel() + return nil, err + } + for _, addrInfo := range addrInfos { peers = append(peers, addrInfo.ID) @@ -422,7 +428,7 @@ func (cc *Consensus) RmPeer(ctx context.Context, pid peer.ID) error { return err } // Being here means we are the leader and can commit - finalErr = cc.raft.RemovePeer(ctx, peer.Encode(pid)) + finalErr = cc.raft.RemovePeer(ctx, pid.String()) if finalErr != nil { time.Sleep(cc.config.CommitRetryDelay) continue diff --git a/lib/consensus/raft/raft.go b/lib/consensus/raft/raft.go index 76c23a6d1..9cfd41a4a 100644 --- a/lib/consensus/raft/raft.go +++ b/lib/consensus/raft/raft.go @@ -80,7 +80,7 @@ func newRaftWrapper( raftW.staging = staging raftW.repo = repo // Set correct LocalID - cfg.RaftConfig.LocalID = hraft.ServerID(peer.Encode(host.ID())) + cfg.RaftConfig.LocalID = hraft.ServerID(host.ID().String()) df := cfg.GetDataFolder(repo) err := makeDataFolder(df) @@ -248,7 +248,7 @@ func makeServerConf(peers []peer.ID) hraft.Configuration { // Servers are peers + self. We avoid duplicate entries below for _, pid := range peers { - p := peer.Encode(pid) + p := pid.String() _, ok := sm[p] if !ok { // avoid dups sm[p] = struct{}{} @@ -284,7 +284,7 @@ func (rw *raftWrapper) WaitForLeader(ctx context.Context) (string, error) { func (rw *raftWrapper) WaitForVoter(ctx context.Context) error { logger.Debug("waiting until we are promoted to a voter") - pid := hraft.ServerID(peer.Encode(rw.host.ID())) + pid := hraft.ServerID(rw.host.ID().String()) for { select { case <-ctx.Done(): diff --git a/node/impl/full/state.go b/node/impl/full/state.go index f9b4f741c..c91fcb298 100644 --- a/node/impl/full/state.go +++ b/node/impl/full/state.go @@ -771,7 +771,7 @@ func (m *StateModule) StateMarketStorageDeal(ctx context.Context, dealId abi.Dea return stmgr.GetStorageDeal(ctx, m.StateManager, dealId, ts) } -func (a *StateAPI) StateGetAllocationForPendingDeal(ctx context.Context, dealId abi.DealID, tsk types.TipSetKey) (*verifregtypes.Allocation, error) { +func (a *StateAPI) StateGetAllocationForPendingDeal(ctx context.Context, dealId abi.DealID, tsk types.TipSetKey) (*verifreg.Allocation, error) { ts, err := a.Chain.GetTipSetFromKey(ctx, tsk) if err != nil { return nil, xerrors.Errorf("loading tipset %s: %w", tsk, err) @@ -798,7 +798,7 @@ func (a *StateAPI) StateGetAllocationForPendingDeal(ctx context.Context, dealId return a.StateGetAllocation(ctx, dealState.Proposal.Client, allocationId, tsk) } -func (a *StateAPI) StateGetAllocation(ctx context.Context, clientAddr address.Address, allocationId verifregtypes.AllocationId, tsk types.TipSetKey) (*verifregtypes.Allocation, error) { +func (a *StateAPI) StateGetAllocation(ctx context.Context, clientAddr address.Address, allocationId verifreg.AllocationId, tsk types.TipSetKey) (*verifreg.Allocation, error) { idAddr, err := a.StateLookupID(ctx, clientAddr, tsk) if err != nil { return nil, err @@ -825,7 +825,7 @@ func (a *StateAPI) StateGetAllocation(ctx context.Context, clientAddr address.Ad return allocation, nil } -func (a *StateAPI) StateGetAllocations(ctx context.Context, clientAddr address.Address, tsk types.TipSetKey) (map[verifregtypes.AllocationId]verifregtypes.Allocation, error) { +func (a *StateAPI) StateGetAllocations(ctx context.Context, clientAddr address.Address, tsk types.TipSetKey) (map[verifreg.AllocationId]verifreg.Allocation, error) { idAddr, err := a.StateLookupID(ctx, clientAddr, tsk) if err != nil { return nil, err @@ -849,7 +849,7 @@ func (a *StateAPI) StateGetAllocations(ctx context.Context, clientAddr address.A return allocations, nil } -func (a *StateAPI) StateGetClaim(ctx context.Context, providerAddr address.Address, claimId verifregtypes.ClaimId, tsk types.TipSetKey) (*verifregtypes.Claim, error) { +func (a *StateAPI) StateGetClaim(ctx context.Context, providerAddr address.Address, claimId verifreg.ClaimId, tsk types.TipSetKey) (*verifreg.Claim, error) { idAddr, err := a.StateLookupID(ctx, providerAddr, tsk) if err != nil { return nil, err @@ -876,7 +876,7 @@ func (a *StateAPI) StateGetClaim(ctx context.Context, providerAddr address.Addre return claim, nil } -func (a *StateAPI) StateGetClaims(ctx context.Context, providerAddr address.Address, tsk types.TipSetKey) (map[verifregtypes.ClaimId]verifregtypes.Claim, error) { +func (a *StateAPI) StateGetClaims(ctx context.Context, providerAddr address.Address, tsk types.TipSetKey) (map[verifreg.ClaimId]verifreg.Claim, error) { idAddr, err := a.StateLookupID(ctx, providerAddr, tsk) if err != nil { return nil, err diff --git a/node/modules/lp2p/host.go b/node/modules/lp2p/host.go index 6ba9cdb79..2d441eb3f 100644 --- a/node/modules/lp2p/host.go +++ b/node/modules/lp2p/host.go @@ -7,11 +7,11 @@ import ( nilrouting "github.com/ipfs/go-ipfs-routing/none" "github.com/libp2p/go-libp2p" dht "github.com/libp2p/go-libp2p-kad-dht" - "github.com/libp2p/go-libp2p-peerstore/pstoremem" record "github.com/libp2p/go-libp2p-record" "github.com/libp2p/go-libp2p/core/host" "github.com/libp2p/go-libp2p/core/peer" "github.com/libp2p/go-libp2p/core/peerstore" + "github.com/libp2p/go-libp2p/p2p/host/peerstore/pstoremem" routedhost "github.com/libp2p/go-libp2p/p2p/host/routed" mocknet "github.com/libp2p/go-libp2p/p2p/net/mock" "go.uber.org/fx" diff --git a/node/rpc.go b/node/rpc.go index 96a81a383..34f680973 100644 --- a/node/rpc.go +++ b/node/rpc.go @@ -9,6 +9,7 @@ import ( _ "net/http/pprof" "runtime" "strconv" + "time" "github.com/google/uuid" "github.com/gorilla/mux" @@ -51,7 +52,8 @@ func ServeRPC(h http.Handler, id string, addr multiaddr.Multiaddr) (StopFunc, er // Instantiate the server and start listening. srv := &http.Server{ - Handler: h, + Handler: h, + ReadHeaderTimeout: 30 * time.Second, BaseContext: func(listener net.Listener) context.Context { ctx, _ := tag.New(context.Background(), tag.Upsert(metrics.APIInterface, id)) return ctx diff --git a/storage/sealer/tarutil/systar.go b/storage/sealer/tarutil/systar.go index e13e5ff21..4372cc8c7 100644 --- a/storage/sealer/tarutil/systar.go +++ b/storage/sealer/tarutil/systar.go @@ -90,7 +90,7 @@ func ExtractTar(body io.Reader, dir string, buf []byte) (int64, error) { sz, found := CacheFileConstraints[header.Name] if !found { - return read, xerrors.Errorf("tar file %#v isn't expected") + return read, xerrors.Errorf("tar file %#v isn't expected", header.Name) } if header.Size > sz { return read, xerrors.Errorf("tar file %#v is bigger than expected: %d > %d", header.Name, header.Size, sz) diff --git a/testplans/composer/Dockerfile b/testplans/composer/Dockerfile index d53bef7e4..58ec58b4c 100644 --- a/testplans/composer/Dockerfile +++ b/testplans/composer/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.18.1-buster as tg-build +FROM golang:1.18.8-buster as tg-build ARG TESTGROUND_REF="oni" WORKDIR /usr/src diff --git a/testplans/docker-images/Dockerfile.oni-buildbase b/testplans/docker-images/Dockerfile.oni-buildbase index 33420f4a6..b24e9cd0b 100644 --- a/testplans/docker-images/Dockerfile.oni-buildbase +++ b/testplans/docker-images/Dockerfile.oni-buildbase @@ -1,4 +1,4 @@ -ARG GO_VERSION=1.18.1 +ARG GO_VERSION=1.18.8 FROM golang:${GO_VERSION}-buster diff --git a/testplans/docker-images/Dockerfile.oni-runtime b/testplans/docker-images/Dockerfile.oni-runtime index e18ca3bbc..c0630b243 100644 --- a/testplans/docker-images/Dockerfile.oni-runtime +++ b/testplans/docker-images/Dockerfile.oni-runtime @@ -1,4 +1,4 @@ -ARG GO_VERSION=1.18.1 +ARG GO_VERSION=1.18.8 FROM golang:${GO_VERSION}-buster as downloader diff --git a/testplans/docker-images/Dockerfile.oni-runtime-debug b/testplans/docker-images/Dockerfile.oni-runtime-debug index 33954c92f..862b02e11 100644 --- a/testplans/docker-images/Dockerfile.oni-runtime-debug +++ b/testplans/docker-images/Dockerfile.oni-runtime-debug @@ -1,4 +1,4 @@ -ARG GO_VERSION=1.18.1 +ARG GO_VERSION=1.18.8 FROM golang:${GO_VERSION}-buster as downloader diff --git a/testplans/lotus-soup/testkit/role_client.go b/testplans/lotus-soup/testkit/role_client.go index afde27420..e613bb235 100644 --- a/testplans/lotus-soup/testkit/role_client.go +++ b/testplans/lotus-soup/testkit/role_client.go @@ -182,7 +182,7 @@ func startFullNodeAPIServer(t *TestEnvironment, repo repo.Repo, napi api.FullNod Next: mux.ServeHTTP, } - srv := &http.Server{Handler: ah} + srv := &http.Server{Handler: ah, ReadHeaderTimeout: 30 * time.Second} endpoint, err := repo.APIEndpoint() if err != nil { diff --git a/testplans/lotus-soup/testkit/role_miner.go b/testplans/lotus-soup/testkit/role_miner.go index 3b74a50cb..a86e84bbe 100644 --- a/testplans/lotus-soup/testkit/role_miner.go +++ b/testplans/lotus-soup/testkit/role_miner.go @@ -638,7 +638,7 @@ func startStorageMinerAPIServer(t *TestEnvironment, repo repo.Repo, minerApi api return nil, fmt.Errorf("no API endpoint in repo: %w", err) } - srv := &http.Server{Handler: ah} + srv := &http.Server{Handler: ah, ReadHeaderTimeout: 30 * time.Second} listenAddr, err := startServer(endpoint, srv) if err != nil {