Examples#
This gallery walks through blockchainkit.channels, one experiment per
breakthrough on the channels history page: Reed-Solomon codes and data-availability
sampling; payment channels from Spilman’s to Lightning, Sprites and eltoo,
with watchtowers; balance probing in a channel network; atomic swaps, BTC
Relay and the bridge exploits; and Plasma, sharding, and zk and optimistic
rollups.
Each script is self-contained and runs with
python examples/channels/<section>/<script>.py.
Erasure codes and data availability#
Data as the values of a polynomial: recovering what was lost, and catching a block producer who hides part of a block.
Reed-Solomon codes: recovering lost and corrupted symbols (1960)
Fraud proofs and data-availability sampling (Al-Bassam, Sonnino and Buterin, 2018)
Interoperability#
Moving value between chains: atomic swaps, light-client relays, and bridges that trust a committee.
BTC Relay: a Bitcoin light client in an Ethereum contract (2016)
Bridge failures: the Ronin and Wormhole exploits (2022)
Payment and state channels#
Paying off chain with the chain as judge: one-way and duplex channels, revocation and penalties, general state channels, eltoo, and watchtowers.
Spilman and Hearn’s one-way micropayment channels (2013)
Decker and Wattenhofer’s duplex micropayment channels (2015)
Poon and Dryja’s Lightning Network: revocation and penalties (2016)
Sprites and general state channels (Miller et al., 2017)
eltoo: channel updates without penalties (Decker, Russell and Osuntokun, 2018)
Watchtowers and PISA: guarding offline channel parties (McCorry et al., 2019)
Channel networks#
Routing payments across many channels, and what the errors reveal.
Balance probing and payment privacy in Lightning (Herrera-Joancomartí et al., 2019)
Scaling the chain#
Moving work off chain or splitting it up while keeping the chain’s security: Plasma, sharding, and rollups.
Plasma: child chains secured by exit games (Poon and Buterin, 2017)
OmniLedger and sharding (Kokoris-Kogias et al., 2018)
zk-rollups: validity proofs for batched transactions (2018)
Optimistic rollups and fraud-proof challenge windows (2019)