old network ! I am not talking about this today. ! New stack is built with different priorities and design principles ! Complete rewrite ! This presentation.
the ecosystem of apps written on Stellar should be entrepreneurs’ creativity ! Simple APIs ! Easy to write secure and correct code ! Rich developer community around the Stellar stack ! Low bar of entry ! Leverage skills of all developers ! Running the network should be cheap and easy ! Design for billions of accounts and thousands of transactions per second running on commodity hardware
middleware goodness ! “Core protocol implementation” == stellar-core ! Unlock innovation where people have expertise ! The “Core protocol” is standard ! Simple to understand and validate ! Documented, aiming for RFC ! Bar for writing correct and secure applications on top of stellar-core should be low ! Clear split between Stellar-core components (historical vs real time) ! Runtime is predictable: quality, performance
= state of all entries (Accounts, Order Book, etc.) + link to previous ledger ! Picks the set of transactions to include in the next ledger ! Enforces invariants ! Transaction validity ! Signatures ! No double spend ! Consistent ledger state (minimum balance, etc.) ! P2P, Designed for decentralized runtime
C = 5000} • A: send 10 to B • A: send 20 to C Ledger #1001 {A=70, B = 1010, C = 5020} • A: send 10 to B • B: send 20 to C Ledger #1002 {A=60, B= 1000, C = 5040}
to the “latest ledger”. ! While doing so, it also generates data kept in a historical data store. ! For new nodes to catch up ! Confirm transactions and their results ! Auditing
B = 1000, C = 5000} • Transaction Set 1000 Ledger 999 • State = {A=70, B = 1010, C = 5020} • Transactio n Set 999 Ledger … Ledger 1 (genesis) • State = {} • (no transactio ns)
• Historical APIs Core engine • Consensus • P2P • Storage Working set store (SQL) • stellar- core engine • Ledger API Transaction Meta Data (SQL) • Raw historical store (S3) • History APIs Processed historical store (*SQL) • Processor • Extende d APIs Then Now Dev Expertise: C++ Full Stack Storage stellard Consensus P2P
current state of the ledger (latest) ! Submit transactions to the network ! History API ! Transactions results ! Transaction history for an account ! State of an account at arbitrary point in time ! Extended APIs ! Path finding ! Complex auditing ! <your new idea here>
<your work here> ! Easy to write secure and correct code ! Protocol definition in XDR for both input and output (strict & less bugs) ! Ease of access for core contributors ! Nimble code base: 45k lines of code (from 200k without much tests) ! C++ 11 ! Low bar of entry for running nodes ! Low memory and CPU footprint ! Rich built in metrics for monitoring all parts of the system
! List of (signer, weight) – signer is just a public key, weight a number ! thresholds for various operations ! ! A transaction originating from an account is validated by computing the sum of the weights of all signatures attached to the transaction
(S2, 3) and a threshold of 3 for medium operations, and 6 for high operations. ! Such an account can: ! Send a payment using any one of A, S1 or S2. ! Change the policy either by signing a “change policy” operation with A or by signing with both S1 and S2. ! Changing the threshold to 10 for high operations would cause only A to have the right to change the policy. ! The key trivially associated with A is called the “master key”.
call operations. ! An operation is something like “Payment” or “Create an offer”. ! A transaction is an ordered list of operations that get applied in order atomically. ! If all operations succeed, the transaction is considered “successful” ! If one of the operations fails, the transaction is marked as “failed” and none of the operations are applied
A wants to send B some credits X (Operation 1) in exchange for credits Y (Operation 2). ! ! The transaction looks like: ! Operation 1 = A: send X -> B ! Operation 2 = B: send Y -> A ! ! The transaction needs to be signed with signatures that control accounts A and B. ! In this case the transaction needs to be signed by A, S1 or S2 ; and by B
top of stellar-core is really a family of stacks ! Horizon is the first pass at what can be built on Stellar ! ! I envision many other stacks or mini stacks built on top of the low level primitives ! Some may push more logic client side, removing the need for trusting single services (ssl-proxy like access to the network as a whole). ! ! Some will probably come to light with alternate implementations of stellar-core that expose new ways to communicate what the network is doing to other layers