Paul Hauner
25ae0f64c2
Tidy, fix & extend BeaconState
impls.
2019-02-11 16:32:55 +11:00
Paul Hauner
d7f8c60f93
Fix un-annotated test in types crate
2019-02-11 16:31:33 +11:00
Paul Hauner
a13dd0d871
Update types
defs, move processing out.
...
- Update `types` to v0.2.0 spec (not all functions upgraded too).
- Move slot/block/epoch processing out to a separate crate (not included
yet, it doesn't compile)
2019-02-11 14:02:59 +11:00
Paul Hauner
ba7137697c
Add impl_common
to slot_epoch.rs
2019-02-07 13:53:30 +11:00
Paul Hauner
7583599e65
Add tests for Slot/Epoch types
2019-02-07 13:44:48 +11:00
Paul Hauner
85450ec254
Fix all compile errors from new Slot/Epoch types
2019-02-07 11:22:48 +11:00
Paul Hauner
b865768d3b
Update validator_inductor to use Slot newtype
2019-02-07 09:54:45 +11:00
Paul Hauner
a98c221447
Add new
fn to Slot and Epoch
2019-02-07 09:53:53 +11:00
Paul Hauner
bd71304d73
Convert beacon_state
to Slot/Epoch newtypes
2019-02-06 13:17:10 +11:00
Paul Hauner
2aa7d80a5f
Update types
to use Slot
newtype
...
All dependant functions haven't yet been updated.
2019-02-05 19:27:12 +11:00
Paul Hauner
dbe9112848
Add first impl of Slot and Epoch newtypes
...
Not tested yet.
2019-02-05 19:15:26 +11:00
Paul Hauner
6c6ee4320d
Fix block_producer
naming to match attester
2019-02-05 16:47:59 +11:00
Paul Hauner
49dcb38c31
Fix naming consistency with attester
crate.
...
Adjusted naming of files to ensure they match the name of the struct.
Also change the name of some structs so they don't look like tests.
2019-02-05 16:41:18 +11:00
Paul Hauner
da1498fc45
Remove validator_shuffling crate.
...
It has been replaced by the `beacon_state.get_shuffling` function.
2019-02-05 12:48:07 +11:00
Paul Hauner
87a326d8a2
Complete canonical_root for attestation_data
2019-02-05 12:41:56 +11:00
Paul Hauner
cbb84c0d69
Move all attestation_data fns into same file
2019-02-05 12:40:03 +11:00
Paul Hauner
05b890860a
Move all attestaion fns into same file
2019-02-05 12:38:58 +11:00
Paul Hauner
b9dc8437c9
Move all beacon_block fns into the same file
2019-02-05 12:33:52 +11:00
Paul Hauner
ade2460377
Move all beacon_state fns into single file.
2019-02-05 12:25:42 +11:00
Paul Hauner
0120082f6b
Merge branch 'master' into add-chain-benchmarks
2019-02-05 05:49:45 +11:00
Paul Hauner
bd1cfeeba9
Change bls import method for validator
2019-02-05 03:52:34 +11:00
Paul Hauner
dcb507ca18
Remove unused errors from genesis crate
2019-02-05 03:51:24 +11:00
Paul Hauner
aad3b3dc7a
Merge spec
into types
crate.
...
Also remove some pre-2018 `extern crate` calls.
2019-02-01 19:05:39 +11:00
Paul Hauner
efc0902abb
Run cargo fmt
2019-02-01 18:20:42 +11:00
Paul Hauner
865919e398
Improve attester errors, move info -> helpers
...
- Ensured one can distingush between a committee error and an invalid
validator index when using `validator_attesation_slot_and_shard`.
- Renamed the `info.rs` file to `getters.rs`, for clarity.
2019-02-01 17:56:49 +11:00
Paul Hauner
20e45b3369
Refactor block_processing
...
- Add the rayon library for parallelization
- Move from std::sync::Rwlock to rayon::RwLock
- Add `state` field to BeaconChain
- Fix major bug in attestation validator where justified slot was
incorrectly looked up.
2019-02-01 14:48:09 +11:00
Paul Hauner
10fec4919b
Merge pull request #175 from sigp/tree_hash
...
Merkle hashing chunk size fix
2019-02-01 12:08:17 +11:00
Paul Hauner
02a962d35d
Ensure per_epoch trans. happens before per_slot.
2019-01-31 18:32:23 +11:00
Paul Hauner
c1b3d1b63e
Tidy up and add some logs
2019-01-31 18:32:01 +11:00
Paul Hauner
e1239a1ecc
Ensure attestation_participants is deduped
2019-01-31 18:31:20 +11:00
Paul Hauner
3f13c25c05
Fix issues with per_epoch block_root calls
...
They were being called with the wrong slot.
2019-01-31 18:28:54 +11:00
Paul Hauner
5c44f97fba
Fix bug with committee index for attester duties
...
It was returning the validator_index instead of the `committee_index`.
2019-01-31 16:42:53 +11:00
Paul Hauner
48801e4674
Re-enable signature checking for validations
2019-01-31 16:42:31 +11:00
Paul Hauner
a1cdc0402d
Tidy attestation_participants function.
...
It was using a map where it could use a find.
2019-01-31 16:41:54 +11:00
Paul Hauner
8073296f5d
Ensure per_epoch processing always runs.
...
Previously, it was running _after_ a state transition, not before it
with the slot processing.
2019-01-31 16:39:44 +11:00
Paul Hauner
ae39a24e71
Add committee_index to aggregator
...
Fixes a bug where the validator index bit was set on the bitfield,
instead of the committee index
2019-01-31 14:16:28 +11:00
Paul Hauner
5ec9d82e40
Minor bug fixes and formatting changes.
2019-01-31 10:04:40 +11:00
Paul Hauner
2fc6dbb02a
Fix bug with inclusion_distance
2019-01-31 08:49:50 +11:00
Paul Hauner
7d94cfb0e4
Refine state transition to allow first transition
2019-01-31 00:39:34 +11:00
Kirk Baird
73ba4d3cfc
Minor modification to merkle hashing
2019-01-29 09:27:40 +11:00
Paul Hauner
6a4252b8c6
Add state helpers from #148
2019-01-28 19:12:20 +11:00
Paul Hauner
f92b9d618a
Add get_shuffling
to state
2019-01-28 17:45:54 +11:00
Paul Hauner
be7e326c33
Add FreeAttesation type
2019-01-28 16:21:33 +11:00
Paul Hauner
5bbffcb053
Add attester to beacon chain test harness
2019-01-28 15:50:42 +11:00
Grant Wuerker
0cbc2936ea
added version to signature-schemes dependency
...
using tag instead of branch
changed signature-schemes tag to 0.3.0
2019-01-27 21:12:00 -06:00
Paul Hauner
e1698102e0
Add attestation aggregation to BeaconChain
2019-01-28 13:04:50 +11:00
Paul Hauner
acf8b79fe9
Add unsafe attester
crate
2019-01-28 11:23:30 +11:00
Paul Hauner
d5da84d967
Add BitAnd
impl for BooleanBitfield
2019-01-28 11:23:01 +11:00
Paul Hauner
a037fec283
Add signable_message()
to AttestationData
2019-01-28 11:22:25 +11:00
Paul Hauner
fd47f6c433
Move attestation validator to BeaconState
fn
2019-01-27 17:54:26 +11:00
Paul Hauner
b487db68a1
Add signable_message()
to Attestation
2019-01-27 17:28:16 +11:00
Paul Hauner
79d1b15afc
Tidy epoch_processing
2019-01-27 13:59:29 +11:00
Paul Hauner
22a08e5160
Fix failing tests
2019-01-26 22:22:52 +11:00
Paul Hauner
7ee836d118
Implement the majority of per-epoch processing
2019-01-26 22:07:50 +11:00
Paul Hauner
90ae2298ab
Impl serde::Serialize for all types
2019-01-26 08:25:31 +11:00
Paul Hauner
f9acc42aca
Rename canonical_hash
to `hash
2019-01-25 17:40:22 +11:00
Paul Hauner
73d86bcc3b
Fix canonical_root fns
...
Fixes #92
2019-01-25 17:39:46 +11:00
Paul Hauner
ad62e1e35c
Rust cargo fmt
2019-01-25 17:23:54 +11:00
Paul Hauner
6b4c0fe1a3
Merge branch 'master' into lmd-ghost
2019-01-25 17:23:14 +11:00
Paul Hauner
78c00d3361
Move back to using proposer_slots
2019-01-25 16:54:19 +11:00
Paul Hauner
138fcd6275
Fix issues with old state information
2019-01-25 16:47:24 +11:00
Paul Hauner
5ef02688d5
Remove pre-2018 extern crate uses
2019-01-25 16:46:16 +11:00
Kirk Baird
9f703765aa
Minor modification to tree_hash
2019-01-25 16:42:19 +11:00
Kirk Baird
10333cc99f
Minor modification to tree_hash
2019-01-25 16:18:48 +11:00
Kirk Baird
f67facae88
Add return type for AttesationDataAndCustodyBit hash_tree_root
2019-01-25 14:39:51 +11:00
Paul Hauner
ea523c8658
Merge spec
crate into types
2019-01-25 13:52:21 +11:00
Paul Hauner
19417efa63
Fix compile errors from block_producer upgrades
2019-01-25 13:03:17 +11:00
Kirk Baird
5a2cf6219e
Modify tree_hash
2019-01-25 12:59:11 +11:00
Kirk Baird
eb3969af98
Merge branch 'master' into tree_hash
2019-01-25 12:33:31 +11:00
Kirk Baird
9c9b07c182
Add TreeHash trait to all types and structs
2019-01-25 12:22:56 +11:00
Paul Hauner
7454370084
Remove println from tests
2019-01-25 12:08:46 +11:00
mjkeating
4a2d5c9fbe
Added TreeHash functionality
2019-01-24 16:32:58 -08:00
Paul Hauner
643fc20063
Update block_producer for upstream changes
2019-01-25 11:29:41 +11:00
Paul Hauner
5fdad686fa
Add test for state_root
to genesis
2019-01-25 11:25:56 +11:00
Paul Hauner
5f953f76d8
Make TestingSlotClock thread-safe
2019-01-25 11:25:09 +11:00
Paul Hauner
6fd3a1a03e
Add progress on test rig
2019-01-25 08:18:47 +11:00
Kirk Baird
407bf5e06d
Minor updates to TreeHash
2019-01-24 15:47:28 +11:00
Kirk Baird
77d4405b7a
Merge mjkeating changes into local branch
2019-01-24 14:23:51 +11:00
Paul Hauner
298f9acd6a
Merge branch 'master' into lmd-ghost
2019-01-24 12:06:23 +11:00
Paul Hauner
d009b85637
Export bls::Keypair from types crate
2019-01-24 11:52:19 +11:00
Paul Hauner
eae904270b
Derive Clone for SystemTimeSlotClock
2019-01-24 11:51:25 +11:00
Paul Hauner
8c0e634aa4
Add Signer to validator client
2019-01-24 11:50:34 +11:00
Paul Hauner
2bcce37b3c
Remove outdated attestation_validation crate
2019-01-24 11:42:40 +11:00
Kirk Baird
c860191f14
More updates base upon the specs, again
2019-01-24 10:17:12 +11:00
Paul Hauner
db6d40e614
Add Signer
trait to block_producer
2019-01-24 09:20:25 +11:00
Paul Hauner
188434aaa0
Move block_propser -> eth/, impl for val client
2019-01-23 21:41:47 +11:00
Paul Hauner
1256ba0d01
Implement very raw state transition logic
2019-01-23 19:25:05 +11:00
Kirk Baird
e047fbe914
More updates base upon the specs
2019-01-23 18:06:25 +11:00
Kirk Baird
560dbe4ae1
Update constants / types to match specs as of 23.1.19
2019-01-23 15:04:40 +11:00
Paul Hauner
b555916808
Add slow LMD ghost implementation
2019-01-23 09:33:04 +11:00
Paul Hauner
e16f9e0aec
Rename beacon_chain/
-> eth2/
2019-01-22 16:16:02 +11:00