Skip to main content

State Key Layout

All canoLiq keys live under prefix []byte{10} to stay clear of Canopy core prefixes:

PrefixOwner
1Accounts (Canopy core)
2Pools (Canopy core)
7Governance (Canopy core)
10canoLiq plugin

Subdomain Discriminators

Subdomains are single-byte discriminators inside JoinLenPrefix segments:

DomainIDTypePhase
Globals1Singleton1
Params11Singleton1
cCNPY Balance2Per-address1
CPLQ Balance3Per-address1
Redemption4Per-address, per-id1
Vesting Schedule5Per-address, per-id1
Vesting Index6Per-address1
Validator Incentive7Per-validator1
Validator Incentive Index8Index1
Insurance Pool9Pool scalar2
Buyback Pool10Pool scalar2
Treasury CPLQ11Pool scalar2
CPLQ Stake12Per-address2
CPLQ Unstaking13Per-address, per-id2
Proposal14Per-id2
Vote15Per-proposal, per-voter2
Buyback Order16Per-id2
Treasury Spend17Per-id2
Multisig Approval18Per-spend, per-signer2
Stake Index20Index singleton2
Validator Registry7+singletonSingleton2
note

There is no range-scan. The FSM only answers point reads, so iteration requires an explicit index. VestingIndex, ProposalIndex, CPLQStakeIndex, and the spend index all exist for this reason.