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

NodeID is not emitted in ValidatorManager Events #689

Open
0xJohnnyGault opened this issue Dec 20, 2024 · 0 comments
Open

NodeID is not emitted in ValidatorManager Events #689

0xJohnnyGault opened this issue Dec 20, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@0xJohnnyGault
Copy link

0xJohnnyGault commented Dec 20, 2024

In ValidatorManager.sol, NodeID is defined as bytes (a dynamically-sized type). I understand that this is probably done for future-proofing. However, when events are emitted like:

  event ValidationPeriodCreated(
    bytes32 indexed validationID,
    bytes indexed nodeID,
    bytes32 indexed registerValidationMessageID,
    uint256 weight,
    uint64 registrationExpiry
  );

Its misleading, because the actual NodeID is not emitted, as Solidity will keccak the bytes to get a 32-byte hash to put in the event. So at a minimum I would suggest renaming it to NodeIDHash which would make it clear its not the actual nodeid.

Alternatively, I think if indexed is removed, the full value would be placed in the event log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog 🗄️
Development

No branches or pull requests

1 participant