From 7da629d03bad9d6d5d0af3443929c43f74889345 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Mon, 20 Jul 2020 19:57:06 +0200 Subject: [PATCH] Update gas prices Signed-off-by: Jakub Sztandera --- chain/market/fundmgr.go | 12 +++++------- chain/stmgr/forks_test.go | 4 ++-- chain/stmgr/utils.go | 2 +- chain/types/message.go | 2 ++ cli/chain.go | 2 +- cmd/chain-noise/main.go | 2 +- cmd/lotus-fountain/main.go | 6 +++--- cmd/lotus-shed/nonce-fix.go | 2 +- cmd/lotus-shed/verifreg.go | 4 ++-- cmd/lotus-storage-miner/init.go | 4 ++-- markets/storageadapter/client.go | 2 +- markets/storageadapter/provider.go | 4 ++-- node/impl/full/multisig.go | 6 +++--- node/impl/full/state.go | 2 +- node/impl/paych/paych.go | 4 ++-- node/node_test.go | 2 +- paychmgr/simple.go | 4 ++-- storage/adapter_storage_miner.go | 2 +- storage/wdpost_run.go | 4 ++-- 19 files changed, 35 insertions(+), 35 deletions(-) diff --git a/chain/market/fundmgr.go b/chain/market/fundmgr.go index 1bafda3c9..83ea6dca5 100644 --- a/chain/market/fundmgr.go +++ b/chain/market/fundmgr.go @@ -66,13 +66,11 @@ func (fm *FundMgr) EnsureAvailable(ctx context.Context, addr, wallet address.Add } smsg, err := fm.mpool.MpoolPushMessage(ctx, &types.Message{ - To: builtin.StorageMarketActorAddr, - From: wallet, - Value: toAdd, - GasPrice: types.NewInt(0), - GasLimit: 100_000_000, - Method: builtin.MethodsMarket.AddBalance, - Params: params, + To: builtin.StorageMarketActorAddr, + From: wallet, + Value: toAdd, + Method: builtin.MethodsMarket.AddBalance, + Params: params, }) if err != nil { return cid.Undef, err diff --git a/chain/stmgr/forks_test.go b/chain/stmgr/forks_test.go index c84b0b7b9..5a6c8a34e 100644 --- a/chain/stmgr/forks_test.go +++ b/chain/stmgr/forks_test.go @@ -179,7 +179,7 @@ func TestForkHeightTriggers(t *testing.T) { To: builtin.InitActorAddr, Method: builtin.MethodsInit.Exec, Params: enc, - GasLimit: 100_000_000, + GasLimit: types.TestGasLimit, GasPrice: types.NewInt(0), } sig, err := cg.Wallet().Sign(ctx, cg.Banker(), m.Cid().Bytes()) @@ -206,7 +206,7 @@ func TestForkHeightTriggers(t *testing.T) { Method: 2, Params: nil, Nonce: nonce, - GasLimit: 100_000_000, + GasLimit: types.TestGasLimit, GasPrice: types.NewInt(0), } nonce++ diff --git a/chain/stmgr/utils.go b/chain/stmgr/utils.go index 7464bbd03..79585ba68 100644 --- a/chain/stmgr/utils.go +++ b/chain/stmgr/utils.go @@ -586,7 +586,7 @@ func (sm *StateManager) CirculatingSupply(ctx context.Context, ts *types.TipSet) unsafeVM := &vm.UnsafeVM{VM: vmi} rt := unsafeVM.MakeRuntime(ctx, &types.Message{ - GasLimit: 1_000_000_000, + GasLimit: 100e6, From: builtin.SystemActorAddr, }, builtin.SystemActorAddr, 0, 0, 0) diff --git a/chain/types/message.go b/chain/types/message.go index b0d7f885f..d402490f2 100644 --- a/chain/types/message.go +++ b/chain/types/message.go @@ -158,3 +158,5 @@ func (m *Message) ValidForBlockInclusion(minGas int64) error { return nil } + +const TestGasLimit = 100e6 diff --git a/cli/chain.go b/cli/chain.go index 69f3d7413..8ae2c3c5e 100644 --- a/cli/chain.go +++ b/cli/chain.go @@ -935,7 +935,7 @@ var slashConsensusFault = &cli.Command{ From: def, Value: types.NewInt(0), GasPrice: types.NewInt(1), - GasLimit: 100_000_000, + GasLimit: 0, Method: builtin.MethodsMiner.ReportConsensusFault, Params: enc, } diff --git a/cmd/chain-noise/main.go b/cmd/chain-noise/main.go index 5a04fbf21..d429a8d59 100644 --- a/cmd/chain-noise/main.go +++ b/cmd/chain-noise/main.go @@ -77,7 +77,7 @@ func sendSmallFundsTxs(ctx context.Context, api api.FullNode, from address.Addre From: from, To: sendSet[rand.Intn(20)], Value: types.NewInt(1), - GasLimit: 100_000_000, + GasLimit: 0, GasPrice: types.NewInt(0), } diff --git a/cmd/lotus-fountain/main.go b/cmd/lotus-fountain/main.go index b9c0fe26a..62fd25509 100644 --- a/cmd/lotus-fountain/main.go +++ b/cmd/lotus-fountain/main.go @@ -281,7 +281,7 @@ func (h *handler) send(w http.ResponseWriter, r *http.Request) { To: to, GasPrice: types.NewInt(0), - GasLimit: 100_000_000, + GasLimit: 0, }) if err != nil { w.WriteHeader(400) @@ -355,7 +355,7 @@ func (h *handler) mkminer(w http.ResponseWriter, r *http.Request) { To: owner, GasPrice: types.NewInt(0), - GasLimit: 100_000_000, + GasLimit: 0, }) if err != nil { w.WriteHeader(400) @@ -391,7 +391,7 @@ func (h *handler) mkminer(w http.ResponseWriter, r *http.Request) { Method: builtin.MethodsPower.CreateMiner, Params: params, - GasLimit: 100_000_000, + GasLimit: 0, GasPrice: types.NewInt(0), } diff --git a/cmd/lotus-shed/nonce-fix.go b/cmd/lotus-shed/nonce-fix.go index c85e91797..1cd713852 100644 --- a/cmd/lotus-shed/nonce-fix.go +++ b/cmd/lotus-shed/nonce-fix.go @@ -89,7 +89,7 @@ var noncefix = &cli.Command{ From: addr, To: addr, Value: types.NewInt(1), - GasLimit: 100_000_000, + GasLimit: 0, GasPrice: types.NewInt(1), Nonce: i, } diff --git a/cmd/lotus-shed/verifreg.go b/cmd/lotus-shed/verifreg.go index 3641ac2df..90d12bee4 100644 --- a/cmd/lotus-shed/verifreg.go +++ b/cmd/lotus-shed/verifreg.go @@ -76,7 +76,7 @@ var verifRegAddVerifierCmd = &cli.Command{ From: fromk, Method: builtin.MethodsVerifiedRegistry.AddVerifier, GasPrice: types.NewInt(1), - GasLimit: 100_000_000, + GasLimit: 0, Params: params, } @@ -152,7 +152,7 @@ var verifRegVerifyClientCmd = &cli.Command{ From: fromk, Method: builtin.MethodsVerifiedRegistry.AddVerifiedClient, GasPrice: types.NewInt(1), - GasLimit: 100_000_000, + GasLimit: 0, Params: params, } diff --git a/cmd/lotus-storage-miner/init.go b/cmd/lotus-storage-miner/init.go index 8468c7f96..01a14093e 100644 --- a/cmd/lotus-storage-miner/init.go +++ b/cmd/lotus-storage-miner/init.go @@ -557,7 +557,7 @@ func configureStorageMiner(ctx context.Context, api lapi.FullNode, addr address. Params: enc, Value: types.NewInt(0), GasPrice: gasPrice, - GasLimit: 100_000_000, + GasLimit: 0, } smsg, err := api.MpoolPushMessage(ctx, msg) @@ -636,7 +636,7 @@ func createStorageMiner(ctx context.Context, api lapi.FullNode, peerid peer.ID, Method: builtin.MethodsPower.CreateMiner, Params: params, - GasLimit: 100_000_000, + GasLimit: 0, GasPrice: gasPrice, } diff --git a/markets/storageadapter/client.go b/markets/storageadapter/client.go index 2bb762e28..38c8d5a4e 100644 --- a/markets/storageadapter/client.go +++ b/markets/storageadapter/client.go @@ -138,7 +138,7 @@ func (c *ClientNodeAdapter) AddFunds(ctx context.Context, addr address.Address, From: addr, Value: amount, GasPrice: types.NewInt(0), - GasLimit: 200_000_000, + GasLimit: 0, Method: builtin.MethodsMarket.AddBalance, }) if err != nil { diff --git a/markets/storageadapter/provider.go b/markets/storageadapter/provider.go index 9e1a101cc..968ced4cf 100644 --- a/markets/storageadapter/provider.go +++ b/markets/storageadapter/provider.go @@ -78,7 +78,7 @@ func (n *ProviderNodeAdapter) PublishDeals(ctx context.Context, deal storagemark From: mi.Worker, Value: types.NewInt(0), GasPrice: types.NewInt(0), - GasLimit: 600_000_000, + GasLimit: 0, Method: builtin.MethodsMarket.PublishStorageDeals, Params: params, }) @@ -175,7 +175,7 @@ func (n *ProviderNodeAdapter) AddFunds(ctx context.Context, addr address.Address From: addr, Value: amount, GasPrice: types.NewInt(0), - GasLimit: 200_000_000, + GasLimit: 0, Method: builtin.MethodsMarket.AddBalance, }) if err != nil { diff --git a/node/impl/full/multisig.go b/node/impl/full/multisig.go index 779c140cf..2ae28f6a0 100644 --- a/node/impl/full/multisig.go +++ b/node/impl/full/multisig.go @@ -77,7 +77,7 @@ func (a *MsigAPI) MsigCreate(ctx context.Context, req uint64, addrs []address.Ad Method: builtin.MethodsInit.Exec, Params: enc, GasPrice: gp, - GasLimit: 100_000_000, + GasLimit: 0, Value: val, } @@ -124,7 +124,7 @@ func (a *MsigAPI) MsigPropose(ctx context.Context, msig address.Address, to addr Value: types.NewInt(0), Method: builtin.MethodsMultisig.Propose, Params: enc, - GasLimit: 100_000_000, + GasLimit: 0, GasPrice: types.NewInt(1), } @@ -240,7 +240,7 @@ func (a *MsigAPI) msigApproveOrCancel(ctx context.Context, operation api.MsigPro Value: types.NewInt(0), Method: msigResponseMethod, Params: enc, - GasLimit: 100_000_000, + GasLimit: 0, GasPrice: types.NewInt(1), } diff --git a/node/impl/full/state.go b/node/impl/full/state.go index d505538a7..94e28eae9 100644 --- a/node/impl/full/state.go +++ b/node/impl/full/state.go @@ -974,7 +974,7 @@ func (a *StateAPI) StateMinerInitialPledgeCollateral(ctx context.Context, maddr From: maddr, To: builtin.StorageMarketActorAddr, Method: builtin.MethodsMarket.VerifyDealsForActivation, - GasLimit: 100_000_000, + GasLimit: 0, GasPrice: types.NewInt(0), Params: params, }, ts) diff --git a/node/impl/paych/paych.go b/node/impl/paych/paych.go index 20778b9f2..f7a51fc25 100644 --- a/node/impl/paych/paych.go +++ b/node/impl/paych/paych.go @@ -127,7 +127,7 @@ func (a *PaychAPI) PaychClose(ctx context.Context, addr address.Address) (cid.Ci Method: builtin.MethodsPaych.Settle, Nonce: nonce, - GasLimit: 100_000_000, + GasLimit: 0, GasPrice: types.NewInt(0), } @@ -242,7 +242,7 @@ func (a *PaychAPI) PaychVoucherSubmit(ctx context.Context, ch address.Address, s Nonce: nonce, Method: builtin.MethodsPaych.UpdateChannelState, Params: enc, - GasLimit: 100_000_000, + GasLimit: 0, GasPrice: types.NewInt(0), } diff --git a/node/node_test.go b/node/node_test.go index e03d9ed4f..714449dac 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -107,7 +107,7 @@ func testStorageNode(ctx context.Context, t *testing.T, waddr address.Address, a Params: enc, Value: types.NewInt(0), GasPrice: types.NewInt(0), - GasLimit: 100_000_000, + GasLimit: 0, } _, err = tnd.MpoolPushMessage(ctx, msg) diff --git a/paychmgr/simple.go b/paychmgr/simple.go index ddc49f864..0d0075d62 100644 --- a/paychmgr/simple.go +++ b/paychmgr/simple.go @@ -37,7 +37,7 @@ func (pm *Manager) createPaych(ctx context.Context, from, to address.Address, am Value: amt, Method: builtin.MethodsInit.Exec, Params: enc, - GasLimit: 100_000_000, + GasLimit: 0, GasPrice: types.NewInt(0), } @@ -92,7 +92,7 @@ func (pm *Manager) addFunds(ctx context.Context, ch address.Address, from addres From: from, Value: amt, Method: 0, - GasLimit: 100_000_000, + GasLimit: 0, GasPrice: types.NewInt(0), } diff --git a/storage/adapter_storage_miner.go b/storage/adapter_storage_miner.go index aa8a93274..7a41563a1 100644 --- a/storage/adapter_storage_miner.go +++ b/storage/adapter_storage_miner.go @@ -117,7 +117,7 @@ func (s SealingAPIAdapter) StateComputeDataCommitment(ctx context.Context, maddr From: maddr, Value: types.NewInt(0), GasPrice: types.NewInt(0), - GasLimit: 100_000_000, + GasLimit: 0, Method: builtin.MethodsMarket.ComputeDataCommitment, Params: ccparams, } diff --git a/storage/wdpost_run.go b/storage/wdpost_run.go index c7d99b2fc..063a5c5a3 100644 --- a/storage/wdpost_run.go +++ b/storage/wdpost_run.go @@ -176,7 +176,7 @@ func (s *WindowPoStScheduler) checkNextRecoveries(ctx context.Context, dlIdx uin Method: builtin.MethodsMiner.DeclareFaultsRecovered, Params: enc, Value: types.NewInt(0), - GasLimit: 100_000_000, // i dont know help + GasLimit: 0, GasPrice: types.NewInt(2), } @@ -260,7 +260,7 @@ func (s *WindowPoStScheduler) checkNextFaults(ctx context.Context, dlIdx uint64, Method: builtin.MethodsMiner.DeclareFaults, Params: enc, Value: types.NewInt(0), // TODO: Is there a fee? - GasLimit: 100_000_000, // i dont know help + GasLimit: 0, GasPrice: types.NewInt(2), }