0xPolygonHermez / cdk-erigon

Ethereum implementation on the efficiency frontier
GNU Lesser General Public License v3.0
30 stars 24 forks source link

panic: Flag not set: zkevm.address-sequencer -- when it has been set as a command flag #711

Open northwestnodes-eric opened 2 months ago

northwestnodes-eric commented 2 months ago

System information

Erigon version: image: hermeznetwork/cdk-erigon:v1.1.5.5-amd64

OS & Version: Linux Ubuntu 22.04 amd64

Commit hash: 2a20a2f54fc96f3f26aa267de5d556b606a21d47

Erigon Command (with flags/config):

    command:
      - --chain=hermez-mainnet
      - --externalcl=true
      - --maxpeers=32
      - --downloader.disable.ipv6=true
      - --nat=extip:...
      - --zkevm.l2-chain-id=1101
      - --zkevm.l2-sequencer-rpc-url=https://zkevm-rpc.com
      - --zkevm.l2-datastreamer-url=stream.zkevm-rpc.com:6900
      - --zkevm.address-sequencer="0x148Ee7dAF16574cD020aFa34CC658f8F3fbd2800"
      - --zkevm.address-zkevm="0x519E42c24163192Dca44CD3fBDCEBF6be9130987"
      - --zkevm.address-admin="0x242daE44F5d8fb54B198D03a94dA45B5a4413e21"
      - --zkevm.address-rollup="0x5132A183E9F3CB7C848b0AAC5Ae0c4f0491B7aB2"
      - --zkevm.address-ger-manager="0x580bda1e7A0CFAe92Fa7F6c20A3794F169CE3CFb"
      - --zkevm.l1-chain-id=1
      - --zkevm.l1-rpc-url=https://...
      - --zkevm.l1-rollup-id=1
      - --zkevm.l1-block-range=20000
      - --zkevm.l1-query-delay=6000
      - --zkevm.l1-first-block=16896700
      - --zkevm.rpc-ratelimit=0
      - --zkevm.datastream-version=2
      - --http=true
      - --http.api=eth,debug,net,trace,web3,erigon,zkevm
      - --http.addr=0.0.0.0
      - --http.port=8545
      - --http.vhosts=any
      - --http.corsdomain=any
      - --ws=true

Concensus Layer:

Concensus Layer Command (with flags/config):

Chain/Network: Mainnet

Expected behaviour

It runs with the flag set, not just in the config file.

Actual behaviour

It does not run with the flag set.

Steps to reproduce the behaviour

Run erigon with above command flags.

Backtrace

erigon-rpc  | [cdk-erigon-lib] timestamp 2024-03-12:16:34
erigon-rpc  | [INFO] [07-04|17:24:42.666] logging to file system                   log dir=/home/erigon/.local/share/erigon/logs file prefix=erigon log level=info json=false
erigon-rpc  | [INFO] [07-04|17:24:42.676] logging to file system                   log dir=/home/erigon/.local/share/erigon/logs file prefix=cdk-erigon log level=info json=false
erigon-rpc  | [INFO] [07-04|17:24:42.676] Build info                               git_branch=HEAD git_tag=v1.1.5.5-dirty git_commit=2a20a2f54fc96f3f26aa267de5d556b606a21d47
erigon-rpc  | [INFO] [07-04|17:24:42.676] Poseidon hashing                         Accelerated=true
erigon-rpc  | [INFO] [07-04|17:24:42.676] Starting Erigon on                       devnet=hermez-mainnet
erigon-rpc  | [INFO] [07-04|17:24:42.676] Maximum peer count                       ETH=32 total=32
erigon-rpc  | [INFO] [07-04|17:24:42.676] starting HTTP APIs                       APIs=eth,debug,net,trace,web3,erigon,zkevm
erigon-rpc  | [INFO] [07-04|17:24:42.676] torrent verbosity                        level=WRN
erigon-rpc  | [INFO] [07-04|17:24:42.676] [torrent] Public IP                      ip=...
erigon-rpc  | [INFO] [07-04|17:24:42.677] Set global gas cap                       cap=50000000
erigon-rpc  | [INFO] [07-04|17:24:42.679] [Downloader] Runnning with               ipv6-enabled=false ipv4-enabled=true download.rate=16mb upload.rate=4mb
erigon-rpc  | panic: Flag not set: zkevm.address-sequencer
erigon-rpc  |
erigon-rpc  | goroutine 1 [running]:
erigon-rpc  | github.com/ledgerwatch/erigon/turbo/cli.ApplyFlagsForZkConfig.func1({0x27d1c70, 0x17}, {0x24af5e0?, 0xc001877fb0?})
erigon-rpc  |   github.com/ledgerwatch/erigon/turbo/cli/flags_zkevm.go:47 +0x3e5
erigon-rpc  | github.com/ledgerwatch/erigon/turbo/cli.ApplyFlagsForZkConfig(0xc00077ef80?, 0x412c200)
erigon-rpc  |   github.com/ledgerwatch/erigon/turbo/cli/flags_zkevm.go:176 +0x145b
erigon-rpc  | github.com/ledgerwatch/erigon/turbo/node.NewEthConfigUrfave(0xc0000a0060?, 0x26eb6a5?)
erigon-rpc  |   github.com/ledgerwatch/erigon/turbo/node/node.go:95 +0x47
erigon-rpc  | main.runErigon(0xc00075ab00?)
erigon-rpc  |   github.com/ledgerwatch/erigon/cmd/cdk-erigon/main.go:63 +0x288
erigon-rpc  | github.com/urfave/cli/v2.(*Command).Run(0xc00075ab00, 0xc00077ef80, {0xc0000521e0, 0x1d, 0x1e})
erigon-rpc  |   github.com/urfave/cli/v2@v2.25.7/command.go:274 +0x9eb
erigon-rpc  | github.com/urfave/cli/v2.(*App).RunContext(0xc001660000, {0x2ef25f8?, 0xc00005e040}, {0xc0000521e0, 0x1d, 0x1e})
erigon-rpc  |   github.com/urfave/cli/v2@v2.25.7/app.go:332 +0x616
erigon-rpc  | github.com/urfave/cli/v2.(*App).Run(...)
erigon-rpc  |   github.com/urfave/cli/v2@v2.25.7/app.go:309
erigon-rpc  | main.main()
erigon-rpc  |   github.com/ledgerwatch/erigon/cmd/cdk-erigon/main.go:39 +0x85
V-Staykov commented 1 month ago

I can run it with this command: ./build/bin/cdk-erigon \ --datadir="..." \ --chain="hermez-mainnet" \ --externalcl=true \ --maxpeers=32 \ --zkevm.l2-chain-id=1101 \ --downloader.disable.ipv6=true \ --zkevm.l2-sequencer-rpc-url="https://zkevm-rpc.com" \ --zkevm.l2-datastreamer-url="stream.zkevm-rpc.com:6900" \ --zkevm.address-sequencer="0x148Ee7dAF16574cD020aFa34CC658f8F3fbd2800" \ --zkevm.address-zkevm="0x519E42c24163192Dca44CD3fBDCEBF6be9130987" \ --zkevm.address-admin="0x242daE44F5d8fb54B198D03a94dA45B5a4413e21" \ --zkevm.address-rollup="0x5132A183E9F3CB7C848b0AAC5Ae0c4f0491B7aB2" \ --zkevm.address-ger-manager="0x580bda1e7A0CFAe92Fa7F6c20A3794F169CE3CFb" \ --zkevm.l1-chain-id=1 \ --zkevm.l1-rpc-url="https://...." \ --zkevm.l1-rollup-id=1 \ --zkevm.l1-block-range=20000 \ --zkevm.l1-query-delay=6000 \ --zkevm.l1-first-block=16896700 \ --zkevm.rpc-ratelimit=2 \ --zkevm.datastream-version=2 \ --http=true \ --http.api=eth,debug,net,trace,web3,erigon,zkevm \ --http.addr=0.0.0.0 \ --http.port=8545 \ --http.vhosts=any \ --http.corsdomain=any \ --ws=true