Skip to content

Commit

Permalink
Re-organize thet content of the *.proto files.
Browse files Browse the repository at this point in the history
The content of the `*.proto` files is sorted by hard fork,
then with a top-down fashion.

Sorting first by hard fork lets the reader to easily see new or modified fields.
Then, sorting with a top-down fashion lets the user to first see the big picture,
then to dive into details.

Also, the `new in <hard fork>` mentions are only written for the given hard fork.
Thus, it'll avoid in the future the majority of the fields, not initially
present in phase 0, to have the `new in <hard fork> mention`.

This commit does not bring any new functional change.
  • Loading branch information
nalepae committed Dec 28, 2024
1 parent 9e7c1d6 commit c89ac31
Show file tree
Hide file tree
Showing 20 changed files with 8,316 additions and 8,238 deletions.
566 changes: 283 additions & 283 deletions proto/prysm/v1alpha1/altair.ssz.go

Large diffs are not rendered by default.

634 changes: 317 additions & 317 deletions proto/prysm/v1alpha1/attestation.pb.go

Large diffs are not rendered by default.

106 changes: 57 additions & 49 deletions proto/prysm/v1alpha1/attestation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,16 @@ option java_outer_classname = "AttestationProto";
option java_package = "org.ethereum.eth.v1alpha1";
option php_namespace = "Ethereum\\Eth\\v1alpha1";

message Attestation {
// A bitfield representation of validator indices that have voted exactly
// the same vote and have been aggregated into this attestation.
bytes aggregation_bits = 1 [(ethereum.eth.ext.ssz_max) = "2048", (ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/go-bitfield.Bitlist"];
// ----------------------------------------------------------------------------
// Phase0, Bellatrix, Capella & Deneb
// ----------------------------------------------------------------------------

AttestationData data = 2;

// 96 byte BLS aggregate signature.
bytes signature = 3 [(ethereum.eth.ext.ssz_size) = "96"];
}

message AttestationElectra {
// A bitfield representation of validator indices that have voted exactly
// the same vote and have been aggregated into this attestation.
bytes aggregation_bits = 1 [(ethereum.eth.ext.ssz_max) = "max_attesting_indices.size", (ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/go-bitfield.Bitlist"];

AttestationData data = 2;

// 96 byte BLS aggregate signature.
bytes signature = 3 [(ethereum.eth.ext.ssz_size) = "96"];

// Represents the committee which aggregated attestation belong.
bytes committee_bits = 4 [(ethereum.eth.ext.ssz_size) = "committee_bits.size", (ethereum.eth.ext.cast_type) = "committee_bits.type"];
}
message SignedAggregateAttestationAndProof {
// The aggregated attestation and selection proof itself.
AggregateAttestationAndProof message = 1;

message SingleAttestation {
uint64 committee_id = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.CommitteeIndex"];
uint64 attester_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"];
AttestationData data = 3;
bytes signature = 4 [(ethereum.eth.ext.ssz_size) = "96"];
// 96 byte BLS aggregate signature signed by the aggregator over the message.
bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"];
}

message AggregateAttestationAndProof {
Expand All @@ -67,31 +47,22 @@ message AggregateAttestationAndProof {
bytes selection_proof = 2 [(ethereum.eth.ext.ssz_size) = "96"];
}

message AggregateAttestationAndProofElectra {
// The aggregator index that submitted this aggregated attestation and proof.
uint64 aggregator_index = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"];

// The aggregated attestation that was submitted.
AttestationElectra aggregate = 3;

// 96 byte selection proof signed by the aggregator, which is the signature of the slot to aggregate.
bytes selection_proof = 2 [(ethereum.eth.ext.ssz_size) = "96"];
}
message Attestation {
// A bitfield representation of validator indices that have voted exactly
// the same vote and have been aggregated into this attestation.
bytes aggregation_bits = 1 [(ethereum.eth.ext.ssz_max) = "2048", (ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/go-bitfield.Bitlist"];

message SignedAggregateAttestationAndProof {
// The aggregated attestation and selection proof itself.
AggregateAttestationAndProof message = 1;
AttestationData data = 2;

// 96 byte BLS aggregate signature signed by the aggregator over the message.
bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"];
// 96 byte BLS aggregate signature.
bytes signature = 3 [(ethereum.eth.ext.ssz_size) = "96"];
}

message SignedAggregateAttestationAndProofElectra {
// The aggregated attestation and selection proof itself.
AggregateAttestationAndProofElectra message = 1;

// 96 byte BLS aggregate signature signed by the aggregator over the message.
bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"];
message SingleAttestation {
uint64 committee_id = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.CommitteeIndex"];
uint64 attester_index = 2 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"];
AttestationData data = 3;
bytes signature = 4 [(ethereum.eth.ext.ssz_size) = "96"];
}

message AttestationData {
Expand Down Expand Up @@ -124,3 +95,40 @@ message Checkpoint {
// Block root of the checkpoint references.
bytes root = 2 [(ethereum.eth.ext.ssz_size) = "32"];
}

// ----------------------------------------------------------------------------
// Electra
// ----------------------------------------------------------------------------

message SignedAggregateAttestationAndProofElectra {
// The aggregated attestation and selection proof itself.
AggregateAttestationAndProofElectra message = 1;

// 96 byte BLS aggregate signature signed by the aggregator over the message.
bytes signature = 2 [(ethereum.eth.ext.ssz_size) = "96"];
}

message AggregateAttestationAndProofElectra {
// The aggregator index that submitted this aggregated attestation and proof.
uint64 aggregator_index = 1 [(ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/prysm/v5/consensus-types/primitives.ValidatorIndex"];

// The aggregated attestation that was submitted.
AttestationElectra aggregate = 3;

// 96 byte selection proof signed by the aggregator, which is the signature of the slot to aggregate.
bytes selection_proof = 2 [(ethereum.eth.ext.ssz_size) = "96"];
}

message AttestationElectra {
// A bitfield representation of validator indices that have voted exactly
// the same vote and have been aggregated into this attestation.
bytes aggregation_bits = 1 [(ethereum.eth.ext.ssz_max) = "max_attesting_indices.size", (ethereum.eth.ext.cast_type) = "github.com/prysmaticlabs/go-bitfield.Bitlist"];

AttestationData data = 2;

// 96 byte BLS aggregate signature.
bytes signature = 3 [(ethereum.eth.ext.ssz_size) = "96"];

// Represents the committee which aggregated attestation belong.
bytes committee_bits = 4 [(ethereum.eth.ext.ssz_size) = "committee_bits.size", (ethereum.eth.ext.cast_type) = "committee_bits.type"];
}
Loading

0 comments on commit c89ac31

Please sign in to comment.