Skip to content

Commit

Permalink
fix: select correct gossip type when publishing single attestation (#…
Browse files Browse the repository at this point in the history
…7256)

* fix: select correct gossip type when publishing single attestation

* Add SingleAttestation as alias to phase0 ssz types
  • Loading branch information
nflaig committed Nov 29, 2024
1 parent 1a74884 commit 4501e08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/beacon-node/src/network/gossip/topic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export function getGossipSSZType(topic: GossipTopic) {
case GossipType.beacon_aggregate_and_proof:
return sszTypesFor(topic.fork).SignedAggregateAndProof;
case GossipType.beacon_attestation:
return sszTypesFor(topic.fork).Attestation;
return sszTypesFor(topic.fork).SingleAttestation;
case GossipType.proposer_slashing:
return ssz.phase0.ProposerSlashing;
case GossipType.attester_slashing:
Expand Down
2 changes: 2 additions & 0 deletions packages/types/src/phase0/sszTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ export const Attestation = new ContainerType(
{typeName: "Attestation", jsonCase: "eth2"}
);

export const SingleAttestation = Attestation;

export const AttesterSlashing = new ContainerType(
{
// In state transition, AttesterSlashing attestations are only partially validated. Their slot and epoch could
Expand Down

0 comments on commit 4501e08

Please sign in to comment.