Skip to content

Reimplement private broadcast as node state-less jobs + package relay support - #36608

Closed
instagibbs wants to merge 35 commits into
bitcoin:masterfrom
instagibbs:privbcast-4-package
Closed

instagibbs wants to merge 35 commits into
bitcoin:masterfrom
instagibbs:privbcast-4-package

Conversation

@instagibbs

@instagibbs instagibbs commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Goals

Goal 1: Remove reliance on, and probes about, internal node state from private broadcast

Goal 2: Specify observable behavior to aid reimplementation and reduce profile fingerprints across versions

Layout

Four parts, each starting with an empty marker commit:

  1. support: moves shared code into the common library; no behavior change
  2. bitcoin-privbcast: the specification and the standalone tool
  3. bitcoind -privatebroadcast as jobs: the node runs the tool's job; the old relay and connections are removed
  4. package mode: one parent and its child. Its validation commits (saturating fee sum, test-accept as submission, self-paying parent) serve only this part.

For the v33 release, I think 1 through 3 should be the goal, but the roadmap could be trimmed down to remove tool-only code if the conceptual support for the standalone tool is not there.

The tool itself introduces about 600 loc of logic, and also necessitates some of the prep move-only commits putting things in common. The vast majority is the shared Job machinery.

Node-less state

The primary failure mode of the in-master private broadcast is that it relies on node state for operation, and this has led to a number of "careful coding" fixes:

  1. The v2->v1 retry connected directly, without the proxy: net: use the proxy if overriden when doing v2->v1 reconnections #35319 (merged in net: use the proxy if overriden when doing v2->v1 reconnections #35410)
  2. Discouraging a misbehaving peer gave a clearnet oracle: net: don't discourage private broadcast peers #36312
  3. Eager job completion via mempool inspection: net: always complete all initial private broadcast connections #36277
  4. Private broadcast connections wrote to addrman: net_processing: don't modify addrman for private broadcast connections #35032

There are many other sources of fingerprints as well, some harder than others to exploit, and to fix. The solution: remove reliance on node state entirely to drive attempts. The spec states the goals as:

  • A job reveals neither the sender's IP address, onion address nor node identity to any party.
  • A hostile recipient, DNS seed or Tor exit learns no more than an honest one. It can only affect delivery.

Jobs, slots and opportunities

  • Job: one broadcast of one transaction, from submission to its report. A job spends its first 12 s finding candidates (IPv4/IPv6 addresses from the DNS seeds, resolved through Tor exits), then delivers. It runs for at most 10 min.
  • Slot: one of a job's 6 independent delivery targets. Each slot tries to announce the transaction to one peer and serve it when asked. Slots 0–2 open when delivery starts; slot 3 opens 35–180 s later; slots 4–5 open 185–240 s later, at least 5 s apart. Each of these times is drawn at random within its range.
  • Opportunity: one of a slot's 4 scheduled connection times: a first attempt and up to 3 fallbacks, each 50–60 s after the previous. A fallback runs only if the slot's previous attempt failed before announcing; once a slot announces, its remaining opportunities are dropped.

The times are drawn at job start, and each opportunity's candidate is fixed when discovery ends, before any peer is contacted. Nothing a peer does moves them (C1–C4). A job makes at most 24 connections, at most 6 of them at once.

Differences at a glance

master this PR
Where it runs Inside bitcoind only bitcoind -privatebroadcast, or the standalone bitcoin-privbcast with no node; the same job either way (U3), with a JSON report of every connection
Recipients addrman.Select() over onion, I2P, and IPv4/IPv6 through the proxy; networks follow -onlynet DNS seed names resolved through Tor exits (RESOLVE), IPv4/IPv6 only; no node state used (R1, R6)
Connections CConnman peers of type PRIVATE_BROADCAST, visible in getpeerinfo The job's own proxy streams, each with fresh SOCKS credentials, so each gets its own circuit; not peers of the node
Plan 3 connections, then more whenever the tx is stale (5 min, then 1 min) until it comes back from the network 6 slots of 4 opportunities, all scheduled at job start; no retries; at most 10 min
Transport v2 when addrman advertises it, otherwise v1, with a v2→v1 retry BIP324 v2 only, with one constant VERSION per release (B4, E1)
Node settings Shape which networks and peers are used Peer-selection settings don't apply to jobs (U2)
Packages — submitpackage with one parent and one child: announce the child, serve the parent on request

No addrman

Under master, the node's private broadcast destinations are drawn from the node's addrman. Other parties write to that table through addr gossip, which makes it a unique fingerprint vector, and inherently attacker influenced. This rules out drawing recipients from anything the node or its peers can write to.

Its replacement is querying DNS seeds in a predetermined way under a static profile. This is inherently less robust than the p2p network in terms of liveness, but leaves no fingerprint within a release. The marginal fingerprint is the set of DNS seeds per release, which affects who is queried and exactly how. Each RESOLVE returns one address and exits cache answers, so each seed is asked through several exits: 4 Tor circuits, each querying all 7 seeds, for up to 28 results, which are assigned to the 6x4 opportunities before any dialing happens. A circuit per query, 28 in all, kept Tor busy enough that overlapping discoveries lost answers.

If the list shrinks, grows, or is modified, the release is revealed to the Tor exits carrying the queries, which see every seed name queried. A DNS seed learns only that it is on the list, and only when the exit has no cached answer.

The fingerprint potential also precludes fixed seeds, which change greatly each release, and which degrade in connectivity over time regardless.

Minimal release fingerprint

Once a release is cut, behavior profiles are intended to be identical per user. This precludes user knobs and per-instance parameters, and requires a constant user agent and VERSION.

Across releases, the reimplemented p2p message state machine allows better control of unnecessary profile breaks going forward.

Specification

doc/design/private-broadcast-tool.md comes before any code in part 2. It has goals, a threat model per party (recipient, exit, seed, network observer, guard), 54 numbered invariants (A–U, N), parameters, interface, assumptions, non-goals and a rationale. Code comments and tests cite the invariant IDs, so review can check code against a stated property. Concept review of the goals, threat model and non-goals is most useful first, then review of the implementation against the invariants.

This implementation is actually the second implementation, initially implemented solely via the spec and black box tests, which were handed to an otherwise blind agent.

Tradeoffs

  • Needs Tor, including Tor's RESOLVE extension. I2P is gone, and so are onion recipients. To re-add these, we need a connect->GETADDR step, and then have to filter out most of the addresses that do not answer when dialed.
  • DNS seeds and Tor exits learn that a job ran, in addition to end recipients.
  • No retries beyond the scheduled fallbacks. Retrying would act on whether the transaction comes back, which the adversary controls; the user resubmits instead.
  • getprivatebroadcastinfo now reports jobs, and the connections no longer show in getpeerinfo.

Empty commit marking where the parts of this pull request begin. Part 1 moves code that bitcoin-privbcast shares with the node into the common library and exports what it needs from net and netbase. No behaviour change.
bitcoin-privbcast (added later in this series) links the BIP324 cipher
without the node library. The cipher depends only on crypto, keys,
randomness and chain parameters, which the common library already
provides.
The transports and the messages they carry are needed by a tool that
must not link the node library (bitcoin-privbcast, added later in this
series). Move them, with NodeId and MAX_PROTOCOL_MESSAGE_LENGTH, to
net_transport.{h,cpp} in the common library. net.h includes the new
header and drops the includes that only the moved code used; files that
name NodeId include the new header themselves.

net.h includes the new header first, where bip324.h was: Qt's moc reads
net.h through the GUI's headers and cannot parse libstdc++'s <concepts>
unless an earlier header has defined _GLIBCXX_VISIBILITY.

Move-only: no code changes.
Empty commit marking the start of part 2: the specification and the standalone tool. Nothing in the node changes.
@DrahtBot

DrahtBot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

External sites

Reviews

See the guideline and AI policy for information on the review process.
A summary of reviews will appear here.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #36628 (net: reimplement private broadcast as jobs isolated from the node by instagibbs)
  • #36607 (private broadcast: Extra guard against unintended non-private broadcast of private transactions by optout21)
  • #36597 (wallet: return broadcast errors from CommitTransaction by pseudoramdom)
  • #36566 (private broadcast: wait synchronously for mempool acceptance by andrewtoth)
  • #36521 (Keep witness stacks in serialized form in CScriptWitness by sipa)
  • #36477 (private broadcast: show finished transactions in getprivatebroadcastinfo by vasild)
  • #36429 ([RFC] Delayed transaction broadcast, minimal by optout21)
  • #36170 (net: require a dedicated bind for automatic Tor by l0rinc)
  • #36098 (fuzz: add corpus reachability checks by HowHsu)
  • #36074 (scripted-diff: [test] Add util/check.h includes for assertions by maflcko)
  • #36002 (txindex: allow running in pruned mode by andrewtoth)
  • #35888 (net: reject oversized outbound messages by l0rinc)
  • #35858 (doc: Add privacy.md consolidating network privacy recommendations by pablomartin4btc)
  • #35713 (Remove boost as a unit test runner by rustaceanrob)
  • #35558 (p2p: Prefill compact blocks by davidgumberg)
  • #35511 (RFC: consensus: Make CAmount a class by hodlinator)
  • #35286 (rpc: add testsubmitpackage for 1p1c test submissions by instagibbs)
  • #35027 (net: add -outboundbind option for outgoing source address by 8144225309)
  • #33922 (mining: add getMemoryLoad() and track template non-mempool memory footprint by Sjors)
  • #30951 (net: option to disallow v1 connection on ipv4 and ipv6 peers by stratospher)
  • #30437 (ipc: add bitcoin-mine test program by ryanofsky)
  • #29418 (rpc: provide per message stats for global traffic via new field in 'getnettotals' by vasild)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

LLM Linter (✨ experimental)

Possible places where named args for integral literals may be used (e.g. func(x, /*named_arg=*/0) in C++, and func(x, named_arg=0) in Python):

  • src/test/privbcast_queue_tests.cpp: CreateValidMempoolTransaction(m_coinbase_txns[0], 0, 0, coinbaseKey, script, 49 * COIN, false)
  • src/test/privbcast_queue_tests.cpp: CreateValidMempoolTransaction(m_coinbase_txns[1], 0, 0, coinbaseKey, script, 49 * COIN, false)
  • src/test/privbcast_queue_tests.cpp: CreateValidMempoolTransaction(m_coinbase_txns[1], 0, 0, coinbaseKey, script, 48 * COIN, false)
  • src/test/privbcast_queue_tests.cpp: CreateValidMempoolTransaction(m_coinbase_txns[2], 0, 0, coinbaseKey, script, 49 * COIN, false)
  • src/test/privbcast_queue_tests.cpp: CreateValidMempoolTransaction(parent, 0, 0, coinbaseKey, script, 48 * COIN, false)
  • src/test/txpackage_tests.cpp: CreateValidMempoolTransaction(m_coinbase_txns[0], 0, 0, coinbaseKey, parent_spk, coinbase_value - 10'000)
  • src/test/txpackage_tests.cpp: CreateValidMempoolTransaction(m_coinbase_txns[0], 0, 0, coinbaseKey, parent_spk, coinbase_value - 100'000, false)
  • src/test/txpackage_tests.cpp: CreateValidMempoolTransaction(m_coinbase_txns[1], 0, 0, coinbaseKey, parent_spk, coinbase_value - 10'000)
  • src/test/txpackage_tests.cpp: CreateValidMempoolTransaction(m_coinbase_txns[2], 0, 0, coinbaseKey, parent_spk, coinbase_value - 10'000, false)
  • src/test/txpackage_tests.cpp: CreateValidMempoolTransaction(m_coinbase_txns[3], 0, 0, coinbaseKey, parent_spk, coinbase_value - 10'000)
  • src/test/txpackage_tests.cpp: CreateValidMempoolTransaction(m_coinbase_txns[3], 0, 0, coinbaseKey, parent_spk, coinbase_value - 100'000, false)
  • src/test/txpackage_tests.cpp: CreateValidMempoolTransaction(tx, 0, 101, parent_key, child_spk, value, false)

Possible places where comparison-specific test macros should replace generic comparisons:

  • test/functional/tool_privbcast_package.py: assert a["parent_hold_expired_ms"] is not None and a["parent_getdata_ms"] is None → Prefer assert_equal(a["parent_getdata_ms"], None) for the is None comparison.
  • test/functional/tool_privbcast_package.py: assert a["parent_getdata_ms"] is None and a["parent_hold_expired_ms"] is not None → Prefer assert_equal(a["parent_getdata_ms"], None) for the is None comparison.
  • test/functional/tool_privbcast_package.py: assert a["getdata_ms"] is None and a["tx_written_ms"] is None → Prefer assert_equal(..., None) for each comparison.

2026-10-22 17:41:53

This is the design the following commits implement: what a private
broadcast job guarantees, the values peers and observers see, and the
interfaces of the tool and the node. Later commits cite its items by
number.
Start bitcoin_privbcast, the library that will run private broadcast
jobs for bitcoin-privbcast and the node. params.h holds the values of
the specification. DrawPlan draws a job's plan from the job's own
randomness: the schedule, the order of the DNS seeds and the seed of
the order in which each DNS seed hands out its candidates.
MIN_DNS_SEEDS is the floor R3 sets for the mainnet seed list, and a
unit test holds the list to it, so a release that drops seeds below
what fills a job fails the test rather than leaving opportunities
empty.

Implements C1 and R3; the values of Parameters.
Assign fixes every opportunity's candidate once discovery ends, from
the plan and the discovery result alone. An endpoint that several
seeds returned is credited to the seed that comes first in the plan's
seed order, through the lowest query set that returned it. Each seed
hands out its candidates in an order drawn at random by a generator of
its own, seeded from the plan and the seed's place in that order. Slot
j's first attempt comes from query set j mod 4 whenever a seed it may
draw from has one, so a single exit supplies at most two first
attempts. Neither which seed answers first nor the order of a seed's
answers changes the assignment.

Implements C2, R2, R4, R5a, R5b and R5c.
A job reaches recipients and resolves DNS seed names through the proxy,
on streams its event loop drives without blocking. Socks5Client holds
no socket: it offers the bytes to write, consumes the proxy's replies,
and leaves bytes past the final reply to the P2P transport. It offers
only username and password authentication, with the credentials it is
given or fresh ones, and sends a numeric address as IPV4 or IPV6
without resolving anything.

Implements B2 and the Proxy interface section.
An attempt is one connection to a recipient once the proxy connected
it: a BIP324 session as initiator, the handshake with the job's
VERSION, one INV, the transaction served at most once, and the PING.
It holds no socket and reads no clock: the job's loop passes the bytes
read and the time; each call records what happened (a completed write,
the connection, bytes received) and then enforces the attempt's
deadlines, so that nothing is acted on at or after one.

The attempt draws its VERSION and PING nonces from the random context
it is given, and takes its BIP324 key, ellswift entropy and garbage
from a key source. Without one, as in production, V2Transport draws
them from the strong RNG. The tests and the fuzz target inject a
source that draws from their seeded context, so that an attempt's
bytes are a function of that context and of what the peer sent.

Implements E1-E8, A2, B4, D3 and the attempt part of D2.
A job reaches the network only through streams to the SOCKS5 proxy,
which its event loop drives without blocking. ProxyStream connects to
the proxy by address or unix socket path, resolving nothing, and runs
the exchange of its Socks5Client; each stage, the connect and each
step of the exchange, times out on the steady clock. Once the proxy
has connected the stream, its socket carries the destination's bytes.

Discovery launches every RESOLVE query at job start, each on a stream
of its own, in four query sets: each set has credentials of its own
and one query of every seed, so Tor builds four circuits rather than
one per query, and each seed is still asked through four exits.
Discovery ends when every query has ended or when the discovery window
does, whatever is still pending. It keeps the answers that are public
routable IPv4 or IPv6 addresses, with the chain's default port, and
counts the others; its result gives each seed's answers by the query
set they came through, whatever order they arrived in. An exception
thrown while it acts on one query ends only that query, as a failed
stream would.

The tests run discovery against a scripted proxy behind fake sockets
that connect as non-blocking sockets do. The fake socket and the
proxy's side of the SOCKS5 exchange go into the test utilities, as the
job's tests use them too.

Implements B1, B2, C3, D1, R1, R2 and C7 for the queries.
A job is one event loop on its caller's thread. Step() runs the
deadlines and the dials that are due, waits on every open stream until
the next deadline, and does the I/O; Run() steps to the end. The plan
is drawn when the job is made, before any socket exists, and discovery
starts with the first step. When discovery ends the assignment is
fixed, and each slot dials its opportunities at their scheduled times,
one attempt at a time, until one reaches the announcement point or
none is left. The slots share only the loop, so a stalled stream holds
up no other slot, and the cancel flag ends everything at the next step.

An exception thrown while the loop acts on one attempt ends only that
attempt, as a failed stream would. One thrown anywhere else in a step
fails the job: it stops as a cancelled job does, and its report gives
the error.

The report mirrors Interface/Report, every time an offset from job
start on the plan clock. Snapshot() gives the progress the node is to
show, from any thread. ExitStatus() gives the tool's exit status for a
report.

Implements A1, A3, A4, C1-C8, D1, D2, H1, H3 and the report interface.
The SOCKS5 server gains Tor's RESOLVE command, reply delays for a slow
or stalled proxy, a mode that offers only unauthenticated access and a
mode that behaves as an ordinary non-Tor proxy. A client that hangs up
before its greeting, as a cancelled job's streams can, and a connection
that Windows reports as aborted count as closed, not as errors. The P2P
network thread judges a failed protocol by its own reconnect flag, so
that several listeners can share one loop. The framework learns where
bitcoin-privbcast is and how to skip a test without it.

Prepares the functional test that the next commit adds with the binary.
The standalone tool: it reads one transaction on stdin, runs one job
through the Tor proxy named by -tor and prints the report on stdout,
with progress lines on stderr. It takes no configuration file and only
a loopback proxy, refuses the regtest overrides on other chains and
checks its arguments and input before any network activity. The
discover command runs discovery alone.

Build and packaging: the BUILD_PRIVBCAST option (on with BUILD_TESTS),
the privbcast subcommand of the bitcoin wrapper, the man page, the
Windows resource file, the manpage generator and Windows CI lists, and
the test configuration that tells the functional framework the binary
exists.

The functional tests tool_privbcast.py, tool_privbcast_proxy.py and
tool_privbcast_peers.py, with their harness in
test_framework/privbcast.py, are the specification's black-box
acceptance suite for the tool: scripted recipients and a scripted proxy
check every wire-visible parameter, the schedule, the assignment, the
exit statuses and cancellation.

Implements B3, H2, U1 and the Interface section for bitcoin-privbcast.
Add the user guide to private broadcast with its bitcoin-privbcast
part: the Tor proxy the tool needs, how to send a transaction and read
the exit status and the report, discover, and the limits of what a job
protects.
Empty commit marking the start of part 3: the node runs each private broadcast as the tool's job, and the old relay and connections are removed.
The node runs each private broadcast as a privbcast::Job, the tool's
job, on a thread of its own. PrivbcastQueue queues the submitted
transactions, starts and cancels the jobs from one scheduler thread,
and keeps in memory the records that getprivatebroadcastinfo and
abortprivatebroadcast are to show. It reaches the node only through
callbacks for networking, the onion proxy and the mempool, and takes
the job runner as a parameter, so that the tests drive it with stub
jobs and mocked clocks. A job that failed, or whose runner threw, ends
aborted with the error in its record.

The scheduler's start rule is a pure function, StartPolicy::Decide(),
which each pass of the scheduler applies: a fuzz target checks the
rule on its own, and another the queue through its interface.

bitcoin_node now links bitcoin_privbcast.

Implements N3-N7, N9, N10, the node's D2 and D3, U3. Not yet wired:
the next commit switches -privatebroadcast to it.
With -privatebroadcast, sendrawtransaction now queues a job on the
node's PrivbcastQueue instead of handing the transaction to the
connection manager, getprivatebroadcastinfo lists the jobs with their
progress and reports, and abortprivatebroadcast aborts them. Startup
requires onion to be able to become reachable, refuses the regtest
seed overrides on other chains, -signetseednode, -signetchallenge, and
off regtest a non-zero -mocktime, and refuses to start rather than trim
connections when the jobs' file descriptors are not available. -connect
and -proxyrandomize no longer matter.

The old private broadcast connections and relay stay in the tree, no
longer fed, until the commits that remove them.

Implements N1, N2, N8, N10, N11, U1, U2 and Interface/Node; replaces
the old implementation's tests with the specification's.
Since -privatebroadcast runs jobs, nothing hands PeerManager a
transaction for private broadcast any more. Remove its queue
(src/private_broadcast.{h,cpp}) with the methods, the retry task and
the private_broadcast option that served it, and its handling of
private broadcast connections: the fixed VERSION, the INV after
VERACK, the GETDATA and PONG handling, the incoming message filter,
the lifetime limit and the exemption from discouragement. The unit and
fuzz tests of that code go with it, including the net_tests case for
the addrman exception and the denialofservice_tests cases for the
discouragement exemption.

Delete-only: besides whole lines, conditions and arguments are cut out
of lines, and the lines of a removed branch's alternative move out one
indentation level. git show -w --word-diff-regex='[A-Za-z0-9_]+|[^[:space:]]'
shows deletions only, apart from the size of the node array in
denialofservice_tests, which goes back from 5 to 3.
With the relay gone, nothing asks CConnman for private broadcast
connections. Remove the connection type, the thread that opened such
connections with its counters and choice of network, and the places
that treated them specially: the incoming nonce check, the fresh I2P
session, the guard against direct connections, the outbound message
filter, the fixed protocol version, the exception in disconnection by
subnet and their term in the orphanage's static_assert. The type's
names go from getpeerinfo's help, bitcoin-cli -netinfo and the GUI. The
proxy override of ConnectNode() and OpenNetworkConnection(), which only
that thread set, goes too, with its copy in CNode and in the
reconnection record and the fuzz input for it.

Delete-only: besides whole lines, conditions, arguments and list
separators are cut out of lines, what followed a cut argument joins
its line, and one line moves out an indentation level with the if
around it. git show -w --word-diff-regex='[A-Za-z0-9_]+|[^[:space:]]'
shows deletions only.
Without private broadcast connections, a node advertises
PROTOCOL_VERSION on every connection, and CNode::AdvertisedVersion()
only returns it. Use the constant again where the method was called.
Add the node part of the private broadcast guide: which Tor proxy the
jobs use, how sendrawtransaction queues them and when they start, what
is not queued again, how to follow and abort jobs, what disabling
networking and shutdown do, which node settings do not apply, what
the default log shows, the file descriptors the jobs need, and the
link between a job's connections and the node's peers at shutdown.
Empty commit marking the start of part 4: one parent and its child. The validation commits here serve only this part.
A child can pay for a parent too cheap to enter mempools alone when the
recipient takes the two together. A job may now carry the parent: each
attempt announces only the child, serves the parent to a peer that asks
for it, and holds the PING for that request. A job without a parent
runs and reports as before.

Implements F1-F4 and the package amendments of E6-E8.
bitcoin-privbcast send also reads two transactions, an unconfirmed
parent and its child in either order, checks that they are such a pair
and runs the job in package mode. The acceptance suite gains its
package sections in tool_privbcast_package.py.

Implements the Extension's Interface for bitcoin-privbcast.
Two prioritisetransaction deltas near INT64_MIN made the sum overflow.
@instagibbs

Copy link
Copy Markdown
Member Author

in draft, #36628 is the slimmed down branch to review

@DrahtBot

Copy link
Copy Markdown
Contributor

🐙 This pull request conflicts with the target branch and needs rebase.

@instagibbs

Copy link
Copy Markdown
Member Author

not being considered at the moment, can be resurrected easily

@instagibbs instagibbs closed this Nov 23, 2026
@optout21

Copy link
Copy Markdown
Contributor

Thanks for bringing in a fresh perspective, if not else, it's a good base for further discussions (despite that it's closed now).

I tried to expand on the comparison with the current implementation (master) from the description.

master 36608 node mode 36608 tool mode
Connections via a Tor exit Typically 1/3–1/2: each eligible network (onion, I2P, IPv4, IPv6) is equally likely All All
-onlynet=onion Keeps broadcasts on onion Ignored, jobs still use exits n/a
Pre-validation Full test-accept Full test-accept, except if the txid is already in the mempool: the caller's bytes are then sent unvalidated (N2) Only CheckTransaction, not-coinbase, weight and burn limit. No inputs, scripts, fees or standardness
Tx coming back Stops retries Recorded by txid, for the report only (N7) Not observed

For reference, the common fallback, mempool.space/tx/push over Tor, validates against its own node and depends on a single provider.

Also, mainnet has exactly 7 DNS seeds, and MIN_DNS_SEEDS is 7. Losing one breaks R3 and needs a parameter and spec change. That change is itself a release fingerprint visible to exits.

Design questions

I attempt to list the various dimensions in the design space:

Question Options master 36608
Target types onion/I2P only / clearnet via Tor only / all / all, preferring onion/I2P all clearnet via Tor
Target source node's addrman / DNS seeds / separate address-gathering component addrman DNS seeds
Connection code node's networking / separate node separate
Tx coming back acted on / recorded only / not observed acted on recorded (node) / none (tool)
Pre-validation full / checks needing no chain state / none full full (node) / partial (tool)
Retries automatic, re-validated / user resubmits automatic user resubmits

Several of these are independent of each other. For example, separate connection code doesn't require DNS-seed targets.

Most likely direction?

To me, 36608's main benefit is that targets don't come from the node's addrman, which closes the planted-address attack (an address gossiped only to the victim). DNS seeds alone is also the most contentious part, though: liveness, the 7-of-7 seed margin, and every connection through an exit. Changes to master that seem more likely:

  • harden selection within addrman against planted addresses (e.g. addresses seen from several sources or from the tried table, or mixing addrman and DNS-seed targets so no single source decides all of them);
  • isolate the connection and state logic as stateless jobs, which addresses the class of bugs listed in the description, while still drawing targets from addrman;
  • prefer onion/I2P targets, which reduces exit exposure;
  • add 1p1c package support, which is independent of the rest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants