-
Notifications
You must be signed in to change notification settings - Fork 996
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
Put validator balances into a separate list in the state #317
Conversation
One aesthetic change I think we should consider is switching the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be worth introducing two functions increase_balance(state, validator_index, amount)
and decrease_balance(state, validator_index, amount)
to mask the changes in validator balance so much of the code doesn't have to think about dealing with validator_balances
separate from `validator_registry.
@vbuterin I'm going to clean up per my recommendations and see if we like it. |
Faster editing that way; otherwise every block will require completely reconstructing a 8192-sized Merkle tree.
Edit latest_block_roots in place instead of as a queue
Co-Authored-By: vbuterin <[email protected]>
Co-Authored-By: vbuterin <[email protected]>
I updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few small bugs that you can fix with a click.
Other than that, approved!
Co-Authored-By: vbuterin <[email protected]>
Co-Authored-By: vbuterin <[email protected]>
Co-Authored-By: vbuterin <[email protected]>
No description provided.