diff --git a/app/ante/utils_test.go b/app/ante/utils_test.go index 61dbbfa418..c1e19bd2dd 100644 --- a/app/ante/utils_test.go +++ b/app/ante/utils_test.go @@ -103,9 +103,7 @@ func (suite *AnteTestSuite) SetupTest() { evmGenesis.Params.ChainConfig.ArrowGlacierBlock = &maxInt evmGenesis.Params.ChainConfig.GrayGlacierBlock = &maxInt evmGenesis.Params.ChainConfig.MergeNetsplitBlock = &maxInt - evmGenesis.Params.ChainConfig.ShanghaiTime = math.MaxUint64 - evmGenesis.Params.ChainConfig.CancunTime = math.MaxUint64 - evmGenesis.Params.ChainConfig.PragueTime = math.MaxUint64 + evmGenesis.Params.ChainConfig.ShanghaiTime = &maxInt } if suite.evmParamsOption != nil { suite.evmParamsOption(&evmGenesis.Params) diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index 8751e34dac..7bf9bb04d4 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -1813,19 +1813,16 @@ paths: use as a network splitter shanghai_time: type: string - format: uint64 title: >- shanghai switch time (nil = no fork, 0 = already on shanghai) cancun_time: type: string - format: uint64 title: >- cancun switch time (nil = no fork, 0 = already on cancun) prague_time: type: string - format: uint64 title: >- prague switch time (nil = no fork, 0 = already on prague) @@ -2636,19 +2633,16 @@ paths: in: query required: false type: string - format: uint64 - name: trace_config.overrides.cancun_time description: cancun switch time (nil = no fork, 0 = already on cancun). in: query required: false type: string - format: uint64 - name: trace_config.overrides.prague_time description: prague switch time (nil = no fork, 0 = already on prague). in: query required: false type: string - format: uint64 - name: trace_config.enable_memory description: enable_memory switches memory capture. in: query @@ -3156,19 +3150,16 @@ paths: in: query required: false type: string - format: uint64 - name: trace_config.overrides.cancun_time description: cancun switch time (nil = no fork, 0 = already on cancun). in: query required: false type: string - format: uint64 - name: trace_config.overrides.prague_time description: prague switch time (nil = no fork, 0 = already on prague). in: query required: false type: string - format: uint64 - name: trace_config.enable_memory description: enable_memory switches memory capture. in: query @@ -3531,15 +3522,12 @@ definitions: splitter shanghai_time: type: string - format: uint64 title: shanghai switch time (nil = no fork, 0 = already on shanghai) cancun_time: type: string - format: uint64 title: cancun switch time (nil = no fork, 0 = already on cancun) prague_time: type: string - format: uint64 title: prague switch time (nil = no fork, 0 = already on prague) description: >- ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int @@ -4008,15 +3996,12 @@ definitions: network splitter shanghai_time: type: string - format: uint64 title: shanghai switch time (nil = no fork, 0 = already on shanghai) cancun_time: type: string - format: uint64 title: cancun switch time (nil = no fork, 0 = already on cancun) prague_time: type: string - format: uint64 title: prague switch time (nil = no fork, 0 = already on prague) description: >- ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int @@ -4207,15 +4192,12 @@ definitions: network splitter shanghai_time: type: string - format: uint64 title: shanghai switch time (nil = no fork, 0 = already on shanghai) cancun_time: type: string - format: uint64 title: cancun switch time (nil = no fork, 0 = already on cancun) prague_time: type: string - format: uint64 title: prague switch time (nil = no fork, 0 = already on prague) description: >- ChainConfig defines the Ethereum ChainConfig parameters using @@ -4392,15 +4374,12 @@ definitions: network splitter shanghai_time: type: string - format: uint64 title: shanghai switch time (nil = no fork, 0 = already on shanghai) cancun_time: type: string - format: uint64 title: cancun switch time (nil = no fork, 0 = already on cancun) prague_time: type: string - format: uint64 title: prague switch time (nil = no fork, 0 = already on prague) description: >- ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int diff --git a/proto/ethermint/evm/v1/chain_config.proto b/proto/ethermint/evm/v1/chain_config.proto index 92c3dfd631..2bdb2d24c8 100644 --- a/proto/ethermint/evm/v1/chain_config.proto +++ b/proto/ethermint/evm/v1/chain_config.proto @@ -100,15 +100,18 @@ message ChainConfig { (gogoproto.moretags) = "yaml:\"merge_netsplit_block\"" ]; // shanghai switch time (nil = no fork, 0 = already on shanghai) - uint64 shanghai_time = 22 [ - (gogoproto.moretags) = "yaml:\"shanghai_time,omitempty\"" + string shanghai_time = 22 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.moretags) = "yaml:\"shanghai_time\"" ]; // cancun switch time (nil = no fork, 0 = already on cancun) - uint64 cancun_time = 23 [ - (gogoproto.moretags) = "yaml:\"cancun_time,omitempty\"" + string cancun_time = 23 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.moretags) = "yaml:\"cancun_time\"" ]; // prague switch time (nil = no fork, 0 = already on prague) - uint64 prague_time = 24 [ - (gogoproto.moretags) = "yaml:\"prague_time,omitempty\"" + string prague_time = 24 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.moretags) = "yaml:\"prague_time\"" ]; } \ No newline at end of file diff --git a/scripts/geth-genesis.json b/scripts/geth-genesis.json index 77d2d448e2..67c762fc3c 100755 --- a/scripts/geth-genesis.json +++ b/scripts/geth-genesis.json @@ -14,6 +14,7 @@ "berlinBlock": 0, "yoloV3Block": 0, "londonBlock": 0, + "shanghaiTime": 0, "clique": { "period": 2, "epoch": 30000 diff --git a/tests/integration_tests/expected_constants.py b/tests/integration_tests/expected_constants.py index 3fe22e89a5..de2d7ad146 100644 --- a/tests/integration_tests/expected_constants.py +++ b/tests/integration_tests/expected_constants.py @@ -152,7 +152,7 @@ EXPECTED_CONTRACT_CREATE_TRACER = { "from": "0x57f96e6b86cdefdb3d412547816a82e3e0ebf9d2", "gas": "0x7ef9d", - "gasUsed": "0x96651", + "gasUsed": "0x966fd", "input": "0x608060405234801561001057600080fd5b50604080518082018252600981526805465737445524332360bc1b60208083019182528351808501909452600484526315195cdd60e21b90840152815191929161005c91600391610156565b508051610070906004906020840190610156565b50505061008e336a52b7d2dcc80cd2e400000061009360201b60201c565b610250565b6001600160a01b0382166100ed5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b80600260008282546100ff91906101ef565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b82805461016290610215565b90600052602060002090601f01602090048101928261018457600085556101ca565b82601f1061019d57805160ff19168380011785556101ca565b828001600101855582156101ca579182015b828111156101ca5782518255916020019190600101906101af565b506101d69291506101da565b5090565b5b808211156101d657600081556001016101db565b6000821982111561021057634e487b7160e01b600052601160045260246000fd5b500190565b600181811c9082168061022957607f821691505b6020821081141561024a57634e487b7160e01b600052602260045260246000fd5b50919050565b61085d8061025f6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069a565b60405180910390f35b6100df6100da36600461070b565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610735565b61024a565b604051601281526020016100c3565b6100df61013136600461070b565b61026e565b6100f3610144366004610771565b6001600160a01b031660009081526020819052604090205490565b6100b6610290565b6100df61017536600461070b565b61029f565b6100df61018836600461070b565b61031f565b6100f361019b366004610793565b61032d565b6060600380546101af906107c6565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c6565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b600033610240818585610358565b5060019392505050565b60003361025885828561047c565b6102638585856104f6565b506001949350505050565b600033610240818585610281838361032d565b61028b9190610801565b610358565b6060600480546101af906107c6565b600033816102ad828661032d565b9050838110156103125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102638286868403610358565b6000336102408185856104f6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610309565b6001600160a01b03821661041b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610309565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610488848461032d565b905060001981146104f057818110156104e35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610309565b6104f08484848403610358565b50505050565b6001600160a01b03831661055a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610309565b6001600160a01b0382166105bc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610309565b6001600160a01b038316600090815260208190526040902054818110156106345760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610309565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f0565b600060208083528351808285015260005b818110156106c7578581018301518582016040015282016106ab565b818111156106d9576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461070657600080fd5b919050565b6000806040838503121561071e57600080fd5b610727836106ef565b946020939093013593505050565b60008060006060848603121561074a57600080fd5b610753846106ef565b9250610761602085016106ef565b9150604084013590509250925092565b60006020828403121561078357600080fd5b61078c826106ef565b9392505050565b600080604083850312156107a657600080fd5b6107af836106ef565b91506107bd602084016106ef565b90509250929050565b600181811c908216806107da57607f821691505b602082108114156107fb57634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561082257634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220fee840cc9e1cfac46e073588ade030be1401c580c5849dd4e63f659a75eb220c64736f6c634300080a0033", # noqa: E501 "output": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461012357806370a082311461013657806395d89b411461015f578063a457c2d714610167578063a9059cbb1461017a578063dd62ed3e1461018d57600080fd5b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100ef57806323b872dd14610101578063313ce56714610114575b600080fd5b6100b66101a0565b6040516100c3919061069a565b60405180910390f35b6100df6100da36600461070b565b610232565b60405190151581526020016100c3565b6002545b6040519081526020016100c3565b6100df61010f366004610735565b61024a565b604051601281526020016100c3565b6100df61013136600461070b565b61026e565b6100f3610144366004610771565b6001600160a01b031660009081526020819052604090205490565b6100b6610290565b6100df61017536600461070b565b61029f565b6100df61018836600461070b565b61031f565b6100f361019b366004610793565b61032d565b6060600380546101af906107c6565b80601f01602080910402602001604051908101604052809291908181526020018280546101db906107c6565b80156102285780601f106101fd57610100808354040283529160200191610228565b820191906000526020600020905b81548152906001019060200180831161020b57829003601f168201915b5050505050905090565b600033610240818585610358565b5060019392505050565b60003361025885828561047c565b6102638585856104f6565b506001949350505050565b600033610240818585610281838361032d565b61028b9190610801565b610358565b6060600480546101af906107c6565b600033816102ad828661032d565b9050838110156103125760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b6102638286868403610358565b6000336102408185856104f6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103ba5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610309565b6001600160a01b03821661041b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610309565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000610488848461032d565b905060001981146104f057818110156104e35760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610309565b6104f08484848403610358565b50505050565b6001600160a01b03831661055a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610309565b6001600160a01b0382166105bc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610309565b6001600160a01b038316600090815260208190526040902054818110156106345760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610309565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36104f0565b600060208083528351808285015260005b818110156106c7578581018301518582016040015282016106ab565b818111156106d9576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461070657600080fd5b919050565b6000806040838503121561071e57600080fd5b610727836106ef565b946020939093013593505050565b60008060006060848603121561074a57600080fd5b610753846106ef565b9250610761602085016106ef565b9150604084013590509250925092565b60006020828403121561078357600080fd5b61078c826106ef565b9392505050565b600080604083850312156107a657600080fd5b6107af836106ef565b91506107bd602084016106ef565b90509250929050565b600181811c908216806107da57607f821691505b602082108114156107fb57634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561082257634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220fee840cc9e1cfac46e073588ade030be1401c580c5849dd4e63f659a75eb220c64736f6c634300080a0033", # noqa: E501 "to": "0x8c76cfc1934d5120cc673b6e5ddf7b88feb1c18c", diff --git a/x/evm/handler_test.go b/x/evm/handler_test.go index 7ee12effa2..dd87246ca9 100644 --- a/x/evm/handler_test.go +++ b/x/evm/handler_test.go @@ -634,7 +634,7 @@ func (suite *EvmTestSuite) TestERC20TransferReverted() { } func (suite *EvmTestSuite) TestContractDeploymentRevert() { - intrinsicGas := uint64(134180) + intrinsicGas := uint64(134510) testCases := []struct { msg string gasLimit uint64 diff --git a/x/evm/keeper/grpc_query_test.go b/x/evm/keeper/grpc_query_test.go index 3c8dab84cd..513f35f73d 100644 --- a/x/evm/keeper/grpc_query_test.go +++ b/x/evm/keeper/grpc_query_test.go @@ -576,7 +576,7 @@ func (suite *KeeperTestSuite) TestEstimateGas() { } }, true, - 1186778, + 1187108, false, }, // estimate gas of an erc20 transfer, the exact gas number is checked with geth @@ -652,7 +652,7 @@ func (suite *KeeperTestSuite) TestEstimateGas() { } }, true, - 1186778, + 1187108, true, }, { diff --git a/x/evm/keeper/keeper_test.go b/x/evm/keeper/keeper_test.go index 2aafb23671..404141a854 100644 --- a/x/evm/keeper/keeper_test.go +++ b/x/evm/keeper/keeper_test.go @@ -139,9 +139,7 @@ func (suite *KeeperTestSuite) SetupAppWithT(checkTx bool, t require.TestingT) { evmGenesis.Params.ChainConfig.ArrowGlacierBlock = &maxInt evmGenesis.Params.ChainConfig.GrayGlacierBlock = &maxInt evmGenesis.Params.ChainConfig.MergeNetsplitBlock = &maxInt - evmGenesis.Params.ChainConfig.ShanghaiTime = math.MaxUint64 - evmGenesis.Params.ChainConfig.CancunTime = math.MaxUint64 - evmGenesis.Params.ChainConfig.PragueTime = math.MaxUint64 + evmGenesis.Params.ChainConfig.ShanghaiTime = &maxInt genesis[types.ModuleName] = app.AppCodec().MustMarshalJSON(evmGenesis) } return genesis diff --git a/x/evm/keeper/state_transition_test.go b/x/evm/keeper/state_transition_test.go index 6f9cd06d0a..3e0e0ddf5d 100644 --- a/x/evm/keeper/state_transition_test.go +++ b/x/evm/keeper/state_transition_test.go @@ -171,6 +171,15 @@ func (suite *KeeperTestSuite) TestGetCoinbaseAddress() { } } +// toWordSize returns the ceiled word size required for init code payment calculation. +func toWordSize(size uint64) uint64 { + if size > math.MaxUint64-31 { + return math.MaxUint64/32 + 1 + } + + return (size + 31) / 32 +} + func (suite *KeeperTestSuite) TestGetEthIntrinsicGas() { testCases := []struct { name string @@ -206,7 +215,7 @@ func (suite *KeeperTestSuite) TestGetEthIntrinsicGas() { 1, true, true, - params.TxGas + params.TxDataNonZeroGasFrontier*1, + params.TxGas + params.TxDataNonZeroGasFrontier*1 + toWordSize(1)*params.InitCodeWordGas, }, { "no data, one accesslist, not contract creation, not homestead, not istanbul", diff --git a/x/evm/migrations/v6/migrate.go b/x/evm/migrations/v6/migrate.go index 8ec0488134..be13affc4b 100644 --- a/x/evm/migrations/v6/migrate.go +++ b/x/evm/migrations/v6/migrate.go @@ -24,6 +24,8 @@ func MigrateStore( bz := store.Get(types.KeyPrefixParams) cdc.MustUnmarshal(bz, ¶ms) newParams = params.ToParams() + shanghaiTime := sdk.ZeroInt() + newParams.ChainConfig.ShanghaiTime = &shanghaiTime if err := newParams.Validate(); err != nil { return err } diff --git a/x/evm/types/chain_config.go b/x/evm/types/chain_config.go index 5ebc71dd1d..bbd3dcd032 100644 --- a/x/evm/types/chain_config.go +++ b/x/evm/types/chain_config.go @@ -51,15 +51,9 @@ func (cc ChainConfig) EthereumConfig(chainID *big.Int) *params.ChainConfig { TerminalTotalDifficulty: nil, Ethash: nil, Clique: nil, - } - if cc.ShanghaiTime > 0 { - cfg.ShanghaiTime = &cc.ShanghaiTime - } - if cc.CancunTime > 0 { - cfg.CancunTime = &cc.CancunTime - } - if cc.PragueTime > 0 { - cfg.PragueTime = &cc.PragueTime + ShanghaiTime: getTimeValue(cc.ShanghaiTime), + CancunTime: getTimeValue(cc.CancunTime), + PragueTime: getTimeValue(cc.PragueTime), } return cfg } @@ -81,6 +75,7 @@ func DefaultChainConfig() ChainConfig { arrowGlacierBlock := sdk.ZeroInt() grayGlacierBlock := sdk.ZeroInt() mergeNetsplitBlock := sdk.ZeroInt() + shanghaiTime := sdk.ZeroInt() return ChainConfig{ HomesteadBlock: &homesteadBlock, @@ -100,6 +95,7 @@ func DefaultChainConfig() ChainConfig { ArrowGlacierBlock: &arrowGlacierBlock, GrayGlacierBlock: &grayGlacierBlock, MergeNetsplitBlock: &mergeNetsplitBlock, + ShanghaiTime: &shanghaiTime, } } @@ -111,6 +107,14 @@ func getBlockValue(block *sdkmath.Int) *big.Int { return block.BigInt() } +func getTimeValue(time *sdkmath.Int) *uint64 { + if time == nil || time.IsNegative() { + return nil + } + t := time.BigInt().Uint64() + return &t +} + // Validate performs a basic validation of the ChainConfig params. The function will return an error // if any of the block values is uninitialized (i.e nil) or if the EIP150Hash is an invalid hash. func (cc ChainConfig) Validate() error { @@ -162,6 +166,15 @@ func (cc ChainConfig) Validate() error { if err := ValidateBlock(cc.MergeNetsplitBlock); err != nil { return errorsmod.Wrap(err, "MergeNetsplitBlock") } + if err := ValidateTime(cc.ShanghaiTime); err != nil { + return errorsmod.Wrap(err, "ShanghaiTime") + } + if err := ValidateTime(cc.CancunTime); err != nil { + return errorsmod.Wrap(err, "CancunTime") + } + if err := ValidateTime(cc.PragueTime); err != nil { + return errorsmod.Wrap(err, "PragueTime") + } // NOTE: chain ID is not needed to check config order if err := cc.EthereumConfig(nil).CheckConfigForkOrder(); err != nil { return errorsmod.Wrap(err, "invalid config fork order") @@ -191,3 +204,18 @@ func ValidateBlock(block *sdkmath.Int) error { return nil } + +func ValidateTime(time *sdkmath.Int) error { + // nil value means that the fork has not yet been applied + if time == nil { + return nil + } + + if time.IsNegative() { + return errorsmod.Wrapf( + ErrInvalidChainConfig, "time value cannot be negative: %s", time, + ) + } + + return nil +} diff --git a/x/evm/types/chain_config.pb.go b/x/evm/types/chain_config.pb.go index 9dc342d5f3..50c3be885d 100644 --- a/x/evm/types/chain_config.pb.go +++ b/x/evm/types/chain_config.pb.go @@ -63,11 +63,11 @@ type ChainConfig struct { // merge_netsplit_block: Virtual fork after The Merge to use as a network splitter MergeNetsplitBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,21,opt,name=merge_netsplit_block,json=mergeNetsplitBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"merge_netsplit_block,omitempty" yaml:"merge_netsplit_block"` // shanghai switch time (nil = no fork, 0 = already on shanghai) - ShanghaiTime uint64 `protobuf:"varint,22,opt,name=shanghai_time,json=shanghaiTime,proto3" json:"shanghai_time,omitempty" yaml:"shanghai_time,omitempty"` + ShanghaiTime *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,22,opt,name=shanghai_time,json=shanghaiTime,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"shanghai_time,omitempty" yaml:"shanghai_time"` // cancun switch time (nil = no fork, 0 = already on cancun) - CancunTime uint64 `protobuf:"varint,23,opt,name=cancun_time,json=cancunTime,proto3" json:"cancun_time,omitempty" yaml:"cancun_time,omitempty"` + CancunTime *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,23,opt,name=cancun_time,json=cancunTime,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"cancun_time,omitempty" yaml:"cancun_time"` // prague switch time (nil = no fork, 0 = already on prague) - PragueTime uint64 `protobuf:"varint,24,opt,name=prague_time,json=pragueTime,proto3" json:"prague_time,omitempty" yaml:"prague_time,omitempty"` + PragueTime *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,24,opt,name=prague_time,json=pragueTime,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"prague_time,omitempty" yaml:"prague_time"` } func (m *ChainConfig) Reset() { *m = ChainConfig{} } @@ -117,27 +117,6 @@ func (m *ChainConfig) GetEIP150Hash() string { return "" } -func (m *ChainConfig) GetShanghaiTime() uint64 { - if m != nil { - return m.ShanghaiTime - } - return 0 -} - -func (m *ChainConfig) GetCancunTime() uint64 { - if m != nil { - return m.CancunTime - } - return 0 -} - -func (m *ChainConfig) GetPragueTime() uint64 { - if m != nil { - return m.PragueTime - } - return 0 -} - func init() { proto.RegisterType((*ChainConfig)(nil), "ethermint.evm.v1.ChainConfig") } @@ -147,59 +126,58 @@ func init() { } var fileDescriptor_7a2bf715c16bc5d4 = []byte{ - // 827 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x96, 0xc1, 0x8e, 0xda, 0x46, - 0x18, 0xc7, 0x97, 0x96, 0xa6, 0x64, 0xcc, 0x7a, 0x8d, 0x21, 0x09, 0x4d, 0x2b, 0x8c, 0xa6, 0x52, - 0xc5, 0xa1, 0x81, 0xa0, 0x08, 0x69, 0xd5, 0x53, 0x97, 0x4d, 0xba, 0x81, 0x43, 0x1b, 0x4d, 0x2a, - 0x55, 0xea, 0xc5, 0x1a, 0xcc, 0xc4, 0x76, 0xb1, 0x3d, 0x96, 0x3d, 0x26, 0x71, 0xdb, 0x87, 0xe8, - 0xbd, 0x2f, 0xd4, 0xe3, 0x1e, 0xab, 0x1e, 0xac, 0x8a, 0x7d, 0x03, 0x9e, 0xa0, 0xf2, 0xcc, 0x60, - 0x30, 0xcb, 0xa1, 0x70, 0xda, 0xf5, 0x7f, 0xbe, 0xf9, 0xfd, 0x66, 0xbe, 0xb1, 0x8d, 0xc1, 0x97, - 0x84, 0x39, 0x24, 0xf2, 0xdd, 0x80, 0x0d, 0xc8, 0xd2, 0x1f, 0x2c, 0x87, 0x03, 0xcb, 0xc1, 0x6e, - 0x60, 0x5a, 0x34, 0x78, 0xe7, 0xda, 0xfd, 0x30, 0xa2, 0x8c, 0xea, 0x5a, 0x51, 0xd4, 0x27, 0x4b, - 0xbf, 0xbf, 0x1c, 0x3e, 0x6d, 0xd9, 0xd4, 0xa6, 0x7c, 0x70, 0x90, 0xff, 0x27, 0xea, 0xe0, 0x9f, - 0x0d, 0xa0, 0x5c, 0xe7, 0xd3, 0xaf, 0xf9, 0x6c, 0xdd, 0x07, 0x17, 0x0e, 0xf5, 0x49, 0xcc, 0x08, - 0x9e, 0x9b, 0x33, 0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 0x60, 0x09, 0x21, 0xf2, 0x1c, 0x31, 0xad, 0xd6, 0x54, 0xed, 0x62, - 0x5a, 0xad, 0x5d, 0x68, 0xda, 0xb4, 0x5a, 0xd3, 0xb4, 0xc6, 0xb4, 0x5a, 0x6b, 0x6a, 0x2d, 0x74, - 0x9e, 0x52, 0x8f, 0x9a, 0xcb, 0x17, 0xa2, 0x15, 0x48, 0x21, 0xef, 0x71, 0x2c, 0x5f, 0x90, 0x48, - 0xb5, 0x30, 0xc3, 0x5e, 0x1a, 0xcb, 0x3e, 0x21, 0x4d, 0x74, 0x6f, 0xfb, 0x93, 0x3d, 0xfe, 0xf6, - 0xaf, 0x55, 0xa7, 0x72, 0xbb, 0xea, 0x54, 0xfe, 0x5d, 0x75, 0x2a, 0x7f, 0xdc, 0x75, 0xce, 0x6e, - 0xef, 0x3a, 0x67, 0x7f, 0xdf, 0x75, 0xce, 0x7e, 0xde, 0x3d, 0x19, 0xb2, 0xcc, 0x0f, 0x66, 0xfb, - 0x55, 0xf4, 0x81, 0x7f, 0x17, 0xf1, 0xd3, 0x99, 0x3d, 0xe0, 0x9f, 0x39, 0x2f, 0xfe, 0x0b, 0x00, - 0x00, 0xff, 0xff, 0x69, 0x80, 0x1f, 0xa3, 0x35, 0x09, 0x00, 0x00, + // 809 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0xd6, 0x4d, 0x6f, 0xfa, 0x36, + 0x1c, 0x07, 0xf0, 0xb2, 0xb1, 0x8e, 0x3a, 0x10, 0x42, 0xa0, 0x2d, 0xeb, 0x24, 0xa8, 0x3c, 0x69, + 0xea, 0xa5, 0x50, 0x54, 0x21, 0x55, 0x3b, 0xb5, 0xb4, 0x5d, 0x0b, 0x87, 0xad, 0x72, 0x27, 0x4d, + 0xda, 0x25, 0x32, 0xc1, 0x4d, 0x32, 0x92, 0x38, 0xca, 0x03, 0x2d, 0xdb, 0x5e, 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x44, + 0x73, 0x49, 0x18, 0x78, 0xb6, 0x15, 0x0a, 0x78, 0x7f, 0xfb, 0xf7, 0x71, 0x53, 0x1e, 0x44, 0x2a, + 0x2b, 0xff, 0x20, 0xaa, 0x1c, 0x37, 0x40, 0x29, 0x30, 0xb1, 0x6b, 0x98, 0xd8, 0xd2, 0x42, 0xcb, + 0x21, 0xf5, 0x03, 0xa6, 0xf6, 0x32, 0xa9, 0x35, 0xae, 0xa6, 0x82, 0x20, 0x2a, 0x2e, 0xc6, 0x3f, + 0x59, 0x0e, 0x51, 0x31, 0x90, 0x74, 0xec, 0xea, 0x91, 0xcb, 0x99, 0x43, 0xc6, 0x5c, 0x66, 0x62, + 0x54, 0xf1, 0xb1, 0x59, 0xc6, 0x40, 0x04, 0xf8, 0x68, 0x41, 0x78, 0x3e, 0x36, 0x22, 0xc2, 0x89, + 0xfa, 0xf6, 0xc4, 0x4a, 0x0c, 0x44, 0x80, 0x8f, 0x62, 0x62, 0x90, 0x2f, 0xc8, 0x4a, 0x79, 0x90, + 0x2f, 0x94, 0x15, 0x65, 0x90, 0x2f, 0x28, 0x4a, 0x65, 0x90, 0x2f, 0x54, 0x95, 0x1a, 0x2a, 0x4d, + 0xa9, 0x4d, 0xb5, 0xc9, 0x39, 0xdf, 0x6a, 0x24, 0x91, 0x67, 0x1c, 0x88, 0x0f, 0x30, 0x92, 0x75, + 0x1c, 0x62, 0x7b, 0x1a, 0x88, 0xfb, 0x80, 0x14, 0x7e, 0x77, 0x96, 0x47, 0x82, 0xde, 0xe5, 0x5f, + 0xf3, 0x46, 0xee, 0x75, 0xde, 0xc8, 0xfd, 0x3b, 0x6f, 0xe4, 0xfe, 0x7c, 0x6b, 0xec, 0xbc, 0xbe, + 0x35, 0x76, 0xfe, 0x7e, 0x6b, 0xec, 0xfc, 0xb2, 0xda, 0x39, 0x99, 0xc4, 0x8d, 0x2f, 0x4f, 0x5d, + 0x2f, 0xec, 0xdc, 0xc5, 0xba, 0x1f, 0xee, 0xb2, 0x63, 0xd4, 0xf9, 0xff, 0x01, 0x00, 0x00, 0xff, + 0xff, 0x93, 0x90, 0xdb, 0x81, 0x95, 0x09, 0x00, 0x00, } func (m *ChainConfig) Marshal() (dAtA []byte, err error) { @@ -222,26 +200,47 @@ func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.PragueTime != 0 { - i = encodeVarintChainConfig(dAtA, i, uint64(m.PragueTime)) + if m.PragueTime != nil { + { + size := m.PragueTime.Size() + i -= size + if _, err := m.PragueTime.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintChainConfig(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0xc0 + dAtA[i] = 0xc2 } - if m.CancunTime != 0 { - i = encodeVarintChainConfig(dAtA, i, uint64(m.CancunTime)) + if m.CancunTime != nil { + { + size := m.CancunTime.Size() + i -= size + if _, err := m.CancunTime.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintChainConfig(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0xb8 + dAtA[i] = 0xba } - if m.ShanghaiTime != 0 { - i = encodeVarintChainConfig(dAtA, i, uint64(m.ShanghaiTime)) + if m.ShanghaiTime != nil { + { + size := m.ShanghaiTime.Size() + i -= size + if _, err := m.ShanghaiTime.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintChainConfig(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0xb0 + dAtA[i] = 0xb2 } if m.MergeNetsplitBlock != nil { { @@ -535,14 +534,17 @@ func (m *ChainConfig) Size() (n int) { l = m.MergeNetsplitBlock.Size() n += 2 + l + sovChainConfig(uint64(l)) } - if m.ShanghaiTime != 0 { - n += 2 + sovChainConfig(uint64(m.ShanghaiTime)) + if m.ShanghaiTime != nil { + l = m.ShanghaiTime.Size() + n += 2 + l + sovChainConfig(uint64(l)) } - if m.CancunTime != 0 { - n += 2 + sovChainConfig(uint64(m.CancunTime)) + if m.CancunTime != nil { + l = m.CancunTime.Size() + n += 2 + l + sovChainConfig(uint64(l)) } - if m.PragueTime != 0 { - n += 2 + sovChainConfig(uint64(m.PragueTime)) + if m.PragueTime != nil { + l = m.PragueTime.Size() + n += 2 + l + sovChainConfig(uint64(l)) } return n } @@ -1175,10 +1177,10 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 22: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ShanghaiTime", wireType) } - m.ShanghaiTime = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowChainConfig @@ -1188,16 +1190,33 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.ShanghaiTime |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthChainConfig + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthChainConfig + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_cosmos_cosmos_sdk_types.Int + m.ShanghaiTime = &v + if err := m.ShanghaiTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 23: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CancunTime", wireType) } - m.CancunTime = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowChainConfig @@ -1207,16 +1226,33 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.CancunTime |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthChainConfig + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthChainConfig + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_cosmos_cosmos_sdk_types.Int + m.CancunTime = &v + if err := m.CancunTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 24: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PragueTime", wireType) } - m.PragueTime = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowChainConfig @@ -1226,11 +1262,28 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.PragueTime |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthChainConfig + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthChainConfig + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_cosmos_cosmos_sdk_types.Int + m.PragueTime = &v + if err := m.PragueTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipChainConfig(dAtA[iNdEx:])