Code Monkey home page Code Monkey logo

ssv-spec's People

Contributors

aayush-rockx avatar alonmuroch avatar amirylm avatar galrogozinski avatar gl-rockx avatar gldeng avatar guym-blox avatar lior-blox avatar matheusfranco99 avatar moshe-blox avatar nivblox avatar nkryuchkov avatar olegshmuelov 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ssv-spec's Issues

Safe change operator

How do we ensure, in protocol, that change operator doesn't cause slashing.
For example we can sync the new group with the highest decided and put that in their slashing db

depends on #40

Check signed msg signers are unique

Signers in all signed objects should be unique (no duplicates)

  • QBFT signed messages
  • SignedPartialSignatureMessage
  • PartialSignatureMessage

decided message should be accepted regardless of round and state

A commit message should be added to the container if valid: height, type and signature.
This will allow to achieve a quorum and terminate the instance whenever there is a quorum regardless of when commit messages arrive: late, future and decided messages.

This pends a discussion with Roberto

SSV graffiti support

Current spec holds the graffiti in the share data, that needs to be represented in the contracts

Sync spec

Between nodes sync protocol:

  • highest decided
  • highest change round within instance
  • decided history sync (for archive nodes)
  • #65
  • spec test for 2 decided msgs with different signers, should error on the second one
  • spec test for 2 decided msgs, first with 2f+1 signers and the other with >2f+1
  • spec test as the above just reverse order

Refactor SSV Runner

Current SSV runner is too complicated, it needs to be generalized to all duties and with a clear pipeline for all duties

Network Topology

Check and evaluate different topologies, based on topologies that are detailed here.

Contracts V3

Includes

  • [ ] Using group primitives for handling validator registration, fee, etc
  • [ ] Focusing on reusability of groups for multi validator registration
  • #28
  • [ ] Support fee recipient
  • #67

history msg processing

  • qbft controller should be able to process past messages
  • Past messages are restricted to commit msgs (late commit) and decided msg with a higher number of signers

QBFT spec tests leftovers

  • Process message (controller and instance)
  • Prepare (a few tests)
  • upon timeout
  • upon decided
  • check for duplicated msgs with different sorted signers (results in different roots I think)
  • Spec test late messages for stored instances that decided already
  • #59
  • signed msg signer 0
  • #118

Merge decided msg + post consensus msg

When a node decides it should broadcast a post consensus msg with decided justifications in it so when another node receives it it can serve both as a post consensus partial signature but also as a decided msg.

This can reduce msg overhead

Networking simulation

  • Use libP2P scale test as infra for testing networking configs
  • Scale, test various configs and iterate for optimal params for libp2p
  • This benchmark will change the configs in a separate PR

Separate validRoundChange to validRoundChange and justification validation

When uponRoundChange is called we should check if the msg is valid and also the justification is.
When round changes are checked in isProposalJustification the justifications are not checked (as part of proposal check)

we should separate the 2 checks so we can add round change justifications as part of the new SignedMessageHeader SIP
https://github.com/bloxapp/ssv-experiments/blob/master/ssz_encoding/qbft/messages.go#L82-L89

SSV TestSpecs

NEW

  • - Runner tests
    • - duties
      • attester
      • proposer
      • aggregator
      • sync committee
      • sync committee aggregator
      • pre consensus justifications
    • pre consensus
    • post consensus
    • consensus
      -[ ] Value Check
      -[X] attestation
      -[ ] aggregation
      -[ ] proposer
      -[ ] sync committee
      -[ ] sync committee aggregator
  • Messages - cancelled as moved to new ssz struct and to types
  • [ ]dutyexe
    • wrong duty role
  • messages - move relevant tests to types (as we moved partial sig structs to types)
  • Validator
    • process msg func tests
  • partial sig container
  • Types
    • shares
  • #36
  • #40
  • #65
  • #61
  • #59

refactor decided handling

Currently decided is handled by the instance which doesn't enable accepting higher height decided msgs.

  • Move decided handling to controller
  • enable decided from >= current instance
  • If deciding higher decided should we sync the rest of the instances?

P2P hardening

Harden the node against malicious P2P activity (remember an attacker can also register his own validator with 3 malicious nodes and 1 honest node to attack)

  • DDOS protection
  • RPC sync rate limit
  • Decided f+1 sync trigger (attacker sending multiple f+1 msgs with higher height)
  • DKG requests rate limit
  • voluntary exit rate limit

Types Spec tests

  • beacon network tests
  • consensus data (all in implement mode)
  • crypto full spec tests for all functions
  • encryption full spec tests for all functions
  • eth1 deposit full spec tests for all function
  • message id functions spec tests
  • SSVMessage encoding decoding spec tests
  • partial sig msg encoding/ decoding spec tests
  • partial sig msg get root spec tests
  • partial sig msg validation func spec tests
  • share encoding/ decoding spec tests
  • share quorum functions spec tests
  • ssz full spec tests for all structs

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.