-
Notifications
You must be signed in to change notification settings - Fork 905
Single attestation "Full" implementation #7444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Single attestation "Full" implementation #7444
Conversation
Some required checks have failed. Could you please take a look @eserilev? 🙏 |
…ngle-attestation-full-implementation
All required checks have passed and there are no merge conflicts. This pull request may now be ready for another review. |
Some required checks have failed. Could you please take a look @eserilev? 🙏 |
This pull request has merge conflicts. Could you please resolve them @eserilev? 🙏 |
Some required checks have failed. Could you please take a look @eserilev? 🙏 |
) | ||
.inspect_unaggregate_err( | ||
"attestation with two aggregation bits set", | ||
|tester, mut a, _| { | ||
match &mut a { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a valid test case for SingleAttestation
* The number of aggregation bits matches the committee size -- i.e. | ||
* `len(attestation.aggregation_bits) == len(get_beacon_committee(state, data.slot, | ||
* data.index))`. | ||
*/ | ||
.inspect_unaggregate_err( | ||
"attestation with invalid bitfield", | ||
|_, mut a, _| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a valid test case for SingleAttestation
We now move checks that require access to the shuffling to AFTER signature verification. This seems in line with the spirit of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, keen to roll this out on some testnets and see how it does!
Squashed commit of the following: commit b413e3f Author: Michael Sproul <michael@sigmaprime.io> Date: Mon Jun 16 14:50:57 2025 +1000 Completely remove NotExactlyOneAggregationBitSet commit 2f1dcb2 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 17:09:26 2025 +0300 fix test commit a22e95e Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 15:41:41 2025 +0300 fix test commit e0d2d6c Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 15:21:40 2025 +0300 fix test commit c2b144c Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 15:01:50 2025 +0300 fix test commit b7f037b Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 14:33:23 2025 +0300 move some checks around commit ec45999 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 13:19:02 2025 +0300 chec attester is member of the committee commit 40a1f5c Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 12:51:32 2025 +0300 fix import commit 0869f2b Merge: 1f78f3f 170cd0f Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 12:46:35 2025 +0300 Merge branch 'unstable' of https://github.com/sigp/lighthouse into single-attestation-full-implementation commit 1f78f3f Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Wed Jun 4 07:25:39 2025 -0700 smol cleanup commit f3439d7 Merge: bdd134d ae30480 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon Jun 2 14:07:47 2025 -0700 merge conflicts commit bdd134d Merge: 07e5f75 50dbfdf Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 19 12:55:25 2025 -0700 resolve merge conflicts commit 07e5f75 Merge: f437dd5 23ad833 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sat May 17 09:24:34 2025 -0700 Merge branch 'unstable' into single-attestation-full-implementation commit f437dd5 Merge: 60bdb4c 1d27855 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Fri May 16 07:08:49 2025 -0700 Merge conflicts commit 60bdb4c Merge: 4b8a0fb c4182e3 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Thu May 15 17:17:56 2025 -0700 Merge branch 'unstable' of https://github.com/sigp/lighthouse into single-attestation-full-implementation commit 4b8a0fb Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Thu May 15 17:17:40 2025 -0700 Test cases commit 3e8a00c Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Wed May 14 17:48:15 2025 -0700 lint commit e5a7d6c Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Wed May 14 17:34:45 2025 -0700 fix tests commit 4a7a1e7 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Wed May 14 11:33:31 2025 -0700 single attn fix commit 0e8fc9c Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 22:45:19 2025 -0700 update commit f4b591b Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 22:44:39 2025 -0700 update commit a0eb866 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 17:53:38 2025 -0700 fix test commit 032aae8 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 17:19:25 2025 -0700 fix test commit 90e2078 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 17:13:07 2025 -0700 get tests to compile commit 121ce59 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 11:49:43 2025 -0700 fix check commit 84f5035 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 11:46:27 2025 -0700 fmt commit a307b79 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 11:38:42 2025 -0700 Full implementation of single attestation flow
Squashed commit of the following: commit b413e3f Author: Michael Sproul <michael@sigmaprime.io> Date: Mon Jun 16 14:50:57 2025 +1000 Completely remove NotExactlyOneAggregationBitSet commit 2f1dcb2 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 17:09:26 2025 +0300 fix test commit a22e95e Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 15:41:41 2025 +0300 fix test commit e0d2d6c Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 15:21:40 2025 +0300 fix test commit c2b144c Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 15:01:50 2025 +0300 fix test commit b7f037b Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 14:33:23 2025 +0300 move some checks around commit ec45999 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 13:19:02 2025 +0300 chec attester is member of the committee commit 40a1f5c Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 12:51:32 2025 +0300 fix import commit 0869f2b Merge: 1f78f3f 170cd0f Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 12:46:35 2025 +0300 Merge branch 'unstable' of https://github.com/sigp/lighthouse into single-attestation-full-implementation commit 1f78f3f Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Wed Jun 4 07:25:39 2025 -0700 smol cleanup commit f3439d7 Merge: bdd134d ae30480 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon Jun 2 14:07:47 2025 -0700 merge conflicts commit bdd134d Merge: 07e5f75 50dbfdf Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 19 12:55:25 2025 -0700 resolve merge conflicts commit 07e5f75 Merge: f437dd5 23ad833 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sat May 17 09:24:34 2025 -0700 Merge branch 'unstable' into single-attestation-full-implementation commit f437dd5 Merge: 60bdb4c 1d27855 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Fri May 16 07:08:49 2025 -0700 Merge conflicts commit 60bdb4c Merge: 4b8a0fb c4182e3 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Thu May 15 17:17:56 2025 -0700 Merge branch 'unstable' of https://github.com/sigp/lighthouse into single-attestation-full-implementation commit 4b8a0fb Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Thu May 15 17:17:40 2025 -0700 Test cases commit 3e8a00c Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Wed May 14 17:48:15 2025 -0700 lint commit e5a7d6c Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Wed May 14 17:34:45 2025 -0700 fix tests commit 4a7a1e7 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Wed May 14 11:33:31 2025 -0700 single attn fix commit 0e8fc9c Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 22:45:19 2025 -0700 update commit f4b591b Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 22:44:39 2025 -0700 update commit a0eb866 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 17:53:38 2025 -0700 fix test commit 032aae8 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 17:19:25 2025 -0700 fix test commit 90e2078 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 17:13:07 2025 -0700 get tests to compile commit 121ce59 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 11:49:43 2025 -0700 fix check commit 84f5035 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 11:46:27 2025 -0700 fmt commit a307b79 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 11:38:42 2025 -0700 Full implementation of single attestation flow
…ub.com/eserilev/lighthouse into single-attestation-full-implementation
Squashed commit of the following: commit b413e3f Author: Michael Sproul <michael@sigmaprime.io> Date: Mon Jun 16 14:50:57 2025 +1000 Completely remove NotExactlyOneAggregationBitSet commit 2f1dcb2 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 17:09:26 2025 +0300 fix test commit a22e95e Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 15:41:41 2025 +0300 fix test commit e0d2d6c Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 15:21:40 2025 +0300 fix test commit c2b144c Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 15:01:50 2025 +0300 fix test commit b7f037b Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 14:33:23 2025 +0300 move some checks around commit ec45999 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 13:19:02 2025 +0300 chec attester is member of the committee commit 40a1f5c Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 12:51:32 2025 +0300 fix import commit 0869f2b Merge: 1f78f3f 170cd0f Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sun Jun 8 12:46:35 2025 +0300 Merge branch 'unstable' of https://github.com/sigp/lighthouse into single-attestation-full-implementation commit 1f78f3f Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Wed Jun 4 07:25:39 2025 -0700 smol cleanup commit f3439d7 Merge: bdd134d ae30480 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon Jun 2 14:07:47 2025 -0700 merge conflicts commit bdd134d Merge: 07e5f75 50dbfdf Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 19 12:55:25 2025 -0700 resolve merge conflicts commit 07e5f75 Merge: f437dd5 23ad833 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Sat May 17 09:24:34 2025 -0700 Merge branch 'unstable' into single-attestation-full-implementation commit f437dd5 Merge: 60bdb4c 1d27855 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Fri May 16 07:08:49 2025 -0700 Merge conflicts commit 60bdb4c Merge: 4b8a0fb c4182e3 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Thu May 15 17:17:56 2025 -0700 Merge branch 'unstable' of https://github.com/sigp/lighthouse into single-attestation-full-implementation commit 4b8a0fb Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Thu May 15 17:17:40 2025 -0700 Test cases commit 3e8a00c Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Wed May 14 17:48:15 2025 -0700 lint commit e5a7d6c Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Wed May 14 17:34:45 2025 -0700 fix tests commit 4a7a1e7 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Wed May 14 11:33:31 2025 -0700 single attn fix commit 0e8fc9c Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 22:45:19 2025 -0700 update commit f4b591b Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 22:44:39 2025 -0700 update commit a0eb866 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 17:53:38 2025 -0700 fix test commit 032aae8 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 17:19:25 2025 -0700 fix test commit 90e2078 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 17:13:07 2025 -0700 get tests to compile commit 121ce59 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 11:49:43 2025 -0700 fix check commit 84f5035 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 11:46:27 2025 -0700 fmt commit a307b79 Author: Eitan Seri-Levi <eserilev@ucsc.edu> Date: Mon May 12 11:38:42 2025 -0700 Full implementation of single attestation flow
**Motivation** [Sim tests are failing](https://github.com/ChainSafe/lodestar/actions/runs/15706086864/job/44325974978) likely due to sigp/lighthouse#7444. It might be that Lighthouse drops support for pre-electra altogether so we need to see how to make that work with our multi fork sim tests. **Description** Run against stable lighthouse release in sim tests
) **Motivation** [Sim tests are failing](https://github.com/ChainSafe/lodestar/actions/runs/15706086864/job/44325974978) likely due to sigp/lighthouse#7444. It might be that Lighthouse drops support for pre-electra altogether so we need to see how to make that work with our multi fork sim tests. **Description** Run against stable lighthouse release in sim tests
Issue Addressed
#6970
Proposed Changes
This allows for us to receive
SingleAttestation
over gossip and process it without converting. There is still a conversion toAttestation
as a final step in the attestation verification process, but by then theSingleAttestation
is fully verified.I've also fully removed the
submitPoolAttestationsV1
endpoint as its been deprecatedI've also pre-emptively deprecated supporting
Attestation
insubmitPoolAttestationsV2
endpoint. See here for more info: ethereum/beacon-APIs#531I tried to the minimize the diff here by only making the "required" changes. There are some unnecessary complexities with the way we manage the different attestation verification wrapper types. We could probably consolidate this to one wrapper type and refactor this even further. We could leave that to a separate PR if we feel like cleaning things up in the future.
Note that I've also updated the test harness to always submit
SingleAttestation
regardless of fork variant. I don't see a problem in that approach and it allows us to delete more code :)