Skip to content

Commit

Permalink
Add subcommittee_index_v2
Browse files Browse the repository at this point in the history
  • Loading branch information
samcm committed Aug 21, 2023
1 parent 8c2b5e6 commit 4b2cda2
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 40 deletions.
81 changes: 50 additions & 31 deletions pkg/proto/eth/v1/sync_committee.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions pkg/proto/eth/v1/sync_committee.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ import "google/protobuf/descriptor.proto";
import "google/protobuf/wrappers.proto";

message SyncCommitteeContribution {
uint64 slot = 1;
uint64 slot = 1 [deprecated=true];

uint64 subcommittee_index = 2 [ json_name = "subcommittee_index" ];
uint64 subcommittee_index = 2 [ json_name = "subcommittee_index", deprecated=true ];

string aggregation_bits = 3 [ json_name = "aggregation_bits" ];

string signature = 4;

string beacon_block_root = 5 [ json_name = "beacon_block_root" ];

google.protobuf.UInt64Value slot_v2 = 6;
google.protobuf.UInt64Value slot_v2 = 6 [ json_name = "slot_v2" ];

google.protobuf.UInt64Value subcommittee_index_v2 = 7 [ json_name = "subcommittee_index_v2" ];
}
13 changes: 7 additions & 6 deletions pkg/sentry/event/beacon/eth/v1/events_contribution_and_proof.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@ func (e *EventsContributionAndProof) Decorate(ctx context.Context) (*xatu.Decora
AggregatorIndexV2: &wrapperspb.UInt64Value{Value: uint64(e.event.Message.AggregatorIndex)},
SelectionProof: xatuethv1.TrimmedString(xatuethv1.BLSSignatureToString(&e.event.Message.SelectionProof)),
Contribution: &xatuethv1.SyncCommitteeContribution{
Slot: uint64(e.event.Message.Contribution.Slot),
SlotV2: &wrapperspb.UInt64Value{Value: uint64(e.event.Message.Contribution.Slot)},
SubcommitteeIndex: e.event.Message.Contribution.SubcommitteeIndex,
AggregationBits: xatuethv1.BytesToString(e.event.Message.Contribution.AggregationBits.Bytes()),
Signature: xatuethv1.TrimmedString(xatuethv1.BLSSignatureToString(&e.event.Message.Contribution.Signature)),
BeaconBlockRoot: xatuethv1.RootAsString(e.event.Message.Contribution.BeaconBlockRoot),
Slot: uint64(e.event.Message.Contribution.Slot),
SlotV2: &wrapperspb.UInt64Value{Value: uint64(e.event.Message.Contribution.Slot)},
SubcommitteeIndex: e.event.Message.Contribution.SubcommitteeIndex,
SubcommitteeIndexV2: &wrapperspb.UInt64Value{Value: e.event.Message.Contribution.SubcommitteeIndex},
AggregationBits: xatuethv1.BytesToString(e.event.Message.Contribution.AggregationBits.Bytes()),
Signature: xatuethv1.TrimmedString(xatuethv1.BLSSignatureToString(&e.event.Message.Contribution.Signature)),
BeaconBlockRoot: xatuethv1.RootAsString(e.event.Message.Contribution.BeaconBlockRoot),
},
},
},
Expand Down

0 comments on commit 4b2cda2

Please sign in to comment.