diff --git a/README.md b/README.md index 55b567116ab..1e593d467ed 100644 --- a/README.md +++ b/README.md @@ -132,9 +132,6 @@ Initial SMT build performance can be increased if machine has enough RAM: ## Configuration Files Config files are the easiest way to configure cdk-erigon, there are examples in the repository for each network e.g. `hermezconfig-mainnet.yaml.example`. - -Depending on the RPC provider you are using, you may wish to alter `zkevm.rpc-ratelimit`. - *** ## Running CDK-Erigon @@ -193,7 +190,6 @@ For a full explanation of the config options, see below: - `zkevm.address-zkevm`: The address for the zkevm contract - `zkevm.address-rollup`: The address for the rollup contract - `zkevm.address-ger-manager`: The address for the GER manager contract -- `zkevm.rpc-ratelimit`: Rate limit for RPC calls. - `zkevm.data-stream-port`: Port for the data stream. This needs to be set to enable the datastream server - `zkevm.data-stream-host`: The host for the data stream i.e. `localhost`. This must be set to enable the datastream server - `zkevm.datastream-version:` Version of the data stream protocol. diff --git a/cmd/cdk-erigon/main.go b/cmd/cdk-erigon/main.go index 6598464dea1..d8422b8faef 100644 --- a/cmd/cdk-erigon/main.go +++ b/cmd/cdk-erigon/main.go @@ -111,14 +111,20 @@ func setFlagsFromConfigFile(ctx *cli.Context, filePath string) error { } if err := ctx.Set(key, strings.Join(s, ",")); err != nil { if deprecatedFlag, found := erigoncli.DeprecatedFlags[key]; found { - return fmt.Errorf("failed setting %s flag Flag is deprecated, use %s instead", key, deprecatedFlag) + if deprecatedFlag == "" { + return fmt.Errorf("failed setting %s flag it is deprecated, remove it", key) + } + return fmt.Errorf("failed setting %s flag it is deprecated, use %s instead", key, deprecatedFlag) } return fmt.Errorf("failed setting %s flag with values=%s error=%s", key, s, err) } } else { if err := ctx.Set(key, fmt.Sprintf("%v", value)); err != nil { if deprecatedFlag, found := erigoncli.DeprecatedFlags[key]; found { - return fmt.Errorf("failed setting %s flag Flag is deprecated, use %s instead", key, deprecatedFlag) + if deprecatedFlag == "" { + return fmt.Errorf("failed setting %s flag it is deprecated, remove it", key) + } + return fmt.Errorf("failed setting %s flag it is deprecated, use %s instead", key, deprecatedFlag) } return fmt.Errorf("failed setting %s flag with value=%v error=%s", key, value, err) } diff --git a/hermezconfig-bali.yaml.example b/hermezconfig-bali.yaml.example index 84ecf06d856..2324247b7e4 100644 --- a/hermezconfig-bali.yaml.example +++ b/hermezconfig-bali.yaml.example @@ -19,7 +19,6 @@ zkevm.gas-price-factor: 0.12 zkevm.l1-rollup-id: 1 zkevm.l1-first-block: 4794475 -zkevm.rpc-ratelimit: 250 txpool.disable: true torrent.port: 42070 zkevm.datastream-version: 2 diff --git a/hermezconfig-cardona.yaml.example b/hermezconfig-cardona.yaml.example index 4840fe005b1..b25311f2fbb 100644 --- a/hermezconfig-cardona.yaml.example +++ b/hermezconfig-cardona.yaml.example @@ -21,7 +21,6 @@ zkevm.l1-rollup-id: 1 zkevm.l1-block-range: 20000 zkevm.l1-query-delay: 6000 zkevm.l1-first-block: 4789190 -zkevm.rpc-ratelimit: 250 txpool.disable: true torrent.port: 42070 zkevm.datastream-version: 2 diff --git a/hermezconfig-dev.yaml.example b/hermezconfig-dev.yaml.example index d41f711ba82..76b02a7608b 100644 --- a/hermezconfig-dev.yaml.example +++ b/hermezconfig-dev.yaml.example @@ -16,7 +16,6 @@ zkevm.address-ger-manager: "0x76216E45Bdd20022eEcC07999e50228d7829534B" zkevm.l1-block-range: 20000 zkevm.l1-query-delay: 6000 zkevm.l1-first-block: 5192000 -zkevm.rpc-ratelimit: 250 zkevm.data-stream-port: 6900 zkevm.datastream-version: 2 zkevm.data-stream-host: localhost diff --git a/hermezconfig-estest-syncer.yaml.example b/hermezconfig-estest-syncer.yaml.example index eda029d1d12..1458b566a94 100644 --- a/hermezconfig-estest-syncer.yaml.example +++ b/hermezconfig-estest-syncer.yaml.example @@ -16,7 +16,6 @@ zkevm.address-ger-manager: "0x0FE6A2FcF455b9B8004fd625909857933d3c7494" zkevm.l1-block-range: 20000 zkevm.l1-query-delay: 6000 zkevm.l1-first-block: 5192000 -zkevm.rpc-ratelimit: 250 zkevm.data-stream-port: 6900 zkevm.datastream-version: 2 zkevm.data-stream-host: "127.0.0.1" diff --git a/hermezconfig-mainnet-shadowfork.yaml.example b/hermezconfig-mainnet-shadowfork.yaml.example index f50e69102ec..285b570b7a4 100644 --- a/hermezconfig-mainnet-shadowfork.yaml.example +++ b/hermezconfig-mainnet-shadowfork.yaml.example @@ -16,7 +16,6 @@ zkevm.address-ger-manager: "0x76216E45Bdd20022eEcC07999e50228d7829534B" zkevm.l1-block-range: 20000 zkevm.l1-query-delay: 6000 zkevm.l1-first-block: 5192000 -zkevm.rpc-ratelimit: 250 zkevm.data-stream-port: 6900 zkevm.datastream-version: 2 zkevm.data-stream-host: localhost diff --git a/hermezconfig-mainnet.yaml.example b/hermezconfig-mainnet.yaml.example index f5ec1540a45..8cbf02145c9 100644 --- a/hermezconfig-mainnet.yaml.example +++ b/hermezconfig-mainnet.yaml.example @@ -21,7 +21,6 @@ zkevm.l1-rollup-id: 1 zkevm.l1-block-range: 20000 zkevm.l1-query-delay: 6000 zkevm.l1-first-block: 16896700 -zkevm.rpc-ratelimit: 250 zkevm.datastream-version: 2 # debug.timers: true # Uncomment to enable timers diff --git a/turbo/cli/flags_zkevm.go b/turbo/cli/flags_zkevm.go index 1014e76abc5..4d979d04d7e 100644 --- a/turbo/cli/flags_zkevm.go +++ b/turbo/cli/flags_zkevm.go @@ -17,7 +17,8 @@ import ( ) var DeprecatedFlags = map[string]string{ - "zkevm.gasless": "zkevm.allow-free-transactions", + "zkevm.gasless": "zkevm.allow-free-transactions", + "zkevm.rpc-ratelimit": "", } func ApplyFlagsForZkConfig(ctx *cli.Context, cfg *ethconfig.Config) { @@ -135,7 +136,6 @@ func ApplyFlagsForZkConfig(ctx *cli.Context, cfg *ethconfig.Config) { L1FirstBlock: ctx.Uint64(utils.L1FirstBlockFlag.Name), L1FinalizedBlockRequirement: ctx.Uint64(utils.L1FinalizedBlockRequirementFlag.Name), L1ContractAddressCheck: ctx.Bool(utils.L1ContractAddressCheckFlag.Name), - RpcRateLimits: ctx.Int(utils.RpcRateLimitsFlag.Name), RpcGetBatchWitnessConcurrencyLimit: ctx.Int(utils.RpcGetBatchWitnessConcurrencyLimitFlag.Name), DatastreamVersion: ctx.Int(utils.DatastreamVersionFlag.Name), RebuildTreeAfter: ctx.Uint64(utils.RebuildTreeAfterFlag.Name), @@ -224,7 +224,6 @@ func ApplyFlagsForZkConfig(ctx *cli.Context, cfg *ethconfig.Config) { checkFlag(utils.L1RpcUrlFlag.Name, cfg.L1RpcUrl) checkFlag(utils.L1MaticContractAddressFlag.Name, cfg.L1MaticContractAddress.Hex()) checkFlag(utils.L1FirstBlockFlag.Name, cfg.L1FirstBlock) - checkFlag(utils.RpcRateLimitsFlag.Name, cfg.RpcRateLimits) checkFlag(utils.RpcGetBatchWitnessConcurrencyLimitFlag.Name, cfg.RpcGetBatchWitnessConcurrencyLimit) checkFlag(utils.RebuildTreeAfterFlag.Name, cfg.RebuildTreeAfter) checkFlag(utils.L1BlockRangeFlag.Name, cfg.L1BlockRange) diff --git a/xlayerconfig-mainnet.yaml.example b/xlayerconfig-mainnet.yaml.example index 9d92556b800..6bb2c269066 100644 --- a/xlayerconfig-mainnet.yaml.example +++ b/xlayerconfig-mainnet.yaml.example @@ -17,7 +17,6 @@ zkevm.l1-rollup-id: 3 zkevm.l1-first-block: 19218658 zkevm.l1-block-range: 2000 zkevm.l1-query-delay: 1000 -zkevm.rpc-ratelimit: 250 zkevm.datastream-version: 3 externalcl: true diff --git a/xlayerconfig-testnet.yaml.example b/xlayerconfig-testnet.yaml.example index cb9a07a510e..706c8009901 100644 --- a/xlayerconfig-testnet.yaml.example +++ b/xlayerconfig-testnet.yaml.example @@ -17,7 +17,6 @@ zkevm.l1-rollup-id: 1 zkevm.l1-first-block: 4648290 zkevm.l1-block-range: 2000 zkevm.l1-query-delay: 1000 -zkevm.rpc-ratelimit: 250 zkevm.datastream-version: 3 externalcl: true diff --git a/zk/tests/nightly-l1-recovery/network5-config.yaml b/zk/tests/nightly-l1-recovery/network5-config.yaml index 82cf74f727e..b274cc3b290 100644 --- a/zk/tests/nightly-l1-recovery/network5-config.yaml +++ b/zk/tests/nightly-l1-recovery/network5-config.yaml @@ -18,7 +18,6 @@ zkevm.l1-matic-contract-address: "0x0f25eE4CA85Db4362a9749782872c558873566e4" zkevm.l1-block-range: 20000 zkevm.l1-query-delay: 6000 zkevm.l1-first-block: 6032365 -zkevm.rpc-ratelimit: 250 zkevm.data-stream-port: 6900 zkevm.datastream-version: 2 zkevm.data-stream-host: "127.0.0.1" diff --git a/zk/tests/nightly-l1-recovery/network5-sync-config.yaml b/zk/tests/nightly-l1-recovery/network5-sync-config.yaml index 648303c2b50..5a09921c6af 100644 --- a/zk/tests/nightly-l1-recovery/network5-sync-config.yaml +++ b/zk/tests/nightly-l1-recovery/network5-sync-config.yaml @@ -17,7 +17,6 @@ zkevm.l1-matic-contract-address: "0x0f25eE4CA85Db4362a9749782872c558873566e4" zkevm.l1-block-range: 20000 zkevm.l1-query-delay: 6000 zkevm.l1-first-block: 6032365 -zkevm.rpc-ratelimit: 250 zkevm.executor-strict: false # zkevm.executor-urls: "zkevm2-stateless-executor:50071" zkevm.witness-full: false diff --git a/zk/tests/nightly-l1-recovery/network8-config.yaml b/zk/tests/nightly-l1-recovery/network8-config.yaml index b38c7a3b45f..4c414cdc9c0 100644 --- a/zk/tests/nightly-l1-recovery/network8-config.yaml +++ b/zk/tests/nightly-l1-recovery/network8-config.yaml @@ -17,7 +17,6 @@ zkevm.l1-matic-contract-address: "0xdC66C280f5E8bBbd2F2d92FaD1489863c8F55915" zkevm.l1-block-range: 20000 zkevm.l1-query-delay: 6000 zkevm.l1-first-block: 6411787 -zkevm.rpc-ratelimit: 250 zkevm.data-stream-port: 6900 zkevm.datastream-version: 2 zkevm.data-stream-host: "127.0.0.1" diff --git a/zk/tests/nightly-l1-recovery/network8-sync-config.yaml b/zk/tests/nightly-l1-recovery/network8-sync-config.yaml index 98a80e3747d..f51c251ea81 100644 --- a/zk/tests/nightly-l1-recovery/network8-sync-config.yaml +++ b/zk/tests/nightly-l1-recovery/network8-sync-config.yaml @@ -17,7 +17,6 @@ zkevm.l1-matic-contract-address: "0xdC66C280f5E8bBbd2F2d92FaD1489863c8F55915" zkevm.l1-block-range: 20000 zkevm.l1-query-delay: 6000 zkevm.l1-first-block: 6411787 -zkevm.rpc-ratelimit: 250 #zkevm.data-stream-port: 6900 zkevm.datastream-version: 2 #zkevm.data-stream-host: "127.0.0.1" diff --git a/zk/tests/unwinds/config/dynamic-integration8.yaml b/zk/tests/unwinds/config/dynamic-integration8.yaml index afba2cd46a8..2590341925d 100644 --- a/zk/tests/unwinds/config/dynamic-integration8.yaml +++ b/zk/tests/unwinds/config/dynamic-integration8.yaml @@ -17,7 +17,6 @@ zkevm.l1-matic-contract-address: "0xdC66C280f5E8bBbd2F2d92FaD1489863c8F55915" zkevm.l1-block-range: 20000 zkevm.l1-query-delay: 6000 zkevm.l1-first-block: 6411787 -zkevm.rpc-ratelimit: 250 # zkevm.data-stream-port: 6900 zkevm.datastream-version: 2 # zkevm.data-stream-host: "127.0.0.1"