Bitcoin and Blockchain for Pythoneers

Video thumbnail (Frame 0) Video thumbnail (Frame 1055) Video thumbnail (Frame 11296) Video thumbnail (Frame 21342) Video thumbnail (Frame 24180) Video thumbnail (Frame 25259) Video thumbnail (Frame 27209) Video thumbnail (Frame 31339) Video thumbnail (Frame 33856) Video thumbnail (Frame 34467) Video thumbnail (Frame 35418) Video thumbnail (Frame 36990) Video thumbnail (Frame 39363)
Video in TIB AV-Portal: Bitcoin and Blockchain for Pythoneers

Formal Metadata

Bitcoin and Blockchain for Pythoneers
Title of Series
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this license.
Release Date

Content Metadata

Subject Area
Bitcoin and Blockchain for Pythoneers [EuroPython 2017 - Talk - 2017-07-10 - Anfiteatro 1] [Rimini, Italy] Why should a Python programmer be interested in Bitcoin and the Blockchain technology? Blockchain technology is one of the fastest moving part in the Fintech area. However, the Blockchain is not only the basis of crypto currencies. First of all it’s a decentralized registry that cannot be modified. This means that using a Blockchain, users can trust in the validity of a dataset without the need to establish a central authority. Thus, the Blockchain can be used to store records e.g. of land ownership or and other property rights in countries with weak or corrupt or otherwise incompetent authorities. Therefore, Python programmers with an understanding of this technology are especially well prepared to contribute in this area, because the agility inherent to Python makes it easy to program in a fast moving environment. The fact that various applications in the Bitcoin and Blockchain area are implemented in Python prove this notion. However, the reverse is also true: An understanding of the distributed ledger technology possibly enables you to solve problems in projects you encounter in the near future. In this talk, I will present the following topics: • The Blockchain architecture: nodes, transactions, headers. • The Bitcoin protocol and its proof of work (POW) • Smart contracts • Bitcoin alternatives: Proof-of-work (PoW) compared to Proof-of-stake (PoS
Centralizer and normalizer Authorization Right angle
Email Multiplication sign Workstation <Musikinstrument> Database Mereology Database transaction Computer programming Neuroinformatik Mathematics Atomic number Single-precision floating-point format Hash function Elasticity (physics) Information Extension (kinesiology) Physical system Identity management Proof theory Service (economics) Point (geometry) Database transaction Complete metric space Proof theory Data mining Root Chain Order (biology) System identification output Normal (geometry) Quicksort Block (periodic table) Thermal conductivity Point (geometry) Heat transfer Theory Trigonometric functions Number Moore's law Chain Root Network topology Authorization Form (programming) Multiplication Matching (graph theory) Information Cellular automaton Mathematical analysis Ordinary differential equation Heat transfer Computer network Database Peer-to-peer Integrated development environment Software Network topology Synchronization Revision control Formal grammar Vertex (graph theory) Identity management
Point (geometry) Ocean current Email Logistic distribution State of matter Set (mathematics) Water vapor Database transaction Food energy Moore's law Chain Cryptography Network topology Hash function Information Traffic reporting Physical system Form (programming) Information Block (periodic table) Web page Point (geometry) Moment (mathematics) Database transaction Inclusion map Proof theory Data mining Uniform resource locator Arithmetic mean Root Hash function Chain Revision control Vertex (graph theory) Right angle Procedural programming Block (periodic table) Physical system
Multiplication sign Design by contract Matching (graph theory) Database transaction Revision control Chain Mathematics Root Hash function Data mining Vertex (graph theory) output Physical system Form (programming) Information Block (periodic table) Database transaction Auto mechanic Hash function Software Network topology Revision control Triangle Vertex (graph theory) output Block (periodic table)
Point (geometry) Structural load Web page Database transaction Database transaction Chain Cryptography Degree (graph theory) Software Function (mathematics) Hash function Data structure Block (periodic table) Data structure
Area Beat (acoustics) Scripting language Multiplication sign Price index Database transaction Axiom Function (mathematics) Axiom Database transaction Public-key cryptography Hash function Function (mathematics) output output Address space
Scripting language Area Slide rule Group action Scripting language Multiplication sign Design by contract Price index Database transaction Function (mathematics) Database transaction Public-key cryptography Electronic signature Hash function Function (mathematics) Hash function output Cuboid Formal verification output Sinc function
Scripting language Discrete group Scripting language Validity (statistics) Database transaction Stack (abstract data type) Line (geometry) Price index Database transaction Public-key cryptography Electronic signature Mathematics Programmschleife Hash function Causality Operator (mathematics) Hash function Normed vector space Chain output Formal verification Physical system
Group action Scripting language Database transaction Price index Database transaction Electronic signature Public-key cryptography Kernel (computing) Hash function Hash function Design by contract Formal verification Escape character
Design by contract Database transaction Electronic signature Timestamp Sequence Chain Peer-to-peer Befehlsprozessor Hash function Vertex (graph theory) Message passing Abstraction Multiplication Proof theory Multiplication Just-in-Time-Compiler Computer network Database transaction Digital signal Cartesian coordinate system Electronic signature Type theory Event horizon Basis <Mathematik> Normed vector space Design by contract Revision control Data structure
Slide rule State of matter Database transaction Volume (thermodynamics) Food energy Fault-tolerant system Limit (category theory) Database transaction Hypercube Computer programming Data mining Proof theory Film editing Personal digital assistant Chain Data mining Communications protocol Block (periodic table) Volume Pairwise comparison Communications protocol Proof theory
Ocean current State of matter Real number Design by contract Database Data storage device Plastikkarte Code Hypercube Theory Field (computer science) Formal language Cryptography Bit rate Personal digital assistant Vertex (graph theory) Communications protocol Pairwise comparison Pairwise comparison Block (periodic table) Database transaction Digital signal Exterior algebra Personal digital assistant Chain Speech synthesis
have quite a lot to tell you so let's go straight to a rather short but hopefully deep dive into the Brighton and booked inactive as most of you will know that because during the said cryptocurrency it's false reliable and most of all it works without central authority right this is a good thing to Mercury thought central authority central
authority like the government of a bank it's good we because
at time you know it at banks and also a single point of failure can go down order database of facts can go down and then that the and huge uh Finland the cosine lot so the to work around the cell and we have to distribute what's there bank others and also the mate to every computers uh and that did this is that the reason the all of the of the book chain it's on distributed lecture it's a peer-to-peer network but of course if to the late this comes we fair and other problems the 1st problem is a transaction for tree at you have to if you working out is you would environment each transaction has to be announced publicly and in a simple approach uh conduction the formal Alice cancers according to book can be read but he played and such ODE place and it could mean either all this wants to transfer the 2nd cortical politicking can mean Alice wants to fool bold or it can be what we place the transaction to get a multiple coins from others has become to get around this problem you have to add an identification for example a serial number to every corner in the system but this poses an another problem and it's called that double-spending problem now we have a transaction in the form of analysis transfers scoring for you 2 2 theories DIT 42 to book but these transaction can be complicated by elastance pairs scoring 42 to challenge and if the transaction to Bobby's announced before the transected Charlie this is not a problem but in a distributed made work network you have to be in the friend network latency the after the lifted undesirable car or between issuing a transaction and having every form every wrong informed about it to work around this problem of of double-spending relates the whole network maybe 5 elected the legitimacy of a transaction but they use such a solution we come to the last program it's cool to see the back and attack such an approach can fool false identities and they share the attacker has also installed enough sort fools you died identities then he will be a they put 2 in and the 2 dollars spent effectively stop spends the transaction so the solution is that you have to create create the make creation of false identities extensible expensive yeah 2 miss there are attractive the mining node have has to perform some work and steered by their deputy to verify transactions depends on the computing power not on the number of identities and use principle decide is called the proof of work so a piece rope around the 1st come to the basic feasible self that we conform chain transactions already fighting a disputed man of and the gist of his books and these books from a changes they must be coined blockchain books are created using atoms of work and new books are created mind on the longest chain we have to now to have we have to uh take a closer look to the book chain had to understand how would you proof of work works the blockchain Haider has good consists of as its input the information the 1st is the notion number of the books and tropical disease at its value then times then this time-stamped changes every 2nd 2nd then this difficulty and the syrup beats reaches uh mind there were books it has to be match then then they're references to their previous books hash and this is also a fixed value of course then add to the root of the medical t goes into their pockets of and the mo complete that operate and reduce it is the richest faces with that stations of all transactions that art processed by the book and that this seeks input values their norms and this knowledge can be freely chosen a valid book consist of these parts about the valuable consists of the following parts and demand side it's the the the
book patents and those on the 2nd side it's that the logistics and transactions and facilities the book hostilities which is calculated from that information to calculate the books hash 2 pieces of information our fundamental it's there difficulty and the nouns at the if the calculated hash you know it yeah that's a rather simple procedure the yeah but it's in the outcomes under acts unexpected but if the difficulty mean suppose we say they say that they had created book highest has to uh matter in this distinct form of the difficulties faced that uh there have created forecast has to stop me from a certain amount of sio repeats so if you if you see that there are location is created offers some feature values then the day article Mr. exactly the the defined and to be we don't have some freedom to 2 Barry anti at this is the point where the moments continents comes in this amounts can be freely chosen and the proof of work consists on the varying demands on deal they create past uh matches the difficulty that's how did to fulfill works the yeah so their DCT with that chain consists of thousands of nodes the chair uh create title creator books and stadium Spain India compute the was to their create blocks and that makes the data the blockchain allies right does every any longer and use these yeah we provide these the computing power doesn't that you do it consumes energy and that energy has to be so there must be an incentive that uh book minus uh contributes to the book chain and their minor things entities that there data mining notes that was able to create a new block the if they're not book has yeah its the some coatings the so called coin based at the moment and each created book the water by expelled . 5 currents and that's about through thousand you as follows and the the the participants that's created a new book that's all they mind a transaction fees so there's a very interesting idea that there was this the book report aired on demand and it's the intensity using the for the book minus and on the other hand it stayed there that states mule it points to get the continued that get introduced to the system a at the beginning of the the book what started by 50 because sent every 2001 on the 40 it and we 2 them 10 thousand books he said 3 rotties hold so the whole of the hidden the mining embodies is continues the sinking at the end of around 2 thousand 140 to be consistent with contain a exactly 21 million bitcoins so we tend that a capital late yeah uh what we learned on till now transactions object that used in the books and to became the sleep of books as features of our distributed letters blocks are formed to achieve to give a complete daughter of the transactions history books are created so the enacted the graphical apostle the proof of work and the system prevents the facts new blood books of mind on the longest chain to prevent forks and the mind of the new book is but by a certain amount of bitcoins I use made a short animation for the captive yeah here if you have a system of consisting of 3 mining notes and we see each node of the set hashing independently dashes are displayed on the right of each and the so sorry the
fellow yes to a node in then and the orange firms our transactions it into the system there's triangle beyond the notes symbolize the and local trees and the of our dis validated and dispatched the the if we look at the book had the 6 input information the 1st is the version actually it's version 2 then the time this information changes every 2nd the difficulty in this example it's 6 the real world is of course much higher amounts this the information in the input that can be freely chosen the previous book we test the matched the difficulty and transactions in which following he added in the form of the root of the local tree and actually 1 of the book find a hash that matches the difficulty and the new book the city dispatched Yucca blocks in the network have to validate not only the block but also the transaction each contracting and it is in the book
so now we have to look at the
transactions because the transaction is the most important
thing in the currency you have to prove that the ownership all of the points in their network is guaranteed the transaction has the following structure in loaded transaction ID which of course is is a
hash then some discrete the sentiment the beta then and that input this is that the carry out and and output the green area to understand how transaction rooks you have to do note the axioms which tool at transaction there are 4 axioms any beat can't bitcoin amount to be sent to another 88 current amount received is locked to the receiving atlas and as ATPases are managed by overlooked 8 times the current the amount we spend will always come from farms previously received and currently press you know what at this this the the current but they do not think it going speaker in sent from a lot what is the matter and other these nothing else than the house public key of the receiver so this is
and you have to to deal with the public and
private key I will look in the starts from a private key and generates the public key and the other is from the public key here is next example starting from the transaction the Ali's since fall some amount this example 0 . 5 feet coding to do so she creates a transit times actually caught which has a much as output the amount and script public key this is a script uh if a special name entities could contains the public key hash from no boat books select and this is nothing else than the accuracy at the the output is on spent yeah it each of them to the main something as long as this output is not used as an input in another transaction so let's now spent this amount by creating another transaction the sense that transaction books things Charlie 0 . 4 points and distant consists of an input and and that the input has a references the ideal of of the former transaction from coming from alice and the signatures signatures creep and the signatures script consists of box public key and signature created by the private key and of course the sense contraction has also an output uh rich countries which includes Charlie's public key you have for the red area on this slide combines the output of the POS transaction and at the input of the current transaction How do we verify the transactions
mind you know too many nodes have to validate
every coming transactions 1st to do so firstly retrieved a reference reference preceding transaction the amount to transfer the current transaction has to be less than the amount of the transaction referenced in that the input and of course suddenly put has to be on spanked as lex that discrete signatures the signature script to the input is combined with the we've got put the 2 of the reference transaction and In this 2nd line the house combined these 2 was going innermost Coleman scraped transaction is cause called pay to public key hash the there the book change maybe when chain user so for like stock-based scripting system for transaction validation the scripting system is not Turing-complete that means it's stateless and has a nice of loops north so yeah because it's a rather simple can and inmates had and look for how these
lyrics there's 1st that the place of food on the stack and then some operations the are put in the stack and makes the public key is the food and the qualities very fight the next operation takes the signatures and if the chicken signatories OK then uh the OK indicator these left
on the stock and this indicator the two marker shows that the transaction is valued the and the important thing to remember is that there the public key now this is suffocated and this combined in their previous escape the biggest and action the actual transaction that the pot to public key hash is the most simple and
most common scraping in there and and beat kernel but there are some of those uh compact that sinkable
under possible for example to implemented as prone application uh this is the possibility to create um multi signature there's clique names such as cleaved there day participants the 2 participants agreed that a certain type of a 3rd party there is also integrated and then a transaction is old and validate the tools they there's 3 parties sign the contract and then we this knowledge now we can perfectly
understand their abstract of the famous uh take their Makimoto published in 2 0 0 thousand and 8 but then I mean not meet but this is a very and you see the
abstract that I mean published value slides and and you can read the the if you want there are some problems he said to be conducting 1st day transaction volume is limited the limitations caused by the size of the book cover beat current book which is limited to 1 megabyte g the limitations that the book creation only which is said to be fair currently is set to 10 minutes but there is more to significant the program is the high energy consumption which is used for the book Mining so and the concerned the fat book chains are looking for alternate case and there are alternate if consensus protocols for example the proof of state of the art is fine depressing cut Practical Byzantine fault tolerance there are alternate yesterday in the
conducting the food Tristan artists on forks of the Bitcoin blockchain like going about how if
you look at the comparison there light coding has state the book well to 2 . 5 minutes and sports car in its own and 1 minute so the decent salts have high transaction rates here the most prominent rival some of the current block chain is a fairly you uh if you has known chain and has another scripting language the cerium speaking land which is fully during incomplete and DOS has now allows for the complicates for so-called smart contracts and there is also an alternative in alternate Kiefer recyclates here the idea in proc chain so what are the book chain use cases 1st of all it's a cost-effective the currencies each is becoming more and more interesting and not only in the developed countries but more so in in their failure states like this a lot their lives they after receive hyperinflation and the real alternative theories speech coding use cases based on that you see you on there is just there so the last week announced that is the difficulty in this is the silicon valley you announced that they are stored in a teacher lot the to the like this today providing digital ihis which are stored in the field of block chain so I hope I did a few warm you into that it conducted in and thank you very much much for Europe and for the few