Networks
Programs
| Program | ID | Status |
|---|---|---|
toda-commit | 5SwaBH3pXzEKhmL6pbqZ1JgeDiGaf6i5oVj8951RX9sm | Devnet |
toda-staking | DPV1ytT8jGMwUx4FKZJRXs6MTCsxmTA8nQfkEtAM2kae | Not deployed |
Devnet state is not permanent. Do not use devnet commitments for long-term records.
Cluster configuration
| Variable | Default | Purpose |
|---|---|---|
SOLANA_RPC_URL | https://api.devnet.solana.com | RPC endpoint |
TODA_PROGRAM_ID | None | Commitment program |
ANCHOR_AUTHORITY_KEYPAIR | ./authority-keypair.json | Commit signer |
ANCHOR_INTERVAL_MS | 300000 | Sweep interval |
SIWS_CHAIN_ID | devnet | SIWS chain name |
Generate a devnet authority with bin/dev-keypair.sh. The generated file is gitignored.
Account layout
| Field | Bytes |
|---|---|
| Anchor discriminator | 8 |
owner | 32 |
authority | 32 |
merkle_root | 32 |
memory_count | 8 |
nonce | 8 |
last_updated | 8 |
bump | 1 |
| Total | 129 |
The account size is independent of memory count.
Deriving addresses
const [commitPda] = PublicKey.findProgramAddressSync(
[Buffer.from("user"), owner.toBuffer()],
TODA_COMMIT_PROGRAM_ID,
);
const [stakeAuthority] = PublicKey.findProgramAddressSync(
[Buffer.from("stake"), owner.toBuffer()],
TODA_STAKING_PROGRAM_ID,
);
The SDK exports deriveUserCommitPda() and deriveStakeAuthorityPda().
Service ports
| Service | Port |
|---|---|
| Dashboard | 3000 |
| API | 3001 |
| Extension API | 3002 |
| Docs | 3003 |
| Postgres | 5432 |
Protocol constants
DOMAIN_SEP_LEAF = "toda:leaf:v1"
DOMAIN_SEP_NODE = "toda:node:v1"
USER_COMMIT_SEED = "user"
STAKE_AUTHORITY_SEED = "stake"
BATCH_SEAL = { maxLeaves: 64, maxAgeMs: 300_000 }
Mainnet
Mainnet requires a deployed program, a mainnet RPC, SIWS_CHAIN_ID=mainnet, and a funded authority.
Commitments do not migrate between clusters. Moving from devnet to mainnet starts a new commitment account.
See Production readiness.