SlideShare a Scribd company logo
1 of 31
Title: Blockchain and smart contracts
What they are and why you should really care about ad developer
Author: @maeste, Stefano Maestri
CODEMOTION MILAN - SPECIAL EDITION
10 – 11 NOVEMBER 2017
Who is Stefano?
● A young enthusiast open source developer
● Red Hat Principal software engineer
● https://www.linkedin.com/in/maeste/
● https://twitter.com/maeste
● https://github.com/maeste/
● http://www.onchain.it/
My matching pairs game: Java & JBoss, Open Source & Red Hat,
Blockchain & Ethereum
Today’s Agenda
● Brief introduction to blockchain concepts
● Cryptocurrencies and why they have monetary value
● Smart contracts and why you should care about
● Developing smart contracts on ethereum blockchain
What is the block chain?
The Guardian: Blockchain is a digital ledger that provides a
secure way of making and recording transactions,
agreements and contracts – anything that needs to be
recorded and verified as having taken place.
Wikipedia: A blockchain is a continuously growing list of records
, called blocks, which are linked and secured using cryptography.
Each block typically contains a hash pointer as a link to a previous
block, a timestamp and transaction data. By design, blockchains
are inherently resistant to modification of the data. A
blockchain can serve as "an open, distributed ledger that can
record transactions between two parties efficiently and in a
verifiable and permanent way."
What is a blockchain...a nice bullet list
● It’s a ledger of transactions and datas
● It’s persistent, secure and unmodifiable
● It’s based on computational trust
● It’s distributed and unstoppable
● Transaction parties are anonymous, but tx are public and verifiable
● It’s transactions could be about values (cryptocurrency)
● It’s trustless about nodes and users
Live Demo
It’s distributed and unstoppable
It’s distributed and unstoppable
Has those cryptocurrencies a real economic
value? And why?
In economy “intrinsic value” concept doesn’t exist at all. We give value to money
by convention, and more general anything gain value almost for 3 reasons (not
strictly needed, but true in almost cases at least)
● It’s rare
● It’s hard to reproduce
● It could be exchanged
1 Euro
Fontana’s paint ~ 8M Euro
~ 7K Euro Manzoni’s artist's shit: ~275K Euro
Traditional payments
And isn’t ok to simply trust in a Bank?
What could happen?
Lehman Brothers…..
So...what is the solution?
Grandmum solution?
Could be at least unpractical...
What is a blockchain...a nice bullet list
● It’s a ledger of transactions and datas
● It’s persistent and secure
● It’s based on computational trust
● It’s distributed and unstoppable
● Transaction parties are anonymous, but transactions are public
● It’s transactions could be about values (cryptocurrency)
● It’s trustless about nodes and users
Am I going to transfer my money without trusting anyone?
What does trustless mean?
You are not trusting in peers of transaction or even in nodes of the network, you
are trusting in the protocol itself. In other words you are trusting blockchain and
cryptocurrency itself and not people owning them….moreover they are
anonymous…
Does it recall anything you well known and use everyday?
Smart Contracts
What is a smart contract?
A contract is a voluntary arrangement between two or more
parties that is enforceable by law as a binding legal
agreement
A smart contract is a computer protocol intended to
facilitate, verify, or enforce the negotiation or performance of
a contract.
Real world smart contracts
With the present implementations]
"smart contract" is
general purpose computation that takes place on a
blockchain
Smart contracts: unstoppable Dapp
● Distributed
● Can transfer money/assets
● Unmodifiable state history
Ethereum: a blockchain for smart contracts
● Every node run a built in Virtual Machine (EVM)
● It provide a compiler from high level languages to EVM
● 2 different kind of accounts:
○ Externally owned account (EOAs), controlled by
private keys
○ Contract accounts, controlled by code
Ethereum Virtual Machine
Internals
● TURING COMPLETE VM
● Stack based byte code (push,
jump)
● Memory
● Storage
● Environment variables
● Logs
● Sub-calling
High level languages
● Solidity (c-like)
● Viper (python like)
● LLL (lisp inspired)
● Bamboo (experimental
morphing language influenced by
Erlang)
Everyone compiling to EVM code
EVM code execution
● Transaction sent to a contract address
● Every full node of ethereum run the code at this
address and store the state
● Smart contract code can:
○ Could run any program (turing complete machine)
○ Read/write state
○ Call another contract
○ Send ETH to other address (both EOA and contract)
Ethereum GAS
Halting problem: determine if the program will finish running or continue to run
forever. Classic NP-hard problem
Ethereum solution: GAS, a fee per computational step
GAS is not a currency is just a unit of measurement of computational step
In Tx you have “maximum GAS” you would give to the miner and “GAS price” to
determine how much you will actually pay.
If Tx complete successfully you pay just for effective GAS used.
It the Tx would consume all GAS the TX will be revert, but you still pay for GAS
Ethereum hasn’t block size limit, but Gas Limit (6.7M currently, but voted by miners)
Solidity
● C/Java-like syntax
● Statically typed
● Support inheritance (multiple)
● Complex user defined types (struct)
● Polymorphism
● Overriding
● …..
http://solidity.readthedocs.io/en/develop/index.html#
Our development environment
● testRPC (local in memory ethereum blockchain)
● Truffle (maven-like tool to compile and deploy contract)
● A bit of javascript (npm) for some raw Dapp interface
● Metamask to inject ethereum protocol in our
html/javascript Dapp
● Intellij to edit solidity and javascript
More info: http://truffleframework.com/
SmartNotary
● The easiest contract notarizing a document
● Receiving document hash and owner name It will write them in the
blockchain state
● Giving the hash it will return the owner name
● It’s a pet project just to play with code
Talk is cheap….show me the f****ing code (Linus Torvalds)
https://github.com/onchainit/SmartNotary/tree/baseExample
SmartNotary 1.1: using EOA
We are using current EOA (from metamask) as owner.
It will give us the opportunity to play a bit with metamask
https://github.com/onchainit/SmartNotary/tree/baseExample
SmartNotary 2.0: paying for notarization
We are adding money transfer.
Basically the user will pay in ether the service of
notarization.
The ethers are stored in contract balance, and only contract
creator could withdraw them in his EOA
https://github.com/onchainit/SmartNotary/tree/pay4Notarization
Contract security - reentrancy attack
// INSECURE
mapping (address => uint) private userBalances;
function withdrawBalance() public {
uint amountToWithdraw = userBalances[msg.sender];
require(msg.sender.call.value(amountToWithdraw)());
// At this point, the caller's code is executed, and can call withdrawBalance again
userBalances[msg.sender] = 0;
}
https://consensys.github.io/smart-contract-best-practices/
Contract security - reentrancy attack
// VERY SIMPLIFIED MALICIOUS CODE (WOULD NEED CONSIDERATION ON BLOCK MAXIMUM GAS)
function() payable {
vulnerable.withDraw();
}
Contract security -reentrancy attack solution
mapping (address => uint) private userBalances;
function withdrawBalance() public {
uint amountToWithdraw = userBalances[msg.sender];
userBalances[msg.sender] = 0;
require(msg.sender.call.value(amountToWithdraw)());
// The user's balance is already 0, so future invocations won't withdraw anything
}
Or just using primitive send() instead of .call.value which limit gas to 2300 (pure
transfer)
https://consensys.github.io/smart-contract-best-practices/
SmartNotary 3.0: paying for notarization and
notarized document market
A bit more complex example
More money transfer
Blind auction
https://github.com/onchainit/SmartNotary/tree/marketplace
Who is behind ethereum?
Thanks for coming
0x41a6021A6Dc82cbB0cd7ee0E3855654D225F48C
6
I’ll use ethers only for beers :)
● https://www.linkedin.com/in/maeste/
● https://twitter.com/maeste
● https://github.com/maeste/
● http://www.onchain.it/

More Related Content

What's hot

CBGTBT - Part 3 - Transactions 101
CBGTBT - Part 3 - Transactions 101CBGTBT - Part 3 - Transactions 101
CBGTBT - Part 3 - Transactions 101Blockstrap.com
 
The Bitcoin Lightning Network
The Bitcoin Lightning NetworkThe Bitcoin Lightning Network
The Bitcoin Lightning NetworkShun Shiku
 
On Private Blockchains, Technically
On Private Blockchains, TechnicallyOn Private Blockchains, Technically
On Private Blockchains, TechnicallyAlex Chepurnoy
 
Encode polkadot club event 2, intro to polkadot
Encode polkadot club   event 2, intro to polkadotEncode polkadot club   event 2, intro to polkadot
Encode polkadot club event 2, intro to polkadotVanessa Lošić
 
Locking the Throne Room - How ES5+ might change views on XSS and Client Side ...
Locking the Throne Room - How ES5+ might change views on XSS and Client Side ...Locking the Throne Room - How ES5+ might change views on XSS and Client Side ...
Locking the Throne Room - How ES5+ might change views on XSS and Client Side ...Mario Heiderich
 
20180714 workshop - Ethereum decentralized application with truffle framework
20180714 workshop - Ethereum decentralized application with truffle framework20180714 workshop - Ethereum decentralized application with truffle framework
20180714 workshop - Ethereum decentralized application with truffle frameworkHu Kenneth
 
The innerHTML Apocalypse
The innerHTML ApocalypseThe innerHTML Apocalypse
The innerHTML ApocalypseMario Heiderich
 
Generic Attack Detection - ph-Neutral 0x7d8
Generic Attack Detection - ph-Neutral 0x7d8Generic Attack Detection - ph-Neutral 0x7d8
Generic Attack Detection - ph-Neutral 0x7d8Mario Heiderich
 
The Image that called me - Active Content Injection with SVG Files
The Image that called me - Active Content Injection with SVG FilesThe Image that called me - Active Content Injection with SVG Files
The Image that called me - Active Content Injection with SVG FilesMario Heiderich
 
SiestaTime - Defcon27 Red Team Village
SiestaTime - Defcon27 Red Team VillageSiestaTime - Defcon27 Red Team Village
SiestaTime - Defcon27 Red Team VillageAlvaro Folgado Rueda
 
HTML5 - The Good, the Bad, the Ugly
HTML5 - The Good, the Bad, the UglyHTML5 - The Good, the Bad, the Ugly
HTML5 - The Good, the Bad, the UglyMario Heiderich
 
NodeJS ecosystem
NodeJS ecosystemNodeJS ecosystem
NodeJS ecosystemYukti Kaura
 
CBGTBT - Part 2 - Blockchains 101
CBGTBT - Part 2 - Blockchains 101CBGTBT - Part 2 - Blockchains 101
CBGTBT - Part 2 - Blockchains 101Blockstrap.com
 
Dev and Blind - Attacking the weakest Link in IT Security
Dev and Blind - Attacking the weakest Link in IT SecurityDev and Blind - Attacking the weakest Link in IT Security
Dev and Blind - Attacking the weakest Link in IT SecurityMario Heiderich
 
Bitcoin Wallet &amp Keys
Bitcoin Wallet &amp KeysBitcoin Wallet &amp Keys
Bitcoin Wallet &amp KeysShun Shiku
 
Encode Club workshop slides
Encode Club workshop slidesEncode Club workshop slides
Encode Club workshop slidesVanessa Lošić
 

What's hot (20)

CBGTBT - Part 3 - Transactions 101
CBGTBT - Part 3 - Transactions 101CBGTBT - Part 3 - Transactions 101
CBGTBT - Part 3 - Transactions 101
 
The Bitcoin Lightning Network
The Bitcoin Lightning NetworkThe Bitcoin Lightning Network
The Bitcoin Lightning Network
 
On Private Blockchains, Technically
On Private Blockchains, TechnicallyOn Private Blockchains, Technically
On Private Blockchains, Technically
 
Encode polkadot club event 2, intro to polkadot
Encode polkadot club   event 2, intro to polkadotEncode polkadot club   event 2, intro to polkadot
Encode polkadot club event 2, intro to polkadot
 
Locking the Throne Room - How ES5+ might change views on XSS and Client Side ...
Locking the Throne Room - How ES5+ might change views on XSS and Client Side ...Locking the Throne Room - How ES5+ might change views on XSS and Client Side ...
Locking the Throne Room - How ES5+ might change views on XSS and Client Side ...
 
20180714 workshop - Ethereum decentralized application with truffle framework
20180714 workshop - Ethereum decentralized application with truffle framework20180714 workshop - Ethereum decentralized application with truffle framework
20180714 workshop - Ethereum decentralized application with truffle framework
 
The innerHTML Apocalypse
The innerHTML ApocalypseThe innerHTML Apocalypse
The innerHTML Apocalypse
 
Generic Attack Detection - ph-Neutral 0x7d8
Generic Attack Detection - ph-Neutral 0x7d8Generic Attack Detection - ph-Neutral 0x7d8
Generic Attack Detection - ph-Neutral 0x7d8
 
NodeJS
NodeJSNodeJS
NodeJS
 
The Image that called me - Active Content Injection with SVG Files
The Image that called me - Active Content Injection with SVG FilesThe Image that called me - Active Content Injection with SVG Files
The Image that called me - Active Content Injection with SVG Files
 
SiestaTime - Defcon27 Red Team Village
SiestaTime - Defcon27 Red Team VillageSiestaTime - Defcon27 Red Team Village
SiestaTime - Defcon27 Red Team Village
 
NodeJS
NodeJSNodeJS
NodeJS
 
HTML5 - The Good, the Bad, the Ugly
HTML5 - The Good, the Bad, the UglyHTML5 - The Good, the Bad, the Ugly
HTML5 - The Good, the Bad, the Ugly
 
(C)NodeJS
(C)NodeJS(C)NodeJS
(C)NodeJS
 
NodeJS ecosystem
NodeJS ecosystemNodeJS ecosystem
NodeJS ecosystem
 
CBGTBT - Part 2 - Blockchains 101
CBGTBT - Part 2 - Blockchains 101CBGTBT - Part 2 - Blockchains 101
CBGTBT - Part 2 - Blockchains 101
 
Dev and Blind - Attacking the weakest Link in IT Security
Dev and Blind - Attacking the weakest Link in IT SecurityDev and Blind - Attacking the weakest Link in IT Security
Dev and Blind - Attacking the weakest Link in IT Security
 
Bitcoin Wallet &amp Keys
Bitcoin Wallet &amp KeysBitcoin Wallet &amp Keys
Bitcoin Wallet &amp Keys
 
Encode Club workshop slides
Encode Club workshop slidesEncode Club workshop slides
Encode Club workshop slides
 
Total E(A)gression defcon
Total E(A)gression   defconTotal E(A)gression   defcon
Total E(A)gression defcon
 

Viewers also liked

HGF's usage of smart contracts on the ethereum blockchain
HGF's usage of smart contracts on the ethereum blockchainHGF's usage of smart contracts on the ethereum blockchain
HGF's usage of smart contracts on the ethereum blockchainTC Wu
 
20171003 blockchain and smart contracts sai 2017 kv
20171003 blockchain and smart contracts sai 2017 kv20171003 blockchain and smart contracts sai 2017 kv
20171003 blockchain and smart contracts sai 2017 kvSmals
 
Blockchain, smart contracts - introduction
Blockchain, smart contracts - introductionBlockchain, smart contracts - introduction
Blockchain, smart contracts - introductionLukasz Jarmulowicz
 
Blockchain Smart Contracts - getting from hype to reality
Blockchain Smart Contracts - getting from hype to reality Blockchain Smart Contracts - getting from hype to reality
Blockchain Smart Contracts - getting from hype to reality Capgemini
 
BlockChain, Bitcoin and Smart Contracts - Oleg Kudrenko
BlockChain, Bitcoin and Smart Contracts - Oleg KudrenkoBlockChain, Bitcoin and Smart Contracts - Oleg Kudrenko
BlockChain, Bitcoin and Smart Contracts - Oleg KudrenkoOleg Kudrenko
 
Bitcoin and Blockchain Technology: An Introduction
Bitcoin and Blockchain Technology: An IntroductionBitcoin and Blockchain Technology: An Introduction
Bitcoin and Blockchain Technology: An IntroductionFerdinando Maria Ametrano
 
Bitcoin and Blockchain Technology: Hayek Money
Bitcoin and Blockchain Technology: Hayek MoneyBitcoin and Blockchain Technology: Hayek Money
Bitcoin and Blockchain Technology: Hayek MoneyFerdinando Maria Ametrano
 
Blockchain: The Information Technology of the Future
Blockchain: The Information Technology of the FutureBlockchain: The Information Technology of the Future
Blockchain: The Information Technology of the FutureMelanie Swan
 
Brian Ketelsen - Microservices in Go using Micro - Codemotion Milan 2017
Brian Ketelsen - Microservices in Go using Micro - Codemotion Milan 2017Brian Ketelsen - Microservices in Go using Micro - Codemotion Milan 2017
Brian Ketelsen - Microservices in Go using Micro - Codemotion Milan 2017Codemotion
 
Roberto Clapis/Stefano Zanero - Night of the living vulnerabilities: forever-...
Roberto Clapis/Stefano Zanero - Night of the living vulnerabilities: forever-...Roberto Clapis/Stefano Zanero - Night of the living vulnerabilities: forever-...
Roberto Clapis/Stefano Zanero - Night of the living vulnerabilities: forever-...Codemotion
 
Luciano Fiandesio - Docker 101 | Codemotion Milan 2015
Luciano Fiandesio - Docker 101 | Codemotion Milan 2015Luciano Fiandesio - Docker 101 | Codemotion Milan 2015
Luciano Fiandesio - Docker 101 | Codemotion Milan 2015Codemotion
 
Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017Codemotion
 
Jacopo Nardiello - Monitoring Cloud-Native applications with Prometheus - Cod...
Jacopo Nardiello - Monitoring Cloud-Native applications with Prometheus - Cod...Jacopo Nardiello - Monitoring Cloud-Native applications with Prometheus - Cod...
Jacopo Nardiello - Monitoring Cloud-Native applications with Prometheus - Cod...Codemotion
 
Lorna Mitchell - Becoming Polyglot - Codemotion Milan 2017
Lorna Mitchell - Becoming Polyglot - Codemotion Milan 2017Lorna Mitchell - Becoming Polyglot - Codemotion Milan 2017
Lorna Mitchell - Becoming Polyglot - Codemotion Milan 2017Codemotion
 
Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...
Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...
Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...Codemotion
 
How to build an HA container orchestrator infrastructure for production – Giu...
How to build an HA container orchestrator infrastructure for production – Giu...How to build an HA container orchestrator infrastructure for production – Giu...
How to build an HA container orchestrator infrastructure for production – Giu...Codemotion
 
Oded Coster - Stack Overflow behind the scenes - how it's made - Codemotion M...
Oded Coster - Stack Overflow behind the scenes - how it's made - Codemotion M...Oded Coster - Stack Overflow behind the scenes - how it's made - Codemotion M...
Oded Coster - Stack Overflow behind the scenes - how it's made - Codemotion M...Codemotion
 
Luciano Mammino - Cracking JWT tokens: a tale of magic, Node.JS and parallel...
Luciano Mammino  - Cracking JWT tokens: a tale of magic, Node.JS and parallel...Luciano Mammino  - Cracking JWT tokens: a tale of magic, Node.JS and parallel...
Luciano Mammino - Cracking JWT tokens: a tale of magic, Node.JS and parallel...Codemotion
 
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native Codemotion
 
Dan Persa, Maximilian Fellner - The recipe for scalable frontends - Codemotio...
Dan Persa, Maximilian Fellner - The recipe for scalable frontends - Codemotio...Dan Persa, Maximilian Fellner - The recipe for scalable frontends - Codemotio...
Dan Persa, Maximilian Fellner - The recipe for scalable frontends - Codemotio...Codemotion
 

Viewers also liked (20)

HGF's usage of smart contracts on the ethereum blockchain
HGF's usage of smart contracts on the ethereum blockchainHGF's usage of smart contracts on the ethereum blockchain
HGF's usage of smart contracts on the ethereum blockchain
 
20171003 blockchain and smart contracts sai 2017 kv
20171003 blockchain and smart contracts sai 2017 kv20171003 blockchain and smart contracts sai 2017 kv
20171003 blockchain and smart contracts sai 2017 kv
 
Blockchain, smart contracts - introduction
Blockchain, smart contracts - introductionBlockchain, smart contracts - introduction
Blockchain, smart contracts - introduction
 
Blockchain Smart Contracts - getting from hype to reality
Blockchain Smart Contracts - getting from hype to reality Blockchain Smart Contracts - getting from hype to reality
Blockchain Smart Contracts - getting from hype to reality
 
BlockChain, Bitcoin and Smart Contracts - Oleg Kudrenko
BlockChain, Bitcoin and Smart Contracts - Oleg KudrenkoBlockChain, Bitcoin and Smart Contracts - Oleg Kudrenko
BlockChain, Bitcoin and Smart Contracts - Oleg Kudrenko
 
Bitcoin and Blockchain Technology: An Introduction
Bitcoin and Blockchain Technology: An IntroductionBitcoin and Blockchain Technology: An Introduction
Bitcoin and Blockchain Technology: An Introduction
 
Bitcoin and Blockchain Technology: Hayek Money
Bitcoin and Blockchain Technology: Hayek MoneyBitcoin and Blockchain Technology: Hayek Money
Bitcoin and Blockchain Technology: Hayek Money
 
Blockchain: The Information Technology of the Future
Blockchain: The Information Technology of the FutureBlockchain: The Information Technology of the Future
Blockchain: The Information Technology of the Future
 
Brian Ketelsen - Microservices in Go using Micro - Codemotion Milan 2017
Brian Ketelsen - Microservices in Go using Micro - Codemotion Milan 2017Brian Ketelsen - Microservices in Go using Micro - Codemotion Milan 2017
Brian Ketelsen - Microservices in Go using Micro - Codemotion Milan 2017
 
Roberto Clapis/Stefano Zanero - Night of the living vulnerabilities: forever-...
Roberto Clapis/Stefano Zanero - Night of the living vulnerabilities: forever-...Roberto Clapis/Stefano Zanero - Night of the living vulnerabilities: forever-...
Roberto Clapis/Stefano Zanero - Night of the living vulnerabilities: forever-...
 
Luciano Fiandesio - Docker 101 | Codemotion Milan 2015
Luciano Fiandesio - Docker 101 | Codemotion Milan 2015Luciano Fiandesio - Docker 101 | Codemotion Milan 2015
Luciano Fiandesio - Docker 101 | Codemotion Milan 2015
 
Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
Agnieszka Naplocha - Breaking the norm with creative CSS - Codemotion Milan 2017
 
Jacopo Nardiello - Monitoring Cloud-Native applications with Prometheus - Cod...
Jacopo Nardiello - Monitoring Cloud-Native applications with Prometheus - Cod...Jacopo Nardiello - Monitoring Cloud-Native applications with Prometheus - Cod...
Jacopo Nardiello - Monitoring Cloud-Native applications with Prometheus - Cod...
 
Lorna Mitchell - Becoming Polyglot - Codemotion Milan 2017
Lorna Mitchell - Becoming Polyglot - Codemotion Milan 2017Lorna Mitchell - Becoming Polyglot - Codemotion Milan 2017
Lorna Mitchell - Becoming Polyglot - Codemotion Milan 2017
 
Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...
Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...
Mobile Library Development - stuck between a pod and a jar file - Zan Markan ...
 
How to build an HA container orchestrator infrastructure for production – Giu...
How to build an HA container orchestrator infrastructure for production – Giu...How to build an HA container orchestrator infrastructure for production – Giu...
How to build an HA container orchestrator infrastructure for production – Giu...
 
Oded Coster - Stack Overflow behind the scenes - how it's made - Codemotion M...
Oded Coster - Stack Overflow behind the scenes - how it's made - Codemotion M...Oded Coster - Stack Overflow behind the scenes - how it's made - Codemotion M...
Oded Coster - Stack Overflow behind the scenes - how it's made - Codemotion M...
 
Luciano Mammino - Cracking JWT tokens: a tale of magic, Node.JS and parallel...
Luciano Mammino  - Cracking JWT tokens: a tale of magic, Node.JS and parallel...Luciano Mammino  - Cracking JWT tokens: a tale of magic, Node.JS and parallel...
Luciano Mammino - Cracking JWT tokens: a tale of magic, Node.JS and parallel...
 
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
Webinar - Matteo Manchi: Dal web al nativo: Introduzione a React Native
 
Dan Persa, Maximilian Fellner - The recipe for scalable frontends - Codemotio...
Dan Persa, Maximilian Fellner - The recipe for scalable frontends - Codemotio...Dan Persa, Maximilian Fellner - The recipe for scalable frontends - Codemotio...
Dan Persa, Maximilian Fellner - The recipe for scalable frontends - Codemotio...
 

Similar to Stefano Maestri - Blockchain and smart contracts, what they are and why you should really care about as a developer - Codemotion Milan 2017

Blockchain and smart contracts, what they are and why you should really care ...
Blockchain and smart contracts, what they are and why you should really care ...Blockchain and smart contracts, what they are and why you should really care ...
Blockchain and smart contracts, what they are and why you should really care ...maeste
 
Building Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart ContractBuilding Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart ContractVaideeswaran Sethuraman
 
Web3’s red pill: Smashing Web3 transaction simulations for fun and profit
Web3’s red pill: Smashing Web3 transaction simulations for fun and profitWeb3’s red pill: Smashing Web3 transaction simulations for fun and profit
Web3’s red pill: Smashing Web3 transaction simulations for fun and profitTal Be'ery
 
Fluent destry saul
Fluent destry saulFluent destry saul
Fluent destry saulDestry Saul
 
Smart contract honeypots for profit (and fun) - bha
Smart contract honeypots for profit (and fun)  - bhaSmart contract honeypots for profit (and fun)  - bha
Smart contract honeypots for profit (and fun) - bhaPolySwarm
 
Blockchain Programming
Blockchain ProgrammingBlockchain Programming
Blockchain ProgrammingRhea Myers
 
Best practices to build secure smart contracts
Best practices to build secure smart contractsBest practices to build secure smart contracts
Best practices to build secure smart contractsGautam Anand
 
gething started - ethereum & using the geth golang client
gething started - ethereum & using the geth golang clientgething started - ethereum & using the geth golang client
gething started - ethereum & using the geth golang clientSathish VJ
 
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018Codemotion
 
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018Codemotion
 
The JavaScript toolset for development on Ethereum
The JavaScript toolset for development on EthereumThe JavaScript toolset for development on Ethereum
The JavaScript toolset for development on EthereumGreeceJS
 
Javascript toolset for Ethereum Smart Contract development
Javascript toolset for Ethereum Smart Contract developmentJavascript toolset for Ethereum Smart Contract development
Javascript toolset for Ethereum Smart Contract developmentBugSense
 
Ethereum in a nutshell
Ethereum in a nutshellEthereum in a nutshell
Ethereum in a nutshellDaniel Chan
 
Daniel Connelly Ethereum Smart Contract Master's Thesis
Daniel Connelly Ethereum Smart Contract Master's ThesisDaniel Connelly Ethereum Smart Contract Master's Thesis
Daniel Connelly Ethereum Smart Contract Master's ThesisDaniel Connelly
 
Dylan Butler & Oliver Hager - Building a cross platform cryptocurrency app
Dylan Butler & Oliver Hager - Building a cross platform cryptocurrency appDylan Butler & Oliver Hager - Building a cross platform cryptocurrency app
Dylan Butler & Oliver Hager - Building a cross platform cryptocurrency appDevCamp Campinas
 
Stefano Maestri - Why Ethereum and other blockchains are going to Proof of St...
Stefano Maestri - Why Ethereum and other blockchains are going to Proof of St...Stefano Maestri - Why Ethereum and other blockchains are going to Proof of St...
Stefano Maestri - Why Ethereum and other blockchains are going to Proof of St...Codemotion
 

Similar to Stefano Maestri - Blockchain and smart contracts, what they are and why you should really care about as a developer - Codemotion Milan 2017 (20)

Blockchain and smart contracts, what they are and why you should really care ...
Blockchain and smart contracts, what they are and why you should really care ...Blockchain and smart contracts, what they are and why you should really care ...
Blockchain and smart contracts, what they are and why you should really care ...
 
Ethereum
EthereumEthereum
Ethereum
 
Ethereum-Cryptocurrency (All about Ethereum)
Ethereum-Cryptocurrency (All about Ethereum) Ethereum-Cryptocurrency (All about Ethereum)
Ethereum-Cryptocurrency (All about Ethereum)
 
Building Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart ContractBuilding Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart Contract
 
Web3’s red pill: Smashing Web3 transaction simulations for fun and profit
Web3’s red pill: Smashing Web3 transaction simulations for fun and profitWeb3’s red pill: Smashing Web3 transaction simulations for fun and profit
Web3’s red pill: Smashing Web3 transaction simulations for fun and profit
 
Fluent destry saul
Fluent destry saulFluent destry saul
Fluent destry saul
 
Smart contract honeypots for profit (and fun) - bha
Smart contract honeypots for profit (and fun)  - bhaSmart contract honeypots for profit (and fun)  - bha
Smart contract honeypots for profit (and fun) - bha
 
Blockchain Programming
Blockchain ProgrammingBlockchain Programming
Blockchain Programming
 
Best practices to build secure smart contracts
Best practices to build secure smart contractsBest practices to build secure smart contracts
Best practices to build secure smart contracts
 
gething started - ethereum & using the geth golang client
gething started - ethereum & using the geth golang clientgething started - ethereum & using the geth golang client
gething started - ethereum & using the geth golang client
 
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
 
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
 
The JavaScript toolset for development on Ethereum
The JavaScript toolset for development on EthereumThe JavaScript toolset for development on Ethereum
The JavaScript toolset for development on Ethereum
 
Javascript toolset for Ethereum Smart Contract development
Javascript toolset for Ethereum Smart Contract developmentJavascript toolset for Ethereum Smart Contract development
Javascript toolset for Ethereum Smart Contract development
 
Ethereum in a nutshell
Ethereum in a nutshellEthereum in a nutshell
Ethereum in a nutshell
 
How to design, code, deploy and execute a smart contract
How to design, code, deploy and execute a smart contractHow to design, code, deploy and execute a smart contract
How to design, code, deploy and execute a smart contract
 
Daniel Connelly Ethereum Smart Contract Master's Thesis
Daniel Connelly Ethereum Smart Contract Master's ThesisDaniel Connelly Ethereum Smart Contract Master's Thesis
Daniel Connelly Ethereum Smart Contract Master's Thesis
 
Dylan Butler & Oliver Hager - Building a cross platform cryptocurrency app
Dylan Butler & Oliver Hager - Building a cross platform cryptocurrency appDylan Butler & Oliver Hager - Building a cross platform cryptocurrency app
Dylan Butler & Oliver Hager - Building a cross platform cryptocurrency app
 
BlockChain Public
BlockChain PublicBlockChain Public
BlockChain Public
 
Stefano Maestri - Why Ethereum and other blockchains are going to Proof of St...
Stefano Maestri - Why Ethereum and other blockchains are going to Proof of St...Stefano Maestri - Why Ethereum and other blockchains are going to Proof of St...
Stefano Maestri - Why Ethereum and other blockchains are going to Proof of St...
 

More from Codemotion

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Codemotion
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyCodemotion
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaCodemotion
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserCodemotion
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Codemotion
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Codemotion
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Codemotion
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 - Codemotion
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Codemotion
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Codemotion
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Codemotion
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Codemotion
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Codemotion
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Codemotion
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Codemotion
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...Codemotion
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Codemotion
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Codemotion
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Codemotion
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Codemotion
 

More from Codemotion (20)

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending story
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storia
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard Altwasser
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
 

Recently uploaded

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 

Recently uploaded (20)

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 

Stefano Maestri - Blockchain and smart contracts, what they are and why you should really care about as a developer - Codemotion Milan 2017

  • 1. Title: Blockchain and smart contracts What they are and why you should really care about ad developer Author: @maeste, Stefano Maestri CODEMOTION MILAN - SPECIAL EDITION 10 – 11 NOVEMBER 2017
  • 2. Who is Stefano? ● A young enthusiast open source developer ● Red Hat Principal software engineer ● https://www.linkedin.com/in/maeste/ ● https://twitter.com/maeste ● https://github.com/maeste/ ● http://www.onchain.it/ My matching pairs game: Java & JBoss, Open Source & Red Hat, Blockchain & Ethereum
  • 3. Today’s Agenda ● Brief introduction to blockchain concepts ● Cryptocurrencies and why they have monetary value ● Smart contracts and why you should care about ● Developing smart contracts on ethereum blockchain
  • 4. What is the block chain? The Guardian: Blockchain is a digital ledger that provides a secure way of making and recording transactions, agreements and contracts – anything that needs to be recorded and verified as having taken place. Wikipedia: A blockchain is a continuously growing list of records , called blocks, which are linked and secured using cryptography. Each block typically contains a hash pointer as a link to a previous block, a timestamp and transaction data. By design, blockchains are inherently resistant to modification of the data. A blockchain can serve as "an open, distributed ledger that can record transactions between two parties efficiently and in a verifiable and permanent way."
  • 5. What is a blockchain...a nice bullet list ● It’s a ledger of transactions and datas ● It’s persistent, secure and unmodifiable ● It’s based on computational trust ● It’s distributed and unstoppable ● Transaction parties are anonymous, but tx are public and verifiable ● It’s transactions could be about values (cryptocurrency) ● It’s trustless about nodes and users Live Demo
  • 8. Has those cryptocurrencies a real economic value? And why? In economy “intrinsic value” concept doesn’t exist at all. We give value to money by convention, and more general anything gain value almost for 3 reasons (not strictly needed, but true in almost cases at least) ● It’s rare ● It’s hard to reproduce ● It could be exchanged 1 Euro Fontana’s paint ~ 8M Euro ~ 7K Euro Manzoni’s artist's shit: ~275K Euro
  • 9. Traditional payments And isn’t ok to simply trust in a Bank? What could happen? Lehman Brothers…..
  • 10. So...what is the solution? Grandmum solution? Could be at least unpractical...
  • 11. What is a blockchain...a nice bullet list ● It’s a ledger of transactions and datas ● It’s persistent and secure ● It’s based on computational trust ● It’s distributed and unstoppable ● Transaction parties are anonymous, but transactions are public ● It’s transactions could be about values (cryptocurrency) ● It’s trustless about nodes and users Am I going to transfer my money without trusting anyone?
  • 12. What does trustless mean? You are not trusting in peers of transaction or even in nodes of the network, you are trusting in the protocol itself. In other words you are trusting blockchain and cryptocurrency itself and not people owning them….moreover they are anonymous… Does it recall anything you well known and use everyday?
  • 14. What is a smart contract? A contract is a voluntary arrangement between two or more parties that is enforceable by law as a binding legal agreement A smart contract is a computer protocol intended to facilitate, verify, or enforce the negotiation or performance of a contract.
  • 15. Real world smart contracts With the present implementations] "smart contract" is general purpose computation that takes place on a blockchain
  • 16. Smart contracts: unstoppable Dapp ● Distributed ● Can transfer money/assets ● Unmodifiable state history
  • 17. Ethereum: a blockchain for smart contracts ● Every node run a built in Virtual Machine (EVM) ● It provide a compiler from high level languages to EVM ● 2 different kind of accounts: ○ Externally owned account (EOAs), controlled by private keys ○ Contract accounts, controlled by code
  • 18. Ethereum Virtual Machine Internals ● TURING COMPLETE VM ● Stack based byte code (push, jump) ● Memory ● Storage ● Environment variables ● Logs ● Sub-calling High level languages ● Solidity (c-like) ● Viper (python like) ● LLL (lisp inspired) ● Bamboo (experimental morphing language influenced by Erlang) Everyone compiling to EVM code
  • 19. EVM code execution ● Transaction sent to a contract address ● Every full node of ethereum run the code at this address and store the state ● Smart contract code can: ○ Could run any program (turing complete machine) ○ Read/write state ○ Call another contract ○ Send ETH to other address (both EOA and contract)
  • 20. Ethereum GAS Halting problem: determine if the program will finish running or continue to run forever. Classic NP-hard problem Ethereum solution: GAS, a fee per computational step GAS is not a currency is just a unit of measurement of computational step In Tx you have “maximum GAS” you would give to the miner and “GAS price” to determine how much you will actually pay. If Tx complete successfully you pay just for effective GAS used. It the Tx would consume all GAS the TX will be revert, but you still pay for GAS Ethereum hasn’t block size limit, but Gas Limit (6.7M currently, but voted by miners)
  • 21. Solidity ● C/Java-like syntax ● Statically typed ● Support inheritance (multiple) ● Complex user defined types (struct) ● Polymorphism ● Overriding ● ….. http://solidity.readthedocs.io/en/develop/index.html#
  • 22. Our development environment ● testRPC (local in memory ethereum blockchain) ● Truffle (maven-like tool to compile and deploy contract) ● A bit of javascript (npm) for some raw Dapp interface ● Metamask to inject ethereum protocol in our html/javascript Dapp ● Intellij to edit solidity and javascript More info: http://truffleframework.com/
  • 23. SmartNotary ● The easiest contract notarizing a document ● Receiving document hash and owner name It will write them in the blockchain state ● Giving the hash it will return the owner name ● It’s a pet project just to play with code Talk is cheap….show me the f****ing code (Linus Torvalds) https://github.com/onchainit/SmartNotary/tree/baseExample
  • 24. SmartNotary 1.1: using EOA We are using current EOA (from metamask) as owner. It will give us the opportunity to play a bit with metamask https://github.com/onchainit/SmartNotary/tree/baseExample
  • 25. SmartNotary 2.0: paying for notarization We are adding money transfer. Basically the user will pay in ether the service of notarization. The ethers are stored in contract balance, and only contract creator could withdraw them in his EOA https://github.com/onchainit/SmartNotary/tree/pay4Notarization
  • 26. Contract security - reentrancy attack // INSECURE mapping (address => uint) private userBalances; function withdrawBalance() public { uint amountToWithdraw = userBalances[msg.sender]; require(msg.sender.call.value(amountToWithdraw)()); // At this point, the caller's code is executed, and can call withdrawBalance again userBalances[msg.sender] = 0; } https://consensys.github.io/smart-contract-best-practices/
  • 27. Contract security - reentrancy attack // VERY SIMPLIFIED MALICIOUS CODE (WOULD NEED CONSIDERATION ON BLOCK MAXIMUM GAS) function() payable { vulnerable.withDraw(); }
  • 28. Contract security -reentrancy attack solution mapping (address => uint) private userBalances; function withdrawBalance() public { uint amountToWithdraw = userBalances[msg.sender]; userBalances[msg.sender] = 0; require(msg.sender.call.value(amountToWithdraw)()); // The user's balance is already 0, so future invocations won't withdraw anything } Or just using primitive send() instead of .call.value which limit gas to 2300 (pure transfer) https://consensys.github.io/smart-contract-best-practices/
  • 29. SmartNotary 3.0: paying for notarization and notarized document market A bit more complex example More money transfer Blind auction https://github.com/onchainit/SmartNotary/tree/marketplace
  • 30. Who is behind ethereum?
  • 31. Thanks for coming 0x41a6021A6Dc82cbB0cd7ee0E3855654D225F48C 6 I’ll use ethers only for beers :) ● https://www.linkedin.com/in/maeste/ ● https://twitter.com/maeste ● https://github.com/maeste/ ● http://www.onchain.it/