0xPolygonHermez / zkevm-node

Go implementation of a node that operates the Polygon zkEVM Network
Other
531 stars 685 forks source link

L2 coinbase config not work #3537

Closed 0xyjk closed 2 months ago

0xyjk commented 5 months ago

when L2Coinbase is different with Sequencer address it will met this error

TRUSTED REORG DETECTED! Batch: 2 reson:Batch: 2.Different field StateRoot. Virtual: 0xb396971c613bda3775881769a0c92b4ac32af77b37f98ca01ae7afeced02663f, Trusted: 0x8a5c7c1fc78f4034754d7d60c2c064337f0c6711fd32418d37a60eb90eb1a7ef\nBatch: 2.Different field Coinbase. Virtual: 0xD2Da6001C76530B11f64fD3E0BC3b7064dce9e4e, Trusted: 0xac2C3023D19A6b314486cf06b5B676cFdd885534

which trusted coinbase is the L2Coinbase in config and the virtual coinbase the sequencer address

this issue seems caused by this line, https://github.com/0xPolygonHermez/zkevm-node/blob/develop/sequencer/batch.go#L251 should use cfg.L2Coinbase instead