Exercises#

Every gallery example ends with an exercise. These pages collect worked solutions for a selection of them, one page per subpackage. Each solution sits in a collapsed box, so you can try the problem first, and its code is run by every documentation build.

Cryptography

Discrete logs, factoring, forged shares, curve identities, nonce reuse, and birthday collisions.

Exercises: cryptography
Ledgers and data structures

Merkle proofs and duplicated leaves, mountain ranges, Bloom-filter privacy, hash chains, and replayed payments.

Exercises: ledgers and data structures
Consensus

Byzantine rounds, Ben-Or, mining statistics, confirmations, quorums, stake splitting, and accountable safety.

Exercises: consensus
Networking

Lossy links, logical clocks, gossip on a ring, Bracha quorums, the connectivity threshold, eclipses, and short IDs.

Exercises: networking
Execution

RPN, stack depth, Forth words, busy beavers, atomicity, overflow checks, and gas prices.

Exercises: execution