more fixes
This commit is contained in:
parent
92cc24fca2
commit
c0bbaebaf4
@ -8,12 +8,13 @@ import (
|
||||
"math"
|
||||
"sort"
|
||||
|
||||
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"
|
||||
cid "github.com/ipfs/go-cid"
|
||||
cbg "github.com/whyrusleeping/cbor-gen"
|
||||
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"
|
||||
)
|
||||
|
||||
var _ = xerrors.Errorf
|
||||
|
@ -5,7 +5,27 @@ import (
|
||||
|
||||
actorstypes "github.com/filecoin-project/go-state-types/actors"
|
||||
account8 "github.com/filecoin-project/go-state-types/builtin/v8/account"
|
||||
cron8 "github.com/filecoin-project/go-state-types/builtin/v8/cron"
|
||||
_init8 "github.com/filecoin-project/go-state-types/builtin/v8/init"
|
||||
market8 "github.com/filecoin-project/go-state-types/builtin/v8/market"
|
||||
miner8 "github.com/filecoin-project/go-state-types/builtin/v8/miner"
|
||||
multisig8 "github.com/filecoin-project/go-state-types/builtin/v8/multisig"
|
||||
paych8 "github.com/filecoin-project/go-state-types/builtin/v8/paych"
|
||||
power8 "github.com/filecoin-project/go-state-types/builtin/v8/power"
|
||||
reward8 "github.com/filecoin-project/go-state-types/builtin/v8/reward"
|
||||
system8 "github.com/filecoin-project/go-state-types/builtin/v8/system"
|
||||
verifreg8 "github.com/filecoin-project/go-state-types/builtin/v8/verifreg"
|
||||
account9 "github.com/filecoin-project/go-state-types/builtin/v9/account"
|
||||
cron9 "github.com/filecoin-project/go-state-types/builtin/v9/cron"
|
||||
_init9 "github.com/filecoin-project/go-state-types/builtin/v9/init"
|
||||
market9 "github.com/filecoin-project/go-state-types/builtin/v9/market"
|
||||
miner9 "github.com/filecoin-project/go-state-types/builtin/v9/miner"
|
||||
multisig9 "github.com/filecoin-project/go-state-types/builtin/v9/multisig"
|
||||
paych9 "github.com/filecoin-project/go-state-types/builtin/v9/paych"
|
||||
power9 "github.com/filecoin-project/go-state-types/builtin/v9/power"
|
||||
reward9 "github.com/filecoin-project/go-state-types/builtin/v9/reward"
|
||||
system9 "github.com/filecoin-project/go-state-types/builtin/v9/system"
|
||||
verifreg9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
|
||||
"github.com/filecoin-project/go-state-types/cbor"
|
||||
rtt "github.com/filecoin-project/go-state-types/rt"
|
||||
|
||||
@ -54,6 +74,66 @@ func MakeRegistry(av actorstypes.Version) []rtt.VMActor {
|
||||
methods: account8.Methods,
|
||||
state: new(account8.State),
|
||||
})
|
||||
case actors.CronKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: cron8.Methods,
|
||||
state: new(cron8.State),
|
||||
})
|
||||
case actors.InitKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: _init8.Methods,
|
||||
state: new(_init8.State),
|
||||
})
|
||||
case actors.MarketKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: market8.Methods,
|
||||
state: new(market8.State),
|
||||
})
|
||||
case actors.MinerKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: miner8.Methods,
|
||||
state: new(miner8.State),
|
||||
})
|
||||
case actors.MultisigKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: multisig8.Methods,
|
||||
state: new(multisig8.State),
|
||||
})
|
||||
case actors.PaychKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: paych8.Methods,
|
||||
state: new(paych8.State),
|
||||
})
|
||||
case actors.PowerKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: power8.Methods,
|
||||
state: new(power8.State),
|
||||
})
|
||||
case actors.RewardKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: reward8.Methods,
|
||||
state: new(reward8.State),
|
||||
})
|
||||
case actors.SystemKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: system8.Methods,
|
||||
state: new(system8.State),
|
||||
})
|
||||
case actors.VerifregKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: verifreg8.Methods,
|
||||
state: new(verifreg8.State),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,6 +146,66 @@ func MakeRegistry(av actorstypes.Version) []rtt.VMActor {
|
||||
methods: account9.Methods,
|
||||
state: new(account9.State),
|
||||
})
|
||||
case actors.CronKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: cron9.Methods,
|
||||
state: new(cron9.State),
|
||||
})
|
||||
case actors.InitKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: _init9.Methods,
|
||||
state: new(_init9.State),
|
||||
})
|
||||
case actors.MarketKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: market9.Methods,
|
||||
state: new(market9.State),
|
||||
})
|
||||
case actors.MinerKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: miner9.Methods,
|
||||
state: new(miner9.State),
|
||||
})
|
||||
case actors.MultisigKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: multisig9.Methods,
|
||||
state: new(multisig9.State),
|
||||
})
|
||||
case actors.PaychKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: paych9.Methods,
|
||||
state: new(paych9.State),
|
||||
})
|
||||
case actors.PowerKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: power9.Methods,
|
||||
state: new(power9.State),
|
||||
})
|
||||
case actors.RewardKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: reward9.Methods,
|
||||
state: new(reward9.State),
|
||||
})
|
||||
case actors.SystemKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: system9.Methods,
|
||||
state: new(system9.State),
|
||||
})
|
||||
case actors.VerifregKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: verifreg9.Methods,
|
||||
state: new(verifreg9.State),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,16 @@ import (
|
||||
{{range .versions}}
|
||||
{{if (ge . 8)}}
|
||||
account{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/account"
|
||||
cron{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/cron"
|
||||
_init{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/init"
|
||||
multisig{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/multisig"
|
||||
miner{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/miner"
|
||||
market{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/market"
|
||||
reward{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/reward"
|
||||
paych{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/paych"
|
||||
power{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/power"
|
||||
system{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/system"
|
||||
verifreg{{.}} "github.com/filecoin-project/go-state-types/builtin/v{{.}}/verifreg"
|
||||
{{end}}
|
||||
{{end}}
|
||||
"github.com/filecoin-project/go-state-types/cbor"
|
||||
@ -56,6 +66,66 @@ func MakeRegistry(av actorstypes.Version) []rtt.VMActor {
|
||||
methods: account{{.}}.Methods,
|
||||
state: new(account{{.}}.State),
|
||||
})
|
||||
case actors.CronKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: cron{{.}}.Methods,
|
||||
state: new(cron{{.}}.State),
|
||||
})
|
||||
case actors.InitKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: _init{{.}}.Methods,
|
||||
state: new(_init{{.}}.State),
|
||||
})
|
||||
case actors.MarketKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: market{{.}}.Methods,
|
||||
state: new(market{{.}}.State),
|
||||
})
|
||||
case actors.MinerKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: miner{{.}}.Methods,
|
||||
state: new(miner{{.}}.State),
|
||||
})
|
||||
case actors.MultisigKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: multisig{{.}}.Methods,
|
||||
state: new(multisig{{.}}.State),
|
||||
})
|
||||
case actors.PaychKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: paych{{.}}.Methods,
|
||||
state: new(paych{{.}}.State),
|
||||
})
|
||||
case actors.PowerKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: power{{.}}.Methods,
|
||||
state: new(power{{.}}.State),
|
||||
})
|
||||
case actors.RewardKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: reward{{.}}.Methods,
|
||||
state: new(reward{{.}}.State),
|
||||
})
|
||||
case actors.SystemKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: system{{.}}.Methods,
|
||||
state: new(system{{.}}.State),
|
||||
})
|
||||
case actors.VerifregKey:
|
||||
registry = append(registry, RegistryEntry{
|
||||
code: codeID,
|
||||
methods: verifreg{{.}}.Methods,
|
||||
state: new(verifreg{{.}}.State),
|
||||
})
|
||||
}
|
||||
}
|
||||
{{end}}
|
||||
|
@ -8,10 +8,11 @@ import (
|
||||
"math"
|
||||
"sort"
|
||||
|
||||
types "github.com/filecoin-project/lotus/chain/types"
|
||||
cid "github.com/ipfs/go-cid"
|
||||
cbg "github.com/whyrusleeping/cbor-gen"
|
||||
xerrors "golang.org/x/xerrors"
|
||||
|
||||
types "github.com/filecoin-project/lotus/chain/types"
|
||||
)
|
||||
|
||||
var _ = xerrors.Errorf
|
||||
|
@ -6,12 +6,6 @@ import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
|
||||
smoothing9 "github.com/filecoin-project/go-state-types/builtin/v9/util/smoothing"
|
||||
|
||||
miner9 "github.com/filecoin-project/go-state-types/builtin/v9/miner"
|
||||
|
||||
market9 "github.com/filecoin-project/go-state-types/builtin/v9/market"
|
||||
|
||||
"github.com/ipfs/go-cid"
|
||||
cbor "github.com/ipfs/go-ipld-cbor"
|
||||
cbg "github.com/whyrusleeping/cbor-gen"
|
||||
@ -25,16 +19,15 @@ import (
|
||||
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"
|
||||
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"
|
||||
"github.com/filecoin-project/go-state-types/network"
|
||||
builtin0 "github.com/filecoin-project/specs-actors/actors/builtin"
|
||||
market0 "github.com/filecoin-project/specs-actors/actors/builtin/market"
|
||||
miner0 "github.com/filecoin-project/specs-actors/actors/builtin/miner"
|
||||
power0 "github.com/filecoin-project/specs-actors/actors/builtin/power"
|
||||
reward0 "github.com/filecoin-project/specs-actors/actors/builtin/reward"
|
||||
market2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/market"
|
||||
reward2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/reward"
|
||||
market4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/market"
|
||||
power4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/power"
|
||||
reward4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/reward"
|
||||
builtin6 "github.com/filecoin-project/specs-actors/v6/actors/builtin"
|
||||
@ -280,6 +273,7 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
nh, err := genesisVm.Flush(ctx)
|
||||
if err != nil {
|
||||
return cid.Undef, xerrors.Errorf("flushing vm: %w", err)
|
||||
@ -606,93 +600,6 @@ func currentTotalPower(ctx context.Context, vm vm.Interface, maddr address.Addre
|
||||
return &pwr, nil
|
||||
}
|
||||
|
||||
func dealWeight(ctx context.Context, vm vm.Interface, maddr address.Address, spt abi.RegisteredSealProof, dealIDs []abi.DealID, sectorStart, sectorExpiry abi.ChainEpoch, av actorstypes.Version) (abi.DealWeight, abi.DealWeight, error) {
|
||||
// TODO: This hack should move to market actor wrapper
|
||||
if av <= actorstypes.Version2 {
|
||||
params := &market0.VerifyDealsForActivationParams{
|
||||
DealIDs: dealIDs,
|
||||
SectorStart: sectorStart,
|
||||
SectorExpiry: sectorExpiry,
|
||||
}
|
||||
|
||||
ret, err := doExecValue(ctx, vm,
|
||||
market.Address,
|
||||
maddr,
|
||||
abi.NewTokenAmount(0),
|
||||
builtin0.MethodsMarket.VerifyDealsForActivation,
|
||||
mustEnc(params),
|
||||
)
|
||||
if err != nil {
|
||||
return big.Zero(), big.Zero(), err
|
||||
}
|
||||
var weight, verifiedWeight abi.DealWeight
|
||||
if av < actorstypes.Version2 {
|
||||
var dealWeights market0.VerifyDealsForActivationReturn
|
||||
err = dealWeights.UnmarshalCBOR(bytes.NewReader(ret))
|
||||
weight = dealWeights.DealWeight
|
||||
verifiedWeight = dealWeights.VerifiedDealWeight
|
||||
} else {
|
||||
var dealWeights market2.VerifyDealsForActivationReturn
|
||||
err = dealWeights.UnmarshalCBOR(bytes.NewReader(ret))
|
||||
weight = dealWeights.DealWeight
|
||||
verifiedWeight = dealWeights.VerifiedDealWeight
|
||||
}
|
||||
if err != nil {
|
||||
return big.Zero(), big.Zero(), err
|
||||
}
|
||||
|
||||
return weight, verifiedWeight, nil
|
||||
}
|
||||
|
||||
if av < actorstypes.Version9 {
|
||||
params := &market4.VerifyDealsForActivationParams{Sectors: []market4.SectorDeals{{
|
||||
SectorExpiry: sectorExpiry,
|
||||
DealIDs: dealIDs,
|
||||
}}}
|
||||
paramEnc := mustEnc(params)
|
||||
|
||||
var dealWeights market4.VerifyDealsForActivationReturn
|
||||
ret, err := doExecValue(ctx, vm,
|
||||
market.Address,
|
||||
maddr,
|
||||
abi.NewTokenAmount(0),
|
||||
market.Methods.VerifyDealsForActivation,
|
||||
paramEnc,
|
||||
)
|
||||
if err != nil {
|
||||
return big.Zero(), big.Zero(), err
|
||||
}
|
||||
if err := dealWeights.UnmarshalCBOR(bytes.NewReader(ret)); err != nil {
|
||||
return big.Zero(), big.Zero(), err
|
||||
}
|
||||
|
||||
return dealWeights.Sectors[0].DealWeight, dealWeights.Sectors[0].VerifiedDealWeight, nil
|
||||
|
||||
}
|
||||
|
||||
params := &market9.ActivateDealsParams{
|
||||
DealIDs: dealIDs,
|
||||
SectorExpiry: sectorExpiry}
|
||||
paramEnc := mustEnc(params)
|
||||
|
||||
var dealWeights market9.ActivateDealsResult
|
||||
ret, err := doExecValue(ctx, vm,
|
||||
market.Address,
|
||||
maddr,
|
||||
abi.NewTokenAmount(0),
|
||||
market.Methods.ActivateDeals,
|
||||
paramEnc,
|
||||
)
|
||||
if err != nil {
|
||||
return big.Zero(), big.Zero(), xerrors.Errorf("failed to activate deals: %w", err)
|
||||
}
|
||||
if err := dealWeights.UnmarshalCBOR(bytes.NewReader(ret)); xerrors.Errorf("failed to unmarshal ret: %w", err) != nil {
|
||||
return big.Zero(), big.Zero(), err
|
||||
}
|
||||
|
||||
return dealWeights.Weights.DealWeight, dealWeights.Weights.VerifiedDealWeight, nil
|
||||
}
|
||||
|
||||
func currentEpochBlockReward(ctx context.Context, vm vm.Interface, maddr address.Address, av actorstypes.Version) (abi.StoragePower, builtin.FilterEstimate, error) {
|
||||
rwret, err := doExecValue(ctx, vm, reward.Address, maddr, big.Zero(), reward.Methods.ThisEpochReward, nil)
|
||||
if err != nil {
|
||||
|
@ -30,13 +30,15 @@ import (
|
||||
func GetReturnType(ctx context.Context, sm *StateManager, to address.Address, method abi.MethodNum, ts *types.TipSet) (cbg.CBORUnmarshaler, error) {
|
||||
act, err := sm.LoadActor(ctx, to, ts)
|
||||
if err != nil {
|
||||
return nil, xerrors.Errorf("(get sset) failed to load miner actor: %w", err)
|
||||
return nil, xerrors.Errorf("(get sset) failed to load actor: %w", err)
|
||||
}
|
||||
|
||||
m, found := sm.tsExec.NewActorRegistry().Methods[act.Code][method]
|
||||
if !found {
|
||||
return nil, fmt.Errorf("unknown method %d for actor %s", method, act.Code)
|
||||
}
|
||||
|
||||
fmt.Println("found ", m.Ret, " and ", m.Params, " for ", m.Num)
|
||||
return reflect.New(m.Ret.Elem()).Interface().(cbg.CBORUnmarshaler), nil
|
||||
}
|
||||
|
||||
|
@ -8,13 +8,14 @@ import (
|
||||
"math"
|
||||
"sort"
|
||||
|
||||
cid "github.com/ipfs/go-cid"
|
||||
cbg "github.com/whyrusleeping/cbor-gen"
|
||||
xerrors "golang.org/x/xerrors"
|
||||
|
||||
abi "github.com/filecoin-project/go-state-types/abi"
|
||||
crypto "github.com/filecoin-project/go-state-types/crypto"
|
||||
exitcode "github.com/filecoin-project/go-state-types/exitcode"
|
||||
proof "github.com/filecoin-project/go-state-types/proof"
|
||||
cid "github.com/ipfs/go-cid"
|
||||
cbg "github.com/whyrusleeping/cbor-gen"
|
||||
xerrors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
var _ = xerrors.Errorf
|
||||
|
@ -8,10 +8,11 @@ import (
|
||||
"math"
|
||||
"sort"
|
||||
|
||||
types "github.com/filecoin-project/lotus/chain/types"
|
||||
cid "github.com/ipfs/go-cid"
|
||||
cbg "github.com/whyrusleeping/cbor-gen"
|
||||
xerrors "golang.org/x/xerrors"
|
||||
|
||||
types "github.com/filecoin-project/lotus/chain/types"
|
||||
)
|
||||
|
||||
var _ = xerrors.Errorf
|
||||
|
2
go.mod
2
go.mod
@ -42,7 +42,7 @@ require (
|
||||
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-0.20220909195146-6740cdd9390d
|
||||
github.com/filecoin-project/go-state-types v0.1.12-0.20220909210634-916a5a14a31b
|
||||
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
8
go.sum
@ -343,12 +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-0.20220909165003-f4ad1a59d916 h1:30E8Wwpe17E816LVRZeeN4QLklGpVO2v+1tGXuQx1Ps=
|
||||
github.com/filecoin-project/go-state-types v0.1.12-0.20220909165003-f4ad1a59d916/go.mod h1:n/kujdC9JphvYTrmaD1+vJpvDPy/DwzckoMzP0nBKWI=
|
||||
github.com/filecoin-project/go-state-types v0.1.12-0.20220909170026-395c37ab732c h1:+QMHpDZ0Zhc1K1nAUg+S2Cm1muEJhGa8N8Nx2tL2Rcc=
|
||||
github.com/filecoin-project/go-state-types v0.1.12-0.20220909170026-395c37ab732c/go.mod h1:n/kujdC9JphvYTrmaD1+vJpvDPy/DwzckoMzP0nBKWI=
|
||||
github.com/filecoin-project/go-state-types v0.1.12-0.20220909195146-6740cdd9390d h1:r1uMayyVGBNZv2WPWEG6Qy7PUmjX8H+tFQnHjCOjwmM=
|
||||
github.com/filecoin-project/go-state-types v0.1.12-0.20220909195146-6740cdd9390d/go.mod h1:n/kujdC9JphvYTrmaD1+vJpvDPy/DwzckoMzP0nBKWI=
|
||||
github.com/filecoin-project/go-state-types v0.1.12-0.20220909210634-916a5a14a31b h1:Dd7R2JHJaXrNc1kZ+Z3PIUTEy5SRbQdw8YwGyWLLZn4=
|
||||
github.com/filecoin-project/go-state-types v0.1.12-0.20220909210634-916a5a14a31b/go.mod h1:n/kujdC9JphvYTrmaD1+vJpvDPy/DwzckoMzP0nBKWI=
|
||||
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=
|
||||
|
@ -736,10 +736,220 @@
|
||||
"1",
|
||||
"2"
|
||||
],
|
||||
"fil/8/cron": [
|
||||
"0",
|
||||
"1",
|
||||
"2"
|
||||
],
|
||||
"fil/8/init": [
|
||||
"0",
|
||||
"1",
|
||||
"2"
|
||||
],
|
||||
"fil/8/multisig": [
|
||||
"0",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"7",
|
||||
"8",
|
||||
"9"
|
||||
],
|
||||
"fil/8/paymentchannel": [
|
||||
"0",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4"
|
||||
],
|
||||
"fil/8/reward": [
|
||||
"0",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4"
|
||||
],
|
||||
"fil/8/storagemarket": [
|
||||
"0",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"7",
|
||||
"8",
|
||||
"9"
|
||||
],
|
||||
"fil/8/storageminer": [
|
||||
"0",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"7",
|
||||
"8",
|
||||
"9",
|
||||
"10",
|
||||
"11",
|
||||
"12",
|
||||
"13",
|
||||
"14",
|
||||
"15",
|
||||
"16",
|
||||
"17",
|
||||
"18",
|
||||
"19",
|
||||
"20",
|
||||
"21",
|
||||
"22",
|
||||
"23",
|
||||
"24",
|
||||
"25",
|
||||
"26",
|
||||
"27"
|
||||
],
|
||||
"fil/8/storagepower": [
|
||||
"0",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"8",
|
||||
"9"
|
||||
],
|
||||
"fil/8/system": [
|
||||
"0",
|
||||
"1"
|
||||
],
|
||||
"fil/8/verifiedregistry": [
|
||||
"0",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"7"
|
||||
],
|
||||
"fil/9/account": [
|
||||
"0",
|
||||
"1",
|
||||
"2",
|
||||
"3"
|
||||
],
|
||||
"fil/9/cron": [
|
||||
"0",
|
||||
"1",
|
||||
"2"
|
||||
],
|
||||
"fil/9/init": [
|
||||
"0",
|
||||
"1",
|
||||
"2"
|
||||
],
|
||||
"fil/9/multisig": [
|
||||
"0",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"7",
|
||||
"8",
|
||||
"9"
|
||||
],
|
||||
"fil/9/paymentchannel": [
|
||||
"0",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4"
|
||||
],
|
||||
"fil/9/reward": [
|
||||
"0",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4"
|
||||
],
|
||||
"fil/9/storagemarket": [
|
||||
"0",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"7",
|
||||
"8",
|
||||
"9"
|
||||
],
|
||||
"fil/9/storageminer": [
|
||||
"0",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"7",
|
||||
"8",
|
||||
"9",
|
||||
"10",
|
||||
"11",
|
||||
"12",
|
||||
"13",
|
||||
"14",
|
||||
"15",
|
||||
"16",
|
||||
"17",
|
||||
"18",
|
||||
"19",
|
||||
"20",
|
||||
"21",
|
||||
"22",
|
||||
"23",
|
||||
"24",
|
||||
"25",
|
||||
"26",
|
||||
"27",
|
||||
"28",
|
||||
"29",
|
||||
"30",
|
||||
"31"
|
||||
],
|
||||
"fil/9/storagepower": [
|
||||
"0",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"8",
|
||||
"9"
|
||||
],
|
||||
"fil/9/system": [
|
||||
"0",
|
||||
"1"
|
||||
],
|
||||
"fil/9/verifiedregistry": [
|
||||
"0",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"7"
|
||||
]
|
||||
}
|
@ -8,10 +8,11 @@ import (
|
||||
"math"
|
||||
"sort"
|
||||
|
||||
abi "github.com/filecoin-project/go-state-types/abi"
|
||||
cid "github.com/ipfs/go-cid"
|
||||
cbg "github.com/whyrusleeping/cbor-gen"
|
||||
xerrors "golang.org/x/xerrors"
|
||||
|
||||
abi "github.com/filecoin-project/go-state-types/abi"
|
||||
)
|
||||
|
||||
var _ = xerrors.Errorf
|
||||
|
@ -8,11 +8,12 @@ import (
|
||||
"math"
|
||||
"sort"
|
||||
|
||||
address "github.com/filecoin-project/go-address"
|
||||
paych "github.com/filecoin-project/go-state-types/builtin/v8/paych"
|
||||
cid "github.com/ipfs/go-cid"
|
||||
cbg "github.com/whyrusleeping/cbor-gen"
|
||||
xerrors "golang.org/x/xerrors"
|
||||
|
||||
address "github.com/filecoin-project/go-address"
|
||||
paych "github.com/filecoin-project/go-state-types/builtin/v8/paych"
|
||||
)
|
||||
|
||||
var _ = xerrors.Errorf
|
||||
|
@ -281,9 +281,17 @@ func (b *PreCommitBatcher) processIndividually(cfg sealiface.Config) ([]sealifac
|
||||
}
|
||||
|
||||
func (b *PreCommitBatcher) processSingle(cfg sealiface.Config, mi api.MinerInfo, avail *abi.TokenAmount, params *preCommitEntry) (cid.Cid, error) {
|
||||
msgParams := miner.PreCommitSectorParams{
|
||||
SealProof: params.pci.SealProof,
|
||||
SectorNumber: params.pci.SectorNumber,
|
||||
SealedCID: params.pci.SealedCID,
|
||||
SealRandEpoch: params.pci.SealRandEpoch,
|
||||
DealIDs: params.pci.DealIDs,
|
||||
Expiration: params.pci.Expiration,
|
||||
}
|
||||
enc := new(bytes.Buffer)
|
||||
|
||||
if err := params.pci.MarshalCBOR(enc); err != nil {
|
||||
if err := msgParams.MarshalCBOR(enc); err != nil {
|
||||
return cid.Undef, xerrors.Errorf("marshaling precommit params: %w", err)
|
||||
}
|
||||
|
||||
|
@ -8,10 +8,11 @@ import (
|
||||
"math"
|
||||
"sort"
|
||||
|
||||
sealtasks "github.com/filecoin-project/lotus/storage/sealer/sealtasks"
|
||||
cid "github.com/ipfs/go-cid"
|
||||
cbg "github.com/whyrusleeping/cbor-gen"
|
||||
xerrors "golang.org/x/xerrors"
|
||||
|
||||
sealtasks "github.com/filecoin-project/lotus/storage/sealer/sealtasks"
|
||||
)
|
||||
|
||||
var _ = xerrors.Errorf
|
||||
|
Loading…
Reference in New Issue
Block a user