dcroxide is an in-progress reimplementation of dcrd. It has never been audited by anyone outside the project, it has never run in production, and it has no track record on a live network beyond the sync validations described in the README. It is not a supported node implementation. Do not run it where it can be reached from the public internet, do not point a wallet at it, and do not rely on it to validate, relay, or hold funds. Use dcrd for anything that matters.
There are no supported versions. Nothing here carries a security guarantee, and there is no commitment to a fix timeline or to a coordinated-disclosure window.
Report privately through GitHub's security advisories:
https://github.com/jzbz/dcroxide/security/advisories/new
Please do not open a public issue for anything that looks exploitable against a running node, and please do not file it against dcrd — a bug in this repository is a bug in this port, not in dcrd, unless you have reproduced it against dcrd itself.
Useful things to include: the affected file and function, whether the attacker needs to be an authenticated RPC client / a connected peer / a local user, and a reproducer or the minimal message or request that triggers it.
In scope. Anything that a remote peer, an RPC client, or a local unprivileged user can do to a dcroxide node that dcrd would not permit: memory exhaustion or a wedge from unauthenticated P2P input, authentication or authorization bypass on the JSON-RPC and websocket surfaces, credential and private-key exposure through file permissions or logs, panics reachable from untrusted input, and any consensus divergence from dcrd (a fork is a security bug here even when it looks like a correctness bug).
Out of scope. Behaviour that faithfully reproduces dcrd, including dcrd's own quirks and limits — those are the specification, and the deliberate ones are catalogued in QUIRKS.md. If you think dcrd itself is wrong, report it to dcrd instead. Also out of scope: resource use under a workload dcrd would also struggle with, and anything requiring an already-privileged local attacker (they can read the datadir regardless). Throughput is out of scope as well. How fast the port syncs is measured, in the README's Performance section and in docs/bench-ledger.md: on 2026-10-25 it synced mainnet from genesis in a mean of 4.2 minutes on one machine, from a block server on the same LAN, where dcrd v2.1.7 took 50.0 and 49.5 minutes there in the same session. Its own metadata flushes were in the foreground on the threads that sync for 0.02 to 0.03 s of that time, their rows and commits being written, and their block files synced, on a thread of their own. Those flushes are work the node does to itself rather than work a peer can add to, so there is nothing here for a peer to amplify.
The project runs its own internal security review. A campaign closing its release-blocking findings landed this cycle — bounds on the peer message path, authentication and admission on the RPC surface, owner-only permissions on the secret files the daemon generates for itself, OS-seeded CSPRNGs, and the panic policy below. Every fix, the reasoning behind it, and the divergences from dcrd it introduced are itemized in PARITY.md under "Deliberate divergences from dcrd" and its "Known remaining gaps" subsection, rather than being hidden. What follows is the residue: the standing gaps that matter most for anyone evaluating this code.
-
A data directory written before the treasury-commit fix may hold a hole. Until the treasury rows moved into the block connect path's single transaction, a crash could leave a durable best state whose treasury balance row was not, and
calculate_treasury_balancereads a missing row as zero for that block and every descendant. New writes are atomic, but existing directories are not scanned or repaired on startup. Re-sync rather than carry one forward. -
A panic aborts the process (
panic = "abort"on the release profile). Rust mutexes poison and Go's do not, so dcrd recovers per goroutine where this port cannot: a panic on one thread poisons every lock it held, and each other consumer then dies on.expect("… poisoned")in turn. Aborting is the deliberate choice for a consensus daemon — state a panic left half-mutated cannot be reasoned about, so a supervisor restarting a clean node beats continuing on unknown state. Run it under a supervisor that restarts it (Restart=on-failureor equivalent): any reachable panic is an outage until something restarts the process. The tradeoff is deliberate, and loud beats the previous behaviour, where a poisoned lock wedged the node while the RPC layer'scatch_unwindkept it answering canned errors and looking healthy. One latent source of such panics sits on the RPC surface. The seam traits indcroxide-rpc(server.rs,websocket.rs) still give 61 methods anunimplemented!()default, and the publicimpl … for ()stand-ins the tests use inherit them. Every adapter the daemon wires in overrides them today, so none is reachable, but an adapter that later misses one would still compile, and the first RPC to reach that method would abort the node. Making a missing override a compile error needs the()stand-ins moved behind a test-support feature and the test doubles made explicit; that has not been done. -
A websocket client that stops reading grows node memory without bound. The notification queues are unbounded, exactly as dcrd's are, so nothing is ever dropped and nothing is reordered — the whole cost of a slow or stalled subscriber is paid in node memory. Since RPC access requires credentials this is not reachable unauthenticated, and adding a cap would diverge from dcrd while cutting off honest clients on slow links, so it stays. Operators running many subscribers, or exposing the websocket to clients they do not control, should bound the process (a memory limit plus a supervisor) rather than expect the node to shed. The port-specific amplifier this used to carry — a single long request holding a lock that stalled notification construction for every other client — is fixed: the server-wide lock is gone, and the per-client lock is now taken a field at a time where it is used, as dcrd takes its own, rather than across the whole request.
-
Unauthenticated websocket clients can hold every websocket slot. The
/wsupgrade needs no credentials: a client may authenticate in-band later, and nothing makes it do so in time. From its upgrade it counts againstrpcmaxwebsockets(25 by default), and it has no read deadline. So that many silent connections from any host that can reach the RPC port lock every later websocket client out, dcrwallet included, until they close. dcrd behaves identically:WebsocketHandlerclears the read deadline and counts the client before it authenticates (rpcwebsocket.go:109-130). The port reproduces it rather than add an authentication deadline dcrd does not have. The pre-authentication admission pool bounds only the HTTP handshake; it releases the connection once the upgrade completes. Bind the RPC listeners to trusted interfaces, or firewall them, and raiserpcmaxwebsocketsif untrusted hosts can reach them. -
Any host that can reach the RPC port can drive the authentication-failure warning.
RPC authentication failure from <addr>is logged for every wrong credential, and for every HTTP request that carries none, as dcrd'scheckAuthMACandcheckAuthlog it, so a client without credentials drives that warning at its request rate. It is deliberately not rate-limited like theMax RPC clients exceededshed line: fail2ban-style filters count these lines, and a limiter would hide the attempts they exist to catch. Nothing bounds it beyond what bounds the requests themselves, the admission caps (rpcmaxclientsand the pre-authentication pool). Bind the RPC listeners to trusted interfaces, or rotate logs, if that volume matters. -
Seeder TLS roots are compiled in. The HTTPS seeder clients verify certificates against the
webpki-rootssnapshot built into the binary, not against the operating system's trust store that dcrd's Go client uses. A root the OS distrusts after the build stays trusted until a rebuild, and a locally installed root, such as an enterprise TLS-inspection CA or a privateSSL_CERT_FILE, is not honoured, so behind such a proxy the node cannot seed. Seeders are how a fresh node bootstraps its peer list, which makes this trust anchor security-relevant; see PARITY.md's open gaps. -
RPC TLS uses classical key exchange. dcrd leaves Go's default key-exchange preferences in place (
newTLSConfig,server.go:3685-3688), which since Go 1.24 put hybrid X25519MLKEM768 first, so it negotiates that with Go clients such as dcrctl and dcrwallet. This daemon picks among X25519, P-256, P-384 and P-521 as Go's server does, but negotiates plain X25519 with those clients, because its TLS provider, the in-treedcroxide-tlscrypto(ADR-0015), has no ML-KEM yet; ADR-0015's T3 adds it. RPC sessions recorded on a non-local--rpclistenare therefore exposed to harvest-now-decrypt-later attacks that dcrd's resist, including the Basic credentials sent with every request. Every key exchange and handshake signature runs on RustCrypto's crates under that provider, X25519 and Ed25519 oncurve25519-dalekand P-256, P-384 and P-521, the last of which Decrediton requires, on thep256,p384andp521crates, whose curve arithmetic has never been independently audited, and an operator's ML-DSArpc.keysigns in TLS 1.3 on theml-dsacrate, which has never been independently audited either (docs/dependency-ledger.md). Under--authtype=clientcertthe same crate verifies a client's ML-DSA certificates and handshake signature, so any host that can reach the RPC port hands it keys and signatures of its choosing before it is authenticated, as dcrd's Go code verifies them. See PARITY.md's open gaps. -
An RSA RPC key is refused. dcrd serves an
rpc.keythat is an RSA key. This daemon refuses one at startup, and keeps the configuration it serves when a rotation brings one in (ADR-0015, T6): its TLS provider signs with ECDSA, Ed25519 and ML-DSA keys alone, since the one pure-Rust RSA signer carries a timing advisory on its private-key operations (RUSTSEC-2023-0071). An operator with an RSA pair replaces it, as the error says;gencertsand the daemon's own generation write none. See PARITY.md's open gaps. -
Any host that can reach the RPC port can drive the TLS handshake error line.
http: TLS handshake error from <addr>: <err>is logged at error level for every refused handshake, as dcrd's net/http logs it, so a client that connects and closes, or speaks anything but TLS, drives it at its connection rate. It is not rate-limited, for the reason the authentication-failure warning is not: a filter counting these lines is counting attempts. Nothing bounds it beyond the rate at which connections can be opened. Bind the RPC listeners to trusted interfaces, or rotate logs, if that volume matters. -
Descriptor use is several times dcrd's. The daemon spends several descriptors per peer and RPC connection where dcrd spends one, and keeps a read handle open for every block file it has touched where dcrd caps open block files at 25. It raises its soft
RLIMIT_NOFILEas dcrd does, so this matters only where an operator has set the hard limit low, to a few thousand. There, a peer and RPC flood can exhaust descriptors sooner than it would against dcrd. A block-file reopen failing then latches the database fatal: the node keeps running and answering RPC, but stops connecting blocks until it is restarted. Details are in PARITY.md's open gaps. -
The script engine copies stack items where dcrd shares them. Each item on the script stack is a buffer of its own (
dcroxide-txscript,stack.rs:38). A data push copies the bytes it pushes once, and the duplicating opcodes,OP_DUP,OP_2DUP,OP_3DUP,OP_OVER,OP_2OVER,OP_PICK,OP_TUCKandOP_IFDUP, copy the item's bytes each time, as doOP_SUBSTR,OP_LEFTandOP_RIGHTfor the part they keep. dcrd's engine pushes the same slice again (stack.go:222-237,opcode.go:715-717) or reslices it (opcode.go:1377,opcode.go:1425,opcode.go:1478), and copies an item's bytes only inOP_CAT(opcode.go:1302-1305), where the port copies them too (opcodes.rs:758-761). Stack contents and verdicts are the same in both; only the cost differs, and the consensus limits bound it per script: 255 counted operations, 2,048 bytes per item, 1,024 items. The costliest standard spend found is a P2SH spend of about 300 to 350 bytes with no signature operations, whose redeem script builds 2,048-byte items withOP_CATand then interleavesOP_3DUPwithOP_2DROP. Each such input copies about 590 KB, and a 393,216-byte block of them about 0.6 GB, roughly 35 to 80 ms of CPU spread over the script threads. That stays below a worst case both nodes already accept: a redeem script that hashes 2,048-byte items in a loop costs dcrd and the port about the same, roughly 0.1 to 0.45 s per block. A block a miner builds can do several times more of both, by spending outputs mined earlier whose public key scripts carry the program, so the comparison holds there too. These figures are estimates from the limits and typical allocation, copy and hash speeds, not measurements. Memory stays within the 1,024 items of up to 2,048 bytes that either engine already allows. Sharing items as dcrd does would change the stack's item type in the consensus script engine, on the path every ordinary spend takes, so it would need a timed run of that path, before and after, before it is considered. -
The sync peer's connection is read ahead of its block handler. During the initial sync a thread of its own reads the sync peer's connection up to sixteen frames ahead of the thread that handles that peer's blocks. dcrd holds further receives back until a block is known good or bad, so that a malicious peer cannot queue up bad blocks and waste memory (
server.go:1365-1369). Here up to sixteen frames from the sync peer are checksummed and decoded before the frame ahead of them has been judged, and a block among them is also hashed, has its two transaction merkle trees built, its signature operations counted twice and the checks of its data that need no chain state made, is serialized once and compared with the payload it arrived in, and has that payload laid out as its block-file record, with a CRC-32C and a second hash of its header. They are held, decoded and each with its frame, until their turn. None is acted on early: each is handled in the order it arrived by the code that handled it before, a block's verdict on its data is read only at the point where the chain would have made those checks, and nothing queued is handled once the connection is being torn down. So what a hostile sync peer gains is the work and the memory. The merkle trees add less work than a block's transactions already cost: a tree of n transactions has at most n - 1 + ceil(log2 n) inner nodes, each one hash of 64 bytes, two BLAKE-256 compressions, where each transaction takes at least four compressions; the decoder allows 43,691 transactions in each tree and accepts one of five bytes, so the block whose trees cost the most has a payload of 437,096 bytes and 87,396 inner nodes, 174,792 compressions beside at least 349,528 for its transactions. The two counts of signature operations are two passes over the block's scripts, each reading a script once at most, with no hashing, and keep nothing past a transaction but the two sums; what they cost the reading thread on a hostile peer's blocks has not been measured. The checks of a block's data are one more walk of its transactions, each transaction's own checks and an ordered set of their hashes, work the thread that connects blocks made before; what they cost the reading thread on a hostile peer's blocks has not been measured either. The signatures of a queued block above the height at and below which the chain checks no script are also checked while it waits, on the script pool's helper threads, by default at most two fewer at once than the physical cores plus one for every two logical CPUs beyond them, counting at most one beyond each core. Where the cores are read, that is two fewer than the cores without SMT, as before 2026-10-22, and ten on eight cores with two hardware threads each, where it was six. Where they cannot be read, as on Windows and macOS, the cores are taken to be half the logical CPUs, so that the count rises with or without SMT: to ten from six on sixteen logical CPUs, and to four from two on eight. Each input of the one guessed shape costs one hash of its transaction's witness serialization, a byte for each other input, and at most one signature verification, whose success leaves an entry in the signature cache; the count sets how many of those inputs are checked at once, not what each costs, and the helpers are the pool's, one fewer than the logical CPUs at most, whatever the count. A peer whose block the chain rejects stays connected, as in dcrd, and its later blocks are checked alike, so that work is bounded per block and by the time each block waits, not per peer: more helpers reach more of each block before it is taken, never more than its inputs of that shape. What it costs on a hostile peer's blocks has not been measured, at either count, andDCROXIDE_PREVERIFY=offremoves it (PARITY.md, Signature pre-verification ahead of the block thread). The memory is at worst about 211 MB held on that connection: seventeen frames of the largest block message, the sixteen queued and the one being handled, at most 22,282,716 bytes, and the blocks decoded from them, about 189 MB. About 1.3 MB more is held for a moment while one frame is compared with its block's serialization, or up to about 1.4 MB while one block's trees are built, against about 12.5 MB without the read-ahead. The frames' bytes are a bound; the other figures are estimates from struct layouts, not measurements. At the four frames of the bound before sixteen the worst case was about 62 MB. The signature pre-verification holds those same blocks, not copies, at most 22,282,240 bytes of them by their serialized size. The read-ahead also costs one more thread and one more descriptor on that connection.DCROXIDE_READ_AHEAD=offremoves it: every connection is then read as dcrd reads, and no frame is kept. Details are in PARITY.md, Reading ahead of the block handler. -
Fuzzing reaches the stateless parsers, not the state machines. Every
cargo-fuzztarget underfuzz/runs for 60 seconds on every push tomasterand every pull request, and for ten minutes nightly: wire framing, decoded at every protocol version a peer can negotiate (9 through 12); thetxandblockheaderdecoders, with stake classification (DetermineTxTypeand theCheck*/Is*family) run over every decoded transaction; the script engine; everything the RPC server does with a request before it authenticates (the HTTP head parser, the mux's routing and redirect, the websocket handshake's header and origin checks, and the discard of a refused request's body, chunked decoding included); the websocket frame reader; the JSON-RPC request path (Go-JSON validation, batch splitting, request unmarshalling, the reply envelope, and parameter decoding against each registered method's Go types, which a mode that writes the envelope around the fuzzer'sparamsreaches); base58, base58check and address decoding (a mode that check-encodes a chosen address ID and payload gets past the checksum to the address dispatch); the chain database's stored-row decoders;chainhashparsing; DER signature parsing; public-key parsing; ECDSA signing, verification and compact recovery; the secp256k1 arithmetic ofdcroxide-secp256k1-vartime, every operation the node calls on it; the Schnorr and Ed25519 suites;uint256; BLAKE-256; and, indcroxide-tlscrypto, the provider every TLS connection the node serves or dials runs on (ADR-0015), its signature verification, which a peer's certificate chain and handshake signature reach before anything of theirs is trusted (the seventeen algorithms its fuzz target runs, among them the in-tree RSA and ML-DSA's three, which a client reaches under--authtype=clientcert), and its parsing of the RPC key (the port of Go'sparsePrivateKey), which runs on everyrpc.key; and what the RPC listener does under--authtype=clientcertwith a client's certificates and handshake signature before the client is authenticated, the certificate reader, the replay of Go's chain search, webpki's search and the signature checks, ML-DSA's among them. Five of the targets,dcrec_diff_ecdsa,dcrec_diff_recover,dcrec_diff_pubkey,dcrec_diff_schnorranddcrec_diff_ed25519, read each input as a case of one ofdcroxide-sigdiff's signature input classes and ask dcrd's own code for every answer throughtools/oracle; a difference in verdict, value, flag, error kind or compared error text fails the target. A sixth,dcrec_ed25519_model, reads its inputs the same way and holds dcroxide's Ed25519 key parsing, signature parsing and verification todcroxide-sigdiff's model of dcrd's, with no oracle, reaching the small-order anda·B + Tkeys that a target signing only with keys from a seed cannot; the model decodes points with the samecurve25519-dalekcode as dcroxide, so onlydcrec_diff_ed25519holds that decoding to dcrd. The other four signature targets and the two TLS ones check dcroxide only against itself, that parsing, signing and verifying do not panic, that what it signs verifies and that what it serializes parses back.secp256k1_vartime_diffholdsdcroxide-secp256k1-vartime's arithmetic tok256's, and its field multiplication to fiat-crypto's limb for limb. No other target asks dcrd or Go for an answer. Beyond the fuzz jobs, the comparison with dcrd for signatures rests on the oracle batteries of the test suite (ADR-0006's addenda), which run a fixed number of cases each, and on its ported vectors; the signature soak,dcroxide-sigdiff'ssigsoak, runs the same classes at a recorded volume. The run that gates the port, at the floors the project owner set, passed on thek256port, on stage 2a, and at the two gates of the owned arithmetic of ADR-0016, after RC4 and after RC6, every class's digest equal to that of the baseline run on libsecp256k1 (ADR-0017), and so did its extra legs: with overflow checks on, with the serial and AVX-512 IFMA backends ofcurve25519-dalekover the Ed25519 classes, and a shorter run on arm64 in CI. The port merged to master on 2026-11-10. Each night CI runs the soak for 35 minutes on x86_64, on x86_64 withcurve25519-dalek's serial backend over the Ed25519 classes, and on arm64, failing on any disagreement with dcrd, any intent a case missed, or any class short of a hundredth of its floor, and then writes a fixed-seed record that every later night's can be compared with; that is regression evidence, not a gate run. For the TLS provider the comparison rests on ring's verdicts, recorded in its parity corpus before ring left the tree, its Wycheproof vectors, its Go differential and the Go interop matrix, and its timing on a statistical check in CI of its ECDSA and Ed25519 signing (ML-DSA is not timed), key exchange, record protection (sealing, a bad tag's refusal and AES-GCM's keying) and HMAC keying, which a pass does not prove constant-time (ADR-0015's addenda). On x86_64, P-256 signing by the nonce passes as a known report while its failing classes are at most 40 ns an operation quicker than the random class, the pattern measured on one processor (ADR-0015's note of 2026-11-15). Stateless parsers still unfuzzed: the config-file and command-line parser, which takes the operator's input rather than a peer's, GCS filter decoding, and the ticket, index and address-manager stores. The stateful surfaces are unfuzzed too — the JSON-RPC and websocket dispatch, the peer and sync state machines, the mempool, the database — and those are where a reachable panic or an unbounded allocation is most likely to survive review. The targets build with overflow checks on,cargo fuzz's default, so a site where Go wraps and the port writes a plain operator fails them even though the release build wraps; that is the point, since such a site makes debug and test builds disagree with the shipped binary. No corpus is committed (fuzz/corpusis ignored); the nightly jobs keep one in CI's cache, where every shard of the nightly matrix restores the whole of it and one job merges what the shards found and saves it, and the next night and the 60-second runs start from it, so a target starts cold, and has to rediscover structure inside its budget, only before a night has kept its corpus or after the cache has expired. Each night the six signature targets also read seed inputs, written bysigsoak fuzz-seeds, that regenerate every class's per-PR cases, so even a cold one starts from each class's constructions. Those jobs are also the only sanitized build in CI, sincecargo fuzzdefaults to AddressSanitizer; neither the test suite nor a running node is run under a sanitizer. -
The Windows build runs unsafe code of the project's own. Every workspace crate forbids
unsafe_codeexceptdcroxide-winsvc, which denies it and holds the one audited exception: three Windows-only unsafe blocks, each allowed individually and carrying aSAFETYcomment. One registers the console control handler that holds a console close, logoff or shutdown until the daemon has shut down. The other two duplicate an inherited--piperxor--pipetxpipe handle and take ownership of the duplicate. The handle is duplicated rather than adopted because the number comes from the command line: a number that names no open handle, or one another part of the process owns, then fails or yields a handle of the daemon's own instead of a double close. Non-Windows builds compile none of it. CI's Windows job runs the handle adoption and the handler's registration. Nothing automated raises a real console close, logoff or shutdown event, which needs an interactive Windows console, so the path Windows takes through the handler is exercised only by unit tests of its logic. -
Nobody has read the dependencies.
cargo-denydoes run on every push tomasterand every pull request againstdeny.toml, gating the RustSec advisory database, a licence allow-list, yanked crates, and unknown registries or git sources. That is an automated check against a list of problems someone else already found; it is not a review. Almost nothing in the tree has been read — one ledger entry is markedreviewed@, and one more was read in a single respect — and the tree includes the elliptic-curve implementations, the TLS stack, rustls over RustCrypto's crates under the project's own provider,dcroxide-tlscrypto, which nobody outside the project has read either,dcroxide-secp256k1-vartime, the project's port of libsecp256k1's variable-time arithmetic, which every ECDSA and EC-Schnorr-DCRv0 verification runs on and which nobody outside the project has read either (ADR-0016), and the storage engine that this node's key handling and on-disk consensus state rest on. docs/dependency-ledger.md does not close this gap, but it bounds it: the twelve crates that are consensus- observable or touch key material now carry an explicit decision each, so their trust status is stated rather than assumed and a version bump of one of them is a decision rather than a silent lockfile change. Most of those decisions are still "accepted without a read." The storage engine exercised that bound this cycle: redb went 2.6.3 to 4.1.0 on 2026-08-13, across two majors and a changed on-disk format, argued in ADR-0004's upgrade addendum rather than arriving as a lockfile change. It is maintenance, not hardening. 4.1.0 carried four known issues, none a regression against 2.6.3 and all concerning a file that is already damaged or hostile. The lock now pins 5.0.0, and redb 4.2.0 shipped a fix for three of them, each with a regression test that names the issue: #1331, an unvalidated 5-bit page order that aborted the process, and #1332, a cyclic branch pointer reached from ordinary reads, are now reported as corruption — as an error on a point read of a UTXO row and on the UTXO stats walk; as absence on other point reads of a row, as ffldb'sGetdiscards a store error; as a refusal to open where the damage is in the bucket index, which since 2026-10-16 the database reads whole when it opens and answers every nested bucket lookup from without a read, so that damage there after the open is met by no lookup, where ffldb's lookup reads the row each time and, on a store error, finds no bucket; and on other bucket walks by ending the store's side of the walk, as ffldb's cursor treats an iterator error (before 2026-09-23 such a walk skipped the error and spun forever on redb's repeatedPreviousIo) — and #1333, a repair-path panic that left a file permanently unopenable, now returns an error for the corrupt freed-page entry that caused it. 4.5.0 reports two more kinds of damage as corruption where it panicked: a malformed allocator state met by an open, and some damage met by repair,check_integrityor a commit. A build with debug assertions, which a release build is not, still panics at both, unless it is a fuzzing build (--cfg fuzzing). 5.0.0, taken on 2026-11-19 with no change of file format, behaves the same at both. Read-path checksum verification is not in 5.0.0: reads do not compare page checksums, which redb checks only whencheck_integrityor repair walks whole trees. Some damage still aborts the process, too — a page whose type byte is neither leaf nor branch reaches anunreachable!()in redb's btree descent, and this workspace builds withpanic = "abort".
Every ported package is tested against dcrd itself — differential tests through a Go oracle binary that links dcrd's published modules, plus replays of vectors dumped from inside dcrd's own test packages. That catches divergence, which is the failure mode this port is most exposed to. It does not catch a design flaw shared with dcrd, and it does not substitute for review by someone who did not write the code.
It also does not catch a control that is wrong in the other direction.
Four of the security campaign's fixes, as first written, defended
against an attacker by breaking things for legitimate users: a getdata
ban score that would have banned peers doing ordinary early-chain sync,
an RPC admission ceiling that turned a thread flood into a total
outage, a full-queue disconnect that severed honest peers on slow
links, and a write deadline that bounded each send instead of the
message. None of the four was caught by reading the code; each came out
of separately re-deriving what happens to an honest peer under load,
which is now a standing question in the review rather than an
afterthought. In the same campaign, five comments were found asserting
the opposite of what the code beneath them did — and a later sweep
retired twelve more — including one that
justified a coarse server-wide lock as dcrd's own per-request locking,
where dcrd takes no server-wide lock at all. Comments in this
repository are claims, not evidence. (That lock has since been removed:
the RPC server now carries dcrd's per-field locks, and the handler seams
take &self. See PARITY.md's websocket-delivery note.)
One design flaw shared with dcrd was found by the project's review, and
the port no longer shares it. A peer asked for a valid block can answer
with a copy that keeps the block's header and repeats the tail of one
of its merkle trees, which keeps the trees' roots. With the header
commitments agenda's state decided, as it is for every mainnet and
testnet3 block, dcrd counts the copy's data as the header's, refuses the
copy for its size, marks the header as failed, and then refuses the
valid block when it arrives. That is dcrd's code as read, with the
marking itself seen in a replay through dcrd of a block whose header
names the wrong size; no such copy has been sent to dcrd. The port
refuses the copy for its size before it counts the data as the
header's, and marks nothing. A header that an earlier build marked this
way stays marked until reconsiderblock clears it. The divergence and
its reasoning are in PARITY.md, The header's size
and a proven data commitment.