Merge pull request #9355 from filecoin-project/gstuart/integrate-verifreg-changes-fip45

feat: actors: Integrate builtin-actors changes for FIP-0045
This commit is contained in:
Aayush Rajasekaran 2022-10-07 11:27:04 -04:00 committed by GitHub
commit 6e99a6b9f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
87 changed files with 1539 additions and 801 deletions

View File

@ -964,6 +964,11 @@ workflows:
suite: itest-paych_cli
target: "./itests/paych_cli_test.go"
- test:
name: test-itest-pending_deal_allocation
suite: itest-pending_deal_allocation
target: "./itests/pending_deal_allocation_test.go"
- test:
name: test-itest-sdr_upgrade
suite: itest-sdr_upgrade

View File

@ -17,9 +17,10 @@ import (
"github.com/filecoin-project/go-fil-markets/storagemarket"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/builtin/v8/market"
"github.com/filecoin-project/go-state-types/builtin/v8/paych"
"github.com/filecoin-project/go-state-types/builtin/v9/market"
"github.com/filecoin-project/go-state-types/builtin/v9/miner"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/go-state-types/dline"
abinetwork "github.com/filecoin-project/go-state-types/network"
@ -527,6 +528,10 @@ type FullNode interface {
StateMarketDeals(context.Context, types.TipSetKey) (map[string]*MarketDeal, error) //perm:read
// StateMarketStorageDeal returns information about the indicated deal
StateMarketStorageDeal(context.Context, abi.DealID, types.TipSetKey) (*MarketDeal, error) //perm:read
// StateGetAllocationForPendingDeal returns the allocation for a given deal ID of a pending deal.
StateGetAllocationForPendingDeal(ctx context.Context, dealId abi.DealID, tsk types.TipSetKey) (*verifregtypes.Allocation, error) //perm:read
// StateGetAllocation returns the allocation for a given address and allocation ID.
StateGetAllocation(ctx context.Context, clientAddr address.Address, allocationId verifregtypes.AllocationId, tsk types.TipSetKey) (*verifregtypes.Allocation, error) //perm:read
// StateComputeDataCID computes DataCID from a set of on-chain deals
StateComputeDataCID(ctx context.Context, maddr address.Address, sectorType abi.RegisteredSealProof, deals []abi.DealID, tsk types.TipSetKey) (cid.Cid, error) //perm:read
// StateLookupID retrieves the ID address of the given address

View File

@ -18,7 +18,7 @@ import (
"github.com/filecoin-project/go-jsonrpc/auth"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/builtin/v8/market"
"github.com/filecoin-project/go-state-types/builtin/v9/market"
"github.com/filecoin-project/go-state-types/builtin/v9/miner"
abinetwork "github.com/filecoin-project/go-state-types/network"

View File

@ -13,8 +13,8 @@ import (
xerrors "golang.org/x/xerrors"
abi "github.com/filecoin-project/go-state-types/abi"
market "github.com/filecoin-project/go-state-types/builtin/v8/market"
paych "github.com/filecoin-project/go-state-types/builtin/v8/paych"
market "github.com/filecoin-project/go-state-types/builtin/v9/market"
)
var _ = xerrors.Errorf

View File

@ -32,6 +32,7 @@ import (
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/go-jsonrpc/auth"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/go-state-types/exitcode"
@ -138,6 +139,9 @@ func init() {
addExample(&apiSelExample)
addExample(network.ReachabilityPublic)
addExample(build.TestNetworkVersion)
allocationId := verifreg.AllocationId(0)
addExample(allocationId)
addExample(&allocationId)
addExample(map[string]int{"name": 42})
addExample(map[string]time.Time{"name": time.Unix(1615243938, 0).UTC()})
addExample(&types.ExecutionTrace{

View File

@ -28,6 +28,7 @@ import (
big "github.com/filecoin-project/go-state-types/big"
paych "github.com/filecoin-project/go-state-types/builtin/v8/paych"
miner "github.com/filecoin-project/go-state-types/builtin/v9/miner"
verifreg "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
crypto "github.com/filecoin-project/go-state-types/crypto"
dline "github.com/filecoin-project/go-state-types/dline"
network "github.com/filecoin-project/go-state-types/network"
@ -2467,6 +2468,36 @@ func (mr *MockFullNodeMockRecorder) StateGetActor(arg0, arg1, arg2 interface{})
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetActor", reflect.TypeOf((*MockFullNode)(nil).StateGetActor), arg0, arg1, arg2)
}
// StateGetAllocation mocks base method.
func (m *MockFullNode) StateGetAllocation(arg0 context.Context, arg1 address.Address, arg2 verifreg.AllocationId, arg3 types.TipSetKey) (*verifreg.Allocation, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateGetAllocation", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(*verifreg.Allocation)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateGetAllocation indicates an expected call of StateGetAllocation.
func (mr *MockFullNodeMockRecorder) StateGetAllocation(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetAllocation", reflect.TypeOf((*MockFullNode)(nil).StateGetAllocation), arg0, arg1, arg2, arg3)
}
// StateGetAllocationForPendingDeal mocks base method.
func (m *MockFullNode) StateGetAllocationForPendingDeal(arg0 context.Context, arg1 abi.DealID, arg2 types.TipSetKey) (*verifreg.Allocation, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateGetAllocationForPendingDeal", arg0, arg1, arg2)
ret0, _ := ret[0].(*verifreg.Allocation)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateGetAllocationForPendingDeal indicates an expected call of StateGetAllocationForPendingDeal.
func (mr *MockFullNodeMockRecorder) StateGetAllocationForPendingDeal(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetAllocationForPendingDeal", reflect.TypeOf((*MockFullNode)(nil).StateGetAllocationForPendingDeal), arg0, arg1, arg2)
}
// StateGetBeaconEntry mocks base method.
func (m *MockFullNode) StateGetBeaconEntry(arg0 context.Context, arg1 abi.ChainEpoch) (*types.BeaconEntry, error) {
m.ctrl.T.Helper()

View File

@ -26,6 +26,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin/v8/paych"
"github.com/filecoin-project/go-state-types/builtin/v9/miner"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/go-state-types/dline"
abinetwork "github.com/filecoin-project/go-state-types/network"
@ -365,6 +366,10 @@ type FullNodeStruct struct {
StateGetActor func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*types.Actor, error) `perm:"read"`
StateGetAllocation func(p0 context.Context, p1 address.Address, p2 verifregtypes.AllocationId, p3 types.TipSetKey) (*verifregtypes.Allocation, error) `perm:"read"`
StateGetAllocationForPendingDeal func(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*verifregtypes.Allocation, error) `perm:"read"`
StateGetBeaconEntry func(p0 context.Context, p1 abi.ChainEpoch) (*types.BeaconEntry, error) `perm:"read"`
StateGetNetworkParams func(p0 context.Context) (*NetworkParams, error) `perm:"read"`
@ -2592,6 +2597,28 @@ func (s *FullNodeStub) StateGetActor(p0 context.Context, p1 address.Address, p2
return nil, ErrNotSupported
}
func (s *FullNodeStruct) StateGetAllocation(p0 context.Context, p1 address.Address, p2 verifregtypes.AllocationId, p3 types.TipSetKey) (*verifregtypes.Allocation, error) {
if s.Internal.StateGetAllocation == nil {
return nil, ErrNotSupported
}
return s.Internal.StateGetAllocation(p0, p1, p2, p3)
}
func (s *FullNodeStub) StateGetAllocation(p0 context.Context, p1 address.Address, p2 verifregtypes.AllocationId, p3 types.TipSetKey) (*verifregtypes.Allocation, error) {
return nil, ErrNotSupported
}
func (s *FullNodeStruct) StateGetAllocationForPendingDeal(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*verifregtypes.Allocation, error) {
if s.Internal.StateGetAllocationForPendingDeal == nil {
return nil, ErrNotSupported
}
return s.Internal.StateGetAllocationForPendingDeal(p0, p1, p2)
}
func (s *FullNodeStub) StateGetAllocationForPendingDeal(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*verifregtypes.Allocation, error) {
return nil, ErrNotSupported
}
func (s *FullNodeStruct) StateGetBeaconEntry(p0 context.Context, p1 abi.ChainEpoch) (*types.BeaconEntry, error) {
if s.Internal.StateGetBeaconEntry == nil {
return nil, ErrNotSupported

View File

@ -16,6 +16,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin/v8/paych"
"github.com/filecoin-project/go-state-types/builtin/v9/miner"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/go-state-types/dline"
abinetwork "github.com/filecoin-project/go-state-types/network"
@ -531,6 +532,10 @@ type FullNode interface {
StateMarketDeals(context.Context, types.TipSetKey) (map[string]*api.MarketDeal, error) //perm:read
// StateMarketStorageDeal returns information about the indicated deal
StateMarketStorageDeal(context.Context, abi.DealID, types.TipSetKey) (*api.MarketDeal, error) //perm:read
// StateGetAllocationForPendingDeal returns the allocation for a given deal ID of a pending deal.
StateGetAllocationForPendingDeal(ctx context.Context, dealId abi.DealID, tsk types.TipSetKey) (*verifregtypes.Allocation, error)
// StateGetAllocation returns the allocation for a given address and allocation ID.
StateGetAllocation(ctx context.Context, clientAddr address.Address, allocationId verifregtypes.AllocationId, tsk types.TipSetKey) (*verifregtypes.Allocation, error) //perm:read
// StateLookupID retrieves the ID address of the given address
StateLookupID(context.Context, address.Address, types.TipSetKey) (address.Address, error) //perm:read
// StateAccountKey returns the public key address of the given ID address

View File

@ -18,6 +18,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin/v8/paych"
"github.com/filecoin-project/go-state-types/builtin/v9/miner"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/go-state-types/dline"
abinetwork "github.com/filecoin-project/go-state-types/network"
@ -277,6 +278,10 @@ type FullNodeStruct struct {
StateGetActor func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*types.Actor, error) `perm:"read"`
StateGetAllocation func(p0 context.Context, p1 address.Address, p2 verifregtypes.AllocationId, p3 types.TipSetKey) (*verifregtypes.Allocation, error) `perm:"read"`
StateGetAllocationForPendingDeal func(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*verifregtypes.Allocation, error) ``
StateGetNetworkParams func(p0 context.Context) (*api.NetworkParams, error) `perm:"read"`
StateGetRandomnessFromBeacon func(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) `perm:"read"`
@ -1793,6 +1798,28 @@ func (s *FullNodeStub) StateGetActor(p0 context.Context, p1 address.Address, p2
return nil, ErrNotSupported
}
func (s *FullNodeStruct) StateGetAllocation(p0 context.Context, p1 address.Address, p2 verifregtypes.AllocationId, p3 types.TipSetKey) (*verifregtypes.Allocation, error) {
if s.Internal.StateGetAllocation == nil {
return nil, ErrNotSupported
}
return s.Internal.StateGetAllocation(p0, p1, p2, p3)
}
func (s *FullNodeStub) StateGetAllocation(p0 context.Context, p1 address.Address, p2 verifregtypes.AllocationId, p3 types.TipSetKey) (*verifregtypes.Allocation, error) {
return nil, ErrNotSupported
}
func (s *FullNodeStruct) StateGetAllocationForPendingDeal(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*verifregtypes.Allocation, error) {
if s.Internal.StateGetAllocationForPendingDeal == nil {
return nil, ErrNotSupported
}
return s.Internal.StateGetAllocationForPendingDeal(p0, p1, p2)
}
func (s *FullNodeStub) StateGetAllocationForPendingDeal(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*verifregtypes.Allocation, error) {
return nil, ErrNotSupported
}
func (s *FullNodeStruct) StateGetNetworkParams(p0 context.Context) (*api.NetworkParams, error) {
if s.Internal.StateGetNetworkParams == nil {
return nil, ErrNotSupported

View File

@ -28,6 +28,7 @@ import (
big "github.com/filecoin-project/go-state-types/big"
paych "github.com/filecoin-project/go-state-types/builtin/v8/paych"
miner "github.com/filecoin-project/go-state-types/builtin/v9/miner"
verifreg "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
crypto "github.com/filecoin-project/go-state-types/crypto"
dline "github.com/filecoin-project/go-state-types/dline"
network "github.com/filecoin-project/go-state-types/network"
@ -2322,6 +2323,36 @@ func (mr *MockFullNodeMockRecorder) StateGetActor(arg0, arg1, arg2 interface{})
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetActor", reflect.TypeOf((*MockFullNode)(nil).StateGetActor), arg0, arg1, arg2)
}
// StateGetAllocation mocks base method.
func (m *MockFullNode) StateGetAllocation(arg0 context.Context, arg1 address.Address, arg2 verifreg.AllocationId, arg3 types.TipSetKey) (*verifreg.Allocation, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateGetAllocation", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(*verifreg.Allocation)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateGetAllocation indicates an expected call of StateGetAllocation.
func (mr *MockFullNodeMockRecorder) StateGetAllocation(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetAllocation", reflect.TypeOf((*MockFullNode)(nil).StateGetAllocation), arg0, arg1, arg2, arg3)
}
// StateGetAllocationForPendingDeal mocks base method.
func (m *MockFullNode) StateGetAllocationForPendingDeal(arg0 context.Context, arg1 abi.DealID, arg2 types.TipSetKey) (*verifreg.Allocation, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateGetAllocationForPendingDeal", arg0, arg1, arg2)
ret0, _ := ret[0].(*verifreg.Allocation)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateGetAllocationForPendingDeal indicates an expected call of StateGetAllocationForPendingDeal.
func (mr *MockFullNodeMockRecorder) StateGetAllocationForPendingDeal(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetAllocationForPendingDeal", reflect.TypeOf((*MockFullNode)(nil).StateGetAllocationForPendingDeal), arg0, arg1, arg2)
}
// StateGetNetworkParams mocks base method.
func (m *MockFullNode) StateGetNetworkParams(arg0 context.Context) (*api.NetworkParams, error) {
m.ctrl.T.Helper()

Binary file not shown.

View File

@ -1,2 +1,2 @@
/dns4/bootstrap-0.butterfly.fildev.network/tcp/1347/p2p/12D3KooWHc8xB2S1wFeF9ar9bVdXoEEaBPGLqfKxVQH55c4nNmxs
/dns4/bootstrap-1.butterfly.fildev.network/tcp/1347/p2p/12D3KooWPcNcwS3cKarWrN7MfANWNpzXmZA9Ag6eH9FHFdLQ3LFQ
/dns4/bootstrap-0.butterfly.fildev.network/tcp/1347/p2p/12D3KooWF4Yn38Y131nRN9Zn5JD8yyAJoXUKFFKATb86cd6pKBh9
/dns4/bootstrap-1.butterfly.fildev.network/tcp/1347/p2p/12D3KooWG7UQKGwXY4LpKRT8Cshz1vUmU414bvJmAWSeJsw3m7GW

View File

@ -26,19 +26,20 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet
}, {
Network: "butterflynet",
Version: 9,
ManifestCid: MustParseCid("bafy2bzacebor5miojgkvov7gtiirg7hqxgm54x3hxytbho3qloqryg2r67qaq"),
ManifestCid: MustParseCid("bafy2bzacebcnide2dzbzetd7wagga4licgxbk3dpqwtswzquskg654f4e5rmu"),
Actors: map[string]cid.Cid{
"account": MustParseCid("bafk2bzacecd7kgfzbyu4sylskgf7wjqabo43y3d7xqgvz7r67pzr3ovn3sj7y"),
"cron": MustParseCid("bafk2bzacea6dc2a6skmp7saa43dcofp7zvtklvya75bai2k4k6qnkpcfzklug"),
"init": MustParseCid("bafk2bzacean5v7lbsspxmdkcwhac44sk332uwyfteibtxyhgoeabwbzbh736c"),
"multisig": MustParseCid("bafk2bzacea43lypvbof5kwnk2flzrwdrqqvzypom5xyheeuaab6dmuiafngae"),
"paymentchannel": MustParseCid("bafk2bzacecsdimcgztl4tfodnqc35jojoy4mzaqqidubialqmqaa3zpv4h3rw"),
"reward": MustParseCid("bafk2bzacedy3utj67mewe7rpieaex3sf7qxfkgiwtlgg4wlqyl74la65njbn2"),
"storagemarket": MustParseCid("bafk2bzacec4xpazf3l2p5qkknjsku2sd3skqevk7gxryumbelwhfbs7mgjnpa"),
"storageminer": MustParseCid("bafk2bzaceb5scwcdcou56vyhxq3c7vcefjau44v2h6nvsus45wqopt3hadzae"),
"storagepower": MustParseCid("bafk2bzacebxl4ssugntkckifkq6sydczcas463bmonwi2m5hddurzzcukdzyg"),
"system": MustParseCid("bafk2bzacedtw2ebtl3uccbqfcm6jd7teinlpktcglopuaxa6ev334jhs46hso"),
"verifiedregistry": MustParseCid("bafk2bzaceds62ys6rpbtjjsemohalxnkr3jtqhflifabn3xlhpi45mvi757po"),
"account": MustParseCid("bafk2bzacebp5ucdpsdqbdygr4pazv5jka43qkwx6zgdh5peqph5xcbfyj32lg"),
"cron": MustParseCid("bafk2bzaceb3ehfxyix6iuogt3rxh36rbk24vdlyumi6jwipk5lfssiegtjjgk"),
"datacap": MustParseCid("bafk2bzacec2pcbn62fhjefexvt2lq4kz7xaovztgj5wzhxnj2cbu4nuk2mjpq"),
"init": MustParseCid("bafk2bzaceau6iiwdt3psuqlmoeswfh3jnostxnmjd7vbtjai2dsfbhizkrp3i"),
"multisig": MustParseCid("bafk2bzacearoeviwpkmjwaxlltpc3vqaybqocmzaltgboizlkucvcjbefzgje"),
"paymentchannel": MustParseCid("bafk2bzacechv66oyt5qkczw3vjjrtva4oba4yi6ekuvagkpdkz6ij7wwf2hxe"),
"reward": MustParseCid("bafk2bzaceapqv5obrfvuudvrucppwnu55m4uewgfc2jrxwaxy4krcynf7in3g"),
"storagemarket": MustParseCid("bafk2bzacedask2yjvmobmy3j5pzq2mwsqldrmryf4b4jsrzv7rlzwfqvsdi6o"),
"storageminer": MustParseCid("bafk2bzacec2xnirbectkwggkrx3h5kou4n44q4lynaec5ktwfpipbss3krkso"),
"storagepower": MustParseCid("bafk2bzaceaibs2lx5chdjptwzz6muh2qat3hsi44lentpwjzos7lpqfevt5gk"),
"system": MustParseCid("bafk2bzaceamjb2hixhzjxju5hjgx76s6gql3i6b4z7ddid2tfavupjbgcsksg"),
"verifiedregistry": MustParseCid("bafk2bzacebblylmrs75fdg5byhea4bc2dhib6eedcgtqkxzucfv7mx4uxnkea"),
},
}, {
Network: "calibrationnet",
@ -60,19 +61,20 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet
}, {
Network: "calibrationnet",
Version: 9,
ManifestCid: MustParseCid("bafy2bzacectdlm3f5m252s6ken3ncnndvwj4a7hqyev2m7iba4lubkt72r2rm"),
ManifestCid: MustParseCid("bafy2bzacedrgj57jadi2en4xyvlgbby2yltkhtpo6o4n2x6zakeulw7centxc"),
Actors: map[string]cid.Cid{
"account": MustParseCid("bafk2bzaceag3pkyy5youg2i4qyrhqms2jobycddkhd4eebtlkeqj4wu4sw7ji"),
"cron": MustParseCid("bafk2bzaceaii7ryi4sjqqrrwyqaxulzqgiigkjqfa3f3ghhisleaqrinyal4o"),
"init": MustParseCid("bafk2bzacebpi37hcleu7cpqgs5zdg4zsw7qpydt5w25jny2dyyscsyidquvcw"),
"multisig": MustParseCid("bafk2bzacebt522zme5n3q25mecukjvomfyyzduxormgnprl73mdb5ekda2ywy"),
"paymentchannel": MustParseCid("bafk2bzacebdxmtmloxfyhxkoj4p4ze5gojqohvqjmdmv2t54xyrgfnjs52p26"),
"reward": MustParseCid("bafk2bzacebt7vup2pdxie67goc5ourij32z4ofejlrbv7styzm47ytvmmxx5a"),
"storagemarket": MustParseCid("bafk2bzacebeohybortft5jiihfvfly5oiygvf2hulnuif7vivklind32hbr3c"),
"storageminer": MustParseCid("bafk2bzaceallhekg5fhibexjurqcwrx6uzacbyq5eofic6jbdiu3vhepq6xsw"),
"storagepower": MustParseCid("bafk2bzaceassqqdljvblivbcrkv62a36gxjwf7dmkgez6ezq2oydx3dv2b3z2"),
"system": MustParseCid("bafk2bzacebxsecqifqvqxavnmsuwigmnc5rcuxoezspmykeqinkbgrkfukmgs"),
"verifiedregistry": MustParseCid("bafk2bzacedrmxfk5qifi7ujcb7mm73mwoy5e7nbndxhbqauuyol6cunf6popm"),
"account": MustParseCid("bafk2bzacebxs3elhbnhmy3gsks6vikau25t6n7umywfgrdyz2e6qzlsvqe5tg"),
"cron": MustParseCid("bafk2bzacebqf6737wv76u25mszqyk4mc33ncsomdqa5g2l5dz46ztxn2iaadc"),
"datacap": MustParseCid("bafk2bzacecmjunydcppgeabrav6mywm4b56jyzdhuifq636l3kh5ovupmll7o"),
"init": MustParseCid("bafk2bzaceaoiifa66ojk2podpmbrrhszof2a4e56dqkj2nqyjtz4iadnfo3tq"),
"multisig": MustParseCid("bafk2bzacecarrdxmmczdpuhc5p3zqwoyatlriuropok72wsbzeheeioxvqshe"),
"paymentchannel": MustParseCid("bafk2bzacebjlp3aqlhpkebvj4intmu4nfxzhc6dru4zfdk47ctrf64tlmbpi2"),
"reward": MustParseCid("bafk2bzacebhebh2zsf3xkzraohu4tze3cm5asikuxclpr7rx2eb5yjyhhtvcy"),
"storagemarket": MustParseCid("bafk2bzacedaur7w2xhgqxubesowf7pbkh5f3gbx6qqhhgw7letx7xvf7rbjpe"),
"storageminer": MustParseCid("bafk2bzacecrhemkc2c7jk7wqqatjn4ij6xlobttlt25olwq3baxunyprfpt7a"),
"storagepower": MustParseCid("bafk2bzaceapasddzm55b3meyliyqrgqywu2dkhatipqhfh6ab4qsujpbpyg5a"),
"system": MustParseCid("bafk2bzacecvgxvm5ybghw3rcte5kbs236jhb33lv7z36ugia6oqqcprcjj64o"),
"verifiedregistry": MustParseCid("bafk2bzaced5ev325in2gbodnzf6y5qqj7qh5wnxhqgi6ihwlnzfr2t3coitno"),
},
}, {
Network: "caterpillarnet",
@ -94,19 +96,20 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet
}, {
Network: "caterpillarnet",
Version: 9,
ManifestCid: MustParseCid("bafy2bzaceaknnblpmv3qqeqlgdycpps2vkgbgkflugbqz47k6zwrqte54hqy2"),
ManifestCid: MustParseCid("bafy2bzacebfm4wkl5n746frgrhwkyb67upx2qcnp436vs6qyfuegosucvktws"),
Actors: map[string]cid.Cid{
"account": MustParseCid("bafk2bzaceckajm6tcdpvfsrvagduv6cuefuo3modkpfupum6ibspulgvporrw"),
"cron": MustParseCid("bafk2bzacea74zhlldpihms2ohp3wvefojifvudbblmeju3izwrpcpxemp43fo"),
"init": MustParseCid("bafk2bzacea5nqh4l76vm4ys6vgrqyt77tquk66il3w5ho3zxugka22fipdkdw"),
"multisig": MustParseCid("bafk2bzacea3ftmx2roav4psh63r5n2sol6x3kwpmfwe473pexhj6lg7pruu2k"),
"paymentchannel": MustParseCid("bafk2bzacea2gqhnycejjfuinywoz4j7pmsvxn3i2y5epdx5vqpo23phx6jeac"),
"reward": MustParseCid("bafk2bzaceamdxogvus7zawqtju3vesmj6ffpf3ta6dlwvvstyfbf23sow2tes"),
"storagemarket": MustParseCid("bafk2bzacecvh6qhfe3ityehpibxmmw43l7recwtru3l4n3yrdj5bmnv4efnrc"),
"storageminer": MustParseCid("bafk2bzaced6ya5wlvplkvnvmhuc2uh5zq7oft6pyyoouwouuoreuk6grn6vsw"),
"storagepower": MustParseCid("bafk2bzacedbfoblr65vbqwx37cym6v3zhbgrau46vma4c2lbh6toz6q5dyrtc"),
"system": MustParseCid("bafk2bzaced7z2lu5hp4qpsesbmubq3chrad3sl6kgveldafksh4w252ijjaw2"),
"verifiedregistry": MustParseCid("bafk2bzacec6fdlcvlnaiktdptogae3bgofhzo24lhn4hs6rsa2zbnknfpsct6"),
"account": MustParseCid("bafk2bzacedezrf7kbr5qwud2lzcn4cvmy6yr7x4kghkys7ogcbguuszmbpjh6"),
"cron": MustParseCid("bafk2bzaceag4kobt7h4rgje4kuscfuliwz32bg5gzlgzx4idt3sc5ytpwfvwm"),
"datacap": MustParseCid("bafk2bzaceav44s6t3zbb4z6fi4ppla37zdrrhbc27r2jsg3bgodi7c5g6zh6a"),
"init": MustParseCid("bafk2bzacedsug6zxmcdn5o3xjx7oxb7dfykd7dmk5jkjwos55kmesu32kgdc2"),
"multisig": MustParseCid("bafk2bzaceclvf6233rsyrxs53saaxrc4ak2px7t5p4d6kfwnbt3rvycvfg2yq"),
"paymentchannel": MustParseCid("bafk2bzacea2op6eo4wqtfhnyjntb6jwdtf4gu4mrgwvf2m3et5zjpkxxmmfva"),
"reward": MustParseCid("bafk2bzacebwkpixo32nqbujavz42uzi7cr3fmbb66vgh7ym76ajted4xdtr2w"),
"storagemarket": MustParseCid("bafk2bzacebusm5v743zb2vlfg4b5in3jx6xsejmhewlsedz7lc364yewl2bf2"),
"storageminer": MustParseCid("bafk2bzacedrf2c5spfzzy4xgzavhddw2hcnjnbziakprg3a2yn5kxespbhp7i"),
"storagepower": MustParseCid("bafk2bzacechebhqbhuqv26j456hy4dgekjscp4qq322reghuhimriy642on46"),
"system": MustParseCid("bafk2bzacech6lad3prfzr3nywrw6phspopyz443hf373ys5k3mhnxxlydyuig"),
"verifiedregistry": MustParseCid("bafk2bzacecypniibxhc5rmq2recjnttkd3lybm6xdfbnv5hzmto5pn2feswdq"),
},
}, {
Network: "devnet",
@ -128,19 +131,20 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet
}, {
Network: "devnet",
Version: 9,
ManifestCid: MustParseCid("bafy2bzacecogd7hb3dap7d4abyikdgt6b2zs46s4qyilsgxk4rsienbvvstp4"),
ManifestCid: MustParseCid("bafy2bzacecvx7qba5j7rtfiyjekt5wlgqxz734s6g6pwmgp4dkhnf5z2jgnfc"),
Actors: map[string]cid.Cid{
"account": MustParseCid("bafk2bzacecrgqcwn2j6c44tnfx32om4upg56b7gdwslfgeuyfsm6iwkiuhm2w"),
"cron": MustParseCid("bafk2bzaceblepwha5i5cpac37arpcxjcebm5k7p4e5ed7bwcq7ie6fryxgno4"),
"init": MustParseCid("bafk2bzacebjr3xwsdzfie47rtffibt3irr7a5qqstt7fsbwnolzz3z6oy5frw"),
"multisig": MustParseCid("bafk2bzacec66uf5u7o7q3u3pufrtufya6ntwrreysrwwlzqdjbtj36ajuamz4"),
"paymentchannel": MustParseCid("bafk2bzacebouukxeahifxfoymmvibngg6abftd7luiq5x2c7zxulvqyerwoeg"),
"reward": MustParseCid("bafk2bzacecj4pry2xb6w4kd4xxvs3dqd2endfynnwrkf66zakmt376tafy6ym"),
"storagemarket": MustParseCid("bafk2bzacecmij6fgaasgu7zm354fltmvhwmepzwadhl4euxhb64yg4pgfkxgw"),
"storageminer": MustParseCid("bafk2bzaceb5qyhchlvqvcq5cvrc5tuyjrrz6qkgbbxx4vr4wxhtoa4bfp56bg"),
"storagepower": MustParseCid("bafk2bzaced377v52henedhmudi2isuxe73mp2lrv2zyyxfp4r4uppz3sy2ipw"),
"system": MustParseCid("bafk2bzacebb3gdmg2fqexijivo7dkxj6g6gu7ou2jsw6opszr5gfmwt4fvorw"),
"verifiedregistry": MustParseCid("bafk2bzacec5xfb3a56mlclymhvs2br3qzx7sagqda4dvl4xz3fgiymkkbz5tk"),
"account": MustParseCid("bafk2bzacea72ocyrf45dmnv4pa3b7eny7wownvvtdnmsqfps34ooged3mufww"),
"cron": MustParseCid("bafk2bzaceal2q44ed5m6takoj5ojnqgfwxyvrvki5btf2c5r4s53qogjde2x6"),
"datacap": MustParseCid("bafk2bzaced7znewdjztytizav2h23biutipylp2qzee5kjls53ef3np22cz34"),
"init": MustParseCid("bafk2bzacec2efo72adwuptix2ltwwqg3yoehkhvzaokhonweaxu2qnxlussai"),
"multisig": MustParseCid("bafk2bzaceddjojn4fwqgdgwsseutr4phkfrmeo57gom2i2zwbbl2ajrjgrywe"),
"paymentchannel": MustParseCid("bafk2bzacecczjm2y6qg2jwj4bwvm4qydqt6vfkz2rswdaswbyupq246arfbuw"),
"reward": MustParseCid("bafk2bzaceanujz6rdu6hqlnp77vhupvonxth4pqcwn2nkt2nb7pncinpqlx5q"),
"storagemarket": MustParseCid("bafk2bzacebv6npxh5tec4mfoy3gsuemtlgrrraitxd7sje4w72ddqylxxboyu"),
"storageminer": MustParseCid("bafk2bzacec6gn7l7xuj5aqh2kfv6y46siwxkj522wunhkph53csf6l4rjcxpk"),
"storagepower": MustParseCid("bafk2bzaceapogidwh2442dkz45mon23wkkstzfzzuyti34mfkux5t4mbkhe7m"),
"system": MustParseCid("bafk2bzaceb7os2ojnznhhqpnwzaldeg6xmof5afqe6w74wifknsf5aeddpa7s"),
"verifiedregistry": MustParseCid("bafk2bzaceb63qvv7av65q2xtunjg37qmlesgc7yesbfiwmfaulq5v3gsig3cw"),
},
}, {
Network: "mainnet",
@ -162,19 +166,20 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet
}, {
Network: "mainnet",
Version: 9,
ManifestCid: MustParseCid("bafy2bzaceb7nrn4icde3yt7s2kpllliodblq2i3iuslh3l6swgjqyusual72u"),
ManifestCid: MustParseCid("bafy2bzacedssmcblrsuiahfytfhakkncezgz5jlkri6u5ugz5xcmcztm4rv22"),
Actors: map[string]cid.Cid{
"account": MustParseCid("bafk2bzacedchhykcbvptlrnts62xa2h7fewsyvb4imktudll7tbogkwj4ccpy"),
"cron": MustParseCid("bafk2bzaced2e2ivtglevf5tnqay6eqdl3m5ilx4az766ojbhmy2kbxmkogbni"),
"init": MustParseCid("bafk2bzaceapzqn6e3cfpf4ntln4dkyrqe5egygmjczefduy7fuabxh2npqq6o"),
"multisig": MustParseCid("bafk2bzacebxihi4x4lzelmmdtxiz5gub3cjgthrgxuj5mxl2ihxaz6qhp5qbu"),
"paymentchannel": MustParseCid("bafk2bzacecv34ahs6k552won2vj4r62gur5i7inqnycg7y4dg27ktlq76stlk"),
"reward": MustParseCid("bafk2bzacea4er76nlnzz3muuvdxs4dbygejztezanpafi42idj57n75sumu7o"),
"storagemarket": MustParseCid("bafk2bzacedd3pjxcwgxfli4a5udw3ebbo4gom43epizbldvto7ovduqk6udj6"),
"storageminer": MustParseCid("bafk2bzacebtuopxp2464fxulzfyr4iw7bj4pelfxlatudaf6q5qtahokeo3lo"),
"storagepower": MustParseCid("bafk2bzacec3dmcwtizgy6qhxg6fgb4ykc2pamxxh2n5oyeqvebjf3ikzd2sui"),
"system": MustParseCid("bafk2bzacecrm36gf2gusruvhfc6ukf36qflsr5pdbquvfyysprdyudsatoufm"),
"verifiedregistry": MustParseCid("bafk2bzaceah3mwu6tb4jmffohpoz6nyoxpgno2hmxz455rycw4o2hrat3yg3u"),
"account": MustParseCid("bafk2bzacedebmlnbpnengcdjaaaqcvs3jncwghs36iwyb3jf3bjzfuzkubmgo"),
"cron": MustParseCid("bafk2bzaceblzkjygrdynmonipyp47cbyodualzs27nlbwbzdlnkn46rwjr7no"),
"datacap": MustParseCid("bafk2bzacedddycfo4izaeevrszibtks6l43c2aqzkisn3ddhzgurajeic3o3q"),
"init": MustParseCid("bafk2bzacebsjpohpukyblldzv4kqtpo55jraq4gi2nrpwwwnytgkeqxb476jc"),
"multisig": MustParseCid("bafk2bzacecy5whxfma6ydpbatrtzr6vpzx3jg2dvqkcxtvjt4vrn2yt6aigg6"),
"paymentchannel": MustParseCid("bafk2bzacebfwjzmwlmcpkhftbothbid32racor7yrqntyybeefbhwdvurpswy"),
"reward": MustParseCid("bafk2bzacebbx7ylhbvpk5t6gdswnbxxbdrkfdhvjt3vryatdonimtnmkishsm"),
"storagemarket": MustParseCid("bafk2bzacebek4ri3foczsqcefoq7wmt37skw4hlmlgzwjxtr4kknydehjvgia"),
"storageminer": MustParseCid("bafk2bzacebeuqhuu6jd6fuuc36ageady6rbjcdvew54552tk76zctcgqxg3we"),
"storagepower": MustParseCid("bafk2bzaceavyu2b2ixgvogxtbkpvh73j2dj2bhpmvg5y64yklkmo3zfsd2fsk"),
"system": MustParseCid("bafk2bzaceany5wurpacllbyjfjwnt32henqefck4ll5xbute6d2yuci5tscdw"),
"verifiedregistry": MustParseCid("bafk2bzaced6crzacbiugb5t5wmeqy45prdozer4ovrcuw4646pbig575ehali"),
},
}, {
Network: "testing",
@ -196,19 +201,20 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet
}, {
Network: "testing",
Version: 9,
ManifestCid: MustParseCid("bafy2bzaceas5fka4rtyvnqwvvwdi2qqhbnu7hnyz37chhpflh4rdbwnoupols"),
ManifestCid: MustParseCid("bafy2bzacebkbchtla4vyis2ayo45jrpdxeyaqvxbxuvxuwfzjsjmhh6bv2qpy"),
Actors: map[string]cid.Cid{
"account": MustParseCid("bafk2bzacecsmbmd42fsg33wd3u5vxyp4n4a4mac423fduauishjhiyv2bqz7w"),
"cron": MustParseCid("bafk2bzacedajlwnkefucjxzasudkfojrz3bnhnnirebvacxrtly5y2kfb7qiu"),
"init": MustParseCid("bafk2bzaceat7cvf7s2vnmqoldzafkpjygi6wv3sfnclenfbahk4htsgu4aqsa"),
"multisig": MustParseCid("bafk2bzacebh7pwb7eoyigwgjs2r32ebtxwbwgxqd4cvou4katq4axmhd7lxsq"),
"paymentchannel": MustParseCid("bafk2bzaceb6nbmyo2girdpnwywby7yzelx7g6s4snbq3kb3mmd2pp33qefkww"),
"reward": MustParseCid("bafk2bzacedttgmuddtlrp2ie4i2vzuueury455knof5muqtqlslscxrk7ucl6"),
"storagemarket": MustParseCid("bafk2bzacebjtz7fg5n2sm4wg464fyg5vcvux5hqrsdwki675hsquhh3rpe5rg"),
"storageminer": MustParseCid("bafk2bzacea2c2genvtsktr3f6yjlny57gwqyt5dbqrfws56wn5ssyl2tevjjg"),
"storagepower": MustParseCid("bafk2bzaceasmr5xc3c7jgihqcb5pdv557kfor72wlmzmh4syvedknelebhsve"),
"system": MustParseCid("bafk2bzaceabj3whuno364pjqn7sphwquiqpl2w5le6aa6quwytgyxshvelcwq"),
"verifiedregistry": MustParseCid("bafk2bzaceamn6gzihkytyqym4dqs7wqmo2fz6kpge4tphumvutsp2ys4bwaha"),
"account": MustParseCid("bafk2bzaced7ycpln5lowfqj7i5dihg2dzpe6bdku7agh5z5r5xi6iszh253ma"),
"cron": MustParseCid("bafk2bzaceb4po6scnb2aqf6uq7qye3itnan2rqhhda6df7c6b7wbabg3emlv6"),
"datacap": MustParseCid("bafk2bzacedj3cyniadtch4gpcxsuz6vmsgvjuehcbte7mwlc2hbgcyorkfkee"),
"init": MustParseCid("bafk2bzacecmmppaxv52wwq7rzdxqzswsyeb3ep66dntd2i6d3xzqv2gpjvpds"),
"multisig": MustParseCid("bafk2bzacednjhad3tww7aiw6rmqtfrvihwjp2hu7j7g6nnvj62tbeg34ai3k6"),
"paymentchannel": MustParseCid("bafk2bzaceckefmdevbo4on3ryp2kl6kihmi4wgxhwyq7n7md4oymscsvw7xu2"),
"reward": MustParseCid("bafk2bzaceawr4chnovdhdgzvb5zdw6wtljx3lozkgtgpy4tkjq7esumi5gpu6"),
"storagemarket": MustParseCid("bafk2bzacedthnjlint3ztsa74aryuabdovbqfmrvk6h7wsaqxxzt5ql4dnvgs"),
"storageminer": MustParseCid("bafk2bzacea57w6gztilas6qb6lcqsjbaskp5wugl3igxselbmnwuouhw2kjkk"),
"storagepower": MustParseCid("bafk2bzacecg4pk7wzxkby3zt2swbzjnxyv7nq5r4sy3cyvixjx5dfiscjdvxe"),
"system": MustParseCid("bafk2bzacec26zumhn5vqbbxitqvwdgyjtbj7y33pcafudj6ae3xsmv2ma5ic2"),
"verifiedregistry": MustParseCid("bafk2bzacecnamy35xoragxkb3fktr6okfftch4zabbaqsvrbq5gztspng3ud6"),
},
}, {
Network: "testing-fake-proofs",
@ -230,18 +236,19 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet
}, {
Network: "testing-fake-proofs",
Version: 9,
ManifestCid: MustParseCid("bafy2bzacebr7bo4shotwq4cct3ablt6hlcozg4h2e52av2q3md5di7sibrqj2"),
ManifestCid: MustParseCid("bafy2bzaceaw6dqbsi4t7itopr7usmdsq7v5zkxzimsw2toe5i3t7j5usygxea"),
Actors: map[string]cid.Cid{
"account": MustParseCid("bafk2bzacecsmbmd42fsg33wd3u5vxyp4n4a4mac423fduauishjhiyv2bqz7w"),
"cron": MustParseCid("bafk2bzacedajlwnkefucjxzasudkfojrz3bnhnnirebvacxrtly5y2kfb7qiu"),
"init": MustParseCid("bafk2bzaceat7cvf7s2vnmqoldzafkpjygi6wv3sfnclenfbahk4htsgu4aqsa"),
"multisig": MustParseCid("bafk2bzacebh7pwb7eoyigwgjs2r32ebtxwbwgxqd4cvou4katq4axmhd7lxsq"),
"paymentchannel": MustParseCid("bafk2bzaceb6nbmyo2girdpnwywby7yzelx7g6s4snbq3kb3mmd2pp33qefkww"),
"reward": MustParseCid("bafk2bzacedttgmuddtlrp2ie4i2vzuueury455knof5muqtqlslscxrk7ucl6"),
"storagemarket": MustParseCid("bafk2bzacebjtz7fg5n2sm4wg464fyg5vcvux5hqrsdwki675hsquhh3rpe5rg"),
"storageminer": MustParseCid("bafk2bzacedaxvye4reegpy2fecjuzwt4nly2myhplnvkzhssquo2jjw7vfmuy"),
"storagepower": MustParseCid("bafk2bzaceaoteuuvld3bzy3t3kzjp5iabgkvxjc5cxq2ziwankpxqqixkqqjw"),
"system": MustParseCid("bafk2bzaceabj3whuno364pjqn7sphwquiqpl2w5le6aa6quwytgyxshvelcwq"),
"verifiedregistry": MustParseCid("bafk2bzaceamn6gzihkytyqym4dqs7wqmo2fz6kpge4tphumvutsp2ys4bwaha"),
"account": MustParseCid("bafk2bzaced7ycpln5lowfqj7i5dihg2dzpe6bdku7agh5z5r5xi6iszh253ma"),
"cron": MustParseCid("bafk2bzaceb4po6scnb2aqf6uq7qye3itnan2rqhhda6df7c6b7wbabg3emlv6"),
"datacap": MustParseCid("bafk2bzacedj3cyniadtch4gpcxsuz6vmsgvjuehcbte7mwlc2hbgcyorkfkee"),
"init": MustParseCid("bafk2bzacecmmppaxv52wwq7rzdxqzswsyeb3ep66dntd2i6d3xzqv2gpjvpds"),
"multisig": MustParseCid("bafk2bzacednjhad3tww7aiw6rmqtfrvihwjp2hu7j7g6nnvj62tbeg34ai3k6"),
"paymentchannel": MustParseCid("bafk2bzaceckefmdevbo4on3ryp2kl6kihmi4wgxhwyq7n7md4oymscsvw7xu2"),
"reward": MustParseCid("bafk2bzaceawr4chnovdhdgzvb5zdw6wtljx3lozkgtgpy4tkjq7esumi5gpu6"),
"storagemarket": MustParseCid("bafk2bzacedthnjlint3ztsa74aryuabdovbqfmrvk6h7wsaqxxzt5ql4dnvgs"),
"storageminer": MustParseCid("bafk2bzaceauuu3ertzepcsrbrjoj45vfacv3r3wahvpceownq6uxqo25vmmfe"),
"storagepower": MustParseCid("bafk2bzaceah4rejdsynerm3jigwta3i5azymp7eiuyjezvv6kx3sbhx5lvdsm"),
"system": MustParseCid("bafk2bzacec26zumhn5vqbbxitqvwdgyjtbj7y33pcafudj6ae3xsmv2ma5ic2"),
"verifiedregistry": MustParseCid("bafk2bzacecnamy35xoragxkb3fktr6okfftch4zabbaqsvrbq5gztspng3ud6"),
},
}}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -56,7 +56,7 @@ var UpgradeOhSnapHeight = abi.ChainEpoch(-18)
var UpgradeSkyrHeight = abi.ChainEpoch(-19)
var UpgradeV17Height = abi.ChainEpoch(99999999999999)
var UpgradeV17Height = abi.ChainEpoch(100)
var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
0: DrandMainnet,

View File

@ -49,7 +49,7 @@ const UpgradeHyperdriveHeight = -16
const UpgradeChocolateHeight = -17
const UpgradeOhSnapHeight = -18
const UpgradeSkyrHeight = -19
const UpgradeV17Height = abi.ChainEpoch(99999999999999)
const UpgradeV17Height = abi.ChainEpoch(50)
var SupportedProofTypes = []abi.RegisteredSealProof{
abi.RegisteredSealProof_StackedDrg512MiBV1,

View File

@ -50,6 +50,8 @@ func MakeState(store adt.Store, av actorstypes.Version, governor address.Address
type State interface {
cbor.Marshaler
ForEachClient(func(addr address.Address, dcap abi.StoragePower) error) error
VerifiedClientDataCap(address.Address) (bool, abi.StoragePower, error)
Governor() (address.Address, error)
GetState() interface{}
}

View File

@ -4,6 +4,7 @@ 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"
builtin9 "github.com/filecoin-project/go-state-types/builtin"
"github.com/filecoin-project/go-state-types/cbor"
@ -50,6 +51,8 @@ func MakeState(store adt.Store, av actorstypes.Version, governor address.Address
type State interface {
cbor.Marshaler
ForEachClient(func(addr address.Address, dcap abi.StoragePower) error) error
VerifiedClientDataCap(address.Address) (bool, abi.StoragePower, error)
Governor() (address.Address, error)
GetState() interface{}
}

View File

@ -10,7 +10,6 @@ import (
datacap{{.v}} "github.com/filecoin-project/go-state-types/builtin{{.import}}datacap"
adt{{.v}} "github.com/filecoin-project/go-state-types/builtin{{.import}}util/adt"
builtin{{.v}} "github.com/filecoin-project/go-state-types/builtin"
)
var _ State = (*state{{.v}})(nil)
@ -47,4 +46,16 @@ func (s *state{{.v}}) Governor() (address.Address, error) {
func (s *state{{.v}}) GetState() interface{} {
return &s.State
}
}
func (s *state{{.v}}) ForEachClient(cb func(addr address.Address, dcap abi.StoragePower) error) error {
return forEachClient(s.store, actors.Version{{.v}}, s.verifiedClients, cb)
}
func (s *state{{.v}}) verifiedClients() (adt.Map, error) {
return adt{{.v}}.AsMap(s.store, s.Token.Balances, int(s.Token.HamtBitWidth))
}
func (s *state{{.v}}) VerifiedClientDataCap(addr address.Address) (bool, abi.StoragePower, error) {
return getDataCap(s.store, actors.Version{{.v}}, s.verifiedClients, addr)
}

View File

@ -0,0 +1,60 @@
package datacap
import (
"github.com/multiformats/go-varint"
"golang.org/x/xerrors"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
"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"
)
// taking this as a function instead of asking the caller to call it helps reduce some of the error
// checking boilerplate.
//
// "go made me do it"
type rootFunc func() (adt.Map, error)
func getDataCap(store adt.Store, ver actors.Version, root rootFunc, addr address.Address) (bool, abi.StoragePower, error) {
if addr.Protocol() != address.ID {
return false, big.Zero(), xerrors.Errorf("can only look up ID addresses")
}
vh, err := root()
if err != nil {
return false, big.Zero(), xerrors.Errorf("loading datacap actor: %w", err)
}
var dcap abi.StoragePower
if found, err := vh.Get(abi.IdAddrKey(addr), &dcap); err != nil {
return false, big.Zero(), xerrors.Errorf("looking up addr: %w", err)
} else if !found {
return false, big.Zero(), nil
}
return true, big.Div(dcap, verifreg.DataCapGranularity), nil
}
func forEachClient(store adt.Store, ver actors.Version, root rootFunc, cb func(addr address.Address, dcap abi.StoragePower) error) error {
vh, err := root()
if err != nil {
return xerrors.Errorf("loading verified clients: %w", err)
}
var dcap abi.StoragePower
return vh.ForEach(&dcap, func(key string) error {
id, n, err := varint.FromUvarint([]byte(key))
if n != len([]byte(key)) {
return xerrors.Errorf("could not get varint from address string")
}
if err != nil {
return err
}
a, err := address.NewIDAddress(id)
return cb(a, big.Div(dcap, verifreg.DataCapGranularity))
})
}

View File

@ -4,8 +4,11 @@ import (
"github.com/ipfs/go-cid"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
datacap9 "github.com/filecoin-project/go-state-types/builtin/v9/datacap"
adt9 "github.com/filecoin-project/go-state-types/builtin/v9/util/adt"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/adt"
)
@ -44,3 +47,15 @@ func (s *state9) Governor() (address.Address, error) {
func (s *state9) GetState() interface{} {
return &s.State
}
func (s *state9) ForEachClient(cb func(addr address.Address, dcap abi.StoragePower) error) error {
return forEachClient(s.store, actors.Version9, s.verifiedClients, cb)
}
func (s *state9) verifiedClients() (adt.Map, error) {
return adt9.AsMap(s.store, s.Token.Balances, int(s.Token.HamtBitWidth))
}
func (s *state9) VerifiedClientDataCap(addr address.Address) (bool, abi.StoragePower, error) {
return getDataCap(s.store, actors.Version9, s.verifiedClients, addr)
}

View File

@ -13,7 +13,8 @@ import (
"github.com/filecoin-project/go-state-types/cbor"
cbg "github.com/whyrusleeping/cbor-gen"
markettypes "github.com/filecoin-project/go-state-types/builtin/v8/market"
markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
{{range .versions}}
{{if (le . 7)}}
builtin{{.}} "github.com/filecoin-project/specs-actors{{import .}}actors/builtin"
@ -85,6 +86,7 @@ type State interface {
) (weight, verifiedWeight abi.DealWeight, err error)
NextID() (abi.DealID, error)
GetState() interface{}
GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes.AllocationId, error)
}
type BalanceTable interface {

View File

@ -11,7 +11,8 @@ import (
actorstypes "github.com/filecoin-project/go-state-types/actors"
"github.com/filecoin-project/go-state-types/big"
builtintypes "github.com/filecoin-project/go-state-types/builtin"
markettypes "github.com/filecoin-project/go-state-types/builtin/v8/market"
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/go-state-types/cbor"
"github.com/filecoin-project/go-state-types/network"
builtin0 "github.com/filecoin-project/specs-actors/actors/builtin"
@ -126,6 +127,7 @@ type State interface {
) (weight, verifiedWeight abi.DealWeight, err error)
NextID() (abi.DealID, error)
GetState() interface{}
GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes.AllocationId, error)
}
type BalanceTable interface {

View File

@ -16,15 +16,19 @@ import (
"github.com/filecoin-project/lotus/chain/actors/adt"
"github.com/filecoin-project/lotus/chain/types"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
{{if (le .v 7)}}
market{{.v}} "github.com/filecoin-project/specs-actors{{.import}}actors/builtin/market"
adt{{.v}} "github.com/filecoin-project/specs-actors{{.import}}actors/util/adt"
{{else}}
market{{.v}} "github.com/filecoin-project/go-state-types/builtin{{.import}}market"
markettypes "github.com/filecoin-project/go-state-types/builtin/v8/market"
markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market"
adt{{.v}} "github.com/filecoin-project/go-state-types/builtin{{.import}}util/adt"
{{end}}
{{if (ge .v 9)}}
"github.com/filecoin-project/go-state-types/builtin"
{{end}}
)
var _ State = (*state{{.v}})(nil)
@ -201,7 +205,16 @@ func (s *dealStates{{.v}}) array() adt.Array {
}
func fromV{{.v}}DealState(v{{.v}} market{{.v}}.DealState) DealState {
return (DealState)(v{{.v}})
{{if (le .v 8)}}
return DealState{
SectorStartEpoch: v{{.v}}.SectorStartEpoch,
LastUpdatedEpoch: v{{.v}}.LastUpdatedEpoch,
SlashEpoch: v{{.v}}.SlashEpoch,
VerifiedClaim: 0,
}
{{else}}
return (DealState)(v{{.v}})
{{end}}
}
type dealProposals{{.v}} struct {
@ -352,3 +365,24 @@ func (r *publishStorageDealsReturn{{.v}}) IsDealValid(index uint64) (bool, int,
func (r *publishStorageDealsReturn{{.v}}) DealIDs() ([]abi.DealID, error) {
return r.IDs, nil
}
func (s *state{{.v}}) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes.AllocationId, error) {
{{if (le .v 8)}}
return 0, xerrors.Errorf("unsupported before actors v9")
{{else}}
allocations, err := adt9.AsMap(s.store, s.PendingDealAllocationIds, builtin.DefaultHamtBitwidth)
if err != nil {
return 0, 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 0, xerrors.Errorf("failed to load allocation id for %d: %w", dealId, err)
}
if !found {
return 0, xerrors.Errorf("failed to find allocation id for %d", dealId)
}
return verifregtypes.AllocationId(allocationId), nil
{{end}}
}

View File

@ -9,6 +9,7 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
market0 "github.com/filecoin-project/specs-actors/actors/builtin/market"
adt0 "github.com/filecoin-project/specs-actors/actors/util/adt"
@ -183,7 +184,14 @@ func (s *dealStates0) array() adt.Array {
}
func fromV0DealState(v0 market0.DealState) DealState {
return (DealState)(v0)
return DealState{
SectorStartEpoch: v0.SectorStartEpoch,
LastUpdatedEpoch: v0.LastUpdatedEpoch,
SlashEpoch: v0.SlashEpoch,
VerifiedClaim: 0,
}
}
type dealProposals0 struct {
@ -293,3 +301,9 @@ func (r *publishStorageDealsReturn0) IsDealValid(index uint64) (bool, int, error
func (r *publishStorageDealsReturn0) DealIDs() ([]abi.DealID, error) {
return r.IDs, nil
}
func (s *state0) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes.AllocationId, error) {
return 0, xerrors.Errorf("unsupported before actors v9")
}

View File

@ -9,6 +9,7 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
market2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/market"
adt2 "github.com/filecoin-project/specs-actors/v2/actors/util/adt"
@ -183,7 +184,14 @@ func (s *dealStates2) array() adt.Array {
}
func fromV2DealState(v2 market2.DealState) DealState {
return (DealState)(v2)
return DealState{
SectorStartEpoch: v2.SectorStartEpoch,
LastUpdatedEpoch: v2.LastUpdatedEpoch,
SlashEpoch: v2.SlashEpoch,
VerifiedClaim: 0,
}
}
type dealProposals2 struct {
@ -293,3 +301,9 @@ func (r *publishStorageDealsReturn2) IsDealValid(index uint64) (bool, int, error
func (r *publishStorageDealsReturn2) DealIDs() ([]abi.DealID, error) {
return r.IDs, nil
}
func (s *state2) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes.AllocationId, error) {
return 0, xerrors.Errorf("unsupported before actors v9")
}

View File

@ -9,6 +9,7 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
market3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/market"
adt3 "github.com/filecoin-project/specs-actors/v3/actors/util/adt"
@ -178,7 +179,14 @@ func (s *dealStates3) array() adt.Array {
}
func fromV3DealState(v3 market3.DealState) DealState {
return (DealState)(v3)
return DealState{
SectorStartEpoch: v3.SectorStartEpoch,
LastUpdatedEpoch: v3.LastUpdatedEpoch,
SlashEpoch: v3.SlashEpoch,
VerifiedClaim: 0,
}
}
type dealProposals3 struct {
@ -288,3 +296,9 @@ func (r *publishStorageDealsReturn3) IsDealValid(index uint64) (bool, int, error
func (r *publishStorageDealsReturn3) DealIDs() ([]abi.DealID, error) {
return r.IDs, nil
}
func (s *state3) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes.AllocationId, error) {
return 0, xerrors.Errorf("unsupported before actors v9")
}

View File

@ -9,6 +9,7 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
market4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/market"
adt4 "github.com/filecoin-project/specs-actors/v4/actors/util/adt"
@ -178,7 +179,14 @@ func (s *dealStates4) array() adt.Array {
}
func fromV4DealState(v4 market4.DealState) DealState {
return (DealState)(v4)
return DealState{
SectorStartEpoch: v4.SectorStartEpoch,
LastUpdatedEpoch: v4.LastUpdatedEpoch,
SlashEpoch: v4.SlashEpoch,
VerifiedClaim: 0,
}
}
type dealProposals4 struct {
@ -288,3 +296,9 @@ func (r *publishStorageDealsReturn4) IsDealValid(index uint64) (bool, int, error
func (r *publishStorageDealsReturn4) DealIDs() ([]abi.DealID, error) {
return r.IDs, nil
}
func (s *state4) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes.AllocationId, error) {
return 0, xerrors.Errorf("unsupported before actors v9")
}

View File

@ -9,6 +9,7 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
market5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/market"
adt5 "github.com/filecoin-project/specs-actors/v5/actors/util/adt"
@ -178,7 +179,14 @@ func (s *dealStates5) array() adt.Array {
}
func fromV5DealState(v5 market5.DealState) DealState {
return (DealState)(v5)
return DealState{
SectorStartEpoch: v5.SectorStartEpoch,
LastUpdatedEpoch: v5.LastUpdatedEpoch,
SlashEpoch: v5.SlashEpoch,
VerifiedClaim: 0,
}
}
type dealProposals5 struct {
@ -288,3 +296,9 @@ func (r *publishStorageDealsReturn5) IsDealValid(index uint64) (bool, int, error
func (r *publishStorageDealsReturn5) DealIDs() ([]abi.DealID, error) {
return r.IDs, nil
}
func (s *state5) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes.AllocationId, error) {
return 0, xerrors.Errorf("unsupported before actors v9")
}

View File

@ -11,6 +11,7 @@ import (
"github.com/filecoin-project/go-bitfield"
rlepluslazy "github.com/filecoin-project/go-bitfield/rle"
"github.com/filecoin-project/go-state-types/abi"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
market6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/market"
adt6 "github.com/filecoin-project/specs-actors/v6/actors/util/adt"
@ -180,7 +181,14 @@ func (s *dealStates6) array() adt.Array {
}
func fromV6DealState(v6 market6.DealState) DealState {
return (DealState)(v6)
return DealState{
SectorStartEpoch: v6.SectorStartEpoch,
LastUpdatedEpoch: v6.LastUpdatedEpoch,
SlashEpoch: v6.SlashEpoch,
VerifiedClaim: 0,
}
}
type dealProposals6 struct {
@ -306,3 +314,9 @@ func (r *publishStorageDealsReturn6) IsDealValid(index uint64) (bool, int, error
func (r *publishStorageDealsReturn6) DealIDs() ([]abi.DealID, error) {
return r.IDs, nil
}
func (s *state6) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes.AllocationId, error) {
return 0, xerrors.Errorf("unsupported before actors v9")
}

View File

@ -11,6 +11,7 @@ import (
"github.com/filecoin-project/go-bitfield"
rlepluslazy "github.com/filecoin-project/go-bitfield/rle"
"github.com/filecoin-project/go-state-types/abi"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
market7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/market"
adt7 "github.com/filecoin-project/specs-actors/v7/actors/util/adt"
@ -180,7 +181,14 @@ func (s *dealStates7) array() adt.Array {
}
func fromV7DealState(v7 market7.DealState) DealState {
return (DealState)(v7)
return DealState{
SectorStartEpoch: v7.SectorStartEpoch,
LastUpdatedEpoch: v7.LastUpdatedEpoch,
SlashEpoch: v7.SlashEpoch,
VerifiedClaim: 0,
}
}
type dealProposals7 struct {
@ -306,3 +314,9 @@ func (r *publishStorageDealsReturn7) IsDealValid(index uint64) (bool, int, error
func (r *publishStorageDealsReturn7) DealIDs() ([]abi.DealID, error) {
return r.IDs, nil
}
func (s *state7) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes.AllocationId, error) {
return 0, xerrors.Errorf("unsupported before actors v9")
}

View File

@ -12,8 +12,9 @@ import (
rlepluslazy "github.com/filecoin-project/go-bitfield/rle"
"github.com/filecoin-project/go-state-types/abi"
market8 "github.com/filecoin-project/go-state-types/builtin/v8/market"
markettypes "github.com/filecoin-project/go-state-types/builtin/v8/market"
adt8 "github.com/filecoin-project/go-state-types/builtin/v8/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/adt"
"github.com/filecoin-project/lotus/chain/types"
@ -181,7 +182,14 @@ func (s *dealStates8) array() adt.Array {
}
func fromV8DealState(v8 market8.DealState) DealState {
return (DealState)(v8)
return DealState{
SectorStartEpoch: v8.SectorStartEpoch,
LastUpdatedEpoch: v8.LastUpdatedEpoch,
SlashEpoch: v8.SlashEpoch,
VerifiedClaim: 0,
}
}
type dealProposals8 struct {
@ -323,3 +331,9 @@ func (r *publishStorageDealsReturn8) IsDealValid(index uint64) (bool, int, error
func (r *publishStorageDealsReturn8) DealIDs() ([]abi.DealID, error) {
return r.IDs, nil
}
func (s *state8) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes.AllocationId, error) {
return 0, xerrors.Errorf("unsupported before actors v9")
}

View File

@ -11,9 +11,11 @@ import (
"github.com/filecoin-project/go-bitfield"
rlepluslazy "github.com/filecoin-project/go-bitfield/rle"
"github.com/filecoin-project/go-state-types/abi"
markettypes "github.com/filecoin-project/go-state-types/builtin/v8/market"
"github.com/filecoin-project/go-state-types/builtin"
market9 "github.com/filecoin-project/go-state-types/builtin/v9/market"
markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market"
adt9 "github.com/filecoin-project/go-state-types/builtin/v9/util/adt"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/lotus/chain/actors/adt"
"github.com/filecoin-project/lotus/chain/types"
@ -181,7 +183,9 @@ func (s *dealStates9) array() adt.Array {
}
func fromV9DealState(v9 market9.DealState) DealState {
return (DealState)(v9)
}
type dealProposals9 struct {
@ -323,3 +327,22 @@ func (r *publishStorageDealsReturn9) IsDealValid(index uint64) (bool, int, error
func (r *publishStorageDealsReturn9) DealIDs() ([]abi.DealID, error) {
return r.IDs, nil
}
func (s *state9) GetAllocationIdForPendingDeal(dealId abi.DealID) (verifregtypes.AllocationId, error) {
allocations, err := adt9.AsMap(s.store, s.PendingDealAllocationIds, builtin.DefaultHamtBitwidth)
if err != nil {
return 0, 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 0, xerrors.Errorf("failed to load allocation id for %d: %w", dealId, err)
}
if !found {
return 0, xerrors.Errorf("failed to find allocation id for %d", dealId)
}
return verifregtypes.AllocationId(allocationId), nil
}

View File

@ -18,6 +18,7 @@ import (
"github.com/filecoin-project/lotus/chain/actors/adt"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/types"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
)
var (
@ -72,5 +73,6 @@ 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)
GetState() interface{}
}

View File

@ -7,6 +7,7 @@ import (
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/adt"
"golang.org/x/xerrors"
{{if (le .v 7)}}
{{if (ge .v 3)}}
@ -19,6 +20,11 @@ import (
adt{{.v}} "github.com/filecoin-project/go-state-types/builtin{{.import}}util/adt"
builtin{{.v}} "github.com/filecoin-project/go-state-types/builtin"
{{end}}
{{if (ge .v 9)}}
"github.com/filecoin-project/go-state-types/big"
{{else}}
verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
{{end}}
)
var _ State = (*state{{.v}})(nil)
@ -62,7 +68,11 @@ func (s *state{{.v}}) RootKey() (address.Address, error) {
}
func (s *state{{.v}}) VerifiedClientDataCap(addr address.Address) (bool, abi.StoragePower, error) {
{{if (le .v 8)}}
return getDataCap(s.store, actors.Version{{.v}}, s.verifiedClients, addr)
{{else}}
return false, big.Zero(), xerrors.Errorf("unsupported in actors v{{.v}}")
{{end}}
}
func (s *state{{.v}}) VerifierDataCap(addr address.Address) (bool, abi.StoragePower, error) {
@ -78,11 +88,19 @@ func (s *state{{.v}}) ForEachVerifier(cb func(addr address.Address, dcap abi.Sto
}
func (s *state{{.v}}) ForEachClient(cb func(addr address.Address, dcap abi.StoragePower) error) error {
{{if (le .v 8)}}
return forEachCap(s.store, actors.Version{{.v}}, s.verifiedClients, cb)
{{else}}
return xerrors.Errorf("unsupported in actors v{{.v}}")
{{end}}
}
func (s *state{{.v}}) verifiedClients() (adt.Map, error) {
{{if (le .v 8)}}
return adt{{.v}}.AsMap(s.store, s.VerifiedClients{{if (ge .v 3)}}, builtin{{.v}}.DefaultHamtBitwidth{{end}})
{{else}}
return nil, xerrors.Errorf("unsupported in actors v{{.v}}")
{{end}}
}
func (s *state{{.v}}) verifiers() (adt.Map, error) {
@ -96,4 +114,12 @@ func (s *state{{.v}}) removeDataCapProposalIDs() (adt.Map, error) {
func (s *state{{.v}}) GetState() interface{} {
return &s.State
}
func (s *state{{.v}}) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.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}}
}

View File

@ -28,8 +28,15 @@ func getDataCap(store adt.Store, ver actors.Version, root rootFunc, addr address
return false, big.Zero(), xerrors.Errorf("loading verifreg: %w", err)
}
var keyedAddr abi.Keyer
if ver <= 8 {
keyedAddr = abi.AddrKey(addr)
} else {
keyedAddr = abi.IdAddrKey(addr)
}
var dcap abi.StoragePower
if found, err := vh.Get(abi.AddrKey(addr), &dcap); err != nil {
if found, err := vh.Get(keyedAddr, &dcap); err != nil {
return false, big.Zero(), xerrors.Errorf("looking up addr: %w", err)
} else if !found {
return false, big.Zero(), nil

View File

@ -2,9 +2,11 @@ package verifreg
import (
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
verifreg0 "github.com/filecoin-project/specs-actors/actors/builtin/verifreg"
adt0 "github.com/filecoin-project/specs-actors/actors/util/adt"
@ -46,7 +48,9 @@ func (s *state0) RootKey() (address.Address, error) {
}
func (s *state0) VerifiedClientDataCap(addr address.Address) (bool, abi.StoragePower, error) {
return getDataCap(s.store, actors.Version0, s.verifiedClients, addr)
}
func (s *state0) VerifierDataCap(addr address.Address) (bool, abi.StoragePower, error) {
@ -62,11 +66,15 @@ func (s *state0) ForEachVerifier(cb func(addr address.Address, dcap abi.StorageP
}
func (s *state0) ForEachClient(cb func(addr address.Address, dcap abi.StoragePower) error) error {
return forEachCap(s.store, actors.Version0, s.verifiedClients, cb)
}
func (s *state0) verifiedClients() (adt.Map, error) {
return adt0.AsMap(s.store, s.VerifiedClients)
}
func (s *state0) verifiers() (adt.Map, error) {
@ -81,3 +89,9 @@ func (s *state0) removeDataCapProposalIDs() (adt.Map, error) {
func (s *state0) GetState() interface{} {
return &s.State
}
func (s *state0) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) {
return nil, false, xerrors.Errorf("unsupported in actors v0")
}

View File

@ -2,9 +2,11 @@ package verifreg
import (
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
verifreg2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/verifreg"
adt2 "github.com/filecoin-project/specs-actors/v2/actors/util/adt"
@ -46,7 +48,9 @@ func (s *state2) RootKey() (address.Address, error) {
}
func (s *state2) VerifiedClientDataCap(addr address.Address) (bool, abi.StoragePower, error) {
return getDataCap(s.store, actors.Version2, s.verifiedClients, addr)
}
func (s *state2) VerifierDataCap(addr address.Address) (bool, abi.StoragePower, error) {
@ -62,11 +66,15 @@ func (s *state2) ForEachVerifier(cb func(addr address.Address, dcap abi.StorageP
}
func (s *state2) ForEachClient(cb func(addr address.Address, dcap abi.StoragePower) error) error {
return forEachCap(s.store, actors.Version2, s.verifiedClients, cb)
}
func (s *state2) verifiedClients() (adt.Map, error) {
return adt2.AsMap(s.store, s.VerifiedClients)
}
func (s *state2) verifiers() (adt.Map, error) {
@ -81,3 +89,9 @@ func (s *state2) removeDataCapProposalIDs() (adt.Map, error) {
func (s *state2) GetState() interface{} {
return &s.State
}
func (s *state2) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) {
return nil, false, xerrors.Errorf("unsupported in actors v2")
}

View File

@ -2,9 +2,11 @@ package verifreg
import (
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
builtin3 "github.com/filecoin-project/specs-actors/v3/actors/builtin"
verifreg3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/verifreg"
adt3 "github.com/filecoin-project/specs-actors/v3/actors/util/adt"
@ -47,7 +49,9 @@ func (s *state3) RootKey() (address.Address, error) {
}
func (s *state3) VerifiedClientDataCap(addr address.Address) (bool, abi.StoragePower, error) {
return getDataCap(s.store, actors.Version3, s.verifiedClients, addr)
}
func (s *state3) VerifierDataCap(addr address.Address) (bool, abi.StoragePower, error) {
@ -63,11 +67,15 @@ func (s *state3) ForEachVerifier(cb func(addr address.Address, dcap abi.StorageP
}
func (s *state3) ForEachClient(cb func(addr address.Address, dcap abi.StoragePower) error) error {
return forEachCap(s.store, actors.Version3, s.verifiedClients, cb)
}
func (s *state3) verifiedClients() (adt.Map, error) {
return adt3.AsMap(s.store, s.VerifiedClients, builtin3.DefaultHamtBitwidth)
}
func (s *state3) verifiers() (adt.Map, error) {
@ -82,3 +90,9 @@ func (s *state3) removeDataCapProposalIDs() (adt.Map, error) {
func (s *state3) GetState() interface{} {
return &s.State
}
func (s *state3) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) {
return nil, false, xerrors.Errorf("unsupported in actors v3")
}

View File

@ -2,9 +2,11 @@ package verifreg
import (
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
builtin4 "github.com/filecoin-project/specs-actors/v4/actors/builtin"
verifreg4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/verifreg"
adt4 "github.com/filecoin-project/specs-actors/v4/actors/util/adt"
@ -47,7 +49,9 @@ func (s *state4) RootKey() (address.Address, error) {
}
func (s *state4) VerifiedClientDataCap(addr address.Address) (bool, abi.StoragePower, error) {
return getDataCap(s.store, actors.Version4, s.verifiedClients, addr)
}
func (s *state4) VerifierDataCap(addr address.Address) (bool, abi.StoragePower, error) {
@ -63,11 +67,15 @@ func (s *state4) ForEachVerifier(cb func(addr address.Address, dcap abi.StorageP
}
func (s *state4) ForEachClient(cb func(addr address.Address, dcap abi.StoragePower) error) error {
return forEachCap(s.store, actors.Version4, s.verifiedClients, cb)
}
func (s *state4) verifiedClients() (adt.Map, error) {
return adt4.AsMap(s.store, s.VerifiedClients, builtin4.DefaultHamtBitwidth)
}
func (s *state4) verifiers() (adt.Map, error) {
@ -82,3 +90,9 @@ func (s *state4) removeDataCapProposalIDs() (adt.Map, error) {
func (s *state4) GetState() interface{} {
return &s.State
}
func (s *state4) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) {
return nil, false, xerrors.Errorf("unsupported in actors v4")
}

View File

@ -2,9 +2,11 @@ package verifreg
import (
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin"
verifreg5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/verifreg"
adt5 "github.com/filecoin-project/specs-actors/v5/actors/util/adt"
@ -47,7 +49,9 @@ func (s *state5) RootKey() (address.Address, error) {
}
func (s *state5) VerifiedClientDataCap(addr address.Address) (bool, abi.StoragePower, error) {
return getDataCap(s.store, actors.Version5, s.verifiedClients, addr)
}
func (s *state5) VerifierDataCap(addr address.Address) (bool, abi.StoragePower, error) {
@ -63,11 +67,15 @@ func (s *state5) ForEachVerifier(cb func(addr address.Address, dcap abi.StorageP
}
func (s *state5) ForEachClient(cb func(addr address.Address, dcap abi.StoragePower) error) error {
return forEachCap(s.store, actors.Version5, s.verifiedClients, cb)
}
func (s *state5) verifiedClients() (adt.Map, error) {
return adt5.AsMap(s.store, s.VerifiedClients, builtin5.DefaultHamtBitwidth)
}
func (s *state5) verifiers() (adt.Map, error) {
@ -82,3 +90,9 @@ func (s *state5) removeDataCapProposalIDs() (adt.Map, error) {
func (s *state5) GetState() interface{} {
return &s.State
}
func (s *state5) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) {
return nil, false, xerrors.Errorf("unsupported in actors v5")
}

View File

@ -2,9 +2,11 @@ package verifreg
import (
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
builtin6 "github.com/filecoin-project/specs-actors/v6/actors/builtin"
verifreg6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/verifreg"
adt6 "github.com/filecoin-project/specs-actors/v6/actors/util/adt"
@ -47,7 +49,9 @@ func (s *state6) RootKey() (address.Address, error) {
}
func (s *state6) VerifiedClientDataCap(addr address.Address) (bool, abi.StoragePower, error) {
return getDataCap(s.store, actors.Version6, s.verifiedClients, addr)
}
func (s *state6) VerifierDataCap(addr address.Address) (bool, abi.StoragePower, error) {
@ -63,11 +67,15 @@ func (s *state6) ForEachVerifier(cb func(addr address.Address, dcap abi.StorageP
}
func (s *state6) ForEachClient(cb func(addr address.Address, dcap abi.StoragePower) error) error {
return forEachCap(s.store, actors.Version6, s.verifiedClients, cb)
}
func (s *state6) verifiedClients() (adt.Map, error) {
return adt6.AsMap(s.store, s.VerifiedClients, builtin6.DefaultHamtBitwidth)
}
func (s *state6) verifiers() (adt.Map, error) {
@ -82,3 +90,9 @@ func (s *state6) removeDataCapProposalIDs() (adt.Map, error) {
func (s *state6) GetState() interface{} {
return &s.State
}
func (s *state6) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) {
return nil, false, xerrors.Errorf("unsupported in actors v6")
}

View File

@ -2,9 +2,11 @@ package verifreg
import (
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin"
verifreg7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/verifreg"
adt7 "github.com/filecoin-project/specs-actors/v7/actors/util/adt"
@ -47,7 +49,9 @@ func (s *state7) RootKey() (address.Address, error) {
}
func (s *state7) VerifiedClientDataCap(addr address.Address) (bool, abi.StoragePower, error) {
return getDataCap(s.store, actors.Version7, s.verifiedClients, addr)
}
func (s *state7) VerifierDataCap(addr address.Address) (bool, abi.StoragePower, error) {
@ -63,11 +67,15 @@ func (s *state7) ForEachVerifier(cb func(addr address.Address, dcap abi.StorageP
}
func (s *state7) ForEachClient(cb func(addr address.Address, dcap abi.StoragePower) error) error {
return forEachCap(s.store, actors.Version7, s.verifiedClients, cb)
}
func (s *state7) verifiedClients() (adt.Map, error) {
return adt7.AsMap(s.store, s.VerifiedClients, builtin7.DefaultHamtBitwidth)
}
func (s *state7) verifiers() (adt.Map, error) {
@ -81,3 +89,9 @@ func (s *state7) removeDataCapProposalIDs() (adt.Map, error) {
func (s *state7) GetState() interface{} {
return &s.State
}
func (s *state7) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) {
return nil, false, xerrors.Errorf("unsupported in actors v7")
}

View File

@ -2,12 +2,14 @@ package verifreg
import (
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
builtin8 "github.com/filecoin-project/go-state-types/builtin"
adt8 "github.com/filecoin-project/go-state-types/builtin/v8/util/adt"
verifreg8 "github.com/filecoin-project/go-state-types/builtin/v8/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"
@ -47,7 +49,9 @@ func (s *state8) RootKey() (address.Address, error) {
}
func (s *state8) VerifiedClientDataCap(addr address.Address) (bool, abi.StoragePower, error) {
return getDataCap(s.store, actors.Version8, s.verifiedClients, addr)
}
func (s *state8) VerifierDataCap(addr address.Address) (bool, abi.StoragePower, error) {
@ -63,11 +67,15 @@ func (s *state8) ForEachVerifier(cb func(addr address.Address, dcap abi.StorageP
}
func (s *state8) ForEachClient(cb func(addr address.Address, dcap abi.StoragePower) error) error {
return forEachCap(s.store, actors.Version8, s.verifiedClients, cb)
}
func (s *state8) verifiedClients() (adt.Map, error) {
return adt8.AsMap(s.store, s.VerifiedClients, builtin8.DefaultHamtBitwidth)
}
func (s *state8) verifiers() (adt.Map, error) {
@ -81,3 +89,9 @@ func (s *state8) removeDataCapProposalIDs() (adt.Map, error) {
func (s *state8) GetState() interface{} {
return &s.State
}
func (s *state8) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) {
return nil, false, xerrors.Errorf("unsupported in actors v8")
}

View File

@ -2,9 +2,11 @@ package verifreg
import (
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
builtin9 "github.com/filecoin-project/go-state-types/builtin"
adt9 "github.com/filecoin-project/go-state-types/builtin/v9/util/adt"
verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
@ -47,7 +49,9 @@ func (s *state9) RootKey() (address.Address, error) {
}
func (s *state9) VerifiedClientDataCap(addr address.Address) (bool, abi.StoragePower, error) {
return getDataCap(s.store, actors.Version9, s.verifiedClients, addr)
return false, big.Zero(), xerrors.Errorf("unsupported in actors v9")
}
func (s *state9) VerifierDataCap(addr address.Address) (bool, abi.StoragePower, error) {
@ -63,11 +67,15 @@ func (s *state9) ForEachVerifier(cb func(addr address.Address, dcap abi.StorageP
}
func (s *state9) ForEachClient(cb func(addr address.Address, dcap abi.StoragePower) error) error {
return forEachCap(s.store, actors.Version9, s.verifiedClients, cb)
return xerrors.Errorf("unsupported in actors v9")
}
func (s *state9) verifiedClients() (adt.Map, error) {
return adt9.AsMap(s.store, s.VerifiedClients, builtin9.DefaultHamtBitwidth)
return nil, xerrors.Errorf("unsupported in actors v9")
}
func (s *state9) verifiers() (adt.Map, error) {
@ -81,3 +89,9 @@ func (s *state9) removeDataCapProposalIDs() (adt.Map, error) {
func (s *state9) GetState() interface{} {
return &s.State
}
func (s *state9) GetAllocation(clientIdAddr address.Address, allocationId verifreg9.AllocationId) (*verifreg9.Allocation, bool, error) {
return s.FindAllocation(s.store, clientIdAddr, allocationId)
}

View File

@ -7,6 +7,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"
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"
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
@ -114,5 +115,6 @@ 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)
GetState() interface{}
}

View File

@ -0,0 +1,56 @@
package genesis
import (
"context"
cbor "github.com/ipfs/go-ipld-cbor"
"golang.org/x/xerrors"
"github.com/filecoin-project/go-address"
actorstypes "github.com/filecoin-project/go-state-types/actors"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/builtin"
"github.com/filecoin-project/specs-actors/actors/util/adt"
bstore "github.com/filecoin-project/lotus/blockstore"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/builtin/datacap"
"github.com/filecoin-project/lotus/chain/types"
)
var GovernorId address.Address
func init() {
idk, err := address.NewFromString("t06")
if err != nil {
panic(err)
}
GovernorId = idk
}
func SetupDatacapActor(ctx context.Context, bs bstore.Blockstore, av actorstypes.Version) (*types.Actor, error) {
cst := cbor.NewCborStore(bs)
dst, err := datacap.MakeState(adt.WrapStore(ctx, cbor.NewCborStore(bs)), av, GovernorId, builtin.DefaultTokenActorBitwidth)
if err != nil {
return nil, err
}
statecid, err := cst.Put(ctx, dst.GetState())
if err != nil {
return nil, err
}
actcid, ok := actors.GetActorCodeID(av, actors.DatacapKey)
if !ok {
return nil, xerrors.Errorf("failed to get datacap actor code ID for actors version %d", av)
}
act := &types.Actor{
Code: actcid,
Head: statecid,
Balance: big.Zero(),
}
return act, nil
}

View File

@ -29,6 +29,7 @@ import (
"github.com/filecoin-project/lotus/chain/actors/builtin"
"github.com/filecoin-project/lotus/chain/actors/builtin/account"
"github.com/filecoin-project/lotus/chain/actors/builtin/cron"
"github.com/filecoin-project/lotus/chain/actors/builtin/datacap"
init_ "github.com/filecoin-project/lotus/chain/actors/builtin/init"
"github.com/filecoin-project/lotus/chain/actors/builtin/market"
"github.com/filecoin-project/lotus/chain/actors/builtin/multisig"
@ -215,6 +216,17 @@ func MakeInitialStateTree(ctx context.Context, bs bstore.Blockstore, template ge
return nil, nil, xerrors.Errorf("set verified registry actor: %w", err)
}
// Create datacap actor
if av >= 9 {
dcapact, err := SetupDatacapActor(ctx, bs, av)
if err != nil {
return nil, nil, xerrors.Errorf("setup datacap actor: %w", err)
}
if err := state.SetActor(datacap.Address, dcapact); err != nil {
return nil, nil, xerrors.Errorf("set datacap actor: %w", err)
}
}
bact, err := MakeAccountActor(ctx, cst, av, builtin.BurntFundsActorAddr, big.Zero())
if err != nil {
return nil, nil, xerrors.Errorf("setup burnt funds actor state: %w", err)

View File

@ -17,8 +17,8 @@ import (
actorstypes "github.com/filecoin-project/go-state-types/actors"
"github.com/filecoin-project/go-state-types/big"
builtintypes "github.com/filecoin-project/go-state-types/builtin"
markettypes "github.com/filecoin-project/go-state-types/builtin/v8/market"
minertypes "github.com/filecoin-project/go-state-types/builtin/v8/miner"
markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market"
miner9 "github.com/filecoin-project/go-state-types/builtin/v9/miner"
smoothing9 "github.com/filecoin-project/go-state-types/builtin/v9/util/smoothing"
"github.com/filecoin-project/go-state-types/crypto"
@ -227,7 +227,6 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal
params := &markettypes.PublishStorageDealsParams{}
for _, preseal := range m.Sectors {
fmt.Println("presealing ", preseal.SectorID)
preseal.Deal.VerifiedDeal = true
preseal.Deal.EndEpoch = minerInfos[i].presealExp
p := markettypes.ClientDealProposal{
@ -438,7 +437,6 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal
pledge = big.Add(pcd, pledge)
fmt.Println(types.FIL(pledge))
_, err = doExecValue(ctx, genesisVm, minerInfos[i].maddr, m.Worker, pledge, builtintypes.MethodsMiner.PreCommitSector, mustEnc(params))
if err != nil {
return cid.Undef, xerrors.Errorf("failed to confirm presealed sectors: %w", err)

View File

@ -14,7 +14,7 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin"
"github.com/filecoin-project/go-state-types/builtin/v8/market"
"github.com/filecoin-project/go-state-types/builtin/v9/market"
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/build"

View File

@ -15,7 +15,7 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
markettypes "github.com/filecoin-project/go-state-types/builtin/v8/market"
markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market"
tutils "github.com/filecoin-project/specs-actors/v2/support/testing"
"github.com/filecoin-project/lotus/api"

View File

@ -21,6 +21,7 @@ import (
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/actors/builtin/paych"
"github.com/filecoin-project/lotus/chain/actors/builtin/power"
"github.com/filecoin-project/lotus/chain/actors/builtin/verifreg"
"github.com/filecoin-project/lotus/chain/beacon"
"github.com/filecoin-project/lotus/chain/rand"
"github.com/filecoin-project/lotus/chain/types"
@ -251,13 +252,13 @@ func GetStorageDeal(ctx context.Context, sm *StateManager, dealID abi.DealID, ts
proposals, err := state.Proposals()
if err != nil {
return nil, err
return nil, xerrors.Errorf("failed to get proposals from state : %w", err)
}
proposal, found, err := proposals.Get(dealID)
if err != nil {
return nil, err
return nil, xerrors.Errorf("failed to get proposal : %w", err)
} else if !found {
return nil, xerrors.Errorf(
"deal %d not found "+
@ -268,12 +269,12 @@ func GetStorageDeal(ctx context.Context, sm *StateManager, dealID abi.DealID, ts
states, err := state.States()
if err != nil {
return nil, err
return nil, xerrors.Errorf("failed to get states : %w", err)
}
st, found, err := states.Get(dealID)
if err != nil {
return nil, err
return nil, xerrors.Errorf("failed to get state : %w", err)
}
if !found {
@ -516,6 +517,24 @@ func (sm *StateManager) GetMarketState(ctx context.Context, ts *types.TipSet) (m
return actState, nil
}
func (sm *StateManager) GetVerifregState(ctx context.Context, ts *types.TipSet) (verifreg.State, error) {
st, err := sm.ParentState(ts)
if err != nil {
return nil, err
}
act, err := st.GetActor(verifreg.Address)
if err != nil {
return nil, err
}
actState, err := verifreg.Load(sm.cs.ActorStore(ctx), act)
if err != nil {
return nil, err
}
return actState, nil
}
func (sm *StateManager) MarketBalance(ctx context.Context, addr address.Address, ts *types.TipSet) (api.MarketBalance, error) {
mstate, err := sm.GetMarketState(ctx, ts)
if err != nil {

View File

@ -12,6 +12,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"
"github.com/filecoin-project/go-state-types/big"
verifregtypes8 "github.com/filecoin-project/go-state-types/builtin/v8/verifreg"
verifregtypes9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
@ -22,6 +23,7 @@ import (
"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/adt"
"github.com/filecoin-project/lotus/chain/actors/builtin/datacap"
"github.com/filecoin-project/lotus/chain/actors/builtin/verifreg"
"github.com/filecoin-project/lotus/chain/types"
)
@ -41,8 +43,9 @@ var filplusCmd = &cli.Command{
}
var filplusVerifyClientCmd = &cli.Command{
Name: "grant-datacap",
Usage: "give allowance to the specified verified client address",
Name: "grant-datacap",
Usage: "give allowance to the specified verified client address",
ArgsUsage: "[clientAddress datacap]",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "from",
@ -132,6 +135,10 @@ var filplusListNotariesCmd = &cli.Command{
Name: "list-notaries",
Usage: "list all notaries",
Action: func(cctx *cli.Context) error {
if cctx.NArg() != 0 {
return IncorrectNumArgs(cctx)
}
api, closer, err := GetFullNodeAPI(cctx)
if err != nil {
return err
@ -162,6 +169,10 @@ var filplusListClientsCmd = &cli.Command{
Name: "list-clients",
Usage: "list all verified clients",
Action: func(cctx *cli.Context) error {
if cctx.NArg() != 0 {
return IncorrectNumArgs(cctx)
}
api, closer, err := GetFullNodeAPI(cctx)
if err != nil {
return err
@ -169,15 +180,40 @@ var filplusListClientsCmd = &cli.Command{
defer closer()
ctx := ReqContext(cctx)
act, err := api.StateGetActor(ctx, verifreg.Address, types.EmptyTSK)
apibs := blockstore.NewAPIBlockstore(api)
store := adt.WrapStore(ctx, cbor.NewCborStore(apibs))
nv, err := api.StateNetworkVersion(ctx, types.EmptyTSK)
if err != nil {
return err
}
apibs := blockstore.NewAPIBlockstore(api)
store := adt.WrapStore(ctx, cbor.NewCborStore(apibs))
av, err := actorstypes.VersionForNetwork(nv)
if err != nil {
return err
}
st, err := verifreg.Load(store, act)
if av <= 8 {
act, err := api.StateGetActor(ctx, verifreg.Address, types.EmptyTSK)
if err != nil {
return err
}
st, err := verifreg.Load(store, act)
if err != nil {
return err
}
return st.ForEachClient(func(addr address.Address, dcap abi.StoragePower) error {
_, err := fmt.Printf("%s: %s\n", addr, dcap)
return err
})
}
act, err := api.StateGetActor(ctx, datacap.Address, types.EmptyTSK)
if err != nil {
return err
}
st, err := datacap.Load(store, act)
if err != nil {
return err
}
@ -189,10 +225,11 @@ var filplusListClientsCmd = &cli.Command{
}
var filplusCheckClientCmd = &cli.Command{
Name: "check-client-datacap",
Usage: "check verified client remaining bytes",
Name: "check-client-datacap",
Usage: "check verified client remaining bytes",
ArgsUsage: "clientAddress",
Action: func(cctx *cli.Context) error {
if !cctx.Args().Present() {
if cctx.NArg() != 1 {
return fmt.Errorf("must specify client address to check")
}
@ -223,10 +260,11 @@ var filplusCheckClientCmd = &cli.Command{
}
var filplusCheckNotaryCmd = &cli.Command{
Name: "check-notary-datacap",
Usage: "check a notary's remaining bytes",
Name: "check-notary-datacap",
Usage: "check a notary's remaining bytes",
ArgsUsage: "notaryAddress",
Action: func(cctx *cli.Context) error {
if !cctx.Args().Present() {
if cctx.NArg() != 1 {
return fmt.Errorf("must specify notary address to check")
}
@ -279,8 +317,9 @@ func checkNotary(ctx context.Context, api v0api.FullNode, vaddr address.Address)
}
var filplusSignRemoveDataCapProposal = &cli.Command{
Name: "sign-remove-data-cap-proposal",
Usage: "allows a notary to sign a Remove Data Cap Proposal",
Name: "sign-remove-data-cap-proposal",
Usage: "allows a notary to sign a Remove Data Cap Proposal",
ArgsUsage: "[verifierAddress clientAddress allowanceToRemove]",
Flags: []cli.Flag{
&cli.Int64Flag{
Name: "id",
@ -336,7 +375,7 @@ var filplusSignRemoveDataCapProposal = &cli.Command{
return err
}
_, dataCap, err := st.VerifiedClientDataCap(clientIdAddr)
dataCap, err := api.StateVerifiedClientStatus(ctx, clientIdAddr, types.EmptyTSK)
if err != nil {
return xerrors.Errorf("failed to find verified client data cap: %w", err)
}

View File

@ -29,7 +29,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/builtin"
market8 "github.com/filecoin-project/go-state-types/builtin/v8/market"
markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market"
"github.com/filecoin-project/go-statestore"
miner2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/miner"
power2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/power"
@ -389,7 +389,7 @@ func migratePreSealMeta(ctx context.Context, api v1api.FullNode, metadata string
return mds.Put(ctx, datastore.NewKey(pipeline.StorageCounterDSPrefix), buf[:size])
}
func findMarketDealID(ctx context.Context, api v1api.FullNode, deal market8.DealProposal) (abi.DealID, error) {
func findMarketDealID(ctx context.Context, api v1api.FullNode, deal markettypes.DealProposal) (abi.DealID, error) {
// TODO: find a better way
// (this is only used by genesis miners)

View File

@ -22,7 +22,7 @@ import (
"github.com/filecoin-project/go-commp-utils/zerocomm"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
market8 "github.com/filecoin-project/go-state-types/builtin/v8/market"
markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/wallet/key"
@ -250,12 +250,12 @@ func WriteGenesisMiner(maddr address.Address, sbroot string, gm *genesis.Miner,
func createDeals(m *genesis.Miner, k *key.Key, maddr address.Address, ssize abi.SectorSize) error {
for i, sector := range m.Sectors {
label, err := market8.NewLabelFromString(fmt.Sprintf("%d", i))
label, err := markettypes.NewLabelFromString(fmt.Sprintf("%d", i))
if err != nil {
return xerrors.Errorf("error creating deal label: %w", err)
}
proposal := &market8.DealProposal{
proposal := &markettypes.DealProposal{
PieceCID: sector.CommD,
PieceSize: abi.PaddedPieceSize(ssize),
Client: k.Address,
@ -268,7 +268,7 @@ func createDeals(m *genesis.Miner, k *key.Key, maddr address.Address, ssize abi.
ClientCollateral: big.Zero(),
}
sector.DealClientKey = k
sector.DealClientKey = k.KeyInfo
sector.Deal = *proposal
}

View File

@ -8,10 +8,18 @@ import (
"github.com/ipfs/go-cid"
"github.com/urfave/cli/v2"
"golang.org/x/xerrors"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/specs-actors/v7/actors/migration/nv15"
"github.com/filecoin-project/lotus/blockstore"
"github.com/filecoin-project/lotus/chain/actors/adt"
"github.com/filecoin-project/lotus/chain/actors/builtin/datacap"
"github.com/filecoin-project/lotus/chain/actors/builtin/verifreg"
"github.com/filecoin-project/lotus/chain/consensus/filcns"
"github.com/filecoin-project/lotus/chain/state"
"github.com/filecoin-project/lotus/chain/stmgr"
"github.com/filecoin-project/lotus/chain/store"
"github.com/filecoin-project/lotus/chain/types"
@ -22,8 +30,8 @@ import (
)
var migrationsCmd = &cli.Command{
Name: "migrate-nv16",
Description: "Run the nv16 migration",
Name: "migrate-nv17",
Description: "Run the nv17 migration",
ArgsUsage: "[block to look back from]",
Flags: []cli.Flag{
&cli.StringFlag{
@ -100,7 +108,7 @@ var migrationsCmd = &cli.Command{
startTime := time.Now()
err = filcns.PreUpgradeActorsV8(ctx, sm, cache, ts1.ParentState(), ts1.Height()-1, ts1)
err = filcns.PreUpgradeActorsV9(ctx, sm, cache, ts1.ParentState(), ts1.Height()-1, ts1)
if err != nil {
return err
}
@ -108,7 +116,7 @@ var migrationsCmd = &cli.Command{
fmt.Println("completed round 1, took ", time.Since(startTime))
startTime = time.Now()
newCid1, err := filcns.UpgradeActorsV8(ctx, sm, cache, nil, blk.ParentStateRoot, blk.Height-1, migrationTs)
newCid1, err := filcns.UpgradeActorsV9(ctx, sm, cache, nil, blk.ParentStateRoot, blk.Height-1, migrationTs)
if err != nil {
return err
}
@ -116,13 +124,105 @@ var migrationsCmd = &cli.Command{
fmt.Println("new cid", newCid1)
newCid2, err := filcns.UpgradeActorsV8(ctx, sm, nv15.NewMemMigrationCache(), nil, blk.ParentStateRoot, blk.Height-1, migrationTs)
newCid2, err := filcns.UpgradeActorsV9(ctx, sm, nv15.NewMemMigrationCache(), nil, blk.ParentStateRoot, blk.Height-1, migrationTs)
if err != nil {
return err
}
fmt.Println("completed round actual (without cache), took ", time.Since(startTime))
fmt.Println("new cid", newCid2)
err = checkStateInvariants(ctx, blk.ParentStateRoot, newCid2, bs)
if err != nil {
return err
}
return nil
},
}
func checkStateInvariants(ctx context.Context, oldStateRoot cid.Cid, newStateRoot cid.Cid, bs blockstore.Blockstore) error {
actorStore := store.ActorStore(ctx, blockstore.NewTieredBstore(bs, blockstore.NewMemorySync()))
verifregDatacaps, err := getVerifreg8Datacaps(ctx, oldStateRoot, actorStore)
if err != nil {
return err
}
newDatacaps, err := getDatacap9Datacaps(ctx, newStateRoot, actorStore)
if err != nil {
return err
}
if len(verifregDatacaps) != len(newDatacaps) {
return xerrors.Errorf("size of datacap maps do not match. verifreg: %d, datacap: %d", len(verifregDatacaps), len(newDatacaps))
}
for addr, oldDcap := range verifregDatacaps {
dcap, ok := newDatacaps[addr]
if !ok {
return xerrors.Errorf("datacap for address: %s not found in datacap state", addr)
}
if !dcap.Equals(oldDcap) {
return xerrors.Errorf("datacap for address: %s do not match. verifreg: %d, datacap: %d", addr, oldDcap, dcap)
}
}
return nil
}
func getVerifreg8Datacaps(ctx context.Context, v8StateRoot cid.Cid, actorStore adt.Store) (map[address.Address]abi.StoragePower, error) {
stateTreeV8, err := state.LoadStateTree(actorStore, v8StateRoot)
if err != nil {
return nil, err
}
verifregV8, err := stateTreeV8.GetActor(verifreg.Address)
if err != nil {
return nil, err
}
verifregV8State, err := verifreg.Load(actorStore, verifregV8)
if err = actorStore.Get(ctx, verifregV8.Head, &verifregV8State); err != nil {
return nil, xerrors.Errorf("failed to get verifreg actor state: %w", err)
}
var verifregDatacaps = make(map[address.Address]abi.StoragePower)
err = verifregV8State.ForEachClient(func(addr address.Address, dcap abi.StoragePower) error {
verifregDatacaps[addr] = dcap
return nil
})
if err != nil {
return nil, err
}
return verifregDatacaps, nil
}
func getDatacap9Datacaps(ctx context.Context, v9StateRoot cid.Cid, actorStore adt.Store) (map[address.Address]abi.StoragePower, error) {
stateTreeV9, err := state.LoadStateTree(actorStore, v9StateRoot)
if err != nil {
return nil, err
}
datacapV9, err := stateTreeV9.GetActor(datacap.Address)
if err != nil {
return nil, err
}
datacapV9State, err := datacap.Load(actorStore, datacapV9)
if err = actorStore.Get(ctx, datacapV9.Head, &datacapV9State); err != nil {
return nil, xerrors.Errorf("failed to get verifreg actor state: %w", err)
}
var datacaps = make(map[address.Address]abi.StoragePower)
err = datacapV9State.ForEachClient(func(addr address.Address, dcap abi.StoragePower) error {
datacaps[addr] = dcap
return nil
})
if err != nil {
return nil, err
}
return datacaps, nil
}

View File

@ -34,7 +34,6 @@ var verifRegCmd = &cli.Command{
verifRegAddVerifierFromAccountCmd,
verifRegVerifyClientCmd,
verifRegListVerifiersCmd,
verifRegListClientsCmd,
verifRegCheckClientCmd,
verifRegCheckVerifierCmd,
verifRegRemoveVerifiedClientDataCapCmd,
@ -286,38 +285,6 @@ var verifRegListVerifiersCmd = &cli.Command{
},
}
var verifRegListClientsCmd = &cli.Command{
Name: "list-clients",
Usage: "list all verified clients",
Hidden: true,
Action: func(cctx *cli.Context) error {
fmt.Println("DEPRECATED: This behavior is being moved to `lotus filplus`")
api, closer, err := lcli.GetFullNodeAPI(cctx)
if err != nil {
return err
}
defer closer()
ctx := lcli.ReqContext(cctx)
act, err := api.StateGetActor(ctx, verifreg.Address, types.EmptyTSK)
if err != nil {
return err
}
apibs := blockstore.NewAPIBlockstore(api)
store := adt.WrapStore(ctx, cbor.NewCborStore(apibs))
st, err := verifreg.Load(store, act)
if err != nil {
return err
}
return st.ForEachClient(func(addr address.Address, dcap abi.StoragePower) error {
_, err := fmt.Printf("%s: %s\n", addr, dcap)
return err
})
},
}
var verifRegCheckClientCmd = &cli.Command{
Name: "check-client",
Usage: "check verified client remaining bytes",

View File

@ -822,7 +822,8 @@ Response:
"State": {
"SectorStartEpoch": 10101,
"LastUpdatedEpoch": 10101,
"SlashEpoch": 10101
"SlashEpoch": 10101,
"VerifiedClaim": 0
}
}
]
@ -1415,7 +1416,8 @@ Response:
"State": {
"SectorStartEpoch": 10101,
"LastUpdatedEpoch": 10101,
"SlashEpoch": 10101
"SlashEpoch": 10101,
"VerifiedClaim": 0
}
}
]

View File

@ -168,6 +168,8 @@
* [StateDealProviderCollateralBounds](#StateDealProviderCollateralBounds)
* [StateDecodeParams](#StateDecodeParams)
* [StateGetActor](#StateGetActor)
* [StateGetAllocation](#StateGetAllocation)
* [StateGetAllocationForPendingDeal](#StateGetAllocationForPendingDeal)
* [StateGetNetworkParams](#StateGetNetworkParams)
* [StateGetRandomnessFromBeacon](#StateGetRandomnessFromBeacon)
* [StateGetRandomnessFromTickets](#StateGetRandomnessFromTickets)
@ -5242,6 +5244,79 @@ Response:
}
```
### StateGetAllocation
StateGetAllocation returns the allocation for a given address and allocation ID.
Perms: read
Inputs:
```json
[
"f01234",
0,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"Client": 1000,
"Provider": 1000,
"Data": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Size": 1032,
"TermMin": 10101,
"TermMax": 10101,
"Expiration": 10101
}
```
### StateGetAllocationForPendingDeal
StateGetAllocationForPendingDeal returns the allocation for a given deal ID of a pending deal.
Perms:
Inputs:
```json
[
5432,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"Client": 1000,
"Provider": 1000,
"Data": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Size": 1032,
"TermMin": 10101,
"TermMax": 10101,
"Expiration": 10101
}
```
### StateGetNetworkParams
StateGetNetworkParams return current network params
@ -5557,7 +5632,8 @@ Response:
"State": {
"SectorStartEpoch": 10101,
"LastUpdatedEpoch": 10101,
"SlashEpoch": 10101
"SlashEpoch": 10101,
"VerifiedClaim": 0
}
}
}
@ -5635,7 +5711,8 @@ Response:
"State": {
"SectorStartEpoch": 10101,
"LastUpdatedEpoch": 10101,
"SlashEpoch": 10101
"SlashEpoch": 10101,
"VerifiedClaim": 0
}
}
```
@ -5682,7 +5759,8 @@ Response:
"ExpectedStoragePledge": "0",
"ReplacedSectorAge": 10101,
"ReplacedDayReward": "0",
"SectorKeyCID": null
"SectorKeyCID": null,
"SimpleQAPower": true
}
]
```
@ -6154,7 +6232,8 @@ Response:
"ExpectedStoragePledge": "0",
"ReplacedSectorAge": 10101,
"ReplacedDayReward": "0",
"SectorKeyCID": null
"SectorKeyCID": null,
"SimpleQAPower": true
}
]
```
@ -6577,7 +6656,8 @@ Response:
"ExpectedStoragePledge": "0",
"ReplacedSectorAge": 10101,
"ReplacedDayReward": "0",
"SectorKeyCID": null
"SectorKeyCID": null,
"SimpleQAPower": true
}
```

View File

@ -178,6 +178,8 @@
* [StateDecodeParams](#StateDecodeParams)
* [StateEncodeParams](#StateEncodeParams)
* [StateGetActor](#StateGetActor)
* [StateGetAllocation](#StateGetAllocation)
* [StateGetAllocationForPendingDeal](#StateGetAllocationForPendingDeal)
* [StateGetBeaconEntry](#StateGetBeaconEntry)
* [StateGetNetworkParams](#StateGetNetworkParams)
* [StateGetRandomnessFromBeacon](#StateGetRandomnessFromBeacon)
@ -5725,6 +5727,79 @@ Response:
}
```
### StateGetAllocation
StateGetAllocation returns the allocation for a given address and allocation ID.
Perms: read
Inputs:
```json
[
"f01234",
0,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"Client": 1000,
"Provider": 1000,
"Data": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Size": 1032,
"TermMin": 10101,
"TermMax": 10101,
"Expiration": 10101
}
```
### StateGetAllocationForPendingDeal
StateGetAllocationForPendingDeal returns the allocation for a given deal ID of a pending deal.
Perms: read
Inputs:
```json
[
5432,
[
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
{
"/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve"
}
]
]
```
Response:
```json
{
"Client": 1000,
"Provider": 1000,
"Data": {
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
},
"Size": 1032,
"TermMin": 10101,
"TermMax": 10101,
"Expiration": 10101
}
```
### StateGetBeaconEntry
StateGetBeaconEntry returns the beacon entry for the given filecoin epoch. If
the entry has not yet been produced, the call will block until the entry
@ -6046,7 +6121,8 @@ Response:
"State": {
"SectorStartEpoch": 10101,
"LastUpdatedEpoch": 10101,
"SlashEpoch": 10101
"SlashEpoch": 10101,
"VerifiedClaim": 0
}
}
}
@ -6124,7 +6200,8 @@ Response:
"State": {
"SectorStartEpoch": 10101,
"LastUpdatedEpoch": 10101,
"SlashEpoch": 10101
"SlashEpoch": 10101,
"VerifiedClaim": 0
}
}
```
@ -6171,7 +6248,8 @@ Response:
"ExpectedStoragePledge": "0",
"ReplacedSectorAge": 10101,
"ReplacedDayReward": "0",
"SectorKeyCID": null
"SectorKeyCID": null,
"SimpleQAPower": true
}
]
```
@ -6671,7 +6749,8 @@ Response:
"ExpectedStoragePledge": "0",
"ReplacedSectorAge": 10101,
"ReplacedDayReward": "0",
"SectorKeyCID": null
"SectorKeyCID": null,
"SimpleQAPower": true
}
]
```
@ -7051,7 +7130,8 @@ Response:
"ExpectedStoragePledge": "0",
"ReplacedSectorAge": 10101,
"ReplacedDayReward": "0",
"SectorKeyCID": null
"SectorKeyCID": null,
"SimpleQAPower": true
}
```

View File

@ -1221,7 +1221,7 @@ NAME:
lotus filplus grant-datacap - give allowance to the specified verified client address
USAGE:
lotus filplus grant-datacap [command options] [arguments...]
lotus filplus grant-datacap [command options] [clientAddress datacap]
OPTIONS:
--from value specify your notary address to send the message from
@ -1260,7 +1260,7 @@ NAME:
lotus filplus check-client-datacap - check verified client remaining bytes
USAGE:
lotus filplus check-client-datacap [command options] [arguments...]
lotus filplus check-client-datacap [command options] clientAddress
OPTIONS:
--help, -h show help (default: false)
@ -1273,7 +1273,7 @@ NAME:
lotus filplus check-notary-datacap - check a notary's remaining bytes
USAGE:
lotus filplus check-notary-datacap [command options] [arguments...]
lotus filplus check-notary-datacap [command options] notaryAddress
OPTIONS:
--help, -h show help (default: false)
@ -1286,7 +1286,7 @@ NAME:
lotus filplus sign-remove-data-cap-proposal - allows a notary to sign a Remove Data Cap Proposal
USAGE:
lotus filplus sign-remove-data-cap-proposal [command options] [arguments...]
lotus filplus sign-remove-data-cap-proposal [command options] [verifierAddress clientAddress allowanceToRemove]
OPTIONS:
--id value specify the RemoveDataCapProposal ID (will look up on chain if unspecified) (default: 0)

View File

@ -8,10 +8,10 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
market8 "github.com/filecoin-project/go-state-types/builtin/v8/market"
market8 "github.com/filecoin-project/go-state-types/builtin/v9/market"
"github.com/filecoin-project/go-state-types/network"
"github.com/filecoin-project/lotus/chain/wallet/key"
"github.com/filecoin-project/lotus/chain/types"
)
type ActorType string
@ -26,7 +26,7 @@ type PreSeal struct {
CommD cid.Cid
SectorID abi.SectorNumber
Deal market8.DealProposal
DealClientKey *key.Key
DealClientKey types.KeyInfo
ProofType abi.RegisteredSealProof
}

4
go.mod
View File

@ -37,12 +37,12 @@ require (
github.com/filecoin-project/go-data-transfer v1.15.2
github.com/filecoin-project/go-fil-commcid v0.1.0
github.com/filecoin-project/go-fil-commp-hashhash v0.1.0
github.com/filecoin-project/go-fil-markets v1.24.0
github.com/filecoin-project/go-fil-markets v1.24.1-rc1
github.com/filecoin-project/go-jsonrpc v0.1.8
github.com/filecoin-project/go-legs v0.4.4
github.com/filecoin-project/go-padreader v0.0.1
github.com/filecoin-project/go-paramfetch v0.0.4
github.com/filecoin-project/go-state-types v0.1.12-beta.0.20220921193302-60676bda3cb5
github.com/filecoin-project/go-state-types v0.9.0-rc1
github.com/filecoin-project/go-statemachine v1.0.2
github.com/filecoin-project/go-statestore v0.2.0
github.com/filecoin-project/go-storedcounter v0.1.0

8
go.sum
View File

@ -318,8 +318,8 @@ github.com/filecoin-project/go-fil-commcid v0.1.0 h1:3R4ds1A9r6cr8mvZBfMYxTS88Oq
github.com/filecoin-project/go-fil-commcid v0.1.0/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ=
github.com/filecoin-project/go-fil-commp-hashhash v0.1.0 h1:imrrpZWEHRnNqqv0tN7LXep5bFEVOVmQWHJvl2mgsGo=
github.com/filecoin-project/go-fil-commp-hashhash v0.1.0/go.mod h1:73S8WSEWh9vr0fDJVnKADhfIv/d6dCbAGaAGWbdJEI8=
github.com/filecoin-project/go-fil-markets v1.24.0 h1:SgZ9JU3vp7YubyTitEQK8hwEMm1l2Pko01jejviOKMA=
github.com/filecoin-project/go-fil-markets v1.24.0/go.mod h1:ZOPAjEUia7H60F7p0kEupi0FR7Hy4Zfz90BpR1TMBwI=
github.com/filecoin-project/go-fil-markets v1.24.1-rc1 h1:aT+A+8jg/FPBaPvMh830BZVetAJlwGulYSFjfohpvmk=
github.com/filecoin-project/go-fil-markets v1.24.1-rc1/go.mod h1:7PB9QdyLZY4V6W8QjN4C/VGHzD6qdLEuwkemO9TdSXQ=
github.com/filecoin-project/go-hamt-ipld v0.1.5 h1:uoXrKbCQZ49OHpsTCkrThPNelC4W3LPEk0OrS/ytIBM=
github.com/filecoin-project/go-hamt-ipld v0.1.5/go.mod h1:6Is+ONR5Cd5R6XZoCse1CWaXZc0Hdb/JeX+EQCQzX24=
github.com/filecoin-project/go-hamt-ipld/v2 v2.0.0 h1:b3UDemBYN2HNfk3KOXNuxgTTxlWi3xVvbQP0IT38fvM=
@ -343,8 +343,8 @@ github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psS
github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q=
github.com/filecoin-project/go-state-types v0.1.8/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q=
github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q=
github.com/filecoin-project/go-state-types v0.1.12-beta.0.20220921193302-60676bda3cb5 h1:5FCdArFQ/nzsv2vBJ7ibLnocTf+pnnTVxcF0Ohe97O0=
github.com/filecoin-project/go-state-types v0.1.12-beta.0.20220921193302-60676bda3cb5/go.mod h1:n/kujdC9JphvYTrmaD1+vJpvDPy/DwzckoMzP0nBKWI=
github.com/filecoin-project/go-state-types v0.9.0-rc1 h1:cK6OzKP11aIFt0fbor/lqvrzEBegbMGHnSr9LJN/r4g=
github.com/filecoin-project/go-state-types v0.9.0-rc1/go.mod h1:+HCZifUV+e8TlQkgll22Ucuiq8OrVJkK+4Kh4u75iiw=
github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig=
github.com/filecoin-project/go-statemachine v1.0.2 h1:421SSWBk8GIoCoWYYTE/d+qCWccgmRH0uXotXRDjUbc=
github.com/filecoin-project/go-statemachine v1.0.2/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54=

View File

@ -14,7 +14,7 @@ import (
"github.com/filecoin-project/go-fil-markets/storagemarket"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/lotus/api"
lapi "github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/itests/kit"
)
@ -81,7 +81,7 @@ func TestOfflineDealFlow(t *testing.T) {
// Create a CAR file from the raw file
carFileDir := t.TempDir()
carFilePath := filepath.Join(carFileDir, "out.car")
err = client.ClientGenCar(ctx, api.FileRef{Path: inFile}, carFilePath)
err = client.ClientGenCar(ctx, lapi.FileRef{Path: inFile}, carFilePath)
require.NoError(t, err)
// Import the CAR file on the miner - this is the equivalent to

View File

@ -0,0 +1,191 @@
// stm: #integration
package itests
import (
"bytes"
"context"
"fmt"
"testing"
"time"
"github.com/stretchr/testify/require"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/builtin"
markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market"
migration "github.com/filecoin-project/go-state-types/builtin/v9/migration/test"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/go-state-types/exitcode"
lapi "github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/builtin/market"
"github.com/filecoin-project/lotus/chain/actors/builtin/verifreg"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/wallet/key"
"github.com/filecoin-project/lotus/itests/kit"
"github.com/filecoin-project/lotus/node/impl"
)
func TestGetAllocationForPendingDeal(t *testing.T) {
ctx := context.Background()
rootKey, err := key.GenerateKey(types.KTSecp256k1)
require.NoError(t, err)
verifierKey, err := key.GenerateKey(types.KTSecp256k1)
require.NoError(t, err)
verifiedClientKey, err := key.GenerateKey(types.KTBLS)
require.NoError(t, err)
bal, err := types.ParseFIL("100fil")
require.NoError(t, err)
node, miner, ens := kit.EnsembleMinimal(t, kit.MockProofs(),
kit.RootVerifier(rootKey, abi.NewTokenAmount(bal.Int64())),
kit.Account(verifierKey, abi.NewTokenAmount(bal.Int64())), // assign some balance to the verifier so they can send an AddClient message.
kit.Account(verifiedClientKey, abi.NewTokenAmount(bal.Int64())),
)
ens.InterconnectAll().BeginMining(250 * time.Millisecond)
api := node.FullNode.(*impl.FullNodeAPI)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
// get VRH
//stm: @CHAIN_STATE_VERIFIED_REGISTRY_ROOT_KEY_001
vrh, err := api.StateVerifiedRegistryRootKey(ctx, types.TipSetKey{})
fmt.Println(vrh.String())
require.NoError(t, err)
// import the root key.
rootAddr, err := api.WalletImport(ctx, &rootKey.KeyInfo)
require.NoError(t, err)
// import the verifier's key.
verifierAddr, err := api.WalletImport(ctx, &verifierKey.KeyInfo)
require.NoError(t, err)
// import the verified client's key.
verifiedClientAddr, err := api.WalletImport(ctx, &verifiedClientKey.KeyInfo)
require.NoError(t, err)
params, err := actors.SerializeParams(&verifregtypes.AddVerifierParams{Address: verifierAddr, Allowance: big.NewInt(100000000000)})
require.NoError(t, err)
msg := &types.Message{
From: rootAddr,
To: verifreg.Address,
Method: verifreg.Methods.AddVerifier,
Params: params,
Value: big.Zero(),
}
sm, err := api.MpoolPushMessage(ctx, msg, nil)
require.NoError(t, err, "AddVerifier failed")
//stm: @CHAIN_STATE_WAIT_MSG_001
res, err := api.StateWaitMsg(ctx, sm.Cid(), 1, lapi.LookbackNoLimit, true)
require.NoError(t, err)
require.EqualValues(t, 0, res.Receipt.ExitCode)
// assign datacap to a client
datacap := big.NewInt(10000)
params, err = actors.SerializeParams(&verifregtypes.AddVerifiedClientParams{Address: verifiedClientAddr, Allowance: datacap})
require.NoError(t, err)
msg = &types.Message{
From: verifierAddr,
To: verifreg.Address,
Method: verifreg.Methods.AddVerifiedClient,
Params: params,
Value: big.Zero(),
}
sm, err = api.MpoolPushMessage(ctx, msg, nil)
require.NoError(t, err)
//stm: @CHAIN_STATE_WAIT_MSG_001
res, err = api.StateWaitMsg(ctx, sm.Cid(), 1, lapi.LookbackNoLimit, true)
require.NoError(t, err)
require.EqualValues(t, 0, res.Receipt.ExitCode)
// check datacap balance
//stm: @CHAIN_STATE_VERIFIED_CLIENT_STATUS_001
dcap, err := api.StateVerifiedClientStatus(ctx, verifiedClientAddr, types.EmptyTSK)
require.NoError(t, err)
require.Equal(t, *dcap, datacap)
pieceCid := migration.MakeCID("1", &markettypes.PieceCIDPrefix)
label, err := markettypes.NewLabelFromString("")
require.NoError(t, err)
dealProposal := markettypes.DealProposal{
PieceCID: pieceCid,
PieceSize: 1024,
Client: verifiedClientAddr,
Provider: miner.ActorAddr,
Label: label,
StartEpoch: abi.ChainEpoch(1000_000),
EndEpoch: abi.ChainEpoch(2000_000),
StoragePricePerEpoch: big.Zero(),
ProviderCollateral: big.Zero(),
ClientCollateral: big.Zero(),
VerifiedDeal: true,
}
serializedProposal := new(bytes.Buffer)
err = dealProposal.MarshalCBOR(serializedProposal)
require.NoError(t, err)
sig, err := api.WalletSign(ctx, verifiedClientAddr, serializedProposal.Bytes())
publishDealParams := markettypes.PublishStorageDealsParams{
Deals: []markettypes.ClientDealProposal{{
Proposal: dealProposal,
ClientSignature: crypto.Signature{
Type: crypto.SigTypeBLS,
Data: sig.Data,
},
}},
}
serializedParams := new(bytes.Buffer)
require.NoError(t, publishDealParams.MarshalCBOR(serializedParams))
m, err := node.MpoolPushMessage(ctx, &types.Message{
To: builtin.StorageMarketActorAddr,
From: miner.OwnerKey.Address,
Value: types.FromFil(0),
Method: builtin.MethodsMarket.PublishStorageDeals,
Params: serializedParams.Bytes(),
}, nil)
require.NoError(t, err)
r, err := node.StateWaitMsg(ctx, m.Cid(), 2, lapi.LookbackNoLimit, true)
require.NoError(t, err)
require.Equal(t, exitcode.Ok, r.Receipt.ExitCode)
ret, err := market.DecodePublishStorageDealsReturn(r.Receipt.Return, build.TestNetworkVersion)
require.NoError(t, err)
valid, _, err := ret.IsDealValid(0)
require.NoError(t, err)
require.True(t, valid)
dealIds, err := ret.DealIDs()
require.NoError(t, err)
dealInfo, err := api.StateMarketStorageDeal(ctx, dealIds[0], types.EmptyTSK)
require.NoError(t, err)
require.Equal(t, verifregtypes.AllocationId(0), dealInfo.State.VerifiedClaim) // Allocation in State should not be set yet, because it's in the allocation map
allocation, err := api.StateGetAllocationForPendingDeal(ctx, dealIds[0], types.EmptyTSK)
require.NoError(t, err)
require.Equal(t, dealProposal.PieceCID, allocation.Data)
}

View File

@ -123,10 +123,7 @@ func TestVerifiedClientTopUp(t *testing.T) {
//stm: @CHAIN_STATE_VERIFIED_CLIENT_STATUS_001
dcap, err := api.StateVerifiedClientStatus(ctx, verifiedClientAddr, types.EmptyTSK)
require.NoError(t, err)
if !dcap.Equals(datacap) {
t.Fatal("")
}
require.Equal(t, *dcap, datacap)
// try to assign datacap to the same client should fail for actor v4 and below
params, err = actors.SerializeParams(&verifregst.AddVerifiedClientParams{Address: verifiedClientAddr, Allowance: datacap})
@ -280,10 +277,7 @@ func TestRemoveDataCap(t *testing.T) {
//stm: @CHAIN_STATE_VERIFIED_CLIENT_STATUS_001
dcap, err := api.StateVerifiedClientStatus(ctx, verifiedClientAddr, types.EmptyTSK)
require.NoError(t, err)
if !dcap.Equals(datacap) {
t.Fatal("unexpected datacap")
}
require.Equal(t, *dcap, datacap)
// helper to create removedatacap message
makeRemoveDatacapMsg := func(removeDatacap big.Int, proposalID uint64) *types.Message {
@ -354,10 +348,7 @@ func TestRemoveDataCap(t *testing.T) {
//stm: @CHAIN_STATE_VERIFIED_CLIENT_STATUS_001
dcap, err = api.StateVerifiedClientStatus(ctx, verifiedClientAddr, types.EmptyTSK)
require.NoError(t, err)
if !dcap.Equals(big.Sub(datacap, removeDatacap)) {
t.Fatal("unexpected datacap")
}
require.Equal(t, *dcap, big.Sub(datacap, removeDatacap))
// now take away the second half!

View File

@ -16,7 +16,7 @@ import (
tut "github.com/filecoin-project/go-fil-markets/shared_testutil"
"github.com/filecoin-project/go-fil-markets/storagemarket"
"github.com/filecoin-project/go-state-types/abi"
markettypes "github.com/filecoin-project/go-state-types/builtin/v8/market"
markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market"
"github.com/filecoin-project/lotus/node/config"
)

View File

@ -16,7 +16,7 @@ import (
"github.com/filecoin-project/go-fil-markets/storagemarket"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
market8 "github.com/filecoin-project/go-state-types/builtin/v8/market"
markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/go-state-types/exitcode"
builtin6 "github.com/filecoin-project/specs-actors/v6/actors/builtin"
@ -183,7 +183,7 @@ func (c *ClientNodeAdapter) ValidatePublishedDeal(ctx context.Context, deal stor
return 0, xerrors.Errorf("deal publish message called incorrect method (method=%s)", pubmsg.Method)
}
var params market8.PublishStorageDealsParams
var params markettypes.PublishStorageDealsParams
if err := params.UnmarshalCBOR(bytes.NewReader(pubmsg.Params)); err != nil {
return 0, err
}
@ -268,12 +268,12 @@ func (c *ClientNodeAdapter) DealProviderCollateralBounds(ctx context.Context, si
}
// TODO: Remove dealID parameter, change publishCid to be cid.Cid (instead of pointer)
func (c *ClientNodeAdapter) OnDealSectorPreCommitted(ctx context.Context, provider address.Address, dealID abi.DealID, proposal market8.DealProposal, publishCid *cid.Cid, cb storagemarket.DealSectorPreCommittedCallback) error {
func (c *ClientNodeAdapter) OnDealSectorPreCommitted(ctx context.Context, provider address.Address, dealID abi.DealID, proposal markettypes.DealProposal, publishCid *cid.Cid, cb storagemarket.DealSectorPreCommittedCallback) error {
return c.scMgr.OnDealSectorPreCommitted(ctx, provider, proposal, *publishCid, cb)
}
// TODO: Remove dealID parameter, change publishCid to be cid.Cid (instead of pointer)
func (c *ClientNodeAdapter) OnDealSectorCommitted(ctx context.Context, provider address.Address, dealID abi.DealID, sectorNumber abi.SectorNumber, proposal market8.DealProposal, publishCid *cid.Cid, cb storagemarket.DealSectorCommittedCallback) error {
func (c *ClientNodeAdapter) OnDealSectorCommitted(ctx context.Context, provider address.Address, dealID abi.DealID, sectorNumber abi.SectorNumber, proposal markettypes.DealProposal, publishCid *cid.Cid, cb storagemarket.DealSectorCommittedCallback) error {
return c.scMgr.OnDealSectorCommitted(ctx, provider, sectorNumber, proposal, *publishCid, cb)
}
@ -367,7 +367,7 @@ func (c *ClientNodeAdapter) OnDealExpiredOrSlashed(ctx context.Context, dealID a
return nil
}
func (c *ClientNodeAdapter) SignProposal(ctx context.Context, signer address.Address, proposal market8.DealProposal) (*market8.ClientDealProposal, error) {
func (c *ClientNodeAdapter) SignProposal(ctx context.Context, signer address.Address, proposal markettypes.DealProposal) (*markettypes.ClientDealProposal, error) {
// TODO: output spec signed proposal
buf, err := cborutil.Dump(&proposal)
if err != nil {
@ -386,7 +386,7 @@ func (c *ClientNodeAdapter) SignProposal(ctx context.Context, signer address.Add
return nil, err
}
return &market8.ClientDealProposal{
return &markettypes.ClientDealProposal{
Proposal: proposal,
ClientSignature: *sig,
}, nil

View File

@ -15,7 +15,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/builtin"
"github.com/filecoin-project/go-state-types/builtin/v8/market"
"github.com/filecoin-project/go-state-types/builtin/v9/market"
"github.com/filecoin-project/go-state-types/exitcode"
"github.com/filecoin-project/lotus/api"

View File

@ -14,7 +14,7 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
markettypes "github.com/filecoin-project/go-state-types/builtin/v8/market"
markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/go-state-types/exitcode"
tutils "github.com/filecoin-project/specs-actors/v2/support/testing"

View File

@ -13,8 +13,8 @@ import (
"github.com/filecoin-project/go-fil-markets/storagemarket"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin"
"github.com/filecoin-project/go-state-types/builtin/v8/market"
"github.com/filecoin-project/go-state-types/builtin/v8/miner"
"github.com/filecoin-project/go-state-types/builtin/v9/market"
"github.com/filecoin-project/lotus/build"
lminer "github.com/filecoin-project/lotus/chain/actors/builtin/miner"

View File

@ -18,7 +18,7 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin"
markettypes "github.com/filecoin-project/go-state-types/builtin/v8/market"
markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market"
minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner"
"github.com/filecoin-project/go-state-types/cbor"
tutils "github.com/filecoin-project/specs-actors/v2/support/testing"

View File

@ -15,7 +15,7 @@ import (
"github.com/filecoin-project/go-fil-markets/shared"
"github.com/filecoin-project/go-fil-markets/storagemarket"
"github.com/filecoin-project/go-state-types/abi"
market8 "github.com/filecoin-project/go-state-types/builtin/v8/market"
markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/go-state-types/exitcode"
@ -284,12 +284,12 @@ func (n *ProviderNodeAdapter) DealProviderCollateralBounds(ctx context.Context,
}
// TODO: Remove dealID parameter, change publishCid to be cid.Cid (instead of pointer)
func (n *ProviderNodeAdapter) OnDealSectorPreCommitted(ctx context.Context, provider address.Address, dealID abi.DealID, proposal market8.DealProposal, publishCid *cid.Cid, cb storagemarket.DealSectorPreCommittedCallback) error {
func (n *ProviderNodeAdapter) OnDealSectorPreCommitted(ctx context.Context, provider address.Address, dealID abi.DealID, proposal markettypes.DealProposal, publishCid *cid.Cid, cb storagemarket.DealSectorPreCommittedCallback) error {
return n.scMgr.OnDealSectorPreCommitted(ctx, provider, proposal, *publishCid, cb)
}
// TODO: Remove dealID parameter, change publishCid to be cid.Cid (instead of pointer)
func (n *ProviderNodeAdapter) OnDealSectorCommitted(ctx context.Context, provider address.Address, dealID abi.DealID, sectorNumber abi.SectorNumber, proposal market8.DealProposal, publishCid *cid.Cid, cb storagemarket.DealSectorCommittedCallback) error {
func (n *ProviderNodeAdapter) OnDealSectorCommitted(ctx context.Context, provider address.Address, dealID abi.DealID, sectorNumber abi.SectorNumber, proposal markettypes.DealProposal, publishCid *cid.Cid, cb storagemarket.DealSectorCommittedCallback) error {
return n.scMgr.OnDealSectorCommitted(ctx, provider, sectorNumber, proposal, *publishCid, cb)
}
@ -310,7 +310,7 @@ func (n *ProviderNodeAdapter) WaitForMessage(ctx context.Context, mcid cid.Cid,
return cb(receipt.Receipt.ExitCode, receipt.Receipt.Return, receipt.Message, nil)
}
func (n *ProviderNodeAdapter) WaitForPublishDeals(ctx context.Context, publishCid cid.Cid, proposal market8.DealProposal) (*storagemarket.PublishDealsWaitResult, error) {
func (n *ProviderNodeAdapter) WaitForPublishDeals(ctx context.Context, publishCid cid.Cid, proposal markettypes.DealProposal) (*storagemarket.PublishDealsWaitResult, error) {
// Wait for deal to be published (plus additional time for confidence)
receipt, err := n.StateWaitMsg(ctx, publishCid, 2*build.MessageConfidence, api.LookbackNoLimit, true)
if err != nil {

View File

@ -52,7 +52,7 @@ import (
"github.com/filecoin-project/go-padreader"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
market8 "github.com/filecoin-project/go-state-types/builtin/v8/market"
markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market"
"github.com/filecoin-project/go-state-types/dline"
"github.com/filecoin-project/lotus/api"
@ -228,12 +228,12 @@ func (a *API) dealStarter(ctx context.Context, params *api.StartDealParams, isSt
// stateless flow from here to the end
//
label, err := market8.NewLabelFromString(params.Data.Root.Encode(multibase.MustNewEncoder('u')))
label, err := markettypes.NewLabelFromString(params.Data.Root.Encode(multibase.MustNewEncoder('u')))
if err != nil {
return nil, xerrors.Errorf("failed to encode label: %w", err)
}
dealProposal := &market8.DealProposal{
dealProposal := &markettypes.DealProposal{
PieceCID: *params.Data.PieceCid,
PieceSize: params.Data.PieceSize.Padded(),
Client: walletKey,
@ -265,7 +265,7 @@ func (a *API) dealStarter(ctx context.Context, params *api.StartDealParams, isSt
return nil, xerrors.Errorf("failed to sign proposal : %w", err)
}
dealProposalSigned := &market8.ClientDealProposal{
dealProposalSigned := &markettypes.ClientDealProposal{
Proposal: *dealProposal,
ClientSignature: *dealProposalSig,
}

View File

@ -19,6 +19,7 @@ import (
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"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/cbor"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/go-state-types/dline"
@ -30,6 +31,7 @@ import (
"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/builtin"
"github.com/filecoin-project/lotus/chain/actors/builtin/datacap"
"github.com/filecoin-project/lotus/chain/actors/builtin/market"
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/actors/builtin/multisig"
@ -769,6 +771,57 @@ 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) {
ts, err := a.Chain.GetTipSetFromKey(ctx, tsk)
if err != nil {
return nil, xerrors.Errorf("loading tipset %s: %w", tsk, err)
}
st, err := a.StateManager.GetMarketState(ctx, ts)
if err != nil {
return nil, err
}
allocationId, err := st.GetAllocationIdForPendingDeal(dealId)
if err != nil {
return nil, err
}
dealState, err := a.StateMarketStorageDeal(ctx, dealId, tsk)
if err != nil {
return nil, err
}
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) {
idAddr, err := a.StateLookupID(ctx, clientAddr, tsk)
if err != nil {
return nil, err
}
ts, err := a.Chain.GetTipSetFromKey(ctx, tsk)
if err != nil {
return nil, xerrors.Errorf("loading tipset %s: %w", tsk, err)
}
st, err := a.StateManager.GetVerifregState(ctx, ts)
if err != nil {
return nil, err
}
allocation, found, err := st.GetAllocation(idAddr, allocationId)
if err != nil {
return nil, err
}
if !found {
return nil, nil
}
return allocation, nil
}
func (a *StateAPI) StateComputeDataCID(ctx context.Context, maddr address.Address, sectorType abi.RegisteredSealProof, deals []abi.DealID, tsk types.TipSetKey) (cid.Cid, error) {
nv, err := a.StateNetworkVersion(ctx, tsk)
if err != nil {
@ -1399,26 +1452,56 @@ func (a *StateAPI) StateVerifierStatus(ctx context.Context, addr address.Address
// Returns zero if there is no entry in the data cap table for the
// address.
func (m *StateModule) StateVerifiedClientStatus(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*abi.StoragePower, error) {
act, err := m.StateGetActor(ctx, verifreg.Address, tsk)
if err != nil {
return nil, err
}
aid, err := m.StateLookupID(ctx, addr, tsk)
if err != nil {
log.Warnf("lookup failure %v", err)
return nil, err
}
vrs, err := verifreg.Load(m.StateManager.ChainStore().ActorStore(ctx), act)
nv, err := m.StateNetworkVersion(ctx, tsk)
if err != nil {
return nil, xerrors.Errorf("failed to load verified registry state: %w", err)
return nil, err
}
verified, dcap, err := vrs.VerifiedClientDataCap(aid)
av, err := actorstypes.VersionForNetwork(nv)
if err != nil {
return nil, xerrors.Errorf("looking up verified client: %w", err)
return nil, err
}
var dcap abi.StoragePower
var verified bool
if av <= 8 {
act, err := m.StateGetActor(ctx, verifreg.Address, tsk)
if err != nil {
return nil, err
}
vrs, err := verifreg.Load(m.StateManager.ChainStore().ActorStore(ctx), act)
if err != nil {
return nil, xerrors.Errorf("failed to load verified registry state: %w", err)
}
verified, dcap, err = vrs.VerifiedClientDataCap(aid)
if err != nil {
return nil, xerrors.Errorf("looking up verified client: %w", err)
}
} else {
act, err := m.StateGetActor(ctx, datacap.Address, tsk)
if err != nil {
return nil, err
}
dcs, err := datacap.Load(m.StateManager.ChainStore().ActorStore(ctx), act)
if err != nil {
return nil, xerrors.Errorf("failed to load datacap actor state: %w", err)
}
verified, dcap, err = dcs.VerifiedClientDataCap(aid)
if err != nil {
return nil, xerrors.Errorf("looking up verified client: %w", err)
}
}
if !verified {
return nil, nil
}

View File

@ -10,7 +10,7 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
market8 "github.com/filecoin-project/go-state-types/builtin/v8/market"
markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market"
"github.com/filecoin-project/go-state-types/exitcode"
"github.com/filecoin-project/go-state-types/network"
@ -122,7 +122,7 @@ func (mgr *CurrentDealInfoManager) dealIDFromPublishDealsMsg(ctx context.Context
return dealID, types.EmptyTSK, xerrors.Errorf("getting publish deal message %s: %w", publishCid, err)
}
var pubDealsParams market8.PublishStorageDealsParams
var pubDealsParams markettypes.PublishStorageDealsParams
if err := pubDealsParams.UnmarshalCBOR(bytes.NewReader(pubmsg.Params)); err != nil {
return dealID, types.EmptyTSK, xerrors.Errorf("unmarshalling publish deal message params for message %s: %w", publishCid, err)
}

View File

@ -16,7 +16,7 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-bitfield"
"github.com/filecoin-project/go-state-types/abi"
markettypes "github.com/filecoin-project/go-state-types/builtin/v8/market"
markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/go-state-types/exitcode"
"github.com/filecoin-project/go-state-types/network"

View File

@ -9,7 +9,7 @@ import (
cborutil "github.com/filecoin-project/go-cbor-util"
"github.com/filecoin-project/go-state-types/abi"
markettypes "github.com/filecoin-project/go-state-types/builtin/v8/market"
markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market"
tutils "github.com/filecoin-project/specs-actors/v2/support/testing"
"github.com/filecoin-project/lotus/api"

View File

@ -10,7 +10,7 @@ import (
commcid "github.com/filecoin-project/go-fil-commcid"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/builtin/v8/market"
"github.com/filecoin-project/go-state-types/builtin/v9/market"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/wallet/key"
@ -72,7 +72,7 @@ func PreSeal(spt abi.RegisteredSealProof, maddr address.Address, sectors int) (*
ProviderCollateral: big.Zero(),
ClientCollateral: big.Zero(),
}
preseal.DealClientKey = k
preseal.DealClientKey = k.KeyInfo
genm.Sectors[i] = preseal
}

View File

@ -9,9 +9,9 @@ require (
github.com/drand/drand v1.3.0
github.com/filecoin-project/go-address v1.0.0
github.com/filecoin-project/go-data-transfer v1.15.2
github.com/filecoin-project/go-fil-markets v1.24.0
github.com/filecoin-project/go-jsonrpc v0.1.5
github.com/filecoin-project/go-state-types v0.1.11-0.20220823184028-73c63d4127a4
github.com/filecoin-project/go-fil-markets v1.24.1-0.20220926170416-a19d1b3b2cb2
github.com/filecoin-project/go-jsonrpc v0.1.8
github.com/filecoin-project/go-state-types v0.1.12-beta.0.20220926152009-c481def1ce73
github.com/filecoin-project/go-storedcounter v0.1.0
github.com/filecoin-project/lotus v0.0.0-00010101000000-000000000000
github.com/filecoin-project/specs-actors v0.9.15
@ -27,13 +27,12 @@ require (
github.com/ipfs/go-unixfs v0.3.1
github.com/ipld/go-car v0.4.0
github.com/kpacha/opencensus-influxdb v0.0.0-20181102202715-663e2683a27c
github.com/libp2p/go-libp2p v0.21.0
github.com/libp2p/go-libp2p-core v0.19.1
github.com/libp2p/go-libp2p v0.22.0
github.com/libp2p/go-libp2p-pubsub-tracer v0.0.0-20200626141350-e730b32bf1e6
github.com/multiformats/go-multiaddr v0.6.0
github.com/testground/sdk-go v0.2.6
go.opencensus.io v0.23.0
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
)
require (
@ -52,7 +51,6 @@ require (
github.com/benbjohnson/clock v1.3.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bep/debounce v1.2.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect
github.com/buger/goterm v1.0.3 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
@ -67,7 +65,7 @@ require (
github.com/cskr/pubsub v1.0.2 // indirect
github.com/daaku/go.zipexe v1.0.0 // indirect
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
github.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e // indirect
github.com/dgraph-io/badger/v2 v2.2007.3 // indirect
github.com/dgraph-io/ristretto v0.1.0 // indirect
@ -88,6 +86,7 @@ require (
github.com/filecoin-project/go-bitfield v0.2.4 // indirect
github.com/filecoin-project/go-cbor-util v0.0.1 // indirect
github.com/filecoin-project/go-commp-utils v0.1.3 // indirect
github.com/filecoin-project/go-commp-utils/nonffi v0.0.0-20220905160352-62059082a837 // indirect
github.com/filecoin-project/go-crypto v0.0.1 // indirect
github.com/filecoin-project/go-ds-versioning v0.1.1 // indirect
github.com/filecoin-project/go-fil-commcid v0.1.0 // indirect
@ -149,7 +148,7 @@ require (
github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab // indirect
github.com/ipfs/bbloom v0.0.4 // indirect
github.com/ipfs/go-bitfield v1.0.0 // indirect
github.com/ipfs/go-bitswap v0.8.0 // indirect
github.com/ipfs/go-bitswap v0.10.2 // indirect
github.com/ipfs/go-block-format v0.0.3 // indirect
github.com/ipfs/go-blockservice v0.4.0 // indirect
github.com/ipfs/go-cidutil v0.1.0 // indirect
@ -173,7 +172,7 @@ require (
github.com/ipfs/go-ipfs-util v0.0.2 // indirect
github.com/ipfs/go-ipld-cbor v0.0.6 // indirect
github.com/ipfs/go-ipld-legacy v0.1.1 // indirect
github.com/ipfs/go-ipns v0.1.2 // indirect
github.com/ipfs/go-ipns v0.2.0 // indirect
github.com/ipfs/go-log v1.0.5 // indirect
github.com/ipfs/go-metrics-interface v0.0.1 // indirect
github.com/ipfs/go-path v0.3.0 // indirect
@ -196,43 +195,41 @@ require (
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/kilic/bls12-381 v0.0.0-20200820230200-6b2c19996391 // indirect
github.com/klauspost/compress v1.15.1 // indirect
github.com/klauspost/cpuid/v2 v2.0.14 // indirect
github.com/klauspost/cpuid/v2 v2.1.0 // indirect
github.com/koron/go-ssdp v0.0.3 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/libp2p/go-cidranger v1.1.0 // indirect
github.com/libp2p/go-eventbus v0.2.1 // indirect
github.com/libp2p/go-flow-metrics v0.0.3 // indirect
github.com/libp2p/go-flow-metrics v0.1.0 // indirect
github.com/libp2p/go-libp2p-asn-util v0.2.0 // indirect
github.com/libp2p/go-libp2p-connmgr v0.4.0 // indirect
github.com/libp2p/go-libp2p-discovery v0.7.0 // indirect
github.com/libp2p/go-libp2p-core v0.20.0 // indirect
github.com/libp2p/go-libp2p-gostream v0.4.0 // indirect
github.com/libp2p/go-libp2p-kad-dht v0.17.0 // indirect
github.com/libp2p/go-libp2p-kbucket v0.4.7 // indirect
github.com/libp2p/go-libp2p-loggables v0.1.0 // indirect
github.com/libp2p/go-libp2p-kad-dht v0.18.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.7.1 // indirect
github.com/libp2p/go-libp2p-pubsub v0.7.1 // indirect
github.com/libp2p/go-libp2p-record v0.1.3 // indirect
github.com/libp2p/go-libp2p-resource-manager v0.5.3 // indirect
github.com/libp2p/go-libp2p-peerstore v0.8.0 // indirect
github.com/libp2p/go-libp2p-pubsub v0.8.0 // indirect
github.com/libp2p/go-libp2p-record v0.2.0 // indirect
github.com/libp2p/go-libp2p-routing-helpers v0.2.3 // indirect
github.com/libp2p/go-libp2p-tls v0.5.0 // indirect
github.com/libp2p/go-maddr-filter v0.1.0 // indirect
github.com/libp2p/go-msgio v0.2.0 // indirect
github.com/libp2p/go-nat v0.1.0 // indirect
github.com/libp2p/go-netroute v0.2.0 // indirect
github.com/libp2p/go-openssl v0.0.7 // indirect
github.com/libp2p/go-openssl v0.1.0 // indirect
github.com/libp2p/go-reuseport v0.2.0 // indirect
github.com/libp2p/go-yamux/v3 v3.1.2 // indirect
github.com/lucas-clemente/quic-go v0.28.0 // indirect
github.com/lucas-clemente/quic-go v0.28.1 // indirect
github.com/lucasb-eyer/go-colorful v1.0.3 // indirect
github.com/magefile/mage v1.9.0 // indirect
github.com/marten-seemann/qtls-go1-16 v0.1.5 // indirect
github.com/marten-seemann/qtls-go1-17 v0.1.2 // indirect
github.com/marten-seemann/qtls-go1-18 v0.1.2 // indirect
github.com/marten-seemann/qtls-go1-19 v0.1.0-beta.1 // indirect
github.com/marten-seemann/qtls-go1-19 v0.1.0 // indirect
github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect
github.com/mattn/go-colorable v0.1.9 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mattn/go-pointer v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.10 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/miekg/dns v1.1.50 // indirect
@ -248,7 +245,7 @@ require (
github.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect
github.com/multiformats/go-multibase v0.1.1 // indirect
github.com/multiformats/go-multicodec v0.5.0 // indirect
github.com/multiformats/go-multihash v0.2.0 // indirect
github.com/multiformats/go-multihash v0.2.1 // indirect
github.com/multiformats/go-multistream v0.3.3 // indirect
github.com/multiformats/go-varint v0.0.6 // indirect
github.com/nikkolasg/hexjson v0.0.0-20181101101858-78e39397e00c // indirect
@ -266,8 +263,8 @@ require (
github.com/polydawn/refmt v0.0.0-20201211092308-30ac6d18308e // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.35.0 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/prometheus/statsd_exporter v0.21.0 // indirect
github.com/raulk/clock v1.1.0 // indirect
github.com/raulk/go-watchdog v1.3.0 // indirect
@ -291,7 +288,7 @@ require (
github.com/weaveworks/promrus v1.2.0 // indirect
github.com/whyrusleeping/bencher v0.0.0-20190829221104-bb6607aa8bba // indirect
github.com/whyrusleeping/cbor v0.0.0-20171005072247-63513f603b11 // indirect
github.com/whyrusleeping/cbor-gen v0.0.0-20220323183124-98fa8256a799 // indirect
github.com/whyrusleeping/cbor-gen v0.0.0-20220514204315-f29c37e9c44c // indirect
github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f // indirect
github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect
github.com/whyrusleeping/ledger-filecoin-go v0.9.1-0.20201010031517-c3dcc1bddce4 // indirect
@ -305,25 +302,25 @@ require (
go.etcd.io/bbolt v1.3.4 // indirect
go.opentelemetry.io/otel v1.7.0 // indirect
go.opentelemetry.io/otel/trace v1.7.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/dig v1.12.0 // indirect
go.uber.org/fx v1.15.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.21.0 // indirect
go.uber.org/zap v1.22.0 // indirect
go4.org v0.0.0-20200411211856-f5505b9728dd // indirect
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect
golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5 // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/net v0.0.0-20220630215102-69896b714898 // indirect
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
golang.org/x/net v0.0.0-20220812174116-3211cb980234 // indirect
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
golang.org/x/tools v0.1.11 // indirect
golang.org/x/tools v0.1.12 // indirect
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // 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.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/cheggaaa/pb.v1 v1.0.28 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
@ -338,5 +335,3 @@ require (
replace github.com/filecoin-project/filecoin-ffi => ../../extern/filecoin-ffi
replace github.com/filecoin-project/lotus => ../..
replace github.com/filecoin-project/go-fil-markets => github.com/marcopolo/go-fil-markets v1.23.1-0.20220811180806-b8e84162b48e

File diff suppressed because it is too large Load Diff

View File

@ -211,7 +211,7 @@ func runSender(ctx context.Context, t *testkit.TestEnvironment, clients []*testk
return fmt.Errorf("failed to settle payment channel: %w", err)
}
t.SyncClient.Publish(ctx, SettleTopic, settleMsgCid)
_, err = t.SyncClient.Publish(ctx, SettleTopic, settleMsgCid)
if err != nil {
return fmt.Errorf("failed to publish settle message cid: %w", err)
}