Closed djrtwo closed 6 years ago
Most PR changes addressed except for a couple of questions above. Thanks @hwwhww !!
Also, there are some updates to the spec from V already that aren't reflected in here...
I think it would be clear if most “height”s in the spec are replaced with “slot”s, or "index"s if it's about the ith slot of this cycle. IMO It’s confusing because we usually use “heights” as the block serial numbers. Does it makes sense?
Hm.. you are right. I'll try to clean it up now
@hwwhww I'm thinking about leaving the following for a future PR. I'm pretty afk this week and don't want to hold you or anyone else up on collaborating
slot
and height
get_indices_for_slot
and get_block_hash
get_new_recent_block_hashes
with suggested update (as it might change with the added helpers)@djrtwo no problem! And I can add more unit tests in the following PR.
Ready for review
There are a few bugs in the spec, noted here. This codebase reflects the fixes to these bugs so you'll see some disparities between the codebase and the spec. I expect Vitalik to fix these in a couple of days.
test_full_pos.py
TODO:
get_indices_for_slot
andget_block_hash
. Code already handles these cases but using the functions from the spec will be more illustrative to other teamsMISSING (saving for another PR)