Skip to content
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

Apply Finality to blocks prior to L1 Finality Singal #13708

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

axelKingsley
Copy link
Contributor

@axelKingsley axelKingsley commented Jan 10, 2025

When L1 processing on a node lags far behind the L1 processing of the Supervisor, the L1 Finality signal (which we only store the latest of) can't be used to determine L2 finality.

To fix that -- if the L1 finality signal is more recent than the L1 block the node is currently using, we can just deduce that the L2 blocks being derived currently are already finalized. This PR updates the Finalized function of ChainsDB to make such a determination.

Testing

This issue was diagnosed via a local Kurtosis Devnet, where L2 finality was updating for a while, but stopped and never came back.

This is manually tested by observing a Kurtosis Devnet on this branch, which updates the Finalized L2 consistently.

Copy link

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.54%. Comparing base (7964731) to head (0afd47b).
Report is 13 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #13708       +/-   ##
============================================
+ Coverage    47.37%   78.54%   +31.17%     
============================================
  Files          953      166      -787     
  Lines        79730     9361    -70369     
  Branches       766      766               
============================================
- Hits         37771     7353    -30418     
+ Misses       39067     1752    -37315     
+ Partials      2892      256     -2636     
Flag Coverage Δ
cannon-go-tests-32 62.26% <ø> (-1.98%) ⬇️
cannon-go-tests-64 57.35% <ø> (-1.62%) ⬇️
contracts-bedrock-tests 90.49% <ø> (-0.16%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 801 files with indirect coverage changes

@axelKingsley axelKingsley marked this pull request as ready for review January 10, 2025 23:25
@axelKingsley axelKingsley requested review from a team as code owners January 10, 2025 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant