Remove Distributor from RPC service#41
Merged
ordishs merged 18 commits intoOct 29, 2025
Merged
Conversation
Changes sendrawtransaction RPC handler to return transaction ID as a string instead of ResponseWrapper array. Adds synchronous validation by calling validator service directly before returning, ensuring invalid transactions are rejected immediately per Bitcoin RPC spec.
This updates the RPC service to use the propagation service client directly instead of going through the Distributor, addressing issue bsv-blockchain#33. Changes: - Extract propagation.Client interface for testability - Update RPC Server to accept propagation client - Modify sendrawtransaction handler to use propagation client - Update all RPC tests to work with new propagation client mock This takes direction from issue bsv-blockchain#22 but does not fully implement it yet. Fixes bsv-blockchain#33
…tion The RPC service now creates its own propagation client internally, so it no longer needs txStore and validatorClient passed in from daemon.
The RPC service now uses the propagation client directly for transaction submission. The Distributor component is no longer needed and has been removed along with its tests and configuration settings. Changes: - Delete Distributor.go and all Distributor tests - Remove Distributor from test daemon setup - Remove Distributor-related settings (DistributorTimeout, DistributorFailureTolerance) - Update all test files to use propagation client directly - Update PlantUML diagrams to reflect new architecture Addresses bsv-blockchain#22
ordishs
approved these changes
Oct 29, 2025
Contributor
|
🤖 Claude Code Review Status: Complete Summary: This PR successfully removes the Distributor component (~1,500 lines) and simplifies transaction submission by using the propagation client directly. The changes are clean and well-structured. Findings: No issues found. The architectural simplification is sound:
The new |
|
3 tasks
4 tasks
oskarszoon
added a commit
to oskarszoon/teranode
that referenced
this pull request
May 11, 2026
Drop the dangling reference to the regression test (removed in the previous commit) and the overspecified production-tx details. Keep the two pieces of information a future bumper actually needs: which BDK PR landed the hot-fix, and the constraint that v1.2.4 should not be adopted until bitcoin-sv/bdk PR bsv-blockchain#41 has merged.
oskarszoon
added a commit
that referenced
this pull request
May 11, 2026
…he (#842) Pins github.com/bitcoin-sv/bdk/module/gobdk to a pseudo-version of the hot-fix on top of v1.2.3 (bitcoin-sv/bdk PR #40) that adds a per-instance CachingScriptChecker overriding CheckSig to short-circuit identical signature verifications within one EvalScript run. Without the hot-fix the validator stalls for hours on testnet block 1,451,505 / tx 7bc9a3408dd0c87b835c887a0bce22c20788fc3c4b953929d4367656d80acab5, whose 490 KB locking script performs 245,001 identical ECDSA verifications. The cgo entry point is uninterruptible from Go so it presents to operators as a hang in _Cfunc_ScriptEngine_VerifyScript. With the hot-fix the verifier completes in ~70 s. Do not bump gobdk to v1.2.4 (or later) until bitcoin-sv/bdk PR #41 — the master/v1.2.4 port of the same hot-fix — has been merged.
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.




I may have gotten a little ambitious with this one, but I was already largely there with #35, and my AI already had all the context. Abstraction of the distributor has been implemented here, and I'm happy to transfer the repo if you want it: https://github.com/shruggr/teranode-tx-distributor
Summary
Complete removal of the Distributor component from the RPC service. The RPC service now uses the propagation client directly for transaction submission.
The Distributor has been extracted to a separate repository for continued development: https://github.com/shruggr/teranode-tx-distributor
Changes
Related Issues
Addresses #22
Dependencies
Builds on #33 which introduced the propagation client usage in RPC.