-
Notifications
You must be signed in to change notification settings - Fork 56
feat: tx client v2 #873
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
Merged
Merged
feat: tx client v2 #873
Conversation
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
zvolin
reviewed
Jan 19, 2026
zvolin
reviewed
Jan 21, 2026
# Conflicts: # Cargo.lock # grpc/Cargo.toml
Open
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.
Overview
This note summarizes the logic implemented in
grpc/src/tx_client_v2.rsandgrpc/src/tx_client_impl.rs.This is very roughly made according to the spec (with main ideas):
https://github.com/celestiaorg/celestia-app/blob/main/specs/src/tx_client_v2.md
tx_client_v2.rs
(
TransactionManager) and a background worker (TransactionWorker).TransactionManager::add_txserializes sequence reservation, signs therequest via a
SignFn, attaches one-shot callbacks, and enqueues the signedtransaction.
TransactionWorkermaintains an ordered queue, tracks per-node submissionstate, and drives the lifecycle with a single event loop:
status_batch) on a timer.TransactionEventresults to resolve submit/confirm callbacks.expected sequence.
when all prior sequences are confirmed.
tx_client_impl.rs
GrpcSignContextfetches account/chain state and gas estimates.SignFnBuilderbuilds aSignFn<Hash, TxInfo>that creates signed tx bytesfrom
TxRequestandTxConfig.TxServer for GrpcClientwiressubmitandstatus_batchto gRPC calls andmaps failures into v2 error types.
TransactionServicewhich hides the worker plumbing:TransactionWorkerusing the client signer and current sequence.submit(TxRequest, TxConfig) -> TxHandle<Hash, TxInfo>.recreate_worker()to rebuild the worker and manager if needed.