Giter Club home page Giter Club logo

wittgenstein's People

Contributors

bkolad avatar nikkolasg avatar nkeywal avatar vanessabridge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wittgenstein's Issues

Gossipping ENR protocol

EIP for ENR itself it here: https://eips.ethereum.org/EIPS/eip-778

One of the proposal to communicate the ENDR, likely the simplest one actually, is that each node gossip periodically its ENR. There are at least three things to take care about:

  1. we don't want to overload the network -> we need to know how much data we send depending on the period time
  2. we don't want a new node to wait for ages before having access to the information it needs, not getting state data, even if the capabilities is rare.
  3. nodes will need to connect to peers with the capabilities they need. But this could lead to partition the network by capability which may be a bad idea.

The basic protocol would be:

  • we rely on a p2p flood protocol
  • a node has a set of capabilities (a set of string for readiness), some of them rarer than other. The distribution is a parameter; Pareto & gaussian are likely interesting.
  • for some (proportion being a parameter) nodes, these capabilities change regularly (representing a validator moving from one shard to another). The time between changes is a parameter of the protocol.
  • a node gossips its capabilities
    • when it joins the network
    • when it leaves it (sometimes it dies w/o this step, proportion another parameter)
    • when the capabilities change
    • every X seconds (another parameters)
  • nodes discard the information after a given amount of time if it didn't get an update (another parameter of the protocol).
  • new nodes enter regularly and look for given capabilities then leave the network after a given amount of time. Another parameter, may be we need it to be a random variable on a gaussian rather than an integer.

We will measure, for around 20K nodes:

  • the time it takes for a new node to get the capabilities it needs.

cc @carver

Default network protocols

Hi,

I am planning on writing a Dandelion++ Simulation on top of a gossipsub network in order to test some ideas outlined in this issue.

As it currently stands, I would have to build 2-3 protocols, one for a gossipsub network, one for Dandelion++ and another for sharding.

As a potential future feature of this simulation library, would it make sense to have some default network protocols that simulators can choose from?

Support dead nodes

We should be able to support dead nodes in the framework, including the fact that it's sometimes possible to detect dead nodes

POW Sim

Build a protocol that simulates pow algorithms, uses difficulty calculations and includes uncles:

For Uncle creation
Before adding as uncle:

  • Validate that block received has the same parent as existing block at same height
  • Check block by height in blockchain and add as uncle if same parent and hasn’t been included and there are less than 2 uncles at that height
  • Prevent uncles past height+6 to be added

Refactoring

  • Remove uncle reference from the node

Mining

  • Adjust difficulty calculation to include uncles
  • Validate calculations using real data from main net in a test
  • Create reward functions that allocates funds for successfully mining: 1) block + transaction fees 2) an uncle

** Data collection**

  • Generate stats for uncles and record them in a separate file (csv)
  • Select minimal parameters necessary to feed to RL agent
  • Set method that calls agent at decision points

Generate data and store it outside with minimum parameters necessary

Add logarithmic scale graphs

Our current graphs don't allow us to appreciate what happens in the first rounds of the protocol. Having a log scale graph (i.e. plotting log_2(number of signatures aggregated) over time) would allow us to see what happens in the early stages of the protocol execution.

We might thus be able to see how vulnerable the initial phases of the protocol are wrt to byzantine actors etc...

P2P Signature Aggregation: add the possibility to have passive nodes

It should be possible to have two types of nodes:

  • actual signers
  • peers that relay others' signatures but don't sign themselves.

In real life, there are multiple reasons for such deployments, including:

  • some signers may want to be difficult to identify as actual signers
  • some nodes may want to participate as simple observers
  • nodes participating may change often making more interesting to keep the same peers even if the actual signers changed

Support scenario

For example, run a scenario with a partition at a given moment and try it on different blockchain.

It's obviously complicated to implement.

Add a Flood routing protocol

See libp2p doc here: https://github.com/libp2p/specs/tree/master/pubsub/gossipsub
The basic protocol is quite simple:
"With flooding, routing is almost trivial: for each incoming message, forward to all known peers in the topic. There is a bit of logic, as the router maintains a timed cache of previous messages, so that seen messages are not further forwarded. It also never forwards a message back to the source or the peer that forwarded the message."

Overload network send to unique destination

The Network class should have an overloaded method send which takes an unique destination as argument instead of taking only a collection. That would relieve us to use the Collections.singleton() trick.

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.