From 048d0e0d7a37773a519ff45662c444150f3fa0d6 Mon Sep 17 00:00:00 2001 From: waynewyang Date: Mon, 29 Jun 2020 19:13:28 +0800 Subject: [PATCH 01/15] set 'true' after handle be called --- chain/events/events_height.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/events/events_height.go b/chain/events/events_height.go index fc94d6262..24d758a31 100644 --- a/chain/events/events_height.go +++ b/chain/events/events_height.go @@ -93,7 +93,6 @@ func (e *heightEvents) headChangeAt(rev, app []*types.TipSet) error { if hnd.called { return nil } - hnd.called = true triggerH := h - abi.ChainEpoch(hnd.confidence) @@ -108,6 +107,7 @@ func (e *heightEvents) headChangeAt(rev, app []*types.TipSet) error { e.lk.Unlock() err = handle(ctx, incTs, h) e.lk.Lock() + hnd.called = true span.End() if err != nil { From 2fd860324f1470bc47fe21d25173287a58d07c31 Mon Sep 17 00:00:00 2001 From: austinabell Date: Fri, 10 Jul 2020 19:59:58 -0400 Subject: [PATCH 02/15] avoid generating cids on all messages before checking message length --- chain/sync.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chain/sync.go b/chain/sync.go index ccc52cf57..66bb8318c 100644 --- a/chain/sync.go +++ b/chain/sync.go @@ -349,6 +349,10 @@ func zipTipSetAndMessages(bs cbor.IpldStore, ts *types.TipSet, allbmsgs []*types fts := &store.FullTipSet{} for bi, b := range ts.Blocks() { + if msgc := len(bmi[bi]) + len(smi[bi]); msgc > build.BlockMessageLimit { + return nil, fmt.Errorf("block %q has too many messages (%d)", b.Cid(), msgc) + } + var smsgs []*types.SignedMessage var smsgCids []cbg.CBORMarshaler for _, m := range smi[bi] { @@ -365,10 +369,6 @@ func zipTipSetAndMessages(bs cbor.IpldStore, ts *types.TipSet, allbmsgs []*types bmsgCids = append(bmsgCids, &c) } - if msgc := len(bmsgCids) + len(smsgCids); msgc > build.BlockMessageLimit { - return nil, fmt.Errorf("block %q has too many messages (%d)", b.Cid(), msgc) - } - mrcid, err := computeMsgMeta(bs, bmsgCids, smsgCids) if err != nil { return nil, err From 12b63d59b2a78438f67a88a249f6ebd825ce8318 Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Fri, 10 Jul 2020 16:52:04 -0400 Subject: [PATCH 03/15] Include unlock duration as a param for multisig creation --- api/api_full.go | 6 +++--- api/apistruct/struct.go | 6 +++--- build/version.go | 2 +- cli/multisig.go | 10 +++++++++- node/impl/full/multisig.go | 3 ++- 5 files changed, 18 insertions(+), 9 deletions(-) diff --git a/api/api_full.go b/api/api_full.go index 09c69a1ba..ceeceb05b 100644 --- a/api/api_full.go +++ b/api/api_full.go @@ -308,9 +308,9 @@ type FullNode interface { // MsigGetAvailableBalance returns the portion of a multisig's balance that can be withdrawn or spent MsigGetAvailableBalance(context.Context, address.Address, types.TipSetKey) (types.BigInt, error) // MsigGetAvailableBalance creates a multisig wallet - // It takes the following params: , , , - // , - MsigCreate(context.Context, int64, []address.Address, types.BigInt, address.Address, types.BigInt) (cid.Cid, error) + // It takes the following params: , , + //, , + MsigCreate(context.Context, int64, []address.Address, abi.ChainEpoch, types.BigInt, address.Address, types.BigInt) (cid.Cid, error) // MsigPropose proposes a multisig message // It takes the following params: , , , // , , diff --git a/api/apistruct/struct.go b/api/apistruct/struct.go index db6e0b27b..d3b109666 100644 --- a/api/apistruct/struct.go +++ b/api/apistruct/struct.go @@ -158,7 +158,7 @@ type FullNodeStruct struct { StateCompute func(context.Context, abi.ChainEpoch, []*types.Message, types.TipSetKey) (*api.ComputeStateOutput, error) `perm:"read"` MsigGetAvailableBalance func(context.Context, address.Address, types.TipSetKey) (types.BigInt, error) `perm:"read"` - MsigCreate func(context.Context, int64, []address.Address, types.BigInt, address.Address, types.BigInt) (cid.Cid, error) `perm:"sign"` + MsigCreate func(context.Context, int64, []address.Address, abi.ChainEpoch, types.BigInt, address.Address, types.BigInt) (cid.Cid, error) `perm:"sign"` MsigPropose func(context.Context, address.Address, address.Address, types.BigInt, address.Address, uint64, []byte) (cid.Cid, error) `perm:"sign"` MsigApprove func(context.Context, address.Address, uint64, address.Address, address.Address, types.BigInt, address.Address, uint64, []byte) (cid.Cid, error) `perm:"sign"` MsigCancel func(context.Context, address.Address, uint64, address.Address, address.Address, types.BigInt, address.Address, uint64, []byte) (cid.Cid, error) `perm:"sign"` @@ -692,8 +692,8 @@ func (c *FullNodeStruct) MsigGetAvailableBalance(ctx context.Context, a address. return c.Internal.MsigGetAvailableBalance(ctx, a, tsk) } -func (c *FullNodeStruct) MsigCreate(ctx context.Context, req int64, addrs []address.Address, val types.BigInt, src address.Address, gp types.BigInt) (cid.Cid, error) { - return c.Internal.MsigCreate(ctx, req, addrs, val, src, gp) +func (c *FullNodeStruct) MsigCreate(ctx context.Context, req int64, addrs []address.Address, duration abi.ChainEpoch, val types.BigInt, src address.Address, gp types.BigInt) (cid.Cid, error) { + return c.Internal.MsigCreate(ctx, req, addrs, duration, val, src, gp) } func (c *FullNodeStruct) MsigPropose(ctx context.Context, msig address.Address, to address.Address, amt types.BigInt, src address.Address, method uint64, params []byte) (cid.Cid, error) { diff --git a/build/version.go b/build/version.go index b5d48eac7..26f3bed41 100644 --- a/build/version.go +++ b/build/version.go @@ -53,7 +53,7 @@ func (ve Version) EqMajorMinor(v2 Version) bool { } // APIVersion is a semver version of the rpc api exposed -var APIVersion Version = newVer(0, 5, 0) +var APIVersion Version = newVer(0, 6, 0) //nolint:varcheck,deadcode const ( diff --git a/cli/multisig.go b/cli/multisig.go index 9de881d95..125942054 100644 --- a/cli/multisig.go +++ b/cli/multisig.go @@ -6,6 +6,7 @@ import ( "encoding/binary" "encoding/hex" "fmt" + "github.com/filecoin-project/specs-actors/actors/abi" "os" "sort" "strconv" @@ -57,6 +58,11 @@ var msigCreateCmd = &cli.Command{ Usage: "initial funds to give to multisig", Value: "0", }, + &cli.StringFlag{ + Name: "duration", + Usage: "length of the period over which funds unlock", + Value: "0", + }, &cli.StringFlag{ Name: "from", Usage: "account to send the create message from", @@ -114,9 +120,11 @@ var msigCreateCmd = &cli.Command{ required = int64(len(addrs)) } + d := abi.ChainEpoch(cctx.Uint64("duration")) + gp := types.NewInt(1) - msgCid, err := api.MsigCreate(ctx, required, addrs, intVal, sendAddr, gp) + msgCid, err := api.MsigCreate(ctx, required, addrs, d, intVal, sendAddr, gp) if err != nil { return err } diff --git a/node/impl/full/multisig.go b/node/impl/full/multisig.go index 65e64e22f..2fe123621 100644 --- a/node/impl/full/multisig.go +++ b/node/impl/full/multisig.go @@ -26,7 +26,7 @@ type MsigAPI struct { MpoolAPI MpoolAPI } -func (a *MsigAPI) MsigCreate(ctx context.Context, req int64, addrs []address.Address, val types.BigInt, src address.Address, gp types.BigInt) (cid.Cid, error) { +func (a *MsigAPI) MsigCreate(ctx context.Context, req int64, addrs []address.Address, duration abi.ChainEpoch, val types.BigInt, src address.Address, gp types.BigInt) (cid.Cid, error) { lenAddrs := int64(len(addrs)) @@ -50,6 +50,7 @@ func (a *MsigAPI) MsigCreate(ctx context.Context, req int64, addrs []address.Add msigParams := &samsig.ConstructorParams{ Signers: addrs, NumApprovalsThreshold: req, + UnlockDuration: duration, } enc, actErr := actors.SerializeParams(msigParams) From 858513559b88919fec95b9b631b6edc5b6e9ad86 Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Sat, 11 Jul 2020 23:54:25 -0400 Subject: [PATCH 04/15] API improvements --- api/api_full.go | 11 ++++------- api/apistruct/struct.go | 6 +++--- cli/state.go | 6 +++++- node/impl/full/multisig.go | 4 ++-- node/impl/full/state.go | 6 ++++-- storage/adapter_storage_miner.go | 4 ++-- 6 files changed, 20 insertions(+), 17 deletions(-) diff --git a/api/api_full.go b/api/api_full.go index ceeceb05b..45ec2299e 100644 --- a/api/api_full.go +++ b/api/api_full.go @@ -26,8 +26,6 @@ import ( type FullNode interface { Common - // TODO: TipSetKeys - // MethodGroup: Chain // The Chain method group contains methods for interacting with the // blockchain, but that do not require any form of state computation. @@ -320,10 +318,9 @@ type FullNode interface { // , , MsigApprove(context.Context, address.Address, uint64, address.Address, address.Address, types.BigInt, address.Address, uint64, []byte) (cid.Cid, error) // MsigCancel cancels a previously-proposed multisig message - // It takes the following params: , , , , , + // It takes the following params: , , , , // , , - // TODO: You can't cancel someone else's proposed message, so "src" and "proposer" here are redundant - MsigCancel(context.Context, address.Address, uint64, address.Address, address.Address, types.BigInt, address.Address, uint64, []byte) (cid.Cid, error) + MsigCancel(context.Context, address.Address, uint64, address.Address, types.BigInt, address.Address, uint64, []byte) (cid.Cid, error) MarketEnsureAvailable(context.Context, address.Address, address.Address, types.BigInt) (cid.Cid, error) // MarketFreeBalance @@ -380,8 +377,8 @@ type DealInfo struct { type MsgLookup struct { Receipt types.MessageReceipt ReturnDec interface{} - // TODO: This should probably a tipsetkey? - TipSet *types.TipSet + TipSet types.TipSetKey + Height abi.ChainEpoch } type BlockMessages struct { diff --git a/api/apistruct/struct.go b/api/apistruct/struct.go index d3b109666..fb7ed50e8 100644 --- a/api/apistruct/struct.go +++ b/api/apistruct/struct.go @@ -161,7 +161,7 @@ type FullNodeStruct struct { MsigCreate func(context.Context, int64, []address.Address, abi.ChainEpoch, types.BigInt, address.Address, types.BigInt) (cid.Cid, error) `perm:"sign"` MsigPropose func(context.Context, address.Address, address.Address, types.BigInt, address.Address, uint64, []byte) (cid.Cid, error) `perm:"sign"` MsigApprove func(context.Context, address.Address, uint64, address.Address, address.Address, types.BigInt, address.Address, uint64, []byte) (cid.Cid, error) `perm:"sign"` - MsigCancel func(context.Context, address.Address, uint64, address.Address, address.Address, types.BigInt, address.Address, uint64, []byte) (cid.Cid, error) `perm:"sign"` + MsigCancel func(context.Context, address.Address, uint64, address.Address, types.BigInt, address.Address, uint64, []byte) (cid.Cid, error) `perm:"sign"` MarketEnsureAvailable func(context.Context, address.Address, address.Address, types.BigInt) (cid.Cid, error) `perm:"sign"` @@ -704,8 +704,8 @@ func (c *FullNodeStruct) MsigApprove(ctx context.Context, msig address.Address, return c.Internal.MsigApprove(ctx, msig, txID, proposer, to, amt, src, method, params) } -func (c *FullNodeStruct) MsigCancel(ctx context.Context, msig address.Address, txID uint64, proposer address.Address, to address.Address, amt types.BigInt, src address.Address, method uint64, params []byte) (cid.Cid, error) { - return c.Internal.MsigCancel(ctx, msig, txID, proposer, to, amt, src, method, params) +func (c *FullNodeStruct) MsigCancel(ctx context.Context, msig address.Address, txID uint64, to address.Address, amt types.BigInt, src address.Address, method uint64, params []byte) (cid.Cid, error) { + return c.Internal.MsigCancel(ctx, msig, txID, to, amt, src, method, params) } func (c *FullNodeStruct) MarketEnsureAvailable(ctx context.Context, addr, wallet address.Address, amt types.BigInt) (cid.Cid, error) { diff --git a/cli/state.go b/cli/state.go index da4a201d5..bdc944f46 100644 --- a/cli/state.go +++ b/cli/state.go @@ -337,7 +337,11 @@ var stateReplaySetCmd = &cli.Command{ return xerrors.Errorf("finding message in chain: %w", err) } - ts, err = fapi.ChainGetTipSet(ctx, r.TipSet.Parents()) + childTs, err := fapi.ChainGetTipSet(ctx, r.TipSet) + if err != nil { + return xerrors.Errorf("loading tipset: %w", err) + } + ts, err = fapi.ChainGetTipSet(ctx, childTs.Parents()) } if err != nil { return err diff --git a/node/impl/full/multisig.go b/node/impl/full/multisig.go index 2fe123621..7d450da2e 100644 --- a/node/impl/full/multisig.go +++ b/node/impl/full/multisig.go @@ -139,8 +139,8 @@ func (a *MsigAPI) MsigApprove(ctx context.Context, msig address.Address, txID ui return a.msigApproveOrCancel(ctx, api.MsigApprove, msig, txID, proposer, to, amt, src, method, params) } -func (a *MsigAPI) MsigCancel(ctx context.Context, msig address.Address, txID uint64, proposer address.Address, to address.Address, amt types.BigInt, src address.Address, method uint64, params []byte) (cid.Cid, error) { - return a.msigApproveOrCancel(ctx, api.MsigCancel, msig, txID, proposer, to, amt, src, method, params) +func (a *MsigAPI) MsigCancel(ctx context.Context, msig address.Address, txID uint64, to address.Address, amt types.BigInt, src address.Address, method uint64, params []byte) (cid.Cid, error) { + return a.msigApproveOrCancel(ctx, api.MsigCancel, msig, txID, src, to, amt, src, method, params) } func (a *MsigAPI) msigApproveOrCancel(ctx context.Context, operation api.MsigProposeResponse, msig address.Address, txID uint64, proposer address.Address, to address.Address, amt types.BigInt, src address.Address, method uint64, params []byte) (cid.Cid, error) { diff --git a/node/impl/full/state.go b/node/impl/full/state.go index 179267944..fd33d06b1 100644 --- a/node/impl/full/state.go +++ b/node/impl/full/state.go @@ -385,7 +385,8 @@ func (a *StateAPI) StateWaitMsg(ctx context.Context, msg cid.Cid, confidence uin return &api.MsgLookup{ Receipt: *recpt, ReturnDec: returndec, - TipSet: ts, + TipSet: ts.Key(), + Height: ts.Height(), }, nil } @@ -398,7 +399,8 @@ func (a *StateAPI) StateSearchMsg(ctx context.Context, msg cid.Cid) (*api.MsgLoo if ts != nil { return &api.MsgLookup{ Receipt: *recpt, - TipSet: ts, + TipSet: ts.Key(), + Height: ts.Height(), }, nil } else { return nil, nil diff --git a/storage/adapter_storage_miner.go b/storage/adapter_storage_miner.go index 5fc811997..bb5f74840 100644 --- a/storage/adapter_storage_miner.go +++ b/storage/adapter_storage_miner.go @@ -93,8 +93,8 @@ func (s SealingAPIAdapter) StateWaitMsg(ctx context.Context, mcid cid.Cid) (seal Return: wmsg.Receipt.Return, GasUsed: wmsg.Receipt.GasUsed, }, - TipSetTok: wmsg.TipSet.Key().Bytes(), - Height: wmsg.TipSet.Height(), + TipSetTok: wmsg.TipSet.Bytes(), + Height: wmsg.Height, }, nil } From 2a61b241a80b2af649be06cbfa6d382d69c55769 Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Fri, 10 Jul 2020 00:26:32 -0400 Subject: [PATCH 05/15] Replace abi.BitFieldUnion with bitfield.MultiMerge --- chain/stmgr/utils.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chain/stmgr/utils.go b/chain/stmgr/utils.go index f08c39af0..9d4665402 100644 --- a/chain/stmgr/utils.go +++ b/chain/stmgr/utils.go @@ -112,7 +112,7 @@ func SectorSetSizes(ctx context.Context, sm *StateManager, maddr address.Address return api.MinerSectors{}, xerrors.Errorf("(get sset) failed to load miner actor state: %w", err) } - notProving, err := abi.BitFieldUnion(mas.Faults, mas.Recoveries) + notProving, err := bitfield.MultiMerge(mas.Faults, mas.Recoveries) if err != nil { return api.MinerSectors{}, err } @@ -193,7 +193,7 @@ func GetSectorsForWinningPoSt(ctx context.Context, pv ffiwrapper.Verifier, sm *S return nil, xerrors.Errorf("failed to load deadlines: %w", err) } - notProving, err := abi.BitFieldUnion(mas.Faults, mas.Recoveries) + notProving, err := bitfield.MultiMerge(mas.Faults, mas.Recoveries) if err != nil { return nil, xerrors.Errorf("failed to union faults and recoveries: %w", err) } @@ -485,7 +485,7 @@ func ComputeState(ctx context.Context, sm *StateManager, height abi.ChainEpoch, } func GetProvingSetRaw(ctx context.Context, sm *StateManager, mas miner.State) ([]*api.ChainSectorInfo, error) { - notProving, err := abi.BitFieldUnion(mas.Faults, mas.Recoveries) + notProving, err := bitfield.MultiMerge(mas.Faults, mas.Recoveries) if err != nil { return nil, err } From eed44d12bab5c749c1d3e23743226c497511ba03 Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Fri, 10 Jul 2020 00:10:15 -0400 Subject: [PATCH 06/15] Add log method to Runtime --- chain/vm/runtime.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/chain/vm/runtime.go b/chain/vm/runtime.go index 67b1c9d9d..cb7dd86d2 100644 --- a/chain/vm/runtime.go +++ b/chain/vm/runtime.go @@ -578,3 +578,16 @@ func (rt *Runtime) abortIfAlreadyValidated() { } rt.callerValidated = true } + +func (rt *Runtime) Log(level vmr.LogLevel, msg string, args ...interface{}) { + switch level { + case vmr.DEBUG: + log.Debugf(msg, args) + case vmr.INFO: + log.Infof(msg, args) + case vmr.WARN: + log.Warnf(msg, args) + case vmr.ERROR: + log.Errorf(msg, args) + } +} \ No newline at end of file From 69626272d5e46c0acc99ea44befcd5ac704902dd Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Fri, 10 Jul 2020 01:07:22 -0400 Subject: [PATCH 07/15] Update with reward state changes --- chain/gen/genesis/miners.go | 4 +++- chain/gen/genesis/t02_reward.go | 6 ++++-- node/impl/full/state.go | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/chain/gen/genesis/miners.go b/chain/gen/genesis/miners.go index f4f96db98..df55df86c 100644 --- a/chain/gen/genesis/miners.go +++ b/chain/gen/genesis/miners.go @@ -271,6 +271,8 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sroot cid.Cid return cid.Undef, xerrors.Errorf("mutating state: %w", err) } + // TODO: Should we re-ConstructState for the reward actor using rawPow as currRealizedPower here? + c, err := vm.Flush(ctx) if err != nil { return cid.Undef, xerrors.Errorf("flushing vm: %w", err) @@ -326,7 +328,7 @@ func dealWeight(ctx context.Context, vm *vm.VM, maddr address.Address, dealIDs [ } func currentEpochBlockReward(ctx context.Context, vm *vm.VM, maddr address.Address) (abi.TokenAmount, error) { - rwret, err := doExecValue(ctx, vm, builtin.RewardActorAddr, maddr, big.Zero(), builtin.MethodsReward.LastPerEpochReward, nil) + rwret, err := doExecValue(ctx, vm, builtin.RewardActorAddr, maddr, big.Zero(), builtin.MethodsReward.ThisEpochReward, nil) if err != nil { return abi.TokenAmount{}, err } diff --git a/chain/gen/genesis/t02_reward.go b/chain/gen/genesis/t02_reward.go index 96feff671..0554c81bf 100644 --- a/chain/gen/genesis/t02_reward.go +++ b/chain/gen/genesis/t02_reward.go @@ -2,6 +2,7 @@ package genesis import ( "context" + "github.com/filecoin-project/specs-actors/actors/abi/big" "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/chain/types" @@ -14,8 +15,9 @@ import ( func SetupRewardActor(bs bstore.Blockstore) (*types.Actor, error) { cst := cbor.NewCborStore(bs) - st := reward.ConstructState() - st.LastPerEpochReward = types.FromFil(100) + z := big.Zero() + st := reward.ConstructState(&z) + st.ThisEpochReward = types.FromFil(100) hcid, err := cst.Put(context.TODO(), st) if err != nil { diff --git a/node/impl/full/state.go b/node/impl/full/state.go index de22419f6..21b478c66 100644 --- a/node/impl/full/state.go +++ b/node/impl/full/state.go @@ -803,7 +803,7 @@ func (a *StateAPI) StateMinerInitialPledgeCollateral(ctx context.Context, maddr } sectorWeight := miner.QAPowerForWeight(ssize, duration, dealWeights.DealWeight, dealWeights.VerifiedDealWeight) - initialPledge := miner.InitialPledgeForPower(sectorWeight, powerState.TotalQualityAdjPower, powerState.TotalPledgeCollateral, rewardState.LastPerEpochReward, circSupply) + initialPledge := miner.InitialPledgeForPower(sectorWeight, powerState.TotalQualityAdjPower, powerState.TotalPledgeCollateral, rewardState.ThisEpochReward, circSupply) return types.BigDiv(types.BigMul(initialPledge, initialPledgeNum), initialPledgeDen), nil } From 7e9f9106c97a1252dc8d519dea0dee9a826ed560 Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Fri, 10 Jul 2020 01:29:42 -0400 Subject: [PATCH 08/15] Update specs actors --- chain/gen/genesis/t04_power.go | 13 ++++++++----- go.mod | 2 +- go.sum | 4 +++- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/chain/gen/genesis/t04_power.go b/chain/gen/genesis/t04_power.go index de87871ce..1b5cdfafe 100644 --- a/chain/gen/genesis/t04_power.go +++ b/chain/gen/genesis/t04_power.go @@ -24,13 +24,16 @@ func SetupStoragePowerActor(bs bstore.Blockstore) (*types.Actor, error) { sms := &power.State{ TotalRawBytePower: big.NewInt(0), + TotalBytesCommitted: big.NewInt(0), TotalQualityAdjPower: big.NewInt(0), + TotalQABytesCommitted: big.NewInt(0), TotalPledgeCollateral: big.NewInt(0), - MinerCount: 0, - CronEventQueue: emptyhamt, - LastEpochTick: 0, - Claims: emptyhamt, - NumMinersMeetingMinPower: 0, + MinerCount: 0, + MinerAboveMinPowerCount: 0, + CronEventQueue: emptyhamt, + LastEpochTick: 0, + Claims: emptyhamt, + ProofValidationBatch: nil, } stcid, err := cst.Put(ctx, sms) diff --git a/go.mod b/go.mod index aca92c57f..614984dce 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( github.com/filecoin-project/go-statestore v0.1.0 github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b github.com/filecoin-project/sector-storage v0.0.0-20200709184611-f0dae546b517 - github.com/filecoin-project/specs-actors v0.7.1 + github.com/filecoin-project/specs-actors v0.7.2 github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea github.com/filecoin-project/storage-fsm v0.0.0-20200707194229-bc5e298e2b4c github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1 diff --git a/go.sum b/go.sum index e7e68404e..62297f625 100644 --- a/go.sum +++ b/go.sum @@ -225,6 +225,7 @@ github.com/filecoin-project/go-bitfield v0.0.0-20200416002808-b3ee67ec9060/go.mo github.com/filecoin-project/go-bitfield v0.0.1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= github.com/filecoin-project/go-bitfield v0.0.2-0.20200518150651-562fdb554b6e h1:gkG/7G+iKy4He+IiQNeQn+nndFznb/vCoOR8iRQsm60= github.com/filecoin-project/go-bitfield v0.0.2-0.20200518150651-562fdb554b6e/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= +github.com/filecoin-project/go-bitfield v0.0.3/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= github.com/filecoin-project/go-bitfield v0.0.4-0.20200703174658-f4a5758051a1 h1:xuHlrdznafh7ul5t4xEncnA4qgpQvJZEw+mr98eqHXw= github.com/filecoin-project/go-bitfield v0.0.4-0.20200703174658-f4a5758051a1/go.mod h1:Ry9/iUlWSyjPUzlAvdnfy4Gtvrq4kWmWDztCU1yEgJY= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 h1:av5fw6wmm58FYMgJeoB/lK9XXrgdugYiTqkdxjTy9k8= @@ -263,8 +264,9 @@ github.com/filecoin-project/specs-actors v0.3.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVl github.com/filecoin-project/specs-actors v0.6.0/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= github.com/filecoin-project/specs-actors v0.6.1/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= github.com/filecoin-project/specs-actors v0.7.0/go.mod h1:+z0htZu/wLBDbOLcQTKKUEC2rkUTFzL2KJ/bRAVWkws= -github.com/filecoin-project/specs-actors v0.7.1 h1:/zW++MN4gGIPvG+s0zmSI97k0Z/aaeiREjLC10gQbco= github.com/filecoin-project/specs-actors v0.7.1/go.mod h1:+z0htZu/wLBDbOLcQTKKUEC2rkUTFzL2KJ/bRAVWkws= +github.com/filecoin-project/specs-actors v0.7.2 h1:zMOU6LJS3gz7E9rwPPiPgTVawe7ypUWK9ugPBiaDZGc= +github.com/filecoin-project/specs-actors v0.7.2/go.mod h1:oJMdZvXSDZWWvjDxCkAywNz2MhgxV6dBzSCVg4vNf4o= github.com/filecoin-project/specs-storage v0.1.0 h1:PkDgTOT5W5Ao7752onjDl4QSv+sgOVdJbvFjOnD5w94= github.com/filecoin-project/specs-storage v0.1.0/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea h1:iixjULRQFPn7Q9KlIqfwLJnlAXO10bbkI+xy5GKGdLY= From 6504b914ba13e5ee3cc6b6d471c694dc7e6bc141 Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Sun, 12 Jul 2020 01:15:47 -0400 Subject: [PATCH 09/15] Update chain-val and storage-fsm to temp commits --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 614984dce..f6f1f2808 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/drand/drand v0.9.2-0.20200616080806-a94e9c1636a4 github.com/drand/kyber v1.1.0 github.com/fatih/color v1.8.0 - github.com/filecoin-project/chain-validation v0.0.6-0.20200701165912-3b6aaaa32a66 + github.com/filecoin-project/chain-validation v0.0.6-0.20200712051019-ccbec7d61977 github.com/filecoin-project/filecoin-ffi v0.26.1-0.20200508175440-05b30afeb00d github.com/filecoin-project/go-address v0.0.2-0.20200504173055-8b6f2fb2b3ef github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2 @@ -29,10 +29,10 @@ require ( github.com/filecoin-project/go-paramfetch v0.0.2-0.20200701152213-3e0f0afdc261 github.com/filecoin-project/go-statestore v0.1.0 github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b - github.com/filecoin-project/sector-storage v0.0.0-20200709184611-f0dae546b517 + github.com/filecoin-project/sector-storage v0.0.0-20200712023225-1d67dcfa3c15 github.com/filecoin-project/specs-actors v0.7.2 github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea - github.com/filecoin-project/storage-fsm v0.0.0-20200707194229-bc5e298e2b4c + github.com/filecoin-project/storage-fsm v0.0.0-20200712045002-6e92d6a6f080 github.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1 github.com/go-kit/kit v0.10.0 github.com/go-ole/go-ole v1.2.4 // indirect diff --git a/go.sum b/go.sum index 62297f625..cba7001a5 100644 --- a/go.sum +++ b/go.sum @@ -212,8 +212,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.8.0 h1:5bzFgL+oy7JITMTxUPJ00n7VxmYd/PdMp5mHFX40/RY= github.com/fatih/color v1.8.0/go.mod h1:3l45GVGkyrnYNl9HoIjnp2NnNWvh6hLAqD8yTfGjnw8= github.com/fd/go-nat v1.0.0/go.mod h1:BTBu/CKvMmOMUPkKVef1pngt2WFH/lg7E6yQnulfp6E= -github.com/filecoin-project/chain-validation v0.0.6-0.20200701165912-3b6aaaa32a66 h1:LyYxtZe2SA2U0MV+hmDFtUHkLyvYauaahPpPZsF8Fdw= -github.com/filecoin-project/chain-validation v0.0.6-0.20200701165912-3b6aaaa32a66/go.mod h1:Tr0C0rl7WCPkkQOkrOLDR6k1ppFVgoIuj1s4KPs4bzo= +github.com/filecoin-project/chain-validation v0.0.6-0.20200712051019-ccbec7d61977 h1:khj0VcDizrGoQUPAZWx0ulxsRcymPVQ+D55wHhiuWWA= +github.com/filecoin-project/chain-validation v0.0.6-0.20200712051019-ccbec7d61977/go.mod h1:293UFGwKduXCuIC2/5pIepH7lof+L9fNiPku/+arST4= github.com/filecoin-project/go-address v0.0.0-20200107215422-da8eea2842b5/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= github.com/filecoin-project/go-address v0.0.2-0.20200504173055-8b6f2fb2b3ef h1:Wi5E+P1QfHP8IF27eUiTx5vYfqQZwfPxzq3oFEq8w8U= @@ -257,8 +257,8 @@ github.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b/ github.com/filecoin-project/sector-storage v0.0.0-20200615154852-728a47ab99d6/go.mod h1:M59QnAeA/oV+Z8oHFLoNpGMv0LZ8Rll+vHVXX7GirPM= github.com/filecoin-project/sector-storage v0.0.0-20200625154333-98ef8e4ef246 h1:NfYQRmVRe0LzlNbK5Ket3vbBOwFD5TvtcNtfo/Sd8mg= github.com/filecoin-project/sector-storage v0.0.0-20200625154333-98ef8e4ef246/go.mod h1:8f0hWDzzIi1hKs4IVKH9RnDsO4LEHVz8BNat0okDOuY= -github.com/filecoin-project/sector-storage v0.0.0-20200709184611-f0dae546b517 h1:bnYiOUDKxJtFk6jtGWSiXSYq3TeSKGx6BOjb2wa1SwQ= -github.com/filecoin-project/sector-storage v0.0.0-20200709184611-f0dae546b517/go.mod h1:salgVdX7qeXFo/xaiEQE29J4pPkjn71T0kt0n+VDBzo= +github.com/filecoin-project/sector-storage v0.0.0-20200712023225-1d67dcfa3c15 h1:miw6hiusb/MkV1ryoqUKKWnvHhPW00AYtyeCj0L8pqo= +github.com/filecoin-project/sector-storage v0.0.0-20200712023225-1d67dcfa3c15/go.mod h1:salgVdX7qeXFo/xaiEQE29J4pPkjn71T0kt0n+VDBzo= github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA= github.com/filecoin-project/specs-actors v0.3.0/go.mod h1:nQYnFbQ7Y0bHZyq6HDEuVlCPR+U3z5Q3wMOQ+2aiV+Y= github.com/filecoin-project/specs-actors v0.6.0/go.mod h1:dRdy3cURykh2R8O/DKqy8olScl70rmIS7GrB4hB1IDY= @@ -271,8 +271,8 @@ github.com/filecoin-project/specs-storage v0.1.0 h1:PkDgTOT5W5Ao7752onjDl4QSv+sg github.com/filecoin-project/specs-storage v0.1.0/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea h1:iixjULRQFPn7Q9KlIqfwLJnlAXO10bbkI+xy5GKGdLY= github.com/filecoin-project/specs-storage v0.1.1-0.20200622113353-88a9704877ea/go.mod h1:Pr5ntAaxsh+sLG/LYiL4tKzvA83Vk5vLODYhfNwOg7k= -github.com/filecoin-project/storage-fsm v0.0.0-20200707194229-bc5e298e2b4c h1:F6guH363a+fpew1zkgoez4/U0RqW4ph6GVXR23lVwng= -github.com/filecoin-project/storage-fsm v0.0.0-20200707194229-bc5e298e2b4c/go.mod h1:SXO4VnXG056B/lXHL8HZv54eMqlsyynm+v93BlLwlOY= +github.com/filecoin-project/storage-fsm v0.0.0-20200712045002-6e92d6a6f080 h1:WZonjI7/GFLi4NxziBCefS9x7bm8S405RWkmFuDfRLA= +github.com/filecoin-project/storage-fsm v0.0.0-20200712045002-6e92d6a6f080/go.mod h1:SXO4VnXG056B/lXHL8HZv54eMqlsyynm+v93BlLwlOY= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk= github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= From f18bef867efb19342d1ccb23f31d21cf806e3e0d Mon Sep 17 00:00:00 2001 From: Travis Person Date: Sun, 12 Jul 2020 21:03:05 +0000 Subject: [PATCH 10/15] lotus_fountain: add facuet distribution amount flag --- cmd/lotus-fountain/main.go | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/cmd/lotus-fountain/main.go b/cmd/lotus-fountain/main.go index 9743f209f..089072992 100644 --- a/cmd/lotus-fountain/main.go +++ b/cmd/lotus-fountain/main.go @@ -37,8 +37,6 @@ import ( var log = logging.Logger("main") -var sendPerRequest, _ = types.ParseFIL("50") - var supportedSectors struct { SectorSizes []struct { Name string @@ -114,8 +112,18 @@ var runCmd = &cli.Command{ &cli.StringFlag{ Name: "from", }, + &cli.StringFlag{ + Name: "amount", + EnvVars: []string{"LOTUS_FOUNTAIN_AMOUNT"}, + Value: "50", + }, }, Action: func(cctx *cli.Context) error { + sendPerRequest, err := types.ParseFIL(cctx.String("amount")) + if err != nil { + return err + } + nodeApi, closer, err := lcli.GetFullNodeAPI(cctx) if err != nil { return err @@ -141,9 +149,10 @@ var runCmd = &cli.Command{ } h := &handler{ - ctx: ctx, - api: nodeApi, - from: from, + ctx: ctx, + api: nodeApi, + from: from, + sendPerRequest: sendPerRequest, limiter: NewLimiter(LimiterConfig{ TotalRate: time.Second, TotalBurst: 256, @@ -185,7 +194,8 @@ type handler struct { ctx context.Context api api.FullNode - from address.Address + from address.Address + sendPerRequest types.FIL limiter *Limiter minerLimiter *Limiter @@ -266,7 +276,7 @@ func (h *handler) send(w http.ResponseWriter, r *http.Request) { } smsg, err := h.api.MpoolPushMessage(h.ctx, &types.Message{ - Value: types.BigInt(sendPerRequest), + Value: types.BigInt(h.sendPerRequest), From: h.from, To: to, @@ -340,7 +350,7 @@ func (h *handler) mkminer(w http.ResponseWriter, r *http.Request) { } smsg, err := h.api.MpoolPushMessage(h.ctx, &types.Message{ - Value: types.BigInt(sendPerRequest), + Value: types.BigInt(h.sendPerRequest), From: h.from, To: owner, From 1a5c20ca75e856aa9accbd4394f48ecb4ddf6ae4 Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Mon, 13 Jul 2020 01:13:29 -0400 Subject: [PATCH 11/15] CLI/API improvements --- api/api_full.go | 2 +- cli/client.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/api/api_full.go b/api/api_full.go index 09c69a1ba..410d37087 100644 --- a/api/api_full.go +++ b/api/api_full.go @@ -162,7 +162,7 @@ type FullNode interface { WalletNew(context.Context, crypto.SigType) (address.Address, error) // WalletHas indicates whether the given address is in the wallet. WalletHas(context.Context, address.Address) (bool, error) - // WalletHas indicates whether the given address is in the wallet. + // WalletList lists all the addresses in the wallet. WalletList(context.Context) ([]address.Address, error) // WalletBalance returns the balance of the given address at the current head of the chain. WalletBalance(context.Context, address.Address) (types.BigInt, error) diff --git a/cli/client.go b/cli/client.go index ebcf9a56b..4093d4f49 100644 --- a/cli/client.go +++ b/cli/client.go @@ -84,6 +84,11 @@ var clientImportCmd = &cli.Command{ } defer closer() ctx := ReqContext(cctx) + + if cctx.NArg() != 1 { + return xerrors.New("expected input path as the only arg") + } + absPath, err := filepath.Abs(cctx.Args().First()) if err != nil { return err From 896f0c69fccda180d80041e017075ed4de03c8a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 13 Jul 2020 12:27:35 +0200 Subject: [PATCH 12/15] gomod: Use chain-val master --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f6f1f2808..4cb4f88d5 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/drand/drand v0.9.2-0.20200616080806-a94e9c1636a4 github.com/drand/kyber v1.1.0 github.com/fatih/color v1.8.0 - github.com/filecoin-project/chain-validation v0.0.6-0.20200712051019-ccbec7d61977 + github.com/filecoin-project/chain-validation v0.0.6-0.20200713102302-1bc823b1e01d github.com/filecoin-project/filecoin-ffi v0.26.1-0.20200508175440-05b30afeb00d github.com/filecoin-project/go-address v0.0.2-0.20200504173055-8b6f2fb2b3ef github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200424220931-6263827e49f2 diff --git a/go.sum b/go.sum index cba7001a5..4a0c9d572 100644 --- a/go.sum +++ b/go.sum @@ -212,8 +212,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.8.0 h1:5bzFgL+oy7JITMTxUPJ00n7VxmYd/PdMp5mHFX40/RY= github.com/fatih/color v1.8.0/go.mod h1:3l45GVGkyrnYNl9HoIjnp2NnNWvh6hLAqD8yTfGjnw8= github.com/fd/go-nat v1.0.0/go.mod h1:BTBu/CKvMmOMUPkKVef1pngt2WFH/lg7E6yQnulfp6E= -github.com/filecoin-project/chain-validation v0.0.6-0.20200712051019-ccbec7d61977 h1:khj0VcDizrGoQUPAZWx0ulxsRcymPVQ+D55wHhiuWWA= -github.com/filecoin-project/chain-validation v0.0.6-0.20200712051019-ccbec7d61977/go.mod h1:293UFGwKduXCuIC2/5pIepH7lof+L9fNiPku/+arST4= +github.com/filecoin-project/chain-validation v0.0.6-0.20200713102302-1bc823b1e01d h1:6mOOHCn8iJfWPRELM7LPE4X9mBmCTvQORsgzsA/u0Wg= +github.com/filecoin-project/chain-validation v0.0.6-0.20200713102302-1bc823b1e01d/go.mod h1:293UFGwKduXCuIC2/5pIepH7lof+L9fNiPku/+arST4= github.com/filecoin-project/go-address v0.0.0-20200107215422-da8eea2842b5/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= github.com/filecoin-project/go-address v0.0.2-0.20200504173055-8b6f2fb2b3ef h1:Wi5E+P1QfHP8IF27eUiTx5vYfqQZwfPxzq3oFEq8w8U= From c1048a0353d19cb7e0de128f83734629a74a53bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 13 Jul 2020 12:29:27 +0200 Subject: [PATCH 13/15] vm: Separate logger for actors --- chain/vm/runtime.go | 8 ++++---- chain/vm/vm.go | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/chain/vm/runtime.go b/chain/vm/runtime.go index cb7dd86d2..fdf3968ca 100644 --- a/chain/vm/runtime.go +++ b/chain/vm/runtime.go @@ -582,12 +582,12 @@ func (rt *Runtime) abortIfAlreadyValidated() { func (rt *Runtime) Log(level vmr.LogLevel, msg string, args ...interface{}) { switch level { case vmr.DEBUG: - log.Debugf(msg, args) + actorLog.Debugf(msg, args) case vmr.INFO: - log.Infof(msg, args) + actorLog.Infof(msg, args) case vmr.WARN: - log.Warnf(msg, args) + actorLog.Warnf(msg, args) case vmr.ERROR: - log.Errorf(msg, args) + actorLog.Errorf(msg, args) } } \ No newline at end of file diff --git a/chain/vm/vm.go b/chain/vm/vm.go index 2b22fbf10..b5d4bef04 100644 --- a/chain/vm/vm.go +++ b/chain/vm/vm.go @@ -35,6 +35,7 @@ import ( ) var log = logging.Logger("vm") +var actorLog = logging.Logger("actors") var gasOnActorExec = newGasCharge("OnActorExec", 0, 0) // ResolveToKeyAddr returns the public key type of address (`BLS`/`SECP256K1`) of an account actor identified by `addr`. From a77891780614a34d94484a0327a46d3cbd508ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 13 Jul 2020 13:35:10 +0200 Subject: [PATCH 14/15] gofmt --- api/apistruct/struct.go | 2 +- chain/gen/genesis/t04_power.go | 10 +++++----- chain/vm/runtime.go | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/api/apistruct/struct.go b/api/apistruct/struct.go index 3ae4b2e90..6ab12ca6e 100644 --- a/api/apistruct/struct.go +++ b/api/apistruct/struct.go @@ -162,7 +162,7 @@ type FullNodeStruct struct { StateVerifiedClientStatus func(context.Context, address.Address, types.TipSetKey) (*verifreg.DataCap, error) `perm:"read"` MsigGetAvailableBalance func(context.Context, address.Address, types.TipSetKey) (types.BigInt, error) `perm:"read"` - MsigCreate func(context.Context, uint64, []address.Address, abi.ChainEpoch, types.BigInt, address.Address, types.BigInt) (cid.Cid, error) `perm:"sign"` + MsigCreate func(context.Context, uint64, []address.Address, abi.ChainEpoch, types.BigInt, address.Address, types.BigInt) (cid.Cid, error) `perm:"sign"` MsigPropose func(context.Context, address.Address, address.Address, types.BigInt, address.Address, uint64, []byte) (cid.Cid, error) `perm:"sign"` MsigApprove func(context.Context, address.Address, uint64, address.Address, address.Address, types.BigInt, address.Address, uint64, []byte) (cid.Cid, error) `perm:"sign"` MsigCancel func(context.Context, address.Address, uint64, address.Address, types.BigInt, address.Address, uint64, []byte) (cid.Cid, error) `perm:"sign"` diff --git a/chain/gen/genesis/t04_power.go b/chain/gen/genesis/t04_power.go index 1b5cdfafe..c7e459838 100644 --- a/chain/gen/genesis/t04_power.go +++ b/chain/gen/genesis/t04_power.go @@ -23,11 +23,11 @@ func SetupStoragePowerActor(bs bstore.Blockstore) (*types.Actor, error) { } sms := &power.State{ - TotalRawBytePower: big.NewInt(0), - TotalBytesCommitted: big.NewInt(0), - TotalQualityAdjPower: big.NewInt(0), - TotalQABytesCommitted: big.NewInt(0), - TotalPledgeCollateral: big.NewInt(0), + TotalRawBytePower: big.NewInt(0), + TotalBytesCommitted: big.NewInt(0), + TotalQualityAdjPower: big.NewInt(0), + TotalQABytesCommitted: big.NewInt(0), + TotalPledgeCollateral: big.NewInt(0), MinerCount: 0, MinerAboveMinPowerCount: 0, CronEventQueue: emptyhamt, diff --git a/chain/vm/runtime.go b/chain/vm/runtime.go index fdf3968ca..62e4d6904 100644 --- a/chain/vm/runtime.go +++ b/chain/vm/runtime.go @@ -590,4 +590,4 @@ func (rt *Runtime) Log(level vmr.LogLevel, msg string, args ...interface{}) { case vmr.ERROR: actorLog.Errorf(msg, args) } -} \ No newline at end of file +} From d388566d5c35d4c06209e29bafe4559b8d13ed9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20M=C3=A4kel=C3=A4?= Date: Tue, 14 Jul 2020 12:54:18 +0300 Subject: [PATCH 15/15] fixing --- node/impl/full/state.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/impl/full/state.go b/node/impl/full/state.go index 36c634c70..313665c60 100644 --- a/node/impl/full/state.go +++ b/node/impl/full/state.go @@ -852,7 +852,7 @@ func (a *StateAPI) StateVerifiedClientStatus(ctx context.Context, addr address.A return nil, err } - vh, err := hamt.LoadNode(ctx, cst, st.VerifiedClients) + vh, err := hamt.LoadNode(ctx, cst, st.VerifiedClients, hamt.UseTreeBitWidth(5)) if err != nil { return nil, err }