![]()
The MWC development team has completed AI-driven code audits of both the MWC node and the MWC wallet, along with the cryptographic and RPC libraries they depend on. Every finding was addressed in code and published as a file-by-file record. Both audits were hardening exercises: no consensus algorithm was changed, and the network's rules behave exactly as they did before.
What was audited
The reviews covered the node and the wallet along with the libraries underneath them, rather than either project in isolation. That scope included:
- secp256k1-zkp and rust-secp256k1-zkp β the elliptic-curve and range-proof libraries that underpin Confidential Transactions
- easy-jsonrpc-mwc β the JSON-RPC layer
- mwc-node itself, crate by crate:
core,chain,keychain,store,pool,p2p,api,servers,config,util, and the node binary - mwc-wallet, crate by crate:
api,config,controller,impls,libwallet,util, and the wallet workflow
Auditing the dependencies alongside the node matters, because the cryptographic primitives are where a silent arithmetic fault would be hardest to detect and most costly.
One scope note worth stating plainly: the wallet audit covers mwc-wallet, the wallet used with a full node. The desktop GUI wallet, mwc-qt-wallet, has not yet shipped an audited release.
How it worked
The same method was used for both audits. An AI code review was run systematically across every crate, producing a set of findings for the team to triage. Each finding was then addressed by hand in the source, with the reasoning recorded against the specific file and function it applied to. The result is a detailed, file-by-file record published alongside each release rather than a summary judgment.
The review was deliberately broad rather than narrow. Instead of hunting for a single class of exploit, it examined every place where the code made an assumption that was not enforced β arithmetic that could overflow, conversions that could lose data, errors that were swallowed, and inputs that were trusted without validation.
What the node audit found
Two issues recurred across nearly every crate, and together they account for the bulk of the changes:
- Possible data overflow. Arithmetic that could not be proven safe was switched to checked or saturating operations, so an overflow now produces a defined error instead of a silently wrong number.
- Unsafe type conversions. Conversions where data could be lost or altered were switched to checked conversions.
Beyond those two themes, the review drove a number of structural improvements:
- Errors are propagated rather than swallowed. Many functions became fallible, returning a
Resultinstead of panicking or continuing with a bad value. - Inputs are validated at boundaries. Deserialization of untrusted data was hardened throughout β strict boolean bytes instead of "any non-zero means true", explicit length checks, and rejection of trailing bytes after a structure is read.
- Sensitive data is cleared properly. In secp256k1-zkp, temporary buffers holding secret material are now wiped, and the code no longer relies on
memsetfor that purpose, since compilers are permitted to optimize it away in release builds. - Documented contracts match real behaviour. Function documentation that had drifted from the implementation was corrected, so the next reader is not misled.
- Test coverage was expanded. Regression tests were added for the newly defined error paths, and the fuzzing targets were updated to match the new signatures.
No consensus rules were changed
This is the most important point for node operators, miners and exchanges: the consensus algorithms are unchanged. The proof-of-work algorithms, the difficulty adjustment, and the 20,000,000 MWC emission schedule all behave exactly as they did before this work.
Consensus code was touched, but only to make existing behaviour explicit and safe. Arithmetic in the difficulty and reward paths now uses checked operations, and invalid parameters now produce a defined consensus error instead of an undefined result. Where the graph weight calculation was made fallible, the post-hard-fork weight behaviour and the existing expected weights were preserved exactly. Difficulty is now accumulated in a wider integer type and only saturates at the extreme, specifically so the chain stays live under conditions that would previously have overflowed.
One long-range correctness fix is worth naming. The block reward calculation previously allowed every fallback epoch beyond the last defined one to keep returning the final block reward. Epoch 12 now explicitly returns the last block reward, and all later epochs return zero. This does not alter emission anywhere on the published schedule; it makes the fixed 20,000,000 supply cap exact in code rather than depending on the schedule never being queried past its final epoch.
Performance and Tor
Because the added checks touched hot paths, the node's sync process was optimized to use all available CPU cores. The practical effect is that the extra safety does not cost sync time. CPU and memory footprint are broadly unchanged β the MWC node remains light enough to run comfortably on standard hardware.
Arti, the Rust implementation of Tor, was also upgraded to the latest version. Note that Tor is enabled by default. Miners who need a direct IP connection can disable it by setting tor_enabled = false under [server.tor_config] in mwc-node.toml.
What the wallet audit found
The wallet carries different risks from the node. It holds keys, talks to untrusted peers, and runs long-lived listeners, so the findings clustered differently.
- Secret material is wiped after use. Secret values are zeroized throughout, including rewind hashes, cached node metadata, and the secret-bearing arguments passed through the Owner V2 and V3 APIs. A legacy thread-local random generator was replaced.
- The API secret file is handled strictly. Validation went from checking that the first line was readable to enforcing safe file access and usable content, with owner-only file creation and permission repair on initialization.
- Listeners and workers shut down cleanly. Foreign V2 dispatch is now bounded by a 32-thread permit that returns HTTP 429 when saturated and always releases capacity, including on panic, spawn failure, or cancellation. Cancellation now joins unfinished workers rather than risking a shutdown deadlock.
- Atomic swaps were hardened considerably. Auto-swap runs step by step instead of in the background, with marketplace locking, Ethereum finality checks, nonce management, and transaction retry. ERC20 approval, deposit, and cancellation recovery paths were added to avoid conflicting transactions and preserve funds through failures or chain reorganizations.
- Slatepack handling was tightened. Invoice finalization is bound to the authenticated Slatepack sender, one-time signing material is destroyed before the response is returned, and a protocol limitation around zero-element representation is now documented.
The same checked-arithmetic and input-validation themes from the node audit run through the wallet changes as well, along with a substantial expansion of regression tests.
Which version to run
Node β run 7.1.0. The audit findings were addressed in 7.0.0, and 7.1.0 followed with fixes for several critical performance issues found in 7.0.0 along with additional audit findings. If you are currently on 7.0.0, upgrading is strongly recommended.
Wallet β run 7.0.0. This is the release that carries the wallet audit work.
If you are upgrading either from a 6.x release, follow the migration instructions in the 7.0.0 notes first β they include a one-time permissions change that restricts the data directory to owner-only access.
One upgrade note specific to the wallet: the config file now rejects unknown or retired parameters. Review the [tor] section of your mwc-wallet.toml before starting, as it now accepts only tor_enabled.
Links
- MWC Node 7.0.0 release: https://github.com/mwcproject/mwc-node/releases/tag/7.0.0
- Node audit changelog: https://github.com/mwcproject/mwc-node/blob/master/doc/releases/release-7.0.0.md
- MWC Node 7.1.0 release (recommended): https://github.com/mwcproject/mwc-node/releases/tag/7.1.0
- MWC Wallet 7.0.0 release: https://github.com/mwcproject/mwc-wallet/releases/tag/7.0.0
- Wallet audit changelog: https://github.com/mwcproject/mwc-wallet/blob/master/doc/releases/release-7.0.0.md
- Downloads: https://mwc.mw/downloads
