SingleAttestation implementation#6488
Conversation
|
I've ran some kurtosis tests interoping against prysm and we are attesting correctly EDIT: we are NOT interoping correctly at the moment. I am working on debugging the issue |
ba06501 to
366bed3
Compare
consensus/types/src/attestation.rs
Outdated
| }; | ||
|
|
||
| if committee.index != self.committee_index as u64 { | ||
| return Err(Error::InvalidCommittee); |
There was a problem hiding this comment.
| return Err(Error::InvalidCommittee); | |
| return Err(Error::UnexpectedCommittee(committee.index, self.committee_index)); |
There was a problem hiding this comment.
I've updated the args for this method. Instead of passing in the full BeaconCommittee obj, I'm passing in the committee slice. Upstream from this method call I make a check for the existence of the specific committee for the slot and committee_index and return either a Error::NoCommitteeForSlotAndIndex or log a warn message if the committee isn't found
michaelsproul
left a comment
There was a problem hiding this comment.
Approved modulo Lion's small tweaks
| .send(kind) | ||
| .map(|count| log_count("attestation", count)), | ||
| EventKind::SingleAttestation(_) => self | ||
| .attestation_tx |
There was a problem hiding this comment.
This is not correct I believe. There's a new event name single_attestation, so you should have a new (tx,rx) and broadcast there. https://github.com/ethereum/beacon-APIs/blob/aa1be259e2d8a64f451dd304913e0310779f6f80/apis/eventstream/index.yaml#L70
There was a problem hiding this comment.
Yeah otherwise calls into the event stream with error with unknown topic
There was a problem hiding this comment.
I believe the attestation_tx is just for SSE which is for our own internal infra? We still emit a SingleAttestation event with the new single_attestation topic name, which I think is spec compliant. I could be wrong though
There was a problem hiding this comment.
ok maybe I am wrong, ill double check, thanks
There was a problem hiding this comment.
lighthouse/common/eth2/src/types.rs
Line 1267 in 0d90135
|
Looks like one of the SSE tests is failing ( |
|
I believe i've fixed the test failure but I think I need to add some test coverage for the new single_attestation event topic |
|
i've added test coverage for the new |
| let current_fork = self | ||
| .spec | ||
| .fork_name_at_slot::<T::EthSpec>(v.attestation().data().slot); | ||
| if current_fork.electra_enabled() { |
There was a problem hiding this comment.
Is it necessary to check the fork now? Can we have single attestations before electra?
|
@mergify queue |
✅ The pull request has been merged automaticallyDetailsThe pull request has been merged automatically at 06329ec |

Issue Addressed
Closes #6380
Proposed Changes
Spec: ethereum/consensus-specs#3900
Convert single attestation as early as possible to reduce code diff
Conga-lined off:
v1.5.0-beta.0#6731