0xPolygonHermez / cdk-erigon

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

[RPC] Method "zkevm_getBatchByNumber" failing for batches 0, 1, 5, 7, 17 #1097

Closed Damantino closed 2 months ago

Damantino commented 2 months ago

System information

output of git branch

* (HEAD detached at v1.2.15.7)
  zkevm

Config File

datadir: /path/to/my/cdk-erigon/datadir
chain: hermez-mainnet
http: true
private.api.addr: localhost:9091
zkevm.l2-chain-id: 1101
zkevm.l2-sequencer-rpc-url: https://zkevm-rpc.com
zkevm.l2-datastreamer-url: stream.zkevm-rpc.com:6900
zkevm.l1-chain-id: 1
zkevm.l1-rpc-url: http://my-l1-node

zkevm.address-sequencer: "0x148Ee7dAF16574cD020aFa34CC658f8F3fbd2800"
zkevm.address-zkevm: "0x519E42c24163192Dca44CD3fBDCEBF6be9130987"
zkevm.address-admin: "0x242daE44F5d8fb54B198D03a94dA45B5a4413e21"
zkevm.address-rollup: "0x5132A183E9F3CB7C848b0AAC5Ae0c4f0491B7aB2"
zkevm.address-ger-manager: "0x580bda1e7A0CFAe92Fa7F6c20A3794F169CE3CFb"

zkevm.default-gas-price: 1
zkevm.max-gas-price: 0
zkevm.gas-price-factor: 0.0375

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

externalcl: true
http.api: [eth, debug, net, trace, web3, erigon, zkevm]
http.addr: 0.0.0.0
http.vhosts: any
http.corsdomain: any
ws: true

Erigon Command (with flags/config):

./build/bin/cdk-erigon --config="/mnt/ethereum/cdk-erigon/hermezconfig-mainnet.yaml" --ws

Erigon RPC

./build/bin/rpcdaemon --datadir=/path/to/cdk-erigon/data --txpool.api.addr=localhost:9091 --private.api.addr=localhost:9091 --http.api=eth,erigon,web3,net,debug,trace,txpool,zkevm --ws --ws.compression

Expected behaviour

When I curl to get batch info it gets delivered.

> curl --request POST      --url http://localhost:8545/    --header 'accept: application/json'      --header 'content-type: application/json'      --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "zkevm_getBatchByNumber",
  "params": [
    "1"
  ]
}
'
< {"jsonrpc":"2.0","id":1,"result":"The batch info"}

Actual behaviour

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": null
}

Steps to reproduce the behaviour

  1. Launch node, wait until synchronises
  2. Build rpcdaemon
  3. Launch rpcdaemon
  4. Launch request
V-Staykov commented 2 months ago

This is the same as https://github.com/0xPolygonHermez/cdk-erigon/issues/958 and is fixed now.