Commit Graph

7 Commits

Author SHA1 Message Date
Paul Hauner
46da9b670f
Add untested minimum viable block processing 2018-10-30 15:49:32 +01:00
Paul Hauner
a40b49d586
Updates to block validation
- Rename "parent_hashes" -> "recent_block_hashes"
- Expect block has to be computed prior to function
2018-10-23 13:15:08 +02:00
Paul Hauner
c3d88a7e80
Update validation as per new spec
- Block -> BeaconBlock
- Updates to SszBeaconBlock
2018-10-16 13:59:45 +11:00
Paul Hauner
e8daca4c80
Ensure that parent_block.slot < block.slot 2018-10-12 20:54:33 +11:00
Paul Hauner
6ef4268d6d
Verify attestation justified_block_hash.
Previously there was not a check that the hash was in the chain, just
that it was known (in the database in any chain)
2018-10-12 00:41:47 +11:00
Paul Hauner
cf9f8c1e85
Fix issue with last_justified_block_hash
Previously we were just checking it exists in the DB. This is incorrect
because the last_justified_block_hash _must_ be in the chain referenced
by the block.

I.e., it's not OK for a block to reference a justified block in another
chain.
2018-10-09 12:14:59 +11:00
Paul Hauner
117a207d49
Add pre-written validation code
This adds block and attestation validation code that was written
previously. There were many non-validation specific changes made whilst
building these functions (e.g., db, hashing, etc) -- these changes have
already been merged into master and this branch has been created just to
make it easy to review this code.
2018-10-02 17:35:03 +10:00