Dataset Viewer
Auto-converted to Parquet Duplicate
question
stringclasses
1 value
answer
stringlengths
780
1.55k
source
stringclasses
1 value
No question: Moodle
cs - 438 decentralized systems engineering fall 2024 week 12 advanced consensus & blockchain architectures - motivation - problems v / existings blockchains, e. g. bitcoin - limited tx capacity, congestion / competition, high fees - latoncy : 10 mins ( min ) - ihr - delayed / probabilistic finality - huge energy use of...
EPFL CS 438 Moodle
No question: Moodle
pos - " east adoptive adversary " instantly - ephemeral committees - do i thing " onyspeak once " - verifiable random function ( vrf ) alternatives to pos - eg. pop ( personhoda in " crypto - ubi " - " stake " distribution - encointer ( urich ) 1 ( per human user ) - idena ( online ) c i decentralized systems engineeri...
EPFL CS 438 Moodle
No question: Moodle
body of techniques and solutions ● examine a number of real systems, past and present : how they work, and why they succeeded … or failed ● become better engineers : solidify this knowledge by applying it! →build a small, but working, usable and robust, decentralized system why study decentralized systems? 8 ● devise s...
EPFL CS 438 Moodle
No question: Moodle
self - guided : monday 13 : 15 - 15 : 00 ( inm200 ) - room open to hack, discuss design / problems, and test with classmates! homework : 8 - 12h depending on your understanding & development skills no sharing or copying code ; everyone implements their own peerster! 11 + sep. 13, this friday! 15 : 15 - 17 : 00 ( cm1 3 ...
EPFL CS 438 Moodle
No question: Moodle
5 distributed storage oct 11 > 6 replication and consensus > oct 15 file 7 threat modeling and threshold crypto sharing nov 1 > 8 anonymous communication > nov 5 consensus & blockchain 9 sybil attacks and defenses 10 blockchains and cryptocurrencies > nov 24 11 smart contracts nov 25 > 12 advanced blockchain architectu...
EPFL CS 438 Moodle
No question: Moodle
: organization ● group project ( ~ 3 members ) build on top of ( some part of ) peerster ● guided topic selection, with clear goals … or you can be creative! ● example project topics secure routing anonymous reputation e - voting crdts project : organization ( cont ’ d ) ● regular meetings with tas ( week 11 + ) ● fina...
EPFL CS 438 Moodle
No question: Moodle
best practices classes : week 13 : testing & chaos engineering 24 questions? decentralized systems engineering cs - 438 – fall 2024 bryan ford, pierluca borso - tan credits : p. tennage, c. basescu, et al. why build a decentralized system? 26 ● sometimes a basic requirement ● availability, reliability and safety ● lowe...
EPFL CS 438 Moodle
No question: Moodle
● version management thereof : ● performance / efficiency ● cost 32 decentralized communication an introduction communicating with a ( known ) peer ● same machine a file in a shared directory ● local networking shared drive, file transfer ● global networking, centralized trust a file on a shared server ( ftp? dropbox? ...
EPFL CS 438 Moodle
No question: Moodle
al. consensus paxos, multi - paxos & tlc ( homework 3 ) paxos : review key properties : ● safety : all nodes agree on a ( single ) decision ● liveness : eventually something is decided assumptions : ● crash - stop model ● partially synchronous ● # acceptors = 2f + 1 protocol ( choose 1 value ) : ● phase 1 : prepare / p...
EPFL CS 438 Moodle
No question: Moodle
a ) < c ( b ) each message contains the logical time, receiving updates the local clock ● vector clocks c ( a ) < c ( b ) →a caused b similar to g - counter crdt, one counter per node ● threshold logical clock specialized for threshold applications threshold logical clocks → → value x value y value z paxos consensus bo...
EPFL CS 438 Moodle
No question: Moodle
desired result →1 + fault ( s ) have made the system useless ● fault - tolerance : building reliability out of unreliable components ● denial is not a strategy – things will fail! redundancy ● fundamental principle to build fault - tolerant systems ● redundancy in digital design detect deviations and automatically rest...
EPFL CS 438 Moodle
No question: Moodle
( > 1 / 3 of whole range ) ● interpreted as 0 or 1, depending on rx threshold ● affected by every environmental + manufacturing factor imaginable analog digital systems another space shuttle story v vil vih failure modes & effect analysis ● a whole area of engineering ● under - used in software approach : ● analyze sys...
EPFL CS 438 Moodle
No question: Moodle
s ) ● puzzle difficulty is adjusted to keep block rate ( roughly ) constant →compensates for changes in mining power block 3 10 min bitcoin – assumptions ● threshold assumption : majority of mining power is honest … independently of the number of nodes ● longest / heaviest chain rule … transient safety violations ( e. ...
EPFL CS 438 Moodle
No question: Moodle
zeros ) computational power = hash rate ( h / s ) ● puzzle difficulty is adjusted to keep block rate ( roughly ) constant →compensates for changes in mining power block 3 10 min assumptions ● threshold assumption : majority of mining power is honest … independently of the number of nodes ● longest / heaviest chain rule...
EPFL CS 438 Moodle
No question: Moodle
among nodes →the source of transactions in a block bitcoin transactions utxo 11 utxo 12 utxo 13 utxo 34 utxo 35 version ( 4 bytes ) locktime ( 4 bytes ) inputs outputs version ( 4 bytes ) locktime ( 4 bytes ) inputs outputs utxo 46 utxo 35 utxo 20 bitcoin transactions utxo 11 utxo 12 utxo 13 utxo 34 utxo 35 version ( 4...
EPFL CS 438 Moodle
No question: Moodle
bytes ) bitcoin scripting putting it all together … ● utxo destination can be a script ( lock script ) ● script checks spending authorization ● transaction input must provide data satisfying the check ( unlock script ) enables non - trivial logic : ● multi - signatures ( t - of - n ) ● time lock vaults / contracts ● pa...
EPFL CS 438 Moodle
No question: Moodle
- based … account persist across transactions ● richer bytecode language … still limited … but turing complete, with loops! how can we deal with infinite / unbounded execution? ethereum – gas ● deterministic, virtual execution time … ( weighed ) instruction count ● each script execution has a gas limit … that must be p...
EPFL CS 438 Moodle
No question: Moodle
→active research area →keep secrets off - chain + zk - proofs →on - chain secrets ( calypso ) →recourse? recovery? →permissionless innovation? versioning? next steps optional readings : ● ethereum : a secure decentralised general transaction ledger ● ethereum is a dark forest ● the law and legality of smart contracts →...
EPFL CS 438 Moodle
No question: Moodle
led to lawsuits, 700 + people found guilty. dozens were sent to jail. some faced bankruptcy, others committed suicide. https : / / en. wikipedia. org / wiki / british _ post _ office _ scandal of the need to manage defects a sinister example : fujitsu horizon ( 2000 - 2020 ) quality – a definition what does it mean in ...
EPFL CS 438 Moodle
No question: Moodle
keep costs under control ● manage risks ( i. e. bad stuff happening ) reduce probability reduce impact ● quality supports this! software development lifecycle a reminder quality and cost – a balancing act ● quality assurance measures are not free! ● defects are even more expensive! ● what ’ s the trade - off? requireme...
EPFL CS 438 Moodle
No question: Moodle
, system, etc. ) ● detect defects with respect to specification ● what else is testing good for? system documentation! ● quality impact : →limited, poor or absent testing will cost you down the road.... and it will cost a lot! testing the pyramid deployment – because your code is still buggy! ● ensure repeatability and...
EPFL CS 438 Moodle
No question: Moodle
matters ● developer wants to see things work, build them focuses on what the system should be doing →solution - oriented work ● tester wants to break things focuses on what the user expects →problem - oriented work the ( manual ) test case documenting the what with the how automated tests – the “ right ” way ● reproduc...
EPFL CS 438 Moodle
No question: Moodle
of basic concepts ● unit test ● integration test ● end - to - end test ● mocking ● dependency injection ● fuzzing ● property - based tests ● formal verification ● model checking unit testing dealing with coupling unit testing – outcomes ● find defects early ● a failing unit test makes the defect obvious ● better functi...
EPFL CS 438 Moodle
No question: Moodle
end - to - end ( e2e ) tests o custom • typical mocks when testing business logic : o database o network o external apis o filesystem integration testing key points 1. testing how 2 - 3 classes work together 2. web : testing the user interface without a backend 3. server : testing an api endpoint ( without a database )...
EPFL CS 438 Moodle
No question: Moodle
##all int c ) { return add ( add ( a, b ), c ) = = add ( a, add ( b, c ) ) ; } / / function under test int add ( int a, int b ) { return a + b ; } @ property boolean sumidentity ( @ forall int a ) { return add ( a, 0 ) = = a ; } @ property boolean sumtwiceismultiplication ( @ forall int a ) { return add ( a, a ) = = 2 ...
EPFL CS 438 Moodle
No question: Moodle
challenges in distributed / decentralized systems ● the network is an uncontrolled variable ● ( virtually ) infinite number of states ● failures can happen at any layer ( network, hw, os, application,... ) ● many software versions may coexist backward compatibility forward compatibility application invariants across ve...
EPFL CS 438 Moodle
No question: Moodle
##s ) ● actual video data comes their content distribution network ● all the logic ( incl. stream play ) comes from their microservices ● hundreds of microservice clusters →how do you not break anything? chaos monkey & chaos kong how can we... ● test that a vm ’ s unavailability has no consequences? →kill them! →kill t...
EPFL CS 438 Moodle
No question: Moodle
strong observability of the system ( = good monitoring ) ● “ mature ” testing environment ( = moderately reliable software ) ● enough usage to measure a “ steady state ” in the system hypothesis : “ steady state ” will continue in both experimental & control groups ● infrastructure - level separation between experiment...
EPFL CS 438 Moodle
No question: Moodle
##e ) voting machines paper - based – ballot marking device ( bmd ), optical scan remote online e - voting ( or i - voting ) ● ballots are marked electronically on voter ’ s device ● transmitted over the internet ● no paper trail ● voter hopes ( verifies? ) the vote is counted correctly ● switzerland : various trials s...
EPFL CS 438 Moodle
No question: Moodle
verification ( votegral ) counted - as - recorded : approaches shuffle - and - decrypt ● classic mix - nets ballots →mix1 →mix2 →... →mixn →decrypt ballots ( verifying at each step ) ● cryptographic verifiable shuffles neff shuffle ( elgamal encryption ) generalized zk - snarks ● cut - and - choose ( scantegrity, assig...
EPFL CS 438 Moodle
No question: Moodle
, forums, reddit, … ● decentralized??? →today ’ s lecture decentralized communication usenet & gossip ( homework 1 ) what is usenet? ● user ’ s network ● worldwide, distributed discussion system ● hierarchical organization of topics ● context – early 1980s : pre - internet ( 1980 ) mainframes, then minicomputers interm...
EPFL CS 438 Moodle
No question: Moodle
) building usenet : network messages header body the message itself comes here, after a blank line. hello, world! blank line mhuxt eagle mhuxj mhuxv cbosjd jerry beth • from : jerry @ eagle. uucp ( jerry schwarz ) • path : cbosgd! mhuxj! mhuxt! eagle! jerry • newsgroups : news. announce • subject : usenet etiquette - -...
EPFL CS 438 Moodle
No question: Moodle
propagation path naive broadcast ( fixed! ) a b c d e f on receiving message m : if m is known : ignore else : send m to all peers ( except sender ) which issues do you foresee? broadcast : limitations ● well - connected nodes often receive the same message many times ● what happens if some nodes failed? ● do we need t...
EPFL CS 438 Moodle
No question: Moodle
- insensitive ) the life and death of usenet what killed usenet? cause # 1 : spam! ● jan 1994 : global alert for all : jesus is coming soon ● apr 1994 : green card lottery – final one? other causes : ● better alternatives ● slow evolution beyond usenet : gossip efficiency what if we wanted to further minimize traffic? ...
EPFL CS 438 Moodle
No question: Moodle
- tan and bryan ford credits : p. tennage, c. basescu, et al. decentralized communication gossip ( homework 1 ) recap : improved gossiping a b c d e f what can we learn from people? rumor mongering on receiving message m : pick random neighbor, send m neighbor replies : new rumor? if new : repeat else : what ’ s good a...
EPFL CS 438 Moodle
No question: Moodle
) | machine id ( 10 bits ) | counter ( 12 bits ) ] what about a decentralized setting? ● would this work? ● what else do we need to do? case study : mastodon {'created _ at': datetime. datetime ( 2022, 11, 13, 0, 52, 37, tzinfo = tzutc ( ) ),'id': 109347716491680514,... message data...'uri':'https : / / example. com / ...
EPFL CS 438 Moodle
No question: Moodle
##ete the death certificate? ● what if a server is offline? “ dormant ” death certificates phased deletion 10 a few applications of gossip ● metadata propagation ● failure detection ● group membership example ● apache cassandra ● cockroachdb ● consul 11 communicating with ( many, unknown ) peers you now understand : ● ...
EPFL CS 438 Moodle
No question: Moodle
gnutella context ( 1999 – 2008 ) : ● no spotify, no netflix ● no bittorrent ● people still want entertainment specifications : ● search any file, anywhere ● metadata can be searched ● complex queries are allowed ( ( a or b ) and c ) e. g. artist is “ bob marley ” and title contains “ birds ” standard, basic algorithm w...
EPFL CS 438 Moodle
No question: Moodle
2024 pierluca borso - tan and bryan ford credits : p. tennage, c. basescu, et al. so far... ● decentralized communication & search ● focusing on ( mostly ) unstructured networks characteristics : ● ( nearly ) stateless ● simple to engineer ● expressive search ● optimizations require ( true ) random sampling ( hard ) ● ...
EPFL CS 438 Moodle
No question: Moodle
→d = 2 ( through b or c ) c →d = 1 1 1 1 1 on link failure, b updates : b →d = 2 ( through c ) then c updates : c →d = 3 ( through b ) 1 reaching arbitrary peers in a network : aodv ad - hoc on - demand distance vector key idea : flooding search for a node ( e. g. e ) nodes remember where the search came from... and bu...
EPFL CS 438 Moodle
No question: Moodle
“ good ” hash function ● random - access memory ● not too full distributed hash tables considerations : ● what do we need from the hash function? avoid collisions, not time - sensitive →cryptographic hash, well distributed ● what are we missing? →ram chord dht ● hash into a collection of rams ● circular hash id space (...
EPFL CS 438 Moodle
No question: Moodle
chord dht – performance how do we make this? ( in storage, network, etc. ) ● using only successors : routing table size ● binary search? finger tables! 0 2254 2255 3 e a b c d kv4 kv5 kv3 kv2 kv1 chord dht – finger tables 0 2254 2255 3 e a b c d kv4 kv5 kv3 kv2 kv1 distance bucket 1 ( successor ) = b ½ circle d ¼ circl...
EPFL CS 438 Moodle
No question: Moodle
: a scalable p2p lookup service for internet applications recommended ( engineering ) : ● the babel routing protocol ( rfc 8966 ) ● kademlia : a peer - to - peer information system based on the xor metric... and a few others for the curious among you... →use friday ’ s session to ask questions 23 decentralized systems ...
EPFL CS 438 Moodle
No question: Moodle
##ized communication ● unstructured & structured search ● can we attack structured search systems? yes, but they ’ re still useful! ● how do we handle the actual underlying data? storing data ( reliably ) ● local machine raid, fec / ecc / erasure codes, … ● distributed block -, filesystem - or object - level access ( s...
EPFL CS 438 Moodle
No question: Moodle
& rollback attacks access control, logging, accountability “ flat ”? files? directories? databases? graph? where should it be stored? building bittorrent : specifications ● distribute a large, static ( immutable ) files … from a source node with limited bandwidth … to a large number of users … as fast as possible! ● sc...
EPFL CS 438 Moodle
No question: Moodle
” ● publish a. torrent file or magnet ( dht ) link bittorrent : performance & incentives ● download rarest data blocks ( “ chunks ” ) first – entropy maximization ● tit - for - tat strategy ( “ choking ” protocol ) “ chokes ” ( punishes ) peers that are not uploading “ unchokes ” peers with the highest upload rates “ o...
EPFL CS 438 Moodle
No question: Moodle
p2p distributed file system, fully decentralized ● designed to address ( perceived ) flaws in http ● deployed at massive scale 2024 : > 70k servers, millions of unique weekly users, 23 eib capacity ( 2 stored ) ● a decentralized file system inspired by : kademlia dht bittorrent – block exchange git versioning self - ce...
EPFL CS 438 Moodle
No question: Moodle
data ” : “ \ u0008 \ u0002 \ u0012 \ rhello world! \ n \ u0018 \ r ” } also known as : a blob! ipfs : representing a file > 256kb { “ links ” : [ { “ name ” : “ ”, “ hash ” : “ qmysk2jy... ”, “ size ” : 262158 }, { “ name ” : “ ”, “ hash ” : “ qmqeuqdj... ”, “ size ” : 262158 }, { “ name ” : “ ”, “ hash ” : “ qma98bk1....
EPFL CS 438 Moodle
No question: Moodle
of both content and its parent commit ’ s hash ● creates a git - like log of versions also known as : a commit! ipfs : naming ( mutable ) data objects are immutable, so : ● use a separate namespace for mutable data ● use mutable, signed pointers to immutable data ● not content - addressable : advertise link on routing ...
EPFL CS 438 Moodle
No question: Moodle
crdt is a 5 - tuple ( s, s0, q, u, m ), where : • s is the set of states ; • s0 ∈s is the initial state ; • q : s → v is the query function • u : s × u → s is the update function • m : s × s → s is the merge function next steps - readings mandatory : ● incentives build robustness in bittorrent ● ivy : a read / write pe...
EPFL CS 438 Moodle
No question: Moodle
##ts ) ● state - based – convergent replicated data types ( cvrdts ) →theoretically equivalent ● lists ● log - based ● text state - based crdt – formalism let u be the set of update operations, and v the set of values. a state - based crdt is a 5 - tuple ( s, s0, q, u, m ), where : • s is the set of states ; • s0 ∈s is...
EPFL CS 438 Moodle
No question: Moodle
[ max ( x, y ) for ( x, y ) in zipped ] g - counter crdt specifications : ● grow - only counter, replicated across n machines ● add ( x ) updates our local counter ● query ( ) returns the value ● merge ( other _ state ) merge ’ s other ’ s state 4 2 1 3 tot : 0 tot : 0 tot : 0 tot : 0 g - counter crdt specifications : ...
EPFL CS 438 Moodle
No question: Moodle
11 tot : 2 g - counter crdt history, as seen locally : node 1 : 0 →5 →6 →12 node 2 : 0 →4 →11 →12 node 3 : 0 →5 →12 node 4 : 0 →2 →12 … eventually consistent! 4 2 1 3 1 4 5 2 1 4 5 2 1 4 5 2 1 4 5 2 tot : 12 tot : 12 tot : 12 tot : 12 local - first software – simpler backends strong consistency? ● what if we wanted a s...
EPFL CS 438 Moodle
No question: Moodle
nodes permissionless ( week 9 & 10 ) – anyone single - value consensus ( formally ) we want all nodes ( “ processes ” ) to agree on a single value ● agreement / safety every correct process must agree on the same value ● termination / liveness eventually, every correct process decides some value ● integrity / validity ...
EPFL CS 438 Moodle
No question: Moodle
we need a two - phase protocol! paxos ● a family of distributed algorithms for consensus three roles : ● proposers : put forth values to be chosen ● acceptors : respond to proposers, reach consensus ● learners : learn the agreed upon value ● nodes can take any ( or even all ) roles ● nodes must know how many acceptors ...
EPFL CS 438 Moodle
No question: Moodle
multi - paxos ) the raft consensus algorithm ● designed to be easy to understand ● functionally equivalent to paxos ● easier to implement ( claim ) ● widely used in the industry mongodb, cockroachdb etcd, neo4j, rabbitmq... cs - 438 decentralized systems engineering fall 2024 week 7 a versaries and threat modeling no s...
EPFL CS 438 Moodle
No question: Moodle
dived size 2 properties : non - invertible, collision - resistance - messageauthenticationchs face ke hmac ( k, m ↓ note - authenticated m i ( w / " additionoption ( a hee ↓monit " lad # metric kila tion mc - publiceye ) k ms - digital signatures threshold cryptography - - t - of - n encryptiono m c kn 00000 he - final...
EPFL CS 438 Moodle
No question: Moodle
, sensor usage, etc. ● based on a fingerprint database of 42, 027 videos, they identified 99. 5 % of 200 random 20 - minutes video streams correctly, ~ 90 % within 8 minutes. ( gen. michael hayden ) why desire anonymity online? ●privacy ( individuals ), security ( business, governments ) ●freedom of speech / journalism...
EPFL CS 438 Moodle
No question: Moodle
● ideally : censorship - resistant anonymous communication senders receivers how to achieve anonymity 1 - hop approach : ● proxy / commercial vpn advantages : ● shields user from website ip - based tracking ● prevents geolocation problems : ● vpn knows incoming outgoing mapping ● vulnerable to traffic analysis ● vulner...
EPFL CS 438 Moodle
No question: Moodle
e mix f mix g mix networks ● client can stay anonymous & provide encrypted return path for replies ● works with just 1 honest mixer advantage ● provable ( strong ) anonymity ● may resist traffic analysis problem : ● very slow, high latency ( hours ) ● few users →small anonymity set tor ( the onion router ) ● can we mak...
EPFL CS 438 Moodle
No question: Moodle
● the classic problem : cryptographers are having dinner & a waiter tells them the bill has been paid they want to find out if one of them paid or if someone else ( the nsa ) did without revealing who paid? dining cryptographers ( dc - nets )? 0 1 0 my value = left ⊕right ⊕ ( i paid ) dining cryptographers ( dc - nets ...
EPFL CS 438 Moodle
No question: Moodle
dining cryptographers problem optional : ● plenty of papers on anonymous communication systems 27 decentralized systems engineering cs - 438 – fall 2024 bryan ford and pierluca borso - tan credits : wikimedia commons, visa, swiss govt. so far … dht, consensus, etc. failure modes at worst : byzantine nodes can misbehave...
EPFL CS 438 Moodle
No question: Moodle
sign up with phone number ( e. g., whatsapp ) ● sign up with credit card ● sign up with e - mail me @ gmail. com vs. me + cs438 @ gmail. com ● id verification regulatory requirement e. g. “ know your customer ” ( kyc ) deterrents : cost, jail, paper trail stronger identities ( 2 / 2 ) ● biometrics face fingerprints iri...
EPFL CS 438 Moodle
No question: Moodle
environmentally friendly! sybil defenses – artificial costs ● proof - of - stake nodes must stake money to participate in consensus randomized validators, likelihood based on stake misbehaviour punished by loss of stake risks : hostile takeover, devolution to plutocracy social / trust network defenses ( 1 / 2 ) ● pgp “...
EPFL CS 438 Moodle
No question: Moodle
personhood key intuition : can we link identity only to “ being a physical person ”? goals : ● inclusion low cost to participation ( permissionless ) ● equality one person, one vote ( strictly ) ● security against identity theft / loss and sybils ● privacy no id, no biometrics, no databases, etc. pseudonym parties prin...
EPFL CS 438 Moodle
README.md exists but content is empty.
Downloads last month
3