SlideShare a Scribd company logo
1 of 40
Download to read offline
Instrumentation, Resource Allocation and Monitoring for smart
contracts on the Blockchain
Vijayendra Bhamidipati (eBay)
Michael Chan (eBay)
Arpit Jain (eBay)
Hyperledger Summit 2018, The Linux Foundation
Agenda
Visibility and Metrics
Instrumenting Systems and Blockchain Frameworks
Billing for Smart Contracts
Resource Allocation
Monitoring and Alerting
Security
Q&A
Agenda
Visibility and Metrics
Instrumenting Systems and Blockchain Frameworks
Billing for Smart Contracts
Resource Allocation
Monitoring and Alerting
Security
Q&A
Visibility
Like an X-Ray - how easy is it to dissect/analyze the ecosystem?
Examples of visibility -
- Components that make up the system
- Core and Perimeter
- Data Flows
- Control Flows
- System Policies
- Behavioral patterns
Visibility in a Blockchain Ecosystem
- What validators are running?
- What permissioned “views” are currently configured?
- Which smart contracts have been deployed?
- What tokens have been created?
- What consensus algorithm(s) is/are in use?
- What is the current scale of deployment?
- And more..
Metrics
Health
Deadlocked/Blocked processes,
Deviations from expected states,
etc.
Resource Utilization
CPU, Memory, Disk I/O, Network
I/O, etc.
Blockchain
Framework
Smart Contracts
Infra
Hashrate, # of blocks mined per
period, Block read times, Block
write times, Consensus Algo, etc.
Business Logic
Overall
Latency
Oraclized
Call Perf
A note on Debuggability
Closely tied to visibility and metrics
- Logging and Log Analysis infrastructure
- Debug Builds
- Live and offline debugging capabilities
- Robust test frameworks
Agenda
Visibility and Metrics
Instrumenting Systems and Blockchain Frameworks
Billing for Smart Contracts
Resource Allocation
Monitoring and Alerting
Security
Q&A
Frameworks that facilitate metric creation, emission, collection and analysis
Traditional resource utilization measurement/profiling techniques -
- Language specific profiling - Go profiling, Python profiling, etc.
- System level profiling - SAR, vmstat, iostat, etc.
Instrumentation
- Not granular enough
- For function level metrics, need modification of code.
- Should be planned ahead of time
- May not be ideal in all cases of production deployment
- Not easily modifiable
- In case of blockchain, immutability is a major blocker
Disadvantages of traditional techniques
A note on Hyperledger Caliper
• In Hyperledger incubation
• Requires code modification for instrumentation
Is there an alternative?
eBPF! (Extended Berkeley Packet Filter)
Highly programmable
Highly granular
Can be inline, but doesn’t require code modification
Ideal for blockchain and smart contracts
- Linux Perf can run eBPF
- iovisor bcc is preferred over Linux Perf
eBPF
Brings in visibility at userland function level
Couple this with call graphing
Enables measurement of -
- Latency of functions in a smart contract
- Resource utilization of functions in a smart contract
More about eBPF
eBPF VM
Demo
Hyperledger Fabric
ChainCode
(MyEchoAsset)
ElasticSearch
Kibana
MyEchoAsset.Invoke() Probe
Stats
Emitter
Video
Drawbacks of eBPF
Available only on Linux 4.4+
Scalability
○ Alternative is to build similar functionality into the Virtual Machine executing
the smart contracts
■ Will require blockchain framework support
Agenda
Visibility and Metrics
Instrumenting Systems and Blockchain Frameworks
Billing for Smart Contracts
Resource Allocation
Monitoring and Alerting
Security
Q&A
Billing
Public Blockchains
Drivers
- Next few minutes
- Next few blocks
Variability is ok
Permissioned/Private
Blockchains
Drivers
- QoS
- OpEx
Variability is not
always ok
Enterprise billing must be multi variate. Examples:
- Specific function chain latency
- Partnership service charges
- IP valued smart contract services
- Demand based contract/service pricing
- Resource utilization based pricing
- Sub-licensing or multi party service provider based pricing
Blockchain frameworks in general can help build Automated Billing Policy Engines
Billing (contd)..
Agenda
Visibility and Metrics
Instrumenting Systems and Blockchain Frameworks
Billing for Smart Contracts
Resource Allocation
Monitoring and Alerting
Security
Q&A
Two parts to this -
- Engines that dictate resource allocation policies
- Planes that realize the actual resource allocation/allotment.
Resource Allocation
Resource Allocation Plane
Containerization
- Readily available Linux native construct
- Allows for resource limits and requests
- Not too granular - system specific and based on Linux namespace
- Multiple blockchain logical constructs in a single namespace
- How do you allot resources between them within a namespace?
Blockchain Aware Native Scheduling (BANS)
Resource Allocation Constructs for the Blockchain
Business Logic
Specific Smart Contracts
CoS
Service Differentiation
- IoT
- DRM
- Financial
transactionsQoS
Latency requirements
Environments
- Mobile
- Desktop
- Native
Blockchain aware Native Scheduling
Smart contract awareness as kernel constructs and modules into the OS
- Like Linux containers did with namespaces
Build Consensus Algorithms as Protocols and Protocol Suites into the Linux ecosystem
- Allows for -
- Lean implementations for embedded systems (IoT)
- Highly efficient mobile blockchain modules/ecosystems
Resource Allocation Engine
Is the Control Plane
- Basic
- Simple policy driven allocation
- Advanced
- Leverage ML/statistical methods to identify patterns of usage and drive scheduling of
resources.
Agenda
Visibility and Metrics
Instrumenting Systems and Blockchain Frameworks
Billing for Smart Contracts
Resource Allocation
Monitoring and Alerting
Security
Q&A
Monitoring and
Alerting
Popular enterprise monitoring
frameworks -
- Prometheus
- statsd
- Filebeat
- Logstash
- ElasticSearch
- Kibana
Agenda
Visibility and Metrics
Instrumenting Systems and Blockchain Frameworks
Billing for Smart Contracts
Resource Allocation
Monitoring and Alerting
Security
Q&A
Security
Again, two parts to this -
- Engines that dictate security policies
- Planes that realize the security policies
Security enforcement plane
We propose
• “Function Based Access Control” (FBAC)
• “Data Based Access Control” (DBAC)
FBAC
Block/allow invocations of specific function chains.
• Userspace functions both in the blockchain framework and Smart contracts
Whitelist/Blacklists are FBAC policies that are baked into the Blockchain itself.
A scalable way of implementing Permissioned Blockchains
DBAC
Block/allow invocations of specific function chains based on function parameter values.
Block/allow reads of specific sets of data.
• Again, Whitelist/Blacklists are DBAC policies that are baked into the Blockchain itself.
FBAC/DBAC implementation
Two approaches -
- eBPF
- Blockchain Virtual Machine (EVM (ethereum virtual machine) for example)
Blockchain Team @ eBay
Michael Chan (michachan@ebay.com)
Vijayendra Bhamidipati (vbhamidipati@ebay.com)
Arpit Jain (arpijain2@ebay.com)
Brian Haslam (bhaslam@ebay.com)
Ashok Murthy (asmurthy@ebay.com)
Derek Chamorro (dchamorro@ebay.com)
A note of thanks..
Venkatesh Palani (kupalani@ebay.com)
Brian Haslam (bhaslam@ebay.com)
Qiu Yu (qiuyu@ebay.com)
References
https://github.com/hyperledger/caliper/blob/master/docs/Architecture.md
http://www.brendangregg.com/perf.html
http://www.brendangregg.com/blog/2015-05-15/ebpf-one-small-step.html
http://www.brendangregg.com/blog/2017-01-31/golang-bcc-bpf-function-traci
ng.html
https://github.com/iovisor/bcc
https://github.com/cilium/cilium/blob/master/Documentation/bpf.rst
Q&A
Security, Instrumentation, Resource Allocation and Monitoring of Smart Contracts and Blockchain frameworks

More Related Content

Similar to Security, Instrumentation, Resource Allocation and Monitoring of Smart Contracts and Blockchain frameworks

Blockchain solution architecture deliverable
Blockchain solution architecture deliverableBlockchain solution architecture deliverable
Blockchain solution architecture deliverableSarmad Ibrahim
 
IBM Blockchain Platform - Architectural Good Practices v1.0
IBM Blockchain Platform - Architectural Good Practices v1.0IBM Blockchain Platform - Architectural Good Practices v1.0
IBM Blockchain Platform - Architectural Good Practices v1.0Matt Lucas
 
20160304 blockchain in fsi client ready raymond
20160304 blockchain in fsi client ready raymond20160304 blockchain in fsi client ready raymond
20160304 blockchain in fsi client ready raymondMeng-Ru (Raymond) Tsai
 
Blockchain Tech Approach Whitepaper
Blockchain Tech Approach WhitepaperBlockchain Tech Approach Whitepaper
Blockchain Tech Approach WhitepaperProperty Bihar
 
Istio: Using nginMesh as the service proxy
Istio: Using nginMesh as the service proxyIstio: Using nginMesh as the service proxy
Istio: Using nginMesh as the service proxyLee Calcote
 
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...DataScienceConferenc1
 
Cloud native microservices for systems and applications ieee rev2
Cloud native microservices for systems and applications ieee rev2Cloud native microservices for systems and applications ieee rev2
Cloud native microservices for systems and applications ieee rev2Prem Sankar Gopannan
 
Webinar-GBA Episode 7-Managing blockchain infrastructure for enterprise-grade...
Webinar-GBA Episode 7-Managing blockchain infrastructure for enterprise-grade...Webinar-GBA Episode 7-Managing blockchain infrastructure for enterprise-grade...
Webinar-GBA Episode 7-Managing blockchain infrastructure for enterprise-grade...Zeeve
 
Silicon Valley Code Camp Blockchain Oct 2017
Silicon Valley Code Camp Blockchain Oct 2017Silicon Valley Code Camp Blockchain Oct 2017
Silicon Valley Code Camp Blockchain Oct 2017Nelson Petracek
 
TADSummit, DataArt Keynote: Security in Virtualized Telecom Networks Michael ...
TADSummit, DataArt Keynote: Security in Virtualized Telecom Networks Michael ...TADSummit, DataArt Keynote: Security in Virtualized Telecom Networks Michael ...
TADSummit, DataArt Keynote: Security in Virtualized Telecom Networks Michael ...Alan Quayle
 
Cinema booking system | Movie Booking System
Cinema booking system | Movie Booking SystemCinema booking system | Movie Booking System
Cinema booking system | Movie Booking Systemsekarsadasivam
 
Microservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native AppsMicroservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native AppsAraf Karsh Hamid
 
Bit taka bangladeshi country owned crypto currency
Bit taka bangladeshi country owned crypto currencyBit taka bangladeshi country owned crypto currency
Bit taka bangladeshi country owned crypto currencyMohammad Salehin
 
Blockchin Architecture on Azure-Part-3
Blockchin Architecture on Azure-Part-3Blockchin Architecture on Azure-Part-3
Blockchin Architecture on Azure-Part-3Mohammad Asif
 
Blockchain Technology ,Architecture and its Structure
Blockchain Technology ,Architecture and its StructureBlockchain Technology ,Architecture and its Structure
Blockchain Technology ,Architecture and its Structurekasthurimukila
 
Oracle Blockchain Platform
Oracle Blockchain PlatformOracle Blockchain Platform
Oracle Blockchain PlatformJuarez Junior
 
A Robust finger Print Authentication Scheme viaBlockchain to retrieve Citizen...
A Robust finger Print Authentication Scheme viaBlockchain to retrieve Citizen...A Robust finger Print Authentication Scheme viaBlockchain to retrieve Citizen...
A Robust finger Print Authentication Scheme viaBlockchain to retrieve Citizen...IRJET Journal
 
Doag 2018 eine_reise_durch_die_blockchain_applikationsentwicklung_final
Doag 2018 eine_reise_durch_die_blockchain_applikationsentwicklung_finalDoag 2018 eine_reise_durch_die_blockchain_applikationsentwicklung_final
Doag 2018 eine_reise_durch_die_blockchain_applikationsentwicklung_finalOPITZ CONSULTING Deutschland
 

Similar to Security, Instrumentation, Resource Allocation and Monitoring of Smart Contracts and Blockchain frameworks (20)

Blockchain solution architecture deliverable
Blockchain solution architecture deliverableBlockchain solution architecture deliverable
Blockchain solution architecture deliverable
 
IBM Blockchain Platform - Architectural Good Practices v1.0
IBM Blockchain Platform - Architectural Good Practices v1.0IBM Blockchain Platform - Architectural Good Practices v1.0
IBM Blockchain Platform - Architectural Good Practices v1.0
 
20160304 blockchain in fsi client ready raymond
20160304 blockchain in fsi client ready raymond20160304 blockchain in fsi client ready raymond
20160304 blockchain in fsi client ready raymond
 
Blockchain Tech Approach Whitepaper
Blockchain Tech Approach WhitepaperBlockchain Tech Approach Whitepaper
Blockchain Tech Approach Whitepaper
 
Istio: Using nginMesh as the service proxy
Istio: Using nginMesh as the service proxyIstio: Using nginMesh as the service proxy
Istio: Using nginMesh as the service proxy
 
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...
[DSC Europe 23][DigiHealth] Muthu Ramachandran AI and Blockchain Framework fo...
 
Cloud native microservices for systems and applications ieee rev2
Cloud native microservices for systems and applications ieee rev2Cloud native microservices for systems and applications ieee rev2
Cloud native microservices for systems and applications ieee rev2
 
Block Chain.pptx
Block Chain.pptxBlock Chain.pptx
Block Chain.pptx
 
Webinar-GBA Episode 7-Managing blockchain infrastructure for enterprise-grade...
Webinar-GBA Episode 7-Managing blockchain infrastructure for enterprise-grade...Webinar-GBA Episode 7-Managing blockchain infrastructure for enterprise-grade...
Webinar-GBA Episode 7-Managing blockchain infrastructure for enterprise-grade...
 
Silicon Valley Code Camp Blockchain Oct 2017
Silicon Valley Code Camp Blockchain Oct 2017Silicon Valley Code Camp Blockchain Oct 2017
Silicon Valley Code Camp Blockchain Oct 2017
 
TADSummit, DataArt Keynote: Security in Virtualized Telecom Networks Michael ...
TADSummit, DataArt Keynote: Security in Virtualized Telecom Networks Michael ...TADSummit, DataArt Keynote: Security in Virtualized Telecom Networks Michael ...
TADSummit, DataArt Keynote: Security in Virtualized Telecom Networks Michael ...
 
Cinema booking system | Movie Booking System
Cinema booking system | Movie Booking SystemCinema booking system | Movie Booking System
Cinema booking system | Movie Booking System
 
Microservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native AppsMicroservices Architecture - Cloud Native Apps
Microservices Architecture - Cloud Native Apps
 
Bit taka bangladeshi country owned crypto currency
Bit taka bangladeshi country owned crypto currencyBit taka bangladeshi country owned crypto currency
Bit taka bangladeshi country owned crypto currency
 
Resume
ResumeResume
Resume
 
Blockchin Architecture on Azure-Part-3
Blockchin Architecture on Azure-Part-3Blockchin Architecture on Azure-Part-3
Blockchin Architecture on Azure-Part-3
 
Blockchain Technology ,Architecture and its Structure
Blockchain Technology ,Architecture and its StructureBlockchain Technology ,Architecture and its Structure
Blockchain Technology ,Architecture and its Structure
 
Oracle Blockchain Platform
Oracle Blockchain PlatformOracle Blockchain Platform
Oracle Blockchain Platform
 
A Robust finger Print Authentication Scheme viaBlockchain to retrieve Citizen...
A Robust finger Print Authentication Scheme viaBlockchain to retrieve Citizen...A Robust finger Print Authentication Scheme viaBlockchain to retrieve Citizen...
A Robust finger Print Authentication Scheme viaBlockchain to retrieve Citizen...
 
Doag 2018 eine_reise_durch_die_blockchain_applikationsentwicklung_final
Doag 2018 eine_reise_durch_die_blockchain_applikationsentwicklung_finalDoag 2018 eine_reise_durch_die_blockchain_applikationsentwicklung_final
Doag 2018 eine_reise_durch_die_blockchain_applikationsentwicklung_final
 

Recently uploaded

Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 

Recently uploaded (20)

Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 

Security, Instrumentation, Resource Allocation and Monitoring of Smart Contracts and Blockchain frameworks

  • 1. Instrumentation, Resource Allocation and Monitoring for smart contracts on the Blockchain Vijayendra Bhamidipati (eBay) Michael Chan (eBay) Arpit Jain (eBay) Hyperledger Summit 2018, The Linux Foundation
  • 2. Agenda Visibility and Metrics Instrumenting Systems and Blockchain Frameworks Billing for Smart Contracts Resource Allocation Monitoring and Alerting Security Q&A
  • 3. Agenda Visibility and Metrics Instrumenting Systems and Blockchain Frameworks Billing for Smart Contracts Resource Allocation Monitoring and Alerting Security Q&A
  • 4. Visibility Like an X-Ray - how easy is it to dissect/analyze the ecosystem? Examples of visibility - - Components that make up the system - Core and Perimeter - Data Flows - Control Flows - System Policies - Behavioral patterns
  • 5. Visibility in a Blockchain Ecosystem - What validators are running? - What permissioned “views” are currently configured? - Which smart contracts have been deployed? - What tokens have been created? - What consensus algorithm(s) is/are in use? - What is the current scale of deployment? - And more..
  • 6. Metrics Health Deadlocked/Blocked processes, Deviations from expected states, etc. Resource Utilization CPU, Memory, Disk I/O, Network I/O, etc. Blockchain Framework Smart Contracts Infra Hashrate, # of blocks mined per period, Block read times, Block write times, Consensus Algo, etc. Business Logic Overall Latency Oraclized Call Perf
  • 7. A note on Debuggability Closely tied to visibility and metrics - Logging and Log Analysis infrastructure - Debug Builds - Live and offline debugging capabilities - Robust test frameworks
  • 8. Agenda Visibility and Metrics Instrumenting Systems and Blockchain Frameworks Billing for Smart Contracts Resource Allocation Monitoring and Alerting Security Q&A
  • 9. Frameworks that facilitate metric creation, emission, collection and analysis Traditional resource utilization measurement/profiling techniques - - Language specific profiling - Go profiling, Python profiling, etc. - System level profiling - SAR, vmstat, iostat, etc. Instrumentation
  • 10. - Not granular enough - For function level metrics, need modification of code. - Should be planned ahead of time - May not be ideal in all cases of production deployment - Not easily modifiable - In case of blockchain, immutability is a major blocker Disadvantages of traditional techniques
  • 11. A note on Hyperledger Caliper • In Hyperledger incubation • Requires code modification for instrumentation
  • 12. Is there an alternative? eBPF! (Extended Berkeley Packet Filter)
  • 13. Highly programmable Highly granular Can be inline, but doesn’t require code modification Ideal for blockchain and smart contracts - Linux Perf can run eBPF - iovisor bcc is preferred over Linux Perf eBPF
  • 14. Brings in visibility at userland function level Couple this with call graphing Enables measurement of - - Latency of functions in a smart contract - Resource utilization of functions in a smart contract More about eBPF
  • 16.
  • 17. Video
  • 18. Drawbacks of eBPF Available only on Linux 4.4+ Scalability ○ Alternative is to build similar functionality into the Virtual Machine executing the smart contracts ■ Will require blockchain framework support
  • 19. Agenda Visibility and Metrics Instrumenting Systems and Blockchain Frameworks Billing for Smart Contracts Resource Allocation Monitoring and Alerting Security Q&A
  • 20. Billing Public Blockchains Drivers - Next few minutes - Next few blocks Variability is ok Permissioned/Private Blockchains Drivers - QoS - OpEx Variability is not always ok
  • 21. Enterprise billing must be multi variate. Examples: - Specific function chain latency - Partnership service charges - IP valued smart contract services - Demand based contract/service pricing - Resource utilization based pricing - Sub-licensing or multi party service provider based pricing Blockchain frameworks in general can help build Automated Billing Policy Engines Billing (contd)..
  • 22. Agenda Visibility and Metrics Instrumenting Systems and Blockchain Frameworks Billing for Smart Contracts Resource Allocation Monitoring and Alerting Security Q&A
  • 23. Two parts to this - - Engines that dictate resource allocation policies - Planes that realize the actual resource allocation/allotment. Resource Allocation
  • 24. Resource Allocation Plane Containerization - Readily available Linux native construct - Allows for resource limits and requests - Not too granular - system specific and based on Linux namespace - Multiple blockchain logical constructs in a single namespace - How do you allot resources between them within a namespace? Blockchain Aware Native Scheduling (BANS)
  • 25. Resource Allocation Constructs for the Blockchain Business Logic Specific Smart Contracts CoS Service Differentiation - IoT - DRM - Financial transactionsQoS Latency requirements Environments - Mobile - Desktop - Native
  • 26. Blockchain aware Native Scheduling Smart contract awareness as kernel constructs and modules into the OS - Like Linux containers did with namespaces Build Consensus Algorithms as Protocols and Protocol Suites into the Linux ecosystem - Allows for - - Lean implementations for embedded systems (IoT) - Highly efficient mobile blockchain modules/ecosystems
  • 27. Resource Allocation Engine Is the Control Plane - Basic - Simple policy driven allocation - Advanced - Leverage ML/statistical methods to identify patterns of usage and drive scheduling of resources.
  • 28. Agenda Visibility and Metrics Instrumenting Systems and Blockchain Frameworks Billing for Smart Contracts Resource Allocation Monitoring and Alerting Security Q&A
  • 29. Monitoring and Alerting Popular enterprise monitoring frameworks - - Prometheus - statsd - Filebeat - Logstash - ElasticSearch - Kibana
  • 30. Agenda Visibility and Metrics Instrumenting Systems and Blockchain Frameworks Billing for Smart Contracts Resource Allocation Monitoring and Alerting Security Q&A
  • 31. Security Again, two parts to this - - Engines that dictate security policies - Planes that realize the security policies
  • 32. Security enforcement plane We propose • “Function Based Access Control” (FBAC) • “Data Based Access Control” (DBAC)
  • 33. FBAC Block/allow invocations of specific function chains. • Userspace functions both in the blockchain framework and Smart contracts Whitelist/Blacklists are FBAC policies that are baked into the Blockchain itself. A scalable way of implementing Permissioned Blockchains
  • 34. DBAC Block/allow invocations of specific function chains based on function parameter values. Block/allow reads of specific sets of data. • Again, Whitelist/Blacklists are DBAC policies that are baked into the Blockchain itself.
  • 35. FBAC/DBAC implementation Two approaches - - eBPF - Blockchain Virtual Machine (EVM (ethereum virtual machine) for example)
  • 36. Blockchain Team @ eBay Michael Chan (michachan@ebay.com) Vijayendra Bhamidipati (vbhamidipati@ebay.com) Arpit Jain (arpijain2@ebay.com) Brian Haslam (bhaslam@ebay.com) Ashok Murthy (asmurthy@ebay.com) Derek Chamorro (dchamorro@ebay.com)
  • 37. A note of thanks.. Venkatesh Palani (kupalani@ebay.com) Brian Haslam (bhaslam@ebay.com) Qiu Yu (qiuyu@ebay.com)
  • 39. Q&A