Skip to Content
DevelopersArchitecture

Architecture

Tidecoin Core is a Bitcoin Core v30-derived node with Tidecoin-specific consensus, wallet, proof-of-work, and post-quantum cryptography extensions. Most subsystems keep the Bitcoin Core shape; the project changes the cryptographic and consensus surfaces that Tidecoin needs to be post-quantum.

This page is a contributor map. It is not the consensus specification; use Protocol for normative rules.

Main Subsystems

AreaMain pathsResponsibility
Kernel and chain parameterssrc/kernel/, src/chainparams*Consensus parameters, network constants, deployment heights, genesis data
Validationsrc/validation.cpp, src/validationinterface.*Block, transaction, mempool, chainstate, and UTXO validation flow
Scriptsrc/script/, src/addresstype.cppScript execution, script flags, descriptors, destination encoding
PQ cryptographysrc/pq/Falcon, ML-DSA, scheme registry, PQHD, ML-KEM-related code
AuxPoWsrc/auxpow.*, mining and validation pathsMerged-mining header/proof handling and chain ID checks
Walletsrc/wallet/Descriptor wallets, PQHD seed storage, signing, backup, wallet RPC
RPC, REST, ZMQsrc/rpc/, src/wallet/rpc/, src/zmq/Node and wallet control APIs
P2Psrc/net*, src/net_processing.cppPeer connections, message handling, relay, transport
Testssrc/test/, test/functional/, src/test/fuzz/Unit, functional, and fuzz coverage

Validation Flow

The normal transaction and block flow is:

P2P/RPC input -> transaction or block parsing -> contextual validation -> script verification -> PQ signature verification where scripts require it -> mempool acceptance or block connection -> UTXO set update

For PQ signatures, the important script path is:

EvalScript() -> EvalChecksig() -> CheckPostQuantumSignature() -> VerifyPostQuantumSignature() -> CPubKey::Verify() -> pq::VerifyPrefixed()

Scheme selection comes from the prefix byte on the serialized PQ public key, not from wallet policy.

AuxPoW Flow

Post-AuxPoW blocks carry proof data that links a Tidecoin block candidate to a scrypt parent proof of work. Validation checks the parent proof, the commitment to the Tidecoin block hash, chain ID separation, and the local Tidecoin block rules.

AuxPoW activation also gates script and signature behavior, so mining changes and post-AuxPoW cryptographic features must be reviewed together.

Wallet Flow

Wallet code is not consensus-critical, but it creates consensus objects. PQHD wallet behavior should therefore be tested against protocol rules:

PQHD seed -> hardened derivation path -> scheme-specific keypair -> scheme-prefixed public key -> descriptor/address/script -> transaction signing

Descriptors and PSBT metadata can describe origins. They are not replacements for seed material.

Contributor Rule

When changing a subsystem, identify whether the change is:

  • consensus-critical;
  • wallet-policy-only;
  • relay-policy-only;
  • RPC/interface-only;
  • test-only;
  • documentation-only.

Consensus and cryptography changes require the broadest tests and review. Do not make them as incidental cleanup inside a larger patch.

See also: Repo Map, Testing, Protocol, Scheme Registry.

Last updated on