SlideShare une entreprise Scribd logo
1  sur  37
Bitcoin Summer School
Scorex, the Modular Blockchain Framework
Alexander Chepurnoy
(aka kushti)
@chepurnoy
IOHK Research
Section 1. „Scorex In General“
Use Cases
● Implement new consensus protocol and plug it easily into
a prototypical blockchain system to run a system against a
testbed
● In the same way, implement and spread a proof-of-concept
impl. for anew transactional language
Use Cases
● Proof-of-Stake protocols
● Permacoin implementation
The Problem
● Bitcoin(reference impl): > 80K lines of C++ code
● EthereumJ: > 55K of Java code
● Nxt: > 40K lines of Java code
● Every codebase is highly optimized for a concrete
production environment
The Problem
● It is hard to locate, inject, swap functionalities
● Hard to make experiments/prototypes
Scorex in General
● Find fast where to inject
● Modular stacked design
● Externalised cryptography(scrypto)
● One testnet application atm(Lagonaki)
Scorex in General, pt 2
● Everything is open-sourced immediately
● CC0 license
● Maintained by IOHK Research
Competitors
Intel's „Sawtooth Lake“
(https://github.com/IntelLedger)
„a highly modular platform for building, deploying and
running distributed ledgers" (Intel Corp.)
Intel's „Sawtooth Lake“
● Consensus / „transaction family“
● Proof of Elapsed Time (Intel SGX)
● Assets marketplace
● Python
● Apache License 2.0
Section 2. „Scorex In Details“
Scorex is in Scala
● Functional language, strict static typing
● JVM
● Could be enhanced with any JVM language(Java, Clojure,
Kotlin, Groovy, Jython, Frege etc)
Development Philosophy
● Flexible design could be hard to understand
● Simple code could be not flexible or error-prone
● We need to find a balance!
● Give a maximum for free!
Design In General
● Compact core – always for free
● Consensus module - implement or take ready
● Transactional module - implement or take ready
● Network protocols – partly for free
● API – partly for free
● Application – lean!
● Wallet, configs – partly for free
A Module
● Writes and reads certain block parts
● Implements corresponding interface
Code Quality
● Compact code, strict types
● Good test coverage(70-80%)
● Continuous integration
Getting Started
● Docs on GitHub:
https://github.com/ScorexProject/Scorex/wiki/Getting-started
● Java 8 SDK
● sbt is recommended for Scala
Adding Modules
libraryDependencies ++= Seq(
"org.consensusresearch" %% "scorex-basics" % "1.+",
"org.consensusresearch" %% "scorex-consensus" % "1.+",
"org.consensusresearch" %% "scorex-transaction" % "1.+"
)
scorex-basics -core
scorex-consensus - two Proof-of-Stake consensus protocols
scorex-transaction – simplest transactions
Adding Modules
libraryDependencies ++= Seq(
"org.consensusresearch" %% "scorex-basics" % "1.+",
"org.consensusresearch" %% "scorex-perma" % "1.+",
"org.consensusresearch" %% "scorex-transaction" % "1.+"
)
scorex-perma – Permacoin consensus protocol implementation
Application - modules
class MyApplication(val settingsFilename: String) extends Application {
// Your application config
override val applicationName = "my cool application"
override val appVersion = ApplicationVersion(0, 1, 0)
override implicit lazy val settings = new Settings with
TransactionSettings {
override val filename: String = settingsFilename
}
// Define consensus and transaction modules of your application
override implicit lazy val consensusModule = new
NxtLikeConsensusModule()
override implicit lazy val transactionModule = new
SimpleTransactionModule()(settings, this)
Application - API
// Define API routes of your application
override lazy val apiRoutes = Seq(
BlocksApiRoute(this),
TransactionsApiRoute(this),
NxtConsensusApiRoute(this),
WalletApiRoute(this),
PaymentApiRoute(this),
UtilsApiRoute(this),
PeersApiRoute(this),
AddressApiRoute(this)
)
// API types are required for swagger support
override lazy val apiTypes = Seq(
typeOf[BlocksApiRoute],
typeOf[TransactionsApiRoute],
typeOf[NxtConsensusApiRoute],
typeOf[WalletApiRoute],
typeOf[PaymentApiRoute],
typeOf[UtilsApiRoute],
typeOf[PeersApiRoute],
typeOf[AddressApiRoute]
)
Application – network protocols
// Create your custom messages and add them to additionalMessageSpecs
override lazy val additionalMessageSpecs =
TransactionalMessagesRepo.specs
// Start additional actors
actorSystem.actorOf(Props(classOf[UnconfirmedPoolSynchronizer], this))
}
Launch The Application
object MyApplication extends App {
// Provide filename by command-line arguments
val filename = args.headOption.getOrElse("settings.json")
// Create application instance
val application = new MyApplication(filename)
// Run it
application.run()
// Generate account in your wallet
if (application.wallet.privateKeyAccounts().isEmpty)
application.wallet.generateNewAccounts(1)
}
UI
Settings
https://github.com/ScorexProject/Scorex/wiki/Settings
{
"p2p": {
"bindAddress": "0.0.0.0",
"upnp": false,
"upnpGatewayTimeout": 7000,
"upnpDiscoverTimeout": 3000,
"port": 9084,
"knownPeers": [
"23.94.190.226:9185"
],
"maxConnections": 10
},
"walletDir": "/tmp/scorex/wallet",
"dataDir": "/tmp/scorex/data",
"rpcPort": 9085,
"rpcAllowed": [],
"maxRollback": 100,
"blockGenerationDelay": 0,
"genesisTimestamp": 1460952000000,
"apiKeyHash": "GmVvcpx1BRUPDZiADbZ7a6zgQV3Sgj2GhNoEiTH9Drdx",
"cors": false
}
Lagonaki
● Permacoin implementation
● Simplest transactional module, account-2-account
payments
Launch Lagonaki
● docker run -i -p 9085:9085 "scorex/lagonaki:1.2.7"
● debian package
● https://github.com/ScorexProject/Lagonaki
Lagonaki Block Explorer
http://cryptorevolution.me/
Run own network
● src/main/resources/lagonaki.conf
app {
product = "Scorex"
release = "Lagonaki"
version = "1.2.7"
consensusAlgo = "perma"
}
Section 3. „Further Work“
1.2.7 → 1.3.0
● Flexible state models(now account-based)
● Flexible signing schemes(now EdDSA-25519 only)
Ergaki
● Blockchain for protocols
● Rollerchain implementation: safely prunable fullblocks
● Σ-coin implementation: wide class of NIZKPoK for DLOG
statements
● Rent-a-Box fee model
● Improved difficulty adjustment
Scrypto
● Еncoding functions(Base16/58/64)
● Hash functions(Blake2, Keccak etc)
● 25519 from WhisperSystems
● Authenticated data structures(Merkle trees, authenticated
skiplists coming in next release)
Section 4. „Coordination“
Contribution
● Comments
● Todos (search for „todo:“)
● Documentation
● Bugs
● Bitcoin UTXO model implementation (BitcoinJ)
● EVM implementation (EthereumJ)
Reach Us
● Maillist https://scorex-dev.groups.io/g/main
● GitHub https://github.com/ScorexProject
● https://iohk.io/team/
Questions?
https://github.com/ScorexProject/Scorex

Contenu connexe

Tendances

Real world blockchains
Real world blockchainsReal world blockchains
Real world blockchainsDmitry Meshkov
 
A New Business World Within A Blockchain
A New Business World Within A BlockchainA New Business World Within A Blockchain
A New Business World Within A BlockchainAlex Chepurnoy
 
How to Create AltCoin(Alternative Cryptocurrency)?
How to Create AltCoin(Alternative Cryptocurrency)?How to Create AltCoin(Alternative Cryptocurrency)?
How to Create AltCoin(Alternative Cryptocurrency)?Abdullah Khan Zehady
 
H2020 finsec-ibm- aidan-shribman-finsec-skydive 260820
H2020 finsec-ibm- aidan-shribman-finsec-skydive 260820H2020 finsec-ibm- aidan-shribman-finsec-skydive 260820
H2020 finsec-ibm- aidan-shribman-finsec-skydive 260820innov-acts-ltd
 
Ergo platform's approach
Ergo platform's approachErgo platform's approach
Ergo platform's approachDmitry Meshkov
 
Diagnosing HotSpot JVM Memory Leaks with JFR and JMC
Diagnosing HotSpot JVM Memory Leaks with JFR and JMCDiagnosing HotSpot JVM Memory Leaks with JFR and JMC
Diagnosing HotSpot JVM Memory Leaks with JFR and JMCMushfekur Rahman
 
The Bitcoin Lightning Network
The Bitcoin Lightning NetworkThe Bitcoin Lightning Network
The Bitcoin Lightning NetworkShun Shiku
 
Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.Meghaj Mallick
 
OpenTelemetry For Operators
OpenTelemetry For OperatorsOpenTelemetry For Operators
OpenTelemetry For OperatorsKevin Brockhoff
 
Meetup 19/12/2016 - Blockchain-as-a-service voor Antwerpen?
Meetup 19/12/2016 - Blockchain-as-a-service voor Antwerpen?Meetup 19/12/2016 - Blockchain-as-a-service voor Antwerpen?
Meetup 19/12/2016 - Blockchain-as-a-service voor Antwerpen?Digipolis Antwerpen
 
Encode Club workshop slides
Encode Club workshop slidesEncode Club workshop slides
Encode Club workshop slidesVanessa Lošić
 
A quick introduction to Consensus Models
A quick introduction to Consensus ModelsA quick introduction to Consensus Models
A quick introduction to Consensus ModelsOded Noam
 
Bitcoin Wallet &amp Keys
Bitcoin Wallet &amp KeysBitcoin Wallet &amp Keys
Bitcoin Wallet &amp KeysShun Shiku
 
Transacties theorie
Transacties theorieTransacties theorie
Transacties theorieninckblokje
 
Technical Overview of Tezos
Technical Overview of TezosTechnical Overview of Tezos
Technical Overview of TezosTinaBregovi
 
Transaction Ordering System
Transaction Ordering SystemTransaction Ordering System
Transaction Ordering SystemJasonGilchrist3
 
Presentation_Topalidis_Giorgos
Presentation_Topalidis_GiorgosPresentation_Topalidis_Giorgos
Presentation_Topalidis_GiorgosGiorgos Topalidis
 
Write Smart Contracts with Truffle Framework
Write Smart Contracts with Truffle FrameworkWrite Smart Contracts with Truffle Framework
Write Smart Contracts with Truffle FrameworkShun Shiku
 

Tendances (20)

Real world blockchains
Real world blockchainsReal world blockchains
Real world blockchains
 
A New Business World Within A Blockchain
A New Business World Within A BlockchainA New Business World Within A Blockchain
A New Business World Within A Blockchain
 
How to Create AltCoin(Alternative Cryptocurrency)?
How to Create AltCoin(Alternative Cryptocurrency)?How to Create AltCoin(Alternative Cryptocurrency)?
How to Create AltCoin(Alternative Cryptocurrency)?
 
H2020 finsec-ibm- aidan-shribman-finsec-skydive 260820
H2020 finsec-ibm- aidan-shribman-finsec-skydive 260820H2020 finsec-ibm- aidan-shribman-finsec-skydive 260820
H2020 finsec-ibm- aidan-shribman-finsec-skydive 260820
 
Ergo platform's approach
Ergo platform's approachErgo platform's approach
Ergo platform's approach
 
An introduction to blockchain
An introduction to blockchainAn introduction to blockchain
An introduction to blockchain
 
Diagnosing HotSpot JVM Memory Leaks with JFR and JMC
Diagnosing HotSpot JVM Memory Leaks with JFR and JMCDiagnosing HotSpot JVM Memory Leaks with JFR and JMC
Diagnosing HotSpot JVM Memory Leaks with JFR and JMC
 
The Bitcoin Lightning Network
The Bitcoin Lightning NetworkThe Bitcoin Lightning Network
The Bitcoin Lightning Network
 
Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.Concurrency Control in Distributed Database.
Concurrency Control in Distributed Database.
 
OpenTelemetry For Operators
OpenTelemetry For OperatorsOpenTelemetry For Operators
OpenTelemetry For Operators
 
Meetup 19/12/2016 - Blockchain-as-a-service voor Antwerpen?
Meetup 19/12/2016 - Blockchain-as-a-service voor Antwerpen?Meetup 19/12/2016 - Blockchain-as-a-service voor Antwerpen?
Meetup 19/12/2016 - Blockchain-as-a-service voor Antwerpen?
 
Encode Club workshop slides
Encode Club workshop slidesEncode Club workshop slides
Encode Club workshop slides
 
A quick introduction to Consensus Models
A quick introduction to Consensus ModelsA quick introduction to Consensus Models
A quick introduction to Consensus Models
 
Bitcoin Wallet &amp Keys
Bitcoin Wallet &amp KeysBitcoin Wallet &amp Keys
Bitcoin Wallet &amp Keys
 
Transacties theorie
Transacties theorieTransacties theorie
Transacties theorie
 
Technical Overview of Tezos
Technical Overview of TezosTechnical Overview of Tezos
Technical Overview of Tezos
 
Transaction Ordering System
Transaction Ordering SystemTransaction Ordering System
Transaction Ordering System
 
Presentation_Topalidis_Giorgos
Presentation_Topalidis_GiorgosPresentation_Topalidis_Giorgos
Presentation_Topalidis_Giorgos
 
Write Smart Contracts with Truffle Framework
Write Smart Contracts with Truffle FrameworkWrite Smart Contracts with Truffle Framework
Write Smart Contracts with Truffle Framework
 
Blocks, procs && lambdas
Blocks, procs && lambdasBlocks, procs && lambdas
Blocks, procs && lambdas
 

En vedette

Масштабируемость блокчейн-систем: проблемы и решения
Масштабируемость блокчейн-систем: проблемы и решенияМасштабируемость блокчейн-систем: проблемы и решения
Масштабируемость блокчейн-систем: проблемы и решенияAlex Chepurnoy
 
Blockchain Consensus Protocols
Blockchain Consensus ProtocolsBlockchain Consensus Protocols
Blockchain Consensus ProtocolsMelanie Swan
 
Bitcoin - Introduction, Technical Aspects and Ongoing Developments
Bitcoin - Introduction, Technical Aspects and Ongoing DevelopmentsBitcoin - Introduction, Technical Aspects and Ongoing Developments
Bitcoin - Introduction, Technical Aspects and Ongoing DevelopmentsBernhard Haslhofer
 
[22/03/2016] Conférence : Blockchain, disruption & révolution
[22/03/2016] Conférence : Blockchain, disruption & révolution[22/03/2016] Conférence : Blockchain, disruption & révolution
[22/03/2016] Conférence : Blockchain, disruption & révolutionSilicon Comté
 
Blockchain Use Cases: Think of a "Public" Pub/Sub Queue
Blockchain Use Cases: Think of a "Public" Pub/Sub QueueBlockchain Use Cases: Think of a "Public" Pub/Sub Queue
Blockchain Use Cases: Think of a "Public" Pub/Sub QueueAltoros
 
IoT, Fog Computing and the Blockchain
IoT, Fog Computing and the BlockchainIoT, Fog Computing and the Blockchain
IoT, Fog Computing and the Blockchainkumar641
 
Demystifying Blockchains
Demystifying BlockchainsDemystifying Blockchains
Demystifying Blockchains_hd
 
IBM ADEPT
IBM ADEPTIBM ADEPT
IBM ADEPT_hd
 
Blockchain in IoT and Other Considerations by Dinis Guarda
Blockchain in IoT and Other Considerations by Dinis GuardaBlockchain in IoT and Other Considerations by Dinis Guarda
Blockchain in IoT and Other Considerations by Dinis GuardaDinis Guarda
 

En vedette (9)

Масштабируемость блокчейн-систем: проблемы и решения
Масштабируемость блокчейн-систем: проблемы и решенияМасштабируемость блокчейн-систем: проблемы и решения
Масштабируемость блокчейн-систем: проблемы и решения
 
Blockchain Consensus Protocols
Blockchain Consensus ProtocolsBlockchain Consensus Protocols
Blockchain Consensus Protocols
 
Bitcoin - Introduction, Technical Aspects and Ongoing Developments
Bitcoin - Introduction, Technical Aspects and Ongoing DevelopmentsBitcoin - Introduction, Technical Aspects and Ongoing Developments
Bitcoin - Introduction, Technical Aspects and Ongoing Developments
 
[22/03/2016] Conférence : Blockchain, disruption & révolution
[22/03/2016] Conférence : Blockchain, disruption & révolution[22/03/2016] Conférence : Blockchain, disruption & révolution
[22/03/2016] Conférence : Blockchain, disruption & révolution
 
Blockchain Use Cases: Think of a "Public" Pub/Sub Queue
Blockchain Use Cases: Think of a "Public" Pub/Sub QueueBlockchain Use Cases: Think of a "Public" Pub/Sub Queue
Blockchain Use Cases: Think of a "Public" Pub/Sub Queue
 
IoT, Fog Computing and the Blockchain
IoT, Fog Computing and the BlockchainIoT, Fog Computing and the Blockchain
IoT, Fog Computing and the Blockchain
 
Demystifying Blockchains
Demystifying BlockchainsDemystifying Blockchains
Demystifying Blockchains
 
IBM ADEPT
IBM ADEPTIBM ADEPT
IBM ADEPT
 
Blockchain in IoT and Other Considerations by Dinis Guarda
Blockchain in IoT and Other Considerations by Dinis GuardaBlockchain in IoT and Other Considerations by Dinis Guarda
Blockchain in IoT and Other Considerations by Dinis Guarda
 

Similaire à Scorex, the Modular Blockchain Framework

Web Scale Reasoning and the LarKC Project
Web Scale Reasoning and the LarKC ProjectWeb Scale Reasoning and the LarKC Project
Web Scale Reasoning and the LarKC ProjectSaltlux Inc.
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web FrameworkDaniel Woods
 
Distributed & Highly Available server applications in Java and Scala
Distributed & Highly Available server applications in Java and ScalaDistributed & Highly Available server applications in Java and Scala
Distributed & Highly Available server applications in Java and ScalaMax Alexejev
 
Python Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on FlinkPython Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on FlinkAljoscha Krettek
 
Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...
Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...
Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...Flink Forward
 
BigDataSpain 2016: Stream Processing Applications with Apache Apex
BigDataSpain 2016: Stream Processing Applications with Apache ApexBigDataSpain 2016: Stream Processing Applications with Apache Apex
BigDataSpain 2016: Stream Processing Applications with Apache ApexThomas Weise
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.jsorkaplan
 
Interactive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and ArchitectureInteractive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and ArchitectureJavaDayUA
 
Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek PROIDEA
 
Docker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic StackDocker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic StackJakub Hajek
 
MuleSoft Meetup Roma - Processi di Automazione su CloudHub
MuleSoft Meetup Roma - Processi di Automazione su CloudHubMuleSoft Meetup Roma - Processi di Automazione su CloudHub
MuleSoft Meetup Roma - Processi di Automazione su CloudHubAlfonso Martino
 
Hands on with CoAP and Californium
Hands on with CoAP and CaliforniumHands on with CoAP and Californium
Hands on with CoAP and CaliforniumJulien Vermillard
 
Ice mini guide
Ice mini guideIce mini guide
Ice mini guideAdy Liu
 
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...GetInData
 
Code quality par Simone Civetta
Code quality par Simone CivettaCode quality par Simone Civetta
Code quality par Simone CivettaCocoaHeads France
 
Actor model in .NET - Akka.NET
Actor model in .NET - Akka.NETActor model in .NET - Akka.NET
Actor model in .NET - Akka.NETKonrad Dusza
 
The future of server side JavaScript
The future of server side JavaScriptThe future of server side JavaScript
The future of server side JavaScriptOleg Podsechin
 
ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...
ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...
ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...Nicola Ferraro
 
Spring Boot to Quarkus: A real app migration experience | DevNation Tech Talk
Spring Boot to Quarkus: A real app migration experience | DevNation Tech TalkSpring Boot to Quarkus: A real app migration experience | DevNation Tech Talk
Spring Boot to Quarkus: A real app migration experience | DevNation Tech TalkRed Hat Developers
 

Similaire à Scorex, the Modular Blockchain Framework (20)

Web Scale Reasoning and the LarKC Project
Web Scale Reasoning and the LarKC ProjectWeb Scale Reasoning and the LarKC Project
Web Scale Reasoning and the LarKC Project
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web Framework
 
Distributed & Highly Available server applications in Java and Scala
Distributed & Highly Available server applications in Java and ScalaDistributed & Highly Available server applications in Java and Scala
Distributed & Highly Available server applications in Java and Scala
 
Python Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on FlinkPython Streaming Pipelines with Beam on Flink
Python Streaming Pipelines with Beam on Flink
 
Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...
Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...
Flink Forward Berlin 2018: Thomas Weise & Aljoscha Krettek - "Python Streamin...
 
BigDataSpain 2016: Stream Processing Applications with Apache Apex
BigDataSpain 2016: Stream Processing Applications with Apache ApexBigDataSpain 2016: Stream Processing Applications with Apache Apex
BigDataSpain 2016: Stream Processing Applications with Apache Apex
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
 
Interactive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and ArchitectureInteractive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and Architecture
 
Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek Docker Logging and analysing with Elastic Stack - Jakub Hajek
Docker Logging and analysing with Elastic Stack - Jakub Hajek
 
Docker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic StackDocker Logging and analysing with Elastic Stack
Docker Logging and analysing with Elastic Stack
 
MuleSoft Meetup Roma - Processi di Automazione su CloudHub
MuleSoft Meetup Roma - Processi di Automazione su CloudHubMuleSoft Meetup Roma - Processi di Automazione su CloudHub
MuleSoft Meetup Roma - Processi di Automazione su CloudHub
 
Hands on with CoAP and Californium
Hands on with CoAP and CaliforniumHands on with CoAP and Californium
Hands on with CoAP and Californium
 
Ice mini guide
Ice mini guideIce mini guide
Ice mini guide
 
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
 
Scala at Netflix
Scala at NetflixScala at Netflix
Scala at Netflix
 
Code quality par Simone Civetta
Code quality par Simone CivettaCode quality par Simone Civetta
Code quality par Simone Civetta
 
Actor model in .NET - Akka.NET
Actor model in .NET - Akka.NETActor model in .NET - Akka.NET
Actor model in .NET - Akka.NET
 
The future of server side JavaScript
The future of server side JavaScriptThe future of server side JavaScript
The future of server side JavaScript
 
ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...
ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...
ApacheCon NA - Apache Camel K: connect your Knative serverless applications w...
 
Spring Boot to Quarkus: A real app migration experience | DevNation Tech Talk
Spring Boot to Quarkus: A real app migration experience | DevNation Tech TalkSpring Boot to Quarkus: A real app migration experience | DevNation Tech Talk
Spring Boot to Quarkus: A real app migration experience | DevNation Tech Talk
 

Dernier

2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projectssmsksolar
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesMayuraD1
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdfKamal Acharya
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxmaisarahman1
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Learn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksLearn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksMagic Marks
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Call Girls Mumbai
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesRAJNEESHKUMAR341697
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086anil_gaur
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsvanyagupta248
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdfKamal Acharya
 
Air Compressor reciprocating single stage
Air Compressor reciprocating single stageAir Compressor reciprocating single stage
Air Compressor reciprocating single stageAbc194748
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 

Dernier (20)

2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Learn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic MarksLearn the concepts of Thermodynamics on Magic Marks
Learn the concepts of Thermodynamics on Magic Marks
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Air Compressor reciprocating single stage
Air Compressor reciprocating single stageAir Compressor reciprocating single stage
Air Compressor reciprocating single stage
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 

Scorex, the Modular Blockchain Framework

  • 1. Bitcoin Summer School Scorex, the Modular Blockchain Framework Alexander Chepurnoy (aka kushti) @chepurnoy IOHK Research
  • 2. Section 1. „Scorex In General“
  • 3. Use Cases ● Implement new consensus protocol and plug it easily into a prototypical blockchain system to run a system against a testbed ● In the same way, implement and spread a proof-of-concept impl. for anew transactional language
  • 4. Use Cases ● Proof-of-Stake protocols ● Permacoin implementation
  • 5. The Problem ● Bitcoin(reference impl): > 80K lines of C++ code ● EthereumJ: > 55K of Java code ● Nxt: > 40K lines of Java code ● Every codebase is highly optimized for a concrete production environment
  • 6. The Problem ● It is hard to locate, inject, swap functionalities ● Hard to make experiments/prototypes
  • 7. Scorex in General ● Find fast where to inject ● Modular stacked design ● Externalised cryptography(scrypto) ● One testnet application atm(Lagonaki)
  • 8. Scorex in General, pt 2 ● Everything is open-sourced immediately ● CC0 license ● Maintained by IOHK Research
  • 9. Competitors Intel's „Sawtooth Lake“ (https://github.com/IntelLedger) „a highly modular platform for building, deploying and running distributed ledgers" (Intel Corp.)
  • 10. Intel's „Sawtooth Lake“ ● Consensus / „transaction family“ ● Proof of Elapsed Time (Intel SGX) ● Assets marketplace ● Python ● Apache License 2.0
  • 11. Section 2. „Scorex In Details“
  • 12. Scorex is in Scala ● Functional language, strict static typing ● JVM ● Could be enhanced with any JVM language(Java, Clojure, Kotlin, Groovy, Jython, Frege etc)
  • 13. Development Philosophy ● Flexible design could be hard to understand ● Simple code could be not flexible or error-prone ● We need to find a balance! ● Give a maximum for free!
  • 14. Design In General ● Compact core – always for free ● Consensus module - implement or take ready ● Transactional module - implement or take ready ● Network protocols – partly for free ● API – partly for free ● Application – lean! ● Wallet, configs – partly for free
  • 15. A Module ● Writes and reads certain block parts ● Implements corresponding interface
  • 16. Code Quality ● Compact code, strict types ● Good test coverage(70-80%) ● Continuous integration
  • 17. Getting Started ● Docs on GitHub: https://github.com/ScorexProject/Scorex/wiki/Getting-started ● Java 8 SDK ● sbt is recommended for Scala
  • 18. Adding Modules libraryDependencies ++= Seq( "org.consensusresearch" %% "scorex-basics" % "1.+", "org.consensusresearch" %% "scorex-consensus" % "1.+", "org.consensusresearch" %% "scorex-transaction" % "1.+" ) scorex-basics -core scorex-consensus - two Proof-of-Stake consensus protocols scorex-transaction – simplest transactions
  • 19. Adding Modules libraryDependencies ++= Seq( "org.consensusresearch" %% "scorex-basics" % "1.+", "org.consensusresearch" %% "scorex-perma" % "1.+", "org.consensusresearch" %% "scorex-transaction" % "1.+" ) scorex-perma – Permacoin consensus protocol implementation
  • 20. Application - modules class MyApplication(val settingsFilename: String) extends Application { // Your application config override val applicationName = "my cool application" override val appVersion = ApplicationVersion(0, 1, 0) override implicit lazy val settings = new Settings with TransactionSettings { override val filename: String = settingsFilename } // Define consensus and transaction modules of your application override implicit lazy val consensusModule = new NxtLikeConsensusModule() override implicit lazy val transactionModule = new SimpleTransactionModule()(settings, this)
  • 21. Application - API // Define API routes of your application override lazy val apiRoutes = Seq( BlocksApiRoute(this), TransactionsApiRoute(this), NxtConsensusApiRoute(this), WalletApiRoute(this), PaymentApiRoute(this), UtilsApiRoute(this), PeersApiRoute(this), AddressApiRoute(this) ) // API types are required for swagger support override lazy val apiTypes = Seq( typeOf[BlocksApiRoute], typeOf[TransactionsApiRoute], typeOf[NxtConsensusApiRoute], typeOf[WalletApiRoute], typeOf[PaymentApiRoute], typeOf[UtilsApiRoute], typeOf[PeersApiRoute], typeOf[AddressApiRoute] )
  • 22. Application – network protocols // Create your custom messages and add them to additionalMessageSpecs override lazy val additionalMessageSpecs = TransactionalMessagesRepo.specs // Start additional actors actorSystem.actorOf(Props(classOf[UnconfirmedPoolSynchronizer], this)) }
  • 23. Launch The Application object MyApplication extends App { // Provide filename by command-line arguments val filename = args.headOption.getOrElse("settings.json") // Create application instance val application = new MyApplication(filename) // Run it application.run() // Generate account in your wallet if (application.wallet.privateKeyAccounts().isEmpty) application.wallet.generateNewAccounts(1) }
  • 24. UI
  • 25. Settings https://github.com/ScorexProject/Scorex/wiki/Settings { "p2p": { "bindAddress": "0.0.0.0", "upnp": false, "upnpGatewayTimeout": 7000, "upnpDiscoverTimeout": 3000, "port": 9084, "knownPeers": [ "23.94.190.226:9185" ], "maxConnections": 10 }, "walletDir": "/tmp/scorex/wallet", "dataDir": "/tmp/scorex/data", "rpcPort": 9085, "rpcAllowed": [], "maxRollback": 100, "blockGenerationDelay": 0, "genesisTimestamp": 1460952000000, "apiKeyHash": "GmVvcpx1BRUPDZiADbZ7a6zgQV3Sgj2GhNoEiTH9Drdx", "cors": false }
  • 26. Lagonaki ● Permacoin implementation ● Simplest transactional module, account-2-account payments
  • 27. Launch Lagonaki ● docker run -i -p 9085:9085 "scorex/lagonaki:1.2.7" ● debian package ● https://github.com/ScorexProject/Lagonaki
  • 29. Run own network ● src/main/resources/lagonaki.conf app { product = "Scorex" release = "Lagonaki" version = "1.2.7" consensusAlgo = "perma" }
  • 31. 1.2.7 → 1.3.0 ● Flexible state models(now account-based) ● Flexible signing schemes(now EdDSA-25519 only)
  • 32. Ergaki ● Blockchain for protocols ● Rollerchain implementation: safely prunable fullblocks ● Σ-coin implementation: wide class of NIZKPoK for DLOG statements ● Rent-a-Box fee model ● Improved difficulty adjustment
  • 33. Scrypto ● Еncoding functions(Base16/58/64) ● Hash functions(Blake2, Keccak etc) ● 25519 from WhisperSystems ● Authenticated data structures(Merkle trees, authenticated skiplists coming in next release)
  • 35. Contribution ● Comments ● Todos (search for „todo:“) ● Documentation ● Bugs ● Bitcoin UTXO model implementation (BitcoinJ) ● EVM implementation (EthereumJ)
  • 36. Reach Us ● Maillist https://scorex-dev.groups.io/g/main ● GitHub https://github.com/ScorexProject ● https://iohk.io/team/