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

chore(sequencer)!: put blocks and deposits to non-verified storage (ENG-812) #1525

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Fraser999
Copy link
Contributor

@Fraser999 Fraser999 commented Sep 19, 2024

Summary

This changes where sequencer blocks and the TracePrefixed native asset are stored, and also persists Deposits to non-verifiable storage.

Background

Sequencer blocks are currently written to verified storage, which is unnecessary as all of their constituent data is already available there.

We want to avoid the cost of storing full blocks in verified storage, but still have the ability to provide a third party with a full block if requested. To further assist with this, deposits will also be written to non-verified storage.

It also seemed appropriate to store the TracePrefixed native asset in verified storage, since this is something which all validators should reach consensus over.

Changes

  • SequencerBlocks are now stored in non-verifiable storage.
  • Deposits are now stored in non-verifiable storage.
  • The native asset is now stored in verifiable storage.

Testing

Existing unit tests have been updated as required to assert these changes.

Breaking Changelist

  • The set of data being written to verified storage has changed, which is a breaking change in terms of on-disk data and generation of state root hashes. Otherwise no APIs have changed.

Related Issues

Closes #1493.

@github-actions github-actions bot added the sequencer pertaining to the astria-sequencer crate label Sep 19, 2024
@Fraser999 Fraser999 changed the title chore(sequencer)!: put blocks and deposits to non-verified storage chore(sequencer)!: put blocks and deposits to non-verified storage (ENG-812) Sep 20, 2024
@@ -361,10 +358,6 @@ async fn app_create_sequencer_block_with_sequenced_data_and_deposits() {
.unwrap();
app.commit(storage).await;

// ensure deposits are cleared at the end of the block
Copy link
Collaborator

Choose a reason for hiding this comment

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

ensure the deposit nonce is cleared still?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sequencer pertaining to the astria-sequencer crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check verifiable storage usage
2 participants