Comments (5)
Suggestion for ConsensusData
and Duty
Struct Changes
I'd like to suggest some changes to the ConsensusData
and Duty
structs to improve efficiency and reduce unnecessary data broadcast over the network.
Current ConsensusData
struct:
type ConsensusData struct {
Duty Duty
Version spec.DataVersion
PreConsensusJustifications []*SignedPartialSignatureMessage `ssz-max:"13"`
DataSSZ []byte `ssz-max:"4194304"`
}
Proposed Changes:
- Split Duty Struct into Specific Duty Types: The current
Duty
struct is a one-size-fits-all solution that includes fields irrelevant to specific duty types (attest, propose, sync committee contributions). I propose splitting this into separate structs for each duty type, which would allow us to only include relevant fields for each specific duty. This could lead to a reduction in unnecessary data being transmitted and processed.
- Example Proposed Structs:
- AttesterDuty
type AttesterDuty struct { PubKey phase0.BLSPubKey Slot phase0.Slot ValidatorIndex phase0.ValidatorIndex CommitteeIndex phase0.CommitteeIndex CommitteeLength uint64 CommitteesAtSlot uint64 ValidatorCommitteeIndex uint64 }
- ProposerDuty
type ProposerDuty struct { PubKey phase0.BLSPubKey Slot phase0.Slot ValidatorIndex phase0.ValidatorIndex }
- SyncCommitteeDuty
type SyncCommitteeDuty struct { PubKey phase0.BLSPubKey ValidatorIndex phase0.ValidatorIndex ValidatorSyncCommitteeIndices []phase0.CommitteeIndex }
- Remove Version from ConsensusData: The
Version
field in theConsensusData
struct is only relevant for proposer duties. Therefore, I suggest removing it from theConsensusData
struct to streamline the data structure.
We can pass theVersion
viaDataSSZ
Edit:
Both Version
and Duty
fields can be omitted.
They can be retrieved without consensus data...
from ssv-spec.
from ssv-spec.
Use SSZ encoding for SignedSSVMessage
from ssv-spec.
SignerID
should be taken out of PartialSignatureMessage
MessageID should have the same field types for all runners
from ssv-spec.
Currently we send fullData in proposal justification (RC messages). This just takes up needless space.
from ssv-spec.
Related Issues (20)
- Optimization Suggestion: Reduce Redundant Calls to SignedMessage.Validate in QBFT Message Processing
- `fullData` field should be forced to be empty for Prepare and Commit messages
- How to identify the offiline operators if 1/2 operators are malicious in a cluster HOT 6
- In consensus data encoding test check preconsensus justifications
- More post consensus tests
- How to identify the Operator Consensus Breakdown HOT 1
- In ControllerSpecTest, OutputMessages should be used
- Do Proposal's pre-consensus as soon as possible in the start of the spec
- Message Validation in Spec
- Distinguish between err message
- Tests Wishlist for committee based consensus HOT 4
- MatchedSigners() does a containment test the wrong way
- Remove `identifier` field from qbft message HOT 1
- MsgProcessingSpecTest should be truly end to end...
- `TestingVerifier()` causes data race in tests HOT 1
- We encode Operator and Share even though we don't pass them on the wire
- Take the OperatorID field out of partialSigMessage HOT 1
- RunnerRole can be compressed farther on wire HOT 1
- SignedSSVMessage isn't very readable and we invoke Decode too much. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ssv-spec.