From 7b14d445b45d585c985b841072ddef2da375032f Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Wed, 15 Jul 2020 19:53:27 +0200 Subject: [PATCH] Update message gas limits Signed-off-by: Jakub Sztandera --- chain/gen/gen.go | 2 +- chain/market/fundmgr.go | 2 +- chain/stmgr/forks_test.go | 4 ++-- chain/types_test.go | 2 +- cli/chain.go | 2 +- cli/send.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 ++-- miner/miner_test.go | 8 ++++---- 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 ++-- 21 files changed, 35 insertions(+), 35 deletions(-) diff --git a/chain/gen/gen.go b/chain/gen/gen.go index 3a0ac2187e..990383ad63 100644 --- a/chain/gen/gen.go +++ b/chain/gen/gen.go @@ -468,7 +468,7 @@ func getRandomMessages(cg *ChainGen) ([]*types.SignedMessage, error) { Method: 0, - GasLimit: 10000, + GasLimit: 100_000_000, GasPrice: types.NewInt(0), } diff --git a/chain/market/fundmgr.go b/chain/market/fundmgr.go index 42ad50b2b0..1bafda3c9e 100644 --- a/chain/market/fundmgr.go +++ b/chain/market/fundmgr.go @@ -70,7 +70,7 @@ func (fm *FundMgr) EnsureAvailable(ctx context.Context, addr, wallet address.Add From: wallet, Value: toAdd, GasPrice: types.NewInt(0), - GasLimit: 1000000, + GasLimit: 100_000_000, Method: builtin.MethodsMarket.AddBalance, Params: params, }) diff --git a/chain/stmgr/forks_test.go b/chain/stmgr/forks_test.go index 2fbcbbc99f..c84b0b7b99 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: 10000, + GasLimit: 100_000_000, 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: 10000, + GasLimit: 100_000_000, GasPrice: types.NewInt(0), } nonce++ diff --git a/chain/types_test.go b/chain/types_test.go index 55baf4a285..3b49a8d944 100644 --- a/chain/types_test.go +++ b/chain/types_test.go @@ -19,7 +19,7 @@ func TestSignedMessageJsonRoundtrip(t *testing.T) { Method: 1235126, Value: types.NewInt(123123), GasPrice: types.NewInt(1234), - GasLimit: 9992969384, + GasLimit: 100_000_000, Nonce: 123123, }, } diff --git a/cli/chain.go b/cli/chain.go index c2acee5e5e..69f3d74139 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: 10000000, + GasLimit: 100_000_000, Method: builtin.MethodsMiner.ReportConsensusFault, Params: enc, } diff --git a/cli/send.go b/cli/send.go index 9f9c70dde4..4a9a39bfca 100644 --- a/cli/send.go +++ b/cli/send.go @@ -77,7 +77,7 @@ var sendCmd = &cli.Command{ From: fromAddr, To: toAddr, Value: types.BigInt(val), - GasLimit: 10000, + GasLimit: 100_000_000, GasPrice: gp, } diff --git a/cmd/chain-noise/main.go b/cmd/chain-noise/main.go index 4a4a099d8a..5a04fbf212 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: 100000, + GasLimit: 100_000_000, GasPrice: types.NewInt(0), } diff --git a/cmd/lotus-fountain/main.go b/cmd/lotus-fountain/main.go index a86910cbee..b9c0fe26ae 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: 10000, + GasLimit: 100_000_000, }) 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: 10000, + GasLimit: 100_000_000, }) 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: 10000000, + GasLimit: 100_000_000, GasPrice: types.NewInt(0), } diff --git a/cmd/lotus-shed/nonce-fix.go b/cmd/lotus-shed/nonce-fix.go index 4fb30300ab..c85e917974 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: 10000, + GasLimit: 100_000_000, GasPrice: types.NewInt(1), Nonce: i, } diff --git a/cmd/lotus-shed/verifreg.go b/cmd/lotus-shed/verifreg.go index 747a233a55..3641ac2df1 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: 300000, + GasLimit: 100_000_000, Params: params, } @@ -152,7 +152,7 @@ var verifRegVerifyClientCmd = &cli.Command{ From: fromk, Method: builtin.MethodsVerifiedRegistry.AddVerifiedClient, GasPrice: types.NewInt(1), - GasLimit: 300000, + GasLimit: 100_000_000, Params: params, } diff --git a/cmd/lotus-storage-miner/init.go b/cmd/lotus-storage-miner/init.go index dc43b6c93f..8468c7f963 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: 99999999, + GasLimit: 100_000_000, } 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: 10000000, + GasLimit: 100_000_000, GasPrice: gasPrice, } diff --git a/markets/storageadapter/client.go b/markets/storageadapter/client.go index 7ef6d07093..4844ba514b 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: 1000000, + GasLimit: 100_000_000, Method: builtin.MethodsMarket.AddBalance, }) if err != nil { diff --git a/markets/storageadapter/provider.go b/markets/storageadapter/provider.go index 0b04757c56..b5ed247f4b 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: 1000000, + GasLimit: 100_000_000, 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: 1000000, + GasLimit: 100_000_000, Method: builtin.MethodsMarket.AddBalance, }) if err != nil { diff --git a/miner/miner_test.go b/miner/miner_test.go index 32b1aef240..7ae07644e2 100644 --- a/miner/miner_test.go +++ b/miner/miner_test.go @@ -44,7 +44,7 @@ func TestMessageFiltering(t *testing.T) { To: a1, Nonce: 3, Value: types.NewInt(500), - GasLimit: 50, + GasLimit: 100_000_000, GasPrice: types.NewInt(1), }, { @@ -52,7 +52,7 @@ func TestMessageFiltering(t *testing.T) { To: a1, Nonce: 4, Value: types.NewInt(500), - GasLimit: 50, + GasLimit: 100_000_000, GasPrice: types.NewInt(1), }, { @@ -60,7 +60,7 @@ func TestMessageFiltering(t *testing.T) { To: a1, Nonce: 1, Value: types.NewInt(800), - GasLimit: 100, + GasLimit: 100_000_000, GasPrice: types.NewInt(1), }, { @@ -68,7 +68,7 @@ func TestMessageFiltering(t *testing.T) { To: a1, Nonce: 0, Value: types.NewInt(800), - GasLimit: 100, + GasLimit: 100_000_000, GasPrice: types.NewInt(1), }, { diff --git a/node/impl/full/multisig.go b/node/impl/full/multisig.go index 7d6d9e86c2..7340ae0dad 100644 --- a/node/impl/full/multisig.go +++ b/node/impl/full/multisig.go @@ -76,7 +76,7 @@ func (a *MsigAPI) MsigCreate(ctx context.Context, req uint64, addrs []address.Ad Method: builtin.MethodsInit.Exec, Params: enc, GasPrice: gp, - GasLimit: 1000000, + GasLimit: 100_000_000, Value: val, } @@ -123,7 +123,7 @@ func (a *MsigAPI) MsigPropose(ctx context.Context, msig address.Address, to addr Value: types.NewInt(0), Method: builtin.MethodsMultisig.Propose, Params: enc, - GasLimit: 100000, + GasLimit: 100_000_000, GasPrice: types.NewInt(1), } @@ -212,7 +212,7 @@ func (a *MsigAPI) msigApproveOrCancel(ctx context.Context, operation api.MsigPro Value: types.NewInt(0), Method: msigResponseMethod, Params: enc, - GasLimit: 100000, + GasLimit: 100_000_000, GasPrice: types.NewInt(1), } diff --git a/node/impl/full/state.go b/node/impl/full/state.go index 313665c606..dc88aef48a 100644 --- a/node/impl/full/state.go +++ b/node/impl/full/state.go @@ -779,7 +779,7 @@ func (a *StateAPI) StateMinerInitialPledgeCollateral(ctx context.Context, maddr From: maddr, To: builtin.StorageMarketActorAddr, Method: builtin.MethodsMarket.VerifyDealsForActivation, - GasLimit: 100000000000, + GasLimit: 100_000_000, GasPrice: types.NewInt(0), Params: params, }, ts) diff --git a/node/impl/paych/paych.go b/node/impl/paych/paych.go index b08e07dbdf..1ecd8250e4 100644 --- a/node/impl/paych/paych.go +++ b/node/impl/paych/paych.go @@ -125,7 +125,7 @@ func (a *PaychAPI) PaychClose(ctx context.Context, addr address.Address) (cid.Ci Method: builtin.MethodsPaych.Settle, Nonce: nonce, - GasLimit: 10000, + GasLimit: 100_000_000, GasPrice: types.NewInt(0), } @@ -240,7 +240,7 @@ func (a *PaychAPI) PaychVoucherSubmit(ctx context.Context, ch address.Address, s Nonce: nonce, Method: builtin.MethodsPaych.UpdateChannelState, Params: enc, - GasLimit: 100000, + GasLimit: 100_000_000, GasPrice: types.NewInt(0), } diff --git a/node/node_test.go b/node/node_test.go index 64d59fc50f..e03d9ed4f9 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: 1000000, + GasLimit: 100_000_000, } _, err = tnd.MpoolPushMessage(ctx, msg) diff --git a/paychmgr/simple.go b/paychmgr/simple.go index 4d275a1a70..ddc49f864f 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: 1000000, + GasLimit: 100_000_000, 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: 1000000, + GasLimit: 100_000_000, GasPrice: types.NewInt(0), } diff --git a/storage/adapter_storage_miner.go b/storage/adapter_storage_miner.go index eaaa7a75c6..1405adf3b3 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: 9999999999, + GasLimit: 100_000_000, Method: builtin.MethodsMarket.ComputeDataCommitment, Params: ccparams, } diff --git a/storage/wdpost_run.go b/storage/wdpost_run.go index 9f3919240c..8e404610c1 100644 --- a/storage/wdpost_run.go +++ b/storage/wdpost_run.go @@ -177,7 +177,7 @@ func (s *WindowPoStScheduler) checkNextRecoveries(ctx context.Context, deadline Method: builtin.MethodsMiner.DeclareFaultsRecovered, Params: enc, Value: types.NewInt(0), - GasLimit: 10000000, // i dont know help + GasLimit: 100_000_000, // i dont know help GasPrice: types.NewInt(2), } @@ -256,7 +256,7 @@ func (s *WindowPoStScheduler) checkNextFaults(ctx context.Context, deadline uint Method: builtin.MethodsMiner.DeclareFaults, Params: enc, Value: types.NewInt(0), // TODO: Is there a fee? - GasLimit: 10000000, // i dont know help + GasLimit: 100_000_000, // i dont know help GasPrice: types.NewInt(2), }