Giter Site home page Giter Site logo

narwhal-abci-evm's Introduction

Narwhal & Bullshark x ABCI x EVM

Components:

  • Reliable stream of hashes of batches of transactions from Bullshark
  • Reconstruction of the ledger by querying Narwhal workers' stores for the confirmed batches of transactions
  • Delivery of the reconstructed ledger over ABCI to the application logic
  • Implementation of a Rust ABCI app using REVM

Demo

Setup/dependencies (from the main folder of the repository):

Run demo (from the main folder of the repository):

  1. 1st terminal: cd demo && cargo build && poetry run fab local
  2. 2nd terminal (after the testbed has started in 1st terminal): cargo run --bin client

The second command will produce output like this:

The demo consensus network is run by four nodes (each running on localhost), whose RPC endpoints are reachable on TCP ports 3002, 3009, 3016, and 3023, respectively. There are three accounts, Alice (initially 1.5 ETH), Bob (initially 0 ETH), and Charlie (initially 0 ETH). Alice performs a double spend, sending 1 ETH each to Bob and Charlie in two different transactions that get input to the nodes at ports 3009 and 3016, respectively. Note that only one transaction can make it. Eventually, nodes reach consensus on which transaction gets executed in Foundry's EVM, and the application state is updated in lockstep across all nodes. The update is reflected in subsequent balance queries.

TODOs

  1. Why does the state transition take a few seconds to get applied?
  2. Can we make this work with Anvil instead of rebuilding a full EVM execution environment?

narwhal-abci-evm's People

Contributors

gakonst avatar akirillo avatar joachimneu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.