0000: 5b 75 70 5d 28 73 71 75 69 64 2e 6d 64 29 20 5b [up](squid.md) [
0010: 62 61 63 6b 5d 28 73 71 75 69 64 2d 73 70 65 63 back](squid-spec
0020: 75 6c 61 74 69 6f 6e 2e 6d 64 29 20 5b 6e 65 78 ulation.md) [nex
0030: 74 5d 28 73 71 75 69 64 2d 6d 69 6e 69 6e 67 2e t](squid-mining.
0040: 6d 64 29 0a 0a 23 20 57 68 79 20 61 20 42 6c 6f md)..# Why a Blo
0050: 63 6b 43 68 61 69 6e 3f 0a 0a 53 6f 20 77 68 65 ckChain?..So whe
0060: 6e 20 49 27 6d 20 6b 69 6e 64 20 6f 66 20 6f 6b n I'm kind of ok
0070: 20 77 69 74 68 20 66 69 61 74 20 6d 6f 6e 65 79 with fiat money
0080: 20 28 61 74 20 6c 65 61 73 74 20 77 69 74 68 20 (at least with
0090: 74 68 65 20 62 69 67 20 6f 6e 65 73 20 77 68 65 the big ones whe
00a0: 72 65 20 74 68 65 0a 72 65 67 75 6c 61 74 69 6f re the.regulatio
00b0: 6e 20 77 6f 72 6b 73 29 2c 20 61 6e 64 20 77 6f n works), and wo
00c0: 75 6c 64 20 75 73 65 20 74 68 65 20 42 6c 6f 63 uld use the Bloc
00d0: 6b 43 68 61 69 6e 20 6f 6e 6c 79 20 66 6f 72 20 kChain only for
00e0: 74 72 61 64 69 6e 67 20 77 69 74 68 0a 76 61 6c trading with.val
00f0: 75 65 61 62 6c 65 73 20 63 72 65 61 74 65 64 20 ueables created
0100: 6f 75 74 73 69 64 65 2c 20 6c 69 6b 65 20 66 69 outside, like fi
0110: 61 74 20 6d 6f 6e 65 79 20 6f 72 20 72 65 61 6c at money or real
0120: 20 65 73 74 61 74 65 2c 20 74 68 65 6e 20 77 68 estate, then wh
0130: 79 20 6e 6f 74 20 75 73 65 20 61 0a 73 79 73 74 y not use a.syst
0140: 65 6d 20 6c 69 6b 65 20 5b 47 4e 55 20 54 61 6c em like [GNU Tal
0150: 65 72 5d 28 68 74 74 70 73 3a 2f 2f 74 61 6c 65 er](https://tale
0160: 72 2e 6e 65 74 2f 29 2c 20 77 68 69 63 68 20 68 r.net/), which h
0170: 61 6e 64 73 20 6f 76 65 72 20 74 68 65 20 6a 6f ands over the jo
0180: 62 20 6f 66 0a 63 68 65 63 6b 69 6e 67 20 74 68 b of.checking th
0190: 65 20 64 6f 75 62 6c 65 20 73 70 65 6e 64 69 6e e double spendin
01a0: 67 20 74 6f 20 74 68 65 20 62 61 6e 6b 73 3f 0a g to the banks?.
01b0: 0a 57 65 6c 6c 2c 20 73 65 65 6d 73 20 74 6f 20 .Well, seems to
01c0: 62 65 20 61 20 67 6f 6f 64 20 69 64 65 61 2c 20 be a good idea,
01d0: 62 75 74 20 69 74 20 74 75 72 6e 65 64 20 6f 75 but it turned ou
01e0: 74 20 74 68 61 74 20 74 68 65 20 62 61 6e 6b 73 t that the banks
01f0: 20 68 61 76 65 0a 64 65 65 70 20 74 72 6f 75 62 have.deep troub
0200: 6c 65 73 20 77 69 74 68 20 74 72 75 73 74 2c 20 les with trust,
0210: 61 73 20 77 65 6c 6c 2e 0a 0a 21 5b 49 6e 20 63 as well.....So
02a0: 20 61 63 74 75 61 6c 6c 79 2c 20 74 68 65 20 62 actually, the b
02b0: 61 6e 6b 73 20 73 65 65 20 74 68 65 20 42 6c 6f anks see the Blo
02c0: 63 6b 43 68 61 69 6e 20 61 73 20 74 68 65 20 73 ckChain as the s
02d0: 61 76 69 6f 75 72 20 6f 66 20 74 68 65 69 72 0a aviour of their.
02e0: 69 6e 61 62 69 6c 69 74 79 20 74 6f 20 6d 75 74 inability to mut
02f0: 75 61 6c 20 74 72 75 73 74 2e 20 20 4f 72 20 6d ual trust. Or m
0300: 61 79 62 65 20 74 68 65 79 20 6a 75 73 74 20 68 aybe they just h
0310: 61 76 65 20 74 68 6f 73 65 20 64 6f 6c 6c 61 72 ave those dollar
0320: 20 73 69 67 6e 73 0a 69 6e 20 74 68 65 20 65 79 signs.in the ey
0330: 65 73 2c 20 61 6e 64 20 66 61 6c 6c 20 66 6f 72 es, and fall for
0340: 20 74 68 65 20 68 79 70 65 3f 20 20 57 68 6f 20 the hype? Who
0350: 6b 6e 6f 77 73 2e 20 20 50 72 6f 70 65 72 0a 64 knows. Proper.d
0360: 65 63 65 6e 74 72 61 6c 69 7a 61 74 69 6f 6e 20 ecentralization
0370: 69 73 20 61 6c 73 6f 20 61 20 77 61 79 20 74 6f is also a way to
0380: 20 63 72 65 61 74 65 20 72 65 6c 69 61 62 6c 65 create reliable
0390: 20 73 6f 66 74 77 61 72 65 2c 20 73 6f 20 69 74 software, so it
03a0: 27 73 0a 73 74 69 6c 6c 20 77 6f 72 74 68 20 74 's.still worth t
03b0: 6f 20 70 75 72 73 75 65 2e 0a 0a 23 23 20 48 6f o pursue...## Ho
03c0: 77 20 74 6f 20 72 65 61 6c 6c 79 20 64 69 73 74 w to really dist
03d0: 72 69 62 75 74 65 20 62 6f 6f 6b 2d 6b 65 65 70 ribute book-keep
03e0: 69 6e 67 0a 0a 5f 46 6f 72 20 74 68 65 20 72 65 ing.._For the re
03f0: 63 6f 72 64 3a 20 57 65 43 68 61 74 27 73 20 70 cord: WeChat's p
0400: 61 79 6d 65 6e 74 20 73 79 73 74 65 6d 20 68 61 ayment system ha
0410: 73 20 69 6e 20 74 68 65 20 6f 72 64 65 72 20 6f s in the order o
0420: 66 20 31 20 6d 69 6c 6c 69 6f 6e 20 54 50 53 0a f 1 million TPS.
0430: 70 65 61 6b 20 6f 6e 20 43 68 69 6e 65 73 65 20 peak on Chinese
0440: 4e 65 77 20 59 65 61 72 5f 0a 0a 41 20 e2 80 9c New Year_..A “
0450: 64 69 73 74 72 69 62 75 74 65 64 20 64 61 74 61 distributed data
0460: 62 61 73 65 e2 80 9d 20 63 61 6e 20 62 65 20 72 base” can be r
0470: 65 70 6c 69 63 61 74 65 64 20 6f 72 20 70 61 72 eplicated or par
0480: 74 69 74 69 6f 6e 65 64 20 28 6f 72 20 62 6f 74 titioned (or bot
0490: 68 29 2e 0a 42 6c 6f 63 6b 43 68 61 69 6e 73 20 h)..BlockChains
04a0: 61 73 20 6f 66 20 6e 6f 77 20 61 72 65 20 72 65 as of now are re
04b0: 70 6c 69 63 61 74 65 64 3b 20 74 68 61 74 27 73 plicated; that's
04c0: 20 74 68 65 20 73 63 61 6c 69 6e 67 20 70 72 6f the scaling pro
04d0: 62 6c 65 6d 20 6d 65 6e 74 69 6f 6e 65 64 20 69 blem mentioned i
04e0: 6e 0a 74 68 65 20 62 75 6c 6c 73 68 69 74 20 62 n.the bullshit b
04f0: 69 6e 67 6f 20 73 68 65 65 74 20 61 62 6f 76 65 ingo sheet above
0500: 2e 20 20 54 68 65 79 20 61 6c 73 6f 20 6e 65 65 . They also nee
0510: 64 20 74 6f 20 62 65 20 70 61 72 74 69 74 69 6f d to be partitio
0520: 6e 65 64 20 74 6f 20 67 61 69 6e 20 61 6c 6c 0a ned to gain all.
0530: 74 68 65 20 62 65 6e 65 66 69 74 73 20 6f 66 20 the benefits of
0540: 6d 6f 64 65 72 6e 20 64 69 73 74 72 69 62 75 74 modern distribut
0550: 65 64 20 64 61 74 61 62 61 73 65 73 2e 20 20 44 ed databases. D
0560: 6f 69 6e 67 20 74 68 65 20 70 61 72 74 69 74 69 oing the partiti
0570: 6f 6e 69 6e 67 2f 73 68 61 72 64 69 6e 67 0a 6f oning/sharding.o
0580: 66 66 2d 63 68 61 69 6e 20 69 73 20 73 69 64 65 ff-chain is side
0590: 73 74 65 70 70 69 6e 67 20 74 68 65 20 70 72 6f stepping the pro
05a0: 62 6c 65 6d 20 69 6e 73 74 65 61 64 20 6f 66 20 blem instead of
05b0: 73 6f 6c 76 69 6e 67 20 69 74 2e 20 20 28 4e 6f solving it. (No
05c0: 74 65 20 74 68 61 74 20 74 68 65 0a 6c 69 67 68 te that the.ligh
05d0: 74 6e 69 6e 67 20 6e 65 74 77 6f 72 6b 20 28 4c tning network (L
05e0: 4e 29 20 68 69 6e 74 73 20 61 74 20 70 6f 73 73 N) hints at poss
05f0: 69 62 6c 65 20 73 6f 6c 75 74 69 6f 6e 73 2c 20 ible solutions,
0600: 77 69 74 68 6f 75 74 20 62 65 69 6e 67 20 6f 6e without being on
0610: 65 2e 20 20 54 68 65 0a 6d 61 69 6e 20 70 72 6f e. The.main pro
0620: 62 6c 65 6d 20 6f 66 20 74 68 65 20 4c 4e 20 69 blem of the LN i
0630: 73 20 74 68 61 74 20 69 74 20 72 65 71 75 69 72 s that it requir
0640: 65 73 20 6f 6e 2d 63 68 61 69 6e 20 63 6f 6e 66 es on-chain conf
0650: 6c 69 63 74 20 72 65 73 6f 6c 75 74 69 6f 6e 2c lict resolution,
0660: 20 61 6e 64 0a 64 75 65 20 74 6f 20 74 68 65 20 and.due to the
0670: 6c 69 6d 69 74 65 64 20 61 6d 6f 75 6e 74 20 6f limited amount o
0680: 66 20 6f 6e 2d 63 68 61 69 6e 20 74 72 61 6e 73 f on-chain trans
0690: 61 63 74 69 6f 6e 73 2c 20 72 6f 67 75 65 20 61 actions, rogue a
06a0: 63 74 6f 72 73 20 61 72 65 0a 65 6e 63 6f 75 72 ctors are.encour
06b0: 61 67 65 64 20 74 6f 20 70 72 6f 64 75 63 65 20 aged to produce
06c0: 73 6f 20 6d 61 6e 79 20 63 6f 6e 66 6c 69 63 74 so many conflict
06d0: 73 20 74 68 61 74 20 74 68 65 20 65 78 74 65 72 s that the exter
06e0: 6e 61 6c 20 61 72 62 69 74 65 72 2c 20 74 68 65 nal arbiter, the
06f0: 0a 42 6c 6f 63 6b 43 68 61 69 6e 2c 20 63 6f 6c .BlockChain, col
0700: 6c 61 70 73 65 73 20 75 6e 64 65 72 20 74 68 65 lapses under the
0710: 20 6c 6f 61 64 2c 20 61 6e 64 20 6d 6f 73 74 20 load, and most
0720: 63 6f 6e 66 6c 69 63 74 73 20 61 72 65 20 6e 65 conflicts are ne
0730: 76 65 72 20 72 65 73 6f 6c 76 65 64 2e 29 0a 0a ver resolved.)..
0740: 41 6e 20 69 6d 70 6f 72 74 61 6e 74 20 64 65 73 An important des
0750: 69 67 6e 20 67 6f 61 6c 20 66 6f 72 20 6d 65 20 ign goal for me
0760: 69 73 20 74 6f 20 68 61 6e 64 6c 65 20 6d 61 73 is to handle mas
0770: 73 69 76 65 20 61 6d 6d 6f 75 6e 74 73 20 6f 66 sive ammounts of
0780: 0a 6d 69 63 72 6f 70 61 79 6d 65 6e 74 73 2c 20 .micropayments,
0790: 62 65 63 61 75 73 65 20 74 68 61 74 27 73 20 61 because that's a
07a0: 6e 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 77 68 n application wh
07b0: 65 72 65 20 49 20 73 65 65 20 61 20 6c 65 67 69 ere I see a legi
07c0: 74 69 6d 65 20 6e 65 65 64 20 66 6f 72 0a 63 72 time need for.cr
07d0: 79 70 74 6f 67 72 61 70 68 69 63 20 70 61 79 6d yptographic paym
07e0: 65 6e 74 20 70 72 6f 74 65 63 74 69 6f 6e 2e 20 ent protection.
07f0: 20 52 61 6e 73 6f 6d 77 61 72 65 20 66 65 65 73 Ransomware fees
0800: 2c 20 74 61 78 20 65 76 61 73 69 6f 6e 2c 20 61 , tax evasion, a
0810: 6e 64 20 69 6c 6c 65 67 61 6c 0a 62 75 73 69 6e nd illegal.busin
0820: 65 73 73 20 61 72 65 20 66 72 69 6e 67 65 20 63 ess are fringe c
0830: 61 73 65 73 20 77 69 74 68 6f 75 74 20 62 65 6e ases without ben
0840: 65 66 69 74 20 74 6f 20 6d 61 6e 6b 69 6e 64 2c efit to mankind,
0850: 20 61 6e 64 20 74 68 65 72 65 66 6f 72 65 20 6e and therefore n
0860: 6f 74 0a 69 6e 74 65 72 65 73 74 69 6e 67 2e 0a ot.interesting..
0870: 0a 41 6c 6c 20 63 6f 69 6e 73 2f 61 63 63 6f 75 .All coins/accou
0880: 6e 74 73 20 68 61 76 65 20 61 20 76 61 6c 75 65 nts have a value
0890: 2c 20 61 20 75 6e 69 74 20 28 69 66 20 79 6f 75 , a unit (if you
08a0: 20 77 61 6e 74 20 74 6f 20 6b 65 65 70 20 64 69 want to keep di
08b0: 66 66 65 72 65 6e 74 20 6b 69 6e 64 73 0a 6f 66 fferent kinds.of
08c0: 20 76 61 6c 75 65 73 20 69 6e 20 74 68 65 20 73 values in the s
08d0: 61 6d 65 20 6c 65 64 67 65 72 2c 20 79 6f 75 20 ame ledger, you
08e0: 6e 65 65 64 20 74 68 61 74 29 2c 20 61 20 63 72 need that), a cr
08f0: 65 61 74 69 6f 6e 20 64 61 74 65 20 28 74 69 6d eation date (tim
0900: 65 20 6f 66 20 74 68 65 0a 63 72 65 61 74 69 6e e of the.creatin
0910: 67 20 74 72 61 6e 73 61 63 74 69 6f 6e 2c 20 77 g transaction, w
0920: 68 69 63 68 20 61 6c 73 6f 20 69 73 20 74 68 65 hich also is the
0930: 20 69 6e 64 65 78 20 69 6e 74 6f 20 74 68 65 20 index into the
0940: 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 62 6c corresponding bl
0950: 6f 63 6b 29 2c 0a 61 6e 64 20 61 6e 20 6f 77 6e ock),.and an own
0960: 65 72 20 70 75 62 6b 65 79 2b 73 69 67 6e 61 74 er pubkey+signat
0970: 75 72 65 2c 20 6d 61 6b 69 6e 67 20 69 74 20 69 ure, making it i
0980: 6d 6d 75 74 61 62 6c 65 20 77 69 74 68 6f 75 74 mmutable without
0990: 20 63 6f 6e 73 65 6e 74 20 6f 66 20 74 68 65 0a consent of the.
09a0: 6f 77 6e 65 72 2e 0a 0a 41 6c 6c 20 74 72 61 6e owner...All tran
09b0: 73 61 63 74 69 6f 6e 73 20 63 6f 6e 74 61 69 6e sactions contain
09c0: 20 61 6e 20 69 6d 70 6c 69 63 69 74 20 62 6c 6f an implicit blo
09d0: 63 6b 20 68 61 73 68 20 74 68 61 74 20 72 65 66 ck hash that ref
09e0: 65 72 73 20 74 6f 20 74 68 65 0a 73 74 61 74 65 ers to the.state
09f0: 20 6f 66 20 74 68 65 20 6c 65 64 67 65 72 20 61 of the ledger a
0a00: 74 20 74 68 65 20 62 65 67 69 6e 6e 69 6e 67 20 t the beginning
0a10: 6f 66 20 74 68 69 73 20 74 72 61 6e 73 61 63 74 of this transact
0a20: 69 6f 6e 2c 20 61 6e 20 6f 72 69 67 69 6e 20 73 ion, an origin s
0a30: 74 61 74 65 0a 74 72 61 6e 73 69 74 69 6f 6e 2c tate.transition,
0a40: 20 61 6e 64 20 61 20 64 65 73 74 69 6e 61 74 69 and a destinati
0a50: 6f 6e 20 73 74 61 74 65 20 74 72 61 6e 73 69 74 on state transit
0a60: 69 6f 6e 20 77 69 74 68 20 74 68 65 20 73 61 6d ion with the sam
0a70: 65 20 64 65 6c 74 61 0a 28 70 6f 73 73 69 62 6c e delta.(possibl
0a80: 65 20 74 72 61 6e 73 61 63 74 69 6f 6e 20 66 65 e transaction fe
0a90: 65 73 20 6c 65 66 74 20 6f 75 74 20 66 6f 72 20 es left out for
0aa0: 73 69 6d 70 6c 69 66 69 63 61 74 69 6f 6e 29 2e simplification).
0ab0: 0a 0a 54 68 65 73 65 20 61 72 65 20 74 68 65 20 ..These are the
0ac0: 6f 70 65 72 61 74 69 6f 6e 73 20 79 6f 75 20 77 operations you w
0ad0: 61 6e 74 20 74 6f 20 70 65 72 66 6f 72 6d 20 69 ant to perform i
0ae0: 6e 20 74 68 65 20 6c 65 64 67 65 72 3a 0a 0a 20 n the ledger:..
0af0: 20 31 2e 20 59 6f 75 20 77 61 6e 74 20 74 6f 20 1. You want to
0b00: 6d 6f 76 65 20 61 20 63 6f 69 6e 20 66 72 6f 6d move a coin from
0b10: 20 6f 6e 65 20 6f 77 6e 65 72 20 74 6f 20 61 6e one owner to an
0b20: 6f 74 68 65 72 20 28 6d 61 79 20 69 6d 70 6c 79 other (may imply
0b30: 0a 20 20 20 20 20 6c 65 64 67 65 72 2f 73 68 61 . ledger/sha
0b40: 72 64 20 63 68 61 6e 67 65 29 0a 0a 20 20 32 2e rd change).. 2.
0b50: 20 59 6f 75 20 77 61 6e 74 20 74 6f 20 62 65 20 You want to be
0b60: 61 62 6c 65 20 74 6f 20 6a 6f 69 6e 20 73 65 76 able to join sev
0b70: 65 72 61 6c 20 63 6f 69 6e 73 20 69 6e 74 6f 20 eral coins into
0b80: 6f 6e 65 0a 0a 20 20 33 2e 20 59 6f 75 20 77 61 one.. 3. You wa
0b90: 6e 74 20 74 6f 20 73 70 6c 69 74 20 61 20 63 6f nt to split a co
0ba0: 69 6e 0a 0a 54 72 61 6e 73 61 63 74 69 6f 6e 73 in..Transactions
0bb0: 20 61 72 65 20 68 61 6e 64 6c 65 64 20 62 79 20 are handled by
0bc0: 5b 64 75 6d 70 20 63 6f 6e 74 72 61 63 74 73 5d [dump contracts]
0bd0: 28 73 71 75 69 64 2d 63 6f 6e 74 72 61 63 74 73 (squid-contracts
0be0: 2e 6d 64 29 2c 20 74 68 65 20 72 75 6c 65 73 0a .md), the rules.
0bf0: 61 72 65 20 73 69 6d 70 6c 65 20 65 6e 6f 75 67 are simple enoug
0c00: 68 20 74 68 61 74 20 65 76 65 6e 20 6d 75 6c 74 h that even mult
0c10: 69 2d 70 61 72 74 69 63 69 70 61 6e 74 20 74 72 i-participant tr
0c20: 61 6e 73 61 63 74 69 6f 6e 73 20 61 72 65 20 65 ansactions are e
0c30: 61 73 79 20 74 6f 0a 76 65 72 69 66 79 2e 20 20 asy to.verify.
0c40: 41 6c 6c 20 74 72 61 6e 73 61 63 74 69 6f 6e 73 All transactions
0c50: 20 6d 75 73 74 20 68 61 70 70 65 6e 20 69 6e 20 must happen in
0c60: 74 68 65 20 61 63 74 69 76 65 20 6c 65 64 67 65 the active ledge
0c70: 72 20 67 72 6f 75 70 2c 20 69 2e 65 2e 20 73 70 r group, i.e. sp
0c80: 6f 6f 6b 79 0a 61 63 74 69 6f 6e 73 20 61 74 20 ooky.actions at
0c90: 61 20 64 69 73 74 61 6e 63 65 20 61 72 65 20 73 a distance are s
0ca0: 74 72 69 63 74 6c 79 20 6c 69 6d 69 74 65 64 20 trictly limited
0cb0: 74 6f 20 74 68 65 20 6f 6e 65 20 61 63 74 69 76 to the one activ
0cc0: 65 20 64 69 6d 65 6e 73 69 6f 6e 20 6f 66 20 74 e dimension of t
0cd0: 68 65 0a 68 79 70 65 72 63 75 62 65 2e 0a 0a 21 he.hypercube...!
0ce0: 5b 43 6f 69 6e 20 74 72 61 6e 73 61 63 74 69 6f [Coin transactio
0cf0: 6e 5d 28 68 74 74 70 73 3a 2f 2f 75 70 6c 6f 61 n](https://uploa
0d00: 64 2e 77 69 6b 69 6d 65 64 69 61 2e 6f 72 67 2f d.wikimedia.org/
0d10: 77 69 6b 69 70 65 64 69 61 2f 63 6f 6d 6d 6f 6e wikipedia/common
0d20: 73 2f 74 68 75 6d 62 2f 63 2f 63 61 2f 46 65 79 s/thumb/c/ca/Fey
0d30: 6e 6d 61 6e 64 69 61 67 72 61 6d 2e 73 76 67 2f nmandiagram.svg/
0d40: 32 32 30 70 78 2d 46 65 79 6e 6d 61 6e 64 69 61 220px-Feynmandia
0d50: 67 72 61 6d 2e 73 76 67 2e 70 6e 67 29 0a 0a 49 gram.svg.png)..I
0d60: 20 72 65 70 72 65 73 65 6e 74 20 74 68 69 73 20 represent this
0d70: 74 72 61 6e 73 61 63 74 69 6f 6e 20 61 73 20 46 transaction as F
0d80: 65 79 6e 6d 61 6e 20 64 69 61 67 72 61 6d 2c 20 eynman diagram,
0d90: 62 65 63 61 75 73 65 20 74 68 61 74 20 61 6c 6d because that alm
0da0: 6f 73 74 20 66 69 74 73 20 74 68 65 0a 63 6f 6e ost fits the.con
0db0: 63 65 70 74 2e 20 20 49 66 20 74 68 65 20 73 6f cept. If the so
0dc0: 75 72 63 65 20 63 6f 69 6e 20 28 6f 72 20 61 63 urce coin (or ac
0dd0: 63 6f 75 6e 74 29 20 72 65 73 75 6c 74 73 20 69 count) results i
0de0: 6e 20 61 20 76 61 6c 75 65 20 6f 66 20 30 2c 20 n a value of 0,
0df0: 69 74 20 63 61 6e 0a 64 69 73 61 70 70 65 61 72 it can.disappear
0e00: 20 66 72 6f 6d 20 74 68 65 20 61 63 74 69 76 65 from the active
0e10: 20 73 74 61 74 65 73 2c 20 69 66 20 74 68 65 20 states, if the
0e20: 64 65 73 74 69 6e 61 74 69 6f 6e 20 63 6f 69 6e destination coin
0e30: 20 64 6f 65 73 6e 27 74 20 79 65 74 20 65 78 69 doesn't yet exi
0e40: 73 74 2c 0a 69 74 20 73 74 61 72 74 73 20 77 69 st,.it starts wi
0e50: 74 68 20 74 68 65 20 74 72 61 6e 73 61 63 74 69 th the transacti
0e60: 6f 6e 20 61 73 20 69 6e 69 74 69 61 6c 20 76 61 on as initial va
0e70: 6c 75 65 2e 0a 0a 43 6f 69 6e 73 20 61 72 65 20 lue...Coins are
0e80: 70 73 65 75 64 6f 6e 79 6d 6f 75 73 2c 20 61 6e pseudonymous, an
0e90: 64 20 79 6f 75 20 63 61 6e 20 68 61 76 65 20 6d d you can have m
0ea0: 61 6e 79 20 64 69 66 66 65 72 65 6e 74 20 70 73 any different ps
0eb0: 65 75 64 6f 6e 79 6d 73 2e 20 20 48 6f 77 65 76 eudonyms. Howev
0ec0: 65 72 2c 0a 63 6f 69 6e 73 20 61 73 20 70 72 6f er,.coins as pro
0ed0: 70 6f 73 65 64 20 68 65 72 65 20 68 61 76 65 20 posed here have
0ee0: 72 65 61 64 61 62 6c 65 20 76 61 6c 75 65 73 20 readable values
0ef0: 61 74 74 61 63 68 65 64 2e 20 20 49 74 27 73 20 attached. It's
0f00: 6c 69 6b 65 6c 79 20 74 68 61 74 20 6d 69 78 0a likely that mix.
0f10: 73 65 72 76 69 63 65 73 20 77 69 6c 6c 20 62 65 services will be
0f20: 20 6f 66 66 65 72 65 64 20 66 6f 72 20 67 61 69 offered for gai
0f30: 6e 69 6e 67 20 61 6e 6f 6e 79 6d 69 74 79 2e 20 ning anonymity.
0f40: 20 59 6f 75 20 74 72 61 6e 73 66 65 72 20 74 6f You transfer to
0f50: 20 6f 6e 65 20 63 6f 69 6e 20 6f 66 0a 74 68 65 one coin of.the
0f60: 20 6d 69 78 20 73 65 72 76 69 63 65 2c 20 61 6e mix service, an
0f70: 64 20 79 6f 75 20 67 65 74 20 62 61 63 6b 20 73 d you get back s
0f80: 65 76 65 72 61 6c 20 63 6f 69 6e 73 20 66 72 6f everal coins fro
0f90: 6d 20 6f 74 68 65 72 20 63 6f 69 6e 73 20 6f 66 m other coins of
0fa0: 20 74 68 61 74 20 73 61 6d 65 0a 6d 69 78 20 73 that same.mix s
0fb0: 65 72 76 69 63 65 2c 20 61 6e 64 20 79 6f 75 20 ervice, and you
0fc0: 73 70 6c 69 74 20 61 6e 64 20 6d 65 72 67 65 20 split and merge
0fd0: 74 68 65 6d 20 61 63 63 6f 72 64 69 6e 67 6c 79 them accordingly
0fe0: 20 77 68 65 6e 20 79 6f 75 20 77 61 6e 74 20 74 when you want t
0ff0: 6f 20 64 6f 20 79 6f 75 72 0a 6e 65 78 74 20 74 o do your.next t
1000: 72 61 6e 73 61 63 74 69 6f 6e 2e 0a 0a 54 68 65 ransaction...The
1010: 72 65 20 69 73 20 6e 6f 20 6e 65 65 64 20 66 6f re is no need fo
1020: 72 20 61 20 6e 6f 6e 63 65 2c 20 74 68 65 20 6b r a nonce, the k
1030: 65 79 20 61 73 20 69 64 20 6f 66 20 74 68 65 20 ey as id of the
1040: 6f 77 6e 65 72 20 69 73 0a 73 75 66 66 69 63 69 owner is.suffici
1050: 65 6e 74 2e 20 20 54 68 65 20 63 68 65 63 6b 20 ent. The check
1060: 6f 66 20 74 68 65 20 62 61 6c 61 6e 63 65 20 69 of the balance i
1070: 73 20 73 75 66 66 69 63 69 65 6e 74 20 74 6f 20 s sufficient to
1080: 70 72 65 76 65 6e 74 20 61 6e 79 0a 61 62 75 73 prevent any.abus
1090: 65 2e 0a 0a 23 23 20 44 6f 75 62 6c 65 20 65 6e e...## Double en
10a0: 74 72 79 20 62 6f 6f 6b 6b 65 65 70 69 6e 67 20 try bookkeeping
10b0: 73 79 73 74 65 6d 0a 0a 46 69 72 73 74 20 6f 66 system..First of
10c0: 20 61 6c 6c 2c 20 69 66 20 79 6f 75 20 61 72 65 all, if you are
10d0: 20 73 6f 6d 65 68 6f 77 20 66 61 6d 69 6c 69 61 somehow familia
10e0: 72 20 77 69 74 68 20 62 6f 6f 6b 6b 65 65 70 69 r with bookkeepi
10f0: 6e 67 2c 20 e2 80 9c 61 20 6c 65 64 67 65 72 e2 ng, “a ledger
1100: 80 9d 0a 68 61 73 20 73 6f 6d 65 74 68 69 6e 67 .has something
1110: 20 66 75 6e 64 61 6d 65 6e 74 61 6c 6c 79 20 77 fundamentally w
1120: 72 6f 6e 67 20 69 6e 20 69 74 3a 20 54 68 65 20 rong in it: The
1130: 73 69 6e 67 75 6c 61 72 2e 20 20 59 6f 75 20 61 singular. You a
1140: 72 65 0a 73 75 70 70 6f 73 65 64 20 74 6f 20 68 re.supposed to h
1150: 61 76 65 20 6d 6f 72 65 20 74 68 61 6e 20 6f 6e ave more than on
1160: 65 20 6c 65 64 67 65 72 2c 20 61 6e 64 20 65 76 e ledger, and ev
1170: 65 72 79 20 74 72 61 6e 73 61 63 74 69 6f 6e 20 ery transaction
1180: 6e 65 65 64 73 20 74 6f 0a 67 6f 20 74 6f 20 74 needs to.go to t
1190: 77 6f 20 63 6f 6c 75 6d 6e 73 2c 20 6f 6e 65 20 wo columns, one
11a0: 61 73 20 64 65 62 69 74 2c 20 6f 6e 65 20 61 73 as debit, one as
11b0: 20 63 72 65 64 69 74 2e 20 20 41 6c 6c 20 76 61 credit. All va
11c0: 6c 75 65 73 20 61 72 65 20 6f 75 74 73 69 64 65 lues are outside
11d0: 20 74 68 65 0a 61 63 63 6f 75 6e 74 61 6e 74 27 the.accountant'
11e0: 73 20 68 61 6e 64 73 2c 20 73 6f 20 74 68 65 20 s hands, so the
11f0: 61 63 63 6f 75 6e 74 61 6e 74 27 73 20 62 61 6c accountant's bal
1200: 61 6e 63 65 20 69 73 20 61 6c 77 61 79 73 20 7a ance is always z
1210: 65 72 6f 20 28 70 6f 6f 72 20 67 61 6c 29 2e 0a ero (poor gal)..
1220: 0a 49 66 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 .If you want to
1230: 73 63 61 6c 65 20 61 20 63 72 79 70 74 6f 20 63 scale a crypto c
1240: 75 72 72 65 6e 63 79 2c 20 79 6f 75 20 77 61 6e urrency, you wan
1250: 74 20 74 6f 20 73 65 70 61 72 61 74 65 20 6c 65 t to separate le
1260: 64 67 65 72 73 20 62 79 20 73 6f 6d 65 0a 61 72 dgers by some.ar
1270: 62 69 74 72 61 72 79 20 63 72 69 74 65 72 69 61 bitrary criteria
1280: 20 28 73 68 61 72 64 69 6e 67 20 69 6e 20 64 61 (sharding in da
1290: 74 61 62 61 73 65 20 6c 61 6e 67 75 61 67 65 29 tabase language)
12a0: 20 73 6f 20 74 68 61 74 20 74 68 65 20 69 6e 64 so that the ind
12b0: 69 76 69 64 75 61 6c 0a 6e 6f 64 65 73 20 61 72 ividual.nodes ar
12c0: 65 20 6e 6f 74 20 6f 76 65 72 6c 6f 61 64 65 64 e not overloaded
12d0: 2c 20 61 6e 64 20 6d 69 6c 6c 69 6f 6e 73 20 6f , and millions o
12e0: 66 20 62 6f 6f 6b 69 6e 67 73 20 63 61 6e 20 67 f bookings can g
12f0: 65 74 20 69 6e 20 70 65 72 20 73 65 63 6f 6e 64 et in per second
1300: 3b 0a 77 68 69 63 68 20 69 73 20 61 20 66 61 69 ;.which is a fai
1310: 72 6c 79 20 72 65 61 73 6f 6e 61 62 6c 65 20 6e rly reasonable n
1320: 75 6d 62 65 72 20 66 6f 72 20 6d 69 63 72 6f 70 umber for microp
1330: 61 79 6d 65 6e 74 2e 0a 0a 53 69 6e 63 65 20 79 ayment...Since y
1340: 6f 75 20 77 61 6e 74 20 74 6f 20 63 68 65 63 6b ou want to check
1350: 20 69 66 20 61 20 63 6f 69 6e 20 73 6f 6d 65 6f if a coin someo
1360: 6e 65 20 6f 66 66 65 72 73 20 79 6f 75 20 68 61 ne offers you ha
1370: 73 20 61 6c 72 65 61 64 79 20 62 65 65 6e 0a 73 s already been.s
1380: 70 65 6e 74 2c 20 79 6f 75 20 77 61 6e 74 20 74 pent, you want t
1390: 6f 20 61 73 6b 20 74 68 65 20 63 6f 72 72 65 73 o ask the corres
13a0: 70 6f 6e 64 69 6e 67 20 6c 65 64 67 65 72 20 66 ponding ledger f
13b0: 6f 72 20 69 74 2e 20 20 54 68 65 20 6c 65 64 67 or it. The ledg
13c0: 65 72 0a 72 65 63 6f 72 64 73 20 69 6e 63 6f 6d er.records incom
13d0: 69 6e 67 20 61 6e 64 20 6f 75 74 67 6f 69 6e 67 ing and outgoing
13e0: 20 28 63 72 65 64 69 74 20 61 6e 64 20 64 65 62 (credit and deb
13f0: 69 74 29 20 69 6e 20 74 77 6f 20 6c 6f 67 20 66 it) in two log f
1400: 69 6c 65 73 2c 20 61 6e 64 0a 6b 65 65 70 73 20 iles, and.keeps
1410: 74 68 65 20 61 63 74 69 76 65 20 63 6f 69 6e 73 the active coins
1420: 20 61 76 61 69 6c 61 62 6c 65 20 66 6f 72 20 71 available for q
1430: 75 65 72 79 2e 20 20 53 6f 20 79 6f 75 20 77 61 uery. So you wa
1440: 6e 74 20 74 6f 20 73 65 6c 65 63 74 20 74 68 65 nt to select the
1450: 0a 6c 65 64 67 65 72 20 62 61 73 65 64 20 6f 6e .ledger based on
1460: 20 74 68 65 20 70 75 62 6b 65 79 20 6f 66 20 74 the pubkey of t
1470: 68 65 20 63 6f 69 6e 20 e2 80 94 20 61 20 73 68 he coin — a sh
1480: 6f 72 74 20 70 61 72 74 20 6f 66 20 69 74 20 28 ort part of it (
1490: 6f 72 20 69 74 73 0a 68 61 73 68 29 20 74 6f 20 or its.hash) to
14a0: 61 20 72 65 61 73 6f 6e 61 62 6c 65 20 73 69 7a a reasonable siz
14b0: 65 2e 20 20 44 44 6f 53 20 61 74 74 61 63 6b 73 e. DDoS attacks
14c0: 20 61 74 20 70 61 72 74 69 63 75 6c 61 72 20 6c at particular l
14d0: 65 64 67 65 72 73 20 63 61 6e 20 62 65 0a 65 61 edgers can be.ea
14e0: 73 69 6c 79 20 6d 69 74 74 69 67 61 74 65 64 3a sily mittigated:
14f0: 20 69 66 20 74 68 65 20 6c 65 64 67 65 72 20 79 if the ledger y
1500: 6f 75 20 77 61 6e 74 20 74 6f 20 62 6f 6f 6b 20 ou want to book
1510: 74 6f 20 69 73 20 61 74 74 61 63 6b 65 64 2c 20 to is attacked,
1520: 79 6f 75 0a 6a 75 73 74 20 73 65 6c 65 63 74 20 you.just select
1530: 61 20 6e 65 77 20 70 75 62 6b 65 79 3b 20 69 66 a new pubkey; if
1540: 20 74 68 65 20 6c 65 64 67 65 72 20 79 6f 75 20 the ledger you
1550: 77 61 6e 74 20 74 6f 20 62 6f 6f 6b 20 66 72 6f want to book fro
1560: 6d 20 69 73 0a 61 74 74 61 63 6b 65 64 2c 20 79 m is.attacked, y
1570: 6f 75 20 6d 61 79 20 6e 65 65 64 20 74 6f 20 75 ou may need to u
1580: 73 65 20 61 6e 6f 74 68 65 72 20 63 6f 69 6e 20 se another coin
1590: 69 6e 20 79 6f 75 72 20 77 61 6c 6c 65 74 2c 20 in your wallet,
15a0: 61 6e 64 20 68 6f 70 65 0a 74 68 65 20 61 74 74 and hope.the att
15b0: 61 63 6b 65 64 20 6c 65 64 67 65 72 20 69 73 20 acked ledger is
15c0: 67 65 74 74 69 6e 67 20 75 6e 73 74 75 63 6b 20 getting unstuck
15d0: 6f 76 65 72 20 74 69 6d 65 2e 0a 0a 54 68 65 20 over time...The
15e0: 6c 65 64 67 65 72 20 75 6e 69 74 73 20 72 65 73 ledger units res
15f0: 70 6f 6e 73 69 62 6c 65 20 66 6f 72 20 74 68 65 ponsible for the
1600: 20 73 61 6d 65 20 6c 65 64 67 65 72 20 65 61 63 same ledger eac
1610: 68 20 76 65 72 69 66 79 20 74 68 61 74 20 74 68 h verify that th
1620: 65 79 0a 68 61 76 65 20 61 20 63 6f 6e 73 65 6e ey.have a consen
1630: 73 75 73 20 6f 76 65 72 20 74 68 65 20 74 72 61 sus over the tra
1640: 6e 73 61 63 74 69 6f 6e 73 3a 20 62 79 20 73 79 nsactions: by sy
1650: 6e 63 69 6e 67 20 74 68 65 69 72 20 70 6f 73 69 ncing their posi
1660: 74 69 6f 6e 73 2e 0a 41 6e 64 20 74 68 65 6e 20 tions..And then
1670: 77 65 20 63 6f 6d 62 69 6e 65 20 74 68 65 20 6c we combine the l
1680: 65 64 67 65 72 73 20 61 6e 64 20 63 68 65 63 6b edgers and check
1690: 20 74 68 65 20 62 61 6c 61 6e 63 65 3a 20 49 74 the balance: It
16a0: 20 6f 75 67 68 74 20 74 6f 20 62 65 0a 7a 65 72 ought to be.zer
16b0: 6f 2e 0a 0a 54 68 61 74 20 77 69 6c 6c 20 6d 61 o...That will ma
16c0: 6b 65 20 74 68 65 20 74 72 61 6e 73 61 63 74 69 ke the transacti
16d0: 6f 6e 20 70 72 6f 74 6f 63 6f 6c 20 61 20 62 69 on protocol a bi
16e0: 74 20 74 72 69 63 6b 79 2c 20 62 65 63 61 75 73 t tricky, becaus
16f0: 65 20 79 6f 75 20 68 61 76 65 0a 74 6f 20 6d 61 e you have.to ma
1700: 6b 65 20 73 75 72 65 20 74 68 61 74 20 62 6f 74 ke sure that bot
1710: 68 20 6c 65 64 67 65 72 73 20 72 65 61 6c 6c 79 h ledgers really
1720: 20 65 6e 74 65 72 20 79 6f 75 72 20 74 72 61 6e enter your tran
1730: 73 61 63 74 69 6f 6e 20 69 6e 20 74 68 65 0a 73 saction in the.s
1740: 61 6d 65 20 74 69 6d 65 20 73 6c 6f 74 2e 20 20 ame time slot.
1750: 54 68 65 20 65 61 73 79 20 77 61 79 20 74 6f 20 The easy way to
1760: 64 6f 20 74 68 61 74 20 69 73 20 74 6f 20 64 6f do that is to do
1770: 20 61 20 73 74 61 67 65 64 20 65 6e 74 72 79 3a a staged entry:
1780: 0a 46 69 72 73 74 2c 20 79 6f 75 20 71 75 65 75 .First, you queu
1790: 65 20 74 68 65 20 63 72 65 64 69 74 20 65 6e 74 e the credit ent
17a0: 72 69 65 73 20 28 74 68 65 20 e2 80 9e 74 61 6b ries (the „tak
17b0: 65 20 6f 75 74 e2 80 9c 29 2c 20 74 68 65 6e 20 e out“), then
17c0: 79 6f 75 20 73 65 6e 64 0a 74 68 65 6d 20 74 6f you send.them to
17d0: 20 74 68 65 20 64 65 62 69 74 20 6c 65 64 67 65 the debit ledge
17e0: 72 2c 20 61 6e 64 20 69 66 20 74 68 61 74 20 73 r, and if that s
17f0: 75 63 63 65 65 64 73 2c 20 79 6f 75 20 63 61 6e ucceeds, you can
1800: 20 63 6f 6d 6d 69 74 20 62 6f 74 68 2e 0a 0a 54 commit both...T
1810: 6f 20 65 6e 74 65 72 20 61 20 63 6f 69 6e 20 66 o enter a coin f
1820: 72 6f 6d 20 6f 75 74 73 69 64 65 20 69 6e 74 6f rom outside into
1830: 20 61 20 64 6f 75 62 6c 65 20 62 6f 6f 6b 69 6e a double bookin
1840: 67 20 73 79 73 74 65 6d 2c 20 79 6f 75 20 6e 65 g system, you ne
1850: 65 64 20 74 77 6f 0a 74 72 61 6e 73 61 63 74 69 ed two.transacti
1860: 6f 6e 73 3a 20 4f 6e 65 20 69 73 20 74 68 65 20 ons: One is the
1870: 63 6f 69 6e 20 69 74 73 65 6c 66 20 28 64 65 62 coin itself (deb
1880: 69 74 29 2c 20 61 6e 64 20 74 68 65 20 6f 74 68 it), and the oth
1890: 65 72 20 69 73 20 61 20 70 72 6f 6d 69 73 65 20 er is a promise
18a0: 74 6f 0a 62 75 79 20 69 74 20 62 61 63 6b 20 28 to.buy it back (
18b0: 63 72 65 64 69 74 29 2e 20 20 54 68 65 20 70 72 credit). The pr
18c0: 6f 6d 69 73 65 20 6d 69 67 68 74 20 6e 6f 74 20 omise might not
18d0: 61 63 74 75 61 6c 6c 79 20 62 65 20 74 72 75 74 actually be trut
18e0: 68 66 75 6c 2c 20 69 6e 20 77 68 69 63 68 0a 63 hful, in which.c
18f0: 61 73 65 20 74 68 65 20 63 72 65 64 69 74 20 69 ase the credit i
1900: 73 20 77 72 69 74 74 65 6e 20 6f 66 66 3a 20 69 s written off: i
1910: 74 20 69 73 20 68 6f 77 65 76 65 72 20 73 74 69 t is however sti
1920: 6c 6c 20 69 6e 20 74 68 65 20 62 6f 6f 6b 73 20 ll in the books
1930: 61 73 20 6c 6f 73 73 2e 0a 0a 54 68 65 20 50 75 as loss...The Pu
1940: 72 70 6f 73 65 20 6f 66 20 74 68 61 74 20 69 73 rpose of that is
1950: 20 74 6f 20 6d 61 6b 65 20 69 74 20 65 61 73 79 to make it easy
1960: 20 74 6f 20 63 72 6f 73 73 2d 63 68 65 63 6b 20 to cross-check
1970: 74 68 65 20 6c 65 64 67 65 72 73 20 66 6f 72 0a the ledgers for.
1980: 63 6f 6e 73 69 73 74 65 6e 63 79 2e 20 20 49 66 consistency. If
1990: 20 79 6f 75 20 68 61 76 65 20 5f 6e 5f 20 6c 65 you have _n_ le
19a0: 64 67 65 72 73 2c 20 79 6f 75 20 73 75 6d 20 61 dgers, you sum a
19b0: 6c 6c 20 74 68 65 20 63 6f 6c 75 6d 6e 73 20 69 ll the columns i
19c0: 6e 20 74 68 65 6d 0a 28 77 68 69 63 68 20 63 61 n them.(which ca
19d0: 6e 20 62 65 20 64 6f 6e 65 20 69 6e 20 70 61 72 n be done in par
19e0: 61 6c 6c 65 6c 29 2c 20 61 6e 64 20 79 6f 75 20 allel), and you
19f0: 63 72 6f 73 73 2d 63 68 65 63 6b 20 62 79 20 73 cross-check by s
1a00: 75 6d 6d 69 6e 67 20 61 6c 6c 0a 74 68 65 20 5f umming all.the _
1a10: 6e 5f 20 72 65 73 75 6c 74 73 3a 20 54 68 65 20 n_ results: The
1a20: 62 61 6c 61 6e 63 65 20 6f 75 67 68 74 20 74 6f balance ought to
1a30: 20 62 65 20 7a 65 72 6f 2e 0a 0a 23 23 20 53 75 be zero...## Su
1a40: 62 64 69 76 69 64 69 6e 67 20 66 75 72 74 68 65 bdividing furthe
1a50: 72 0a 0a 53 6f 20 74 68 65 20 66 69 72 73 74 20 r..So the first
1a60: 73 74 61 67 65 20 73 63 61 6c 69 6e 67 20 69 73 stage scaling is
1a70: 20 74 68 61 74 20 6f 66 20 69 6e 64 69 76 69 64 that of individ
1a80: 75 61 6c 20 6c 65 64 67 65 72 73 20 66 6f 72 20 ual ledgers for
1a90: 70 61 72 74 73 20 6f 66 20 74 68 65 20 63 6f 69 parts of the coi
1aa0: 6e 0a 73 70 61 63 65 2c 20 61 6e 64 20 63 72 6f n.space, and cro
1ab0: 73 73 2d 63 68 65 63 6b 69 6e 67 20 74 68 65 20 ss-checking the
1ac0: 62 61 6c 61 6e 63 65 20 6f 66 20 61 6c 6c 20 6f balance of all o
1ad0: 66 20 74 68 65 6d 20 69 6e 20 6f 6e 65 20 67 6f f them in one go
1ae0: 2e 20 20 49 20 64 6f 6e 27 74 20 6b 6e 6f 77 0a . I don't know.
1af0: 77 68 65 6e 20 74 68 61 74 20 73 74 61 72 74 73 when that starts
1b00: 20 74 6f 20 62 65 63 6f 6d 65 20 61 6e 20 69 73 to become an is
1b10: 73 75 65 2c 20 62 75 74 20 79 6f 75 20 68 61 76 sue, but you hav
1b20: 65 20 74 6f 20 74 68 69 6e 6b 20 61 62 6f 75 74 e to think about
1b30: 20 69 74 20 74 6f 20 73 63 61 6c 65 0a 66 75 72 it to scale.fur
1b40: 74 68 65 72 2e 20 20 59 6f 75 20 6d 69 67 68 74 ther. You might
1b50: 20 77 61 6e 74 20 74 6f 20 68 61 76 65 20 74 6f want to have to
1b60: 6f 20 6d 61 6e 79 20 6c 65 64 67 65 72 73 20 74 o many ledgers t
1b70: 6f 20 73 75 6d 20 74 68 65 6d 20 75 70 20 61 6c o sum them up al
1b80: 6c 20 69 6e 20 6f 6e 65 0a 67 6f 2c 20 61 6e 64 l in one.go, and
1b90: 20 69 74 27 73 20 6e 6f 74 20 66 65 61 73 69 62 it's not feasib
1ba0: 6c 65 20 74 6f 20 63 6f 6e 6e 65 63 74 20 65 61 le to connect ea
1bb0: 63 68 20 6f 66 20 74 68 65 6d 20 74 6f 20 65 76 ch of them to ev
1bc0: 65 72 79 20 6f 74 68 65 72 2e 0a 0a 54 68 65 20 ery other...The
1bd0: 73 69 6e 67 6c 65 20 62 61 6c 61 6e 63 65 20 6d single balance m
1be0: 61 6b 65 73 20 6f 70 65 72 61 74 69 6f 6e 20 65 akes operation e
1bf0: 61 73 79 3a 20 59 6f 75 20 63 61 6e 20 74 61 6b asy: You can tak
1c00: 65 20 63 6f 69 6e 73 20 66 72 6f 6d 20 61 6e 79 e coins from any
1c10: 20 6c 65 64 67 65 72 20 74 6f 0a 61 6e 79 20 6f ledger to.any o
1c20: 74 68 65 72 20 69 6e 20 6f 6e 65 20 73 69 6e 67 ther in one sing
1c30: 6c 65 20 73 74 65 70 20 28 61 6c 6c 20 6c 65 64 le step (all led
1c40: 67 65 72 73 20 61 72 65 20 70 65 65 72 73 20 6f gers are peers o
1c50: 66 20 65 61 63 68 20 6f 74 68 65 72 29 2e 0a 0a f each other)...
1c60: 42 75 74 20 74 68 61 74 20 6d 61 79 20 62 65 20 But that may be
1c70: 74 6f 6f 20 6d 61 6e 79 20 63 6f 6e 6e 65 63 74 too many connect
1c80: 69 6f 6e 73 20 66 72 6f 6d 20 6f 6e 65 20 6c 65 ions from one le
1c90: 64 67 65 72 20 73 65 72 76 65 72 20 74 6f 20 61 dger server to a
1ca0: 6c 6c 20 74 68 65 0a 6f 74 68 65 72 73 2e 20 20 ll the.others.
1cb0: 53 6f 20 68 65 72 65 27 73 20 61 20 77 61 79 20 So here's a way
1cc0: 74 6f 20 73 63 61 6c 65 3a 0a 0a 57 65 20 62 72 to scale:..We br
1cd0: 65 61 6b 20 74 68 65 20 6c 65 64 67 65 72 73 20 eak the ledgers
1ce0: 69 6e 74 6f 20 67 72 6f 75 70 73 2c 20 77 68 69 into groups, whi
1cf0: 63 68 20 61 72 65 20 73 75 70 70 6f 73 65 64 20 ch are supposed
1d00: 74 6f 20 62 61 6c 61 6e 63 65 20 77 69 74 68 69 to balance withi
1d10: 6e 0a 6f 6e 65 20 74 72 61 6e 73 61 63 74 69 6f n.one transactio
1d20: 6e 2e 20 20 54 68 69 73 20 69 73 20 61 20 32 44 n. This is a 2D
1d30: 20 65 78 61 6d 70 6c 65 2c 20 62 75 74 20 69 74 example, but it
1d40: 20 77 6f 72 6b 73 20 69 6e 20 61 6e 79 20 6e 75 works in any nu
1d50: 6d 62 65 72 20 6f 66 0a 64 69 6d 65 6e 73 69 6f mber of.dimensio
1d60: 6e 73 2e 20 20 57 65 20 68 61 76 65 20 74 77 6f ns. We have two
1d70: 20 6d 61 70 73 20 6f 66 20 74 68 65 20 6c 65 67 maps of the leg
1d80: 65 72 20 67 72 6f 75 70 73 2c 20 61 6e 64 20 74 er groups, and t
1d90: 68 65 0a 74 72 61 6e 73 61 63 74 69 6f 6e 73 20 he.transactions
1da0: 61 6c 74 65 72 6e 61 74 65 20 62 65 74 77 65 65 alternate betwee
1db0: 6e 20 6f 6e 65 20 61 6e 64 20 74 68 65 20 6f 74 n one and the ot
1dc0: 68 65 72 20 67 72 6f 75 70 2e 20 20 54 68 61 74 her group. That
1dd0: 20 6d 65 61 6e 73 20 77 65 0a 63 61 6e 20 64 6f means we.can do
1de0: 20 65 69 74 68 65 72 20 74 72 61 6e 73 61 63 74 either transact
1df0: 69 6f 6e 73 20 77 69 74 68 69 6e 20 6f 6e 65 20 ions within one
1e00: 6c 6f 63 61 6c 20 67 72 6f 75 70 2c 20 6f 72 20 local group, or
1e10: 77 69 74 68 69 6e 20 61 20 67 6c 6f 62 61 6c 0a within a global.
1e20: 67 72 6f 75 70 20 74 68 61 74 20 68 61 73 20 6f group that has o
1e30: 6e 65 20 65 6c 65 6d 65 6e 74 20 6f 66 20 65 61 ne element of ea
1e40: 63 68 20 6c 6f 63 61 6c 20 67 72 6f 75 70 20 61 ch local group a
1e50: 73 20 70 6f 73 73 69 62 6c 65 0a 64 65 73 74 69 s possible.desti
1e60: 6e 61 74 69 6f 6e 2e 20 20 57 65 20 68 61 76 65 nation. We have
1e70: 20 31 36 20 67 72 6f 75 70 73 20 68 65 72 65 2c 16 groups here,
1e80: 20 61 6e 64 20 65 61 63 68 20 6c 65 64 67 65 72 and each ledger
1e90: 20 6e 65 65 64 73 20 33 30 20 6f 70 65 6e 0a 63 needs 30 open.c
1ea0: 6f 6e 6e 65 63 74 69 6f 6e 73 2c 20 69 6e 73 74 onnections, inst
1eb0: 65 61 64 20 6f 66 20 32 35 35 20 69 66 20 61 6c ead of 255 if al
1ec0: 6c 20 77 65 72 65 20 63 6f 6e 6e 65 63 74 65 64 l were connected
1ed0: 20 74 6f 20 65 76 65 72 79 20 6f 74 68 65 72 0a to every other.
1ee0: 6c 65 64 67 65 72 2e 20 20 53 6f 20 77 65 20 67 ledger. So we g
1ef0: 65 74 20 74 6f 20 5f 32 5c 2a 73 71 72 74 28 6e et to _2\*sqrt(n
1f00: 29 2d 32 5f 20 69 6e 73 74 65 61 64 20 6f 66 20 )-2_ instead of
1f10: 5f 6e 2d 31 2e 5f 20 20 4d 6f 72 65 20 64 69 6d _n-1._ More dim
1f20: 65 6e 73 69 6f 6e 73 0a 6d 65 61 6e 20 68 69 67 ensions.mean hig
1f30: 68 65 72 20 72 6f 6f 74 73 2c 20 73 6f 20 77 69 her roots, so wi
1f40: 74 68 20 5f 6d 5f 20 64 69 6d 65 6e 73 69 6f 6e th _m_ dimension
1f50: 73 2c 20 69 74 20 69 73 20 5f 6d 5c 2a 28 6e 29 s, it is _m\*(n)
1f60: 5e 28 31 2f 6d 29 2d 6d 2e 5f 0a 0a 21 5b 53 74 ^(1/m)-m._..
1f90: 0a 21 5b 53 74 61 67 65 20 32 5d 28 2e 2e 2f 64 ...In each s
1fc0: 74 61 67 65 2c 20 74 68 65 20 6c 65 64 67 65 72 tage, the ledger
1fd0: 73 20 6f 66 20 74 68 65 20 73 61 6d 65 20 63 6f s of the same co
1fe0: 6c 6f 72 20 61 72 65 20 63 6f 6e 6e 65 63 74 65 lor are connecte
1ff0: 64 20 28 74 68 61 74 20 69 73 20 74 68 65 20 61 d (that is the a
2000: 63 74 75 61 6c 0a 73 68 61 72 64 20 6f 66 20 74 ctual.shard of t
2010: 68 65 20 64 61 74 61 62 61 73 65 2c 20 6f 70 65 he database, ope
2020: 72 61 74 69 6f 6e 73 20 77 69 74 68 69 6e 20 74 rations within t
2030: 68 65 20 73 68 61 72 64 20 61 72 65 20 61 74 6f he shard are ato
2040: 6d 69 63 29 2e 20 20 54 68 65 20 62 61 6c 61 6e mic). The balan
2050: 63 65 0a 69 73 20 63 61 6c 63 75 6c 61 74 65 64 ce.is calculated
2060: 20 6f 6e 6c 79 20 66 6f 72 20 74 68 65 20 67 72 only for the gr
2070: 6f 75 70 20 6f 66 20 63 6f 6e 6e 65 63 74 65 64 oup of connected
2080: 20 6c 65 64 67 65 72 73 3b 20 74 68 65 20 73 69 ledgers; the si
2090: 67 6e 61 74 75 72 65 73 20 66 6f 72 20 74 68 65 gnatures for the
20a0: 0a 76 65 72 69 66 69 65 64 20 62 61 6c 61 6e 63 .verified balanc
20b0: 65 20 67 6f 65 73 20 69 6e 74 6f 20 74 68 65 20 e goes into the
20c0: 6e 65 78 74 20 62 6c 6f 63 6b 2e 20 20 42 79 20 next block. By
20d0: 69 6e 74 65 72 6c 65 61 76 69 6e 67 20 74 68 65 interleaving the
20e0: 20 74 77 6f 20 6d 6f 64 65 73 20 6f 66 0a 63 6f two modes of.co
20f0: 6e 6e 65 63 74 69 76 69 74 79 2c 20 61 66 74 65 nnectivity, afte
2100: 72 20 6f 6e 6c 79 20 74 77 6f 20 63 79 63 6c 65 r only two cycle
2110: 73 20 28 6f 72 20 5f 6d 5f 20 69 6e 20 74 68 65 s (or _m_ in the
2120: 20 67 65 6e 65 72 61 6c 20 63 61 73 65 29 2c 20 general case),
2130: 61 6c 6c 20 70 72 65 76 69 6f 75 73 0a 72 65 63 all previous.rec
2140: 6f 72 64 73 20 66 72 6f 6d 20 61 6c 6c 20 6c 65 ords from all le
2150: 64 67 65 72 73 20 61 72 65 20 63 68 61 69 6e 65 dgers are chaine
2160: 64 20 74 6f 67 65 74 68 65 72 20 28 69 6e 20 61 d together (in a
2170: 20 68 79 70 65 72 63 75 62 65 2c 20 6e 6f 74 20 hypercube, not
2180: 61 20 6c 69 6e 65 61 72 0a 63 68 61 69 6e 29 2e a linear.chain).
2190: 20 20 43 68 61 6e 67 69 6e 67 20 6f 6e 65 20 62 Changing one b
21a0: 6c 6f 63 6b 20 6c 61 74 65 72 20 72 65 71 75 69 lock later requi
21b0: 72 65 73 20 74 6f 20 63 68 61 6e 67 65 20 74 68 res to change th
21c0: 65 20 73 69 67 6e 61 74 75 72 65 73 20 6f 66 20 e signatures of
21d0: 61 6c 6c 0a 61 63 74 69 76 65 20 62 6c 6f 63 6b all.active block
21e0: 73 2e 0a 0a 4e 6f 77 20 79 6f 75 20 68 61 76 65 s...Now you have
21f0: 20 74 6f 20 72 6f 75 74 65 20 79 6f 75 72 20 63 to route your c
2200: 6f 69 6e 20 74 6f 20 61 20 64 65 73 74 69 6e 61 oin to a destina
2210: 74 69 6f 6e 2e 20 20 54 68 65 72 65 20 61 72 65 tion. There are
2220: 20 74 77 6f 20 70 6f 73 73 69 62 6c 65 0a 61 70 two possible.ap
2230: 70 72 6f 61 63 68 65 73 3a 20 4c 65 74 20 74 68 proaches: Let th
2240: 65 20 6c 65 64 67 65 72 73 20 64 6f 20 74 68 61 e ledgers do tha
2250: 74 20 66 6f 72 20 79 6f 75 20 28 77 68 69 63 68 t for you (which
2260: 20 69 73 20 74 68 65 6e 20 6f 75 74 20 6f 66 20 is then out of
2270: 79 6f 75 72 20 63 6f 6e 74 72 6f 6c 0a 61 6e 64 your control.and
2280: 20 72 65 71 75 69 72 65 73 20 74 72 75 73 74 20 requires trust
2290: 74 68 61 74 20 74 68 65 79 20 68 61 6e 64 6c 65 that they handle
22a0: 20 69 74 20 63 6f 72 72 65 63 74 6c 79 29 2c 20 it correctly),
22b0: 6f 72 20 79 6f 75 20 64 6f 20 69 74 20 79 6f 75 or you do it you
22c0: 72 73 65 6c 66 2e 20 20 49 0a 73 75 70 70 6f 73 rself. I.suppos
22d0: 65 20 e2 80 9c 64 6f 20 69 74 20 79 6f 75 72 73 e “do it yours
22e0: 65 6c 66 e2 80 9c 20 69 73 20 61 20 67 6f 6f 64 elf“ is a good
22f0: 20 6f 70 74 69 6f 6e 2e 0a 0a 41 20 74 72 61 6e option...A tran
2300: 73 61 63 74 69 6f 6e 20 63 61 6e 20 6d 6f 76 65 saction can move
2310: 20 77 69 74 68 69 6e 20 74 68 65 20 63 75 72 72 within the curr
2320: 65 6e 74 6c 79 20 61 63 74 69 76 65 20 6c 65 64 ently active led
2330: 67 65 72 20 67 72 6f 75 70 2c 20 73 69 6e 63 65 ger group, since
2340: 20 74 68 61 74 27 73 0a 77 68 65 72 65 20 74 68 that's.where th
2350: 65 20 62 61 6c 61 6e 63 65 20 69 73 20 63 6f 6d e balance is com
2360: 70 75 74 65 64 2e 20 20 59 6f 75 20 70 72 65 73 puted. You pres
2370: 65 6e 74 20 74 68 65 20 6f 72 69 67 69 6e 61 6c ent the original
2380: 20 70 61 79 65 72 20 61 20 74 61 72 67 65 74 20 payer a target
2390: 74 68 61 74 0a 69 73 20 69 6e 20 68 69 73 20 63 that.is in his c
23a0: 75 72 72 65 6e 74 6c 79 20 61 63 74 69 76 65 20 urrently active
23b0: 6c 65 64 67 65 72 20 67 72 6f 75 70 2c 20 64 6f ledger group, do
23c0: 69 6e 67 20 74 68 65 20 66 69 72 73 74 20 73 74 ing the first st
23d0: 65 70 20 6f 66 20 74 68 65 20 72 6f 75 74 65 0a ep of the route.
23e0: 74 68 65 72 65 2e 0a 0a 48 61 76 69 6e 67 20 6d there...Having m
23f0: 61 6e 79 20 61 63 63 6f 75 6e 74 73 20 61 63 74 any accounts act
2400: 69 76 65 20 63 61 6e 20 62 65 63 6f 6d 65 20 61 ive can become a
2410: 20 62 61 63 6b 75 70 20 70 72 6f 62 6c 65 6d 3b backup problem;
2420: 20 72 65 6d 65 6d 62 65 72 2c 20 71 75 69 74 65 remember, quite
2430: 20 73 6f 6d 65 0a 42 69 74 43 6f 69 6e 73 20 77 some.BitCoins w
2440: 68 65 72 65 20 6c 6f 73 74 20 62 79 20 70 65 6f here lost by peo
2450: 70 6c 65 20 77 68 6f 20 73 63 72 61 70 70 65 64 ple who scrapped
2460: 20 74 68 65 69 72 20 68 61 72 64 20 64 69 73 6b their hard disk
2470: 73 2e 20 20 53 6f 20 69 64 65 61 6c 6c 79 2c 0a s. So ideally,.
2480: 79 6f 75 27 64 20 77 72 69 74 65 20 64 6f 77 6e you'd write down
2490: 20 74 68 65 20 73 65 63 72 65 74 20 6f 66 20 79 the secret of y
24a0: 6f 75 72 20 77 61 6c 6c 65 74 20 6f 6e 20 61 20 our wallet on a
24b0: 70 69 65 63 65 20 6f 66 20 70 61 70 65 72 20 28 piece of paper (
24c0: 77 68 69 63 68 20 69 73 20 6b 6e 6f 77 6e 0a 74 which is known.t
24d0: 6f 20 6c 61 73 74 20 71 75 69 74 65 20 77 65 6c o last quite wel
24e0: 6c 2c 20 61 6e 64 20 63 61 6e 20 62 65 20 65 61 l, and can be ea
24f0: 73 69 6c 79 20 73 74 6f 72 65 64 20 61 77 61 79 sily stored away
2500: 20 73 65 63 75 72 65 6c 79 2c 20 65 2e 67 2e 20 securely, e.g.
2510: 69 6e 20 61 20 73 6d 61 6c 6c 0a 73 61 66 65 29 in a small.safe)
2520: 2e 20 20 4e 6f 77 20 77 69 74 68 20 74 68 6f 75 . Now with thou
2530: 73 61 6e 64 73 20 6f 66 20 77 61 6c 6c 65 74 73 sands of wallets
2540: 20 73 70 72 65 61 64 20 61 6c 6c 20 6f 76 65 72 spread all over
2550: 20 74 68 65 20 6c 65 64 67 65 72 20 73 70 61 63 the ledger spac
2560: 65 2c 20 74 68 61 74 0a 63 6f 75 6c 64 20 62 65 e, that.could be
2570: 63 6f 6d 65 20 61 20 62 69 67 20 73 74 61 63 6b come a big stack
2580: 20 6f 66 20 70 61 70 65 72 2c 20 61 6e 64 20 69 of paper, and i
2590: 6d 70 6f 73 73 69 62 6c 65 20 74 6f 20 72 65 65 mpossible to ree
25a0: 6e 74 65 72 2e 0a 0a 53 75 67 67 65 73 74 69 6f nter...Suggestio
25b0: 6e 3a 20 4f 6e 6c 79 20 73 74 6f 72 65 20 74 68 n: Only store th
25c0: 65 20 73 65 65 64 20 6f 66 20 61 20 73 65 63 75 e seed of a secu
25d0: 72 65 20 50 52 4e 47 2e 20 20 54 68 65 20 73 65 re PRNG. The se
25e0: 65 64 20 28 31 32 38 20 62 69 74 73 20 69 73 0a ed (128 bits is.
25f0: 73 75 66 66 69 63 69 65 6e 74 6c 79 20 73 74 72 sufficiently str
2600: 6f 6e 67 20 66 6f 72 20 45 64 32 35 35 31 39 20 ong for Ed25519
2610: 6b 65 79 73 29 20 67 65 6e 65 72 61 74 65 73 20 keys) generates
2620: 74 68 65 20 73 65 63 72 65 74 20 6b 65 79 73 20 the secret keys
2630: 66 6f 72 20 61 6c 6c 20 74 68 65 0a 61 63 63 6f for all the.acco
2640: 75 6e 74 73 20 79 6f 75 20 77 61 6e 74 20 74 6f unts you want to
2650: 20 75 73 65 2e 20 20 59 6f 75 20 72 75 6e 20 74 use. You run t
2660: 68 65 20 50 52 4e 47 20 6c 6f 6e 67 20 65 6e 6f he PRNG long eno
2670: 75 67 68 20 74 6f 20 67 65 74 20 61 20 70 75 62 ugh to get a pub
2680: 6b 65 79 20 66 6f 72 0a 65 76 65 72 79 20 6c 65 key for.every le
2690: 64 67 65 72 20 79 6f 75 20 6e 65 65 64 2e 20 20 dger you need.
26a0: 49 66 20 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 If the number of
26b0: 20 6c 65 64 67 65 72 73 20 67 6f 20 75 70 20 6f ledgers go up o
26c0: 76 65 72 20 74 69 6d 65 20 28 64 75 65 20 74 6f ver time (due to
26d0: 0a 73 63 61 6c 69 6e 67 29 2c 20 79 6f 75 20 6e .scaling), you n
26e0: 65 65 64 20 74 6f 20 63 6f 6d 70 75 74 65 20 6d eed to compute m
26f0: 6f 72 65 20 70 75 62 6b 65 79 73 2c 20 62 75 74 ore pubkeys, but
2700: 20 74 68 65 20 73 61 6d 65 20 70 75 62 6b 65 79 the same pubkey
2710: 73 20 79 6f 75 20 66 6f 75 6e 64 20 69 6e 0a 74 s you found in.t
2720: 68 65 20 73 68 6f 72 74 65 72 20 72 75 6e 20 72 he shorter run r
2730: 65 6d 61 69 6e 20 61 63 74 69 76 65 2e 0a 0a 49 emain active...I
2740: 20 63 61 6c 6c 20 69 74 20 74 68 65 20 53 77 61 call it the Swa
2750: 70 44 72 61 67 6f 6e 43 68 61 69 6e 2c 20 61 73 pDragonChain, as
2760: 20 74 68 65 20 73 77 61 70 20 64 72 61 67 6f 6e the swap dragon
2770: 20 69 73 20 74 68 65 20 6d 61 73 63 6f 74 74 20 is the mascott
2780: 6f 66 0a 46 6f 72 74 68 20 28 74 68 65 20 53 57 of.Forth (the SW
2790: 41 50 20 6f 70 65 72 61 74 69 6f 6e 29 2e 20 20 AP operation).
27a0: 49 27 6d 20 73 75 72 65 20 74 68 65 20 73 77 61 I'm sure the swa
27b0: 70 20 64 72 61 67 6f 6e 20 63 61 6e 20 68 61 6e p dragon can han
27c0: 64 6c 65 0a 64 6f 75 62 6c 65 20 62 6f 6f 6b 69 dle.double booki
27d0: 6e 67 20 71 75 69 74 65 20 77 65 6c 6c 20 77 69 ng quite well wi
27e0: 74 68 20 68 69 73 20 74 77 6f 20 68 65 61 64 73 th his two heads
27f0: 2e 0a 0a 4e 6f 74 65 20 74 68 61 74 20 75 6e 6c ...Note that unl
2800: 69 6b 65 20 74 68 65 20 6c 69 67 68 74 6e 69 6e ike the lightnin
2810: 67 20 6e 65 74 77 6f 72 6b 2c 20 74 68 65 72 65 g network, there
2820: 20 69 73 20 6e 6f 20 6e 65 65 64 20 74 6f 20 77 is no need to w
2830: 6f 72 72 79 20 61 62 6f 75 74 20 74 68 65 0a 74 orry about the.t
2840: 72 61 6e 73 61 63 74 69 6f 6e 73 3a 20 74 68 65 ransactions: the
2850: 79 20 61 72 65 20 61 6c 6c 20 70 75 62 6c 69 63 y are all public
2860: 2e 20 20 4e 6f 74 68 69 6e 67 20 63 61 6e 20 62 . Nothing can b
2870: 65 20 6c 6f 73 74 20 6f 72 20 73 74 6f 6c 65 6e e lost or stolen
2880: 2e 20 20 54 68 65 0a 74 6f 70 6f 6c 6f 67 79 20 . The.topology
2890: 69 73 20 64 65 72 69 76 65 64 20 66 72 6f 6d 20 is derived from
28a0: 74 68 65 20 70 75 62 6b 65 79 20 76 61 6c 75 65 the pubkey value
28b0: 73 2c 20 61 6e 64 20 6e 6f 74 20 66 72 6f 6d 20 s, and not from
28c0: 72 61 6e 64 6f 6d 6c 79 20 63 6f 6e 6e 65 63 74 randomly connect
28d0: 65 64 0a 70 65 65 72 73 2e 20 20 54 68 65 20 e2 ed.peers. The
28e0: 80 9c 66 75 6c 6c 20 6e 6f 64 65 73 e2 80 9d 20 full nodes”
28f0: 28 72 61 74 68 65 72 3a 20 73 68 61 72 64 20 6e (rather: shard n
2900: 6f 64 65 73 29 20 77 68 6f 20 77 61 6e 74 20 74 odes) who want t
2910: 6f 20 62 65 20 72 65 73 70 6f 6e 73 69 62 6c 65 o be responsible
2920: 20 66 6f 72 0a 61 20 63 65 72 74 61 69 6e 20 70 for.a certain p
2930: 61 72 74 20 6f 66 20 74 68 65 20 6c 65 64 67 65 art of the ledge
2940: 72 73 20 6b 6e 6f 77 20 77 68 65 72 65 20 74 6f rs know where to
2950: 20 63 6f 6e 6e 65 63 74 20 74 6f 2e 0a 0a 23 23 connect to...##
2960: 20 5a 65 72 6f 2d 4b 6e 6f 77 6c 65 64 67 65 20 Zero-Knowledge
2970: 50 72 6f 6f 66 3f 0a 0a 5a 63 61 73 68 20 74 72 Proof?..Zcash tr
2980: 69 65 73 20 74 6f 20 68 69 64 65 20 74 68 65 20 ies to hide the
2990: 74 72 61 6e 73 61 63 74 69 6f 6e 73 20 62 79 20 transactions by
29a0: 75 73 69 6e 67 20 7a 65 72 6f 2d 6b 6e 6f 77 6c using zero-knowl
29b0: 65 64 67 65 20 70 72 6f 6f 66 73 0a 66 6f 72 20 edge proofs.for
29c0: 61 63 63 6f 75 6e 74 69 6e 67 20 74 68 65 6d 2e accounting them.
29d0: 20 20 54 68 65 73 65 20 70 72 6f 6f 66 73 20 61 These proofs a
29e0: 72 65 20 61 20 62 69 74 20 64 69 66 66 69 63 75 re a bit difficu
29f0: 6c 74 20 61 6e 64 20 65 73 70 65 63 69 61 6c 6c lt and especiall
2a00: 79 0a 71 75 69 74 65 20 74 69 6d 65 2d 63 6f 6e y.quite time-con
2a10: 73 75 6d 69 6e 67 2e 20 20 53 6f 20 69 66 20 73 suming. So if s
2a20: 6f 6d 65 6f 6e 65 20 68 61 73 20 61 6e 20 65 66 omeone has an ef
2a30: 66 69 63 69 65 6e 74 20 7a 65 72 6f 2d 6b 6e 6f ficient zero-kno
2a40: 77 6c 65 64 67 65 0a 70 72 6f 6f 66 20 74 68 61 wledge.proof tha
2a50: 74 20 77 6f 72 6b 73 20 66 6f 72 20 74 68 69 73 t works for this
2a60: 20 73 69 6d 70 6c 65 20 74 72 61 6e 73 61 63 74 simple transact
2a70: 69 6f 6e 2c 20 74 68 65 6e 20 49 20 63 6f 75 6c ion, then I coul
2a80: 64 20 75 73 65 20 74 68 61 74 2e 0a 48 6f 6d 6f d use that..Homo
2a90: 6d 6f 72 70 68 69 63 20 65 6e 63 72 79 70 74 69 morphic encrypti
2aa0: 6f 6e 20 63 6f 75 6c 64 20 64 6f 20 74 68 61 74 on could do that
2ab0: 20 6a 6f 62 2e 0a 0a 49 74 20 6e 65 65 64 73 20 job...It needs
2ac0: 74 6f 20 70 72 6f 6f 66 20 74 68 61 74 20 69 66 to proof that if
2ad0: 20 79 6f 75 20 73 68 69 66 74 20 61 6e 20 61 6d you shift an am
2ae0: 6f 75 6e 74 20 6f 66 20 6d 6f 6e 65 79 20 66 72 ount of money fr
2af0: 6f 6d 20 61 63 63 6f 75 6e 74 20 41 0a 74 6f 20 om account A.to
2b00: 42 20 28 77 68 65 72 65 20 62 6f 74 68 20 61 63 B (where both ac
2b10: 63 6f 75 6e 74 73 20 73 68 61 72 65 20 61 20 73 counts share a s
2b20: 65 63 72 65 74 20 75 6e 6b 6e 6f 77 6e 20 74 6f ecret unknown to
2b30: 20 74 68 65 20 61 75 64 69 74 6f 72 29 2c 20 79 the auditor), y
2b40: 6f 75 0a 63 61 6e 20 61 75 64 69 74 20 74 68 61 ou.can audit tha
2b50: 74 20 74 68 65 20 73 75 6d 73 20 61 72 65 20 63 t the sums are c
2b60: 6f 72 72 65 63 74 2e 20 20 41 6e 64 20 69 66 20 orrect. And if
2b70: 79 6f 75 20 63 68 61 6e 67 65 20 74 68 65 20 73 you change the s
2b80: 65 63 72 65 74 2c 0a 79 6f 75 20 63 61 6e 20 61 ecret,.you can a
2b90: 75 64 69 74 20 74 68 61 74 20 74 68 65 20 63 68 udit that the ch
2ba0: 61 6e 67 65 20 64 69 64 6e 27 74 20 61 66 66 65 ange didn't affe
2bb0: 63 74 20 74 68 65 20 61 63 63 6f 75 6e 74 27 73 ct the account's
2bc0: 20 76 61 6c 75 65 2e 0a 0a 54 68 61 74 20 61 6c value...That al
2bd0: 6c 6f 77 73 20 79 6f 75 20 74 6f 20 73 70 6c 69 lows you to spli
2be0: 74 20 61 20 74 72 61 6e 73 61 63 74 69 6f 6e 20 t a transaction
2bf0: 69 6e 74 6f 20 73 65 76 65 72 61 6c 20 73 74 65 into several ste
2c00: 70 73 3a 20 46 69 72 73 74 0a 73 65 70 61 72 61 ps: First.separa
2c10: 74 65 20 74 68 65 20 64 65 73 69 72 65 64 20 61 te the desired a
2c20: 6d 6f 75 6e 74 20 66 72 6f 6d 20 79 6f 75 72 20 mount from your
2c30: 61 63 63 6f 75 6e 74 2c 20 74 68 65 6e 20 63 68 account, then ch
2c40: 61 6e 67 65 20 74 68 65 20 73 65 63 72 65 74 0a ange the secret.
2c50: 61 6e 64 20 68 61 6e 64 20 69 74 20 6f 76 65 72 and hand it over
2c60: 20 74 6f 20 74 68 65 20 72 65 63 69 70 69 65 6e to the recipien
2c70: 74 20 28 77 68 6f 20 67 61 69 6e 73 20 6b 6e 6f t (who gains kno
2c80: 77 6c 65 64 67 65 20 6f 66 20 74 68 61 74 20 73 wledge of that s
2c90: 65 63 72 65 74 29 2c 0a 63 68 61 6e 67 65 20 74 ecret),.change t
2ca0: 68 65 20 73 65 63 72 65 74 20 61 67 61 69 6e 2c he secret again,
2cb0: 20 61 6e 64 20 66 69 6e 61 6c 6c 79 20 6d 65 72 and finally mer
2cc0: 67 65 20 69 74 20 77 69 74 68 20 74 68 65 20 64 ge it with the d
2cd0: 65 73 74 69 6e 61 74 69 6f 6e 0a 61 63 63 6f 75 estination.accou
2ce0: 6e 74 20 28 69 66 20 77 61 6e 74 65 64 29 2e 0a nt (if wanted)..
2cf0: 0a 5b 75 70 5d 28 73 71 75 69 64 2e 6d 64 29 20 .[up](squid.md)
2d00: 5b 62 61 63 6b 5d 28 73 71 75 69 64 2d 73 70 65 [back](squid-spe
2d10: 63 75 6c 61 74 69 6f 6e 2e 6d 64 29 20 5b 6e 65 culation.md) [ne
2d20: 78 74 5d 28 73 71 75 69 64 2d 6d 69 6e 69 6e 67 xt](squid-mining
2d30: 2e 6d 64 29 0a .md).