RpcBackend and RpcMode refactor - #2442
Merged
Merged
Conversation
sergerad
marked this pull request as ready for review
August 6, 2026 00:19
sergerad
force-pushed
the
sergerad-apply-block-priority
branch
from
August 6, 2026 01:48
2d151a9 to
1db4774
Compare
sergerad
force-pushed
the
sergerad-sync-writers-enum
branch
from
August 6, 2026 01:48
68b7bc0 to
bfc52d1
Compare
Mirko-von-Leipzig
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, but I don't love the name
Mirko-von-Leipzig
approved these changes
Aug 6, 2026
sergerad
force-pushed
the
sergerad-apply-block-priority
branch
from
August 6, 2026 08:34
1db4774 to
629fe53
Compare
sergerad
force-pushed
the
sergerad-sync-writers-enum
branch
from
August 6, 2026 08:34
a1f1a75 to
8c5a62f
Compare
sergerad
force-pushed
the
sergerad-apply-block-priority
branch
from
August 6, 2026 08:55
629fe53 to
6d7e6fb
Compare
sergerad
force-pushed
the
sergerad-sync-writers-enum
branch
from
August 6, 2026 08:55
8c5a62f to
c3a30a2
Compare
kkovaacs
approved these changes
Aug 6, 2026
kkovaacs
left a comment
Collaborator
There was a problem hiding this comment.
Looks good to me, thanks!
sergerad
force-pushed
the
sergerad-apply-block-priority
branch
from
August 6, 2026 18:01
6d7e6fb to
cd96b15
Compare
sergerad
force-pushed
the
sergerad-sync-writers-enum
branch
from
August 6, 2026 18:01
c3a30a2 to
6e8b907
Compare
sergerad
force-pushed
the
sergerad-sync-writers-enum
branch
from
August 7, 2026 00:03
6e8b907 to
0ba2579
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #2428.
RpcMode(crates/rpc/src/server/mod.rs) is now the non-Clonestartup-time enum —FullNodecarriesblock_writer/proof_writerdirectly, sosync_writers: Option<(BlockWriter, ProofWriter)>is gone fromRpcentirely (no more runtime.context()error for a missing writer pair in full-node mode — it's now a compile-time requirement).RpcBackendis the newpub(crate),Clone-able per-request subset (RpcService's field), built fromRpcMode::backend()by cloning only the individually-Clonefields.RpcMode::full_node()now takesblock_writer/proof_writer;RpcBackend's own constructors are#[cfg(test)]-gated since production only builds it via.backend().Rpc::spawn_full_node_syncout ofserve()to keep it under clippy's line-count lint after the match arm grew.submit_proven_tx(_batch),get_transaction_encryption_key,get_network_note_status,status) to match onRpcBackendinstead ofRpcMode, and fixed all call sites inbin/node/src/commands/modes.rsandcrates/rpc/src/tests.rs.Changelog