Giter VIP home page Giter VIP logo

leo's People

Contributors

nasdf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

leo's Issues

Narrow down JSON RPC methods

We need to figure out which of the Ethereum JSON RPC routes the portal network can support. There's currently a list of all routes in docs/json-rpc.md.

Things that don't obviously map cleanly onto this new architecture.

A: Transaction Gossip

The portal network design for transaction gossip requires that:

  • nodes can limit how much of the mempool they are expected to process
  • nodes that want to view the full mempool can do so

The current designs for this involve actually shaping the network topology around these two needs. It isn't obvious to me how this can be accomplished using the functionality provided by libp2p

B: O(1) access to the state

We need these things:

  • queries can be made under a specific state root
  • we query by key which is the full path into the trie where the leaf should live
  • the response is contains both the leaf and a proof that anchors the returned data to the state root it should be under.

First I'll start with a completely naive solution that does seem to map fine to the new architecture.

We will store things roughly as (key, state_root) => (leaf, proof), which means that we will key off of both the state root, and the key in the trie, and we will store both the leaf value and the proof. For this to work without anything extra fancy we must push a full new copy of the state into the network at every single block, anchoring each leaf to the state root (regardless of whether the value has changed since the previous block).

In the DHT-portal network, we get around this by having nodes store a proof that they are continually updating as new data shows up in new blocks. This gives us both efficiency of storage since we don't have to store duplicate values that haven't changed, as well as efficient data ingress since we only have to pipe in the new/updated state data.

It isn't clear to me how we can accomplish similar things using IPLD/bitswap.

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.