feat: accept slipstream txs on the block template server - #642
Draft
rsantacroce wants to merge 1 commit into
Draft
rsantacroce wants to merge 1 commit into
rsantacroce wants to merge 1 commit into
Conversation
`--enable-slipstream` (requires `--enable-block-template-server`) turns on cusf-enforcer-mempool's slipstream: `submitslipstreamtx` adds a tx straight to the template mempool, without relaying it or handing it to the node's mempool. The node checks it for consensus validity first, and the enforcer's own `accept_tx` still applies, so a BIP300 deposit that skips the sidechain's CTIP is refused even though the node would take it. This is what lets a pool mine BIP300/301 txs the network will not relay, without the enforcer's wallet broadcasting them. `GbtSlot` implements `RpcServer` itself, so it delegates the four new methods, and answers them like `getblocktemplate` until the mempool is synced. The mempool dependency points at the slipstream branch until LayerTwo-Labs/cusf-enforcer-mempool#130 is merged.
This was referenced Sep 25, 2026
Draft
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.
What
Adds
--enable-slipstream, which requires--enable-block-template-server. It turns on slipstream from LayerTwo-Labs/cusf-enforcer-mempool#130.With it on,
submitslipstreamtxon--serve-rpc-addradds a tx straight to the template mempool. The tx is never relayed and never handed to the node's mempool. It then competes for inclusion in served templates by fee rate. The companion RPCs aregetslipstreamtx,listslipstreamtxsandremoveslipstreamtx. See #130 for how the mempool keeps these txs valid through conflicts, evictions and reorgs.Why
A pool running the enforcer can then mine BIP300/301 txs the network will not relay (deposits, withdrawal bundles, BMM requests), or any other consensus-valid tx, without the enforcer's wallet broadcasting them. The first user is simplepool's slipstream service.
Rules still apply
Before accepting a tx, the node checks it for consensus validity with a block proposal. The enforcer's own
accept_txthen runs as usual, so a deposit that skips the sidechain's CTIP is refused (rejected-by-enforcer) even though the node would accept it.Changes
lib/cli.rs: adds--enable-slipstream. Its help text warns that the template server has no authentication.app/main.rs:GbtSlotimplementsRpcServeritself, so it delegates the four new methods. Until the mempool is synced they return the same-10error asgetblocktemplate.build_block_template_servercallsServer::with_slipstreamwhen the flag is set.Cargo.toml: thecusf-enforcer-mempooldependency points at the dev: add signet mining deps to docker image #130 branch on a fork. It must go back toLayerTwo-Labs/cusf-enforcer-mempoolonce dev: add signet mining deps to docker image #130 merges, which is why this is a draft.185e439: proposal mode, block-connect/disconnect rejection fixes, and the ZMQ sequence fix. No other code changes were needed for them.Testing
slipstream_deposit(regtest, GetBlockTemplate mode,--enable-slipstream):submitslipstreamtx. It reaches the block template, never enters the node's mempool, is mined, and becomes the sidechain's CTIP.getslipstreamtxreports it asmined.rejected-by-enforcer.bitcoin-patched-latest: 41 passed, 0 failed.cargo +nightly fmt --all -- --checkandcargo clippy --workspace --all-targets -- -D warningsare clean. Unit tests pass.