• Joshua Gutow's avatar
    op-node: Prefer following seq drift instead of conf depth (#3861) · 9940c8cd
    Joshua Gutow authored
    * op-node: Prefer following seq drift instead of conf depth
    
    We found a log on a testnet where a batch was rejected because it's
    timestamp was greater than the origin timestamp + sequencer drift.
    I looked into origin selection and determined we produce empty blocks
    if the block time is ahead of the origin + seq drift; however if there
    is a next origin, it is not enough to produce an empty block, we must
    change the origin.
    
    I hypothesize that this occurred because the L1 head that the node was
    looking at was lagging. That would cause the node to keep using an
    old origin even if the timestamp was past the max drift. I added
    a unit test which shows this case & would fail without this fix
    being applied.
    
    * op-node: Don't immediately attempt to advance origin
    
    If the current origin is past the sequencer drift, it needs to
    ignore the conf depth staying, but does still need to check next
    L2 block time against the next origin time.
    
    I've also added a test for this case.
    9940c8cd
Name
Last commit
Last update
..
client Loading commit data...
cmd Loading commit data...
eth Loading commit data...
flags Loading commit data...
heartbeat Loading commit data...
metrics Loading commit data...
node Loading commit data...
p2p Loading commit data...
rollup Loading commit data...
sources Loading commit data...
testlog Loading commit data...
testutils Loading commit data...
version Loading commit data...
withdrawals Loading commit data...
.gitignore Loading commit data...
Dockerfile Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
docker.go.work Loading commit data...
go.mod Loading commit data...
go.sum Loading commit data...
service.go Loading commit data...