0xPolygonHermez / zkevm-node

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

synchronizer: double-check old L1 block to detect reorgs #3540

Closed joanestebanr closed 7 months ago

joanestebanr commented 7 months ago

Rationale

Synchronizer is going to check in background the L1block after the block has been consolidated by ethereum.

You can choose what do you consider 'consolidated' (the safety level):

Implementation

There are 2 goruintes that are checking in background blocks:

So you can configure next scenario:

Configuration

    [Synchronizer.L1BlockCheck]
        Enable = true
        L1SafeBlockPoint = "finalized"
        L1SafeBlockOffset = 0
        ForceCheckBeforeStart = true
        PreCheckEnable = true
        L1PreSafeBlockPoint = "latest"
        L1PreSafeBlockOffset = -32