Skip to content

Conversation

@nicholaspai
Copy link
Member

Max leaf count can only be uint8 to be consistent with size of RootBundle.claimedBitMap and is the same size passed into proposeRootBundle, so this is likely just fixing a mistake.

// Number of pool rebalance leaves to execute in the poolRebalanceRoot. After this number
// of leaves are executed, a new root bundle can be proposed
uint64 unclaimedPoolRebalanceLeafCount;
uint8 unclaimedPoolRebalanceLeafCount;
Copy link
Member Author

Choose a reason for hiding this comment

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

reordered for style from small to big

Copy link
Member

@chrismaree chrismaree left a comment

Choose a reason for hiding this comment

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

o damn. good catch.

Copy link
Contributor

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

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

Looks good!

uint64 unclaimedPoolRebalanceLeafCount;
uint8 unclaimedPoolRebalanceLeafCount;
// When root bundle challenge period passes and this root bundle becomes executable.
uint64 requestExpirationTimestamp;
Copy link
Contributor

Choose a reason for hiding this comment

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

If we change this to a uint32 (which is safe until the year 2106), we should be able to group these variables with proposer and proposerBondRepaid, saving us a storage slot.

Copy link
Member Author

Choose a reason for hiding this comment

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

sure

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed to uint32 and copied and pasted these two vars below proposerBondRepaid. Is that what you had in mind?

@nicholaspai nicholaspai requested a review from mrice32 March 3, 2022 18:28
Copy link
Contributor

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

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

LGTM!

@nicholaspai nicholaspai merged commit 7e62400 into master Mar 3, 2022
@nicholaspai nicholaspai deleted the npai/change-type branch March 3, 2022 21:29
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.

4 participants