17 — Cryptocurrency ledger — state and transactions
The blockchain learning track now uses one coherent NeedMoreCoin example set
instead of separate toy hash/signature programs. Six variants cover sentence,
beginner, and advanced NME in Korean and English.
Start with:
nme check examples/needmorecoin-sentence.en
nme run examples/needmorecoin-sentence.en
State rules
The ledger stores balances, each address's last transaction nonce, and total
supply. A transaction is applied only after its proof, positive amount,
amount + fee balance requirement, and exact next nonce all validate.
The nonce prevents an already accepted signed transaction from being applied a second time. Fees move existing coins from sender to miner; mining rewards mint new coins. Therefore the validator must preserve:
sum of wallet balances = initial supply + minted mining rewards
Six variants
needmorecoin-sentence.ko.nmeneedmorecoin-sentence.en.nmeneedmorecoin-beginner.ko.nmeneedmorecoin-beginner.en.nmeneedmorecoin-advanced.ko.nmeneedmorecoin-advanced.en.nme
Next, 18 — Proof of work binds this state to previous block hashes and requires real SHA-256 work before a block is accepted.