Skip to content

fix(sequencer): allow blocksync to complete successfully - #675

Merged
joroshiba merged 15 commits into
mainfrom
joroshiba/blocksync-fix
Jan 10, 2024
Merged

joroshiba merged 15 commits into
mainfrom
joroshiba/blocksync-fix

Conversation

@joroshiba

@joroshiba joroshiba commented Jan 4, 2024 •

Copy link
Copy Markdown
Member

Summary

Allows deliver_tx to execute txs when the full block has not previously been executed during a proposal

Background

During blocksync proposals are not received and txs will not have already been executed. We need to allow for a node to have either missed the proposal, and still execute the block or in basic operation sync.

Changes

  • tracks the hash executed during proposal phase.
  • allows txs to execute if begin block doesn't match tracked hash, uses cache otherwise

@github-actions github-actions Bot added the sequencer pertaining to the astria-sequencer crate label Jan 4, 2024
@joroshiba
joroshiba marked this pull request as ready for review January 6, 2024 01:33
Base automatically changed from noot/sequencer-state to main January 8, 2024 16:04

@SuperFluffy SuperFluffy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some suggestions for code cleanup

Comment thread crates/astria-sequencer/src/app.rs Resolved
Comment thread crates/astria-sequencer/src/app.rs Resolved
Comment thread crates/astria-sequencer/src/app.rs Resolved
Comment thread crates/astria-sequencer/src/app.rs Resolved
Comment thread crates/astria-sequencer/src/app.rs Resolved
Comment thread crates/astria-sequencer/src/app.rs Resolved

@noot noot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

approving since there are only minor comments!

@joroshiba
joroshiba force-pushed the joroshiba/blocksync-fix branch from 60e1bb5 to 1995d9c Compare January 9, 2024 19:33
Self {
state,
is_proposer: false,
executed_proposal_hash: Hash::default(),

@noot noot Jan 10, 2024 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this the zero hash? or None?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It is None, and it is also empty

Comment thread crates/astria-sequencer/src/app.rs Resolved
Comment thread crates/astria-sequencer/src/app.rs Resolved
Comment thread crates/astria-sequencer/src/app.rs Resolved
Comment thread crates/astria-sequencer/src/app.rs Resolved

@noot noot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice, i think the logic looks good, only smaller comments!

@joroshiba
joroshiba merged commit 252119d into main Jan 10, 2024
@joroshiba
joroshiba deleted the joroshiba/blocksync-fix branch January 10, 2024 16:57
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.

3 participants