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

fix issue 256, 257 #300

Merged
merged 2 commits into from
Dec 1, 2021
Merged

fix issue 256, 257 #300

merged 2 commits into from
Dec 1, 2021

Conversation

webelf101
Copy link
Collaborator

No description provided.

Copy link
Contributor

@jtremback jtremback left a comment

Choose a reason for hiding this comment

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

The refactor to use the signature struct is good. We used parallel arrays when writing this because at the time thats all that solidity supported in our use case.

The other changes, which i have commented on, are a waste of gas. If you would like i can get on a call and explain the threat model and why these changes are not necessary. We could probably go even further and remove some existing requires. I'm happy to help guide that effort.

@@ -230,14 +228,12 @@ contract Gravity is ReentrancyGuard {
);

// Check that new validators and powers set is well-formed
require(_newValidators.length == _newPowers.length, "Malformed new validator set");
require(_newValidators.length == _newPowers.length || _newValidators.length == 0, "Malformed new validator set");
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 the first substantive change in this PR (other than the signature struct refactor). I guess it doesn't hurt but it's also not very useful. This entire require statement could probably go, and probably should. I just never got around to removing it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This update is related to the issue #257
Should I ignore this issue? @jtremback

solidity/contracts/Gravity.sol Show resolved Hide resolved
@zmanian zmanian merged commit b740d31 into main Dec 1, 2021
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