Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fork Wishlist #368

Open
GalRogozinski opened this issue Mar 20, 2024 · 5 comments
Open

Fork Wishlist #368

GalRogozinski opened this issue Mar 20, 2024 · 5 comments
Labels

Comments

@GalRogozinski
Copy link
Contributor

Description

This issue keeps track for changes devs and community would like to be seen included in a fork.

@olegshmuelov
Copy link
Contributor

olegshmuelov commented Mar 20, 2024

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:

  1. 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
    }
  1. Remove Version from ConsensusData: The Version field in the ConsensusData struct is only relevant for proposer duties. Therefore, I suggest removing it from the ConsensusData struct to streamline the data structure.
    We can pass the Version via DataSSZ

Edit:
Both Version and Duty fields can be omitted.
They can be retrieved without consensus data...

@GalRogozinski
Copy link
Contributor Author

#373

@GalRogozinski
Copy link
Contributor Author

Use SSZ encoding for SignedSSVMessage

@GalRogozinski
Copy link
Contributor Author

SignerID should be taken out of PartialSignatureMessage
MessageID should have the same field types for all runners

@GalRogozinski
Copy link
Contributor Author

Currently we send fullData in proposal justification (RC messages). This just takes up needless space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants