Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Increase 'max gas' and 'vm cycle limit' from 10M to 100M #2065

Merged
merged 5 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contribs/gnodev/pkg/dev/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,6 @@ func newNodeConfig(tmc *tmcfg.Config, chainid string, appstate gnoland.GnoGenesi
PrivValidator: pv,
TMConfig: tmc,
Genesis: genesis,
GenesisMaxVMCycles: 10_000_000,
GenesisMaxVMCycles: 100_000_000,
}
}
10 changes: 5 additions & 5 deletions gno.land/cmd/gnoland/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (c *startCfg) RegisterFlags(fs *flag.FlagSet) {
fs.Int64Var(
&c.genesisMaxVMCycles,
"genesis-max-vm-cycles",
10_000_000,
100_000_000,
"set maximum allowed vm cycles per operation. Zero means no limit.",
)

Expand Down Expand Up @@ -319,10 +319,10 @@ func generateGenesisFile(genesisFile string, pk crypto.PubKey, c *startCfg) erro
gen.ConsensusParams = abci.ConsensusParams{
Block: &abci.BlockParams{
// TODO: update limits.
MaxTxBytes: 1_000_000, // 1MB,
MaxDataBytes: 2_000_000, // 2MB,
MaxGas: 10_0000_00, // 10M gas
TimeIotaMS: 100, // 100ms
MaxTxBytes: 1_000_000, // 1MB,
MaxDataBytes: 2_000_000, // 2MB,
MaxGas: 100_000_000, // 100M gas
TimeIotaMS: 100, // 100ms
},
}

Expand Down
2 changes: 1 addition & 1 deletion gno.land/pkg/gnoland/node_inmemory.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
Block: &abci.BlockParams{
MaxTxBytes: 1_000_000, // 1MB,
MaxDataBytes: 2_000_000, // 2MB,
MaxGas: 100_000_000, // 10M gas
MaxGas: 100_000_000, // 100M gas

Check warning on line 45 in gno.land/pkg/gnoland/node_inmemory.go

View check run for this annotation

Codecov / codecov/patch

gno.land/pkg/gnoland/node_inmemory.go#L45

Added line #L45 was not covered by tests
TimeIotaMS: 100, // 100ms
},
},
Expand Down
2 changes: 1 addition & 1 deletion gno.land/pkg/integration/testing_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func DefaultTestingGenesisConfig(t TestingTS, gnoroot string, self crypto.PubKey
Block: &abci.BlockParams{
MaxTxBytes: 1_000_000, // 1MB,
MaxDataBytes: 2_000_000, // 2MB,
MaxGas: 10_0000_000, // 10M gas
MaxGas: 100_000_000, // 100M gas
TimeIotaMS: 100, // 100ms
},
},
Expand Down
2 changes: 1 addition & 1 deletion gno.land/pkg/sdk/vm/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func setupTestEnv() testEnv {
acck := authm.NewAccountKeeper(iavlCapKey, std.ProtoBaseAccount)
bank := bankm.NewBankKeeper(acck)
stdlibsDir := filepath.Join("..", "..", "..", "..", "gnovm", "stdlibs")
vmk := NewVMKeeper(baseCapKey, iavlCapKey, acck, bank, stdlibsDir, 10_000_000)
vmk := NewVMKeeper(baseCapKey, iavlCapKey, acck, bank, stdlibsDir, 100_000_000)

vmk.Initialize(ms.MultiCacheWrap())

Expand Down
2 changes: 1 addition & 1 deletion tm2/pkg/bft/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const (
MaxBlockDataBytes int64 = 2000000 // 2MB

// MaxBlockMaxGas is the max gas limit for the block
MaxBlockMaxGas int64 = 10000000 // 10M gas
MaxBlockMaxGas int64 = 100000000 // 100M gas

// BlockTimeIotaMS is the block time iota (in ms)
BlockTimeIotaMS int64 = 100 // ms
Expand Down
Loading