feat(rpc): forward tx and batches submissions in full node mode#2139
Merged
Conversation
This was referenced May 26, 2026
SantiagoPittella
approved these changes
May 26, 2026
Collaborator
SantiagoPittella
left a comment
There was a problem hiding this comment.
Looks good, should the RpcMode be added to the status response?
Comment on lines
+561
to
+570
| // In full node mode we forward the request to the source. | ||
| let (block_producer, validator) = match &self.mode { | ||
| RpcMode::Sequencer { block_producer, validator } => { | ||
| (block_producer.as_ref(), validator.as_ref()) | ||
| }, | ||
| RpcMode::FullNode { source_rpc } => { | ||
| return source_rpc.as_ref().clone().submit_proven_tx_batch(request).await; | ||
| }, | ||
| }; | ||
|
|
Collaborator
There was a problem hiding this comment.
I guess it is ok, but in this method we are going to validate the proof twice
Collaborator
Author
There was a problem hiding this comment.
Verification is (relatively) cheap.
In the future we can optimise this by having an internal trusted service which allows skipping these.
Collaborator
Author
tbh I'm unsure what this should look like going forward. In the official networks we would hit a random full node, and never the sequencer.. so we may need to rethink what these are for. |
5c8de13 to
e02d619
Compare
02a38b9 to
eef31f9
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.
This PR differentiates transaction and batch submissions in the RPC layer by the node's mode.
In sequencer mode, it processes as per normal and forwards to the block producer. In full-node mode, it no longer pushes to the validator and instead delegates that to the upstream sync url.
This allows external full node's to still handle submissions because they won't have access to the validator. In the future we will expand the full node to differentiate between internal (trusted) and external (untrusted) nodes but for now we only implement the untrusted variant (no validator).
This PR prepares us for removing the store and block-producer gRPC services by making the boundaries more clear.
Stacks on #2138.
Closes #2089