Put validator balances into a separate list in the state#317
Conversation
|
One aesthetic change I think we should consider is switching the |
djrtwo
left a comment
There was a problem hiding this comment.
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 <v@buterin.com>
Co-Authored-By: vbuterin <v@buterin.com>
|
I updated |
djrtwo
left a comment
There was a problem hiding this comment.
A few small bugs that you can fix with a click.
Other than that, approved!
Co-Authored-By: vbuterin <v@buterin.com>
Co-Authored-By: vbuterin <v@buterin.com>
Co-Authored-By: vbuterin <v@buterin.com>
No description provided.