Skip to content

fix ssvmsg MessageIDs to map to a different role #560

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Zacholme7
Copy link

@Zacholme7 Zacholme7 commented Jul 2, 2025

for test1 and test2 the role is either invalid, or maps to committee.

We differentiate between a committee and validator duty executor and enforce that you can only access the public key through the duty executor if the role is not committee. This pr modifies the message ids so that they map to a different role.

Please let me know if we are too strict here. Thanks!

Copy link
Contributor

@GalRogozinski GalRogozinski left a comment

Choose a reason for hiding this comment

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

Hey!

Thanks for contributing!
As you may have guessed from folder name the jsons are generated.
Can you please:

  1. revert
  2. change types/spectest/tests/ssvmsg/msg_id_belongs.go
  3. change msg_id_doesnt_belong.go
  4. make generate-jsons (there's also a way to not run it for the whole project, but always safer to do it this way)

Comment on lines +13 to +14
types.NewMsgID(testingutils.TestingSSVDomainType, testingutils.TestingWrongValidatorPubKey[:], types.RoleAggregator),
types.NewMsgID(testingutils.TestingSSVDomainType, testingutils.TestingWrongValidatorPubKey[:], types.RoleAggregator),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
types.NewMsgID(testingutils.TestingSSVDomainType, testingutils.TestingWrongValidatorPubKey[:], types.RoleAggregator),
types.NewMsgID(testingutils.TestingSSVDomainType, testingutils.TestingWrongValidatorPubKey[:], types.RoleAggregator),
types.NewMsgID(testingutils.TestingSSVDomainType, testingutils.TestingWrongValidatorPubKey[:], types.RoleAggregator),

Copy link
Contributor

Choose a reason for hiding this comment

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

Now the two messageIDs are duplicated, you can delete one. Same for below and the other test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants