Skip to content
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

fixing electra committee logs #14992

Merged
merged 4 commits into from
Mar 3, 2025
Merged

Conversation

james-prysm
Copy link
Contributor

@james-prysm james-prysm commented Feb 26, 2025

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?

Electra attestation logs have been printing out incorrect indicies
image

this pr solves the issue by correctly using the committee bits to get the committee index for electra attestation logs

Which issues(s) does this PR fix?

Fixes #

Other notes for review

Acknowledgements

@james-prysm james-prysm added Bug Something isn't working UX cosmetic / user experience related Electra electra hardfork labels Feb 26, 2025
@james-prysm james-prysm requested a review from a team as a code owner February 26, 2025 20:42
logTest "github.com/sirupsen/logrus/hooks/test"
)

func TestLogSubmittedAtts(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we have one more testcase here where we'll have more than one committee index as part of committeeIndices array log?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't propose an attestation or aggregate with multiple committee bits because the proposing validator is assigned to only one committee.

Comment on lines 35 to 36
att.CommitteeBits[0] = 44
att.CommitteeBits[1] = 73
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not how you set bits on a bitlist. This way you are modifying a whole byte at once. You should use the SetBitAt method. That way you can control exactly which bit is set.

logTest "github.com/sirupsen/logrus/hooks/test"
)

func TestLogSubmittedAtts(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't propose an attestation or aggregate with multiple committee bits because the proposing validator is assigned to only one committee.

@james-prysm james-prysm added this pull request to the merge queue Mar 3, 2025
Merged via the queue into develop with commit c6344e7 Mar 3, 2025
16 checks passed
@james-prysm james-prysm deleted the fix-electra-committee-log branch March 3, 2025 16:02
rkapka pushed a commit that referenced this pull request Mar 19, 2025
* fixing logs

* fixing tests

* addressing feedback

* fixing tests based on feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Electra electra hardfork UX cosmetic / user experience related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants