Skip to content

Add Crown Phase 1 network identity and static validator scaffold - #17

Merged
defunctec merged 11 commits into
successor-base-v31.1from
copilot/crown-successor-phase-1-scaffold
Sep 16, 2026
Merged

defunctec merged 11 commits into
successor-base-v31.1from
copilot/crown-successor-phase-1-scaffold

Conversation

Copilot AI commented Sep 16, 2026 •

Copy link
Copy Markdown

This PR adds the Phase 1 Crown successor scaffold on top of the Bitcoin Core v31.1 baseline: an isolated experimental Crown network plus the minimum validator configuration/runtime hooks needed for later BFT work. It keeps Bitcoin’s existing PoW block production and chain-selection behavior intact while introducing Crown-specific code under a narrow integration surface.

  • Network isolation

    • adds ChainType::CROWN and wires it through chain selection, base params, chain params, CLI/help surfaces, Qt network styling, and functional-test message magic
    • introduces an experimental Crown network profile with dedicated datadir, ports, message magic, and distinct Bech32 HRP
    • keeps Crown-specific behavior out of existing Bitcoin networks
  • Crown module boundary

    • adds src/crown/options.* and src/crown/validator.*
    • keeps validator definitions, quorum math, and runtime option handling inside src/crown/ rather than spreading Crown logic across upstream code
  • Static validator scaffold

    • defines the four Phase 1 validators (validator-a through validator-d)
    • models only the data needed for future consensus work: validator id, consensus pubkey, and voting power
    • encodes exact quorum math for the fixed 25/25/25/25 voting-power split
  • Validator runtime behavior

    • defaults Crown nodes to explicit non-validator operation
    • adds Crown validator startup options for enabling validator mode, selecting validator identity, and supplying a test-only private key
    • rejects validator configuration on non-Crown chains and validates dependent arguments cleanly
  • ECC-safe initialization

    • defers private-key decoding, pubkey derivation, and identity matching until the post-ECC startup phase
    • retains only derived validator identity/runtime metadata after validation rather than keeping private keys in long-lived node state
  • Tests and documentation

    • adds unit coverage for chain selection, validator math, key matching, option validation, and touched network-dependent cases
    • adds a functional startup test for Crown non-validator and validator flows
    • documents the Phase 1 patch surface, lifecycle constraints, and intentional regtest-like PoW/genesis posture

Example of the new Crown validator surface:

bitcoind -crown=1 \
  -crownvalidator=1 \
  -crownvalidatorid=validator-a \
  -crownvalidatorprivkey=0000000000000000000000000000000000000000000000000000000000000001

Copilot AI and others added 10 commits September 16, 2026 16:34
Co-authored-by: defunctec <9864793+defunctec@users.noreply.github.com>
Co-authored-by: defunctec <9864793+defunctec@users.noreply.github.com>
Co-authored-by: defunctec <9864793+defunctec@users.noreply.github.com>
Co-authored-by: defunctec <9864793+defunctec@users.noreply.github.com>
Co-authored-by: defunctec <9864793+defunctec@users.noreply.github.com>
Co-authored-by: defunctec <9864793+defunctec@users.noreply.github.com>
Co-authored-by: defunctec <9864793+defunctec@users.noreply.github.com>
Co-authored-by: defunctec <9864793+defunctec@users.noreply.github.com>
Co-authored-by: defunctec <9864793+defunctec@users.noreply.github.com>
Co-authored-by: defunctec <9864793+defunctec@users.noreply.github.com>
Copilot AI changed the title Add Crown Phase 1 network and validator scaffold Add Crown Phase 1 network identity and static validator scaffold Sep 16, 2026
Copilot AI requested a review from defunctec September 16, 2026 17:04
Co-authored-by: defunctec <9864793+defunctec@users.noreply.github.com>
@defunctec
defunctec marked this pull request as ready for review September 16, 2026 18:56
@defunctec
defunctec merged commit 3d2457b into successor-base-v31.1 Sep 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants