Commit Graph

28 Commits

Author SHA1 Message Date
Alex Stokes
a695382260 Run cargo fmt that got clobbered in merge 2018-11-20 12:54:35 -08:00
Alex Stokes
031b7bf225 Add method to calculate the underlying number of bytes
Required for part of attestation validation logic
2018-11-20 12:40:13 -08:00
Alex Stokes
72cf7ad1bd Begin updating tests to reflect changes to bitfield 2018-11-20 12:40:13 -08:00
Alex Stokes
37b05e1a5b get tests passing (except one) 2018-11-20 12:38:23 -08:00
Paul Hauner
900ffac5e0
Run rustfmt globally.
Using `$ cargo fmt` in the root. Closes #68.
2018-11-04 15:35:55 +01:00
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
1acfb87e77
Merge branch 'master' into beacon_block 2018-10-18 10:14:55 +11:00
Paul Hauner
fa705229aa
Fix clippy lints 2018-10-16 15:24:50 +11: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
e289d8b5fd
Fix comment in attestation_validation 2018-10-15 15:08:43 +11:00
Paul Hauner
90010ced55
Fix big in attestation validation
There was no check that the attestation is within an appropriate
distance from its parent block.
2018-10-13 09:39:10 +11:00
Paul Hauner
e8daca4c80
Ensure that parent_block.slot < block.slot 2018-10-12 20:54:33 +11:00
Paul Hauner
1f089d423e
Ensure attestation val. check parent.slot
As per comments by Danny Ryan on PR#33
2018-10-12 20:41:18 +11:00
Paul Hauner
b5441535ba
Add comment regarding tightening block val.
Comment was suggested by Danny R.
2018-10-12 19:30:52 +11:00
Paul Hauner
68ca51c7ac
Fix "indicies" type 2018-10-12 00:55:29 +11:00
Paul Hauner
3139d0e5da
Replace hashmap with hashset 2018-10-12 00:53:56 +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
f13a4fffea
Fix a type in sig. ver. comment 2018-10-09 11:09:37 +11:00
Paul Hauner
9a59908506
Rename voted_hashmap to voted_hashset 2018-10-09 11:08:09 +11:00
Paul Hauner
a998ac2a12
Add InvalidBitfieldEndBits tests 2018-10-09 11:05:40 +11:00
Paul Hauner
e2d45eafae
Separate parent block checking and proposer checking 2018-10-04 15:43:17 +10:00
Paul Hauner
c30a9a7565
Update comment for rejecting future block
As per Danny's request
2018-10-04 14:46:05 +10:00
Paul Hauner
49737fbc82
Add doc comments to attestation validation 2018-10-02 17:58:33 +10:00
Paul Hauner
50d7252cd0
Remove failing benchmarks 2018-10-02 17:45:37 +10:00
Paul Hauner
eaa694bced
Deleted some unnecessary files 2018-10-02 17:44:47 +10: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