Repository navigation
Fix consensus validation and replace BIP crypto placeholders - #1
Draft
androolloyd wants to merge 51 commits into
Draft
androolloyd wants to merge 51 commits into
androolloyd wants to merge 51 commits into
Conversation
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.
Block validation could accept invalid Taproot signatures, reuse spent UTXOs, and skip witness/contextual checks. This change routes Taproot verification through the real verifier with all prevouts, rejects double-spends, fixes UTXO cache/undo behavior, validates witness and Signet commitments, and persists validated tips atomically while processing downloaded blocks in chain order.
It replaces BIP324 and BIP352 placeholder cryptography with implementations checked against upstream vectors, adds BIP39 NFKD normalization and a working CLI RPC client, and sets up locked dependencies, Rust 1.88, CI, container checks, and fuzz workflows. Workspace formatting and machine-applicable Clippy fixes are included.
Validation: 3,352 workspace tests pass; all official BIP352 cases and BIP324 packet-vector rows pass; formatting, all-feature Clippy, minimal-feature builds, native release, Docker build/CLI smoke, and all fuzz-target builds pass. A bounded parser fuzz run completed 1,613,391 executions without a crash. Dependency audit reports zero vulnerabilities/unsound warnings; the QMDB bincode maintenance warning remains.
This PR remains draft while the runtime backend work in docs/BUILD_PLAN.md continues. Shared sync/RPC state, persistent reorgs, Core parity acceptance, Electrum, snapshot/LevelDB backends, Erlay, stage providers, and devnet still need implementation. Passing unit tests does not establish full Core parity.
API changes: UtxoSet returns owned entries; silent-payment APIs require actual key/prevout information; v2 decryption takes complete encrypted packets; Rust raw-pointer FFI callers must use unsafe.