Extend Hyperledger Fabric to Support EVM Contract

Hyperledger Fabric is a permissioned blockchain platform where people build applications to communicate and interact with deployed smart contracts. However, smart contracts and apps must be written in programming languages like Go or Javascript. Alternatively, Ethereum made it friendly to write smart contracts by inventing Contract-Oriented Languages, e.g. Solidity, and created a Web3 library that can be used to interact with smart contracts. The talk will cover how an EVM has been integrated into Fabric, enabling users to write contracts in Contract-Oriented Languages as well as interact with them via the Web3 library. Developers familiar with Ethereum can easily develop on Fabric, leverage tools like Truffle & Remix, as well as migrate their Distributed Apps (DApps) with minimal effort.

1.Extend Hyperledger Fabric to Support EVM Contract and Web3 Toolings Swetha Repakula <srepaku@us.ibm.com> Jiannan Guo <guojiannan@cn.ibm.com>

2. show of hands how many of you… • are familiar Blockchain? • have written a DApp on Ethereum? • have written application on Hyperledger Fabric?

3.• What is EVM • Why are we supporting it • How to use it • How it’s done • Demo • Future work

4.What is EVM?

5.• Turing-complete stack-based virtual machine • execute bytecode compiled from high-level languages • contract-oriented language, e.g. Solidity, Vyper • bounded by limited gas supply • reduce attack surface

6.why are we supporting it?

7. Fabric Ethereum Permissioned Permissionless

8.“Should I learn another contract-oriented language?” – Developer from Ethereum

9. Fabric Ethereum Hyperledger Cello …

10.Fabric Ethereum chaincode bytecode Docker EVM


12. What if… https://medium.com/blockchannel/tools-and-technologies-in-the-ethereum-ecosystem-e5b7e5060eb9

13.How it’s done

14. previous work • EVM is a spec • go-ethereum is under LGPL-3.0, which we cannot use directly • luckily, Hyperledger Burrow has its own implementation of EVM spec, under Apache 2.0 • Sawtooth has already leveraged that lib to support evm bytecode execution, i.e. seth • shoutout to Burrow team for their generous support!


16. Demo VOTE DAPP VOTE DAPP USER1 USER2 FAB PROXY FAB PROXY USER1 USER2 Installs & FABRIC Interacts Interacts NETWORK with the with Contract Contract

17. Future Work • Fabric EVM experimental support in Fabric 1.2 • Fab Proxy in Fabric 1.3 • Introduction of events in Smart Contracts • Looking into Adding Native Accounts

18. References • Fabric Chaincode EVM Repo: https://github.com/ hyperledger/fabric-chaincode-evm • Deploy Fabric + EVM to IBM Kubernetes Service: https:// github.com/swetharepakula/fabric-evm-ibm-container- service • POC Proxy: https://github.com/swetharepakula/fabric- chaincode-evm • Fabric EVM Demo: http://fabric-evm-demo.mybluemix.net/ • IBM Code: https://ibm.biz/BdZWzT

19. Thanks! Any Questions?