0xPolygonHermez / cdk-erigon

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

[CDK, Validium] Sequence Sender stops working on CDK network (too many batches, execution reverted by) #979

Closed mandrigin closed 2 months ago

mandrigin commented 2 months ago

It looks like sequence sender doesn’t respect the limit in the sequencing SC, so when it attempts to send a sequence, it fails with the following error.

error adding sequence to ethtxmanager: failed to estimate gas: execution reverted (0xb59f753a),
…
00000000000000000000000000000000000000000000000000000000000144292387ad488429a3f2d96b8d53ed250dd077235000000000000000000000000%!(EXTRA string=
/src/log/log.go:142 github.com/0xPolygonHermez/zkevm-sequence-sender/log.appendStackTraceMaybeArgs()
/src/log/log.go:251 github.com/0xPolygonHermez/zkevm-sequence-sender/log.Errorf()
/src/sequencesender/sequencesender.go:588 github.com/0xPolygonHermez/zkevm-sequence-sender/sequencesender.(*SequenceSender).sendTx()
/src/sequencesender/sequencesender.go:545 github.com/0xPolygonHermez/zkevm-sequence-sender/sequencesender.(*SequenceSender).tryToSendSequence()
/src/sequencesender/sequencesender.go:194 github.com/0xPolygonHermez/zkevm-sequence-sender/sequencesender.(*SequenceSender).sequenceSending()
)   {"pid": 1, "version": "v0.2.0-RC5"}
github.com/0xPolygonHermez/zkevm-sequence-sender/sequencesender.(*SequenceSender).sendTx
    /src/sequencesender/sequencesender.go:588
github.com/0xPolygonHermez/zkevm-sequence-sender/sequencesender.(*SequenceSender).tryToSendSequence
    /src/sequencesender/sequencesender.go:545
github.com/0xPolygonHermez/zkevm-sequence-sender/sequencesender.(*SequenceSender).sequenceSending
    /src/sequencesender/sequencesender.go:194
2024-08-16T16:57:27.339Z    INFO    sequencesender/sequencesender.go:1010   [SeqSender] .....new L2 block, number 6670 (batch 2763) {"pid": 1, "version": "v0.2.0-RC5"}

This revert reason seems like ExceedMaxVerifyBatches — which comes from here: https://github.com/0xPolygonHermez/zkevm-contracts/blob/a5eacc6e51d7456c12efcabdfc1c37457f2219b2/contracts/PolygonZkEVM.sol#L1079

mandrigin commented 2 months ago

Full log alloc_logs_sequence-sender.stderr.336.txt

mandrigin commented 2 months ago
image
mandrigin commented 2 months ago

On restart it sends one tx (tiny sequence, like two batches), and then fails with the same error again.

mandrigin commented 2 months ago

okay, fixed by providing a param to liming batches in tx