Skip to content

refactor(store): move sync and proving to block producer#2155

Merged
Mirko-von-Leipzig merged 9 commits into
nextfrom
mirko/move-sync
May 30, 2026
Merged

refactor(store): move sync and proving to block producer#2155
Mirko-von-Leipzig merged 9 commits into
nextfrom
mirko/move-sync

Conversation

@Mirko-von-Leipzig
Copy link
Copy Markdown
Collaborator

@Mirko-von-Leipzig Mirko-von-Leipzig commented May 28, 2026

This PR moves the replica sync and proof scheduling to the block-producer.

This leaves store as 99% State management, with no spawned tasks outside of the disk monitor which will be invoked manually by the CLI.

I've also added a name-task JoinSet wrapper for supervising tasks - this is fairly common across the code base.

I elected to this now because I found it made wiring up the CLI much easier since the store no longer has spawned tasks internally.

@Mirko-von-Leipzig Mirko-von-Leipzig added the no changelog This PR does not require an entry in the `CHANGELOG.md` file label May 28, 2026
max_txs_per_batch: self.block_producer.batch.max_txs,
max_batches_per_block: self.block_producer.block.max_batches,
max_concurrent_proofs: self.block_producer.block.max_concurrent_proofs,
mempool_tx_capacity: self.block_producer.mempool.tx_capacity,
Copy link
Copy Markdown
Collaborator

@sergerad sergerad May 29, 2026

Choose a reason for hiding this comment

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

nit: Maybe the self.block_producer and Sequencer could use the same struct for these shared fields?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'm not quite sure how, unless you mean the block producer should own the clap representation directly?

I'd prefer not to do that since how we organise the CLI isn't necessarily how things work in the block producer, so I don't want to couple them.

Or put differently, ideally we would keep the code type separate from the interface boundary, in this case the CLI API.

Comment thread bin/node/src/commands/modes.rs Outdated
Comment thread bin/node/src/commands/modes.rs Outdated
Comment thread crates/block-producer/src/server/mod.rs
Comment thread crates/block-producer/src/server/mod.rs Outdated
Comment thread crates/block-producer/src/rpc_sync.rs Outdated
Copy link
Copy Markdown
Collaborator

@sergerad sergerad left a comment

Choose a reason for hiding this comment

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

LGTM just a nit and some dedupe we should be able to do in the comments.

Comment thread crates/block-producer/src/proof_scheduler.rs
Comment thread crates/block-producer/src/rpc_sync.rs Outdated
@Mirko-von-Leipzig Mirko-von-Leipzig enabled auto-merge (squash) May 30, 2026 07:08
@Mirko-von-Leipzig Mirko-von-Leipzig merged commit f91604a into next May 30, 2026
20 checks passed
@Mirko-von-Leipzig Mirko-von-Leipzig deleted the mirko/move-sync branch May 30, 2026 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog This PR does not require an entry in the `CHANGELOG.md` file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants