Compare commits

..
122 changed files with 744 additions and 3924 deletions
-2
View File
@@ -912,8 +912,6 @@ workflows:
- build
suite: itest-sector_pledge
target: "./itests/sector_pledge_test.go"
get-params: true
- test:
name: test-itest-sector_terminate
requires:
+1 -1
View File
@@ -545,7 +545,7 @@ workflows:
[[- if or (eq $name "worker") (eq $name "deals_concurrent") (eq $name "wdpost_worker_config")]]
executor: golang-2xl
[[- end]]
[[- if or (eq $name "wdpost") (eq $name "sector_pledge")]]
[[- if (eq $name "wdpost")]]
get-params: true
[[end]]
[[- end ]][[- end]]
-4
View File
@@ -9,10 +9,6 @@
## Improvements
- fix: Add time slicing to splitstore purging step during compaction to reduce lock congestion [filecoin-project/lotus#11269](https://github.com/filecoin-project/lotus/pull/11269)
- feat: Added instructions on how to setup Prometheus/Grafana for monitoring a local Lotus node [filecoin-project/lotus#11276](https://github.com/filecoin-project/lotus/pull/11276)
- fix: Exclude reverted events in `eth_getLogs` results [filecoin-project/lotus#11318](https://github.com/filecoin-project/lotus/pull/11318)
## New features
- feat: Add move-partition command ([filecoin-project/lotus#11290](https://github.com/filecoin-project/lotus/pull/11290))
# v1.23.3 / 2023-08-01
+4 -3
View File
@@ -21,6 +21,7 @@ import (
"github.com/filecoin-project/go-state-types/big"
"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"
@@ -28,7 +29,7 @@ import (
apitypes "github.com/filecoin-project/lotus/api/types"
"github.com/filecoin-project/lotus/chain/actors/builtin"
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
lminer "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/actors/builtin/power"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/types/ethtypes"
@@ -498,9 +499,9 @@ type FullNode interface {
// expiration epoch
StateSectorGetInfo(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (*miner.SectorOnChainInfo, error) //perm:read
// StateSectorExpiration returns epoch at which given sector will expire
StateSectorExpiration(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (*miner.SectorExpiration, error) //perm:read
StateSectorExpiration(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (*lminer.SectorExpiration, error) //perm:read
// StateSectorPartition finds deadline/partition with the specified sector
StateSectorPartition(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tok types.TipSetKey) (*miner.SectorLocation, error) //perm:read
StateSectorPartition(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tok types.TipSetKey) (*lminer.SectorLocation, error) //perm:read
// StateSearchMsg looks back up to limit epochs in the chain for a message, and returns its receipt and the tipset where it was executed
//
// NOTE: If a replacing message is found on chain, this method will return
+1 -1
View File
@@ -9,11 +9,11 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-jsonrpc"
"github.com/filecoin-project/go-state-types/abi"
"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/dline"
apitypes "github.com/filecoin-project/lotus/api/types"
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/types/ethtypes"
"github.com/filecoin-project/lotus/node/modules/dtypes"
+1 -6
View File
@@ -19,10 +19,10 @@ 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/v9/market"
"github.com/filecoin-project/go-state-types/builtin/v9/miner"
abinetwork "github.com/filecoin-project/go-state-types/network"
builtinactors "github.com/filecoin-project/lotus/chain/actors/builtin"
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/storage/pipeline/sealiface"
"github.com/filecoin-project/lotus/storage/sealer/fsutil"
@@ -461,15 +461,10 @@ type SectorOffset struct {
// DealInfo is a tuple of deal identity and its schedule
type PieceDealInfo struct {
// "Old" builtin-market deal info
PublishCid *cid.Cid
DealID abi.DealID
DealProposal *market.DealProposal
// Common deal info
DealSchedule DealSchedule
// Best-effort deal asks
KeepUnsealed bool
}
+30 -58
View File
@@ -42,7 +42,7 @@ func (t *PaymentInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Channel"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Channel")); err != nil {
if _, err := io.WriteString(w, string("Channel")); err != nil {
return err
}
@@ -58,7 +58,7 @@ func (t *PaymentInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Vouchers"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Vouchers")); err != nil {
if _, err := io.WriteString(w, string("Vouchers")); err != nil {
return err
}
@@ -83,7 +83,7 @@ func (t *PaymentInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("WaitSentinel"))); err != nil {
return err
}
if _, err := cw.WriteString(string("WaitSentinel")); err != nil {
if _, err := io.WriteString(w, string("WaitSentinel")); err != nil {
return err
}
@@ -163,32 +163,13 @@ func (t *PaymentInfo) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
b, err := cr.ReadByte()
if err != nil {
return err
}
if b != cbg.CborNull[0] {
if err := cr.UnreadByte(); err != nil {
return err
}
t.Vouchers[i] = new(paych.SignedVoucher)
if err := t.Vouchers[i].UnmarshalCBOR(cr); err != nil {
return xerrors.Errorf("unmarshaling t.Vouchers[i] pointer: %w", err)
}
}
}
var v paych.SignedVoucher
if err := v.UnmarshalCBOR(cr); err != nil {
return err
}
t.Vouchers[i] = &v
}
// t.WaitSentinel (cid.Cid) (struct)
@@ -233,7 +214,7 @@ func (t *SealedRef) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Size"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Size")); err != nil {
if _, err := io.WriteString(w, string("Size")); err != nil {
return err
}
@@ -249,7 +230,7 @@ func (t *SealedRef) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Offset"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Offset")); err != nil {
if _, err := io.WriteString(w, string("Offset")); err != nil {
return err
}
@@ -265,7 +246,7 @@ func (t *SealedRef) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("SectorID"))); err != nil {
return err
}
if _, err := cw.WriteString(string("SectorID")); err != nil {
if _, err := io.WriteString(w, string("SectorID")); err != nil {
return err
}
@@ -388,7 +369,7 @@ func (t *SealedRefs) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Refs"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Refs")); err != nil {
if _, err := io.WriteString(w, string("Refs")); err != nil {
return err
}
@@ -466,22 +447,13 @@ func (t *SealedRefs) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
if err := t.Refs[i].UnmarshalCBOR(cr); err != nil {
return xerrors.Errorf("unmarshaling t.Refs[i]: %w", err)
}
}
var v SealedRef
if err := v.UnmarshalCBOR(cr); err != nil {
return err
}
t.Refs[i] = v
}
default:
@@ -512,7 +484,7 @@ func (t *SealTicket) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Epoch"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Epoch")); err != nil {
if _, err := io.WriteString(w, string("Epoch")); err != nil {
return err
}
@@ -534,7 +506,7 @@ func (t *SealTicket) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Value"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Value")); err != nil {
if _, err := io.WriteString(w, string("Value")); err != nil {
return err
}
@@ -667,7 +639,7 @@ func (t *SealSeed) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Epoch"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Epoch")); err != nil {
if _, err := io.WriteString(w, string("Epoch")); err != nil {
return err
}
@@ -689,7 +661,7 @@ func (t *SealSeed) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Value"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Value")); err != nil {
if _, err := io.WriteString(w, string("Value")); err != nil {
return err
}
@@ -822,7 +794,7 @@ func (t *PieceDealInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("DealID"))); err != nil {
return err
}
if _, err := cw.WriteString(string("DealID")); err != nil {
if _, err := io.WriteString(w, string("DealID")); err != nil {
return err
}
@@ -838,7 +810,7 @@ func (t *PieceDealInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PublishCid"))); err != nil {
return err
}
if _, err := cw.WriteString(string("PublishCid")); err != nil {
if _, err := io.WriteString(w, string("PublishCid")); err != nil {
return err
}
@@ -860,7 +832,7 @@ func (t *PieceDealInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("DealProposal"))); err != nil {
return err
}
if _, err := cw.WriteString(string("DealProposal")); err != nil {
if _, err := io.WriteString(w, string("DealProposal")); err != nil {
return err
}
@@ -876,7 +848,7 @@ func (t *PieceDealInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("DealSchedule"))); err != nil {
return err
}
if _, err := cw.WriteString(string("DealSchedule")); err != nil {
if _, err := io.WriteString(w, string("DealSchedule")); err != nil {
return err
}
@@ -892,7 +864,7 @@ func (t *PieceDealInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("KeepUnsealed"))); err != nil {
return err
}
if _, err := cw.WriteString(string("KeepUnsealed")); err != nil {
if _, err := io.WriteString(w, string("KeepUnsealed")); err != nil {
return err
}
@@ -1055,7 +1027,7 @@ func (t *SectorPiece) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Piece"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Piece")); err != nil {
if _, err := io.WriteString(w, string("Piece")); err != nil {
return err
}
@@ -1071,7 +1043,7 @@ func (t *SectorPiece) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("DealInfo"))); err != nil {
return err
}
if _, err := cw.WriteString(string("DealInfo")); err != nil {
if _, err := io.WriteString(w, string("DealInfo")); err != nil {
return err
}
@@ -1178,7 +1150,7 @@ func (t *DealSchedule) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("EndEpoch"))); err != nil {
return err
}
if _, err := cw.WriteString(string("EndEpoch")); err != nil {
if _, err := io.WriteString(w, string("EndEpoch")); err != nil {
return err
}
@@ -1200,7 +1172,7 @@ func (t *DealSchedule) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("StartEpoch"))); err != nil {
return err
}
if _, err := cw.WriteString(string("StartEpoch")); err != nil {
if _, err := io.WriteString(w, string("StartEpoch")); err != nil {
return err
}
+8 -7
View File
@@ -26,6 +26,7 @@ import (
"github.com/filecoin-project/go-jsonrpc/auth"
"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"
@@ -34,7 +35,7 @@ import (
apitypes "github.com/filecoin-project/lotus/api/types"
builtinactors "github.com/filecoin-project/lotus/chain/actors/builtin"
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
lminer "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/types/ethtypes"
"github.com/filecoin-project/lotus/journal/alerting"
@@ -563,11 +564,11 @@ type FullNodeMethods struct {
StateSearchMsg func(p0 context.Context, p1 types.TipSetKey, p2 cid.Cid, p3 abi.ChainEpoch, p4 bool) (*MsgLookup, error) `perm:"read"`
StateSectorExpiration func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorExpiration, error) `perm:"read"`
StateSectorExpiration func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*lminer.SectorExpiration, error) `perm:"read"`
StateSectorGetInfo func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorOnChainInfo, error) `perm:"read"`
StateSectorPartition func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorLocation, error) `perm:"read"`
StateSectorPartition func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*lminer.SectorLocation, error) `perm:"read"`
StateSectorPreCommitInfo func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorPreCommitOnChainInfo, error) `perm:"read"`
@@ -3828,14 +3829,14 @@ func (s *FullNodeStub) StateSearchMsg(p0 context.Context, p1 types.TipSetKey, p2
return nil, ErrNotSupported
}
func (s *FullNodeStruct) StateSectorExpiration(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorExpiration, error) {
func (s *FullNodeStruct) StateSectorExpiration(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*lminer.SectorExpiration, error) {
if s.Internal.StateSectorExpiration == nil {
return nil, ErrNotSupported
}
return s.Internal.StateSectorExpiration(p0, p1, p2, p3)
}
func (s *FullNodeStub) StateSectorExpiration(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorExpiration, error) {
func (s *FullNodeStub) StateSectorExpiration(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*lminer.SectorExpiration, error) {
return nil, ErrNotSupported
}
@@ -3850,14 +3851,14 @@ func (s *FullNodeStub) StateSectorGetInfo(p0 context.Context, p1 address.Address
return nil, ErrNotSupported
}
func (s *FullNodeStruct) StateSectorPartition(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorLocation, error) {
func (s *FullNodeStruct) StateSectorPartition(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*lminer.SectorLocation, error) {
if s.Internal.StateSectorPartition == nil {
return nil, ErrNotSupported
}
return s.Internal.StateSectorPartition(p0, p1, p2, p3)
}
func (s *FullNodeStub) StateSectorPartition(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorLocation, error) {
func (s *FullNodeStub) StateSectorPartition(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*lminer.SectorLocation, error) {
return nil, ErrNotSupported
}
+2 -10
View File
@@ -19,8 +19,8 @@ import (
datatransfer "github.com/filecoin-project/go-data-transfer/v2"
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin/v9/miner"
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/node/modules/dtypes"
)
@@ -56,17 +56,9 @@ type PubsubScore struct {
Score *pubsub.PeerScoreSnapshot
}
// MessageSendSpec contains optional fields which modify message sending behavior
type MessageSendSpec struct {
// MaxFee specifies a cap on network fees related to this message
MaxFee abi.TokenAmount
// MsgUuid specifies a unique message identifier which can be used on node (or node cluster)
// level to prevent double-sends of messages even when nonce generation is not handled by sender
MaxFee abi.TokenAmount
MsgUuid uuid.UUID
// MaximizeFeeCap makes message FeeCap be based entirely on MaxFee
MaximizeFeeCap bool
}
type MpoolMessageWhole struct {
+4 -3
View File
@@ -15,6 +15,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/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"
@@ -22,7 +23,7 @@ import (
"github.com/filecoin-project/lotus/api"
apitypes "github.com/filecoin-project/lotus/api/types"
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
lminer "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/types"
marketevents "github.com/filecoin-project/lotus/markets/loggers"
"github.com/filecoin-project/lotus/node/modules/dtypes"
@@ -449,9 +450,9 @@ type FullNode interface {
// expiration epoch
StateSectorGetInfo(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (*miner.SectorOnChainInfo, error) //perm:read
// StateSectorExpiration returns epoch at which given sector will expire
StateSectorExpiration(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (*miner.SectorExpiration, error) //perm:read
StateSectorExpiration(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (*lminer.SectorExpiration, error) //perm:read
// StateSectorPartition finds deadline/partition with the specified sector
StateSectorPartition(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tok types.TipSetKey) (*miner.SectorLocation, error) //perm:read
StateSectorPartition(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tok types.TipSetKey) (*lminer.SectorLocation, error) //perm:read
// StateSearchMsg searches for a message in the chain, and returns its receipt and the tipset where it was executed
//
// NOTE: If a replacing message is found on chain, this method will return
+1 -1
View File
@@ -8,12 +8,12 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
"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/dline"
abinetwork "github.com/filecoin-project/go-state-types/network"
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/node/modules/dtypes"
)
+8 -7
View File
@@ -17,6 +17,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/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"
@@ -24,7 +25,7 @@ import (
"github.com/filecoin-project/lotus/api"
apitypes "github.com/filecoin-project/lotus/api/types"
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
lminer "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/types"
marketevents "github.com/filecoin-project/lotus/markets/loggers"
"github.com/filecoin-project/lotus/node/modules/dtypes"
@@ -354,11 +355,11 @@ type FullNodeMethods struct {
StateSearchMsgLimited func(p0 context.Context, p1 cid.Cid, p2 abi.ChainEpoch) (*api.MsgLookup, error) `perm:"read"`
StateSectorExpiration func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorExpiration, error) `perm:"read"`
StateSectorExpiration func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*lminer.SectorExpiration, error) `perm:"read"`
StateSectorGetInfo func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorOnChainInfo, error) `perm:"read"`
StateSectorPartition func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorLocation, error) `perm:"read"`
StateSectorPartition func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*lminer.SectorLocation, error) `perm:"read"`
StateSectorPreCommitInfo func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (miner.SectorPreCommitOnChainInfo, error) `perm:"read"`
@@ -2244,14 +2245,14 @@ func (s *FullNodeStub) StateSearchMsgLimited(p0 context.Context, p1 cid.Cid, p2
return nil, ErrNotSupported
}
func (s *FullNodeStruct) StateSectorExpiration(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorExpiration, error) {
func (s *FullNodeStruct) StateSectorExpiration(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*lminer.SectorExpiration, error) {
if s.Internal.StateSectorExpiration == nil {
return nil, ErrNotSupported
}
return s.Internal.StateSectorExpiration(p0, p1, p2, p3)
}
func (s *FullNodeStub) StateSectorExpiration(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorExpiration, error) {
func (s *FullNodeStub) StateSectorExpiration(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*lminer.SectorExpiration, error) {
return nil, ErrNotSupported
}
@@ -2266,14 +2267,14 @@ func (s *FullNodeStub) StateSectorGetInfo(p0 context.Context, p1 address.Address
return nil, ErrNotSupported
}
func (s *FullNodeStruct) StateSectorPartition(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorLocation, error) {
func (s *FullNodeStruct) StateSectorPartition(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*lminer.SectorLocation, error) {
if s.Internal.StateSectorPartition == nil {
return nil, ErrNotSupported
}
return s.Internal.StateSectorPartition(p0, p1, p2, p3)
}
func (s *FullNodeStub) StateSectorPartition(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorLocation, error) {
func (s *FullNodeStub) StateSectorPartition(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*lminer.SectorLocation, error) {
return nil, ErrNotSupported
}
+1 -1
View File
@@ -12,11 +12,11 @@ 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/v9/miner"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/api/v1api"
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/types"
marketevents "github.com/filecoin-project/lotus/markets/loggers"
)
+7 -25
View File
@@ -52,11 +52,9 @@ func (t *NetRpcReq) MarshalCBOR(w io.Writer) error {
return err
}
for _, v := range t.Cid {
if err := cbg.WriteCid(cw, v); err != nil {
return xerrors.Errorf("failed to write cid field v: %w", err)
if err := cbg.WriteCid(w, v); err != nil {
return xerrors.Errorf("failed writing cid field t.Cid: %w", err)
}
}
// t.Data ([][]uint8) (slice)
@@ -153,25 +151,12 @@ func (t *NetRpcReq) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
c, err := cbg.ReadCid(cr)
if err != nil {
return xerrors.Errorf("failed to read cid field t.Cid[i]: %w", err)
}
t.Cid[i] = c
}
c, err := cbg.ReadCid(cr)
if err != nil {
return xerrors.Errorf("reading cid field t.Cid failed: %w", err)
}
t.Cid[i] = c
}
// t.Data ([][]uint8) (slice)
@@ -198,9 +183,6 @@ func (t *NetRpcReq) UnmarshalCBOR(r io.Reader) (err error) {
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
maj, extra, err = cr.ReadHeader()
if err != nil {
@@ -368,7 +350,7 @@ func (t *NetRpcErr) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Msg))); err != nil {
return err
}
if _, err := cw.WriteString(string(t.Msg)); err != nil {
if _, err := io.WriteString(w, string(t.Msg)); err != nil {
return err
}
Binary file not shown.
+2 -2
View File
@@ -1,2 +1,2 @@
/dns4/bootstrap-0.butterfly.fildev.network/tcp/1347/p2p/12D3KooWRaoPgwJuZdPSN4A2iTeh8xzkZGCEBxan9vMkidHisUgn
/dns4/bootstrap-1.butterfly.fildev.network/tcp/1347/p2p/12D3KooWMjLCZeEf3VzSWvQYuhe9VzCcrN6RENX9FgmQqiJfQDWs
/dns4/bootstrap-0.butterfly.fildev.network/tcp/1347/p2p/12D3KooWD5mtdmjHQ1Puj9Md7SEfoa7kWMpwqUhAKsyYsBP56LQC
/dns4/bootstrap-1.butterfly.fildev.network/tcp/1347/p2p/12D3KooWEoYPkm6o87ES6AppFY7d7WHJUQg7XVPRAyQZjEU31efQ
+3
View File
@@ -1,6 +1,9 @@
/dns4/bootstrap-0.mainnet.filops.net/tcp/1347/p2p/12D3KooWCVe8MmsEMes2FzgTpt9fXtmCY7wrq91GRiaC8PHSCCBj
/dns4/bootstrap-1.mainnet.filops.net/tcp/1347/p2p/12D3KooWCwevHg1yLCvktf2nvLu7L9894mcrJR4MsBCcm4syShVc
/dns4/bootstrap-2.mainnet.filops.net/tcp/1347/p2p/12D3KooWEWVwHGn2yR36gKLozmb4YjDJGerotAPGxmdWZx2nxMC4
/dns4/bootstrap-3.mainnet.filops.net/tcp/1347/p2p/12D3KooWKhgq8c7NQ9iGjbyK7v7phXvG6492HQfiDaGHLHLQjk7R
/dns4/bootstrap-4.mainnet.filops.net/tcp/1347/p2p/12D3KooWL6PsFNPhYftrJzGgF5U18hFoaVhfGk7xwzD8yVrHJ3Uc
/dns4/bootstrap-5.mainnet.filops.net/tcp/1347/p2p/12D3KooWLFynvDQiUpXoHroV1YxKHhPJgysQGH2k3ZGwtWzR4dFH
/dns4/bootstrap-6.mainnet.filops.net/tcp/1347/p2p/12D3KooWP5MwCiqdMETF9ub1P3MbCvQCcfconnYHbWg6sUJcDRQQ
/dns4/bootstrap-7.mainnet.filops.net/tcp/1347/p2p/12D3KooWRs3aY1p3juFjPy8gPN95PEQChm2QKGUCAdcDCC4EBMKf
/dns4/bootstrap-8.mainnet.filops.net/tcp/1347/p2p/12D3KooWScFR7385LTyR4zU1bYdzSiiAb5rnNABfVahPvVSzyTkR
+119 -119
View File
@@ -97,25 +97,25 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet
}, {
Network: "butterflynet",
Version: 12,
BundleGitTag: "v12.0.0-rc.1",
ManifestCid: MustParseCid("bafy2bzaceb7s3k6zyuubqil7s2rwdcdyslqqx2fn2cj536yh3hexlyi4syyk6"),
BundleGitTag: "v11.0.0",
ManifestCid: MustParseCid("bafy2bzaceaiy4dsxxus5xp5n5i4tjzkb7sc54mjz7qnk2efhgmsrobjesxnza"),
Actors: map[string]cid.Cid{
"account": MustParseCid("bafk2bzacebp7anjdtg2sohyt6lromx4xs7nujtwdfcsffnptphaayabx7ysxs"),
"cron": MustParseCid("bafk2bzacecu2y3awtemmglpkroiglulc2fj3gpdn6eazdqr6avcautiaighrg"),
"datacap": MustParseCid("bafk2bzacebbh5aynu3v3fluqqrcdsphleodoig42xkid2ccwdnff3avhbdop4"),
"eam": MustParseCid("bafk2bzacebzwt4v4hqoltiblhliwrnttxpr2dggbu3wsrvq4pwzisp7idu5w4"),
"ethaccount": MustParseCid("bafk2bzaceb5f6vgjkl7ic6ry5sjspqm2iij6qlcdovwi3haodb7wn37pgebii"),
"evm": MustParseCid("bafk2bzacebygt6zh6p52rkg2ugehm4k5yuu6f56i2pu6ywrmjez4n4zsje4p4"),
"init": MustParseCid("bafk2bzaceagyf3pwsthod7klfi25ow2zf2i5isfrrgr5ua3lvkgfojalrdbhw"),
"multisig": MustParseCid("bafk2bzacedgfo5mw2zqjwi37lah27sfxj4cw2abylgtxf3ucep4dyhgnppmqe"),
"paymentchannel": MustParseCid("bafk2bzacebm37tgu52cgzmiln6iip6etfmq73fd3qqz2j5gxlhtvachs7kw4c"),
"account": MustParseCid("bafk2bzacecfdqb7p3jakhaa3cqnzpt7hxmhghrbxvafsylqno3febx55fnidw"),
"cron": MustParseCid("bafk2bzaceavmqu2qihgbe3xdaotgypuzvdpiifnm7ll6rolks2u4lac6voosk"),
"datacap": MustParseCid("bafk2bzacealtvh65rzb34fmyzw4m2np2htnio4w3pn4alzqovwxkdbf23dvpo"),
"eam": MustParseCid("bafk2bzacedko6hcjmwpuwgma5pb4gr2wgyvregk3nqqjxit7dv4es6vh5cjoc"),
"ethaccount": MustParseCid("bafk2bzacedhcei2xnr34poxr4xziypm2obqlibke4cs2cjfnr3sz6nf6h7fyy"),
"evm": MustParseCid("bafk2bzacebn5lwxboiikhz67ajwa34v2lc4qevnhpwdnipbmrnutkvrrqkb46"),
"init": MustParseCid("bafk2bzacea6vw4esh5tg7mprv5jkbx5xcyilcy4vvf64lss32mjyuvv2mh5ng"),
"multisig": MustParseCid("bafk2bzacedq2afnwcfipay5twv5mgzjoio5bbjvyo4yqchdwqcr7wrareyx54"),
"paymentchannel": MustParseCid("bafk2bzacebbsvr7i7mqmaadyjibe5wxnv7bwvvec2wlgknuwda6ep45amnd5w"),
"placeholder": MustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"),
"reward": MustParseCid("bafk2bzacedebvitdsztwebi44t5es4ls3p3hor252igzawr3s6uznmbvzh2ou"),
"storagemarket": MustParseCid("bafk2bzaceb2tdeqtt2eqpzeb3gezuchb7g7uzbd52bgvcdt6bg3ckq7oisb74"),
"storageminer": MustParseCid("bafk2bzaceaaztuglvw6pw5xohwfekbw47iyugbyftxrp6hwygsaiu6rebtcty"),
"storagepower": MustParseCid("bafk2bzacedxvlj5xmhytdjrjqyonz37duvxb2ioyzk75c27yypkqalxuh3xh6"),
"system": MustParseCid("bafk2bzacec3vwj2chzaram3iqupkbfiein5h2l5qiltlrngbju2vg5umelclm"),
"verifiedregistry": MustParseCid("bafk2bzacedv2irkql7nil3w5v3ohqq3e54w62pxeoppjmaktzokolaaoh5ksu"),
"reward": MustParseCid("bafk2bzaceafuh6idvaqqkj353vs4qdl42tcmvnymewu5zf4rq2nruxdyunses"),
"storagemarket": MustParseCid("bafk2bzaceb7bx4honi3byjllpdk6fea32dpu3vqvil3okodybdk5m3erlnwjw"),
"storageminer": MustParseCid("bafk2bzacebxjhofdr3sb2uhy2ky2vcijh4nhmwkh5xijtbgk6dzkknji2kn7a"),
"storagepower": MustParseCid("bafk2bzaceabskmmkas6njbowols7t4ib3bipa5abpomk3jtgfwojtzd7mjzfm"),
"system": MustParseCid("bafk2bzacedtuh7cht3fud7fb4avl4g2zbz57lc4ohiaufpaex6dkmdokn5rgo"),
"verifiedregistry": MustParseCid("bafk2bzaceb37hxeuoo5rgf6ansrdl2ykm5v5zp6kireubn4orcopr67jbxv6k"),
},
}, {
Network: "calibrationnet",
@@ -203,25 +203,25 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet
}, {
Network: "calibrationnet",
Version: 12,
BundleGitTag: "v12.0.0-rc.1",
ManifestCid: MustParseCid("bafy2bzacedrunxfqta5skb7q7x32lnp4efz2oq7fn226ffm7fu5iqs62jkmvs"),
BundleGitTag: "v11.0.0",
ManifestCid: MustParseCid("bafy2bzacec5fl7crmxyw234qsmijvffhssgqwuphyaejulbryhel2pxxrxgey"),
Actors: map[string]cid.Cid{
"account": MustParseCid("bafk2bzacechwwxdqvggkdylm37zldjsra2ivkdzwp7fee56bzxbzs544wv6u6"),
"cron": MustParseCid("bafk2bzacec4gdxxkqwxqqodsv6ug5dmdbqdfqwyqfek3yhxc2wweh5psxaeq6"),
"datacap": MustParseCid("bafk2bzacecq5ppfskxgv3iea3jarsix6jdduuhwsn4fbvngtbmzelzmlygorm"),
"eam": MustParseCid("bafk2bzacecb6cnwftvavpph4p34zs4psuy5xvbrhf7vszkva4npw6mw3c42xe"),
"ethaccount": MustParseCid("bafk2bzaceajmc3y3sedsqymfla3dzzqzmbu5kmr2iskm26ga2u34ll5fpztfw"),
"evm": MustParseCid("bafk2bzaced4sozr7m6rzcgpobzeiupghthfw6afumysu3oz6bxxirv74uo3vw"),
"init": MustParseCid("bafk2bzaceaewh7b6zl2egclm7fqzx2lsqr57i75lb6cj43ndoa4mal3k5ld3m"),
"multisig": MustParseCid("bafk2bzacednkwcpw5yzxjceoaliajgupzj6iqxe7ks2ll3unspbprbo5f2now"),
"paymentchannel": MustParseCid("bafk2bzacebaxhk4itfiuvbftg7kz5zxugqnvdgerobitjq4vl6q4orcwk6wqg"),
"account": MustParseCid("bafk2bzacecrjovyiuh4jryepy4pxddzqjyrg2hfinxzbv37bpzlci54r5mkr6"),
"cron": MustParseCid("bafk2bzacedy76woxmtalmsuaji4kog6wmq4h2kcgcyv5wpxbdz7f2ls2tjjmw"),
"datacap": MustParseCid("bafk2bzacec2inqddxpfm3rufwqr752d2ok3ve4cxfhmloyosy6rj2krtkpwus"),
"eam": MustParseCid("bafk2bzacea6sxno66egkqz5rqjq4e22obkeblxl7e3funjifljuinmrc2ztzg"),
"ethaccount": MustParseCid("bafk2bzacecdsvs7xm3ncm66lsjqh65uzhr3rmu3dlux7qzdgpg737r4kslhxm"),
"evm": MustParseCid("bafk2bzaceaz3b66m2znt27clmbp2zi5jsobw6g2x6fiezynyijgtkehgqhq3a"),
"init": MustParseCid("bafk2bzacecdrw7uedx456hnowtyyhm63mkekdlkh3vmlhvqlya6pn6pokiq5y"),
"multisig": MustParseCid("bafk2bzaceaxyxvmng5cel5huzy5nezscm34s7wuzn2fhndexurs3xjtp7xg5i"),
"paymentchannel": MustParseCid("bafk2bzacedrmyc4c6u6ipdo7hwaagx3urr47r4pw6lwv257wqbj6roumwfvky"),
"placeholder": MustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"),
"reward": MustParseCid("bafk2bzacedra77pcglf7vdca2itcaa4vd6xrxynxmgfgdjdxqxfwqyhtoxehy"),
"storagemarket": MustParseCid("bafk2bzacea7g46y7xxu2zjq2h75x6mmx3utz2uxnlvnwi6tzpsvulna3bmiva"),
"storageminer": MustParseCid("bafk2bzacecnh2ouohmonvebq7uughh4h3ppmg4cjsk74dzxlbbtlcij4xbzxq"),
"storagepower": MustParseCid("bafk2bzacedd3ka44k7d46ckbinjhv3diyuu2epgbyvhqqyjkc64qlrg3wlgzi"),
"system": MustParseCid("bafk2bzacecioupndtcnyw6iq2hbrxag3aufvczlv5nobnfbkbywqzcyfaa376"),
"verifiedregistry": MustParseCid("bafk2bzaceavldupmf7bimeeacs67z5xdfdlfca6p7sn6bev3mt5ggepfqvhqo"),
"reward": MustParseCid("bafk2bzacecq3bhrkatwash5zhy2275ksaj3criqb6rox5e3hsyvz7mrl2jh3o"),
"storagemarket": MustParseCid("bafk2bzacedswrpkbh7jmttskllbblym7oj2ynxp7bxtj2fpbxsx55mraog6sc"),
"storageminer": MustParseCid("bafk2bzacecki6ckm7gf4uje3fxvw6x5f77ukaqctvcsfha6oaecvl67veh3sg"),
"storagepower": MustParseCid("bafk2bzacecjcvxwibkgpufeah33gfd2jzlqjx5rn2pguvvch2squon23u6kne"),
"system": MustParseCid("bafk2bzaceavvlgqbcwhy3c24aa24z23wcbzggmb66gj7x5if7o3fbvddaocc4"),
"verifiedregistry": MustParseCid("bafk2bzacedmxdtnpy2mc63b6bi2h4vp4dfc6hxjckqnwaxyijgkpmangygcmk"),
},
}, {
Network: "caterpillarnet",
@@ -318,25 +318,25 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet
}, {
Network: "caterpillarnet",
Version: 12,
BundleGitTag: "v12.0.0-rc.1",
ManifestCid: MustParseCid("bafy2bzacedrimdbavexkdqldjwczbhlx4k5byshl363z62rrt6vkt7mbvnulu"),
BundleGitTag: "v11.0.0",
ManifestCid: MustParseCid("bafy2bzacebexc2jgzwr5ngn6jdnkwdqwwmcapajuypdgvopoe6bnvp4yxm4o2"),
Actors: map[string]cid.Cid{
"account": MustParseCid("bafk2bzacecereuhejfvodut5357cai4lmhsyr7uenhcxvmw6jpmhe6auuly32"),
"cron": MustParseCid("bafk2bzacebo2whgy6jla4jsf5j4ovlqm2e4eepedlpw5wadas33yxmunis4b4"),
"datacap": MustParseCid("bafk2bzacecjjncl7ftgj4mrzxxfxld74pt3pyfrxmcru7a5auab25b3aoixm6"),
"eam": MustParseCid("bafk2bzacebyvawfzoxy7k4yxrj5nd3amg4rcopmnslxdwpzumfhsz5ezk4sws"),
"ethaccount": MustParseCid("bafk2bzaceaccs76uc6osvb2iy6w2pumqei3wdjtxq7rgtsotobncmqoi7kzcg"),
"evm": MustParseCid("bafk2bzaceawxgjzjkhbqwj36wzxeqbtngdh6y2tp4wsi27k7tbg2ujhw5rsjg"),
"init": MustParseCid("bafk2bzacedws5od7o6ktqyo2hudmipxuubsv2lwxz45xxjn2zguze72t6zoik"),
"multisig": MustParseCid("bafk2bzacecb4wk6n4lrmml3tssn6cszd4dc7ttux3kzjatrawhg4o6ovrng6w"),
"paymentchannel": MustParseCid("bafk2bzacea3eb556mkjvosfbqfbyfg6dgu52rfnuctwzjy3b2bh2azredxzbo"),
"account": MustParseCid("bafk2bzaceanjiq5m3feytue5m7hhxfkob2ofg2greoct5tr77reuhrjglo66g"),
"cron": MustParseCid("bafk2bzaceavgd5qj6n744tukhdrvxejygzs3jnlizmcvjsdnxkgiimrd5jrys"),
"datacap": MustParseCid("bafk2bzacedmdywxwrzop2gmf4ys5stydlmvbe35j3nyr2efmf273briksuvse"),
"eam": MustParseCid("bafk2bzacec7qo7s72li7tqysllstlrxxm2dhfqv2w32pytel2e775cki4ozqm"),
"ethaccount": MustParseCid("bafk2bzaceaygtkliu26ubb7ivljrvaeesp5sbjlis5okzl35ishxioa2tlx4w"),
"evm": MustParseCid("bafk2bzacebo7iqzy2ophz4f3civzwlltec7q5fut7kmtfckr6vy33r6ic5eqe"),
"init": MustParseCid("bafk2bzaceb7uzzlsquqwrqhb2vpbvk3jgr4wp5i3smu2splnag2v5sppdehns"),
"multisig": MustParseCid("bafk2bzacebwibfqrytobl4pjtny244zkmfoomazbap3r5gddjryckx5js4csi"),
"paymentchannel": MustParseCid("bafk2bzacecuaa5esuxpouigxoamyl5gire2qqqhvyhewsig2x2j73f6ksh7go"),
"placeholder": MustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"),
"reward": MustParseCid("bafk2bzaceb2x5zgkrho373l3ippp6krs7brugssg6hj2tib22xmqjzdm2o25a"),
"storagemarket": MustParseCid("bafk2bzaced5j6drzmsebpxbf2dtptrc5tyidlbftdljqxavxqb57s2qpbvdek"),
"storageminer": MustParseCid("bafk2bzacedozwxc3c6nqqajafs3hsjviyijhthysd5two5ptm5fcdbwh224ag"),
"storagepower": MustParseCid("bafk2bzaceagp6ilkltsltwii66nz6a4zen4qtfk7rdkvdv3gzq7fbv4ivox3u"),
"system": MustParseCid("bafk2bzacedye5j5uxox7knb6zlnhseaadztyav76mjbyk5qslhhbpiy5cdtt2"),
"verifiedregistry": MustParseCid("bafk2bzacecduww5pirr7dvaijjijw4gf6ygf7vipgxh4scvv6vseo46gueb46"),
"reward": MustParseCid("bafk2bzaced4xxqhv63njf2ibvsqshlwikafctxev7aho5lgsfxyt2javjwvtw"),
"storagemarket": MustParseCid("bafk2bzacedwtx3xokqmbgkgkoqkdt6lam4ymdjb3eznlbtec5wcrtx74l2bpc"),
"storageminer": MustParseCid("bafk2bzacebbbe4sdo3xxkez7x7lkl6j46w34vx7eg7xswmdzhp7moa44p3wjg"),
"storagepower": MustParseCid("bafk2bzacedfgz6n24tjsor4pcayomim2f5f3a3fgyatmjgwxxeejna7okndda"),
"system": MustParseCid("bafk2bzacebxfzeom3d7ahcz2n2nlwp7ncv767bdbbrisugks4l6v7lcu2tmyg"),
"verifiedregistry": MustParseCid("bafk2bzacedaws3or3twy45ltcxucgvqijsje4x675ph6vup2w35smlfneamno"),
},
}, {
Network: "devnet",
@@ -424,25 +424,25 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet
}, {
Network: "devnet",
Version: 12,
BundleGitTag: "v12.0.0-rc.1",
ManifestCid: MustParseCid("bafy2bzacebk6yiirh4ennphzyka7b6g6jzn3lt4lr5ht7rjwulnrcthjihapo"),
BundleGitTag: "v11.0.0",
ManifestCid: MustParseCid("bafy2bzaceay35go4xbjb45km6o46e5bib3bi46panhovcbedrynzwmm3drr4i"),
Actors: map[string]cid.Cid{
"account": MustParseCid("bafk2bzacedki4apynvdxxuoigmqkgaktgy2erjftoxqxqaklnelgveyaqknfu"),
"cron": MustParseCid("bafk2bzacebjpczf7qtcisy3zdp3sqoohxe75tgupmdo5dr26vh7orzrsjn3b2"),
"datacap": MustParseCid("bafk2bzacecz4esatk7gizdc7yvl6soigkelhix7izbc75q6eqtb7gjzavpcqc"),
"eam": MustParseCid("bafk2bzacebhtpd5mxfyovi7fgsfj62nhtmh4t5guob4sgq73ymgsk7473ltig"),
"ethaccount": MustParseCid("bafk2bzacebvdbbw5ag4qnxd7cif5mtakrw4wzv63diwl7awta5plaidfay4vg"),
"evm": MustParseCid("bafk2bzacebb7vrhprnshn52bzfmypjdpcrcfecapk232a6gapk3kghu2mp67q"),
"init": MustParseCid("bafk2bzaceaw4iouukgqxmwukfpt3sakdvsu75ftjvw47swnwtdftz5oszbt4w"),
"multisig": MustParseCid("bafk2bzaceahyjwf6re4mnuwhopglo3qzh6aboluboncpijm7vuiz3u4bkazho"),
"paymentchannel": MustParseCid("bafk2bzaceaupjw3djghaqw3g3hd4tw7uuas3njkszgzx2fhmgqh5eh4e6q2by"),
"account": MustParseCid("bafk2bzacecf2pprkbdlpm4e2xz3ufunxtgrgyh2ie3stuqiyhibsvdze7kvri"),
"cron": MustParseCid("bafk2bzaceasr5d2skowvzv5mzsyak6waqrgc46ewj6rzbapkfi5woom6n6bwa"),
"datacap": MustParseCid("bafk2bzaceaqd77gptubupda7rp7daxkxbkzwc253dxhiyoezxvj2tljmkgpny"),
"eam": MustParseCid("bafk2bzacedve6p4ye6zxydjbfs4ode5r2equ7rqzpyltujsq2lu6wyxnijfx4"),
"ethaccount": MustParseCid("bafk2bzacea25xfsxwew3h2crer6jlb4c5vwu2gtch2jh73ocuxjhupenyrugy"),
"evm": MustParseCid("bafk2bzacece5hivtkmi757lyfahgti7xuqgofodb2u65pxgf6oizfwiiwlcsi"),
"init": MustParseCid("bafk2bzacecxnr5y7qifzdqqiwfbjxv2yr7lbkcyu3e2mf5zjdncteupxdlquu"),
"multisig": MustParseCid("bafk2bzaceayap4k4u3lbysaeeixct5fvhmafy3fa5eagvdpk3i4a7ubfdpobe"),
"paymentchannel": MustParseCid("bafk2bzaceafgrz5wepbein35gie7rnsu7zttxvgllgdneuefmmy4j5izydtza"),
"placeholder": MustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"),
"reward": MustParseCid("bafk2bzacebzso6xkjxdscbpncw7el2d4hap6lfkgwqzrbc76lzp33vkwk6obc"),
"storagemarket": MustParseCid("bafk2bzacebzg74vyk3gzbhnz4zviwvxblyar574mtd6ayognmsvlkriejmunu"),
"storageminer": MustParseCid("bafk2bzaceajgt523lr2sf6cacvzo3goyalljlkaoeehyhxlv57wevkljw2cps"),
"storagepower": MustParseCid("bafk2bzacebbtj2m2ajawfuzxqz5nmdep7xevjo2qfjqa5tx3vr5m6qojolya4"),
"system": MustParseCid("bafk2bzacecnau5wddulbsvwn75tc3w75jrlvkybgrlxs4ngonqab6xq3eowvg"),
"verifiedregistry": MustParseCid("bafk2bzacec37mddea65nvh4htsagtryfa3sq6i67utcupslyhzbhjhoy6hopa"),
"reward": MustParseCid("bafk2bzacedwbtfqlx47fdkxjrb5mwiatheci44x3zkpx33smybc2cme23ymuo"),
"storagemarket": MustParseCid("bafk2bzaceaj74fmooaf3gj3ebwon64ky7hhdh7kytdr3agclqfrqzmpzykh7g"),
"storageminer": MustParseCid("bafk2bzacedb7bokkzzs7hnbhivp74pgcpermuy7j6b3ncodylksukkxtnn7ze"),
"storagepower": MustParseCid("bafk2bzacedilnkegizkxz3nuutib4d4wwlk4bkla22loepia2h53yf4hysmq6"),
"system": MustParseCid("bafk2bzacedpyoncjbl4oxkjm5e77ngvpy2xfajjc4myfsv2vltvzxioattlu2"),
"verifiedregistry": MustParseCid("bafk2bzacebdqi5tr5pjnem5nylg2zbqcugvi7oxi35bhnrfudx4y4ufhlit2k"),
},
}, {
Network: "hyperspace",
@@ -553,25 +553,25 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet
}, {
Network: "mainnet",
Version: 12,
BundleGitTag: "v12.0.0-rc.1",
ManifestCid: MustParseCid("bafy2bzacebxmnxdgt2usdrcrpotgodr75culawwv4eklaun4lu6vlxecql6h2"),
BundleGitTag: "v11.0.0",
ManifestCid: MustParseCid("bafy2bzacecnhaiwcrpyjvzl4uv4q3jzoif26okl3m66q3cijp3dfwlcxwztwo"),
Actors: map[string]cid.Cid{
"account": MustParseCid("bafk2bzaceboftg75mdiba7xbo2i3uvgtca4brhnr3u5ptihonixgpnrvhpxoa"),
"cron": MustParseCid("bafk2bzacechxjkfe2cehx4s7skj3wzfpzf7zolds64khrrrs66bhazsemktls"),
"datacap": MustParseCid("bafk2bzacebpiwb2ml4qbnnaayxumtk43ryhc63exdgnhivy3hwgmzemawsmpq"),
"eam": MustParseCid("bafk2bzaceb3elj4hfbbjp7g5bptc7su7mptszl4nlqfedilxvstjo5ungm6oe"),
"ethaccount": MustParseCid("bafk2bzaceb4gkau2vgsijcxpfuq33bd7w3efr2rrhxrwiacjmns2ntdiamswq"),
"evm": MustParseCid("bafk2bzacecmnyfiwb52tkbwmm2dsd7ysi3nvuxl3lmspy7pl26wxj4zj7w4wi"),
"init": MustParseCid("bafk2bzacebllyegx5r6lggf6ymyetbp7amacwpuxakhtjvjtvoy2bfkzk3vms"),
"multisig": MustParseCid("bafk2bzacecw5lyp3n3t67xdwrmo36h4z7afc3lobmmr6wg55w6yjzg5jhmh42"),
"paymentchannel": MustParseCid("bafk2bzacectv4cm47bnhga5febf3lo3fq47g72kmmp2xd5s6tcxz7hiqdywa4"),
"account": MustParseCid("bafk2bzacealnlr7st6lkwoh6wxpf2hnrlex5sknaopgmkr2tuhg7vmbfy45so"),
"cron": MustParseCid("bafk2bzacebpewdvvgt6tk2o2u4rcovdgym67tadiis5usemlbejg7k3kt567o"),
"datacap": MustParseCid("bafk2bzacebslykoyrb2hm7aacjngqgd5n2wmeii2goadrs5zaya3pvdf6pdnq"),
"eam": MustParseCid("bafk2bzaceaelwt4yfsfvsu3pa3miwalsvy3cfkcjvmt4sqoeopsppnrmj2mf2"),
"ethaccount": MustParseCid("bafk2bzaceclkmc4yidxc6lgcjpfypbde2eddnevcveo4j5kmh4ek6inqysz2k"),
"evm": MustParseCid("bafk2bzacediwh6etwzwmb5pivtclpdplewdjzphouwqpppce6opisjv2fjqfe"),
"init": MustParseCid("bafk2bzaceckwf3w6n2nw6eh77ktmsxqgsvshonvgnyk5q5syyngtetxvasfxg"),
"multisig": MustParseCid("bafk2bzaceafajceqwg5ybiz7xw6rxammuirkgtuv625gzaehsqfprm4bazjmk"),
"paymentchannel": MustParseCid("bafk2bzaceb4e6cnsnviegmqvsmoxzncruvhra54piq7bwiqfqevle6oob2gvo"),
"placeholder": MustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"),
"reward": MustParseCid("bafk2bzacealqnxn5lwzwexd6reav4dppypquklx2ujlnvaxiqk2tzstyvkp5u"),
"storagemarket": MustParseCid("bafk2bzacedylkg5am446lcuih4voyzdn4yjeqfsxfzh5b6mcuhx4mok5ph5c4"),
"storageminer": MustParseCid("bafk2bzacea56yi2khvvorofkf2t4rb5fbmltahrjtauszirdjz4jbunt55xsk"),
"storagepower": MustParseCid("bafk2bzacecsij5tpfzjpfuckxvccv2p3bdqjklkrfyyoei6lx5dyj5j4fvjm6"),
"system": MustParseCid("bafk2bzacebfqrja2hip7esf4eafxjmu6xcogoqu5xxtgdg7xa5szgvvdguchu"),
"verifiedregistry": MustParseCid("bafk2bzacedudgflxc75c77c6zkmfyq4u2xuk7k6xw6dfdccarjrvxx453b77q"),
"reward": MustParseCid("bafk2bzacebwjw2vxkobs7r2kwjdqqb42h2kucyuk6flbnyzw4odg5s4mogamo"),
"storagemarket": MustParseCid("bafk2bzaceazu2j2zu4p24tr22btnqzkhzjvyjltlvsagaj6w3syevikeb5d7m"),
"storageminer": MustParseCid("bafk2bzacec24okjqrp7c7rj3hbrs5ez5apvwah2ruka6haesgfngf37mhk6us"),
"storagepower": MustParseCid("bafk2bzaceaxgloxuzg35vu7l7tohdgaq2frsfp4ejmuo7tkoxjp5zqrze6sf4"),
"system": MustParseCid("bafk2bzaced7npe5mt5nh72jxr2igi2sofoa7gedt4w6kueeke7i3xxugqpjfm"),
"verifiedregistry": MustParseCid("bafk2bzacedej3dnr62g2je2abmyjg3xqv4otvh6e26du5fcrhvw7zgcaaez3a"),
},
}, {
Network: "testing",
@@ -659,25 +659,25 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet
}, {
Network: "testing",
Version: 12,
BundleGitTag: "v12.0.0-rc.1",
ManifestCid: MustParseCid("bafy2bzacebzcqzzlb5iwrledyuyy7pvob3xwzoxqsrvrbrnpaiejb52na5eza"),
BundleGitTag: "v11.0.0",
ManifestCid: MustParseCid("bafy2bzacea2vxre32tg3xhpejrktiuzx4d3pcoe7yyazgscfibmegmchr6n42"),
Actors: map[string]cid.Cid{
"account": MustParseCid("bafk2bzacea74qqkfvacykmq5emzqblh4f4nmxdkiyixxpzs7kkcfnbfa7cb6m"),
"cron": MustParseCid("bafk2bzacecotbu7k6awdzfzakf7g5iaas6gswtunjnnb2xm2klqoshjgb4imy"),
"datacap": MustParseCid("bafk2bzaceduhmqcyailiwdupt2ottfzh5hcrjoyeyiaipf3idk3mu7y3uz2mc"),
"eam": MustParseCid("bafk2bzaceb2yzzw6dcmcmhnt3mqnm4kah66f23pc4escnto3vwa552t6ctr7i"),
"ethaccount": MustParseCid("bafk2bzacebwkvvbmttkcjjlicp4ineozc52i5sc6d46pcoq6lzzs2p5i2youa"),
"evm": MustParseCid("bafk2bzacedetwacs6wmoksxwjlbpp4442uav7fd3pagadejm2cph7ucym7eck"),
"init": MustParseCid("bafk2bzacedhpoycn4sz7dragmbo5yqjspqriydxhplqdeguaqck2hmq5hgwqg"),
"multisig": MustParseCid("bafk2bzaceacc3m23yvnpzoeekstqtr2acutfv4zvsgncorjdrsucymjohzxs4"),
"paymentchannel": MustParseCid("bafk2bzaceac6i76vfexefqf6qgebkhkf2cb4g664d5nmfh2dric5spgykevd2"),
"account": MustParseCid("bafk2bzaceccerssb3tgel6ukdghlwvs7dxsolj4fpkgn7dh7owzwapqb6ejpw"),
"cron": MustParseCid("bafk2bzacebtfl6fczxnitrqqjhyefskf3asyn3gzuvqcddieoqfsaddk5fd4q"),
"datacap": MustParseCid("bafk2bzacediikc55y6uzmnhucf4mik6rqpjulwvgp5gdibogxjhgbvusmzff2"),
"eam": MustParseCid("bafk2bzaceazqi5ezossp6kvqogaaba6hxlfarqgniktmb7iy5qonha3eflz6m"),
"ethaccount": MustParseCid("bafk2bzaceb77ospgfqqmf67v23wkyeg7lr2mu53ybaacu3bslx7s7nhttdueo"),
"evm": MustParseCid("bafk2bzacedvgt7mv22hux4vrnklylq7qmw43kfrqwam6wdsfzkdnaewr33qbu"),
"init": MustParseCid("bafk2bzacealzb3nk2oypway5ubz3hs5py5ok5tuw545454vg4d3mwbslef4js"),
"multisig": MustParseCid("bafk2bzacec45ppn4hrwizmopp2v2atkxw35tb6yem6uqhqilrv7aiaknnnxmu"),
"paymentchannel": MustParseCid("bafk2bzaceajbr3t6cngzh3katqteflbcrtwtdgbthnlfemon5tg6rytf2uonw"),
"placeholder": MustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"),
"reward": MustParseCid("bafk2bzaceaajyncjxcrl7wbb6ukzkueyqz4uyekxpmtn4mpndkf7ksmggopzq"),
"storagemarket": MustParseCid("bafk2bzaced6cexdcinwjhtfvuxgkxukiejp3goylaxtvhqfd24rs5z7g2z7dm"),
"storageminer": MustParseCid("bafk2bzacecw6jvvfu62jkwsa4vzmn262cjrrxh6wza6nvjsyg5aeix7rzgmbe"),
"storagepower": MustParseCid("bafk2bzacedexrf5qplrrl5xzijfrthjdqwodfs5e6zj5kpztc7qnywbqdyiii"),
"system": MustParseCid("bafk2bzacecp4roanbxq3bflftlkipsoqqxio5etjjnzxus5pcu7lq43fnxb34"),
"verifiedregistry": MustParseCid("bafk2bzaceandytrgcnuvizfi47sijbqh6c243vjtzlzumexm6kjv7s7hye45g"),
"reward": MustParseCid("bafk2bzacea7ycf53kbq4robcuh3ziy7qwwhaqamc5krn3lugypgpxhlewdaiq"),
"storagemarket": MustParseCid("bafk2bzacedskmbcpaeb6bezs32szh52jrukvihobluadauayroo5gzrt32tkm"),
"storageminer": MustParseCid("bafk2bzaced3yg5lctmswnbkxyd6cleg3llyux7fu2vbddyd2ho36fpym423mq"),
"storagepower": MustParseCid("bafk2bzacebvpdf372fzxgixztbz2r7ayxyvx7jmdxwlfuqt2cq7tnqgie3klw"),
"system": MustParseCid("bafk2bzaceaatvscbnkv36ixhtt2zel4er5oskxevgumh5gegqkv7uzah36f24"),
"verifiedregistry": MustParseCid("bafk2bzacebp2r56wxadvfzpfbmqwfi3dlnwpmoc5u4tau2hfftbkuafkhye64"),
},
}, {
Network: "testing-fake-proofs",
@@ -765,24 +765,24 @@ var EmbeddedBuiltinActorsMetadata []*BuiltinActorsMetadata = []*BuiltinActorsMet
}, {
Network: "testing-fake-proofs",
Version: 12,
BundleGitTag: "v12.0.0-rc.1",
ManifestCid: MustParseCid("bafy2bzacedtskkmrkkzairdi66syrmvfpydg63ro4dlmmqeta5krnur4hcp3a"),
BundleGitTag: "v11.0.0",
ManifestCid: MustParseCid("bafy2bzacecojemqglhzzhjnhgtrcbsgkyv67ziytvtbhwlr4ym4oxqofv7zui"),
Actors: map[string]cid.Cid{
"account": MustParseCid("bafk2bzacea74qqkfvacykmq5emzqblh4f4nmxdkiyixxpzs7kkcfnbfa7cb6m"),
"cron": MustParseCid("bafk2bzacecotbu7k6awdzfzakf7g5iaas6gswtunjnnb2xm2klqoshjgb4imy"),
"datacap": MustParseCid("bafk2bzaceduhmqcyailiwdupt2ottfzh5hcrjoyeyiaipf3idk3mu7y3uz2mc"),
"eam": MustParseCid("bafk2bzaceb2yzzw6dcmcmhnt3mqnm4kah66f23pc4escnto3vwa552t6ctr7i"),
"ethaccount": MustParseCid("bafk2bzacebwkvvbmttkcjjlicp4ineozc52i5sc6d46pcoq6lzzs2p5i2youa"),
"evm": MustParseCid("bafk2bzacedetwacs6wmoksxwjlbpp4442uav7fd3pagadejm2cph7ucym7eck"),
"init": MustParseCid("bafk2bzacedhpoycn4sz7dragmbo5yqjspqriydxhplqdeguaqck2hmq5hgwqg"),
"multisig": MustParseCid("bafk2bzaceacc3m23yvnpzoeekstqtr2acutfv4zvsgncorjdrsucymjohzxs4"),
"paymentchannel": MustParseCid("bafk2bzaceac6i76vfexefqf6qgebkhkf2cb4g664d5nmfh2dric5spgykevd2"),
"account": MustParseCid("bafk2bzaceccerssb3tgel6ukdghlwvs7dxsolj4fpkgn7dh7owzwapqb6ejpw"),
"cron": MustParseCid("bafk2bzacebtfl6fczxnitrqqjhyefskf3asyn3gzuvqcddieoqfsaddk5fd4q"),
"datacap": MustParseCid("bafk2bzacediikc55y6uzmnhucf4mik6rqpjulwvgp5gdibogxjhgbvusmzff2"),
"eam": MustParseCid("bafk2bzaceazqi5ezossp6kvqogaaba6hxlfarqgniktmb7iy5qonha3eflz6m"),
"ethaccount": MustParseCid("bafk2bzaceb77ospgfqqmf67v23wkyeg7lr2mu53ybaacu3bslx7s7nhttdueo"),
"evm": MustParseCid("bafk2bzacedvgt7mv22hux4vrnklylq7qmw43kfrqwam6wdsfzkdnaewr33qbu"),
"init": MustParseCid("bafk2bzacealzb3nk2oypway5ubz3hs5py5ok5tuw545454vg4d3mwbslef4js"),
"multisig": MustParseCid("bafk2bzacec45ppn4hrwizmopp2v2atkxw35tb6yem6uqhqilrv7aiaknnnxmu"),
"paymentchannel": MustParseCid("bafk2bzaceajbr3t6cngzh3katqteflbcrtwtdgbthnlfemon5tg6rytf2uonw"),
"placeholder": MustParseCid("bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro"),
"reward": MustParseCid("bafk2bzaceaajyncjxcrl7wbb6ukzkueyqz4uyekxpmtn4mpndkf7ksmggopzq"),
"storagemarket": MustParseCid("bafk2bzaced6cexdcinwjhtfvuxgkxukiejp3goylaxtvhqfd24rs5z7g2z7dm"),
"storageminer": MustParseCid("bafk2bzacea54x727xteh3tl46mitigy6cldqusqjxiwni65wrpofidh62k2ds"),
"storagepower": MustParseCid("bafk2bzacecdwijcbbryinjtm27pdinqqkyzoskri24pwsvsadwcq2alkkjpnc"),
"system": MustParseCid("bafk2bzacecp4roanbxq3bflftlkipsoqqxio5etjjnzxus5pcu7lq43fnxb34"),
"verifiedregistry": MustParseCid("bafk2bzaceandytrgcnuvizfi47sijbqh6c243vjtzlzumexm6kjv7s7hye45g"),
"reward": MustParseCid("bafk2bzacea7ycf53kbq4robcuh3ziy7qwwhaqamc5krn3lugypgpxhlewdaiq"),
"storagemarket": MustParseCid("bafk2bzacedskmbcpaeb6bezs32szh52jrukvihobluadauayroo5gzrt32tkm"),
"storageminer": MustParseCid("bafk2bzacebqeztpa5exztccqjwqhan5droiy7ga6zekm6f2gzxoe655vneczm"),
"storagepower": MustParseCid("bafk2bzaceb2tlyuwxncdxsh3hc4fwcjnpxaijkiv54ustwdjbrqabxdsc27km"),
"system": MustParseCid("bafk2bzaceaatvscbnkv36ixhtt2zel4er5oskxevgumh5gegqkv7uzah36f24"),
"verifiedregistry": MustParseCid("bafk2bzacebp2r56wxadvfzpfbmqwfi3dlnwpmoc5u4tau2hfftbkuafkhye64"),
},
}}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+7 -4
View File
@@ -19,7 +19,7 @@ var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
0: DrandMainnet,
}
const GenesisNetworkVersion = network.Version20
const GenesisNetworkVersion = network.Version18
var NetworkBundle = "butterflynet"
var BundleOverrides map[actorstypes.Version]string
@@ -52,10 +52,13 @@ const UpgradeOhSnapHeight = -18
const UpgradeSkyrHeight = -19
const UpgradeSharkHeight = -20
const UpgradeHyggeHeight = -21
const UpgradeLightningHeight = -22
const UpgradeThunderHeight = -23
const UpgradeWatermelonHeight = 400
const UpgradeLightningHeight = 50
const UpgradeThunderHeight = UpgradeLightningHeight + 360
// ??????????
const UpgradeWatermelonHeight = 999999999999999
var SupportedProofTypes = []abi.RegisteredSealProof{
abi.RegisteredSealProof_StackedDrg512MiBV1,
+2 -2
View File
@@ -79,8 +79,8 @@ const UpgradeLightningHeight = 489094
// 2023-04-21T16:00:00Z
const UpgradeThunderHeight = UpgradeLightningHeight + 3120
// 2023-10-19T13:00:00Z
const UpgradeWatermelonHeight = 1013134
// ??????????
const UpgradeWatermelonHeight = 999999999999999
var SupportedProofTypes = []abi.RegisteredSealProof{
abi.RegisteredSealProof_StackedDrg32GiBV1,
@@ -19,7 +19,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/lotus/chain/actors/builtin/verifreg"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/manifest"
{{if (le .v 7)}}
+1 -1
View File
@@ -11,13 +11,13 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
actorstypes "github.com/filecoin-project/go-state-types/actors"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/manifest"
market0 "github.com/filecoin-project/specs-actors/actors/builtin/market"
adt0 "github.com/filecoin-project/specs-actors/actors/util/adt"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/adt"
verifregtypes "github.com/filecoin-project/lotus/chain/actors/builtin/verifreg"
"github.com/filecoin-project/lotus/chain/types"
)
+1 -1
View File
@@ -17,11 +17,11 @@ import (
market10 "github.com/filecoin-project/go-state-types/builtin/v10/market"
adt10 "github.com/filecoin-project/go-state-types/builtin/v10/util/adt"
markettypes "github.com/filecoin-project/go-state-types/builtin/v9/market"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/manifest"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/adt"
verifregtypes "github.com/filecoin-project/lotus/chain/actors/builtin/verifreg"
"github.com/filecoin-project/lotus/chain/types"
)
+1 -1
View File
@@ -17,11 +17,11 @@ import (
market11 "github.com/filecoin-project/go-state-types/builtin/v11/market"
adt11 "github.com/filecoin-project/go-state-types/builtin/v11/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/go-state-types/manifest"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/adt"
verifregtypes "github.com/filecoin-project/lotus/chain/actors/builtin/verifreg"
"github.com/filecoin-project/lotus/chain/types"
)
+1 -1
View File
@@ -17,11 +17,11 @@ import (
market12 "github.com/filecoin-project/go-state-types/builtin/v12/market"
adt12 "github.com/filecoin-project/go-state-types/builtin/v12/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/go-state-types/manifest"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/adt"
verifregtypes "github.com/filecoin-project/lotus/chain/actors/builtin/verifreg"
"github.com/filecoin-project/lotus/chain/types"
)
+1 -1
View File
@@ -11,13 +11,13 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
actorstypes "github.com/filecoin-project/go-state-types/actors"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/manifest"
market2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/market"
adt2 "github.com/filecoin-project/specs-actors/v2/actors/util/adt"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/adt"
verifregtypes "github.com/filecoin-project/lotus/chain/actors/builtin/verifreg"
"github.com/filecoin-project/lotus/chain/types"
)
+1 -1
View File
@@ -11,13 +11,13 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
actorstypes "github.com/filecoin-project/go-state-types/actors"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/manifest"
market3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/market"
adt3 "github.com/filecoin-project/specs-actors/v3/actors/util/adt"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/adt"
verifregtypes "github.com/filecoin-project/lotus/chain/actors/builtin/verifreg"
"github.com/filecoin-project/lotus/chain/types"
)
+1 -1
View File
@@ -11,13 +11,13 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
actorstypes "github.com/filecoin-project/go-state-types/actors"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/manifest"
market4 "github.com/filecoin-project/specs-actors/v4/actors/builtin/market"
adt4 "github.com/filecoin-project/specs-actors/v4/actors/util/adt"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/adt"
verifregtypes "github.com/filecoin-project/lotus/chain/actors/builtin/verifreg"
"github.com/filecoin-project/lotus/chain/types"
)
+1 -1
View File
@@ -11,13 +11,13 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
actorstypes "github.com/filecoin-project/go-state-types/actors"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/manifest"
market5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/market"
adt5 "github.com/filecoin-project/specs-actors/v5/actors/util/adt"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/adt"
verifregtypes "github.com/filecoin-project/lotus/chain/actors/builtin/verifreg"
"github.com/filecoin-project/lotus/chain/types"
)
+1 -1
View File
@@ -13,13 +13,13 @@ import (
rlepluslazy "github.com/filecoin-project/go-bitfield/rle"
"github.com/filecoin-project/go-state-types/abi"
actorstypes "github.com/filecoin-project/go-state-types/actors"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/manifest"
market6 "github.com/filecoin-project/specs-actors/v6/actors/builtin/market"
adt6 "github.com/filecoin-project/specs-actors/v6/actors/util/adt"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/adt"
verifregtypes "github.com/filecoin-project/lotus/chain/actors/builtin/verifreg"
"github.com/filecoin-project/lotus/chain/types"
)
+1 -1
View File
@@ -13,13 +13,13 @@ import (
rlepluslazy "github.com/filecoin-project/go-bitfield/rle"
"github.com/filecoin-project/go-state-types/abi"
actorstypes "github.com/filecoin-project/go-state-types/actors"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/manifest"
market7 "github.com/filecoin-project/specs-actors/v7/actors/builtin/market"
adt7 "github.com/filecoin-project/specs-actors/v7/actors/util/adt"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/adt"
verifregtypes "github.com/filecoin-project/lotus/chain/actors/builtin/verifreg"
"github.com/filecoin-project/lotus/chain/types"
)
+1 -1
View File
@@ -16,11 +16,11 @@ import (
market8 "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/go-state-types/manifest"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/adt"
verifregtypes "github.com/filecoin-project/lotus/chain/actors/builtin/verifreg"
"github.com/filecoin-project/lotus/chain/types"
)
+1 -1
View File
@@ -17,11 +17,11 @@ import (
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/go-state-types/manifest"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/adt"
verifregtypes "github.com/filecoin-project/lotus/chain/actors/builtin/verifreg"
"github.com/filecoin-project/lotus/chain/types"
)
+6 -52
View File
@@ -154,7 +154,7 @@ type Partition interface {
type SectorOnChainInfo = minertypes.SectorOnChainInfo
func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.RegisteredPoStProof, configWantSynthetic bool) (abi.RegisteredSealProof, error) {
func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.RegisteredPoStProof) (abi.RegisteredSealProof, error) {
// We added support for the new proofs in network version 7, and removed support for the old
// ones in network version 8.
if nver < network.Version7 {
@@ -174,34 +174,17 @@ func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.Re
}
}
if nver < MinSyntheticPoRepVersion || !configWantSynthetic {
switch proof {
case abi.RegisteredPoStProof_StackedDrgWindow2KiBV1, abi.RegisteredPoStProof_StackedDrgWindow2KiBV1_1:
return abi.RegisteredSealProof_StackedDrg2KiBV1_1, nil
case abi.RegisteredPoStProof_StackedDrgWindow8MiBV1, abi.RegisteredPoStProof_StackedDrgWindow8MiBV1_1:
return abi.RegisteredSealProof_StackedDrg8MiBV1_1, nil
case abi.RegisteredPoStProof_StackedDrgWindow512MiBV1, abi.RegisteredPoStProof_StackedDrgWindow512MiBV1_1:
return abi.RegisteredSealProof_StackedDrg512MiBV1_1, nil
case abi.RegisteredPoStProof_StackedDrgWindow32GiBV1, abi.RegisteredPoStProof_StackedDrgWindow32GiBV1_1:
return abi.RegisteredSealProof_StackedDrg32GiBV1_1, nil
case abi.RegisteredPoStProof_StackedDrgWindow64GiBV1, abi.RegisteredPoStProof_StackedDrgWindow64GiBV1_1:
return abi.RegisteredSealProof_StackedDrg64GiBV1_1, nil
default:
return -1, xerrors.Errorf("unrecognized window post type: %d", proof)
}
}
switch proof {
case abi.RegisteredPoStProof_StackedDrgWindow2KiBV1, abi.RegisteredPoStProof_StackedDrgWindow2KiBV1_1:
return abi.RegisteredSealProof_StackedDrg2KiBV1_1_Feat_SyntheticPoRep, nil
return abi.RegisteredSealProof_StackedDrg2KiBV1_1, nil
case abi.RegisteredPoStProof_StackedDrgWindow8MiBV1, abi.RegisteredPoStProof_StackedDrgWindow8MiBV1_1:
return abi.RegisteredSealProof_StackedDrg8MiBV1_1_Feat_SyntheticPoRep, nil
return abi.RegisteredSealProof_StackedDrg8MiBV1_1, nil
case abi.RegisteredPoStProof_StackedDrgWindow512MiBV1, abi.RegisteredPoStProof_StackedDrgWindow512MiBV1_1:
return abi.RegisteredSealProof_StackedDrg512MiBV1_1_Feat_SyntheticPoRep, nil
return abi.RegisteredSealProof_StackedDrg512MiBV1_1, nil
case abi.RegisteredPoStProof_StackedDrgWindow32GiBV1, abi.RegisteredPoStProof_StackedDrgWindow32GiBV1_1:
return abi.RegisteredSealProof_StackedDrg32GiBV1_1_Feat_SyntheticPoRep, nil
return abi.RegisteredSealProof_StackedDrg32GiBV1_1, nil
case abi.RegisteredPoStProof_StackedDrgWindow64GiBV1, abi.RegisteredPoStProof_StackedDrgWindow64GiBV1_1:
return abi.RegisteredSealProof_StackedDrg64GiBV1_1_Feat_SyntheticPoRep, nil
return abi.RegisteredSealProof_StackedDrg64GiBV1_1, nil
default:
return -1, xerrors.Errorf("unrecognized window post type: %d", proof)
}
@@ -230,37 +213,8 @@ type PendingBeneficiaryChange = minertypes.PendingBeneficiaryChange
type WorkerKeyChange = minertypes.WorkerKeyChange
type SectorPreCommitOnChainInfo = minertypes.SectorPreCommitOnChainInfo
type SectorPreCommitInfo = minertypes.SectorPreCommitInfo
type SubmitWindowedPoStParams = minertypes.SubmitWindowedPoStParams
type PoStPartition = minertypes.PoStPartition
type RecoveryDeclaration = minertypes.RecoveryDeclaration
type FaultDeclaration = minertypes.FaultDeclaration
type DeclareFaultsRecoveredParams = minertypes.DeclareFaultsRecoveredParams
type DeclareFaultsParams = minertypes.DeclareFaultsParams
type ProveCommitAggregateParams = minertypes.ProveCommitAggregateParams
type ProveCommitSectorParams = minertypes.ProveCommitSectorParams
type ProveReplicaUpdatesParams = minertypes.ProveReplicaUpdatesParams
type ReplicaUpdate = minertypes.ReplicaUpdate
type PreCommitSectorBatchParams = minertypes.PreCommitSectorBatchParams
type PreCommitSectorBatchParams2 = minertypes.PreCommitSectorBatchParams2
type ExtendSectorExpiration2Params = minertypes.ExtendSectorExpiration2Params
type SectorClaim = minertypes.SectorClaim
type ExpirationExtension2 = minertypes.ExpirationExtension2
type CompactPartitionsParams = minertypes.CompactPartitionsParams
type WithdrawBalanceParams = minertypes.WithdrawBalanceParams
var QAPowerMax = minertypes.QAPowerMax
type WindowPostVerifyInfo = proof.WindowPoStVerifyInfo
var WPoStProvingPeriod = func() abi.ChainEpoch { return minertypes.WPoStProvingPeriod }
var WPoStChallengeWindow = func() abi.ChainEpoch { return minertypes.WPoStChallengeWindow }
const WPoStPeriodDeadlines = minertypes.WPoStPeriodDeadlines
const WPoStChallengeLookback = minertypes.WPoStChallengeLookback
const FaultDeclarationCutoff = minertypes.FaultDeclarationCutoff
const MinAggregatedSectors = minertypes.MinAggregatedSectors
const MinSectorExpiration = minertypes.MinSectorExpiration
type SectorExpiration struct {
OnTime abi.ChainEpoch
+6 -52
View File
@@ -214,7 +214,7 @@ type Partition interface {
type SectorOnChainInfo = minertypes.SectorOnChainInfo
func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.RegisteredPoStProof, configWantSynthetic bool) (abi.RegisteredSealProof, error) {
func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.RegisteredPoStProof) (abi.RegisteredSealProof, error) {
// We added support for the new proofs in network version 7, and removed support for the old
// ones in network version 8.
if nver < network.Version7 {
@@ -234,34 +234,17 @@ func PreferredSealProofTypeFromWindowPoStType(nver network.Version, proof abi.Re
}
}
if nver < MinSyntheticPoRepVersion || !configWantSynthetic {
switch proof {
case abi.RegisteredPoStProof_StackedDrgWindow2KiBV1, abi.RegisteredPoStProof_StackedDrgWindow2KiBV1_1:
return abi.RegisteredSealProof_StackedDrg2KiBV1_1, nil
case abi.RegisteredPoStProof_StackedDrgWindow8MiBV1, abi.RegisteredPoStProof_StackedDrgWindow8MiBV1_1:
return abi.RegisteredSealProof_StackedDrg8MiBV1_1, nil
case abi.RegisteredPoStProof_StackedDrgWindow512MiBV1, abi.RegisteredPoStProof_StackedDrgWindow512MiBV1_1:
return abi.RegisteredSealProof_StackedDrg512MiBV1_1, nil
case abi.RegisteredPoStProof_StackedDrgWindow32GiBV1, abi.RegisteredPoStProof_StackedDrgWindow32GiBV1_1:
return abi.RegisteredSealProof_StackedDrg32GiBV1_1, nil
case abi.RegisteredPoStProof_StackedDrgWindow64GiBV1, abi.RegisteredPoStProof_StackedDrgWindow64GiBV1_1:
return abi.RegisteredSealProof_StackedDrg64GiBV1_1, nil
default:
return -1, xerrors.Errorf("unrecognized window post type: %d", proof)
}
}
switch proof {
case abi.RegisteredPoStProof_StackedDrgWindow2KiBV1, abi.RegisteredPoStProof_StackedDrgWindow2KiBV1_1:
return abi.RegisteredSealProof_StackedDrg2KiBV1_1_Feat_SyntheticPoRep, nil
return abi.RegisteredSealProof_StackedDrg2KiBV1_1, nil
case abi.RegisteredPoStProof_StackedDrgWindow8MiBV1, abi.RegisteredPoStProof_StackedDrgWindow8MiBV1_1:
return abi.RegisteredSealProof_StackedDrg8MiBV1_1_Feat_SyntheticPoRep, nil
return abi.RegisteredSealProof_StackedDrg8MiBV1_1, nil
case abi.RegisteredPoStProof_StackedDrgWindow512MiBV1, abi.RegisteredPoStProof_StackedDrgWindow512MiBV1_1:
return abi.RegisteredSealProof_StackedDrg512MiBV1_1_Feat_SyntheticPoRep, nil
return abi.RegisteredSealProof_StackedDrg512MiBV1_1, nil
case abi.RegisteredPoStProof_StackedDrgWindow32GiBV1, abi.RegisteredPoStProof_StackedDrgWindow32GiBV1_1:
return abi.RegisteredSealProof_StackedDrg32GiBV1_1_Feat_SyntheticPoRep, nil
return abi.RegisteredSealProof_StackedDrg32GiBV1_1, nil
case abi.RegisteredPoStProof_StackedDrgWindow64GiBV1, abi.RegisteredPoStProof_StackedDrgWindow64GiBV1_1:
return abi.RegisteredSealProof_StackedDrg64GiBV1_1_Feat_SyntheticPoRep, nil
return abi.RegisteredSealProof_StackedDrg64GiBV1_1, nil
default:
return -1, xerrors.Errorf("unrecognized window post type: %d", proof)
}
@@ -290,37 +273,8 @@ type PendingBeneficiaryChange = minertypes.PendingBeneficiaryChange
type WorkerKeyChange = minertypes.WorkerKeyChange
type SectorPreCommitOnChainInfo = minertypes.SectorPreCommitOnChainInfo
type SectorPreCommitInfo = minertypes.SectorPreCommitInfo
type SubmitWindowedPoStParams = minertypes.SubmitWindowedPoStParams
type PoStPartition = minertypes.PoStPartition
type RecoveryDeclaration = minertypes.RecoveryDeclaration
type FaultDeclaration = minertypes.FaultDeclaration
type DeclareFaultsRecoveredParams = minertypes.DeclareFaultsRecoveredParams
type DeclareFaultsParams = minertypes.DeclareFaultsParams
type ProveCommitAggregateParams = minertypes.ProveCommitAggregateParams
type ProveCommitSectorParams = minertypes.ProveCommitSectorParams
type ProveReplicaUpdatesParams = minertypes.ProveReplicaUpdatesParams
type ReplicaUpdate = minertypes.ReplicaUpdate
type PreCommitSectorBatchParams = minertypes.PreCommitSectorBatchParams
type PreCommitSectorBatchParams2 = minertypes.PreCommitSectorBatchParams2
type ExtendSectorExpiration2Params = minertypes.ExtendSectorExpiration2Params
type SectorClaim = minertypes.SectorClaim
type ExpirationExtension2 = minertypes.ExpirationExtension2
type CompactPartitionsParams = minertypes.CompactPartitionsParams
type WithdrawBalanceParams = minertypes.WithdrawBalanceParams
var QAPowerMax = minertypes.QAPowerMax
type WindowPostVerifyInfo = proof.WindowPoStVerifyInfo
var WPoStProvingPeriod = func() abi.ChainEpoch { return minertypes.WPoStProvingPeriod }
var WPoStChallengeWindow = func() abi.ChainEpoch { return minertypes.WPoStChallengeWindow }
const WPoStPeriodDeadlines = minertypes.WPoStPeriodDeadlines
const WPoStChallengeLookback = minertypes.WPoStChallengeLookback
const FaultDeclarationCutoff = minertypes.FaultDeclarationCutoff
const MinAggregatedSectors = minertypes.MinAggregatedSectors
const MinSectorExpiration = minertypes.MinSectorExpiration
type SectorExpiration struct {
OnTime abi.ChainEpoch
+6 -32
View File
@@ -8,8 +8,6 @@ import (
"github.com/filecoin-project/go-state-types/network"
)
var MinSyntheticPoRepVersion = network.Version21
func AllPartSectors(mas State, sget func(Partition) (bitfield.BitField, error)) (bitfield.BitField, error) {
var parts []bitfield.BitField
@@ -33,7 +31,7 @@ func AllPartSectors(mas State, sget func(Partition) (bitfield.BitField, error))
// SealProofTypeFromSectorSize returns preferred seal proof type for creating
// new miner actors and new sectors
func SealProofTypeFromSectorSize(ssize abi.SectorSize, nv network.Version, synthetic bool) (abi.RegisteredSealProof, error) {
func SealProofTypeFromSectorSize(ssize abi.SectorSize, nv network.Version) (abi.RegisteredSealProof, error) {
switch {
case nv < network.Version7:
switch ssize {
@@ -51,49 +49,25 @@ func SealProofTypeFromSectorSize(ssize abi.SectorSize, nv network.Version, synth
return 0, xerrors.Errorf("unsupported sector size for miner: %v", ssize)
}
case nv >= network.Version7:
var v abi.RegisteredSealProof
switch ssize {
case 2 << 10:
v = abi.RegisteredSealProof_StackedDrg2KiBV1_1
return abi.RegisteredSealProof_StackedDrg2KiBV1_1, nil
case 8 << 20:
v = abi.RegisteredSealProof_StackedDrg8MiBV1_1
return abi.RegisteredSealProof_StackedDrg8MiBV1_1, nil
case 512 << 20:
v = abi.RegisteredSealProof_StackedDrg512MiBV1_1
return abi.RegisteredSealProof_StackedDrg512MiBV1_1, nil
case 32 << 30:
v = abi.RegisteredSealProof_StackedDrg32GiBV1_1
return abi.RegisteredSealProof_StackedDrg32GiBV1_1, nil
case 64 << 30:
v = abi.RegisteredSealProof_StackedDrg64GiBV1_1
return abi.RegisteredSealProof_StackedDrg64GiBV1_1, nil
default:
return 0, xerrors.Errorf("unsupported sector size for miner: %v", ssize)
}
if nv >= MinSyntheticPoRepVersion && synthetic {
return toSynthetic(v)
} else {
return v, nil
}
}
return 0, xerrors.Errorf("unsupported network version")
}
func toSynthetic(in abi.RegisteredSealProof) (abi.RegisteredSealProof, error) {
switch in {
case abi.RegisteredSealProof_StackedDrg2KiBV1_1:
return abi.RegisteredSealProof_StackedDrg2KiBV1_1_Feat_SyntheticPoRep, nil
case abi.RegisteredSealProof_StackedDrg8MiBV1_1:
return abi.RegisteredSealProof_StackedDrg8MiBV1_1_Feat_SyntheticPoRep, nil
case abi.RegisteredSealProof_StackedDrg512MiBV1_1:
return abi.RegisteredSealProof_StackedDrg512MiBV1_1_Feat_SyntheticPoRep, nil
case abi.RegisteredSealProof_StackedDrg32GiBV1_1:
return abi.RegisteredSealProof_StackedDrg32GiBV1_1_Feat_SyntheticPoRep, nil
case abi.RegisteredSealProof_StackedDrg64GiBV1_1:
return abi.RegisteredSealProof_StackedDrg64GiBV1_1_Feat_SyntheticPoRep, nil
default:
return 0, xerrors.Errorf("unsupported conversion to synthetic: %v", in)
}
}
// WindowPoStProofTypeFromSectorSize returns preferred post proof type for creating
// new miner actors and new sectors
func WindowPoStProofTypeFromSectorSize(ssize abi.SectorSize, nv network.Version) (abi.RegisteredPoStProof, error) {
@@ -97,6 +97,4 @@ func AllCodes() []cid.Cid {
type Allocation = verifregtypes.Allocation
type AllocationId = verifregtypes.AllocationId
type Claim = verifregtypes.Claim
type ClaimId = verifregtypes.ClaimId
const NoAllocationID = verifregtypes.NoAllocationID
type ClaimId = verifregtypes.ClaimId
-2
View File
@@ -168,5 +168,3 @@ type Allocation = verifregtypes.Allocation
type AllocationId = verifregtypes.AllocationId
type Claim = verifregtypes.Claim
type ClaimId = verifregtypes.ClaimId
const NoAllocationID = verifregtypes.NoAllocationID
+3 -56
View File
@@ -560,53 +560,8 @@ func GetWinningPoStSectorSetLookback(nwVer network.Version) abi.ChainEpoch {
return ChainFinality
}
func GetMaxSectorExpirationExtension(nv network.Version) (abi.ChainEpoch, error) {
v, err := actorstypes.VersionForNetwork(nv)
if err != nil {
return 0, xerrors.Errorf("failed to get actors version: %w", err)
}
switch v {
case actorstypes.Version0:
return miner0.MaxSectorExpirationExtension, nil
case actorstypes.Version2:
return miner2.MaxSectorExpirationExtension, nil
case actorstypes.Version3:
return miner3.MaxSectorExpirationExtension, nil
case actorstypes.Version4:
return miner4.MaxSectorExpirationExtension, nil
case actorstypes.Version5:
return miner5.MaxSectorExpirationExtension, nil
case actorstypes.Version6:
return miner6.MaxSectorExpirationExtension, nil
case actorstypes.Version7:
return miner7.MaxSectorExpirationExtension, nil
case actorstypes.Version8:
return miner8.MaxSectorExpirationExtension, nil
case actorstypes.Version9:
return miner9.MaxSectorExpirationExtension, nil
case actorstypes.Version10:
return miner10.MaxSectorExpirationExtension, nil
case actorstypes.Version11:
return miner11.MaxSectorExpirationExtension, nil
case actorstypes.Version12:
return miner12.MaxSectorExpirationExtension, nil
default:
return 0, xerrors.Errorf("unsupported network version")
}
func GetMaxSectorExpirationExtension() abi.ChainEpoch {
return miner12.MaxSectorExpirationExtension
}
func GetMinSectorExpiration() abi.ChainEpoch {
@@ -622,8 +577,7 @@ func GetMaxPoStPartitions(nv network.Version, p abi.RegisteredPoStProof) (int, e
if err != nil {
return 0, err
}
return min(miner12.PoStedPartitionsMax, int(uint64(maxSectors)/sectorsPerPart)), nil
return int(uint64(maxSectors) / sectorsPerPart), nil
}
func GetDefaultAggregationProof() abi.RegisteredAggregationProof {
@@ -866,10 +820,3 @@ func AggregatePreCommitNetworkFee(nwVer network.Version, aggregateSize int, base
return big.Zero(), xerrors.Errorf("unsupported network version")
}
}
func min(a, b int) int {
if a < b {
return a
}
return b
}
+3 -23
View File
@@ -223,20 +223,8 @@ func GetWinningPoStSectorSetLookback(nwVer network.Version) abi.ChainEpoch {
return ChainFinality
}
func GetMaxSectorExpirationExtension(nv network.Version) (abi.ChainEpoch, error) {
v, err := actorstypes.VersionForNetwork(nv)
if err != nil {
return 0, xerrors.Errorf("failed to get actors version: %w", err)
}
switch v {
{{range .versions}}
case actorstypes.Version{{.}}:
return miner{{.}}.MaxSectorExpirationExtension, nil
{{end}}
default:
return 0, xerrors.Errorf("unsupported network version")
}
func GetMaxSectorExpirationExtension() abi.ChainEpoch {
return miner{{.latestVersion}}.MaxSectorExpirationExtension
}
func GetMinSectorExpiration() abi.ChainEpoch {
@@ -252,8 +240,7 @@ func GetMaxPoStPartitions(nv network.Version, p abi.RegisteredPoStProof) (int, e
if err != nil {
return 0, err
}
return min(miner{{.latestVersion}}.PoStedPartitionsMax, int(uint64(maxSectors) / sectorsPerPart)), nil
return int(uint64(maxSectors) / sectorsPerPart), nil
}
func GetDefaultAggregationProof() abi.RegisteredAggregationProof {
@@ -342,10 +329,3 @@ func AggregatePreCommitNetworkFee(nwVer network.Version, aggregateSize int, base
return big.Zero(), xerrors.Errorf("unsupported network version")
}
}
func min(a, b int) int {
if a < b {
return a
}
return b
}
+11
View File
@@ -7,6 +7,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/network"
builtin0 "github.com/filecoin-project/specs-actors/actors/builtin"
miner0 "github.com/filecoin-project/specs-actors/actors/builtin/miner"
paych0 "github.com/filecoin-project/specs-actors/actors/builtin/paych"
@@ -73,3 +74,13 @@ func TestPartitionSizes(t *testing.T) {
require.Equal(t, sizeOld, sizeNew)
}
}
func TestPoStSize(t *testing.T) {
//stm: @BLOCKCHAIN_POLICY_GET_MAX_POST_PARTITIONS_001
v12PoStSize, err := GetMaxPoStPartitions(network.Version12, abi.RegisteredPoStProof_StackedDrgWindow64GiBV1)
require.Equal(t, 4, v12PoStSize)
require.NoError(t, err)
v13PoStSize, err := GetMaxPoStPartitions(network.Version13, abi.RegisteredPoStProof_StackedDrgWindow64GiBV1)
require.NoError(t, err)
require.Equal(t, 10, v13PoStSize)
}
+14 -1
View File
@@ -387,8 +387,21 @@ func (m *EventFilterManager) Install(ctx context.Context, minHeight, maxHeight a
}
if m.EventIndex != nil && minHeight != -1 && minHeight < currentHeight {
// hacky fix to fix issue with non-canonical log results being returned
// only works when the filter has the same start and stop height
if minHeight == maxHeight {
canonicalTipSet, err := m.ChainStore.GetTipsetByHeight(ctx, minHeight, nil, false)
if err != nil {
return nil, err
}
canonicalTipSetCID, err := canonicalTipSet.Key().Cid()
if err != nil {
return nil, err
}
f.tipsetCid = canonicalTipSetCID
}
// Filter needs historic events
if err := m.EventIndex.PrefillFilter(ctx, f, true); err != nil {
if err := m.EventIndex.PrefillFilter(ctx, f); err != nil {
return nil, err
}
}
+1 -6
View File
@@ -481,7 +481,7 @@ func (ei *EventIndex) CollectEvents(ctx context.Context, te *TipSetEvents, rever
}
// PrefillFilter fills a filter's collection of events from the historic index
func (ei *EventIndex) PrefillFilter(ctx context.Context, f *EventFilter, excludeReverted bool) error {
func (ei *EventIndex) PrefillFilter(ctx context.Context, f *EventFilter) error {
clauses := []string{}
values := []any{}
joins := []string{}
@@ -500,11 +500,6 @@ func (ei *EventIndex) PrefillFilter(ctx context.Context, f *EventFilter, exclude
}
}
if excludeReverted {
clauses = append(clauses, "event.reverted=?")
values = append(values, false)
}
if len(f.addresses) > 0 {
subclauses := []string{}
for _, addr := range f.addresses {
+1 -617
View File
@@ -272,7 +272,7 @@ func TestEventIndexPrefillFilter(t *testing.T) {
for _, tc := range testCases {
tc := tc // appease lint
t.Run(tc.name, func(t *testing.T) {
if err := ei.PrefillFilter(context.Background(), tc.filter, false); err != nil {
if err := ei.PrefillFilter(context.Background(), tc.filter); err != nil {
require.NoError(t, err, "prefill filter events")
}
@@ -281,619 +281,3 @@ func TestEventIndexPrefillFilter(t *testing.T) {
})
}
}
func TestEventIndexPrefillFilterExcludeReverted(t *testing.T) {
rng := pseudo.New(pseudo.NewSource(299792458))
a1 := randomF4Addr(t, rng)
a2 := randomF4Addr(t, rng)
a3 := randomF4Addr(t, rng)
a1ID := abi.ActorID(1)
a2ID := abi.ActorID(2)
addrMap := addressMap{}
addrMap.add(a1ID, a1)
addrMap.add(a2ID, a2)
ev1 := fakeEvent(
a1ID,
[]kv{
{k: "type", v: []byte("approval")},
{k: "signer", v: []byte("addr1")},
},
[]kv{
{k: "amount", v: []byte("2988181")},
},
)
ev2 := fakeEvent(
a2ID,
[]kv{
{k: "type", v: []byte("approval")},
{k: "signer", v: []byte("addr2")},
},
[]kv{
{k: "amount", v: []byte("2988182")},
},
)
st := newStore()
events := []*types.Event{ev1}
revertedEvents := []*types.Event{ev2}
em := executedMessage{
msg: fakeMessage(randomF4Addr(t, rng), randomF4Addr(t, rng)),
rct: fakeReceipt(t, rng, st, events),
evs: events,
}
revertedEm := executedMessage{
msg: fakeMessage(randomF4Addr(t, rng), randomF4Addr(t, rng)),
rct: fakeReceipt(t, rng, st, revertedEvents),
evs: revertedEvents,
}
events14000 := buildTipSetEvents(t, rng, 14000, em)
revertedEvents14000 := buildTipSetEvents(t, rng, 14000, revertedEm)
cid14000, err := events14000.msgTs.Key().Cid()
require.NoError(t, err, "tipset cid")
reveredCID14000, err := revertedEvents14000.msgTs.Key().Cid()
require.NoError(t, err, "tipset cid")
noCollectedEvents := []*CollectedEvent{}
oneCollectedEvent := []*CollectedEvent{
{
Entries: ev1.Entries,
EmitterAddr: a1,
EventIdx: 0,
Reverted: false,
Height: 14000,
TipSetKey: events14000.msgTs.Key(),
MsgIdx: 0,
MsgCid: em.msg.Cid(),
},
}
twoCollectedEvent := []*CollectedEvent{
{
Entries: ev1.Entries,
EmitterAddr: a1,
EventIdx: 0,
Reverted: false,
Height: 14000,
TipSetKey: events14000.msgTs.Key(),
MsgIdx: 0,
MsgCid: em.msg.Cid(),
},
{
Entries: ev2.Entries,
EmitterAddr: a2,
EventIdx: 0,
Reverted: true,
Height: 14000,
TipSetKey: revertedEvents14000.msgTs.Key(),
MsgIdx: 0,
MsgCid: revertedEm.msg.Cid(),
},
}
oneCollectedRevertedEvent := []*CollectedEvent{
{
Entries: ev2.Entries,
EmitterAddr: a2,
EventIdx: 0,
Reverted: true,
Height: 14000,
TipSetKey: revertedEvents14000.msgTs.Key(),
MsgIdx: 0,
MsgCid: revertedEm.msg.Cid(),
},
}
workDir, err := os.MkdirTemp("", "lotusevents")
require.NoError(t, err, "create temporary work directory")
defer func() {
_ = os.RemoveAll(workDir)
}()
t.Logf("using work dir %q", workDir)
dbPath := filepath.Join(workDir, "actorevents.db")
ei, err := NewEventIndex(context.Background(), dbPath, nil)
require.NoError(t, err, "create event index")
if err := ei.CollectEvents(context.Background(), revertedEvents14000, false, addrMap.ResolveAddress); err != nil {
require.NoError(t, err, "collect reverted events")
}
if err := ei.CollectEvents(context.Background(), revertedEvents14000, true, addrMap.ResolveAddress); err != nil {
require.NoError(t, err, "revert reverted events")
}
if err := ei.CollectEvents(context.Background(), events14000, false, addrMap.ResolveAddress); err != nil {
require.NoError(t, err, "collect events")
}
inclusiveTestCases := []struct {
name string
filter *EventFilter
te *TipSetEvents
want []*CollectedEvent
}{
{
name: "nomatch tipset min height",
filter: &EventFilter{
minHeight: 14001,
maxHeight: -1,
},
te: events14000,
want: noCollectedEvents,
},
{
name: "nomatch tipset max height",
filter: &EventFilter{
minHeight: -1,
maxHeight: 13999,
},
te: events14000,
want: noCollectedEvents,
},
{
name: "match tipset min height",
filter: &EventFilter{
minHeight: 14000,
maxHeight: -1,
},
te: events14000,
want: twoCollectedEvent,
},
{
name: "match tipset cid",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
tipsetCid: cid14000,
},
te: events14000,
want: oneCollectedEvent,
},
{
name: "match tipset cid",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
tipsetCid: reveredCID14000,
},
te: revertedEvents14000,
want: oneCollectedRevertedEvent,
},
{
name: "nomatch address",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
addresses: []address.Address{a3},
},
te: events14000,
want: noCollectedEvents,
},
{
name: "match address 2",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
addresses: []address.Address{a2},
},
te: revertedEvents14000,
want: oneCollectedRevertedEvent,
},
{
name: "match address 1",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
addresses: []address.Address{a1},
},
te: events14000,
want: oneCollectedEvent,
},
{
name: "match one entry",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
keys: map[string][][]byte{
"type": {
[]byte("approval"),
},
},
},
te: events14000,
want: twoCollectedEvent,
},
{
name: "match one entry with alternate values",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
keys: map[string][][]byte{
"type": {
[]byte("cancel"),
[]byte("propose"),
[]byte("approval"),
},
},
},
te: events14000,
want: twoCollectedEvent,
},
{
name: "nomatch one entry by missing value",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
keys: map[string][][]byte{
"type": {
[]byte("cancel"),
[]byte("propose"),
},
},
},
te: events14000,
want: noCollectedEvents,
},
{
name: "nomatch one entry by missing key",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
keys: map[string][][]byte{
"method": {
[]byte("approval"),
},
},
},
te: events14000,
want: noCollectedEvents,
},
{
name: "match one entry with multiple keys",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
keys: map[string][][]byte{
"type": {
[]byte("approval"),
},
"signer": {
[]byte("addr1"),
},
},
},
te: events14000,
want: oneCollectedEvent,
},
{
name: "match one entry with multiple keys",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
keys: map[string][][]byte{
"type": {
[]byte("approval"),
},
"signer": {
[]byte("addr2"),
},
},
},
te: revertedEvents14000,
want: oneCollectedRevertedEvent,
},
{
name: "nomatch one entry with one mismatching key",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
keys: map[string][][]byte{
"type": {
[]byte("approval"),
},
"approver": {
[]byte("addr1"),
},
},
},
te: events14000,
want: noCollectedEvents,
},
{
name: "nomatch one entry with one mismatching value",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
keys: map[string][][]byte{
"type": {
[]byte("approval"),
},
"signer": {
[]byte("addr3"),
},
},
},
te: events14000,
want: noCollectedEvents,
},
{
name: "nomatch one entry with one unindexed key",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
keys: map[string][][]byte{
"amount": {
[]byte("2988181"),
},
},
},
te: events14000,
want: noCollectedEvents,
},
{
name: "nomatch one entry with one unindexed key",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
keys: map[string][][]byte{
"amount": {
[]byte("2988182"),
},
},
},
te: events14000,
want: noCollectedEvents,
},
}
exclusiveTestCases := []struct {
name string
filter *EventFilter
te *TipSetEvents
want []*CollectedEvent
}{
{
name: "nomatch tipset min height",
filter: &EventFilter{
minHeight: 14001,
maxHeight: -1,
},
te: events14000,
want: noCollectedEvents,
},
{
name: "nomatch tipset max height",
filter: &EventFilter{
minHeight: -1,
maxHeight: 13999,
},
te: events14000,
want: noCollectedEvents,
},
{
name: "match tipset min height",
filter: &EventFilter{
minHeight: 14000,
maxHeight: -1,
},
te: events14000,
want: oneCollectedEvent,
},
{
name: "match tipset cid",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
tipsetCid: cid14000,
},
te: events14000,
want: oneCollectedEvent,
},
{
name: "match tipset cid but reverted",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
tipsetCid: reveredCID14000,
},
te: revertedEvents14000,
want: noCollectedEvents,
},
{
name: "nomatch address",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
addresses: []address.Address{a3},
},
te: events14000,
want: noCollectedEvents,
},
{
name: "nomatch address 2 but reverted",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
addresses: []address.Address{a2},
},
te: revertedEvents14000,
want: noCollectedEvents,
},
{
name: "match address",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
addresses: []address.Address{a1},
},
te: events14000,
want: oneCollectedEvent,
},
{
name: "match one entry",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
keys: map[string][][]byte{
"type": {
[]byte("approval"),
},
},
},
te: events14000,
want: oneCollectedEvent,
},
{
name: "match one entry with alternate values",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
keys: map[string][][]byte{
"type": {
[]byte("cancel"),
[]byte("propose"),
[]byte("approval"),
},
},
},
te: events14000,
want: oneCollectedEvent,
},
{
name: "nomatch one entry by missing value",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
keys: map[string][][]byte{
"type": {
[]byte("cancel"),
[]byte("propose"),
},
},
},
te: events14000,
want: noCollectedEvents,
},
{
name: "nomatch one entry by missing key",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
keys: map[string][][]byte{
"method": {
[]byte("approval"),
},
},
},
te: events14000,
want: noCollectedEvents,
},
{
name: "match one entry with multiple keys",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
keys: map[string][][]byte{
"type": {
[]byte("approval"),
},
"signer": {
[]byte("addr1"),
},
},
},
te: events14000,
want: oneCollectedEvent,
},
{
name: "nomatch one entry with one mismatching key",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
keys: map[string][][]byte{
"type": {
[]byte("approval"),
},
"approver": {
[]byte("addr1"),
},
},
},
te: events14000,
want: noCollectedEvents,
},
{
name: "nomatch one entry with matching reverted value",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
keys: map[string][][]byte{
"type": {
[]byte("approval"),
},
"signer": {
[]byte("addr2"),
},
},
},
te: events14000,
want: noCollectedEvents,
},
{
name: "nomatch one entry with one mismatching value",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
keys: map[string][][]byte{
"type": {
[]byte("approval"),
},
"signer": {
[]byte("addr3"),
},
},
},
te: events14000,
want: noCollectedEvents,
},
{
name: "nomatch one entry with one unindexed key",
filter: &EventFilter{
minHeight: -1,
maxHeight: -1,
keys: map[string][][]byte{
"amount": {
[]byte("2988181"),
},
},
},
te: events14000,
want: noCollectedEvents,
},
}
for _, tc := range inclusiveTestCases {
tc := tc // appease lint
t.Run(tc.name, func(t *testing.T) {
if err := ei.PrefillFilter(context.Background(), tc.filter, false); err != nil {
require.NoError(t, err, "prefill filter events")
}
coll := tc.filter.TakeCollectedEvents(context.Background())
require.ElementsMatch(t, coll, tc.want, tc.name)
})
}
for _, tc := range exclusiveTestCases {
tc := tc // appease lint
t.Run(tc.name, func(t *testing.T) {
if err := ei.PrefillFilter(context.Background(), tc.filter, true); err != nil {
require.NoError(t, err, "prefill filter events")
}
coll := tc.filter.TakeCollectedEvents(context.Background())
require.ElementsMatch(t, coll, tc.want, tc.name)
})
}
}
+47 -168
View File
@@ -43,11 +43,9 @@ func (t *Request) MarshalCBOR(w io.Writer) error {
return err
}
for _, v := range t.Head {
if err := cbg.WriteCid(cw, v); err != nil {
return xerrors.Errorf("failed to write cid field v: %w", err)
if err := cbg.WriteCid(w, v); err != nil {
return xerrors.Errorf("failed writing cid field t.Head: %w", err)
}
}
// t.Length (uint64) (uint64)
@@ -108,25 +106,12 @@ func (t *Request) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
c, err := cbg.ReadCid(cr)
if err != nil {
return xerrors.Errorf("failed to read cid field t.Head[i]: %w", err)
}
t.Head[i] = c
}
c, err := cbg.ReadCid(cr)
if err != nil {
return xerrors.Errorf("reading cid field t.Head failed: %w", err)
}
t.Head[i] = c
}
// t.Length (uint64) (uint64)
@@ -188,7 +173,7 @@ func (t *Response) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.ErrorMessage))); err != nil {
return err
}
if _, err := cw.WriteString(string(t.ErrorMessage)); err != nil {
if _, err := io.WriteString(w, string(t.ErrorMessage)); err != nil {
return err
}
@@ -275,32 +260,13 @@ func (t *Response) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
b, err := cr.ReadByte()
if err != nil {
return err
}
if b != cbg.CborNull[0] {
if err := cr.UnreadByte(); err != nil {
return err
}
t.Chain[i] = new(BSTipSet)
if err := t.Chain[i].UnmarshalCBOR(cr); err != nil {
return xerrors.Errorf("unmarshaling t.Chain[i] pointer: %w", err)
}
}
}
var v BSTipSet
if err := v.UnmarshalCBOR(cr); err != nil {
return err
}
t.Chain[i] = &v
}
return nil
@@ -351,11 +317,9 @@ func (t *CompactedMessages) MarshalCBOR(w io.Writer) error {
return err
}
for _, v := range v {
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(v)); err != nil {
if err := cw.CborWriteHeader(cbg.MajUnsignedInt, uint64(v)); err != nil {
return err
}
}
}
@@ -390,11 +354,9 @@ func (t *CompactedMessages) MarshalCBOR(w io.Writer) error {
return err
}
for _, v := range v {
if err := cw.WriteMajorTypeHeader(cbg.MajUnsignedInt, uint64(v)); err != nil {
if err := cw.CborWriteHeader(cbg.MajUnsignedInt, uint64(v)); err != nil {
return err
}
}
}
return nil
@@ -443,32 +405,13 @@ func (t *CompactedMessages) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
b, err := cr.ReadByte()
if err != nil {
return err
}
if b != cbg.CborNull[0] {
if err := cr.UnreadByte(); err != nil {
return err
}
t.Bls[i] = new(types.Message)
if err := t.Bls[i].UnmarshalCBOR(cr); err != nil {
return xerrors.Errorf("unmarshaling t.Bls[i] pointer: %w", err)
}
}
}
var v types.Message
if err := v.UnmarshalCBOR(cr); err != nil {
return err
}
t.Bls[i] = &v
}
// t.BlsIncludes ([][]uint64) (slice)
@@ -495,9 +438,6 @@ func (t *CompactedMessages) UnmarshalCBOR(r io.Reader) (err error) {
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
maj, extra, err = cr.ReadHeader()
if err != nil {
@@ -517,27 +457,17 @@ func (t *CompactedMessages) UnmarshalCBOR(r io.Reader) (err error) {
}
for j := 0; j < int(extra); j++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
maj, extra, err = cr.ReadHeader()
if err != nil {
return err
}
if maj != cbg.MajUnsignedInt {
return fmt.Errorf("wrong type for uint64 field")
}
t.BlsIncludes[i][j] = uint64(extra)
}
maj, val, err := cr.ReadHeader()
if err != nil {
return xerrors.Errorf("failed to read uint64 for t.BlsIncludes[i] slice: %w", err)
}
if maj != cbg.MajUnsignedInt {
return xerrors.Errorf("value read for array t.BlsIncludes[i] was not a uint, instead got %d", maj)
}
t.BlsIncludes[i][j] = uint64(val)
}
}
@@ -563,32 +493,13 @@ func (t *CompactedMessages) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
b, err := cr.ReadByte()
if err != nil {
return err
}
if b != cbg.CborNull[0] {
if err := cr.UnreadByte(); err != nil {
return err
}
t.Secpk[i] = new(types.SignedMessage)
if err := t.Secpk[i].UnmarshalCBOR(cr); err != nil {
return xerrors.Errorf("unmarshaling t.Secpk[i] pointer: %w", err)
}
}
}
var v types.SignedMessage
if err := v.UnmarshalCBOR(cr); err != nil {
return err
}
t.Secpk[i] = &v
}
// t.SecpkIncludes ([][]uint64) (slice)
@@ -615,9 +526,6 @@ func (t *CompactedMessages) UnmarshalCBOR(r io.Reader) (err error) {
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
maj, extra, err = cr.ReadHeader()
if err != nil {
@@ -637,27 +545,17 @@ func (t *CompactedMessages) UnmarshalCBOR(r io.Reader) (err error) {
}
for j := 0; j < int(extra); j++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
maj, extra, err = cr.ReadHeader()
if err != nil {
return err
}
if maj != cbg.MajUnsignedInt {
return fmt.Errorf("wrong type for uint64 field")
}
t.SecpkIncludes[i][j] = uint64(extra)
}
maj, val, err := cr.ReadHeader()
if err != nil {
return xerrors.Errorf("failed to read uint64 for t.SecpkIncludes[i] slice: %w", err)
}
if maj != cbg.MajUnsignedInt {
return xerrors.Errorf("value read for array t.SecpkIncludes[i] was not a uint, instead got %d", maj)
}
t.SecpkIncludes[i][j] = uint64(val)
}
}
@@ -744,32 +642,13 @@ func (t *BSTipSet) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
b, err := cr.ReadByte()
if err != nil {
return err
}
if b != cbg.CborNull[0] {
if err := cr.UnreadByte(); err != nil {
return err
}
t.Blocks[i] = new(types.BlockHeader)
if err := t.Blocks[i].UnmarshalCBOR(cr); err != nil {
return xerrors.Errorf("unmarshaling t.Blocks[i] pointer: %w", err)
}
}
}
var v types.BlockHeader
if err := v.UnmarshalCBOR(cr); err != nil {
return err
}
t.Blocks[i] = &v
}
// t.Messages (exchange.CompactedMessages) (struct)
+1 -1
View File
@@ -578,7 +578,7 @@ func MakeGenesisBlock(ctx context.Context, j journal.Journal, bs bstore.Blocksto
}
// setup Storage Miners
stateroot, err = SetupStorageMiners(ctx, cs, sys, stateroot, template.Miners, template.NetworkVersion, false)
stateroot, err = SetupStorageMiners(ctx, cs, sys, stateroot, template.Miners, template.NetworkVersion)
if err != nil {
return nil, xerrors.Errorf("setup miners failed: %w", err)
}
+3 -7
View File
@@ -79,7 +79,7 @@ func mkFakedSigSyscalls(base vm.SyscallBuilder) vm.SyscallBuilder {
}
// Note: Much of this is brittle, if the methodNum / param / return changes, it will break things
func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.SyscallBuilder, sroot cid.Cid, miners []genesis.Miner, nv network.Version, synthetic bool) (cid.Cid, error) {
func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.SyscallBuilder, sroot cid.Cid, miners []genesis.Miner, nv network.Version) (cid.Cid, error) {
cst := cbor.NewCborStore(cs.StateBlockstore())
av, err := actorstypes.VersionForNetwork(nv)
@@ -125,18 +125,14 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal
sectorWeight []abi.StoragePower
}, len(miners))
maxLifetime, err := policy.GetMaxSectorExpirationExtension(nv)
if err != nil {
return cid.Undef, xerrors.Errorf("failed to get max extension: %w", err)
}
maxPeriods := maxLifetime / minertypes.WPoStProvingPeriod
maxPeriods := policy.GetMaxSectorExpirationExtension() / minertypes.WPoStProvingPeriod
rawPow, qaPow := big.NewInt(0), big.NewInt(0)
for i, m := range miners {
// Create miner through power actor
i := i
m := m
spt, err := miner.SealProofTypeFromSectorSize(m.SectorSize, nv, synthetic)
spt, err := miner.SealProofTypeFromSectorSize(m.SectorSize, nv)
if err != nil {
return cid.Undef, err
}
+7 -6
View File
@@ -210,10 +210,8 @@ func ComputeRBF(curPrem abi.TokenAmount, replaceByFeeRatio types.Percent) abi.To
func CapGasFee(mff dtypes.DefaultMaxFeeFunc, msg *types.Message, sendSpec *api.MessageSendSpec) {
var maxFee abi.TokenAmount
var maximizeFeeCap bool
if sendSpec != nil {
maxFee = sendSpec.MaxFee
maximizeFeeCap = sendSpec.MaximizeFeeCap
}
if maxFee.Int == nil || maxFee.Equals(big.Zero()) {
mf, err := mff()
@@ -224,12 +222,15 @@ func CapGasFee(mff dtypes.DefaultMaxFeeFunc, msg *types.Message, sendSpec *api.M
maxFee = mf
}
gaslimit := types.NewInt(uint64(msg.GasLimit))
totalFee := types.BigMul(msg.GasFeeCap, gaslimit)
if maximizeFeeCap || totalFee.GreaterThan(maxFee) {
msg.GasFeeCap = big.Div(maxFee, gaslimit)
gl := types.NewInt(uint64(msg.GasLimit))
totalFee := types.BigMul(msg.GasFeeCap, gl)
if totalFee.LessThanEqual(maxFee) {
msg.GasPremium = big.Min(msg.GasFeeCap, msg.GasPremium) // cap premium at FeeCap
return
}
msg.GasFeeCap = big.Div(maxFee, gl)
msg.GasPremium = big.Min(msg.GasFeeCap, msg.GasPremium) // cap premium at FeeCap
}
+7 -2
View File
@@ -212,8 +212,13 @@ func (cs *ChainStore) MessagesForTipset(ctx context.Context, ts *types.TipSet) (
var out []types.ChainMsg
for _, bm := range bmsgs {
out = append(out, bm.BlsMessages...)
out = append(out, bm.SecpkMessages...)
for _, blsm := range bm.BlsMessages {
out = append(out, blsm)
}
for _, secm := range bm.SecpkMessages {
out = append(out, secm)
}
}
return out, nil
+3 -1
View File
@@ -656,7 +656,9 @@ func (cs *ChainStore) WalkSnapshot(ctx context.Context, ts *types.TipSet, inclRe
}
if b.Height > 0 {
blocksToWalk = append(blocksToWalk, b.Parents...)
for _, p := range b.Parents {
blocksToWalk = append(blocksToWalk, p)
}
} else {
// include the genesis block
cids = append(cids, b.Parents...)
+56 -190
View File
@@ -91,11 +91,9 @@ func (t *BlockHeader) MarshalCBOR(w io.Writer) error {
return err
}
for _, v := range t.Parents {
if err := cbg.WriteCid(cw, v); err != nil {
return xerrors.Errorf("failed to write cid field v: %w", err)
if err := cbg.WriteCid(w, v); err != nil {
return xerrors.Errorf("failed writing cid field t.Parents: %w", err)
}
}
// t.ParentWeight (big.Int) (struct)
@@ -251,22 +249,13 @@ func (t *BlockHeader) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
if err := t.BeaconEntries[i].UnmarshalCBOR(cr); err != nil {
return xerrors.Errorf("unmarshaling t.BeaconEntries[i]: %w", err)
}
}
var v BeaconEntry
if err := v.UnmarshalCBOR(cr); err != nil {
return err
}
t.BeaconEntries[i] = v
}
// t.WinPoStProof ([]proof.PoStProof) (slice)
@@ -289,22 +278,13 @@ func (t *BlockHeader) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
if err := t.WinPoStProof[i].UnmarshalCBOR(cr); err != nil {
return xerrors.Errorf("unmarshaling t.WinPoStProof[i]: %w", err)
}
}
var v proof.PoStProof
if err := v.UnmarshalCBOR(cr); err != nil {
return err
}
t.WinPoStProof[i] = v
}
// t.Parents ([]cid.Cid) (slice)
@@ -327,25 +307,12 @@ func (t *BlockHeader) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
c, err := cbg.ReadCid(cr)
if err != nil {
return xerrors.Errorf("failed to read cid field t.Parents[i]: %w", err)
}
t.Parents[i] = c
}
c, err := cbg.ReadCid(cr)
if err != nil {
return xerrors.Errorf("reading cid field t.Parents failed: %w", err)
}
t.Parents[i] = c
}
// t.ParentWeight (big.Int) (struct)
@@ -1351,11 +1318,9 @@ func (t *BlockMsg) MarshalCBOR(w io.Writer) error {
return err
}
for _, v := range t.BlsMessages {
if err := cbg.WriteCid(cw, v); err != nil {
return xerrors.Errorf("failed to write cid field v: %w", err)
if err := cbg.WriteCid(w, v); err != nil {
return xerrors.Errorf("failed writing cid field t.BlsMessages: %w", err)
}
}
// t.SecpkMessages ([]cid.Cid) (slice)
@@ -1367,11 +1332,9 @@ func (t *BlockMsg) MarshalCBOR(w io.Writer) error {
return err
}
for _, v := range t.SecpkMessages {
if err := cbg.WriteCid(cw, v); err != nil {
return xerrors.Errorf("failed to write cid field v: %w", err)
if err := cbg.WriteCid(w, v); err != nil {
return xerrors.Errorf("failed writing cid field t.SecpkMessages: %w", err)
}
}
return nil
}
@@ -1438,25 +1401,12 @@ func (t *BlockMsg) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
c, err := cbg.ReadCid(cr)
if err != nil {
return xerrors.Errorf("failed to read cid field t.BlsMessages[i]: %w", err)
}
t.BlsMessages[i] = c
}
c, err := cbg.ReadCid(cr)
if err != nil {
return xerrors.Errorf("reading cid field t.BlsMessages failed: %w", err)
}
t.BlsMessages[i] = c
}
// t.SecpkMessages ([]cid.Cid) (slice)
@@ -1479,25 +1429,12 @@ func (t *BlockMsg) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
c, err := cbg.ReadCid(cr)
if err != nil {
return xerrors.Errorf("failed to read cid field t.SecpkMessages[i]: %w", err)
}
t.SecpkMessages[i] = c
}
c, err := cbg.ReadCid(cr)
if err != nil {
return xerrors.Errorf("reading cid field t.SecpkMessages failed: %w", err)
}
t.SecpkMessages[i] = c
}
return nil
@@ -1526,11 +1463,9 @@ func (t *ExpTipSet) MarshalCBOR(w io.Writer) error {
return err
}
for _, v := range t.Cids {
if err := cbg.WriteCid(cw, v); err != nil {
return xerrors.Errorf("failed to write cid field v: %w", err)
if err := cbg.WriteCid(w, v); err != nil {
return xerrors.Errorf("failed writing cid field t.Cids: %w", err)
}
}
// t.Blocks ([]*types.BlockHeader) (slice)
@@ -1603,25 +1538,12 @@ func (t *ExpTipSet) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
c, err := cbg.ReadCid(cr)
if err != nil {
return xerrors.Errorf("failed to read cid field t.Cids[i]: %w", err)
}
t.Cids[i] = c
}
c, err := cbg.ReadCid(cr)
if err != nil {
return xerrors.Errorf("reading cid field t.Cids failed: %w", err)
}
t.Cids[i] = c
}
// t.Blocks ([]*types.BlockHeader) (slice)
@@ -1644,32 +1566,13 @@ func (t *ExpTipSet) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
b, err := cr.ReadByte()
if err != nil {
return err
}
if b != cbg.CborNull[0] {
if err := cr.UnreadByte(); err != nil {
return err
}
t.Blocks[i] = new(BlockHeader)
if err := t.Blocks[i].UnmarshalCBOR(cr); err != nil {
return xerrors.Errorf("unmarshaling t.Blocks[i] pointer: %w", err)
}
}
}
var v BlockHeader
if err := v.UnmarshalCBOR(cr); err != nil {
return err
}
t.Blocks[i] = &v
}
// t.Height (abi.ChainEpoch) (int64)
@@ -2030,22 +1933,13 @@ func (t *Event) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
if err := t.Entries[i].UnmarshalCBOR(cr); err != nil {
return xerrors.Errorf("unmarshaling t.Entries[i]: %w", err)
}
}
var v EventEntry
if err := v.UnmarshalCBOR(cr); err != nil {
return err
}
t.Entries[i] = v
}
return nil
@@ -2078,7 +1972,7 @@ func (t *EventEntry) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Key))); err != nil {
return err
}
if _, err := cw.WriteString(string(t.Key)); err != nil {
if _, err := io.WriteString(w, string(t.Key)); err != nil {
return err
}
@@ -2209,7 +2103,7 @@ func (t *GasTrace) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Name))); err != nil {
return err
}
if _, err := cw.WriteString(string(t.Name)); err != nil {
if _, err := io.WriteString(w, string(t.Name)); err != nil {
return err
}
@@ -2862,32 +2756,13 @@ func (t *ExecutionTrace) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
b, err := cr.ReadByte()
if err != nil {
return err
}
if b != cbg.CborNull[0] {
if err := cr.UnreadByte(); err != nil {
return err
}
t.GasCharges[i] = new(GasTrace)
if err := t.GasCharges[i].UnmarshalCBOR(cr); err != nil {
return xerrors.Errorf("unmarshaling t.GasCharges[i] pointer: %w", err)
}
}
}
var v GasTrace
if err := v.UnmarshalCBOR(cr); err != nil {
return err
}
t.GasCharges[i] = &v
}
// t.Subcalls ([]types.ExecutionTrace) (slice)
@@ -2910,22 +2785,13 @@ func (t *ExecutionTrace) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
if err := t.Subcalls[i].UnmarshalCBOR(cr); err != nil {
return xerrors.Errorf("unmarshaling t.Subcalls[i]: %w", err)
}
}
var v ExecutionTrace
if err := v.UnmarshalCBOR(cr); err != nil {
return err
}
t.Subcalls[i] = v
}
return nil
+2 -23
View File
@@ -1920,29 +1920,8 @@ var StateSysActorCIDsCmd = &cli.Command{
if err != nil {
return err
}
var actorsCidTuples []struct {
actorName string
actorCid cid.Cid
}
for name, actorCid := range actorsCids {
keyVal := struct {
actorName string
actorCid cid.Cid
}{
actorName: name,
actorCid: actorCid,
}
actorsCidTuples = append(actorsCidTuples, keyVal)
}
sort.Slice(actorsCidTuples, func(i, j int) bool {
return actorsCidTuples[i].actorName < actorsCidTuples[j].actorName
})
for _, keyVal := range actorsCidTuples {
_, _ = fmt.Fprintf(tw, "%v\t%v\n", keyVal.actorName, keyVal.actorCid)
for name, cid := range actorsCids {
_, _ = fmt.Fprintf(tw, "%v\t%v\n", name, cid)
}
return tw.Flush()
},
+6 -6
View File
@@ -553,7 +553,7 @@ var sealBenchCmd = &cli.Command{
if !skipc2 {
log.Info("generating winning post candidates")
wipt, err := spt(sectorSize, false).RegisteredWinningPoStProof()
wipt, err := spt(sectorSize).RegisteredWinningPoStProof()
if err != nil {
return err
}
@@ -771,7 +771,7 @@ func runSeals(sb *ffiwrapper.Sealer, sbfs *basicfs.Provider, numSectors int, par
Miner: mid,
Number: i,
},
ProofType: spt(sectorSize, false),
ProofType: spt(sectorSize),
}
start := time.Now()
@@ -803,7 +803,7 @@ func runSeals(sb *ffiwrapper.Sealer, sbfs *basicfs.Provider, numSectors int, par
Miner: mid,
Number: i,
},
ProofType: spt(sectorSize, false),
ProofType: spt(sectorSize),
}
start := time.Now()
@@ -1014,7 +1014,7 @@ var proveCmd = &cli.Command{
Miner: abi.ActorID(mid),
Number: abi.SectorNumber(c2in.SectorNum),
},
ProofType: spt(abi.SectorSize(c2in.SectorSize), false),
ProofType: spt(abi.SectorSize(c2in.SectorSize)),
}
fmt.Printf("----\nstart proof computation\n")
@@ -1045,8 +1045,8 @@ func bps(sectorSize abi.SectorSize, sectorNum int, d time.Duration) string {
return types.SizeStr(types.BigInt{Int: bps}) + "/s"
}
func spt(ssize abi.SectorSize, synth bool) abi.RegisteredSealProof {
spt, err := miner.SealProofTypeFromSectorSize(ssize, build.TestNetworkVersion, synth)
func spt(ssize abi.SectorSize) abi.RegisteredSealProof {
spt, err := miner.SealProofTypeFromSectorSize(ssize, build.TestNetworkVersion)
if err != nil {
panic(err)
}
+12 -28
View File
@@ -186,7 +186,7 @@ var simpleAddPiece = &cli.Command{
Miner: mid,
Number: 1,
},
ProofType: spt(sectorSize, false),
ProofType: spt(sectorSize),
}
data, err := os.Open(cctx.Args().First())
@@ -223,10 +223,6 @@ var simplePreCommit1 = &cli.Command{
Usage: "pass miner address (only necessary if using existing sectorbuilder)",
Value: "t01000",
},
&cli.BoolFlag{
Name: "synthetic",
Usage: "generate synthetic PoRep proofs",
},
},
ArgsUsage: "[unsealed] [sealed] [cache] [[piece cid] [piece size]]...",
Action: func(cctx *cli.Context) error {
@@ -263,7 +259,7 @@ var simplePreCommit1 = &cli.Command{
Miner: mid,
Number: 1,
},
ProofType: spt(sectorSize, cctx.Bool("synthetic")),
ProofType: spt(sectorSize),
}
var ticket [32]byte // all zero
@@ -301,10 +297,6 @@ var simplePreCommit2 = &cli.Command{
Usage: "pass miner address (only necessary if using existing sectorbuilder)",
Value: "t01000",
},
&cli.BoolFlag{
Name: "synthetic",
Usage: "generate synthetic PoRep proofs",
},
},
ArgsUsage: "[sealed] [cache] [pc1 out]",
Action: func(cctx *cli.Context) error {
@@ -345,7 +337,7 @@ var simplePreCommit2 = &cli.Command{
Miner: mid,
Number: 1,
},
ProofType: spt(sectorSize, cctx.Bool("synthetic")),
ProofType: spt(sectorSize),
}
start := time.Now()
@@ -376,10 +368,6 @@ var simpleCommit1 = &cli.Command{
Usage: "pass miner address (only necessary if using existing sectorbuilder)",
Value: "t01000",
},
&cli.BoolFlag{
Name: "synthetic",
Usage: "generate synthetic PoRep proofs",
},
},
ArgsUsage: "[sealed] [cache] [comm D] [comm R] [c1out.json]",
Action: func(cctx *cli.Context) error {
@@ -415,7 +403,7 @@ var simpleCommit1 = &cli.Command{
Miner: mid,
Number: 1,
},
ProofType: spt(sectorSize, cctx.Bool("synthetic")),
ProofType: spt(sectorSize),
}
start := time.Now()
@@ -481,10 +469,6 @@ var simpleCommit2 = &cli.Command{
Usage: "pass miner address (only necessary if using existing sectorbuilder)",
Value: "t01000",
},
&cli.BoolFlag{
Name: "synthetic",
Usage: "generate synthetic PoRep proofs",
},
},
Action: func(c *cli.Context) error {
if c.Bool("no-gpu") {
@@ -531,7 +515,7 @@ var simpleCommit2 = &cli.Command{
Miner: abi.ActorID(mid),
Number: abi.SectorNumber(c2in.SectorNum),
},
ProofType: spt(abi.SectorSize(c2in.SectorSize), c.Bool("synthetic")),
ProofType: spt(abi.SectorSize(c2in.SectorSize)),
}
start := time.Now()
@@ -589,7 +573,7 @@ var simpleWindowPost = &cli.Command{
return xerrors.Errorf("parse commr: %w", err)
}
wpt, err := spt(sectorSize, false).RegisteredWindowPoStProof()
wpt, err := spt(sectorSize).RegisteredWindowPoStProof()
if err != nil {
return err
}
@@ -609,7 +593,7 @@ var simpleWindowPost = &cli.Command{
vp, err := ffi.GenerateSingleVanillaProof(ffi.PrivateSectorInfo{
SectorInfo: prf.SectorInfo{
SealProof: spt(sectorSize, false),
SealProof: spt(sectorSize),
SectorNumber: sn,
SealedCID: commr,
},
@@ -676,7 +660,7 @@ var simpleWinningPost = &cli.Command{
return xerrors.Errorf("parse commr: %w", err)
}
wpt, err := spt(sectorSize, false).RegisteredWinningPoStProof()
wpt, err := spt(sectorSize).RegisteredWinningPoStProof()
if err != nil {
return err
}
@@ -696,7 +680,7 @@ var simpleWinningPost = &cli.Command{
vp, err := ffi.GenerateSingleVanillaProof(ffi.PrivateSectorInfo{
SectorInfo: prf.SectorInfo{
SealProof: spt(sectorSize, false),
SealProof: spt(sectorSize),
SectorNumber: sn,
SealedCID: commr,
},
@@ -779,7 +763,7 @@ var simpleReplicaUpdate = &cli.Command{
Miner: mid,
Number: 1,
},
ProofType: spt(sectorSize, false),
ProofType: spt(sectorSize),
}
start := time.Now()
@@ -847,7 +831,7 @@ var simpleProveReplicaUpdate1 = &cli.Command{
Miner: mid,
Number: 1,
},
ProofType: spt(sectorSize, false),
ProofType: spt(sectorSize),
}
start := time.Now()
@@ -934,7 +918,7 @@ var simpleProveReplicaUpdate2 = &cli.Command{
Miner: mid,
Number: 1,
},
ProofType: spt(sectorSize, false),
ProofType: spt(sectorSize),
}
start := time.Now()
+1 -139
View File
@@ -21,7 +21,6 @@ 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"
minerV12 "github.com/filecoin-project/go-state-types/builtin/v12/miner"
"github.com/filecoin-project/go-state-types/builtin/v9/miner"
"github.com/filecoin-project/go-state-types/network"
@@ -50,7 +49,6 @@ var actorCmd = &cli.Command{
actorProposeChangeWorker,
actorConfirmChangeWorker,
actorCompactAllocatedCmd,
actorMovePartitionsCmd,
actorProposeChangeBeneficiary,
actorConfirmChangeBeneficiary,
},
@@ -1288,149 +1286,13 @@ var actorConfirmChangeBeneficiary = &cli.Command{
},
}
var actorMovePartitionsCmd = &cli.Command{
Name: "move-partitions",
Usage: "move deadline of specified partitions from one to another",
Flags: []cli.Flag{
&cli.Int64SliceFlag{
Name: "partition-indices",
Usage: "Indices of partitions to update, separated by comma",
},
&cli.Uint64Flag{
Name: "orig-deadline",
Usage: "Deadline to move partition from",
},
&cli.Uint64Flag{
Name: "dest-deadline",
Usage: "Deadline to move partition to",
},
&cli.BoolFlag{
Name: "really-do-it",
Usage: "Actually send transaction performing the action",
Value: false,
},
},
Action: func(cctx *cli.Context) error {
if !cctx.Bool("really-do-it") {
fmt.Println("Pass --really-do-it to actually execute this action")
return nil
}
if cctx.Args().Present() {
return fmt.Errorf("please use flags to provide arguments")
}
ctx := lcli.ReqContext(cctx)
minerApi, closer, err := lcli.GetStorageMinerAPI(cctx)
if err != nil {
return err
}
defer closer()
maddr, err := minerApi.ActorAddress(ctx)
if err != nil {
return err
}
fmt.Printf("Miner: %s\n", color.BlueString("%s", maddr))
fullNodeApi, acloser, err := lcli.GetFullNodeAPI(cctx)
if err != nil {
return err
}
defer acloser()
minfo, err := fullNodeApi.StateMinerInfo(ctx, maddr, types.EmptyTSK)
if err != nil {
return err
}
origDeadline := cctx.Uint64("orig-deadline")
if origDeadline > miner.WPoStPeriodDeadlines {
return fmt.Errorf("orig-deadline %d out of range", origDeadline)
}
destDeadline := cctx.Uint64("dest-deadline")
if destDeadline > miner.WPoStPeriodDeadlines {
return fmt.Errorf("dest-deadline %d out of range", destDeadline)
}
if origDeadline == destDeadline {
return fmt.Errorf("dest-desdline cannot be the same as orig-deadline")
}
partitions := cctx.Int64Slice("partition-indices")
if len(partitions) == 0 {
return fmt.Errorf("must include at least one partition to move")
}
curPartitions, err := fullNodeApi.StateMinerPartitions(ctx, maddr, origDeadline, types.EmptyTSK)
if err != nil {
return fmt.Errorf("getting partitions for deadline %d: %w", origDeadline, err)
}
if len(partitions) > len(curPartitions) {
return fmt.Errorf("partition size(%d) cannot be bigger than current partition size(%d) for deadline %d", len(partitions), len(curPartitions), origDeadline)
}
fmt.Printf("Moving %d paritions\n", len(partitions))
partitionsBf := bitfield.New()
for _, partition := range partitions {
if partition >= int64(len(curPartitions)) {
return fmt.Errorf("partition index(%d) doesn't exist", partition)
}
partitionsBf.Set(uint64(partition))
}
params := minerV12.MovePartitionsParams{
OrigDeadline: origDeadline,
DestDeadline: destDeadline,
Partitions: partitionsBf,
}
serializedParams, err := actors.SerializeParams(&params)
if err != nil {
return fmt.Errorf("serializing params: %w", err)
}
smsg, err := fullNodeApi.MpoolPushMessage(ctx, &types.Message{
From: minfo.Worker,
To: maddr,
Method: builtin.MethodsMiner.MovePartitions,
Value: big.Zero(),
Params: serializedParams,
}, nil)
if err != nil {
return fmt.Errorf("mpool push: %w", err)
}
fmt.Println("MovePartitions Message CID:", smsg.Cid())
// wait for it to get mined into a block
fmt.Println("Waiting for block confirmation...")
wait, err := fullNodeApi.StateWaitMsg(ctx, smsg.Cid(), build.MessageConfidence)
if err != nil {
return err
}
// check it executed successfully
if wait.Receipt.ExitCode.IsError() {
fmt.Println("Moving partitions failed!")
return err
}
fmt.Println("Move partition confirmed")
return nil
},
}
var actorCompactAllocatedCmd = &cli.Command{
Name: "compact-allocated",
Usage: "compact allocated sectors bitfield",
Flags: []cli.Flag{
&cli.Uint64Flag{
Name: "mask-last-offset",
Usage: "Mask sector IDs from 0 to 'highest_allocated - offset'",
Usage: "Mask sector IDs from 0 to 'higest_allocated - offset'",
},
&cli.Uint64Flag{
Name: "mask-upto-n",
+3 -2
View File
@@ -7,6 +7,7 @@ import (
cbor "github.com/ipfs/go-ipld-cbor"
"github.com/urfave/cli/v2"
minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner"
"github.com/filecoin-project/specs-actors/v7/actors/util/adt"
"github.com/filecoin-project/lotus/blockstore"
@@ -38,8 +39,8 @@ var sectorPreCommitsCmd = &cli.Command{
if err != nil {
return err
}
preCommitSector := make([]miner.SectorPreCommitOnChainInfo, 0)
err = mst.ForEachPrecommittedSector(func(info miner.SectorPreCommitOnChainInfo) error {
preCommitSector := make([]minertypes.SectorPreCommitOnChainInfo, 0)
err = mst.ForEachPrecommittedSector(func(info minertypes.SectorPreCommitOnChainInfo) error {
preCommitSector = append(preCommitSector, info)
return err
})
+18 -32
View File
@@ -24,13 +24,14 @@ 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/v9/miner"
"github.com/filecoin-project/go-state-types/network"
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/blockstore"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/adt"
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
lminer "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/actors/builtin/verifreg"
"github.com/filecoin-project/lotus/chain/actors/policy"
"github.com/filecoin-project/lotus/chain/types"
@@ -192,14 +193,14 @@ var sectorsStatusCmd = &cli.Command{
}
tbs := blockstore.NewTieredBstore(blockstore.NewAPIBlockstore(fullApi), blockstore.NewMemory())
mas, err := miner.Load(adt.WrapStore(ctx, cbor.NewCborStore(tbs)), mact)
mas, err := lminer.Load(adt.WrapStore(ctx, cbor.NewCborStore(tbs)), mact)
if err != nil {
return err
}
errFound := errors.New("found")
if err := mas.ForEachDeadline(func(dlIdx uint64, dl miner.Deadline) error {
return dl.ForEachPartition(func(partIdx uint64, part miner.Partition) error {
if err := mas.ForEachDeadline(func(dlIdx uint64, dl lminer.Deadline) error {
return dl.ForEachPartition(func(partIdx uint64, part lminer.Partition) error {
pas, err := part.AllSectors()
if err != nil {
return err
@@ -846,12 +847,7 @@ var sectorsCheckExpireCmd = &cli.Command{
for _, sector := range sectors {
MaxExpiration := sector.Activation + policy.GetSectorMaxLifetime(sector.SealProof, nv)
maxExtension, err := policy.GetMaxSectorExpirationExtension(nv)
if err != nil {
return xerrors.Errorf("failed to get max extension: %w", err)
}
MaxExtendNow := currEpoch + maxExtension
MaxExtendNow := currEpoch + policy.GetMaxSectorExpirationExtension()
if MaxExtendNow > MaxExpiration {
MaxExtendNow = MaxExpiration
@@ -1079,22 +1075,22 @@ var sectorsExtendCmd = &cli.Command{
tbs := blockstore.NewTieredBstore(blockstore.NewAPIBlockstore(fullApi), blockstore.NewMemory())
adtStore := adt.WrapStore(ctx, cbor.NewCborStore(tbs))
mas, err := miner.Load(adtStore, mact)
mas, err := lminer.Load(adtStore, mact)
if err != nil {
return err
}
activeSectorsLocation := make(map[abi.SectorNumber]*miner.SectorLocation, len(activeSet))
activeSectorsLocation := make(map[abi.SectorNumber]*lminer.SectorLocation, len(activeSet))
if err := mas.ForEachDeadline(func(dlIdx uint64, dl miner.Deadline) error {
return dl.ForEachPartition(func(partIdx uint64, part miner.Partition) error {
if err := mas.ForEachDeadline(func(dlIdx uint64, dl lminer.Deadline) error {
return dl.ForEachPartition(func(partIdx uint64, part lminer.Partition) error {
pas, err := part.ActiveSectors()
if err != nil {
return err
}
return pas.ForEach(func(i uint64) error {
activeSectorsLocation[abi.SectorNumber(i)] = &miner.SectorLocation{
activeSectorsLocation[abi.SectorNumber(i)] = &lminer.SectorLocation{
Deadline: dlIdx,
Partition: partIdx,
}
@@ -1181,7 +1177,7 @@ var sectorsExtendCmd = &cli.Command{
return diff <= abi.ChainEpoch(cctx.Int64("tolerance"))
}
extensions := map[miner.SectorLocation]map[abi.ChainEpoch][]abi.SectorNumber{}
extensions := map[lminer.SectorLocation]map[abi.ChainEpoch][]abi.SectorNumber{}
for _, si := range sis {
extension := abi.ChainEpoch(cctx.Int64("extension"))
newExp := si.Expiration + extension
@@ -1190,12 +1186,7 @@ var sectorsExtendCmd = &cli.Command{
newExp = abi.ChainEpoch(cctx.Int64("new-expiration"))
}
maxExtension, err := policy.GetMaxSectorExpirationExtension(nv)
if err != nil {
return xerrors.Errorf("failed to get max extension: %w", err)
}
maxExtendNow := currEpoch + maxExtension
maxExtendNow := currEpoch + policy.GetMaxSectorExpirationExtension()
if newExp > maxExtendNow {
newExp = maxExtendNow
}
@@ -1750,7 +1741,7 @@ var sectorsCapacityCollateralCmd = &cli.Command{
return err
}
spt, err := miner.PreferredSealProofTypeFromWindowPoStType(nv, mi.WindowPoStProofType, false)
spt, err := lminer.PreferredSealProofTypeFromWindowPoStType(nv, mi.WindowPoStProofType)
if err != nil {
return err
}
@@ -1765,12 +1756,7 @@ var sectorsCapacityCollateralCmd = &cli.Command{
return err
}
maxExtension, err := policy.GetMaxSectorExpirationExtension(nv)
if err != nil {
return xerrors.Errorf("failed to get max extension: %w", err)
}
pci.Expiration = maxExtension + h.Height()
pci.Expiration = policy.GetMaxSectorExpirationExtension() + h.Height()
}
pc, err := nApi.StateMinerInitialPledgeCollateral(ctx, maddr, pci, types.EmptyTSK)
@@ -1924,7 +1910,7 @@ var sectorsExpiredCmd = &cli.Command{
}
tbs := blockstore.NewTieredBstore(blockstore.NewAPIBlockstore(fullApi), blockstore.NewMemory())
mas, err := miner.Load(adt.WrapStore(ctx, cbor.NewCborStore(tbs)), mact)
mas, err := lminer.Load(adt.WrapStore(ctx, cbor.NewCborStore(tbs)), mact)
if err != nil {
return err
}
@@ -1940,8 +1926,8 @@ var sectorsExpiredCmd = &cli.Command{
return xerrors.Errorf("intersecting bitfields: %w", err)
}
if err := mas.ForEachDeadline(func(dlIdx uint64, dl miner.Deadline) error {
return dl.ForEachPartition(func(partIdx uint64, part miner.Partition) error {
if err := mas.ForEachDeadline(func(dlIdx uint64, dl lminer.Deadline) error {
return dl.ForEachPartition(func(partIdx uint64, part lminer.Partition) error {
live, err := part.LiveSectors()
if err != nil {
return err
+1 -3
View File
@@ -137,9 +137,7 @@ var preSealCmd = &cli.Command{
nv = network.Version(c.Uint64("network-version"))
}
var synthetic = false // there's little reason to have this for a seed.
spt, err := miner.SealProofTypeFromSectorSize(sectorSize, nv, synthetic)
spt, err := miner.SealProofTypeFromSectorSize(sectorSize, nv)
if err != nil {
return err
}
-22
View File
@@ -5,7 +5,6 @@ import (
"fmt"
"os"
"os/signal"
"runtime/pprof"
logging "github.com/ipfs/go-log/v2"
"github.com/urfave/cli/v2"
@@ -117,31 +116,10 @@ func main() {
Name: "log-level",
Value: "info",
},
&cli.StringFlag{
Name: "pprof",
Usage: "specify name of file for writing cpu profile to",
},
},
Before: func(cctx *cli.Context) error {
if prof := cctx.String("pprof"); prof != "" {
profile, err := os.Create(prof)
if err != nil {
return err
}
if err := pprof.StartCPUProfile(profile); err != nil {
return err
}
}
return logging.SetLogLevel("lotus-shed", cctx.String("log-level"))
},
After: func(cctx *cli.Context) error {
if prof := cctx.String("pprof"); prof != "" {
pprof.StopCPUProfile()
}
return nil
},
}
// terminate early on ctrl+c
-35
View File
@@ -21,7 +21,6 @@ import (
"github.com/filecoin-project/go-state-types/builtin"
v10 "github.com/filecoin-project/go-state-types/builtin/v10"
v11 "github.com/filecoin-project/go-state-types/builtin/v11"
v12 "github.com/filecoin-project/go-state-types/builtin/v12"
market8 "github.com/filecoin-project/go-state-types/builtin/v8/market"
adt8 "github.com/filecoin-project/go-state-types/builtin/v8/util/adt"
v9 "github.com/filecoin-project/go-state-types/builtin/v9"
@@ -244,8 +243,6 @@ func getMigrationFuncsForNetwork(nv network.Version) (UpgradeActorsFunc, PreUpgr
return filcns.UpgradeActorsV10, filcns.PreUpgradeActorsV10, checkNv18Invariants, nil
case network.Version19:
return filcns.UpgradeActorsV11, filcns.PreUpgradeActorsV11, checkNv19Invariants, nil
case network.Version21:
return filcns.UpgradeActorsV12, filcns.PreUpgradeActorsV12, checkNv21Invariants, nil
default:
return nil, nil, nil, xerrors.Errorf("migration not implemented for nv%d", nv)
}
@@ -255,38 +252,6 @@ type UpgradeActorsFunc = func(context.Context, *stmgr.StateManager, stmgr.Migrat
type PreUpgradeActorsFunc = func(context.Context, *stmgr.StateManager, stmgr.MigrationCache, cid.Cid, abi.ChainEpoch, *types.TipSet) error
type CheckInvariantsFunc = func(context.Context, cid.Cid, cid.Cid, blockstore.Blockstore, abi.ChainEpoch) error
func checkNv21Invariants(ctx context.Context, oldStateRootCid cid.Cid, newStateRootCid cid.Cid, bs blockstore.Blockstore, epoch abi.ChainEpoch) error {
actorStore := store.ActorStore(ctx, bs)
startTime := time.Now()
// Load the new state root.
var newStateRoot types.StateRoot
if err := actorStore.Get(ctx, newStateRootCid, &newStateRoot); err != nil {
return xerrors.Errorf("failed to decode state root: %w", err)
}
actorCodeCids, err := actors.GetActorCodeIDs(actorstypes.Version12)
if err != nil {
return err
}
newActorTree, err := builtin.LoadTree(actorStore, newStateRoot.Actors)
if err != nil {
return err
}
messages, err := v12.CheckStateInvariants(newActorTree, epoch, actorCodeCids)
if err != nil {
return xerrors.Errorf("checking state invariants: %w", err)
}
for _, message := range messages.Messages() {
fmt.Println("got the following error: ", message)
}
fmt.Println("completed invariant checks, took ", time.Since(startTime))
return nil
}
func checkNv19Invariants(ctx context.Context, oldStateRootCid cid.Cid, newStateRootCid cid.Cid, bs blockstore.Blockstore, epoch abi.ChainEpoch) error {
actorStore := store.ActorStore(ctx, bs)
+7 -22
View File
@@ -38,7 +38,7 @@ func (t *CarbNode) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Sub"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Sub")); err != nil {
if _, err := io.WriteString(w, string("Sub")); err != nil {
return err
}
@@ -50,11 +50,9 @@ func (t *CarbNode) MarshalCBOR(w io.Writer) error {
return err
}
for _, v := range t.Sub {
if err := cbg.WriteCid(cw, v); err != nil {
return xerrors.Errorf("failed to write cid field v: %w", err)
if err := cbg.WriteCid(w, v); err != nil {
return xerrors.Errorf("failed writing cid field t.Sub: %w", err)
}
}
return nil
}
@@ -118,25 +116,12 @@ func (t *CarbNode) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
c, err := cbg.ReadCid(cr)
if err != nil {
return xerrors.Errorf("failed to read cid field t.Sub[i]: %w", err)
}
t.Sub[i] = c
}
c, err := cbg.ReadCid(cr)
if err != nil {
return xerrors.Errorf("reading cid field t.Sub failed: %w", err)
}
t.Sub[i] = c
}
default:
@@ -165,7 +165,7 @@ func (stage *PreCommitStage) packMiner(
// Generate pre-commits.
sealType, err := miner.PreferredSealProofTypeFromWindowPoStType(
nv, minerInfo.WindowPoStProofType, false,
nv, minerInfo.WindowPoStProofType,
)
if err != nil {
return 0, false, err
@@ -176,12 +176,7 @@ func (stage *PreCommitStage) packMiner(
return 0, false, err
}
maxExtension, err := policy.GetMaxSectorExpirationExtension(nv)
if err != nil {
return 0, false, xerrors.Errorf("failed to get max extension: %w", err)
}
expiration := epoch + maxExtension
expiration := epoch + policy.GetMaxSectorExpirationExtension()
infos := make([]minertypes.PreCommitSectorParams, len(sectorNos))
for i, sno := range sectorNos {
infos[i] = minertypes.PreCommitSectorParams{
+19 -62
View File
@@ -44,7 +44,7 @@ func (t *State) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Value))); err != nil {
return err
}
if _, err := cw.WriteString(string(t.Value)); err != nil {
if _, err := io.WriteString(w, string(t.Value)); err != nil {
return err
}
@@ -117,32 +117,13 @@ func (t *State) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
b, err := cr.ReadByte()
if err != nil {
return err
}
if b != cbg.CborNull[0] {
if err := cr.UnreadByte(); err != nil {
return err
}
t.Unmarshallable[i] = new(UnmarshallableCBOR)
if err := t.Unmarshallable[i].UnmarshalCBOR(cr); err != nil {
return xerrors.Errorf("unmarshaling t.Unmarshallable[i] pointer: %w", err)
}
}
}
var v UnmarshallableCBOR
if err := v.UnmarshalCBOR(cr); err != nil {
return err
}
t.Unmarshallable[i] = &v
}
return nil
@@ -196,11 +177,9 @@ func (t *CallerValidationArgs) MarshalCBOR(w io.Writer) error {
return err
}
for _, v := range t.Types {
if err := cbg.WriteCid(cw, v); err != nil {
return xerrors.Errorf("failed to write cid field v: %w", err)
if err := cbg.WriteCid(w, v); err != nil {
return xerrors.Errorf("failed writing cid field t.Types: %w", err)
}
}
return nil
}
@@ -273,22 +252,13 @@ func (t *CallerValidationArgs) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
if err := t.Addrs[i].UnmarshalCBOR(cr); err != nil {
return xerrors.Errorf("unmarshaling t.Addrs[i]: %w", err)
}
}
var v address.Address
if err := v.UnmarshalCBOR(cr); err != nil {
return err
}
t.Addrs[i] = v
}
// t.Types ([]cid.Cid) (slice)
@@ -311,25 +281,12 @@ func (t *CallerValidationArgs) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
c, err := cbg.ReadCid(cr)
if err != nil {
return xerrors.Errorf("failed to read cid field t.Types[i]: %w", err)
}
t.Types[i] = c
}
c, err := cbg.ReadCid(cr)
if err != nil {
return xerrors.Errorf("reading cid field t.Types failed: %w", err)
}
t.Types[i] = c
}
return nil
@@ -789,7 +746,7 @@ func (t *MutateStateArgs) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Value))); err != nil {
return err
}
if _, err := cw.WriteString(string(t.Value)); err != nil {
if _, err := io.WriteString(w, string(t.Value)); err != nil {
return err
}
@@ -900,7 +857,7 @@ func (t *AbortWithArgs) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Message))); err != nil {
return err
}
if _, err := cw.WriteString(string(t.Message)); err != nil {
if _, err := io.WriteString(w, string(t.Message)); err != nil {
return err
}
-630
View File
@@ -4213,51 +4213,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 1073741824,
"MaxMemory": 1610612736,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 10737418240,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 32212254720,
"MaxMemory": 103079215104,
"GPUUtilization": 1,
"MaxParallelism": -1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 34359738368,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 64424509440,
"MaxMemory": 128849018880,
"GPUUtilization": 1,
"MaxParallelism": -1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 68719476736,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 1073741824,
"MaxMemory": 1610612736,
@@ -4350,51 +4305,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 10737418240,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
"GPUUtilization": 1,
"MaxParallelism": -1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 34359738368,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
"GPUUtilization": 1,
"MaxParallelism": -1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 68719476736,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 2048,
"MaxMemory": 2048,
@@ -4487,51 +4397,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 4294967296,
"MaxMemory": 4294967296,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 8589934592,
"MaxMemory": 8589934592,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
@@ -4624,51 +4489,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
@@ -4761,51 +4581,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 1073741824,
"MaxMemory": 1610612736,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 10737418240,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 32212254720,
"MaxMemory": 161061273600,
"GPUUtilization": 1,
"MaxParallelism": -1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 34359738368,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 64424509440,
"MaxMemory": 204010946560,
"GPUUtilization": 1,
"MaxParallelism": -1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 68719476736,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 1073741824,
"MaxMemory": 1610612736,
@@ -4898,51 +4673,6 @@ Response:
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 4294967296,
"MaxMemory": 4294967296,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 4294967296,
"MaxMemory": 4294967296,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 4294967296,
"MaxMemory": 4294967296,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 4294967296,
"MaxMemory": 4294967296,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 4294967296,
"MaxMemory": 4294967296,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 4294967296,
"MaxMemory": 4294967296,
@@ -5035,51 +4765,6 @@ Response:
"BaseMinMemory": 0,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 1048576,
"MaxMemory": 1048576,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 0,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 1048576,
"MaxMemory": 1048576,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 0,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 1048576,
"MaxMemory": 1048576,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 0,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 1048576,
"MaxMemory": 1048576,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 0,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 1048576,
"MaxMemory": 1048576,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 0,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 1048576,
"MaxMemory": 1048576,
@@ -5172,51 +4857,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 805306368,
"MaxMemory": 1073741824,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1048576,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 60129542144,
"MaxMemory": 68719476736,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 10485760,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 120259084288,
"MaxMemory": 137438953472,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 10485760,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 805306368,
"MaxMemory": 1073741824,
@@ -5309,51 +4949,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 0,
"MaxParallelism": -1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 0,
"MaxParallelism": -1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 1073741824,
"MaxMemory": 1610612736,
"GPUUtilization": 0,
"MaxParallelism": -1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 16106127360,
"MaxMemory": 16106127360,
"GPUUtilization": 1,
"MaxParallelism": -1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 32212254720,
"MaxMemory": 32212254720,
"GPUUtilization": 1,
"MaxParallelism": -1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 1073741824,
"MaxMemory": 1610612736,
@@ -5446,51 +5041,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
@@ -5583,51 +5133,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 1073741824,
"MaxMemory": 1610612736,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 10737418240,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 32212254720,
"MaxMemory": 161061273600,
"GPUUtilization": 1,
"MaxParallelism": -1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 34359738368,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 64424509440,
"MaxMemory": 204010946560,
"GPUUtilization": 1,
"MaxParallelism": -1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 68719476736,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 1073741824,
"MaxMemory": 1610612736,
@@ -5720,51 +5225,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 4294967296,
"MaxMemory": 4294967296,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 8589934592,
"MaxMemory": 8589934592,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
@@ -5857,51 +5317,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 4294967296,
"MaxMemory": 4294967296,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 8589934592,
"MaxMemory": 8589934592,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
@@ -5994,51 +5409,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 805306368,
"MaxMemory": 1073741824,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1048576,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 60129542144,
"MaxMemory": 68719476736,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 10485760,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 120259084288,
"MaxMemory": 137438953472,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 10485760,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 805306368,
"MaxMemory": 1073741824,
-630
View File
@@ -138,51 +138,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 1073741824,
"MaxMemory": 1610612736,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 10737418240,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 32212254720,
"MaxMemory": 103079215104,
"GPUUtilization": 1,
"MaxParallelism": -1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 34359738368,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 64424509440,
"MaxMemory": 128849018880,
"GPUUtilization": 1,
"MaxParallelism": -1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 68719476736,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 1073741824,
"MaxMemory": 1610612736,
@@ -275,51 +230,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 10737418240,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
"GPUUtilization": 1,
"MaxParallelism": -1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 34359738368,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
"GPUUtilization": 1,
"MaxParallelism": -1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 68719476736,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 2048,
"MaxMemory": 2048,
@@ -412,51 +322,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 4294967296,
"MaxMemory": 4294967296,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 8589934592,
"MaxMemory": 8589934592,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
@@ -549,51 +414,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
@@ -686,51 +506,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 1073741824,
"MaxMemory": 1610612736,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 10737418240,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 32212254720,
"MaxMemory": 161061273600,
"GPUUtilization": 1,
"MaxParallelism": -1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 34359738368,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 64424509440,
"MaxMemory": 204010946560,
"GPUUtilization": 1,
"MaxParallelism": -1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 68719476736,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 1073741824,
"MaxMemory": 1610612736,
@@ -823,51 +598,6 @@ Response:
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 4294967296,
"MaxMemory": 4294967296,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 4294967296,
"MaxMemory": 4294967296,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 4294967296,
"MaxMemory": 4294967296,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 4294967296,
"MaxMemory": 4294967296,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 4294967296,
"MaxMemory": 4294967296,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 4294967296,
"MaxMemory": 4294967296,
@@ -960,51 +690,6 @@ Response:
"BaseMinMemory": 0,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 1048576,
"MaxMemory": 1048576,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 0,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 1048576,
"MaxMemory": 1048576,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 0,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 1048576,
"MaxMemory": 1048576,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 0,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 1048576,
"MaxMemory": 1048576,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 0,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 1048576,
"MaxMemory": 1048576,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 0,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 1048576,
"MaxMemory": 1048576,
@@ -1097,51 +782,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 805306368,
"MaxMemory": 1073741824,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1048576,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 60129542144,
"MaxMemory": 68719476736,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 10485760,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 120259084288,
"MaxMemory": 137438953472,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 10485760,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 805306368,
"MaxMemory": 1073741824,
@@ -1234,51 +874,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 0,
"MaxParallelism": -1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 0,
"MaxParallelism": -1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 1073741824,
"MaxMemory": 1610612736,
"GPUUtilization": 0,
"MaxParallelism": -1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 16106127360,
"MaxMemory": 16106127360,
"GPUUtilization": 1,
"MaxParallelism": -1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 32212254720,
"MaxMemory": 32212254720,
"GPUUtilization": 1,
"MaxParallelism": -1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 1073741824,
"MaxMemory": 1610612736,
@@ -1371,51 +966,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
"GPUUtilization": 0,
"MaxParallelism": 0,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
@@ -1508,51 +1058,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 1073741824,
"MaxMemory": 1610612736,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 10737418240,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 32212254720,
"MaxMemory": 161061273600,
"GPUUtilization": 1,
"MaxParallelism": -1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 34359738368,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 64424509440,
"MaxMemory": 204010946560,
"GPUUtilization": 1,
"MaxParallelism": -1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 68719476736,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 1073741824,
"MaxMemory": 1610612736,
@@ -1645,51 +1150,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 4294967296,
"MaxMemory": 4294967296,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 8589934592,
"MaxMemory": 8589934592,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
@@ -1782,51 +1242,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 4294967296,
"MaxMemory": 4294967296,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 8589934592,
"MaxMemory": 8589934592,
"GPUUtilization": 1,
"MaxParallelism": 1,
"MaxParallelismGPU": 6,
"BaseMinMemory": 1073741824,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 1073741824,
"MaxMemory": 1073741824,
@@ -1919,51 +1334,6 @@ Response:
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"10": {
"MinMemory": 2048,
"MaxMemory": 2048,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 2048,
"MaxConcurrent": 0
},
"11": {
"MinMemory": 8388608,
"MaxMemory": 8388608,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 8388608,
"MaxConcurrent": 0
},
"12": {
"MinMemory": 805306368,
"MaxMemory": 1073741824,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 1048576,
"MaxConcurrent": 0
},
"13": {
"MinMemory": 60129542144,
"MaxMemory": 68719476736,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 10485760,
"MaxConcurrent": 0
},
"14": {
"MinMemory": 120259084288,
"MaxMemory": 137438953472,
"GPUUtilization": 0,
"MaxParallelism": 1,
"MaxParallelismGPU": 0,
"BaseMinMemory": 10485760,
"MaxConcurrent": 0
},
"2": {
"MinMemory": 805306368,
"MaxMemory": 1073741824,
+3 -6
View File
@@ -2289,8 +2289,7 @@ Inputs:
},
{
"MaxFee": "0",
"MsgUuid": "07070707-0707-0707-0707-070707070707",
"MaximizeFeeCap": true
"MsgUuid": "07070707-0707-0707-0707-070707070707"
},
[
{
@@ -2767,8 +2766,7 @@ Inputs:
],
{
"MaxFee": "0",
"MsgUuid": "07070707-0707-0707-0707-070707070707",
"MaximizeFeeCap": true
"MsgUuid": "07070707-0707-0707-0707-070707070707"
}
]
```
@@ -3027,8 +3025,7 @@ Inputs:
},
{
"MaxFee": "0",
"MsgUuid": "07070707-0707-0707-0707-070707070707",
"MaximizeFeeCap": true
"MsgUuid": "07070707-0707-0707-0707-070707070707"
}
]
```
+3 -6
View File
@@ -3357,8 +3357,7 @@ Inputs:
},
{
"MaxFee": "0",
"MsgUuid": "07070707-0707-0707-0707-070707070707",
"MaximizeFeeCap": true
"MsgUuid": "07070707-0707-0707-0707-070707070707"
},
[
{
@@ -3835,8 +3834,7 @@ Inputs:
],
{
"MaxFee": "0",
"MsgUuid": "07070707-0707-0707-0707-070707070707",
"MaximizeFeeCap": true
"MsgUuid": "07070707-0707-0707-0707-070707070707"
}
]
```
@@ -4228,8 +4226,7 @@ Inputs:
},
{
"MaxFee": "0",
"MsgUuid": "07070707-0707-0707-0707-070707070707",
"MaximizeFeeCap": true
"MsgUuid": "07070707-0707-0707-0707-070707070707"
}
]
```
+1 -18
View File
@@ -223,7 +223,6 @@ COMMANDS:
propose-change-worker Propose a worker address change
confirm-change-worker Confirm a worker address change
compact-allocated compact allocated sectors bitfield
move-partitions move deadline of specified partitions from one to another
propose-change-beneficiary Propose a beneficiary address change
confirm-change-beneficiary Confirm a beneficiary address change
help, h Shows a list of commands or help for one command
@@ -367,28 +366,12 @@ USAGE:
lotus-miner actor compact-allocated [command options] [arguments...]
OPTIONS:
--mask-last-offset value Mask sector IDs from 0 to 'highest_allocated - offset' (default: 0)
--mask-last-offset value Mask sector IDs from 0 to 'higest_allocated - offset' (default: 0)
--mask-upto-n value Mask sector IDs from 0 to 'n' (default: 0)
--really-do-it Actually send transaction performing the action (default: false)
--help, -h show help
```
### lotus-miner actor move-partitions
```
NAME:
lotus-miner actor move-partitions - move deadline of specified partitions from one to another
USAGE:
lotus-miner actor move-partitions [command options] [arguments...]
OPTIONS:
--partition-indices value [ --partition-indices value ] Indices of partitions to update, separated by comma
--orig-deadline value Deadline to move partition from (default: 0)
--dest-deadline value Deadline to move partition to (default: 0)
--really-do-it Actually send transaction performing the action (default: false)
--help, -h show help
```
### lotus-miner actor propose-change-beneficiary
```
NAME:
@@ -427,10 +427,13 @@
# env var: LOTUS_PROVING_DISABLEWDPOSTPRECHECKS
#DisableWDPoStPreChecks = false
# Maximum number of partitions to prove in a single SubmitWindowPoSt messace. 0 = network limit (3 in nv21)
# Maximum number of partitions to prove in a single SubmitWindowPoSt messace. 0 = network limit (10 in nv16)
#
# A single partition may contain up to 2349 32GiB sectors, or 2300 64GiB sectors.
# //
#
# The maximum number of sectors which can be proven in a single PoSt message is 25000 in network version 16, which
# means that a single message can prove at most 10 partitions
#
# Note that setting this value lower may result in less efficient gas use - more messages will be sent,
# to prove each deadline, resulting in more total gas use (but each message will have lower gas limit)
#
@@ -520,7 +523,7 @@
# CommittedCapacitySectorLifetime is the duration a Committed Capacity (CC) sector will
# live before it must be extended or converted into sector containing deals before it is
# terminated. Value must be between 180-1278 days (1278 in nv21, 540 before nv21).
# terminated. Value must be between 180-540 days inclusive
#
# type: Duration
# env var: LOTUS_SEALING_COMMITTEDCAPACITYSECTORLIFETIME
@@ -663,12 +666,6 @@
# env var: LOTUS_SEALING_TERMINATEBATCHWAIT
#TerminateBatchWait = "5m0s"
# UseSyntheticPoRep, when set to true, will reduce the amount of cache data held on disk after the completion of PreCommit 2 to 11GiB.
#
# type: bool
# env var: LOTUS_SEALING_USESYNTHETICPOREP
#UseSyntheticPoRep = false
[Storage]
# type: int
@@ -778,10 +775,6 @@
# env var: LOTUS_FEES_MAXMARKETBALANCEADDFEE
#MaxMarketBalanceAddFee = "0.007 FIL"
# type: bool
# env var: LOTUS_FEES_MAXIMIZEWINDOWPOSTFEECAP
#MaximizeWindowPoStFeeCap = true
[Fees.MaxPreCommitBatchGasFee]
# type: types.FIL
# env var: LOTUS_FEES_MAXPRECOMMITBATCHGASFEE_BASE
+2 -2
View File
@@ -45,7 +45,7 @@ require (
github.com/filecoin-project/go-jsonrpc v0.3.1
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.12.5
github.com/filecoin-project/go-state-types v0.12.1
github.com/filecoin-project/go-statemachine v1.0.3
github.com/filecoin-project/go-statestore v0.2.0
github.com/filecoin-project/go-storedcounter v0.1.0
@@ -138,7 +138,7 @@ require (
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
github.com/urfave/cli/v2 v2.25.5
github.com/whyrusleeping/bencher v0.0.0-20190829221104-bb6607aa8bba
github.com/whyrusleeping/cbor-gen v0.0.0-20230923211252-36a87e1ba72f
github.com/whyrusleeping/cbor-gen v0.0.0-20230126041949-52956bd4c9aa
github.com/whyrusleeping/ledger-filecoin-go v0.9.1-0.20201010031517-c3dcc1bddce4
github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7
github.com/xeipuuv/gojsonschema v1.2.0
+5 -6
View File
@@ -337,9 +337,9 @@ github.com/filecoin-project/go-state-types v0.0.0-20201102161440-c8033295a1fc/go
github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g=
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.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q=
github.com/filecoin-project/go-state-types v0.11.2-0.20230712101859-8f37624fa540/go.mod h1:SyNPwTsU7I22gL2r0OAPcImvLoTVfgRwdK/Y5rR1zz8=
github.com/filecoin-project/go-state-types v0.12.5 h1:VQ2N2T3JeUDdIHEo/xhjnT7Q218Wl0UYIyglqT7Z9Ck=
github.com/filecoin-project/go-state-types v0.12.5/go.mod h1:iJTqGdWDvzXhuVf64Lw0hzt4TIoitMo0VgHdxdjNDZI=
github.com/filecoin-project/go-state-types v0.11.1/go.mod h1:SyNPwTsU7I22gL2r0OAPcImvLoTVfgRwdK/Y5rR1zz8=
github.com/filecoin-project/go-state-types v0.12.1 h1:/1ip/jXIP4QzWd3hlaQ7RGp1DHKKYG3+NOhd/r08UJY=
github.com/filecoin-project/go-state-types v0.12.1/go.mod h1:KOBGyvCalT8uHBS7KSKOVbjsilD90bBZHgLAqrzz6gU=
github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig=
github.com/filecoin-project/go-statemachine v1.0.3 h1:N07o6alys+V1tNoSTi4WuuoeNC4erS/6jE74+NsgQuk=
github.com/filecoin-project/go-statemachine v1.0.3/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54=
@@ -1637,8 +1637,8 @@ github.com/whyrusleeping/cbor-gen v0.0.0-20200826160007-0b9f6c5fb163/go.mod h1:f
github.com/whyrusleeping/cbor-gen v0.0.0-20210118024343-169e9d70c0c2/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ=
github.com/whyrusleeping/cbor-gen v0.0.0-20210303213153-67a261a1d291/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ=
github.com/whyrusleeping/cbor-gen v0.0.0-20220323183124-98fa8256a799/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ=
github.com/whyrusleeping/cbor-gen v0.0.0-20230923211252-36a87e1ba72f h1:SBuSxXJL0/ZJMtTxbXZgHZkThl9dNrzyaNhlyaqscRo=
github.com/whyrusleeping/cbor-gen v0.0.0-20230923211252-36a87e1ba72f/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ=
github.com/whyrusleeping/cbor-gen v0.0.0-20230126041949-52956bd4c9aa h1:EyA027ZAkuaCLoxVX4r1TZMPy1d31fM6hbfQ4OU4I5o=
github.com/whyrusleeping/cbor-gen v0.0.0-20230126041949-52956bd4c9aa/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ=
github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f h1:jQa4QT2UP9WYv2nzyawpKMOCl+Z/jW7djv2/J50lj9E=
github.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8=
github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 h1:EKhdznlJHPMoKr0XTrX+IlJs1LH3lyx2nfr1dOlZ79k=
@@ -2265,7 +2265,6 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
+1 -16
View File
@@ -81,16 +81,12 @@ func TestValueTransferValidSignature(t *testing.T) {
receipt, err := waitForEthTxReceipt(ctx, client, hash)
require.NoError(t, err)
require.NotNil(t, receipt)
require.EqualValues(t, ethAddr, receipt.From)
require.EqualValues(t, ethAddr2, *receipt.To)
require.EqualValues(t, hash, receipt.TransactionHash)
// Success.
require.EqualValues(t, ethtypes.EthUint64(0x1), receipt.Status)
// Validate that we sent the expected transaction.
ethTx, err := client.EthGetTransactionByHash(ctx, &hash)
require.NoError(t, err)
require.Nil(t, err)
require.EqualValues(t, ethAddr, ethTx.From)
require.EqualValues(t, ethAddr2, *ethTx.To)
require.EqualValues(t, tx.ChainID, ethTx.ChainID)
@@ -273,17 +269,6 @@ func TestContractInvocation(t *testing.T) {
// Success.
require.EqualValues(t, ethtypes.EthUint64(0x1), receipt.Status)
// Validate that we correctly computed the gas outputs.
mCid, err := client.EthGetMessageCidByTransactionHash(ctx, &hash)
require.NoError(t, err)
require.NotNil(t, mCid)
invokResult, err := client.StateReplay(ctx, types.EmptyTSK, *mCid)
require.NoError(t, err)
require.EqualValues(t, invokResult.GasCost.GasUsed, big.NewInt(int64(receipt.GasUsed)))
effectiveGasPrice := big.Div(invokResult.GasCost.TotalCost, invokResult.GasCost.GasUsed)
require.EqualValues(t, effectiveGasPrice, big.Int(receipt.EffectiveGasPrice))
}
func TestGetBlockByNumber(t *testing.T) {
+2 -2
View File
@@ -618,9 +618,9 @@ func TestFEVMRecursiveActorCall(t *testing.T) {
t.Run("n=251,r=32", testN(251, 32, exitcode.Ok))
t.Run("n=0,r=252", testN(0, 252, exitcode.Ok))
t.Run("n=251,r=164", testN(251, 164, exitcode.Ok))
t.Run("n=251,r=166", testN(251, 166, exitcode.Ok))
t.Run("n=0,r=255-fails", testN(0, 255, exitcode.ExitCode(33))) // 33 means transaction reverted
t.Run("n=0,r=253-fails", testN(0, 254, exitcode.ExitCode(33))) // 33 means transaction reverted
t.Run("n=251,r=167-fails", testN(251, 167, exitcode.ExitCode(33)))
}
+1 -1
View File
@@ -260,7 +260,7 @@ func (n *Ensemble) MinerEnroll(minerNode *TestMiner, full *TestFullNode, opts ..
)
// Will use 2KiB sectors by default (default value of sectorSize).
proofType, err := miner.SealProofTypeFromSectorSize(options.sectorSize, n.genesis.version, false)
proofType, err := miner.SealProofTypeFromSectorSize(options.sectorSize, n.genesis.version)
require.NoError(n.t, err)
// Create the preseal commitment.
+1 -67
View File
@@ -34,7 +34,6 @@ import (
"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/system"
"github.com/filecoin-project/lotus/chain/actors/builtin/verifreg"
"github.com/filecoin-project/lotus/chain/consensus/filcns"
"github.com/filecoin-project/lotus/chain/state"
@@ -302,7 +301,7 @@ func TestMigrationNV17(t *testing.T) {
minerInfo, err := testClient.StateMinerInfo(ctx, testMiner.ActorAddr, types.EmptyTSK)
require.NoError(t, err)
spt, err := miner.SealProofTypeFromSectorSize(minerInfo.SectorSize, network.Version17, false)
spt, err := miner.SealProofTypeFromSectorSize(minerInfo.SectorSize, network.Version17)
require.NoError(t, err)
preCommitParams := miner9.PreCommitSectorParams{
@@ -763,68 +762,3 @@ waitForProof20:
require.Equal(t, v1proof, minerInfo.WindowPoStProofType)
}
func TestMigrationNV21(t *testing.T) {
kit.QuietMiningLogs()
nv21epoch := abi.ChainEpoch(100)
testClient, _, ens := kit.EnsembleMinimal(t, kit.MockProofs(),
kit.UpgradeSchedule(stmgr.Upgrade{
Network: network.Version20,
Height: -1,
}, stmgr.Upgrade{
Network: network.Version21,
Height: nv21epoch,
Migration: filcns.UpgradeActorsV12,
},
))
ens.InterconnectAll().BeginMining(10 * time.Millisecond)
clientApi := testClient.FullNode.(*impl.FullNodeAPI)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
testClient.WaitTillChain(ctx, kit.HeightAtLeast(nv21epoch+5))
// Now that we have upgraded, we need to verify:
// - Sector info changes executed successfully
// - Direct data onboarding correct
bs := blockstore.NewAPIBlockstore(testClient)
ctxStore := gstStore.WrapBlockStore(ctx, bs)
currTs, err := clientApi.ChainHead(ctx)
require.NoError(t, err)
newStateTree, err := state.LoadStateTree(ctxStore, currTs.Blocks()[0].ParentStateRoot)
require.NoError(t, err)
require.Equal(t, types.StateTreeVersion5, newStateTree.Version())
// check the system actor
systemAct, err := newStateTree.GetActor(builtin.SystemActorAddr)
require.NoError(t, err)
systemCode, ok := actors.GetActorCodeID(actorstypes.Version12, manifest.SystemKey)
require.True(t, ok)
require.Equal(t, systemCode, systemAct.Code)
systemSt, err := system.Load(ctxStore, systemAct)
require.NoError(t, err)
manifest12Cid, ok := actors.GetManifest(actorstypes.Version12)
require.True(t, ok)
manifest12, err := actors.LoadManifest(ctx, manifest12Cid, ctxStore)
require.NoError(t, err)
require.Equal(t, manifest12.Data, systemSt.GetBuiltinActors())
// start post migration checks
//todo @aayush sector info changes
//todo @zen Direct data onboarding tests
}
+1 -1
View File
@@ -88,7 +88,7 @@ func TestSectorImport(t *testing.T) {
require.NoError(t, err)
ver, err := client.StateNetworkVersion(ctx, types.EmptyTSK)
require.NoError(t, err)
spt, err := lminer.PreferredSealProofTypeFromWindowPoStType(ver, mi.WindowPoStProofType, false)
spt, err := lminer.PreferredSealProofTypeFromWindowPoStType(ver, mi.WindowPoStProofType)
require.NoError(t, err)
ssize, err := spt.SectorSize()
+1 -1
View File
@@ -63,7 +63,7 @@ func TestSectorImportAfterPC2(t *testing.T) {
require.NoError(t, err)
ver, err := client.StateNetworkVersion(ctx, types.EmptyTSK)
require.NoError(t, err)
spt, err := lminer.PreferredSealProofTypeFromWindowPoStType(ver, mi.WindowPoStProofType, false)
spt, err := lminer.PreferredSealProofTypeFromWindowPoStType(ver, mi.WindowPoStProofType)
require.NoError(t, err)
ssize, err := spt.SectorSize()
-28
View File
@@ -18,7 +18,6 @@ import (
"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/itests/kit"
"github.com/filecoin-project/lotus/node/config"
"github.com/filecoin-project/lotus/node/impl"
sealing "github.com/filecoin-project/lotus/storage/pipeline"
)
@@ -196,30 +195,3 @@ func TestPledgeMaxBatching(t *testing.T) {
t.Run("Force max prove commit aggregate size", runTest)
}
func TestPledgeSynth(t *testing.T) {
kit.QuietMiningLogs()
blockTime := 50 * time.Millisecond
runTest := func(t *testing.T, nSectors int) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
_, miner, ens := kit.EnsembleMinimal(t, kit.MutateSealingConfig(func(sc *config.SealingConfig) {
sc.UseSyntheticPoRep = true
})) // no mock proofs
ens.InterconnectAll().BeginMiningMustPost(blockTime)
miner.PledgeSectors(ctx, nSectors, 0, nil)
}
t.Run("1", func(t *testing.T) {
runTest(t, 1)
})
t.Run("3", func(t *testing.T) {
runTest(t, 3)
})
}
+1 -4
View File
@@ -186,10 +186,7 @@ func (n *ProviderNodeAdapter) GetProofType(ctx context.Context, maddr address.Ad
return 0, err
}
// false because this variance is not consumed.
const configWantSynthetic = false
return miner.PreferredSealProofTypeFromWindowPoStType(nver, mi.WindowPoStProofType, configWantSynthetic)
return miner.PreferredSealProofTypeFromWindowPoStType(nver, mi.WindowPoStProofType)
}
func (n *ProviderNodeAdapter) SignBytes(ctx context.Context, signer address.Address, b []byte) (*crypto.Signature, error) {
+1 -1
View File
@@ -594,7 +594,7 @@ func (m *Miner) mineOne(ctx context.Context, base *MiningBase) (minedBlock *type
}
}
if len(refreshedBaseBlocks) != 0 && len(refreshedBaseBlocks) != len(base.TipSet.Blocks()) {
if len(refreshedBaseBlocks) != len(base.TipSet.Blocks()) {
refreshedBase, err := types.NewTipSet(refreshedBaseBlocks)
if err != nil {
err = xerrors.Errorf("failed to create new tipset when refreshing: %w", err)
+1 -7
View File
@@ -10,7 +10,6 @@ import (
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/network"
miner5 "github.com/filecoin-project/specs-actors/v5/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/actors/builtin"
@@ -123,8 +122,6 @@ func DefaultFullNode() *FullNode {
}
func DefaultStorageMiner() *StorageMiner {
// TODO: Should we increase this to nv21, which would push it to 3.5 years?
maxSectorExtentsion, _ := policy.GetMaxSectorExpirationExtension(network.Version20)
cfg := &StorageMiner{
Common: defCommon(),
@@ -146,7 +143,7 @@ func DefaultStorageMiner() *StorageMiner {
// XXX snap deals wait deals slack if first
PreCommitBatchSlack: Duration(3 * time.Hour), // time buffer for forceful batch submission before sectors/deals in batch would start expiring, higher value will lower the chances for message fail due to expiration
CommittedCapacitySectorLifetime: Duration(builtin.EpochDurationSeconds * uint64(maxSectorExtentsion) * uint64(time.Second)),
CommittedCapacitySectorLifetime: Duration(builtin.EpochDurationSeconds * uint64(policy.GetMaxSectorExpirationExtension()) * uint64(time.Second)),
AggregateCommits: true,
MinCommitBatch: miner5.MinAggregatedSectors, // per FIP13, we must have at least four proofs to aggregate, where 4 is the cross over point where aggregation wins out on single provecommit gas costs
@@ -161,7 +158,6 @@ func DefaultStorageMiner() *StorageMiner {
TerminateBatchMax: 100,
TerminateBatchWait: Duration(5 * time.Minute),
MaxSectorProveCommitsSubmittedPerEpoch: 20,
UseSyntheticPoRep: false,
},
Proving: ProvingConfig{
@@ -257,8 +253,6 @@ func DefaultStorageMiner() *StorageMiner {
MaxWindowPoStGasFee: types.MustParseFIL("5"),
MaxPublishDealsFee: types.MustParseFIL("0.05"),
MaxMarketBalanceAddFee: types.MustParseFIL("0.007"),
MaximizeWindowPoStFeeCap: true,
},
Addresses: MinerAddressConfig{
+6 -15
View File
@@ -721,12 +721,6 @@ over the worker address if this flag is set.`,
Name: "MaxMarketBalanceAddFee",
Type: "types.FIL",
Comment: ``,
},
{
Name: "MaximizeWindowPoStFeeCap",
Type: "bool",
Comment: ``,
},
},
@@ -859,10 +853,13 @@ After changing this option, confirm that the new value works in your setup by in
Name: "MaxPartitionsPerPoStMessage",
Type: "int",
Comment: `Maximum number of partitions to prove in a single SubmitWindowPoSt messace. 0 = network limit (3 in nv21)
Comment: `Maximum number of partitions to prove in a single SubmitWindowPoSt messace. 0 = network limit (10 in nv16)
A single partition may contain up to 2349 32GiB sectors, or 2300 64GiB sectors.
//
The maximum number of sectors which can be proven in a single PoSt message is 25000 in network version 16, which
means that a single message can prove at most 10 partitions
Note that setting this value lower may result in less efficient gas use - more messages will be sent,
to prove each deadline, resulting in more total gas use (but each message will have lower gas limit)
@@ -1153,7 +1150,7 @@ required to have expiration of at least the soonest-ending deal`,
Comment: `CommittedCapacitySectorLifetime is the duration a Committed Capacity (CC) sector will
live before it must be extended or converted into sector containing deals before it is
terminated. Value must be between 180-1278 days (1278 in nv21, 540 before nv21).`,
terminated. Value must be between 180-540 days inclusive`,
},
{
Name: "WaitDealsDelay",
@@ -1298,12 +1295,6 @@ Submitting a smaller number of prove commits per epoch would reduce the possibil
Comment: ``,
},
{
Name: "UseSyntheticPoRep",
Type: "bool",
Comment: `UseSyntheticPoRep, when set to true, will reduce the amount of cache data held on disk after the completion of PreCommit 2 to 11GiB.`,
},
},
"Splitstore": []DocField{
{
+6 -8
View File
@@ -290,10 +290,13 @@ type ProvingConfig struct {
// 'lotus-miner proving compute window-post 0'
DisableWDPoStPreChecks bool
// Maximum number of partitions to prove in a single SubmitWindowPoSt messace. 0 = network limit (3 in nv21)
// Maximum number of partitions to prove in a single SubmitWindowPoSt messace. 0 = network limit (10 in nv16)
//
// A single partition may contain up to 2349 32GiB sectors, or 2300 64GiB sectors.
// //
//
// The maximum number of sectors which can be proven in a single PoSt message is 25000 in network version 16, which
// means that a single message can prove at most 10 partitions
//
// Note that setting this value lower may result in less efficient gas use - more messages will be sent,
// to prove each deadline, resulting in more total gas use (but each message will have lower gas limit)
//
@@ -355,7 +358,7 @@ type SealingConfig struct {
// CommittedCapacitySectorLifetime is the duration a Committed Capacity (CC) sector will
// live before it must be extended or converted into sector containing deals before it is
// terminated. Value must be between 180-1278 days (1278 in nv21, 540 before nv21).
// terminated. Value must be between 180-540 days inclusive
CommittedCapacitySectorLifetime Duration
// Period of time that a newly created sector will wait for more deals to be packed in to before it starts to seal.
@@ -426,9 +429,6 @@ type SealingConfig struct {
// todo TargetSealingSectors uint64
// todo TargetSectors - stop auto-pleding new sectors after this many sectors are sealed, default CC upgrade for deals sectors if above
// UseSyntheticPoRep, when set to true, will reduce the amount of cache data held on disk after the completion of PreCommit 2 to 11GiB.
UseSyntheticPoRep bool
}
type SealerConfig struct {
@@ -490,8 +490,6 @@ type MinerFeeConfig struct {
MaxWindowPoStGasFee types.FIL
MaxPublishDealsFee types.FIL
MaxMarketBalanceAddFee types.FIL
MaximizeWindowPoStFeeCap bool
}
type MinerAddressConfig struct {
+6 -21
View File
@@ -43,11 +43,9 @@ func (t *HelloMessage) MarshalCBOR(w io.Writer) error {
return err
}
for _, v := range t.HeaviestTipSet {
if err := cbg.WriteCid(cw, v); err != nil {
return xerrors.Errorf("failed to write cid field v: %w", err)
if err := cbg.WriteCid(w, v); err != nil {
return xerrors.Errorf("failed writing cid field t.HeaviestTipSet: %w", err)
}
}
// t.HeaviestTipSetHeight (abi.ChainEpoch) (int64)
@@ -118,25 +116,12 @@ func (t *HelloMessage) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
c, err := cbg.ReadCid(cr)
if err != nil {
return xerrors.Errorf("failed to read cid field t.HeaviestTipSet[i]: %w", err)
}
t.HeaviestTipSet[i] = c
}
c, err := cbg.ReadCid(cr)
if err != nil {
return xerrors.Errorf("reading cid field t.HeaviestTipSet failed: %w", err)
}
t.HeaviestTipSet[i] = c
}
// t.HeaviestTipSetHeight (abi.ChainEpoch) (int64)
+1 -1
View File
@@ -197,7 +197,7 @@ func (a *API) dealStarter(ctx context.Context, params *api.StartDealParams, isSt
return nil, xerrors.Errorf("failed to get network version: %w", err)
}
st, err := miner.PreferredSealProofTypeFromWindowPoStType(networkVersion, mi.WindowPoStProofType, false)
st, err := miner.PreferredSealProofTypeFromWindowPoStType(networkVersion, mi.WindowPoStProofType)
if err != nil {
return nil, xerrors.Errorf("failed to get seal proof type: %w", err)
}
+5 -11
View File
@@ -397,31 +397,26 @@ func (a *EthModule) EthGetTransactionReceiptLimited(ctx context.Context, txHash
}
msgLookup, err := a.StateAPI.StateSearchMsg(ctx, types.EmptyTSK, c, limit, true)
if err != nil {
return nil, xerrors.Errorf("failed to lookup Eth Txn %s as %s: %w", txHash, c, err)
}
if msgLookup == nil {
// This is the best we can do. In theory, we could have just not indexed this
// transaction, but there's no way to check that here.
if err != nil || msgLookup == nil {
return nil, nil
}
tx, err := newEthTxFromMessageLookup(ctx, msgLookup, -1, a.Chain, a.StateAPI)
if err != nil {
return nil, xerrors.Errorf("failed to convert %s into an Eth Txn: %w", txHash, err)
return nil, nil
}
var events []types.Event
if rct := msgLookup.Receipt; rct.EventsRoot != nil {
events, err = a.ChainAPI.ChainGetEvents(ctx, *rct.EventsRoot)
if err != nil {
return nil, xerrors.Errorf("failed get events for %s", txHash)
return nil, nil
}
}
receipt, err := newEthTxReceipt(ctx, tx, msgLookup, events, a.Chain, a.StateAPI)
if err != nil {
return nil, xerrors.Errorf("failed to convert %s into an Eth Receipt: %w", txHash, err)
return nil, nil
}
return &receipt, nil
@@ -733,11 +728,10 @@ func (a *EthModule) EthFeeHistory(ctx context.Context, p jsonrpc.RawParams) (eth
}
rewards, totalGasUsed := calculateRewardsAndGasUsed(rewardPercentiles, txGasRewards)
maxGas := build.BlockGasLimit * int64(len(ts.Blocks()))
// arrays should be reversed at the end
baseFeeArray = append(baseFeeArray, ethtypes.EthBigInt(basefee))
gasUsedRatioArray = append(gasUsedRatioArray, float64(totalGasUsed)/float64(maxGas))
gasUsedRatioArray = append(gasUsedRatioArray, float64(totalGasUsed)/float64(build.BlockGasLimit))
rewardsArray = append(rewardsArray, rewards)
oldestBlkHeight = uint64(ts.Height())
blocksIncluded++
+1 -7
View File
@@ -627,13 +627,7 @@ func newEthTxReceipt(ctx context.Context, tx ethtypes.EthTx, lookup *api.MsgLook
return api.EthTxReceipt{}, xerrors.Errorf("failed to lookup tipset %s when constructing the eth txn receipt: %w", lookup.TipSet, err)
}
// The tx is located in the parent tipset
parentTs, err := cs.LoadTipSet(ctx, ts.Parents())
if err != nil {
return api.EthTxReceipt{}, xerrors.Errorf("failed to lookup tipset %s when constructing the eth txn receipt: %w", ts.Parents(), err)
}
baseFee := parentTs.Blocks()[0].ParentBaseFee
baseFee := ts.Blocks()[0].ParentBaseFee
gasOutputs := vm.ComputeGasOutputs(lookup.Receipt.GasUsed, int64(tx.Gas), baseFee, big.Int(tx.MaxFeePerGas), big.Int(tx.MaxPriorityFeePerGas), true)
totalSpent := big.Sum(gasOutputs.BaseFeeBurn, gasOutputs.MinerTip, gasOutputs.OverEstimationBurn)
+34 -108
View File
@@ -6,7 +6,6 @@ import (
"encoding/json"
"errors"
"fmt"
"math"
"strconv"
"github.com/ipfs/go-cid"
@@ -20,7 +19,8 @@ import (
"github.com/filecoin-project/go-state-types/abi"
actorstypes "github.com/filecoin-project/go-state-types/actors"
"github.com/filecoin-project/go-state-types/big"
market12 "github.com/filecoin-project/go-state-types/builtin/v12/market"
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"
@@ -794,7 +794,7 @@ func (a *StateAPI) StateGetAllocationForPendingDeal(ctx context.Context, dealId
if err != nil {
return nil, err
}
if allocationId == verifreg.NoAllocationID {
if allocationId == verifregtypes.NoAllocationID {
return nil, nil
}
@@ -914,69 +914,32 @@ func (a *StateAPI) StateComputeDataCID(ctx context.Context, maddr address.Addres
return cid.Cid{}, err
}
var ccparams []byte
if nv < network.Version13 {
return a.stateComputeDataCIDv1(ctx, maddr, sectorType, deals, tsk)
} else if nv < network.Version21 {
return a.stateComputeDataCIDv2(ctx, maddr, sectorType, deals, tsk)
ccparams, err = actors.SerializeParams(&market2.ComputeDataCommitmentParams{
DealIDs: deals,
SectorType: sectorType,
})
} else {
return a.stateComputeDataCIDv3(ctx, maddr, sectorType, deals, tsk)
}
}
func (a *StateAPI) stateComputeDataCIDv1(ctx context.Context, maddr address.Address, sectorType abi.RegisteredSealProof, deals []abi.DealID, tsk types.TipSetKey) (cid.Cid, error) {
var err error
ccparams, err := actors.SerializeParams(&market2.ComputeDataCommitmentParams{
DealIDs: deals,
SectorType: sectorType,
})
if err != nil {
return cid.Undef, xerrors.Errorf("computing params for ComputeDataCommitment: %w", err)
}
ccmt := &types.Message{
To: market.Address,
From: maddr,
Value: types.NewInt(0),
// Hard coded, because the method has since been deprecated
Method: 8,
Params: ccparams,
}
r, err := a.StateCall(ctx, ccmt, tsk)
if err != nil {
return cid.Undef, xerrors.Errorf("calling ComputeDataCommitment: %w", err)
}
if r.MsgRct.ExitCode != 0 {
return cid.Undef, xerrors.Errorf("receipt for ComputeDataCommitment had exit code %d", r.MsgRct.ExitCode)
}
var c cbg.CborCid
if err := c.UnmarshalCBOR(bytes.NewReader(r.MsgRct.Return)); err != nil {
return cid.Undef, xerrors.Errorf("failed to unmarshal CBOR to CborCid: %w", err)
}
return cid.Cid(c), nil
}
func (a *StateAPI) stateComputeDataCIDv2(ctx context.Context, maddr address.Address, sectorType abi.RegisteredSealProof, deals []abi.DealID, tsk types.TipSetKey) (cid.Cid, error) {
var err error
ccparams, err := actors.SerializeParams(&market5.ComputeDataCommitmentParams{
Inputs: []*market5.SectorDataSpec{
{
DealIDs: deals,
SectorType: sectorType,
ccparams, err = actors.SerializeParams(&market5.ComputeDataCommitmentParams{
Inputs: []*market5.SectorDataSpec{
{
DealIDs: deals,
SectorType: sectorType,
},
},
},
})
})
}
if err != nil {
return cid.Undef, xerrors.Errorf("computing params for ComputeDataCommitment: %w", err)
}
ccmt := &types.Message{
To: market.Address,
From: maddr,
Value: types.NewInt(0),
// Hard coded, because the method has since been deprecated
Method: 8,
To: market.Address,
From: maddr,
Value: types.NewInt(0),
Method: market.Methods.ComputeDataCommitment,
Params: ccparams,
}
r, err := a.StateCall(ctx, ccmt, tsk)
@@ -987,6 +950,15 @@ func (a *StateAPI) stateComputeDataCIDv2(ctx context.Context, maddr address.Addr
return cid.Undef, xerrors.Errorf("receipt for ComputeDataCommitment had exit code %d", r.MsgRct.ExitCode)
}
if nv < network.Version13 {
var c cbg.CborCid
if err := c.UnmarshalCBOR(bytes.NewReader(r.MsgRct.Return)); err != nil {
return cid.Undef, xerrors.Errorf("failed to unmarshal CBOR to CborCid: %w", err)
}
return cid.Cid(c), nil
}
var cr market5.ComputeDataCommitmentReturn
if err := cr.UnmarshalCBOR(bytes.NewReader(r.MsgRct.Return)); err != nil {
return cid.Undef, xerrors.Errorf("failed to unmarshal CBOR to CborCid: %w", err)
@@ -999,52 +971,6 @@ func (a *StateAPI) stateComputeDataCIDv2(ctx context.Context, maddr address.Addr
return cid.Cid(cr.CommDs[0]), nil
}
func (a *StateAPI) stateComputeDataCIDv3(ctx context.Context, maddr address.Address, sectorType abi.RegisteredSealProof, deals []abi.DealID, tsk types.TipSetKey) (cid.Cid, error) {
if len(deals) == 0 {
return cid.Undef, nil
}
var err error
ccparams, err := actors.SerializeParams(&market12.VerifyDealsForActivationParams{
Sectors: []market12.SectorDeals{{
SectorType: sectorType,
SectorExpiry: math.MaxInt64,
DealIDs: deals,
}},
})
if err != nil {
return cid.Undef, xerrors.Errorf("computing params for VerifyDealsForActivation: %w", err)
}
ccmt := &types.Message{
To: market.Address,
From: maddr,
Value: types.NewInt(0),
Method: market.Methods.VerifyDealsForActivation,
Params: ccparams,
}
r, err := a.StateCall(ctx, ccmt, tsk)
if err != nil {
return cid.Undef, xerrors.Errorf("calling VerifyDealsForActivation: %w", err)
}
if r.MsgRct.ExitCode != 0 {
return cid.Undef, xerrors.Errorf("receipt for VerifyDealsForActivation had exit code %d", r.MsgRct.ExitCode)
}
var cr market12.VerifyDealsForActivationReturn
if err := cr.UnmarshalCBOR(bytes.NewReader(r.MsgRct.Return)); err != nil {
return cid.Undef, xerrors.Errorf("failed to unmarshal CBOR to VerifyDealsForActivationReturn: %w", err)
}
if len(cr.UnsealedCIDs) != 1 {
return cid.Undef, xerrors.Errorf("Sectors output must have 1 entry")
}
ucid := cr.UnsealedCIDs[0]
if ucid == nil {
return cid.Undef, xerrors.Errorf("computed data CID is nil")
}
return *ucid, nil
}
func (a *StateAPI) StateChangedActors(ctx context.Context, old cid.Cid, new cid.Cid) (map[string]types.Actor, error) {
store := a.Chain.ActorStore(ctx)
@@ -1114,7 +1040,7 @@ func (a *StateAPI) StateMinerAllocated(ctx context.Context, addr address.Address
return mas.GetAllocatedSectors()
}
func (a *StateAPI) StateSectorPreCommitInfo(ctx context.Context, maddr address.Address, n abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorPreCommitOnChainInfo, error) {
func (a *StateAPI) StateSectorPreCommitInfo(ctx context.Context, maddr address.Address, n abi.SectorNumber, tsk types.TipSetKey) (*minertypes.SectorPreCommitOnChainInfo, error) {
ts, err := a.Chain.GetTipSetFromKey(ctx, tsk)
if err != nil {
return nil, xerrors.Errorf("loading tipset %s: %w", tsk, err)
@@ -1389,7 +1315,7 @@ func (m *StateModule) MsigGetPending(ctx context.Context, addr address.Address,
var initialPledgeNum = types.NewInt(110)
var initialPledgeDen = types.NewInt(100)
func (a *StateAPI) StateMinerPreCommitDepositForPower(ctx context.Context, maddr address.Address, pci miner.SectorPreCommitInfo, tsk types.TipSetKey) (types.BigInt, error) {
func (a *StateAPI) StateMinerPreCommitDepositForPower(ctx context.Context, maddr address.Address, pci minertypes.SectorPreCommitInfo, tsk types.TipSetKey) (types.BigInt, error) {
ts, err := a.Chain.GetTipSetFromKey(ctx, tsk)
if err != nil {
return types.EmptyInt, xerrors.Errorf("loading tipset %s: %w", tsk, err)
@@ -1421,7 +1347,7 @@ func (a *StateAPI) StateMinerPreCommitDepositForPower(ctx context.Context, maddr
sectorWeight = builtin.QAPowerForWeight(ssize, duration, w, vw)
}
} else {
sectorWeight = miner.QAPowerMax(ssize)
sectorWeight = minertypes.QAPowerMax(ssize)
}
var powerSmoothed builtin.FilterEstimate
@@ -1453,7 +1379,7 @@ func (a *StateAPI) StateMinerPreCommitDepositForPower(ctx context.Context, maddr
return types.BigDiv(types.BigMul(deposit, initialPledgeNum), initialPledgeDen), nil
}
func (a *StateAPI) StateMinerInitialPledgeCollateral(ctx context.Context, maddr address.Address, pci miner.SectorPreCommitInfo, tsk types.TipSetKey) (types.BigInt, error) {
func (a *StateAPI) StateMinerInitialPledgeCollateral(ctx context.Context, maddr address.Address, pci minertypes.SectorPreCommitInfo, tsk types.TipSetKey) (types.BigInt, error) {
// TODO: this repeats a lot of the previous function. Fix that.
ts, err := a.Chain.GetTipSetFromKey(ctx, tsk)
if err != nil {
+3 -3
View File
@@ -35,6 +35,7 @@ import (
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
builtintypes "github.com/filecoin-project/go-state-types/builtin"
minertypes "github.com/filecoin-project/go-state-types/builtin/v9/miner"
"github.com/filecoin-project/go-state-types/network"
"github.com/filecoin-project/lotus/api"
@@ -42,7 +43,6 @@ import (
"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/builtin"
lminer "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/gen"
"github.com/filecoin-project/lotus/chain/types"
mktsdagstore "github.com/filecoin-project/lotus/markets/dagstore"
@@ -497,7 +497,7 @@ func (sm *StorageMinerAPI) SectorReceive(ctx context.Context, meta api.RemoteSec
return err
}
func (sm *StorageMinerAPI) ComputeWindowPoSt(ctx context.Context, dlIdx uint64, tsk types.TipSetKey) ([]lminer.SubmitWindowedPoStParams, error) {
func (sm *StorageMinerAPI) ComputeWindowPoSt(ctx context.Context, dlIdx uint64, tsk types.TipSetKey) ([]minertypes.SubmitWindowedPoStParams, error) {
var ts *types.TipSet
var err error
if tsk == types.EmptyTSK {
@@ -1404,7 +1404,7 @@ func (sm *StorageMinerAPI) withdrawBalance(ctx context.Context, amount abi.Token
amount = available
}
params, err := actors.SerializeParams(&lminer.WithdrawBalanceParams{
params, err := actors.SerializeParams(&minertypes.WithdrawBalanceParams{
AmountRequested: amount,
})
if err != nil {
+1 -4
View File
@@ -157,8 +157,7 @@ func SealProofType(maddr dtypes.MinerAddress, fnapi v1api.FullNode) (abi.Registe
return 0, err
}
// node seal proof type does not decide whether or not we use synthetic porep
return miner.PreferredSealProofTypeFromWindowPoStType(networkVersion, mi.WindowPoStProofType, false)
return miner.PreferredSealProofTypeFromWindowPoStType(networkVersion, mi.WindowPoStProofType)
}
func AddressSelector(addrConf *config.MinerAddressConfig) func() (*ctladdr.AddressSelector, error) {
@@ -1017,7 +1016,6 @@ func NewSetSealConfigFunc(r repo.LockedRepo) (dtypes.SetSealingConfigFunc, error
TerminateBatchMin: cfg.TerminateBatchMin,
TerminateBatchWait: config.Duration(cfg.TerminateBatchWait),
MaxSectorProveCommitsSubmittedPerEpoch: cfg.MaxSectorProveCommitsSubmittedPerEpoch,
UseSyntheticPoRep: cfg.UseSyntheticPoRep,
}
c.SetSealingConfig(newCfg)
})
@@ -1062,7 +1060,6 @@ func ToSealingConfig(dealmakingCfg config.DealmakingConfig, sealingCfg config.Se
TerminateBatchMax: sealingCfg.TerminateBatchMax,
TerminateBatchMin: sealingCfg.TerminateBatchMin,
TerminateBatchWait: time.Duration(sealingCfg.TerminateBatchWait),
UseSyntheticPoRep: sealingCfg.UseSyntheticPoRep,
}
}
+29 -48
View File
@@ -41,7 +41,7 @@ func (t *VoucherInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Proof"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Proof")); err != nil {
if _, err := io.WriteString(w, string("Proof")); err != nil {
return err
}
@@ -65,7 +65,7 @@ func (t *VoucherInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Voucher"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Voucher")); err != nil {
if _, err := io.WriteString(w, string("Voucher")); err != nil {
return err
}
@@ -81,7 +81,7 @@ func (t *VoucherInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Submitted"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Submitted")); err != nil {
if _, err := io.WriteString(w, string("Submitted")); err != nil {
return err
}
@@ -218,7 +218,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Amount"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Amount")); err != nil {
if _, err := io.WriteString(w, string("Amount")); err != nil {
return err
}
@@ -234,7 +234,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Target"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Target")); err != nil {
if _, err := io.WriteString(w, string("Target")); err != nil {
return err
}
@@ -250,7 +250,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Channel"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Channel")); err != nil {
if _, err := io.WriteString(w, string("Channel")); err != nil {
return err
}
@@ -266,7 +266,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Control"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Control")); err != nil {
if _, err := io.WriteString(w, string("Control")); err != nil {
return err
}
@@ -282,7 +282,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("NextLane"))); err != nil {
return err
}
if _, err := cw.WriteString(string("NextLane")); err != nil {
if _, err := io.WriteString(w, string("NextLane")); err != nil {
return err
}
@@ -298,7 +298,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Settling"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Settling")); err != nil {
if _, err := io.WriteString(w, string("Settling")); err != nil {
return err
}
@@ -314,7 +314,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Vouchers"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Vouchers")); err != nil {
if _, err := io.WriteString(w, string("Vouchers")); err != nil {
return err
}
@@ -339,7 +339,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ChannelID"))); err != nil {
return err
}
if _, err := cw.WriteString(string("ChannelID")); err != nil {
if _, err := io.WriteString(w, string("ChannelID")); err != nil {
return err
}
@@ -350,7 +350,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.ChannelID))); err != nil {
return err
}
if _, err := cw.WriteString(string(t.ChannelID)); err != nil {
if _, err := io.WriteString(w, string(t.ChannelID)); err != nil {
return err
}
@@ -362,7 +362,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CreateMsg"))); err != nil {
return err
}
if _, err := cw.WriteString(string("CreateMsg")); err != nil {
if _, err := io.WriteString(w, string("CreateMsg")); err != nil {
return err
}
@@ -384,7 +384,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Direction"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Direction")); err != nil {
if _, err := io.WriteString(w, string("Direction")); err != nil {
return err
}
@@ -400,7 +400,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("AddFundsMsg"))); err != nil {
return err
}
if _, err := cw.WriteString(string("AddFundsMsg")); err != nil {
if _, err := io.WriteString(w, string("AddFundsMsg")); err != nil {
return err
}
@@ -422,7 +422,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PendingAmount"))); err != nil {
return err
}
if _, err := cw.WriteString(string("PendingAmount")); err != nil {
if _, err := io.WriteString(w, string("PendingAmount")); err != nil {
return err
}
@@ -438,7 +438,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("AvailableAmount"))); err != nil {
return err
}
if _, err := cw.WriteString(string("AvailableAmount")); err != nil {
if _, err := io.WriteString(w, string("AvailableAmount")); err != nil {
return err
}
@@ -454,7 +454,7 @@ func (t *ChannelInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PendingAvailableAmount"))); err != nil {
return err
}
if _, err := cw.WriteString(string("PendingAvailableAmount")); err != nil {
if _, err := io.WriteString(w, string("PendingAvailableAmount")); err != nil {
return err
}
@@ -606,32 +606,13 @@ func (t *ChannelInfo) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
b, err := cr.ReadByte()
if err != nil {
return err
}
if b != cbg.CborNull[0] {
if err := cr.UnreadByte(); err != nil {
return err
}
t.Vouchers[i] = new(VoucherInfo)
if err := t.Vouchers[i].UnmarshalCBOR(cr); err != nil {
return xerrors.Errorf("unmarshaling t.Vouchers[i] pointer: %w", err)
}
}
}
var v VoucherInfo
if err := v.UnmarshalCBOR(cr); err != nil {
return err
}
t.Vouchers[i] = &v
}
// t.ChannelID (string) (string)
@@ -765,7 +746,7 @@ func (t *MsgInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Err"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Err")); err != nil {
if _, err := io.WriteString(w, string("Err")); err != nil {
return err
}
@@ -776,7 +757,7 @@ func (t *MsgInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Err))); err != nil {
return err
}
if _, err := cw.WriteString(string(t.Err)); err != nil {
if _, err := io.WriteString(w, string(t.Err)); err != nil {
return err
}
@@ -788,7 +769,7 @@ func (t *MsgInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("MsgCid"))); err != nil {
return err
}
if _, err := cw.WriteString(string("MsgCid")); err != nil {
if _, err := io.WriteString(w, string("MsgCid")); err != nil {
return err
}
@@ -804,7 +785,7 @@ func (t *MsgInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Received"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Received")); err != nil {
if _, err := io.WriteString(w, string("Received")); err != nil {
return err
}
@@ -820,7 +801,7 @@ func (t *MsgInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ChannelID"))); err != nil {
return err
}
if _, err := cw.WriteString(string("ChannelID")); err != nil {
if _, err := io.WriteString(w, string("ChannelID")); err != nil {
return err
}
@@ -831,7 +812,7 @@ func (t *MsgInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.ChannelID))); err != nil {
return err
}
if _, err := cw.WriteString(string(t.ChannelID)); err != nil {
if _, err := io.WriteString(w, string(t.ChannelID)); err != nil {
return err
}
return nil
+1 -1
View File
@@ -548,7 +548,7 @@ func (st *Local) AcquireSector(ctx context.Context, sid storiface.SectorRef, exi
}
if best == "" {
return storiface.SectorPaths{}, storiface.SectorPaths{}, storiface.Err(storiface.ErrTempAllocateSpace, xerrors.Errorf("couldn't find a suitable path for a sector"))
return storiface.SectorPaths{}, storiface.SectorPaths{}, xerrors.Errorf("couldn't find a suitable path for a sector")
}
storiface.SetPathByType(&out, fileType, best)
+67 -94
View File
@@ -43,7 +43,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Log"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Log")); err != nil {
if _, err := io.WriteString(w, string("Log")); err != nil {
return err
}
@@ -68,7 +68,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CommD"))); err != nil {
return err
}
if _, err := cw.WriteString(string("CommD")); err != nil {
if _, err := io.WriteString(w, string("CommD")); err != nil {
return err
}
@@ -90,7 +90,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CommR"))); err != nil {
return err
}
if _, err := cw.WriteString(string("CommR")); err != nil {
if _, err := io.WriteString(w, string("CommR")); err != nil {
return err
}
@@ -112,7 +112,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Proof"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Proof")); err != nil {
if _, err := io.WriteString(w, string("Proof")); err != nil {
return err
}
@@ -136,7 +136,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("State"))); err != nil {
return err
}
if _, err := cw.WriteString(string("State")); err != nil {
if _, err := io.WriteString(w, string("State")); err != nil {
return err
}
@@ -147,7 +147,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.State))); err != nil {
return err
}
if _, err := cw.WriteString(string(t.State)); err != nil {
if _, err := io.WriteString(w, string(t.State)); err != nil {
return err
}
@@ -159,7 +159,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Pieces"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Pieces")); err != nil {
if _, err := io.WriteString(w, string("Pieces")); err != nil {
return err
}
@@ -184,7 +184,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Return"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Return")); err != nil {
if _, err := io.WriteString(w, string("Return")); err != nil {
return err
}
@@ -195,7 +195,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Return))); err != nil {
return err
}
if _, err := cw.WriteString(string(t.Return)); err != nil {
if _, err := io.WriteString(w, string(t.Return)); err != nil {
return err
}
@@ -207,7 +207,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("LastErr"))); err != nil {
return err
}
if _, err := cw.WriteString(string("LastErr")); err != nil {
if _, err := io.WriteString(w, string("LastErr")); err != nil {
return err
}
@@ -218,7 +218,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.LastErr))); err != nil {
return err
}
if _, err := cw.WriteString(string(t.LastErr)); err != nil {
if _, err := io.WriteString(w, string(t.LastErr)); err != nil {
return err
}
@@ -230,7 +230,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CCPieces"))); err != nil {
return err
}
if _, err := cw.WriteString(string("CCPieces")); err != nil {
if _, err := io.WriteString(w, string("CCPieces")); err != nil {
return err
}
@@ -255,7 +255,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CCUpdate"))); err != nil {
return err
}
if _, err := cw.WriteString(string("CCUpdate")); err != nil {
if _, err := io.WriteString(w, string("CCUpdate")); err != nil {
return err
}
@@ -271,7 +271,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("SeedEpoch"))); err != nil {
return err
}
if _, err := cw.WriteString(string("SeedEpoch")); err != nil {
if _, err := io.WriteString(w, string("SeedEpoch")); err != nil {
return err
}
@@ -293,7 +293,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("SeedValue"))); err != nil {
return err
}
if _, err := cw.WriteString(string("SeedValue")); err != nil {
if _, err := io.WriteString(w, string("SeedValue")); err != nil {
return err
}
@@ -317,7 +317,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("SectorType"))); err != nil {
return err
}
if _, err := cw.WriteString(string("SectorType")); err != nil {
if _, err := io.WriteString(w, string("SectorType")); err != nil {
return err
}
@@ -339,7 +339,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("TicketEpoch"))); err != nil {
return err
}
if _, err := cw.WriteString(string("TicketEpoch")); err != nil {
if _, err := io.WriteString(w, string("TicketEpoch")); err != nil {
return err
}
@@ -361,7 +361,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("TicketValue"))); err != nil {
return err
}
if _, err := cw.WriteString(string("TicketValue")); err != nil {
if _, err := io.WriteString(w, string("TicketValue")); err != nil {
return err
}
@@ -385,7 +385,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CreationTime"))); err != nil {
return err
}
if _, err := cw.WriteString(string("CreationTime")); err != nil {
if _, err := io.WriteString(w, string("CreationTime")); err != nil {
return err
}
@@ -407,7 +407,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("SectorNumber"))); err != nil {
return err
}
if _, err := cw.WriteString(string("SectorNumber")); err != nil {
if _, err := io.WriteString(w, string("SectorNumber")); err != nil {
return err
}
@@ -423,7 +423,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("TerminatedAt"))); err != nil {
return err
}
if _, err := cw.WriteString(string("TerminatedAt")); err != nil {
if _, err := io.WriteString(w, string("TerminatedAt")); err != nil {
return err
}
@@ -445,7 +445,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("UpdateSealed"))); err != nil {
return err
}
if _, err := cw.WriteString(string("UpdateSealed")); err != nil {
if _, err := io.WriteString(w, string("UpdateSealed")); err != nil {
return err
}
@@ -467,7 +467,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("CommitMessage"))); err != nil {
return err
}
if _, err := cw.WriteString(string("CommitMessage")); err != nil {
if _, err := io.WriteString(w, string("CommitMessage")); err != nil {
return err
}
@@ -489,7 +489,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("InvalidProofs"))); err != nil {
return err
}
if _, err := cw.WriteString(string("InvalidProofs")); err != nil {
if _, err := io.WriteString(w, string("InvalidProofs")); err != nil {
return err
}
@@ -505,7 +505,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PreCommit1Out"))); err != nil {
return err
}
if _, err := cw.WriteString(string("PreCommit1Out")); err != nil {
if _, err := io.WriteString(w, string("PreCommit1Out")); err != nil {
return err
}
@@ -529,7 +529,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("FaultReportMsg"))); err != nil {
return err
}
if _, err := cw.WriteString(string("FaultReportMsg")); err != nil {
if _, err := io.WriteString(w, string("FaultReportMsg")); err != nil {
return err
}
@@ -551,7 +551,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("UpdateUnsealed"))); err != nil {
return err
}
if _, err := cw.WriteString(string("UpdateUnsealed")); err != nil {
if _, err := io.WriteString(w, string("UpdateUnsealed")); err != nil {
return err
}
@@ -573,7 +573,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PreCommit1Fails"))); err != nil {
return err
}
if _, err := cw.WriteString(string("PreCommit1Fails")); err != nil {
if _, err := io.WriteString(w, string("PreCommit1Fails")); err != nil {
return err
}
@@ -589,7 +589,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PreCommit2Fails"))); err != nil {
return err
}
if _, err := cw.WriteString(string("PreCommit2Fails")); err != nil {
if _, err := io.WriteString(w, string("PreCommit2Fails")); err != nil {
return err
}
@@ -605,7 +605,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PreCommitTipSet"))); err != nil {
return err
}
if _, err := cw.WriteString(string("PreCommitTipSet")); err != nil {
if _, err := io.WriteString(w, string("PreCommitTipSet")); err != nil {
return err
}
@@ -621,7 +621,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteDataCache"))); err != nil {
return err
}
if _, err := cw.WriteString(string("RemoteDataCache")); err != nil {
if _, err := io.WriteString(w, string("RemoteDataCache")); err != nil {
return err
}
@@ -637,7 +637,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PreCommitDeposit"))); err != nil {
return err
}
if _, err := cw.WriteString(string("PreCommitDeposit")); err != nil {
if _, err := io.WriteString(w, string("PreCommitDeposit")); err != nil {
return err
}
@@ -653,7 +653,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("PreCommitMessage"))); err != nil {
return err
}
if _, err := cw.WriteString(string("PreCommitMessage")); err != nil {
if _, err := io.WriteString(w, string("PreCommitMessage")); err != nil {
return err
}
@@ -675,7 +675,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteDataSealed"))); err != nil {
return err
}
if _, err := cw.WriteString(string("RemoteDataSealed")); err != nil {
if _, err := io.WriteString(w, string("RemoteDataSealed")); err != nil {
return err
}
@@ -691,7 +691,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("TerminateMessage"))); err != nil {
return err
}
if _, err := cw.WriteString(string("TerminateMessage")); err != nil {
if _, err := io.WriteString(w, string("TerminateMessage")); err != nil {
return err
}
@@ -713,7 +713,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteDataUnsealed"))); err != nil {
return err
}
if _, err := cw.WriteString(string("RemoteDataUnsealed")); err != nil {
if _, err := io.WriteString(w, string("RemoteDataUnsealed")); err != nil {
return err
}
@@ -729,7 +729,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ReplicaUpdateProof"))); err != nil {
return err
}
if _, err := cw.WriteString(string("ReplicaUpdateProof")); err != nil {
if _, err := io.WriteString(w, string("ReplicaUpdateProof")); err != nil {
return err
}
@@ -753,7 +753,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteDataFinalized"))); err != nil {
return err
}
if _, err := cw.WriteString(string("RemoteDataFinalized")); err != nil {
if _, err := io.WriteString(w, string("RemoteDataFinalized")); err != nil {
return err
}
@@ -769,7 +769,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("ReplicaUpdateMessage"))); err != nil {
return err
}
if _, err := cw.WriteString(string("ReplicaUpdateMessage")); err != nil {
if _, err := io.WriteString(w, string("ReplicaUpdateMessage")); err != nil {
return err
}
@@ -791,7 +791,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteCommit1Endpoint"))); err != nil {
return err
}
if _, err := cw.WriteString(string("RemoteCommit1Endpoint")); err != nil {
if _, err := io.WriteString(w, string("RemoteCommit1Endpoint")); err != nil {
return err
}
@@ -802,7 +802,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RemoteCommit1Endpoint))); err != nil {
return err
}
if _, err := cw.WriteString(string(t.RemoteCommit1Endpoint)); err != nil {
if _, err := io.WriteString(w, string(t.RemoteCommit1Endpoint)); err != nil {
return err
}
@@ -814,7 +814,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteCommit2Endpoint"))); err != nil {
return err
}
if _, err := cw.WriteString(string("RemoteCommit2Endpoint")); err != nil {
if _, err := io.WriteString(w, string("RemoteCommit2Endpoint")); err != nil {
return err
}
@@ -825,7 +825,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RemoteCommit2Endpoint))); err != nil {
return err
}
if _, err := cw.WriteString(string(t.RemoteCommit2Endpoint)); err != nil {
if _, err := io.WriteString(w, string(t.RemoteCommit2Endpoint)); err != nil {
return err
}
@@ -837,7 +837,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("RemoteSealingDoneEndpoint"))); err != nil {
return err
}
if _, err := cw.WriteString(string("RemoteSealingDoneEndpoint")); err != nil {
if _, err := io.WriteString(w, string("RemoteSealingDoneEndpoint")); err != nil {
return err
}
@@ -848,7 +848,7 @@ func (t *SectorInfo) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.RemoteSealingDoneEndpoint))); err != nil {
return err
}
if _, err := cw.WriteString(string(t.RemoteSealingDoneEndpoint)); err != nil {
if _, err := io.WriteString(w, string(t.RemoteSealingDoneEndpoint)); err != nil {
return err
}
return nil
@@ -913,22 +913,13 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
if err := t.Log[i].UnmarshalCBOR(cr); err != nil {
return xerrors.Errorf("unmarshaling t.Log[i]: %w", err)
}
}
var v Log
if err := v.UnmarshalCBOR(cr); err != nil {
return err
}
t.Log[i] = v
}
// t.CommD (cid.Cid) (struct)
@@ -1031,22 +1022,13 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
if err := t.Pieces[i].UnmarshalCBOR(cr); err != nil {
return xerrors.Errorf("unmarshaling t.Pieces[i]: %w", err)
}
}
var v api.SectorPiece
if err := v.UnmarshalCBOR(cr); err != nil {
return err
}
t.Pieces[i] = v
}
// t.Return (sealing.ReturnState) (string)
@@ -1092,22 +1074,13 @@ func (t *SectorInfo) UnmarshalCBOR(r io.Reader) (err error) {
}
for i := 0; i < int(extra); i++ {
{
var maj byte
var extra uint64
var err error
_ = maj
_ = extra
_ = err
{
if err := t.CCPieces[i].UnmarshalCBOR(cr); err != nil {
return xerrors.Errorf("unmarshaling t.CCPieces[i]: %w", err)
}
}
var v api.SectorPiece
if err := v.UnmarshalCBOR(cr); err != nil {
return err
}
t.CCPieces[i] = v
}
// t.CCUpdate (bool) (bool)
@@ -1727,7 +1700,7 @@ func (t *Log) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Kind"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Kind")); err != nil {
if _, err := io.WriteString(w, string("Kind")); err != nil {
return err
}
@@ -1738,7 +1711,7 @@ func (t *Log) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Kind))); err != nil {
return err
}
if _, err := cw.WriteString(string(t.Kind)); err != nil {
if _, err := io.WriteString(w, string(t.Kind)); err != nil {
return err
}
@@ -1750,7 +1723,7 @@ func (t *Log) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Trace"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Trace")); err != nil {
if _, err := io.WriteString(w, string("Trace")); err != nil {
return err
}
@@ -1761,7 +1734,7 @@ func (t *Log) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Trace))); err != nil {
return err
}
if _, err := cw.WriteString(string(t.Trace)); err != nil {
if _, err := io.WriteString(w, string(t.Trace)); err != nil {
return err
}
@@ -1773,7 +1746,7 @@ func (t *Log) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Message"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Message")); err != nil {
if _, err := io.WriteString(w, string("Message")); err != nil {
return err
}
@@ -1784,7 +1757,7 @@ func (t *Log) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len(t.Message))); err != nil {
return err
}
if _, err := cw.WriteString(string(t.Message)); err != nil {
if _, err := io.WriteString(w, string(t.Message)); err != nil {
return err
}
@@ -1796,7 +1769,7 @@ func (t *Log) MarshalCBOR(w io.Writer) error {
if err := cw.WriteMajorTypeHeader(cbg.MajTextString, uint64(len("Timestamp"))); err != nil {
return err
}
if _, err := cw.WriteString(string("Timestamp")); err != nil {
if _, err := io.WriteString(w, string("Timestamp")); err != nil {
return err
}
+6 -8
View File
@@ -106,15 +106,13 @@ func checkPrecommit(ctx context.Context, maddr address.Address, si SectorInfo, t
return err
}
if si.hasDeals() {
commD, err := api.StateComputeDataCID(ctx, maddr, si.SectorType, si.dealIDs(), tsk)
if err != nil {
return &ErrApi{xerrors.Errorf("calling StateComputeDataCommitment: %w", err)}
}
commD, err := api.StateComputeDataCID(ctx, maddr, si.SectorType, si.dealIDs(), tsk)
if err != nil {
return &ErrApi{xerrors.Errorf("calling StateComputeDataCommitment: %w", err)}
}
if si.CommD == nil || !commD.Equals(*si.CommD) {
return &ErrBadCommD{xerrors.Errorf("on chain CommD differs from sector: %s != %s", commD, si.CommD)}
}
if si.CommD == nil || !commD.Equals(*si.CommD) {
return &ErrBadCommD{xerrors.Errorf("on chain CommD differs from sector: %s != %s", commD, si.CommD)}
}
pci, err := api.StateSectorPreCommitInfo(ctx, maddr, si.SectorNumber, tsk)

Some files were not shown because too many files have changed in this diff Show More