Closed hwwhww closed 5 years ago
@djrtwo I updated the issue description. Could you take a look to confirm the abstract processes are correct? Thanks. :)
for attester:
for proposer:
Note! The computing and setting of state roots can be found here in testing setup for reference. https://github.com/ethereum/beacon_chain/blob/master/tests/state/conftest.py#L365-L378
Issue
The state roots validation is not part of the current spec or codebase.
How to fix it
After the spec is revised, we add the state roots validation between here L349:It should be done outside state transtion function. There are some different processes; when the validator applies lookahead via
get_new_shuffling
, check if ze is the proposer or validator of a certain slot:if is an attester
elif is_proposer and time to propose block of the certain slot:
compute_state_transition
On receiving a new block
compute_state_transition
We can wrap the
is_proposer...
process and modifymock_validator_record
now to get some more genenal API that can be used for both the real client and the tests.