From fa43819a177948b57bc5ebe24c73608f15a815fc Mon Sep 17 00:00:00 2001 From: yirenz Date: Thu, 19 Sep 2024 14:23:12 -0400 Subject: [PATCH] V5.8.0 hotfix 3 (#1862) * Release oom hotfix * Revert showing wasm transactions in EVM rpc (#1861) * fix: add V580Params specific functions * chore: update variable name ParamsPreV580 --------- Co-authored-by: yzang2019 Co-authored-by: codchen --- go.mod | 2 + go.sum | 3 + proto/evm/params.proto | 45 ++++- x/evm/keeper/params.go | 23 ++- x/evm/module_test.go | 2 +- x/evm/types/params.go | 16 +- x/evm/types/params.pb.go | 419 +++++++++++++++++++++++++++++++++++---- 7 files changed, 464 insertions(+), 46 deletions(-) diff --git a/go.mod b/go.mod index b825b4986..eb6425424 100644 --- a/go.mod +++ b/go.mod @@ -125,6 +125,7 @@ require ( github.com/fzipp/gocyclo v0.5.1 // indirect github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect + github.com/ghodss/yaml v1.0.0 // indirect github.com/go-critic/go-critic v0.6.3 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect @@ -172,6 +173,7 @@ require ( github.com/gostaticanalysis/nilerr v0.1.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-bexpr v0.1.10 // indirect diff --git a/go.sum b/go.sum index 7e9049803..cd8366573 100644 --- a/go.sum +++ b/go.sum @@ -457,6 +457,7 @@ github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2Gihuqh github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= @@ -765,6 +766,8 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/guptarohit/asciigraph v0.5.5/go.mod h1:dYl5wwK4gNsnFf9Zp+l06rFiDZ5YtXM6x7SRWZ3KGag= diff --git a/proto/evm/params.proto b/proto/evm/params.proto index d2497e4b3..23a1454f0 100644 --- a/proto/evm/params.proto +++ b/proto/evm/params.proto @@ -32,7 +32,50 @@ string minimum_fee_per_gas = 4 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "minimum_fee_per_gas" ]; -uint64 deliver_tx_hook_wasm_gas_limit = 5; + // ChainConfig chain_config = 5 [(gogoproto.moretags) = "yaml:\"chain_config\"", (gogoproto.nullable) = false]; +// string chain_id = 6 [ +// (gogoproto.moretags) = "yaml:\"chain_id\"", +// (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", +// (gogoproto.nullable) = false, +// (gogoproto.jsontag) = "chain_id" +// ]; + // repeated string whitelisted_codehashes_bank_send = 7 [ + // (gogoproto.moretags) = "yaml:\"whitelisted_codehashes_bank_send\"", + // (gogoproto.jsontag) = "whitelisted_codehashes_bank_send" + // ]; + repeated bytes whitelisted_cw_code_hashes_for_delegate_call = 8 [ + (gogoproto.moretags) = "yaml:\"whitelisted_cw_code_hashes_for_delegate_call\"", + (gogoproto.jsontag) = "whitelisted_cw_code_hashes_for_delegate_call" + ]; + + uint64 deliver_tx_hook_wasm_gas_limit = 9; +} + +message ParamsPreV580 { + option (gogoproto.goproto_stringer) = false; + + // string base_denom = 1 [ + // (gogoproto.moretags) = "yaml:\"base_denom\"", + // (gogoproto.jsontag) = "base_denom" + // ]; + string priority_normalizer = 2 [ + (gogoproto.moretags) = "yaml:\"priority_normalizer\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "priority_normalizer" + ]; + string base_fee_per_gas = 3 [ + (gogoproto.moretags) = "yaml:\"base_fee_per_gas\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "base_fee_per_gas" +]; +string minimum_fee_per_gas = 4 [ + (gogoproto.moretags) = "yaml:\"minimum_fee_per_gas\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "minimum_fee_per_gas" +]; // ChainConfig chain_config = 5 [(gogoproto.moretags) = "yaml:\"chain_config\"", (gogoproto.nullable) = false]; // string chain_id = 6 [ // (gogoproto.moretags) = "yaml:\"chain_id\"", diff --git a/x/evm/keeper/params.go b/x/evm/keeper/params.go index fbd885e11..cc988adfd 100644 --- a/x/evm/keeper/params.go +++ b/x/evm/keeper/params.go @@ -15,12 +15,31 @@ func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { k.Paramstore.SetParamSet(ctx, ¶ms) } -func (k *Keeper) GetParams(ctx sdk.Context) types.Params { - params := types.Params{} +func (k *Keeper) GetParams(ctx sdk.Context) (params types.Params) { + params = types.Params{} + defer func() { + if r := recover(); r != nil { + // If panic occurs, try to get paramsPreV580 + params = k.GetParamsPreV580(ctx) + } + }() k.Paramstore.GetParamSet(ctx, ¶ms) return params } +func (k *Keeper) GetParamsPreV580(ctx sdk.Context) types.Params { + paramsPreV580 := types.ParamsPreV580{} + k.Paramstore.GetParamSet(ctx, ¶msPreV580) + // Convert paramsPreV580 to params + return types.Params{ + PriorityNormalizer: paramsPreV580.PriorityNormalizer, + BaseFeePerGas: paramsPreV580.BaseFeePerGas, + MinimumFeePerGas: paramsPreV580.MinimumFeePerGas, + WhitelistedCwCodeHashesForDelegateCall: paramsPreV580.WhitelistedCwCodeHashesForDelegateCall, + DeliverTxHookWasmGasLimit: uint64(300000), + } +} + func (k *Keeper) GetParamsIfExists(ctx sdk.Context) types.Params { params := types.Params{} k.Paramstore.GetParamSetIfExists(ctx, ¶ms) diff --git a/x/evm/module_test.go b/x/evm/module_test.go index c8bd73ebe..624810dea 100644 --- a/x/evm/module_test.go +++ b/x/evm/module_test.go @@ -53,7 +53,7 @@ func TestModuleExportGenesis(t *testing.T) { module := evm.NewAppModule(nil, k) jsonMsg := module.ExportGenesis(ctx, types.ModuleCdc) jsonStr := string(jsonMsg) - assert.Equal(t, "{\"params\":{\"priority_normalizer\":\"1.000000000000000000\",\"base_fee_per_gas\":\"0.000000000000000000\",\"minimum_fee_per_gas\":\"100000000000.000000000000000000\",\"deliver_tx_hook_wasm_gas_limit\":\"300000\",\"whitelisted_cw_code_hashes_for_delegate_call\":[]},\"address_associations\":[{\"sei_address\":\"sei17xpfvakm2amg962yls6f84z3kell8c5la4jkdu\",\"eth_address\":\"0x27F7B8B8B5A4e71E8E9aA671f4e4031E3773303F\"}],\"codes\":[],\"states\":[],\"nonces\":[],\"serialized\":[{\"prefix\":\"Fg==\",\"key\":\"AwAC\",\"value\":\"AAAAAAAAAAM=\"},{\"prefix\":\"Fg==\",\"key\":\"BAAG\",\"value\":\"AAAAAAAAAAQ=\"}]}", jsonStr) + assert.Equal(t, "{\"params\":{\"priority_normalizer\":\"1.000000000000000000\",\"base_fee_per_gas\":\"0.000000000000000000\",\"minimum_fee_per_gas\":\"100000000000.000000000000000000\",\"whitelisted_cw_code_hashes_for_delegate_call\":[],\"deliver_tx_hook_wasm_gas_limit\":\"300000\"},\"address_associations\":[{\"sei_address\":\"sei17xpfvakm2amg962yls6f84z3kell8c5la4jkdu\",\"eth_address\":\"0x27F7B8B8B5A4e71E8E9aA671f4e4031E3773303F\"}],\"codes\":[],\"states\":[],\"nonces\":[],\"serialized\":[{\"prefix\":\"Fg==\",\"key\":\"AwAC\",\"value\":\"AAAAAAAAAAM=\"},{\"prefix\":\"Fg==\",\"key\":\"BAAG\",\"value\":\"AAAAAAAAAAQ=\"}]}", jsonStr) } func TestConsensusVersion(t *testing.T) { diff --git a/x/evm/types/params.go b/x/evm/types/params.go index ffb78606d..b05983296 100644 --- a/x/evm/types/params.go +++ b/x/evm/types/params.go @@ -50,8 +50,8 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(KeyPriorityNormalizer, &p.PriorityNormalizer, validatePriorityNormalizer), paramtypes.NewParamSetPair(KeyBaseFeePerGas, &p.BaseFeePerGas, validateBaseFeePerGas), paramtypes.NewParamSetPair(KeyMinFeePerGas, &p.MinimumFeePerGas, validateMinFeePerGas), - paramtypes.NewParamSetPair(KeyDeliverTxHookWasmGasLimit, &p.DeliverTxHookWasmGasLimit, validateDeliverTxHookWasmGasLimit), paramtypes.NewParamSetPair(KeyWhitelistedCwCodeHashesForDelegateCall, &p.WhitelistedCwCodeHashesForDelegateCall, validateWhitelistedCwHashesForDelegateCall), + paramtypes.NewParamSetPair(KeyDeliverTxHookWasmGasLimit, &p.DeliverTxHookWasmGasLimit, validateDeliverTxHookWasmGasLimit), } } @@ -79,6 +79,20 @@ func (p Params) String() string { return string(out) } +func (p *ParamsPreV580) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair(KeyPriorityNormalizer, &p.PriorityNormalizer, validatePriorityNormalizer), + paramtypes.NewParamSetPair(KeyBaseFeePerGas, &p.BaseFeePerGas, validateBaseFeePerGas), + paramtypes.NewParamSetPair(KeyMinFeePerGas, &p.MinimumFeePerGas, validateMinFeePerGas), + paramtypes.NewParamSetPair(KeyWhitelistedCwCodeHashesForDelegateCall, &p.WhitelistedCwCodeHashesForDelegateCall, validateWhitelistedCwHashesForDelegateCall), + } +} + +func (p ParamsPreV580) String() string { + out, _ := yaml.Marshal(p) + return string(out) +} + func validatePriorityNormalizer(i interface{}) error { v, ok := i.(sdk.Dec) if !ok { diff --git a/x/evm/types/params.pb.go b/x/evm/types/params.pb.go index 8303ff5af..5b0211d8c 100644 --- a/x/evm/types/params.pb.go +++ b/x/evm/types/params.pb.go @@ -30,10 +30,9 @@ type Params struct { // (gogoproto.moretags) = "yaml:\"base_denom\"", // (gogoproto.jsontag) = "base_denom" // ]; - PriorityNormalizer github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=priority_normalizer,json=priorityNormalizer,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"priority_normalizer" yaml:"priority_normalizer"` - BaseFeePerGas github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=base_fee_per_gas,json=baseFeePerGas,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"base_fee_per_gas" yaml:"base_fee_per_gas"` - MinimumFeePerGas github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=minimum_fee_per_gas,json=minimumFeePerGas,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"minimum_fee_per_gas" yaml:"minimum_fee_per_gas"` - DeliverTxHookWasmGasLimit uint64 `protobuf:"varint,5,opt,name=deliver_tx_hook_wasm_gas_limit,json=deliverTxHookWasmGasLimit,proto3" json:"deliver_tx_hook_wasm_gas_limit,omitempty"` + PriorityNormalizer github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=priority_normalizer,json=priorityNormalizer,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"priority_normalizer" yaml:"priority_normalizer"` + BaseFeePerGas github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=base_fee_per_gas,json=baseFeePerGas,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"base_fee_per_gas" yaml:"base_fee_per_gas"` + MinimumFeePerGas github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=minimum_fee_per_gas,json=minimumFeePerGas,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"minimum_fee_per_gas" yaml:"minimum_fee_per_gas"` // ChainConfig chain_config = 5 [(gogoproto.moretags) = "yaml:\"chain_config\"", (gogoproto.nullable) = false]; // string chain_id = 6 [ // (gogoproto.moretags) = "yaml:\"chain_id\"", @@ -46,6 +45,7 @@ type Params struct { // (gogoproto.jsontag) = "whitelisted_codehashes_bank_send" // ]; WhitelistedCwCodeHashesForDelegateCall [][]byte `protobuf:"bytes,8,rep,name=whitelisted_cw_code_hashes_for_delegate_call,json=whitelistedCwCodeHashesForDelegateCall,proto3" json:"whitelisted_cw_code_hashes_for_delegate_call" yaml:"whitelisted_cw_code_hashes_for_delegate_call"` + DeliverTxHookWasmGasLimit uint64 `protobuf:"varint,9,opt,name=deliver_tx_hook_wasm_gas_limit,json=deliverTxHookWasmGasLimit,proto3" json:"deliver_tx_hook_wasm_gas_limit,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -80,6 +80,13 @@ func (m *Params) XXX_DiscardUnknown() { var xxx_messageInfo_Params proto.InternalMessageInfo +func (m *Params) GetWhitelistedCwCodeHashesForDelegateCall() [][]byte { + if m != nil { + return m.WhitelistedCwCodeHashesForDelegateCall + } + return nil +} + func (m *Params) GetDeliverTxHookWasmGasLimit() uint64 { if m != nil { return m.DeliverTxHookWasmGasLimit @@ -87,7 +94,67 @@ func (m *Params) GetDeliverTxHookWasmGasLimit() uint64 { return 0 } -func (m *Params) GetWhitelistedCwCodeHashesForDelegateCall() [][]byte { +type ParamsPreV580 struct { + // string base_denom = 1 [ + // + // (gogoproto.moretags) = "yaml:\"base_denom\"", + // (gogoproto.jsontag) = "base_denom" + // + // ]; + PriorityNormalizer github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=priority_normalizer,json=priorityNormalizer,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"priority_normalizer" yaml:"priority_normalizer"` + BaseFeePerGas github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=base_fee_per_gas,json=baseFeePerGas,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"base_fee_per_gas" yaml:"base_fee_per_gas"` + MinimumFeePerGas github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=minimum_fee_per_gas,json=minimumFeePerGas,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"minimum_fee_per_gas" yaml:"minimum_fee_per_gas"` + // ChainConfig chain_config = 5 [(gogoproto.moretags) = "yaml:\"chain_config\"", (gogoproto.nullable) = false]; + // + // string chain_id = 6 [ + // (gogoproto.moretags) = "yaml:\"chain_id\"", + // (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + // (gogoproto.nullable) = false, + // (gogoproto.jsontag) = "chain_id" + // + // ]; + // repeated string whitelisted_codehashes_bank_send = 7 [ + // + // (gogoproto.moretags) = "yaml:\"whitelisted_codehashes_bank_send\"", + // (gogoproto.jsontag) = "whitelisted_codehashes_bank_send" + // + // ]; + WhitelistedCwCodeHashesForDelegateCall [][]byte `protobuf:"bytes,8,rep,name=whitelisted_cw_code_hashes_for_delegate_call,json=whitelistedCwCodeHashesForDelegateCall,proto3" json:"whitelisted_cw_code_hashes_for_delegate_call" yaml:"whitelisted_cw_code_hashes_for_delegate_call"` +} + +func (m *ParamsPreV580) Reset() { *m = ParamsPreV580{} } +func (*ParamsPreV580) ProtoMessage() {} +func (*ParamsPreV580) Descriptor() ([]byte, []int) { + return fileDescriptor_9272f3679901ea94, []int{1} +} +func (m *ParamsPreV580) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ParamsPreV580) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ParamsPreV580.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ParamsPreV580) XXX_Merge(src proto.Message) { + xxx_messageInfo_ParamsPreV580.Merge(m, src) +} +func (m *ParamsPreV580) XXX_Size() int { + return m.Size() +} +func (m *ParamsPreV580) XXX_DiscardUnknown() { + xxx_messageInfo_ParamsPreV580.DiscardUnknown(m) +} + +var xxx_messageInfo_ParamsPreV580 proto.InternalMessageInfo + +func (m *ParamsPreV580) GetWhitelistedCwCodeHashesForDelegateCall() [][]byte { if m != nil { return m.WhitelistedCwCodeHashesForDelegateCall } @@ -96,42 +163,45 @@ func (m *Params) GetWhitelistedCwCodeHashesForDelegateCall() [][]byte { func init() { proto.RegisterType((*Params)(nil), "seiprotocol.seichain.evm.Params") + proto.RegisterType((*ParamsPreV580)(nil), "seiprotocol.seichain.evm.ParamsPreV580") } func init() { proto.RegisterFile("evm/params.proto", fileDescriptor_9272f3679901ea94) } var fileDescriptor_9272f3679901ea94 = []byte{ - // 472 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0xcf, 0x8b, 0xd3, 0x40, - 0x14, 0x4e, 0xdc, 0xee, 0xa2, 0x41, 0xa1, 0x64, 0x05, 0x63, 0x0f, 0x49, 0xc9, 0x61, 0xe9, 0xc1, - 0x26, 0x87, 0xbd, 0xed, 0xcd, 0x76, 0xd9, 0xee, 0x41, 0x64, 0x09, 0x82, 0x20, 0xc8, 0x30, 0x4d, - 0x5e, 0x93, 0xa1, 0x33, 0x7d, 0x61, 0x26, 0xdb, 0x1f, 0xfe, 0x01, 0x9e, 0x45, 0x3c, 0x78, 0xf4, - 0x9f, 0x11, 0xf6, 0x24, 0x7b, 0x14, 0x0f, 0x41, 0xda, 0xdb, 0x1e, 0xfb, 0x17, 0x48, 0xa6, 0x5d, - 0xb7, 0x6a, 0x2f, 0xf5, 0x94, 0x97, 0xef, 0xfb, 0xde, 0xc7, 0x37, 0xef, 0xf1, 0xac, 0x3a, 0x8c, - 0x45, 0x98, 0x53, 0x49, 0x85, 0x0a, 0x72, 0x89, 0x05, 0xda, 0x8e, 0x02, 0xa6, 0xab, 0x18, 0x79, - 0xa0, 0x80, 0xc5, 0x19, 0x65, 0xa3, 0x00, 0xc6, 0xa2, 0xf1, 0x38, 0xc5, 0x14, 0x35, 0x15, 0x56, - 0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x60, 0x85, 0xb3, 0xdf, 0x34, 0x5b, 0xb5, 0xe8, 0xe9, - 0x5a, 0xf5, 0x6a, 0x7a, 0x8e, 0x38, 0x7c, 0x4d, 0x95, 0xe8, 0x51, 0xf5, 0xa2, 0x12, 0xd8, 0x5f, - 0x4d, 0xeb, 0xd9, 0x24, 0x63, 0x05, 0x70, 0xa6, 0x0a, 0x48, 0x48, 0x3c, 0x21, 0x31, 0x26, 0x40, - 0x32, 0xaa, 0x32, 0x50, 0x64, 0x80, 0x92, 0x24, 0xc0, 0x21, 0xa5, 0x05, 0x90, 0x98, 0x72, 0xee, - 0xdc, 0x6f, 0xee, 0xb5, 0x1e, 0x76, 0xd2, 0x9b, 0xd2, 0xdb, 0xa9, 0x6f, 0x59, 0x7a, 0xc7, 0xab, - 0xb7, 0xed, 0xd2, 0xe5, 0x47, 0x47, 0x1b, 0xf2, 0xee, 0xa4, 0x8b, 0x09, 0x9c, 0x6b, 0xed, 0x19, - 0xca, 0xd3, 0xb5, 0xb2, 0x4b, 0x39, 0x3f, 0xa9, 0x7d, 0xfe, 0xe2, 0x19, 0x9d, 0xde, 0xd5, 0xdc, - 0x35, 0xaf, 0xe7, 0xae, 0xf9, 0x73, 0xee, 0x9a, 0x1f, 0x16, 0xae, 0x71, 0xbd, 0x70, 0x8d, 0xef, - 0x0b, 0xd7, 0x78, 0xd3, 0xde, 0xd8, 0x8c, 0x02, 0xd6, 0xbe, 0x3d, 0x1c, 0xfd, 0xa3, 0x2f, 0x27, - 0x9c, 0x86, 0xd5, 0x81, 0xe8, 0x25, 0xf5, 0x0f, 0x34, 0x7f, 0xfc, 0x2b, 0x00, 0x00, 0xff, 0xff, - 0x70, 0xe7, 0xb6, 0xa2, 0x76, 0x03, 0x00, 0x00, + // 501 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x54, 0x3f, 0x6b, 0xdb, 0x40, + 0x1c, 0x95,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0x63, 0x2c, 0x59, + 0xf1, 0x6c, 0x44, 0x09, 0x23, 0x99, 0xb5, 0x5b, 0xd7, 0x1b, 0x95, 0xe0, 0xe1, 0x52, 0xf5, 0x72, + 0x72, 0xca, 0xf9, 0xe0, 0x35, 0x96, 0xac, 0x83, 0xe5, 0xf3, 0x42, 0x70, 0x54, 0xf9, 0xf4, 0xd9, + 0xd1, 0xdc, 0xf3, 0x6d, 0x63, 0xaf, 0x2c, 0x74, 0x57, 0xc0, 0xab, 0x27, 0x4f, 0x1f, 0x6f, 0x7a, + 0xbd, 0xe9, 0xf5, 0x7f, 0xeb, 0x75, 0x59, 0xca, 0x56, 0xe7, 0x62, 0x66, 0xeb, 0x97, 0x33, 0x5b, + 0xff, 0x31, 0xb3, 0xf5, 0x0f, 0x73, 0x5b, 0xbb, 0x9c, 0xdb, 0xda, 0xb7, 0xb9, 0xad, 0xbd, 0x69, + 0xde, 0x1a, 0xab, 0x04, 0xd2, 0xbc, 0xde, 0xe6, 0xea, 0x47, 0xad, 0x73, 0x7f, 0xe2, 0x17, 0x5b, + 0x5b, 0x4d, 0xb8, 0xb7, 0xa3, 0xf8, 0xc3, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x06, 0x70, 0x97, + 0xaa, 0x0b, 0x06, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -154,6 +224,11 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.DeliverTxHookWasmGasLimit != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.DeliverTxHookWasmGasLimit)) + i-- + dAtA[i] = 0x48 + } if len(m.WhitelistedCwCodeHashesForDelegateCall) > 0 { for iNdEx := len(m.WhitelistedCwCodeHashesForDelegateCall) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.WhitelistedCwCodeHashesForDelegateCall[iNdEx]) @@ -163,10 +238,67 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x42 } } - if m.DeliverTxHookWasmGasLimit != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.DeliverTxHookWasmGasLimit)) - i-- - dAtA[i] = 0x28 + { + size := m.MinimumFeePerGas.Size() + i -= size + if _, err := m.MinimumFeePerGas.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.BaseFeePerGas.Size() + i -= size + if _, err := m.BaseFeePerGas.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.PriorityNormalizer.Size() + i -= size + if _, err := m.PriorityNormalizer.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + return len(dAtA) - i, nil +} + +func (m *ParamsPreV580) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParamsPreV580) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ParamsPreV580) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.WhitelistedCwCodeHashesForDelegateCall) > 0 { + for iNdEx := len(m.WhitelistedCwCodeHashesForDelegateCall) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.WhitelistedCwCodeHashesForDelegateCall[iNdEx]) + copy(dAtA[i:], m.WhitelistedCwCodeHashesForDelegateCall[iNdEx]) + i = encodeVarintParams(dAtA, i, uint64(len(m.WhitelistedCwCodeHashesForDelegateCall[iNdEx]))) + i-- + dAtA[i] = 0x42 + } } { size := m.MinimumFeePerGas.Size() @@ -224,9 +356,30 @@ func (m *Params) Size() (n int) { n += 1 + l + sovParams(uint64(l)) l = m.MinimumFeePerGas.Size() n += 1 + l + sovParams(uint64(l)) + if len(m.WhitelistedCwCodeHashesForDelegateCall) > 0 { + for _, b := range m.WhitelistedCwCodeHashesForDelegateCall { + l = len(b) + n += 1 + l + sovParams(uint64(l)) + } + } if m.DeliverTxHookWasmGasLimit != 0 { n += 1 + sovParams(uint64(m.DeliverTxHookWasmGasLimit)) } + return n +} + +func (m *ParamsPreV580) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.PriorityNormalizer.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.BaseFeePerGas.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.MinimumFeePerGas.Size() + n += 1 + l + sovParams(uint64(l)) if len(m.WhitelistedCwCodeHashesForDelegateCall) > 0 { for _, b := range m.WhitelistedCwCodeHashesForDelegateCall { l = len(b) @@ -373,7 +526,39 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WhitelistedCwCodeHashesForDelegateCall", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WhitelistedCwCodeHashesForDelegateCall = append(m.WhitelistedCwCodeHashesForDelegateCall, make([]byte, postIndex-iNdEx)) + copy(m.WhitelistedCwCodeHashesForDelegateCall[len(m.WhitelistedCwCodeHashesForDelegateCall)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field DeliverTxHookWasmGasLimit", wireType) } @@ -392,6 +577,158 @@ func (m *Params) Unmarshal(dAtA []byte) error { break } } + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParamsPreV580) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParamsPreV580: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParamsPreV580: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PriorityNormalizer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PriorityNormalizer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseFeePerGas", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.BaseFeePerGas.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MinimumFeePerGas", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MinimumFeePerGas.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field WhitelistedCwCodeHashesForDelegateCall", wireType)