Reference
Code reference
A file-by-file guide to the repository. Files marked QUAC are QUAC's own code. The rest is Cosmos SDK reference-app wiring, adapted with the quac names and settings.
app/: the chain application
| File |
|
What it does |
config.go |
QUAC |
Chain identity: uquac/QUAC denoms, Bech32 prefixes, PQKeyType = "ml_dsa_65". Its init() sets sdk.DefaultBondDenom and seals the global address config before anything else runs. → Accounts and transactions |
pqante.go |
QUAC |
IsPQPubKey, NewPQOnlyAnteHandler, checkPQSigners, PQSigVerificationGasConsumer: the ML-DSA-only rule for transactions. → Post-quantum design |
tokenomics.go |
QUAC |
Mint parameters, MaxSupply(), QuacMintGenesis(), QuacDenomMetadata(), LogoURI, and the quacMintBasic/quacBankBasic default-genesis overrides. → Monetary policy |
app.go |
adapted |
Builds QuacApp: store keys, keepers, module manager, begin/end-block order, ante and post handlers, gRPC/REST registration. QUAC changes: explicit quac codecs for the auth and staking keepers, the mint/bank overrides, the PQ gas consumer and the PQ ante wrapper. |
export.go |
adapted |
Exports state to a genesis file for zero-height restarts. |
genesis.go |
adapted |
GenesisState type: module name → raw JSON. |
genesis_account.go |
adapted |
Genesis account type with optional module-account fields. |
upgrades.go |
adapted |
Upgrade handler registration (store migrations for SDK upgrades). |
abci.go |
adapted |
Vote-extension handler scaffolding (unused by QUAC today). |
test_helpers.go |
adapted |
Setup, NewTestNetworkFixture: build a QuacApp for tests. |
params/ |
adapted |
Encoding config types and amino registration. |
Tests
| File |
Covers |
pqante_test.go |
QUAC. IsPQPubKey (ML-DSA passes; secp256k1, nil and mixed multisig fail); gas consumer charges ML-DSA cost for the simulation placeholder; mint genesis and denom metadata validate; supply cap equals 10¹⁵ uquac. |
testutil_network_mldsa65_test.go |
Starts a two-validator in-process network with ML-DSA-65 consensus and operator keys. Checks liveness, that the validator key type is ML-DSA-65, and the private validator key file format. |
app_test.go |
App construction, module migrations, genesis export, address and module account wiring. |
make test-pq # the QUAC-specific tests, verbose
make test # everything
cmd/quacd/: the node binary
| File |
|
What it does |
main.go |
adapted |
Entry point: builds the root command and runs it with DefaultNodeHome (~/.quacd). |
cmd/root.go |
adapted |
NewRootCmd: creates a temporary app to get the encoding config, builds the client context, attaches commands and AutoCLI, then calls setPQFlagDefaults. |
cmd/commands.go |
adapted |
Command tree (init, genesis, keys, q, tx, start, comet, debug, config, prune, snapshots) and initAppConfig, which sets the 0.0025uquac minimum gas price. |
cmd/pqdefaults.go |
QUAC |
setPQFlagDefaults: walks every command and defaults --key-type, --algo and --consensus-key-algo to ml_dsa_65. |
cmd/testnet.go |
adapted |
quacd testnet init-files / start: multi-validator networks for local testing. |
cmd/quacfaucet/: the faucet
| File |
|
What it does |
main.go |
QUAC |
HTTP service: POST /claim validates a quac1 address, enforces per-address and per-IP cooldowns (persisted to JSON), and sends through quacd tx bank send from the faucet key. CORS allowlist; trusts forwarding headers only from loopback. → Faucet |
scripts/ and deploy/
| File |
What it does |
scripts/devnet.sh |
init: one-validator chain with test keys, 1-second blocks, REST API and CORS on, gRPC moved to 9190. start: run the node. → Running a node |
deploy/testnet/make-genesis.sh |
Genesis ceremony for quac-testnet-1: three ML-DSA validators, faucet account, block limits, placeholder IPs in gentx memos, per-node peer config, packaging. → Public testnet |
deploy/testnet/add-validator.sh |
Adds a validator to the running testnet: node home with fresh ML-DSA-65 keys, port offset for sharing a server, systemd service, sync wait; then MsgCreateValidator. → Public testnet |
deploy/testnet/install-node.sh |
Server install: quac system user, binaries, node home, peer-only firewall rules, quacd systemd service; on the gateway, also the faucet service and cloudflared. |
deploy/testnet/README.md |
Operator runbook for the testnet. |
website/: quantcoin.world
| Path |
What it is |
public/index.html, styles.css |
Landing page. Dyber brand marks, light/dark themes, self-hosted Open Sans. |
public/explorer/ |
The block explorer (static, reads the REST API). → Block explorer |
public/faucet/ |
Faucet form. |
public/brand/ |
Dyber cat marks, wordmarks and the QUAC icon (also the uri in the coin metadata). |
wrangler.toml |
Cloudflare Workers static-assets deployment for quantcoin.world. |
| Path |
What it is |
docs/*.md |
These pages. They read as plain Markdown on GitHub, too. |
docs/nav.json |
Sidebar order and grouping. |
tools/docsgen/ |
A small Go program (its own module) that renders docs/ to HTML with goldmark and syntax highlighting. It rewrites .md links to site URLs and source paths to GitHub links, and builds the search index. |
docs-site/static/, docs-site/wrangler.toml |
Docs styles and assets, and the docs.quantcoin.world deployment. |
make docs # render to docs-site/public/
cd docs-site && npx wrangler deploy # publish
Dependencies
| Module |
Version |
Why |
github.com/cosmos/cosmos-sdk |
v0.55.1 |
Application framework; ML-DSA-65 account and consensus key types |
github.com/cometbft/cometbft |
v0.40.0 |
Consensus engine; ML-DSA-65 votes and larger signature limits |
github.com/cloudflare/circl |
(indirect) |
ML-DSA-65 implementation used by CometBFT's crypto/mldsa65 |
| Go |
1.26.11 |
Toolchain required by SDK v0.55 |
Edit this page on GitHub