-
Notifications
You must be signed in to change notification settings - Fork 5
add e2e test follows_most_recent_chain #256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…follower node and add a bunch of convenience methods
|
@jonastheis is this still relevant? |
|
closing as stale |
|
I do believe this is still relevant and we should add an e2e test that asserts our fork-choice rule |
|
We have the following. Can you review if we need to add some more please? rollup-node/crates/node/tests/sync.rs Lines 541 to 599 in f0c0fe7
|
|
I think one case that is missing: the block of the new canonical chain at fork height is older than the block in the new fork at the same height. however, the canonical chain is still the former (and has newer timestamps in the future). |
|
I've tried to illustrate my interpretation of this case in the diagram below. Are you saying that for block n+1 the fork has a newer block, but for block n+2 the canonical chain has a newer block? block number described by graph LR
subgraph Canonical Chain
A["Block n-2<br/>t<sub>n-2</sub>"]
B["Block n-1<br/>t<sub>n-1</sub>"]
C["Block n<br/>t<sub>n</sub>"]
D["Block n+1<br/>t<sub>n+1</sub>"]
E["Block n+2<br/>t<sub>n+4</sub>"]
A --> B --> C --> D --> E
end
subgraph Fork
F["Block n+1<br/>t<sub>n+2</sub>"]
G["Block n+2<br/>t<sub>n+3</sub>"]
C --> F --> G
end
|
|
Yeah exactly. It was one of the cases that I encountered when switching between l2geth sequencer and l2reth sequencer but could happen in practice as well |
Got it, so the expected behaviour is that initially the follower would follow the fork at block n+1 and then after it received block n+2 it would follow the canonical chain? |
|
Yep |
I'm just trying to understand how this could occur in practice? |
No description provided.