0xPolygonHermez / cdk-erigon

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

`zkevm_getBatchByNumber` has mismatched information for `accInputHash` and `timestamp` #1378

Open praetoriansentry opened 20 hours ago

praetoriansentry commented 20 hours ago

We're cross referencing information from the RPC, Sequencer, Datastreamer, and L1 contracts for verified batches. It seems like we're often missing the accInputHash and potentially returning the wrong timestamp.

image

In the image above, we're pulling data from a few sources. The state roots seem to align which is good, but the accInputHash from L1 is 0x153491ff81c722447f273fd43342407e9e5c721418c640f2102bcb8d1a7d2e67 and the RPC & Sequencer are returning 0x0000000000000000000000000000000000000000000000000000000000000000.

Similarly, the timestamp returned by the RPC & Sequencer is 0x67214d80, but the timestamp returned by getRollupSequencedBatches

This is happening with hermeznetwork/cdk-erigon:v2.2.0-RC3

V-Staykov commented 10 hours ago

We'll need some more info: example network and batch number would be great, so we can reproduce and debug this.

The accInputHash being zeroes should be fixed and working, if a valid contract addresses and l1 RPC url provided. It only returns zeroes if it is unable to get some data from l1 that is needed to calculate the accInputHash.