Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

TotalWeight may exceed MAX_UINT64 in mainchain registration command verification #8782

Closed
Tracked by #7226
shuse2 opened this issue Jul 31, 2023 · 0 comments
Closed
Tracked by #7226
Assignees
Milestone

Comments

@shuse2
Copy link
Collaborator

shuse2 commented Jul 31, 2023

Expected behavior

The MAX_UINT64 check should be performed on the result of the addition

Actual behavior

The verify method of the MainchainRegistrationCommand class iterates through the provided list of mainchain validators, summing their BFT weights into the totalWeight variable. If totalWeight exceeds the MAX_UINT64 constant, the loop terminates, and the method returns an error

Steps to reproduce

Link to code

Which version(s) does this affect? (Environment, OS, etc...)

6.0.0-beta.3

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

No branches or pull requests

3 participants