diff --git a/app/ante/eip712.go b/app/ante/eip712.go index 86dc4c0b..eaf03334 100644 --- a/app/ante/eip712.go +++ b/app/ante/eip712.go @@ -2,6 +2,7 @@ package ante import ( "fmt" + "math/big" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -37,13 +38,15 @@ func init() { // CONTRACT: Tx must implement SigVerifiableTx interface type Eip712SigVerificationDecorator struct { ak evmtypes.AccountKeeper + evmKeeper EVMKeeper signModeHandler authsigning.SignModeHandler } // NewEip712SigVerificationDecorator creates a new Eip712SigVerificationDecorator -func NewEip712SigVerificationDecorator(ak evmtypes.AccountKeeper, signModeHandler authsigning.SignModeHandler) Eip712SigVerificationDecorator { +func NewEip712SigVerificationDecorator(ak evmtypes.AccountKeeper, evmKeeper EVMKeeper, signModeHandler authsigning.SignModeHandler) Eip712SigVerificationDecorator { return Eip712SigVerificationDecorator{ ak: ak, + evmKeeper: evmKeeper, signModeHandler: signModeHandler, } } @@ -110,7 +113,8 @@ func (svd Eip712SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, // retrieve signer data genesis := ctx.BlockHeight() == 0 - chainID := ctx.ChainID() + evmParams := svd.evmKeeper.GetParams(ctx) + ethChainId := evmParams.GetChainConfig().EthereumConfig().ChainID.String() var accNum uint64 if !genesis { @@ -118,7 +122,7 @@ func (svd Eip712SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, } signerData := authsigning.SignerData{ - ChainID: chainID, + ChainID: ethChainId, AccountNumber: accNum, Sequence: acc.GetSequence(), } @@ -128,7 +132,7 @@ func (svd Eip712SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, } if err := VerifySignature(pubKey, signerData, sig.Data, svd.signModeHandler, authSignTx); err != nil { - errMsg := fmt.Errorf("signature verification failed; please verify account number (%d) and chain-id (%s): %w", accNum, chainID, err) + errMsg := fmt.Errorf("signature verification failed; please verify account number (%d) and chain-id (%s): %w", accNum, ethChainId, err) return ctx, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, errMsg.Error()) } @@ -175,9 +179,9 @@ func VerifySignature( msgs, tx.GetMemo(), ) - signerChainID, err := stratos.ParseChainID(signerData.ChainID) - if err != nil { - return sdkerrors.Wrapf(err, "failed to parse chainID: %s", signerData.ChainID) + signerChainID, ok := new(big.Int).SetString(signerData.ChainID, 10) + if !ok { + return sdkerrors.Wrapf(sdkerrors.ErrUnknownExtensionOptions, "failed to parse chainID: %s", signerData.ChainID) } txWithExtensions, ok := tx.(authante.HasExtensionOptionsTx) diff --git a/app/ante/eth.go b/app/ante/eth.go index 16e0510b..b354e489 100644 --- a/app/ante/eth.go +++ b/app/ante/eth.go @@ -35,11 +35,9 @@ func NewEthSigVerificationDecorator(ek EVMKeeper) EthSigVerificationDecorator { // Failure in RecheckTx will prevent tx to be included into block, especially when CheckTx succeed, in which case user // won't see the error message. func (esvd EthSigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { - chainID := esvd.evmKeeper.ChainID() - params := esvd.evmKeeper.GetParams(ctx) - ethCfg := params.ChainConfig.EthereumConfig(chainID) + ethCfg := params.ChainConfig.EthereumConfig() blockNum := big.NewInt(ctx.BlockHeight()) signer := ethtypes.MakeSigner(ethCfg, blockNum) @@ -164,7 +162,7 @@ func NewEthGasConsumeDecorator( func (egcd EthGasConsumeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { params := egcd.evmKeeper.GetParams(ctx) - ethCfg := params.ChainConfig.EthereumConfig(egcd.evmKeeper.ChainID()) + ethCfg := params.ChainConfig.EthereumConfig() blockHeight := big.NewInt(ctx.BlockHeight()) homestead := ethCfg.IsHomestead(blockHeight) @@ -252,7 +250,7 @@ func NewCanTransferDecorator(evmKeeper EVMKeeper) CanTransferDecorator { // see if the address can execute the transaction. func (ctd CanTransferDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { params := ctd.evmKeeper.GetParams(ctx) - ethCfg := params.ChainConfig.EthereumConfig(ctd.evmKeeper.ChainID()) + ethCfg := params.ChainConfig.EthereumConfig() signer := ethtypes.MakeSigner(ethCfg, big.NewInt(ctx.BlockHeight())) for _, msg := range tx.GetMsgs() { @@ -411,8 +409,7 @@ func (vbd EthValidateBasicDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simu txGasLimit := uint64(0) params := vbd.evmKeeper.GetParams(ctx) - chainID := vbd.evmKeeper.ChainID() - ethCfg := params.ChainConfig.EthereumConfig(chainID) + ethCfg := params.ChainConfig.EthereumConfig() baseFee := vbd.evmKeeper.GetBaseFee(ctx, ethCfg) for _, msg := range protoTx.GetMsgs() { @@ -517,7 +514,7 @@ func NewEthMempoolFeeDecorator(ek EVMKeeper) EthMempoolFeeDecorator { func (mfd EthMempoolFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { if ctx.IsCheckTx() && !simulate { params := mfd.evmKeeper.GetParams(ctx) - ethCfg := params.ChainConfig.EthereumConfig(mfd.evmKeeper.ChainID()) + ethCfg := params.ChainConfig.EthereumConfig() baseFee := mfd.evmKeeper.GetBaseFee(ctx, ethCfg) if baseFee == nil { for _, msg := range tx.GetMsgs() { diff --git a/app/ante/handler_options.go b/app/ante/handler_options.go index b6411e22..bada4e11 100644 --- a/app/ante/handler_options.go +++ b/app/ante/handler_options.go @@ -94,7 +94,7 @@ func newCosmosAnteHandlerEip712(options HandlerOptions) sdk.AnteHandler { ante.NewValidateSigCountDecorator(options.AccountKeeper), ante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer), // Note: signature verification uses EIP instead of the cosmos signature validator - NewEip712SigVerificationDecorator(options.AccountKeeper, options.SignModeHandler), + NewEip712SigVerificationDecorator(options.AccountKeeper, options.EvmKeeper, options.SignModeHandler), ante.NewIncrementSequenceDecorator(options.AccountKeeper), ibcante.NewAnteDecorator(options.IBCKeeper), ) diff --git a/app/ante/interfaces.go b/app/ante/interfaces.go index f3a5a777..877c2674 100644 --- a/app/ante/interfaces.go +++ b/app/ante/interfaces.go @@ -19,7 +19,6 @@ import ( type EVMKeeper interface { statedb.Keeper - ChainID() *big.Int GetParams(ctx sdk.Context) evmtypes.Params NewEVM(ctx sdk.Context, msg core.Message, cfg *evmtypes.EVMConfig, tracer vm.EVMLogger, stateDB vm.StateDB) *vm.EVM DeductTxCostsFromUserBalance( diff --git a/client/config.go b/client/config.go index 5b30ee36..0f391d26 100644 --- a/client/config.go +++ b/client/config.go @@ -1,7 +1,6 @@ package client import ( - "fmt" "os" "path" @@ -11,8 +10,6 @@ import ( "github.com/tendermint/tendermint/libs/cli" "github.com/cosmos/cosmos-sdk/client/flags" - - stratos "github.com/stratosnet/stratos-chain/types" ) // InitConfig adds the chain-id, encoding and output flags to the persistent flag set. @@ -46,23 +43,3 @@ func InitConfig(cmd *cobra.Command) error { return viper.BindPFlag(cli.OutputFlag, cmd.PersistentFlags().Lookup(cli.OutputFlag)) } - -// ValidateChainID wraps a cobra command with a RunE function with base 10 integer chain-id verification. -func ValidateChainID(baseCmd *cobra.Command) *cobra.Command { - // Copy base run command to be used after chain verification - baseRunE := baseCmd.RunE - - // Function to replace command's RunE function - validateFn := func(cmd *cobra.Command, args []string) error { - chainID, _ := cmd.Flags().GetString(flags.FlagChainID) - - if !stratos.IsValidChainID(chainID) { - return fmt.Errorf("invalid chain-id format: %s", chainID) - } - - return baseRunE(cmd, args) - } - - baseCmd.RunE = validateFn - return baseCmd -} diff --git a/cmd/stchaind/root.go b/cmd/stchaind/root.go index c05c35c7..ad8544da 100644 --- a/cmd/stchaind/root.go +++ b/cmd/stchaind/root.go @@ -99,9 +99,7 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { rootCmd.AddCommand( - stratosclient.ValidateChainID( - genutilcli.InitCmd(app.ModuleBasics, app.DefaultNodeHome), - ), + genutilcli.InitCmd(app.ModuleBasics, app.DefaultNodeHome), genutilcli.CollectGenTxsCmd(banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome), genutilcli.MigrateGenesisCmd(), genutilcli.GenTxCmd(app.ModuleBasics, encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome), diff --git a/proto/stratos/evm/v1/evm.proto b/proto/stratos/evm/v1/evm.proto index 06731540..8d5dfe35 100644 --- a/proto/stratos/evm/v1/evm.proto +++ b/proto/stratos/evm/v1/evm.proto @@ -33,91 +33,97 @@ message Params { // ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values // instead of *big.Int. message ChainConfig { + // chainId identifies the current chain and is used for replay protection + string chain_id = 1 [ + (gogoproto.customname) = "ChainID", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.moretags) = "yaml:\"chain_id\"" + ]; // Homestead switch block (nil no fork, 0 = already homestead) - string homestead_block = 1 [ + string homestead_block = 2 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"homestead_block\"" ]; // TheDAO hard-fork switch block (nil no fork) - string dao_fork_block = 2 [ + string dao_fork_block = 3 [ (gogoproto.customname) = "DAOForkBlock", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"dao_fork_block\"" ]; // Whether the nodes supports or opposes the DAO hard-fork - bool dao_fork_support = 3 [ + bool dao_fork_support = 4 [ (gogoproto.customname) = "DAOForkSupport", (gogoproto.moretags) = "yaml:\"dao_fork_support\"" ]; // EIP150 implements the Gas price changes // (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork) - string eip150_block = 4 [ + string eip150_block = 5 [ (gogoproto.customname) = "EIP150Block", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"eip150_block\"" ]; // EIP150 HF hash (needed for header only clients as only gas pricing changed) - string eip150_hash = 5 [ + string eip150_hash = 6 [ (gogoproto.customname) = "EIP150Hash", (gogoproto.moretags) = "yaml:\"byzantium_block\"" ]; // EIP155Block HF block - string eip155_block = 6 [ + string eip155_block = 7 [ (gogoproto.customname) = "EIP155Block", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"eip155_block\"" ]; // EIP158 HF block - string eip158_block = 7 [ + string eip158_block = 8 [ (gogoproto.customname) = "EIP158Block", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"eip158_block\"" ]; // Byzantium switch block (nil no fork, 0 = already on byzantium) - string byzantium_block = 8 [ + string byzantium_block = 9 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"byzantium_block\"" ]; // Constantinople switch block (nil no fork, 0 = already activated) - string constantinople_block = 9 [ + string constantinople_block = 10 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"constantinople_block\"" ]; // Petersburg switch block (nil same as Constantinople) - string petersburg_block = 10 [ + string petersburg_block = 11 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"petersburg_block\"" ]; // Istanbul switch block (nil no fork, 0 = already on istanbul) - string istanbul_block = 11 [ + string istanbul_block = 12 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"istanbul_block\"" ]; // Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated) - string muir_glacier_block = 12 [ + string muir_glacier_block = 13 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"muir_glacier_block\"" ]; // Berlin switch block (nil = no fork, 0 = already on berlin) - string berlin_block = 13 [ + string berlin_block = 14 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"berlin_block\"" ]; // DEPRECATED: EWASM, YOLOV3 and Catalyst block have been deprecated - reserved 14, 15, 16; + reserved 15, 16, 17; reserved "yolo_v3_block", "ewasm_block", "catalyst_block"; // London switch block (nil = no fork, 0 = already on london) - string london_block = 17 [ + string london_block = 18 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"london_block\"" ]; // Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) - string arrow_glacier_block = 18 [ + string arrow_glacier_block = 19 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"arrow_glacier_block\"" ]; // EIP-3675 (TheMerge) switch block (nil = no fork, 0 = already in merge proceedings) - string merge_fork_block = 19 [ + string merge_fork_block = 20 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"merge_fork_block\"" ]; diff --git a/rpc/apis.go b/rpc/apis.go index 432b0128..0db90903 100644 --- a/rpc/apis.go +++ b/rpc/apis.go @@ -54,6 +54,7 @@ func init() { EthNamespace: func(ctx *server.Context, clientCtx client.Context, tmWSClient *rpcclient.WSClient) []rpc.API { nonceLock := new(types.AddrLocker) evmBackend := backend.NewBackend(ctx, ctx.Logger, clientCtx) + clientCtx = clientCtx.WithChainID(evmBackend.ChainConfig().ChainID.String()) return []rpc.API{ { Namespace: EthNamespace, @@ -79,7 +80,9 @@ func init() { }, } }, - NetNamespace: func(_ *server.Context, clientCtx client.Context, _ *rpcclient.WSClient) []rpc.API { + NetNamespace: func(ctx *server.Context, clientCtx client.Context, _ *rpcclient.WSClient) []rpc.API { + evmBackend := backend.NewBackend(ctx, ctx.Logger, clientCtx) + clientCtx = clientCtx.WithChainID(evmBackend.ChainConfig().ChainID.String()) return []rpc.API{ { Namespace: NetNamespace, @@ -91,6 +94,7 @@ func init() { }, PersonalNamespace: func(ctx *server.Context, clientCtx client.Context, _ *rpcclient.WSClient) []rpc.API { evmBackend := backend.NewBackend(ctx, ctx.Logger, clientCtx) + clientCtx = clientCtx.WithChainID(evmBackend.ChainConfig().ChainID.String()) return []rpc.API{ { Namespace: PersonalNamespace, @@ -112,6 +116,7 @@ func init() { }, DebugNamespace: func(ctx *server.Context, clientCtx client.Context, _ *rpcclient.WSClient) []rpc.API { evmBackend := backend.NewBackend(ctx, ctx.Logger, clientCtx) + clientCtx = clientCtx.WithChainID(evmBackend.ChainConfig().ChainID.String()) return []rpc.API{ { Namespace: DebugNamespace, @@ -123,6 +128,7 @@ func init() { }, MinerNamespace: func(ctx *server.Context, clientCtx client.Context, _ *rpcclient.WSClient) []rpc.API { evmBackend := backend.NewBackend(ctx, ctx.Logger, clientCtx) + clientCtx = clientCtx.WithChainID(evmBackend.ChainConfig().ChainID.String()) return []rpc.API{ { Namespace: MinerNamespace, diff --git a/rpc/backend/backend.go b/rpc/backend/backend.go index 0a8f7d85..e7952f1d 100644 --- a/rpc/backend/backend.go +++ b/rpc/backend/backend.go @@ -20,7 +20,6 @@ import ( "github.com/stratosnet/stratos-chain/rpc/types" "github.com/stratosnet/stratos-chain/server/config" - stratos "github.com/stratosnet/stratos-chain/types" evmtypes "github.com/stratosnet/stratos-chain/x/evm/types" ) @@ -93,17 +92,11 @@ type Backend struct { clientCtx client.Context queryClient *types.QueryClient // gRPC query client logger log.Logger - chainID *big.Int cfg config.Config } // NewBackend creates a new Backend instance for cosmos and ethereum namespaces func NewBackend(ctx *server.Context, logger log.Logger, clientCtx client.Context) *Backend { - chainID, err := stratos.ParseChainID(clientCtx.ChainID) - if err != nil { - panic(err) - } - appConf := config.GetConfig(ctx.Viper) return &Backend{ @@ -111,7 +104,6 @@ func NewBackend(ctx *server.Context, logger log.Logger, clientCtx client.Context clientCtx: clientCtx, queryClient: types.NewQueryClient(clientCtx), logger: logger.With("module", "backend"), - chainID: chainID, cfg: appConf, } } diff --git a/rpc/backend/evm_backend.go b/rpc/backend/evm_backend.go index 998649c4..cf02f35a 100644 --- a/rpc/backend/evm_backend.go +++ b/rpc/backend/evm_backend.go @@ -585,7 +585,7 @@ func (b *Backend) GetTransactionByHash(txHash common.Hash) (*types.RPCTransactio common.Hash{}, uint64(0), uint64(0), - b.chainID, + b.ChainConfig().ChainID, ) if err != nil { return nil, err @@ -653,7 +653,7 @@ func (b *Backend) GetTransactionByHash(txHash common.Hash) (*types.RPCTransactio common.BytesToHash(block.BlockID.Hash.Bytes()), uint64(res.Height), txIndex, - b.chainID, + b.ChainConfig().ChainID, ) } @@ -876,7 +876,7 @@ func (b *Backend) ChainConfig() *params.ChainConfig { return nil } - return params.Params.ChainConfig.EthereumConfig(b.chainID) + return params.Params.ChainConfig.EthereumConfig() } // SuggestGasTipCap returns the suggested tip cap diff --git a/rpc/backend/utils.go b/rpc/backend/utils.go index c76821eb..c403b2ae 100644 --- a/rpc/backend/utils.go +++ b/rpc/backend/utils.go @@ -161,7 +161,8 @@ func (b *Backend) SetTxDefaults(args evmtypes.TransactionArgs) (evmtypes.Transac } if args.ChainID == nil { - args.ChainID = (*hexutil.Big)(b.chainID) + ethChainId := b.ChainConfig().ChainID + args.ChainID = (*hexutil.Big)(ethChainId) } return args, nil @@ -206,7 +207,7 @@ func (b *Backend) getAccountNonce(accAddr common.Address, pending bool, height i break } - sender, err := ethMsg.GetSender(b.chainID) + sender, err := ethMsg.GetSender(b.ChainConfig().ChainID) if err != nil { continue } diff --git a/rpc/namespaces/ethereum/eth/api.go b/rpc/namespaces/ethereum/eth/api.go index 649f018a..eeef2037 100644 --- a/rpc/namespaces/ethereum/eth/api.go +++ b/rpc/namespaces/ethereum/eth/api.go @@ -59,11 +59,6 @@ func NewPublicAPI( backend backend.EVMBackend, nonceLock *rpctypes.AddrLocker, ) *PublicAPI { - eip155ChainID, err := stratos.ParseChainID(clientCtx.ChainID) - if err != nil { - panic(err) - } - algos, _ := clientCtx.Keyring.SupportedAlgorithms() if !algos.Contains(hd.EthSecp256k1) { @@ -85,7 +80,7 @@ func NewPublicAPI( // signers to be backwards-compatible with old transactions. cfg := backend.ChainConfig() if cfg == nil { - cfg = evmtypes.DefaultChainConfig().EthereumConfig(eip155ChainID) + cfg = evmtypes.DefaultChainConfig().EthereumConfig() } signer := ethtypes.LatestSigner(cfg) @@ -94,7 +89,7 @@ func NewPublicAPI( ctx: context.Background(), clientCtx: clientCtx, queryClient: rpctypes.NewQueryClient(clientCtx), - chainIDEpoch: eip155ChainID, + chainIDEpoch: cfg.ChainID, logger: logger.With("client", "json-rpc"), backend: backend, nonceLock: nonceLock, diff --git a/rpc/namespaces/ethereum/net/api.go b/rpc/namespaces/ethereum/net/api.go index ac8b6e78..40a908f8 100644 --- a/rpc/namespaces/ethereum/net/api.go +++ b/rpc/namespaces/ethereum/net/api.go @@ -3,12 +3,11 @@ package net import ( "context" "fmt" - - "github.com/cosmos/cosmos-sdk/client" + "math/big" rpcclient "github.com/tendermint/tendermint/rpc/client" - stratos "github.com/stratosnet/stratos-chain/types" + "github.com/cosmos/cosmos-sdk/client" ) // PublicAPI is the eth_ prefixed set of APIs in the Web3 JSON-RPC spec. @@ -19,14 +18,13 @@ type PublicAPI struct { // NewPublicAPI creates an instance of the public Net Web3 API. func NewPublicAPI(clientCtx client.Context) *PublicAPI { - // parse the chainID from a integer string - chainIDEpoch, err := stratos.ParseChainID(clientCtx.ChainID) - if err != nil { - panic(err) + eip155ChainId, ok := new(big.Int).SetString(clientCtx.ChainID, 10) + if !ok { + panic("failed to parse chainID") } return &PublicAPI{ - networkVersion: chainIDEpoch.Uint64(), + networkVersion: eip155ChainId.Uint64(), tmClient: clientCtx.Client, } } diff --git a/server/start.go b/server/start.go index 87a695e4..a971e2c3 100644 --- a/server/start.go +++ b/server/start.go @@ -414,13 +414,6 @@ func startInProcess(ctx *server.Context, clientCtx client.Context, appCreator ty ) if config.JSONRPC.Enable { - genDoc, err := genDocProvider() - if err != nil { - return err - } - - clientCtx := clientCtx.WithChainID(genDoc.ChainID) - tmEndpoint := "/websocket" tmRPCAddr := cfg.RPC.ListenAddress httpSrv, httpSrvDone, err = StartJSONRPC(ctx, clientCtx, tmRPCAddr, tmEndpoint, config) diff --git a/types/chain_id.go b/types/chain_id.go deleted file mode 100644 index 3c5e766f..00000000 --- a/types/chain_id.go +++ /dev/null @@ -1,50 +0,0 @@ -package types - -import ( - "fmt" - "math/big" - "regexp" - "strings" - - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -var ( - regexChainID = `[a-z]{1,}` - regexEIP155Separator = `_{1}` - regexEIP155 = `[1-9][0-9]*` - regexEpochSeparator = `-{1}` - regexEpoch = `[1-9][0-9]*` - stratosChainID = regexp.MustCompile(fmt.Sprintf(`^(%s)%s(%s)%s(%s)$`, regexChainID, regexEIP155Separator, regexEIP155, regexEpochSeparator, regexEpoch)) -) - -// IsValidChainID returns false if the given chain identifier is incorrectly formatted. -func IsValidChainID(chainID string) bool { - if len(chainID) > 48 { - return false - } - - return stratosChainID.MatchString(chainID) -} - -// ParseChainID parses a string chain identifier's epoch to an Ethereum-compatible -// chain-id in *big.Int format. The function returns an error if the chain-id has an invalid format -func ParseChainID(chainID string) (*big.Int, error) { - chainID = strings.TrimSpace(chainID) - if len(chainID) > 48 { - return nil, sdkerrors.Wrapf(ErrInvalidChainID, "chain-id '%s' cannot exceed 48 chars", chainID) - } - - matches := stratosChainID.FindStringSubmatch(chainID) - if matches == nil || len(matches) != 4 || matches[1] == "" { - return nil, sdkerrors.Wrapf(ErrInvalidChainID, "%s: %v", chainID, matches) - } - - // verify that the chain-id entered is a base 10 integer - chainIDInt, ok := new(big.Int).SetString(matches[2], 10) - if !ok { - return nil, sdkerrors.Wrapf(ErrInvalidChainID, "epoch %s must be base-10 integer format", matches[2]) - } - - return chainIDInt, nil -} diff --git a/x/evm/genesis.go b/x/evm/genesis.go index e6a8bbcd..f05b67c9 100644 --- a/x/evm/genesis.go +++ b/x/evm/genesis.go @@ -24,7 +24,6 @@ func InitGenesis( data types.GenesisState, ) []abci.ValidatorUpdate { k.SetBlockGasUsed(ctx, data.BlockGas) - k.WithChainID(ctx) k.SetParams(ctx, data.Params) diff --git a/x/evm/keeper/abci.go b/x/evm/keeper/abci.go index 5c3a1cb6..7634ef35 100644 --- a/x/evm/keeper/abci.go +++ b/x/evm/keeper/abci.go @@ -13,8 +13,6 @@ import ( // BeginBlock sets the sdk Context and EIP155 chain id to the Keeper. func (k *Keeper) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { - k.WithChainID(ctx) - baseFee := k.CalculateBaseFee(ctx) // return immediately if base fee is nil diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index 4833114b..7bd8fb63 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -494,7 +494,7 @@ func (k *Keeper) traceTx( } if traceConfig != nil && traceConfig.Overrides != nil { - overrides = traceConfig.Overrides.EthereumConfig(cfg.ChainConfig.ChainID) + overrides = traceConfig.Overrides.EthereumConfig() } switch { @@ -587,7 +587,7 @@ func (k Keeper) BaseFee(c context.Context, _ *types.QueryBaseFeeRequest) (*types ctx := sdk.UnwrapSDKContext(c) params := k.GetParams(ctx) - ethCfg := params.ChainConfig.EthereumConfig(k.eip155ChainID) + ethCfg := params.ChainConfig.EthereumConfig() baseFee := k.GetBaseFee(ctx, ethCfg) res := &types.QueryBaseFeeResponse{} diff --git a/x/evm/keeper/keeper.go b/x/evm/keeper/keeper.go index 58db2c11..a1afccf3 100644 --- a/x/evm/keeper/keeper.go +++ b/x/evm/keeper/keeper.go @@ -45,9 +45,6 @@ type Keeper struct { // access historical headers for EVM state transition execution stakingKeeper types.StakingKeeper - // chain ID number obtained from the context's chain id - eip155ChainID *big.Int - // Tracer used to collect execution traces from the EVM transaction execution tracer string @@ -90,25 +87,6 @@ func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", types.ModuleName) } -// WithChainID sets the chain id to the local variable in the keeper -func (k *Keeper) WithChainID(ctx sdk.Context) { - chainID, err := stratos.ParseChainID(ctx.ChainID()) - if err != nil { - panic(err) - } - - if k.eip155ChainID != nil && k.eip155ChainID.Cmp(chainID) != 0 { - panic("chain id already set") - } - - k.eip155ChainID = chainID -} - -// ChainID returns the EIP155 chain ID for the EVM context -func (k Keeper) ChainID() *big.Int { - return k.eip155ChainID -} - // ---------------------------------------------------------------------------- // Block Bloom // Required by Web3 API. diff --git a/x/evm/keeper/state_transition.go b/x/evm/keeper/state_transition.go index f9310756..aa0cdfb4 100644 --- a/x/evm/keeper/state_transition.go +++ b/x/evm/keeper/state_transition.go @@ -38,7 +38,7 @@ func GasToRefund(availableRefund, gasConsumed, refundQuotient uint64) uint64 { // EVMConfig creates the EVMConfig based on current state func (k *Keeper) EVMConfig(ctx sdk.Context) (*types.EVMConfig, error) { params := k.GetParams(ctx) - ethCfg := params.ChainConfig.EthereumConfig(k.eip155ChainID) + ethCfg := params.ChainConfig.EthereumConfig() // get the coinbase address from the block proposer coinbase, err := k.GetCoinbaseAddress(ctx) diff --git a/x/evm/simulation/operations.go b/x/evm/simulation/operations.go index ae75dfd4..ae5c59c8 100644 --- a/x/evm/simulation/operations.go +++ b/x/evm/simulation/operations.go @@ -210,8 +210,8 @@ func CreateRandomValidEthTx(ctx *simulateContext, from, to *common.Address, amou } // we suppose that gasLimit should be larger than estimateGas to ensure tx validity gasLimit := estimateGas + uint64(ctx.rand.Intn(int(sdktx.MaxGasWanted-estimateGas))) - ethChainID := ctx.keeper.ChainID() - chainConfig := ctx.keeper.GetParams(ctx.context).ChainConfig.EthereumConfig(ethChainID) + chainConfig := ctx.keeper.GetParams(ctx.context).ChainConfig.EthereumConfig() + ethChainID := chainConfig.ChainID gasPrice := ctx.keeper.GetBaseFee(ctx.context, chainConfig) gasFeeCap := new(big.Int).Add(gasPrice, big.NewInt(int64(ctx.rand.Int()))) gasTipCap := big.NewInt(int64(ctx.rand.Int())) @@ -279,7 +279,9 @@ func GetSignedTx(ctx *simulateContext, txBuilder client.TxBuilder, msg *types.Ms } builder.SetExtensionOptions(option) - if err := msg.Sign(ethtypes.LatestSignerForChainID(ctx.keeper.ChainID()), tests.NewSigner(prv)); err != nil { + params := ctx.keeper.GetParams(ctx.context) + + if err := msg.Sign(ethtypes.LatestSignerForChainID(params.GetChainConfig().EthereumConfig().ChainID), tests.NewSigner(prv)); err != nil { return nil, err } @@ -292,7 +294,7 @@ func GetSignedTx(ctx *simulateContext, txBuilder client.TxBuilder, msg *types.Ms return nil, err } - fees := sdk.NewCoins(sdk.NewCoin(ctx.keeper.GetParams(ctx.context).EvmDenom, sdk.NewIntFromBigInt(txData.Fee()))) + fees := sdk.NewCoins(sdk.NewCoin(params.EvmDenom, sdk.NewIntFromBigInt(txData.Fee()))) builder.SetFeeAmount(fees) builder.SetGasLimit(msg.GetGas()) diff --git a/x/evm/types/chain_config.go b/x/evm/types/chain_config.go index fbc0288f..c9059e7b 100644 --- a/x/evm/types/chain_config.go +++ b/x/evm/types/chain_config.go @@ -13,9 +13,9 @@ import ( // EthereumConfig returns an Ethereum ChainConfig for EVM state transitions. // All the negative or nil values are converted to nil -func (cc ChainConfig) EthereumConfig(chainID *big.Int) *params.ChainConfig { +func (cc ChainConfig) EthereumConfig() *params.ChainConfig { return ¶ms.ChainConfig{ - ChainID: chainID, + ChainID: getBlockValue(cc.ChainID), HomesteadBlock: getBlockValue(cc.HomesteadBlock), DAOForkBlock: getBlockValue(cc.DAOForkBlock), DAOForkSupport: cc.DAOForkSupport, @@ -40,6 +40,7 @@ func (cc ChainConfig) EthereumConfig(chainID *big.Int) *params.ChainConfig { // DefaultChainConfig returns default evm parameters. func DefaultChainConfig() ChainConfig { + chainId := sdk.NewInt(1) homesteadBlock := sdk.ZeroInt() daoForkBlock := sdk.ZeroInt() eip150Block := sdk.ZeroInt() @@ -56,6 +57,7 @@ func DefaultChainConfig() ChainConfig { mergeForkBlock := sdk.ZeroInt() return ChainConfig{ + ChainID: &chainId, HomesteadBlock: &homesteadBlock, DAOForkBlock: &daoForkBlock, DAOForkSupport: true, @@ -86,6 +88,9 @@ func getBlockValue(block *sdk.Int) *big.Int { // 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 { + if err := validateChainId(cc.ChainID); err != nil { + return err + } if err := validateBlock(cc.HomesteadBlock); err != nil { return sdkerrors.Wrap(err, "homesteadBlock") } @@ -133,12 +138,19 @@ func (cc ChainConfig) Validate() error { } // NOTE: chain ID is not needed to check config order - if err := cc.EthereumConfig(nil).CheckConfigForkOrder(); err != nil { + if err := cc.EthereumConfig().CheckConfigForkOrder(); err != nil { return sdkerrors.Wrap(err, "invalid config fork order") } return nil } +func validateChainId(chainId *sdk.Int) error { + if chainId.LTE(sdk.ZeroInt()) { + return sdkerrors.Wrap(ErrInvalidChainConfig, "eip155 chain id should greater than 0") + } + return nil +} + func validateHash(hex string) error { if hex != "" && strings.TrimSpace(hex) == "" { return sdkerrors.Wrap(ErrInvalidChainConfig, "hash cannot be blank") diff --git a/x/evm/types/evm.pb.go b/x/evm/types/evm.pb.go index ff544635..dc6e18f2 100644 --- a/x/evm/types/evm.pb.go +++ b/x/evm/types/evm.pb.go @@ -118,39 +118,41 @@ func (m *Params) GetFeeMarketParams() FeeMarketParams { // ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values // instead of *big.Int. type ChainConfig struct { + // chainId identifies the current chain and is used for replay protection + ChainID *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"chain_id,omitempty" yaml:"chain_id"` // Homestead switch block (nil no fork, 0 = already homestead) - HomesteadBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=homestead_block,json=homesteadBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"homestead_block,omitempty" yaml:"homestead_block"` + HomesteadBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=homestead_block,json=homesteadBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"homestead_block,omitempty" yaml:"homestead_block"` // TheDAO hard-fork switch block (nil no fork) - DAOForkBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=dao_fork_block,json=daoForkBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"dao_fork_block,omitempty" yaml:"dao_fork_block"` + DAOForkBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=dao_fork_block,json=daoForkBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"dao_fork_block,omitempty" yaml:"dao_fork_block"` // Whether the nodes supports or opposes the DAO hard-fork - DAOForkSupport bool `protobuf:"varint,3,opt,name=dao_fork_support,json=daoForkSupport,proto3" json:"dao_fork_support,omitempty" yaml:"dao_fork_support"` + DAOForkSupport bool `protobuf:"varint,4,opt,name=dao_fork_support,json=daoForkSupport,proto3" json:"dao_fork_support,omitempty" yaml:"dao_fork_support"` // EIP150 implements the Gas price changes // (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork) - EIP150Block *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=eip150_block,json=eip150Block,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"eip150_block,omitempty" yaml:"eip150_block"` + EIP150Block *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=eip150_block,json=eip150Block,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"eip150_block,omitempty" yaml:"eip150_block"` // EIP150 HF hash (needed for header only clients as only gas pricing changed) - EIP150Hash string `protobuf:"bytes,5,opt,name=eip150_hash,json=eip150Hash,proto3" json:"eip150_hash,omitempty" yaml:"byzantium_block"` + EIP150Hash string `protobuf:"bytes,6,opt,name=eip150_hash,json=eip150Hash,proto3" json:"eip150_hash,omitempty" yaml:"byzantium_block"` // EIP155Block HF block - EIP155Block *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=eip155_block,json=eip155Block,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"eip155_block,omitempty" yaml:"eip155_block"` + EIP155Block *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=eip155_block,json=eip155Block,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"eip155_block,omitempty" yaml:"eip155_block"` // EIP158 HF block - EIP158Block *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=eip158_block,json=eip158Block,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"eip158_block,omitempty" yaml:"eip158_block"` + EIP158Block *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,8,opt,name=eip158_block,json=eip158Block,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"eip158_block,omitempty" yaml:"eip158_block"` // Byzantium switch block (nil no fork, 0 = already on byzantium) - ByzantiumBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,8,opt,name=byzantium_block,json=byzantiumBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"byzantium_block,omitempty" yaml:"byzantium_block"` + ByzantiumBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,9,opt,name=byzantium_block,json=byzantiumBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"byzantium_block,omitempty" yaml:"byzantium_block"` // Constantinople switch block (nil no fork, 0 = already activated) - ConstantinopleBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,9,opt,name=constantinople_block,json=constantinopleBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"constantinople_block,omitempty" yaml:"constantinople_block"` + ConstantinopleBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,10,opt,name=constantinople_block,json=constantinopleBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"constantinople_block,omitempty" yaml:"constantinople_block"` // Petersburg switch block (nil same as Constantinople) - PetersburgBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,10,opt,name=petersburg_block,json=petersburgBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"petersburg_block,omitempty" yaml:"petersburg_block"` + PetersburgBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=petersburg_block,json=petersburgBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"petersburg_block,omitempty" yaml:"petersburg_block"` // Istanbul switch block (nil no fork, 0 = already on istanbul) - IstanbulBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=istanbul_block,json=istanbulBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"istanbul_block,omitempty" yaml:"istanbul_block"` + IstanbulBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,12,opt,name=istanbul_block,json=istanbulBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"istanbul_block,omitempty" yaml:"istanbul_block"` // Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated) - MuirGlacierBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,12,opt,name=muir_glacier_block,json=muirGlacierBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"muir_glacier_block,omitempty" yaml:"muir_glacier_block"` + MuirGlacierBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,13,opt,name=muir_glacier_block,json=muirGlacierBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"muir_glacier_block,omitempty" yaml:"muir_glacier_block"` // Berlin switch block (nil = no fork, 0 = already on berlin) - BerlinBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,13,opt,name=berlin_block,json=berlinBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"berlin_block,omitempty" yaml:"berlin_block"` + BerlinBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,14,opt,name=berlin_block,json=berlinBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"berlin_block,omitempty" yaml:"berlin_block"` // London switch block (nil = no fork, 0 = already on london) - LondonBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,17,opt,name=london_block,json=londonBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"london_block,omitempty" yaml:"london_block"` + LondonBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,18,opt,name=london_block,json=londonBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"london_block,omitempty" yaml:"london_block"` // Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) - ArrowGlacierBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,18,opt,name=arrow_glacier_block,json=arrowGlacierBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"arrow_glacier_block,omitempty" yaml:"arrow_glacier_block"` + ArrowGlacierBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,19,opt,name=arrow_glacier_block,json=arrowGlacierBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"arrow_glacier_block,omitempty" yaml:"arrow_glacier_block"` // EIP-3675 (TheMerge) switch block (nil = no fork, 0 = already in merge proceedings) - MergeForkBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,19,opt,name=merge_fork_block,json=mergeForkBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"merge_fork_block,omitempty" yaml:"merge_fork_block"` + MergeForkBlock *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,20,opt,name=merge_fork_block,json=mergeForkBlock,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"merge_fork_block,omitempty" yaml:"merge_fork_block"` } func (m *ChainConfig) Reset() { *m = ChainConfig{} } @@ -743,110 +745,112 @@ func init() { func init() { proto.RegisterFile("stratos/evm/v1/evm.proto", fileDescriptor_6ee18d4714e9d670) } var fileDescriptor_6ee18d4714e9d670 = []byte{ - // 1643 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcf, 0x6e, 0xe3, 0xb8, - 0x19, 0x4f, 0x62, 0x27, 0x91, 0x69, 0xc7, 0x56, 0x98, 0xec, 0xd4, 0x3b, 0x01, 0xa2, 0x40, 0x05, - 0xda, 0x1c, 0x76, 0xe2, 0xcd, 0x0c, 0x82, 0x4e, 0xb7, 0xd8, 0x43, 0x9c, 0x64, 0x76, 0x92, 0xce, - 0x6c, 0x03, 0xce, 0x14, 0x05, 0xda, 0x83, 0x40, 0x4b, 0x8c, 0xac, 0x46, 0x12, 0x0d, 0x92, 0xf2, - 0xda, 0x45, 0x1f, 0xa0, 0xbd, 0xf5, 0x11, 0xfa, 0x02, 0x3d, 0xf4, 0x15, 0x7a, 0x5a, 0xf4, 0xb4, - 0xc7, 0xa2, 0x07, 0xa1, 0xc8, 0xdc, 0x72, 0xcc, 0x13, 0x14, 0xfa, 0x48, 0xcb, 0x7f, 0x26, 0x58, - 0x4c, 0x72, 0x12, 0xbf, 0x7f, 0xbf, 0x1f, 0xf9, 0xf1, 0xa3, 0x3e, 0x12, 0xb5, 0xa5, 0x12, 0x54, - 0x71, 0xd9, 0x61, 0xc3, 0xa4, 0x33, 0x3c, 0x2c, 0x3e, 0x07, 0x03, 0xc1, 0x15, 0xc7, 0x4d, 0x63, - 0x39, 0x28, 0x54, 0xc3, 0xc3, 0xa7, 0xdb, 0x21, 0x0f, 0x39, 0x98, 0x3a, 0xc5, 0x48, 0x7b, 0xb9, - 0xff, 0xaa, 0xa0, 0xb5, 0x4b, 0x2a, 0x68, 0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d, 0xbe, 0x33, 0x43, 0x61, 0xea, 0x24, 0x65, 0x6a, 0x32, 0x7c, 0x06, - 0xaf, 0xc6, 0xce, 0x08, 0x9e, 0xef, 0xc0, 0xd7, 0x5b, 0x83, 0x87, 0xf9, 0x8b, 0xff, 0x07, 0x00, - 0x00, 0xff, 0xff, 0xfb, 0x04, 0x5c, 0x3f, 0xda, 0x0f, 0x00, 0x00, + // 1677 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0x4f, 0x6f, 0x1b, 0xb9, + 0x15, 0xb7, 0x2d, 0xd9, 0x1a, 0x51, 0xb2, 0x34, 0xa6, 0xb5, 0xa9, 0x36, 0x06, 0x3c, 0xc6, 0x14, + 0x68, 0x7d, 0xd8, 0x58, 0xeb, 0x04, 0x46, 0xd3, 0x2d, 0xf6, 0x60, 0xd9, 0xce, 0x46, 0x6e, 0xb2, + 0x35, 0x98, 0x14, 0x05, 0xda, 0xc3, 0x80, 0x9a, 0xa1, 0x47, 0x53, 0xcf, 0x0c, 0x05, 0x92, 0xd2, + 0x4a, 0x45, 0x3f, 0x40, 0x7b, 0xeb, 0xa9, 0xe7, 0x7e, 0x81, 0x7e, 0x89, 0x9e, 0x16, 0x3d, 0xed, + 0xb1, 0xe8, 0x61, 0x50, 0x38, 0x37, 0x1f, 0xf5, 0x09, 0x8a, 0x79, 0xa4, 0xfe, 0xc6, 0x58, 0xc4, + 0x3e, 0x99, 0xef, 0xdf, 0xef, 0xf7, 0xf8, 0xf8, 0xa8, 0xc7, 0x31, 0x6a, 0x4a, 0x25, 0xa8, 0xe2, + 0xb2, 0xc5, 0x86, 0x49, 0x6b, 0x78, 0x9c, 0xff, 0x39, 0xea, 0x0b, 0xae, 0x38, 0xae, 0x19, 0xcb, + 0x51, 0xae, 0x1a, 0x1e, 0x3f, 0x6d, 0x84, 0x3c, 0xe4, 0x60, 0x6a, 0xe5, 0x2b,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, 0x32, 0x59, 0xeb, + 0x42, 0x12, 0x3b, 0x4a, 0x23, 0x15, 0xd1, 0x78, 0x56, 0x8c, 0x76, 0xe7, 0xfb, 0xdb, 0xfd, 0xf5, + 0x1f, 0x6e, 0xf7, 0xd7, 0xff, 0x77, 0xbb, 0xbf, 0xfe, 0xb7, 0x0f, 0xfb, 0x6b, 0x3f, 0x7c, 0xd8, + 0x5f, 0xfb, 0xcf, 0x87, 0xfd, 0xb5, 0xdf, 0xb7, 0x16, 0x28, 0x4c, 0x9f, 0xa4, 0x4c, 0x4d, 0x97, + 0xcf, 0xe0, 0x93, 0xad, 0x35, 0x82, 0xff, 0x11, 0x00, 0x5f, 0x77, 0x0b, 0xbe, 0xfe, 0x5f, 0xfc, + 0x3f, 0x00, 0x00, 0xff, 0xff, 0xb4, 0xc3, 0x75, 0x8b, 0x3f, 0x10, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -970,7 +974,7 @@ func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0x9a + dAtA[i] = 0xa2 } if m.ArrowGlacierBlock != nil { { @@ -984,7 +988,7 @@ func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0x92 + dAtA[i] = 0x9a } if m.LondonBlock != nil { { @@ -998,7 +1002,7 @@ func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1 i-- - dAtA[i] = 0x8a + dAtA[i] = 0x92 } if m.BerlinBlock != nil { { @@ -1010,7 +1014,7 @@ func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintEvm(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x6a + dAtA[i] = 0x72 } if m.MuirGlacierBlock != nil { { @@ -1022,7 +1026,7 @@ func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintEvm(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x62 + dAtA[i] = 0x6a } if m.IstanbulBlock != nil { { @@ -1034,7 +1038,7 @@ func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintEvm(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x5a + dAtA[i] = 0x62 } if m.PetersburgBlock != nil { { @@ -1046,7 +1050,7 @@ func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintEvm(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x52 + dAtA[i] = 0x5a } if m.ConstantinopleBlock != nil { { @@ -1058,7 +1062,7 @@ func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintEvm(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x4a + dAtA[i] = 0x52 } if m.ByzantiumBlock != nil { { @@ -1070,7 +1074,7 @@ func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintEvm(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x42 + dAtA[i] = 0x4a } if m.EIP158Block != nil { { @@ -1082,7 +1086,7 @@ func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintEvm(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x3a + dAtA[i] = 0x42 } if m.EIP155Block != nil { { @@ -1094,14 +1098,14 @@ func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintEvm(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x32 + dAtA[i] = 0x3a } if len(m.EIP150Hash) > 0 { i -= len(m.EIP150Hash) copy(dAtA[i:], m.EIP150Hash) i = encodeVarintEvm(dAtA, i, uint64(len(m.EIP150Hash))) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x32 } if m.EIP150Block != nil { { @@ -1113,7 +1117,7 @@ func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintEvm(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x2a } if m.DAOForkSupport { i-- @@ -1123,7 +1127,7 @@ func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x18 + dAtA[i] = 0x20 } if m.DAOForkBlock != nil { { @@ -1135,7 +1139,7 @@ func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintEvm(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } if m.HomesteadBlock != nil { { @@ -1147,6 +1151,18 @@ func (m *ChainConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintEvm(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x12 + } + if m.ChainID != nil { + { + size := m.ChainID.Size() + i -= size + if _, err := m.ChainID.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintEvm(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -1640,6 +1656,10 @@ func (m *ChainConfig) Size() (n int) { } var l int _ = l + if m.ChainID != nil { + l = m.ChainID.Size() + n += 1 + l + sovEvm(uint64(l)) + } if m.HomesteadBlock != nil { l = m.HomesteadBlock.Size() n += 1 + l + sovEvm(uint64(l)) @@ -2198,6 +2218,42 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvm + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvm + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvm + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_cosmos_cosmos_sdk_types.Int + m.ChainID = &v + if err := m.ChainID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field HomesteadBlock", wireType) } @@ -2233,7 +2289,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DAOForkBlock", wireType) } @@ -2269,7 +2325,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: + case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DAOForkSupport", wireType) } @@ -2289,7 +2345,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { } } m.DAOForkSupport = bool(v != 0) - case 4: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EIP150Block", wireType) } @@ -2325,7 +2381,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EIP150Hash", wireType) } @@ -2357,7 +2413,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { } m.EIP150Hash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EIP155Block", wireType) } @@ -2393,7 +2449,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 7: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EIP158Block", wireType) } @@ -2429,7 +2485,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 8: + case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ByzantiumBlock", wireType) } @@ -2465,7 +2521,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 9: + case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ConstantinopleBlock", wireType) } @@ -2501,7 +2557,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 10: + case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PetersburgBlock", wireType) } @@ -2537,7 +2593,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 11: + case 12: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field IstanbulBlock", wireType) } @@ -2573,7 +2629,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 12: + case 13: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MuirGlacierBlock", wireType) } @@ -2609,7 +2665,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 13: + case 14: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field BerlinBlock", wireType) } @@ -2645,7 +2701,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 17: + case 18: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LondonBlock", wireType) } @@ -2681,7 +2737,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 18: + case 19: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ArrowGlacierBlock", wireType) } @@ -2717,7 +2773,7 @@ func (m *ChainConfig) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 19: + case 20: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field MergeForkBlock", wireType) }