Skip to content

feat(rpc): implement sendTransaction#1328

Merged
prestonsn merged 63 commits intomainfrom
adamw/implement-sendTransaction-in-rpc
Apr 3, 2026
Merged

feat(rpc): implement sendTransaction#1328
prestonsn merged 63 commits intomainfrom
adamw/implement-sendTransaction-in-rpc

Conversation

@ajw221
Copy link
Copy Markdown
Contributor

@ajw221 ajw221 commented Mar 17, 2026

Intent

  • Implement sendTransaction RPC method

Implementation

  • Added SendTransactionHookContext for sendTransaction and not yet implemented simulateTransaction
  • Threaded TransactionSender through SendTransactionHookContext

Ramifications

  • The simulateTransaction portion of sendTransaction is being left unimplemented until simulateTransaction is ready to be implemented.

Tests

  • Added sendTransaction tests to test_serialize.zig
  • Successfully sent a transaction and verified its landing on testnet using getSignatureStatuses

yewman and others added 10 commits March 17, 2026 04:50
- destroy conns on deinit
- basic connection eviction
- pass ptr to empty slice instead of null in lsquic_engine_connect
- update peer address on packet ingestion
- destroy conns on deinit
- basic connection eviction
- pass ptr to empty slice instead of null in lsquic_engine_connect
- update peer address on packet ingestion
- Add SendTransaction hook context with decode, deserialize, and sanitize logic
- Expose TransactionSender type alias and initWithWire constructor
- Add getBlockhashLastValidBlockHeight to SlotTracker
- Make getDurableNonce public for use in preflight checks
- Move MAX_INSTRUCTION_TRACE_LENGTH to transaction_context module
- Add decodeAndDeserialize tests for base64/base58 encoding and error cases
- Add sendTransactionImpl tests for channel dispatch and durable nonce
- Add SlotTracker getBlockhashLastValidBlockHeight tests
- Add TransactionInfo.initWithWire unit tests
- Add SendTransaction serialization and resolveEncoding tests
- Make transaction_legacy_example fields public for test access
@ajw221 ajw221 self-assigned this Mar 17, 2026
@github-project-automation github-project-automation Bot moved this to 🏗 In progress in Sig Mar 17, 2026
@ajw221 ajw221 changed the base branch from main to harnew/quic-txn-sender March 17, 2026 19:22
@yewman yewman force-pushed the harnew/quic-txn-sender branch 4 times, most recently from 0a501f9 to bf0b1ca Compare March 17, 2026 21:33
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 17, 2026

Codecov Report

❌ Patch coverage is 97.28507% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/rpc/hook_contexts/SendTransaction.zig 97.27% 4 Missing ⚠️
src/rpc/hook_contexts/Consensus.zig 83.33% 1 Missing ⚠️
src/transaction_sender/MockTransferService.zig 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/core/blockhash_queue.zig 100.00% <100.00%> (ø)
src/core/transaction.zig 93.59% <ø> (ø)
src/rpc/methods.zig 82.83% <100.00%> (+0.11%) ⬆️
src/rpc/test_serialize.zig 100.00% <100.00%> (ø)
src/runtime/borrowed_account.zig 87.50% <ø> (ø)
src/runtime/check_transactions.zig 94.88% <100.00%> (+0.31%) ⬆️
src/transaction_sender/Service.zig 87.18% <100.00%> (+0.91%) ⬆️
src/rpc/hook_contexts/Consensus.zig 65.44% <83.33%> (-0.36%) ⬇️
src/transaction_sender/MockTransferService.zig 0.00% <0.00%> (ø)
src/rpc/hook_contexts/SendTransaction.zig 97.27% <97.27%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yewman yewman force-pushed the harnew/quic-txn-sender branch 2 times, most recently from 8f21ee2 to fd9175d Compare March 18, 2026 03:50
yewman and others added 5 commits March 18, 2026 14:50
…connection pool and metrics

- Replace the comptime-parameterized generic Client with a heap-allocated QuicClient that owns all resources (socket, SSL context, lsquic engine, connection pool, receiver channel).
- Use fixed-size connection pool with slot reuse via idle timeout
- Improve error handling in packetsOut and stream writes (partial write support)
- Improve documentation
- Add prometheus metric
- Move timing metrics into receiveTransactions and processTransactions via defer blocks
- Make metrics logging interval configurable via log_metrics_interval config option
- Add doc comments to receiveTransactions and processTransactions.
- Fix test cleanup ordering with proper defer statements and increase test timeout.
@prestonsn prestonsn self-requested a review April 1, 2026 15:40
dnut and others added 2 commits April 1, 2026 11:44
Copy link
Copy Markdown
Contributor

@prestonsn prestonsn left a comment

Choose a reason for hiding this comment

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

Looks good, just some stuff

Comment thread src/core/blockhash_queue.zig
Comment thread src/rpc/hook_contexts/SendTransaction.zig
Comment thread src/rpc/hook_contexts/SendTransaction.zig Outdated
Comment thread src/rpc/hook_contexts/SendTransaction.zig
Comment thread src/rpc/hook_contexts/SendTransaction.zig Outdated
Comment thread src/rpc/hook_contexts/SendTransaction.zig
Comment thread src/replay/trackers.zig Outdated
yewman and others added 4 commits April 1, 2026 22:51
Comment thread src/rpc/hook_contexts/SendTransaction.zig Outdated
Comment thread src/rpc/hook_contexts/SendTransaction.zig Outdated
@github-project-automation github-project-automation Bot moved this from 🏗 In progress to 👀 In review in Sig Apr 2, 2026
prestonsn
prestonsn previously approved these changes Apr 2, 2026
@prestonsn prestonsn enabled auto-merge April 2, 2026 15:29
@prestonsn prestonsn added this pull request to the merge queue Apr 3, 2026
Merged via the queue into main with commit 120fd46 Apr 3, 2026
13 checks passed
@prestonsn prestonsn deleted the adamw/implement-sendTransaction-in-rpc branch April 3, 2026 17:24
@github-project-automation github-project-automation Bot moved this from 👀 In review to ✅ Done in Sig Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

4 participants