SILK0.3.3

The clock
before
Solana

Silk was the Rust code that became Solana. Its Proof of History is running again here, rebuilt byte-for-byte in your browser.

total hashes since the node started
0
num_hashes since last entry
0
tick rate
1 tick / 1000 ms
speed
ADDRESSBALANCE
SILK HISTORIAN

A clock that proves the order of events

Silk's Proof of History clock, hashing live since you opened this page.

0 entries · newest first
#num_hashesidevent

Tap a row to take it apart

Every entry is num_hashes (how many SHA-256 steps since the previous entry), id (the hash reached) and event. A verifier takes the previous id, hashes it that many times, mixes in the transaction signature if there is one, and checks it lands on this id.

SILK LEDGER

Every line of the log, taken apart

Every log line as silk-testnode printed it, taken apart byte by byte.

Send a transaction

Silk 0.3.3 never checked for negative amounts. Send -50 from a wallet that holds nothing and it goes through, just like the original.

Run silk-client-demo
Mint a new chain · echo 500 | silk-mint | silk-genesis | silk-testnode
mint.json

        

This really is the private key: 85 bytes of PKCS#8 v2. The chain's seed is SHA-256 of this file.

genesis.log

      
Balances · HashMap<PublicKey, i64>
ADDRESSBALANCE

SILK ACCOUNTANT

Decide first, record second

Signed transfers, a replay guard and the original bugs, exactly as in 2018.

Each lane is a separate thread checking its share of entries at the same time. 8 lanes on this device.
SILK VERIFY

Check a minute of time in seconds

The whole log re-checked across every core at once. The Silk node itself never did this.

loominationFeb 14, 2018
phistFeb 15
silkFeb 16 – Mar 27
solanaMar 27, 22:16 UTC
12
releases on crates.io
22 days
Feb 16 → Mar 9, 2018
39 days
the name "silk" lasted
385 / 420
commits by Greg Fitzgerald before Apr 15, 2018
Apache-2.0
license, then and now
Five corrections to the usual story
  1. The accountant decided first, the historian only recorded. Balances changed before the transaction reached Proof of History.
  2. Parallel verification existed but the node didn't use it. Logs were replayed with no hash or signature checks.
  3. Only transaction signatures were mixed into the hash chain. Ticks carry no data; the node's new entries don't chain onto genesis.
  4. last_id was signed but never checked. The only replay guard was a set of signatures kept in memory.
  5. Mint and genesis arrived a week before the end. 0.1–0.2 were a hash chain and a historian; 0.3.1 added the mint.
Silk → Solana, from the commits
Silk 0.3.3Later SolanaWhen
silksolanaMar 27 2018
log / loggerledger / recorderMar 19 2018
AccountantSkel / StubTpu / ThinClientMay 8 2018
AccountantBankMay 14 2018
HistorianRecordStageMay 14 2018
silk-testnodesolana-fullnodeMay 25 2018
silk-client-demosolana-bench-tpsJul 19 2018
assettokens → lamports2018 → 2019
Concept art: a clockwork loom weaving a violet ribbon of hashes
About this rebuild

Rebuilt faithfully: SHA-256 Proof of History at one tick per 1000 ms, Ed25519 keys in 85-byte PKCS#8 v2, the 144 signed bytes, the 220-byte UDP datagram, mint and genesis, the accountant's rules and error names, the JSON log format and parallel verify_slice. Checked against the spec's test vectors, RFC 8032 and an independent Python implementation.

Different on purpose: everything runs in one tab, so the UDP server is in-process. The historian checks for new events every 256 hashes rather than after every hash, so num_hashes lands on multiples of 256.

Not rebuilt yet: time-locked and cancellable transfers, and the 0.1–0.2 hashers, which can't be reproduced reliably.

Sources
SILK SOURCE

Silk was the code that became Solana

Twelve releases in three weeks, then the repository was renamed solana on March 27, 2018.