All Projects → quilt → Sheth

quilt / Sheth

Licence: apache-2.0
Execution environment for managing shard ether

Programming Languages

rust
11053 projects

Labels

Projects that are alternatives of or similar to Sheth

Cryptocurrency Arbitrage
A cryptocurrency arbitrage opportunity calculator. Over 800 currencies and 50 markets.
Stars: ✭ 836 (+3383.33%)
Mutual labels:  ethereum
Ethstats Network Server
EthStats - Server
Stars: ✭ 18 (-25%)
Mutual labels:  ethereum
Wavevote
Voting system based on Ethereum
Stars: ✭ 22 (-8.33%)
Mutual labels:  ethereum
Mycrypto
MyCrypto is an open-source tool that allows you to manage your Ethereum accounts privately and securely. Developed by and for the community since 2015, we’re focused on building awesome products that put the power in people’s hands.
Stars: ✭ 889 (+3604.17%)
Mutual labels:  ethereum
Blockchain Reading List
Blockchain Manchester Meetups, Talks and Reading List
Stars: ✭ 17 (-29.17%)
Mutual labels:  ethereum
Uniswap V2 Core
🎛 Core smart contracts of Uniswap V2
Stars: ✭ 889 (+3604.17%)
Mutual labels:  ethereum
Oyente
An Analysis Tool for Smart Contracts
Stars: ✭ 820 (+3316.67%)
Mutual labels:  ethereum
Node
Stampery API for NodeJS. Notarize all your data using the blockchain
Stars: ✭ 23 (-4.17%)
Mutual labels:  ethereum
Eth.social
An Ethereum dApp for posting social events.
Stars: ✭ 17 (-29.17%)
Mutual labels:  ethereum
Blockchain
블록체인 공부 중입니다.
Stars: ✭ 22 (-8.33%)
Mutual labels:  ethereum
Graph Node
Graph Node indexes data from blockchains such as Ethereum and serves it over GraphQL
Stars: ✭ 884 (+3583.33%)
Mutual labels:  ethereum
Numismatic
Collector for digital assets
Stars: ✭ 17 (-29.17%)
Mutual labels:  ethereum
Ethjs Account
A simple Ethereum account utility module.
Stars: ✭ 19 (-20.83%)
Mutual labels:  ethereum
Multisignaturewallet
311 byte EIP712 Signing Compliant Delegate-Call Enabled MultiSignature Wallet for the Ethereum Virtual Machine
Stars: ✭ 16 (-33.33%)
Mutual labels:  ethereum
Adchainregistrydapp
Decentralized Application to interact with the adChain Registry Smart Contracts
Stars: ✭ 23 (-4.17%)
Mutual labels:  ethereum
Design
Ewasm Design Overview and Specification
Stars: ✭ 827 (+3345.83%)
Mutual labels:  ethereum
Emerald Vault Archive
ARCHIVE. CODE MOVED TO:
Stars: ✭ 18 (-25%)
Mutual labels:  ethereum
Aeternity
æternity: solving scalability problems by making sense of state-channels
Stars: ✭ 923 (+3745.83%)
Mutual labels:  ethereum
Etgate
Ethereum-Tendermint token sending gateway
Stars: ✭ 23 (-4.17%)
Mutual labels:  ethereum
Etherscan Explorer
Yet another implementation of etherscan.io
Stars: ✭ 22 (-8.33%)
Mutual labels:  ethereum

sheth

sheth test status client test status composer test status Apache License

sheth [ ˈshēth ] is an execution environment (EE) for Ethereum 2.0 that facilitates the movement of ether within a shard and provides mechanisms to move ether between a shard and the beacon chain.

Quick Start

First, setup your environment:

rustup target install wasm32-unknown-unknown
cargo install chisel
make setup

Then simulate execution using Scout:

make scout

Or run on your local architecture (useful for tracking down bugs):

make test

Recommended Reading

The design space for EEs is broad and builds on many different Ethereum 2.0 related concepts. If you're lost, here are a few places to get started:

Ping me @lightclients for any other questions / concerns.

Motivation

  • Understanding the developer experience regarding EEs could influence design decisions of the protocol and EE runtime.
  • Efficiently authenticating and updating merkle multi-proofs is critical to the success of stateless execution environments.
  • In order to develop strong tooling for EE development, it's important to determine a lower bound for execution time and binary size to target.
  • Provide a framework on which others can develop and experiment.

Architecture

At a high level, sheth provides a single state transition function:

pub fn main(pre_state: &[u8; 32], data: &[u8]) -> [u8; 32];

The main function essentially takes in the latest merkle root of the state as pre_state and some amount of data. It deserializes the data into the transactions that will be executed and the merkle multi-proof which is used authenticate the transactions. Due to some of the semantics of WebAssembly, it isn't quite this simple (see the FFI interface) -- but the general idea remains intact.

sheth's design is heavily influenced by Vitalik's sample EE in his phase 2 proposal.

State

The state can be thought of abstractly as an array [Account, 2**256], where an account's index in the array is equal to Sha256(account.pubkey). This is far too large to fit into memory all at once, so operations are done on specific elements within a merkle multi-proof.

The sparse merkle tree for sheth's state can be roughly visualized as follows:

FL = first leaf node = 2**256
LL = last leaf node = 2**257 - 1
        
              +---------- 1 ----------+             
             /                         \
        +-- 2 --+                   +-- 3 --+       
       /         \                 /         \
     ...         ...             ...         ...   
    /   \       /   \           /   \       /   \
  FL+0 FL+1   FL+2 FL+3  ...  LL-3 LL-2   LL-1 LL-0 

Each leaf node is the root of the corresponding account. An account's merkle tree structure is as follows:

              +--- account ---+
             /                 \
      pubkey_root           sub_root    
        /     \              /    \     
  pk[0..32] pk[32..48]    nonce  value

Merkle Multi-Proof

A merkle multi-proof is a data structure which stores multiple branches proving various items within the state. For a formal definition, see the specification.

Example

Imagine a merkle tree of this shape (e.g. an account):

     1
   /   \
  2     3
 / \   / \
4   5 6   7

In order to prove 6 is included in the root at 1, the nodes [2, 6, 7] would be needed since 1 and 3 can be calculated from that set.

     1
   /   \
 [2]    3
 / \   / \
4   5[6] [7]

Roadmap

  • [x] Support intra-shard transfers
  • [ ] Consume beacon chain withdrawal receipts
  • [ ] Allow shard ether to be deposited to the beacon chain
  • [ ] Validate transaction signature against BLS pubkey
  • [x] Verify transaction nonce against account
  • [ ] Implement merge functionality for multiple packages
  • [ ] Minimize binary size
  • [ ] Minimize execution time
  • [ ] Minimize multi-proof size

License

Licensed under Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].