crypto

Byzantine Fault Tolerance

Relevant to distributed computing and blockchain Two generals problem: loyal and traitor generals each command an army The only communications they have are through messages that have latency and failure Two choices: Attack or stay put How do you create an algorithm, such that loyal generals follow it, while traitors do not, such that the imperfect group can complete the mission?

Ethereum

ABI: interface functions and definitions known at compile time (strongly statically typed) devp2p network protocol explained

Commit and Reveal scheme

Commitment schemes remind me of differential privacy, and the XOR trick learnt in competitive programming (XOR a set of numbers that all have a duplicate except one). Suppose you want to generate a random number that nobody can predict (AKA a random number).

Ethereum Virtual Machine

Virtual Machine - runtime environment “computer running on computer” e.g. JVM allows interoperability (cross-platform) has it’s own bytecode (rather than assembly). An intermediary language specifically for smart contracts has its own instrucation set big endian ordering (most sig byte at smallest memory) ROM not RAM, not Von Neumann stack based architecture (as opposed to register) has memory(volatile) and storage(non-volatile)

Solidity Ref

Language that targets the EVM. Basic template pragma solidity __version__ contract NameOfContract { // state variables // public makes accessible from other contracts (like a global variable on the chain) // event can react from a trigger // error provide info on why fail // functions // fallback function if anything is called } General constructor called at beginning msg is a global variable Can check whether msg.

TLDR: The Original Bitcoin Whitepaper

Bitcoin: A Peer-to-Peer Electronic Cash System One-Liner Bitcoin is an anonymous digital coin that changes hands based on unique cryptographic keys, validated through a decentralized distributed (P2P) ledger that A) is publicly-run by transaction chronology verification from decentralized volunteer compute nodes that solve a “proof-of-work” (proof of this node’s goodwill) in exchange for the coin itself and B) incentivizes actors with malicious intent to support the system because it is more profitable for them to perform A rather than attack it (antifragile).