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

Get recent committed & rolled back blocks from the state service #2639

Closed
Tracked by #2309
teor2345 opened this issue Aug 17, 2021 · 2 comments · Fixed by #2721
Closed
Tracked by #2309

Get recent committed & rolled back blocks from the state service #2639

teor2345 opened this issue Aug 17, 2021 · 2 comments · Fixed by #2721
Assignees
Labels
A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement

Comments

@teor2345
Copy link
Contributor

teor2345 commented Aug 17, 2021

Motivation

Cancel Committed Transactions

We need to get a list of recently committed transaction IDs from the state service, so we can:

Resets

Resets are rare, so we can just clear the mempool when they happen.

Here are some different reset reasons:

Consensus rules

Network upgrades: stop mempool downloads and verifies, and clear storage and rejections

Chain rollbacks: stop rejecting transactions which spend rolled back inputs, by clearing our entire reject list

Zebra-specific

Initializing or cloning the receiver:

  • we know we're not up to date

Skipped updates:

  • we know we're lagging behind,
  • we just received a large number of blocks,
  • we had a chain fork change (rollback), or
  • we might have skipped a network upgrade activation block, or a rollback or roll-forward over a network upgrade activation block.

Block Broadcasts

We need to get a list of recently committed block hashes from the state service, so we can:

Out of Scope

Mempool activation and deactivation should be handled by SyncStatus:

  • disable mempool: if the syncer starts syncing a lot of blocks, stop mempool downloads and verifies, and clear storage and rejections
  • re-enable mempool: maybe we want a reset here too, depending on how we disable the mempool
@teor2345 teor2345 mentioned this issue Aug 17, 2021
59 tasks
@teor2345 teor2345 self-assigned this Aug 17, 2021
@teor2345 teor2345 added A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement labels Aug 17, 2021
@teor2345 teor2345 added this to the 2021 Sprint 16 milestone Aug 17, 2021
@teor2345 teor2345 changed the title Get recent committed and rolled back blocks out of the state service Get recent committed and rolled back transactions out of the state service Aug 17, 2021
@teor2345 teor2345 changed the title Get recent committed and rolled back transactions out of the state service Get recent committed and rolled back transaction IDs from the state service Aug 17, 2021
@teor2345

This comment has been minimized.

@teor2345 teor2345 changed the title Get recent committed and rolled back transaction IDs from the state service Get recent committed and rolled back spends & nullifiers from the state service Aug 19, 2021
@teor2345 teor2345 changed the title Get recent committed and rolled back spends & nullifiers from the state service Get committed & rolled back block info from the state service Aug 19, 2021
@teor2345 teor2345 changed the title Get committed & rolled back block info from the state service Get recent committed & rolled back transactions from the state service Aug 19, 2021
@teor2345 teor2345 changed the title Get recent committed & rolled back transactions from the state service Get recent committed & rolled back blocks from the state service Aug 19, 2021
@teor2345
Copy link
Contributor Author

I moved nullifiers and outputs to #2631.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants