Skip to content

Conversation

eserilev
Copy link
Member

Issue Addressed

#6970

Proposed Changes

This allows for us to receive SingleAttestation over gossip and process it without converting. There is still a conversion to Attestation as a final step in the attestation verification process, but by then the SingleAttestation is fully verified.

I've also fully removed the submitPoolAttestationsV1 endpoint as its been deprecated

I've also pre-emptively deprecated supporting Attestation in submitPoolAttestationsV2 endpoint. See here for more info: ethereum/beacon-APIs#531

I 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 :)

@eserilev eserilev requested a review from jxs as a code owner May 12, 2025 18:45
@eserilev eserilev added backwards-incompat Backwards-incompatible API change electra Required for the Electra/Prague fork optimization Something to make Lighthouse run more efficiently. v7.1.0 Post-Electra release labels May 12, 2025
Copy link

mergify bot commented May 15, 2025

Some required checks have failed. Could you please take a look @eserilev? 🙏

@mergify mergify bot added the waiting-on-author The reviewer has suggested changes and awaits thier implementation. label May 15, 2025
Copy link

mergify bot commented May 16, 2025

All required checks have passed and there are no merge conflicts. This pull request may now be ready for another review.

@mergify mergify bot added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels May 16, 2025
Copy link

mergify bot commented May 16, 2025

Some required checks have failed. Could you please take a look @eserilev? 🙏

@mergify mergify bot added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels May 16, 2025
Copy link

mergify bot commented May 16, 2025

This pull request has merge conflicts. Could you please resolve them @eserilev? 🙏

Copy link

mergify bot commented May 16, 2025

Some required checks have failed. Could you please take a look @eserilev? 🙏

Comment on lines -1059 to -1063
)
.inspect_unaggregate_err(
"attestation with two aggregation bits set",
|tester, mut a, _| {
match &mut a {
Copy link
Member Author

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

Comment on lines -1086 to -1092
* 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, _| {
Copy link
Member Author

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

@eserilev
Copy link
Member Author

eserilev commented Jun 8, 2025

We now move checks that require access to the shuffling to AFTER signature verification. This seems in line with the spirit of the SingleAttestation changes

ethereum/consensus-specs#3900

@eserilev eserilev added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Jun 8, 2025
Copy link
Member

@michaelsproul michaelsproul left a 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!

@michaelsproul michaelsproul added under-review A reviewer has only partially completed a review. and removed ready-for-review The code is ready for review labels Jun 16, 2025
michaelsproul added a commit that referenced this pull request Jun 16, 2025
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
michaelsproul added a commit that referenced this pull request Jun 16, 2025
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
@michaelsproul michaelsproul mentioned this pull request Jun 16, 2025
@michaelsproul michaelsproul added ready-for-merge This PR is ready to merge. and removed under-review A reviewer has only partially completed a review. labels Jun 17, 2025
mergify bot added a commit that referenced this pull request Jun 17, 2025
@mergify mergify bot merged commit 6786b9d into sigp:unstable Jun 17, 2025
33 checks passed
eserilev pushed a commit to eserilev/lighthouse that referenced this pull request Jun 17, 2025
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
nflaig added a commit to ChainSafe/lodestar that referenced this pull request Jun 18, 2025
**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
KatyaRyazantseva pushed a commit to KatyaRyazantseva/lodestar that referenced this pull request Jun 19, 2025
)

**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
mergify bot pushed a commit that referenced this pull request Jul 10, 2025
Post-Pectra release for tree-states hot 🎉

Already merged to `release-v7.1.0`:

- #7444
- #6750
- #7437
- #7133
- #7620
- #7663
ethDreamer pushed a commit to ethDreamer/lighthouse that referenced this pull request Jul 28, 2025
Post-Pectra release for tree-states hot 🎉

Already merged to `release-v7.1.0`:

- sigp#7444
- sigp#6750
- sigp#7437
- sigp#7133
- sigp#7620
- sigp#7663
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backwards-incompat Backwards-incompatible API change electra Required for the Electra/Prague fork optimization Something to make Lighthouse run more efficiently. ready-for-merge This PR is ready to merge. v7.1.0 Post-Electra release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants