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

Sync beacon execution update on demand #1140

Closed
wants to merge 82 commits into from

Conversation

yrong
Copy link
Contributor

@yrong yrong commented Feb 6, 2024

Resolves: SNO-805,SNO-428
Addressing: paritytech/polkadot-sdk#2522 (comment)

It depends on EIP-4788 which requires Dencun to be activated first so mark it as do-not-merge.

@@ -330,32 +325,11 @@ pub mod pallet {
}

pub(crate) fn process_update(update: &Update) -> DispatchResult {
Self::cross_check_execution_state()?;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the cross_check we don't need it any more.

Comment on lines -551 to -559
// Checks that we don't skip execution headers, they need to be imported sequentially.
let latest_execution_state: ExecutionHeaderState = Self::latest_execution_state();
ensure!(
latest_execution_state.block_number == 0 ||
update.execution_header.block_number() ==
latest_execution_state.block_number + 1,
Error::<T>::ExecutionHeaderSkippedBlock
);

Copy link
Contributor Author

@yrong yrong Feb 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the consecutive check we don't need it any more.

Copy link

codecov bot commented Feb 6, 2024

Codecov Report

Attention: 22 lines in your changes are missing coverage. Please review.

Comparison is base (ec6efea) 49.66% compared to head (7b5e1e3) 72.17%.
Report is 3 commits behind head on main.

Files Patch % Lines
parachain/pallets/ethereum-client/src/lib.rs 31.03% 20 Missing ⚠️
parachain/primitives/beacon/src/types.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1140       +/-   ##
===========================================
+ Coverage   49.66%   72.17%   +22.51%     
===========================================
  Files          63       57        -6     
  Lines        3707     2523     -1184     
  Branches       72       72               
===========================================
- Hits         1841     1821       -20     
+ Misses       1849      685     -1164     
  Partials       17       17               
Flag Coverage Δ
rust 70.61% <29.03%> (+24.63%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yrong yrong closed this Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants