Skip to content

Commit 0ec5838

Browse files
authored
fix: Decode correct type for sync committee contributions in QBFT check (#517)
Incorrectly, we try to decode the proposed data on role `BEACON_ROLE_SYNC_COMMITTEE_CONTRIBUTION` to `SyncCommitteeContribution`. Decode to `Contributions` instead, matching the decoding of the completed value: https://github.com/sigp/anchor/blob/94aacac9d4d26877c3b9ee4a4417ccf36e0bfb51/anchor/validator_store/src/lib.rs#L1484
1 parent a47e648 commit 0ec5838

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

anchor/common/ssv_types/src/consensus.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ impl<E: EthSpec> ValidatorConsensusDataValidator<E> {
293293
BEACON_ROLE_SYNC_COMMITTEE_CONTRIBUTION => {
294294
// There is nothing special to check for sync committee contributions.
295295
// We just need to ensure that the data is valid.
296-
SyncCommitteeContribution::<E>::from_ssz_bytes(value.data_ssz.as_slice())?;
296+
Contributions::<E>::from_ssz_bytes(value.data_ssz.as_slice())?;
297297
}
298298
other => return Err(DataValidationError::InvalidDutyType(other)),
299299
};

0 commit comments

Comments
 (0)