Age Manning
bb8938c564
Use AttestationDuty in epoch duties
2019-03-30 17:14:38 +11:00
Paul Hauner
dbcc88ad67
Ensure BitVec is initialized using a multiple of 8
...
I found it was panic-ing when supplied a non-power-of-zero len.
2019-03-30 17:13:23 +11:00
Age Manning
bc305cacc2
Merge branch 'blop-pool' into validator-enhancements
2019-03-30 16:16:30 +11:00
Paul Hauner
397e104f9b
Implement Attestation
building in test harness
2019-03-30 16:02:09 +11:00
Age Manning
6e254551af
Implement produce beacon block on gRPC beacon node server
2019-03-30 15:58:31 +11:00
Age Manning
d3a6d73153
Implements Signer generic for validator client and epoch duties
2019-03-30 14:27:37 +11:00
Age Manning
ba771282fa
Merges in validator client branch
2019-03-30 13:17:24 +11:00
Paul Hauner
cd9494181c
Push RwLock down into OperationPool
...
There used to be one massive lock on `BeaconChain.op_pool`, however that
would cause unnecessary blocking.
2019-03-30 12:26:25 +11:00
Paul Hauner
46a978a5a9
Implement op pool for all ops execpt attestations
2019-03-29 18:30:03 +11:00
Paul Hauner
dd2351020c
Impl add_aggregate
for FakeAggSig
2019-03-29 17:58:02 +11:00
Paul Hauner
b5f176a152
Merge branch 'master' into blop-pool
2019-03-29 17:49:33 +11:00
Paul Hauner
fc17d5fea4
Fix failing tree hash tests
2019-03-29 14:37:27 +11:00
Paul Hauner
e0104e6199
Move offset_handler construction into self
2019-03-29 13:04:01 +11:00
Kirk Baird
c1d7e26cac
Merge branch 'yaml-test-downloads' into state-transition-tests
2019-03-29 11:48:26 +11:00
Kirk Baird
023b4e8c92
Merge master and remove ssz length encoding from FakeBLS
2019-03-29 11:47:22 +11:00
Paul Hauner
267c978abb
Tidy cache hash API
2019-03-29 02:36:34 +11:00
Age Manning
68b33620c2
Implement Display and clean validator output
2019-03-29 02:23:03 +11:00
Paul Hauner
7b05c506df
Add new build method for cached hashes
2019-03-29 00:47:42 +11:00
Age Manning
1e760d6719
Add Display for PublicKey
2019-03-29 00:43:53 +11:00
Paul Hauner
40bfd5a6c7
Add offset manager method to cache hash trait
2019-03-28 23:58:27 +11:00
Paul Hauner
2dcf1c857c
Fix failing cache hashing test
2019-03-28 23:21:24 +11:00
Luke Anderson
87acaac8a0
Ran cargo fmt.
2019-03-28 21:01:47 +11:00
Luke Anderson
ba71e8adca
Merged age-validator-client into luke's changes on validator_client, and fixed all the merge conflicts.
2019-03-28 20:55:07 +11:00
Paul Hauner
ca0849edc5
Fix cargo fmt error
...
It's a rookie mistake and you hate to see it
2019-03-28 19:02:33 +11:00
Paul Hauner
49639c40ee
Implement failing cache hash test
2019-03-28 19:01:31 +11:00
Age Manning
2a2660ce62
Cleanup debug issues, corrects RPC server logic
2019-03-28 17:24:49 +11:00
Luke Anderson
c9e8fe53bc
Merged Age's changes and ripped out heaps of now obsolete stuff in the validator client.
...
- Replaced most instances of PublicKey with KeyPair, since they need to be passed into each validator thread now.
- Pulled out a bunch of FreeAttestations, and replaced with regular Attestations (as per Paul's suggestion)
- Started generalising pubkeys to 'signers' (though they are still just Keypairs)
- Added validator_index into a few structs where relevant
- Removed the SlotClock and DutiesReader from the BlockProducer and Attester services, since this logic is now abstracted to the higher level process.
- Added a Hash trait to the Keypair (rather than just pubkey) which assumes the Pubkey uniquely defines it.
2019-03-28 15:50:57 +11:00
Paul Hauner
f21409fee1
Build breaking recursion tests for cache hashing
2019-03-28 14:44:10 +11:00
Age Manning
6f0c0e47c3
Update Validator RPC and cache building
2019-03-28 14:32:02 +11:00
Paul Hauner
0d8d3385be
Pass tree hash caching tests
2019-03-28 14:17:25 +11:00
Paul Hauner
224a967cce
Implement basic vec tree hash cache
2019-03-28 13:05:24 +11:00
Paul Hauner
7af6eecb44
Merge branch 'yaml-test-downloads' into cached-tree-hash
2019-03-28 11:24:15 +11:00
Paul Hauner
31e9853463
Merge branch 'little-endian-ssz' into cached-tree-hash
2019-03-28 11:13:11 +11:00
Paul Hauner
1285f1e9f8
Restructure cached tree hash files, breaks tests
2019-03-28 11:11:20 +11:00
Paul Hauner
3c7e18bdf3
Sanitize for odd leaf count
2019-03-28 10:56:20 +11:00
Luke Anderson
bda381a264
More progress towards getting the attester working.
2019-03-28 09:38:39 +11:00
Paul Hauner
b05787207f
Refactor CachedTreeHash into owned bytes
...
Instead of slices
2019-03-28 09:33:44 +11:00
Paul Hauner
acb1dd47cd
Make tree hash pass tests
2019-03-27 19:31:02 +11:00
Luke Anderson
16706d322f
Merge remote-tracking branch 'origin/master' into validator_client-luke_wip
2019-03-27 19:10:36 +11:00
Paul Hauner
e33d1d0ebb
First passing tree hash test
2019-03-27 18:55:39 +11:00
Paul Hauner
839ff3ea3b
Implement (failing) cached tree hash tests
2019-03-27 18:34:10 +11:00
Paul Hauner
ad4000cbdf
Remove unused code
2019-03-27 17:46:12 +11:00
Paul Hauner
35ceb92f2e
Refactor with TreeHashCache struct
2019-03-27 17:45:27 +11:00
Paul Hauner
e28e97d3c7
Add initial work on tree hash caching
2019-03-27 15:59:27 +11:00
Paul Hauner
0c4306cd18
Move genesis time forward
2019-03-27 11:57:38 +11:00
Paul Hauner
c52da489cb
Merge branch 'master' into paul-gossip-test
2019-03-27 11:26:06 +11:00
Paul Hauner
8733740f8b
Move genesis time closer to now
2019-03-27 10:36:37 +11:00
Paul Hauner
b006586d19
Add slot timer to beacon node
2019-03-27 10:36:20 +11:00
Paul Hauner
b887509607
Fix double advance-cache calls bug
2019-03-27 10:35:46 +11:00
Michael Sproul
e5a3b3dd06
op-pool: attestation tests
2019-03-26 18:29:02 +11:00
Kirk Baird
033ae1b747
WIP begin testing
2019-03-26 18:28:29 +11:00
Michael Sproul
99dbed86f1
types: PendingAttestation::from_attestation
2019-03-26 18:20:01 +11:00
Luke Anderson
1584469b7c
Renamed attestation -> attestation_data for fetch, but not publish, to acknowledge the difference in the spec. Also started implementing the gRPC get_attestation_data functionality in the BeaconNode.
2019-03-26 17:41:43 +11:00
Age Manning
96ccd58414
Merge branch 'libp2p-patch'
2019-03-26 16:49:43 +11:00
Kirk Baird
e12ce2bd5c
Merge branch 'master' into yaml-test-downloads
2019-03-26 16:47:24 +11:00
Kirk Baird
fd2f9d0d15
Remove ssz encoding of length from; Signature, AggregateSiganture, PublicKey, SecretKey
2019-03-26 16:45:25 +11:00
Age Manning
507c8efbfb
Update to latest gossipsub
2019-03-26 16:38:50 +11:00
Paul Hauner
7cba9f4126
Merge branch 'master' into paul-gossip-test
2019-03-26 16:09:47 +11:00
Paul Hauner
9224558e06
Set genesis time for testing state builder
2019-03-26 15:53:49 +11:00
Kirk Baird
336b3a8a59
Consolidate branches
2019-03-26 15:47:16 +11:00
Paul Hauner
00b546e6b8
Update slot clock to use genesis slot
2019-03-26 15:44:28 +11:00
Kirk Baird
864ef137ef
Merge ssz little endian branch
2019-03-26 15:44:01 +11:00
Kirk Baird
299dfe43aa
Add .gitignore to make .../yaml_utils/specs a valid directory again
2019-03-26 15:16:55 +11:00
Age Manning
6955330f6c
Merge branch 'libp2p-patch'
2019-03-26 15:14:29 +11:00
Age Manning
b2ae54043c
Fix libp2p version to specific commit
2019-03-26 15:06:41 +11:00
Kirk Baird
116d995960
Merge current master and fix ssz-fuzzing
2019-03-26 14:53:50 +11:00
Age Manning
52b31b2009
Implement initial pubsub message handling
2019-03-25 23:02:51 +11:00
Age Manning
214fb5b8ff
Merge RPC branch
2019-03-25 21:31:49 +11:00
Kirk Baird
9d65ee130d
Include yaml-utils/specs folder
2019-03-25 18:42:41 +11:00
Luke Anderson
4cdeb6abe5
Progress towards validator signing attestations.
...
- Added a 'beacon_attester' RPC endpoint, so the BeaconNode can supply attestation data.
- Renamed 'attestation_data' to just 'attestation' throughout (except where it is actually just the data structure).
2019-03-25 18:32:27 +11:00
Kirk Baird
2f11b0ff71
Merge branch 'master' into v0.5.0-state-transition-tests
...
Signed-off-by: Kirk Baird <baird.k@outlook.com>
2019-03-25 18:21:12 +11:00
Kirk Baird
df7c04fe16
Merge branch 'master' into v0.5.0-state-transition-tests
...
Signed-off-by: Kirk Baird <baird.k@outlook.com>
2019-03-25 18:04:35 +11:00
Kirk Baird
d76baa1cc1
Allow downloading of large tests from EF github and fix issues with serde
2019-03-25 18:02:37 +11:00
Luke Anderson
2f49289c28
Merged master and fixed merge conflicts with Config updates.
2019-03-25 17:03:17 +11:00
Michael Sproul
518359e898
op-pool: implement attester slashings
2019-03-25 16:58:20 +11:00
Age Manning
209614e373
Merge pull request #295 from sigp/validator-updates
...
Persisting (random) Validator Keys
2019-03-25 14:40:11 +11:00
Michael Sproul
bde7ab79c8
types: aggregate signatures in attestations
2019-03-25 13:53:24 +11:00
Michael Sproul
0bf8cb953e
BLS: wrap AggregateSignature::add_aggregate
2019-03-25 12:44:30 +11:00
Michael Sproul
22a90a0224
op-pool: check previous epoch in get_attestations
2019-03-25 11:56:30 +11:00
Michael Sproul
e512f7c0e1
op-pool: validate_attestation_time_independent_only
2019-03-25 11:29:03 +11:00
Michael Sproul
3396f2f08e
op-pool: propagate errors, sort by transfer fee
2019-03-25 11:29:03 +11:00
Michael Sproul
95ed402228
op-pool: rename to verify_*_time_independent_only
2019-03-25 11:29:03 +11:00
Michael Sproul
b2fe14e12c
Operation pool: refactor verify_deposit/exit
2019-03-25 11:29:03 +11:00
Michael Sproul
03c01c8a8d
Operation pool: HashMap instead of BTreeMap
2019-03-25 11:29:03 +11:00
Michael Sproul
05dd936a97
Operation pool: deposit pruning tests
2019-03-25 11:29:03 +11:00
Michael Sproul
9c2dfba843
Operation pool: prune attestations
2019-03-25 11:29:03 +11:00
Michael Sproul
a8224aa4ec
Operation pool: add prune_all
2019-03-25 11:29:03 +11:00
Michael Sproul
8a7c51271e
Bitfield: use BitOr instead of BitAnd for union
...
Closes #314
2019-03-25 11:29:03 +11:00
Michael Sproul
18a7bd243c
Bitfield: implement union/intersection/difference
2019-03-25 11:29:03 +11:00
Michael Sproul
1fca8a063c
Operation pool: add attestation support
2019-03-25 11:29:03 +11:00
Michael Sproul
c2e5d3c45a
BLS: fix description of AggregatePublicKey
2019-03-25 11:29:03 +11:00
Michael Sproul
8f4a2fbde1
Implement transaction pool basics
2019-03-25 11:29:03 +11:00
Paul Hauner
f918f42b28
Merge branch 'master' into paul-sync
2019-03-24 16:36:18 +11:00
Paul Hauner
a57a7c2394
Implement block imports for sync
2019-03-23 18:48:09 +11:00
Kirk Baird
8fd2e47e99
Modifications to serde
2019-03-22 16:10:43 +11:00
Kirk Baird
5204fc81ff
cargo fmt
2019-03-22 14:52:37 +11:00
Kirk Baird
4324097904
Allow for conversion to/from empty_signature
2019-03-22 14:51:49 +11:00
Age Manning
844fdc0fb9
Rename network_id to chain_id
2019-03-22 12:39:45 +11:00
Paul Hauner
dba972c748
Merge branch 'debug-no-crypto' into paul-sync
2019-03-22 10:20:41 +11:00
Paul Hauner
7cbee46227
Add FakeSignature and FakeAggregateSignature
...
They replace Signature and FakeAggregateSignature when compling with
debug. Compiling with release uses the real structs.
2019-03-22 10:08:40 +11:00
Kirk Baird
192a49a23d
Merge branch 'master' of github.com:sigp/lighthouse into v0.5.0-state-transition-tests
2019-03-22 09:23:56 +11:00
Paul Hauner
7a75ee3d19
Merge branch 'master' into paul-sync
2019-03-22 07:11:04 +11:00
Paul Hauner
ca18d4390a
Add first changes to syncing logic
...
- Adds testing framework
- Breaks out new `NetworkContext` object
2019-03-21 17:17:01 +11:00
Age Manning
4310f35b73
Merge branch 'master' into network-server
2019-03-20 14:31:35 +11:00
Paul Hauner
84f373fcc2
Fix clippy lints
2019-03-20 10:51:53 +11:00
Age Manning
4b57d32b60
Apply clippy suggestions
2019-03-19 23:20:39 +11:00
Paul Hauner
8f23aefb29
Adds comments to new epoch cache fns.
2019-03-19 19:55:17 +11:00
Paul Hauner
baca2c90ab
Add last of 0.5.0 upgrades. Woo!
2019-03-19 19:43:31 +11:00
Paul Hauner
35b90728c7
Push more epoch processing fns to 0.5.0
2019-03-19 19:27:10 +11:00
Kirk Baird
26f8694161
Begin updating serde such that it can read the yaml test files
2019-03-19 18:05:05 +11:00
Paul Hauner
61f6fe25e7
Tidy reward processing
2019-03-19 17:26:20 +11:00
Paul Hauner
d20fb93f0c
Update rewards processing to v0.5.0
2019-03-19 17:16:51 +11:00
Kirk Baird
1bdd737a11
Add ssz test vectors
2019-03-19 11:34:31 +11:00
Paul Hauner
37b8e9f39a
Move get_active_validator_indices
to state
2019-03-19 09:09:57 +11:00
Age Manning
be712f5b05
Add network id to chainspec
2019-03-18 23:04:17 +11:00
Paul Hauner
1028acf3f1
Move state trans fns into state_processing
2019-03-18 21:34:42 +11:00
Age Manning
66f09e1b8e
Updates network branch to v0.5.0
2019-03-18 18:17:37 +11:00
Kirk Baird
9cef6a5814
Finish implementing Darrens migrate-ssz-little-endian and add wrapper to check for ssz underflow
2019-03-18 18:11:46 +11:00
Paul Hauner
7503f31ddc
Fix bug with per-block processing
2019-03-18 18:09:31 +11:00
Age Manning
2d52d2954d
Modify testnet spec to have few validators
2019-03-18 17:45:40 +11:00
Paul Hauner
edeace9e75
Fix issues with building on genesis block
2019-03-18 16:53:59 +11:00
Age Manning
bbad4bfa19
Starts initialisation of beacon chain in the client
2019-03-18 16:16:54 +11:00
Kirk Baird
10efc9a934
Merge branch 'master' into kirk-migrate-ssz-to-little-endian
...
Signed-off-by: Kirk Baird <baird.k@outlook.com>
2019-03-18 11:40:39 +11:00
Kirk Baird
2c95d531ea
Merge branch 'master' into 215-migrate-ssz-little-endian
2019-03-18 10:47:40 +11:00
Paul Hauner
191761f356
Allow epoch cache with zero validators.
2019-03-17 23:32:27 +11:00
Paul Hauner
979353f136
Make separate errors for epoch cache.
...
Helps with troubleshooting.
2019-03-17 23:23:45 +11:00
Paul Hauner
816c2c651b
Modify genesis processing process.
...
- Removed BeaconStateBuilder
- Added genesis code to `state_processing`.
2019-03-17 23:11:07 +11:00
Paul Hauner
8677b9e9cc
Fix bug with epoch caches, add tests
2019-03-17 21:07:19 +11:00
Paul Hauner
446ff0c27e
Ensure test_harness crate compiles under v0.5.0
2019-03-17 19:19:52 +11:00
Paul Hauner
df3f8df7bd
Ensure fork_choice tests pass under v0.5.0
2019-03-17 18:56:05 +11:00
Paul Hauner
d94540c85c
Remove readers from fork choice crate.
2019-03-17 17:59:29 +11:00
Paul Hauner
6b3cdc34dd
Update block proposer to v0.5.0
2019-03-17 17:50:22 +11:00
Paul Hauner
3a384d93f8
Allow state processing to compile under v0.5.0
2019-03-17 17:47:12 +11:00
Paul Hauner
3b8c1df5da
Fix bug in per block processing.
2019-03-17 12:49:55 +11:00
Paul Hauner
6bd2055a0a
Update block processing to v0.5.0
2019-03-17 12:25:37 +11:00
Age Manning
a59fc2c24d
Merge pull request #306 from sigp/sigs-v0.6.1
...
Update signature-scheme to v0.6.1
2019-03-17 12:17:24 +11:00
Age Manning
71f65ee0cd
Merge pull request #301 from sigp/new-pubkey-format
...
Add pubkey cache
2019-03-17 12:17:06 +11:00
Paul Hauner
7f4af20212
Refactor shuffling generation
2019-03-16 19:14:49 +11:00
Paul Hauner
d6456a9486
Remove old types structs.
...
They've been outdated be v0.5.0 or prior
2019-03-16 14:35:45 +11:00
Paul Hauner
c648491c45
Add TestRandom default
field attr to BeaconState
2019-03-16 14:32:23 +11:00
Paul Hauner
33783d4baa
Fix borrow issue in BeaconBlock
2019-03-16 14:32:07 +11:00
Paul Hauner
6ae5d34d0f
Update testing builders as per state 0.5.0 update
2019-03-16 14:31:43 +11:00
Paul Hauner
01bfd38637
Add default
attribute to TestRandom
derive.
...
Allows for generating the item from default instead of randomizing it.
2019-03-16 14:30:21 +11:00
Paul Hauner
f739bb5551
Add serde default field attr
...
I accidentally deleted it in the last commit.
2019-03-15 18:38:58 +11:00
Paul Hauner
49d3f3d1d6
Partially update BeaconState to v0.5.0
...
- Uses new ssz attributes to remove manual impl of ssz.
- Updates struct def to v0.5.0
- Does not update all methods
2019-03-15 18:36:55 +11:00
Paul Hauner
b37cf3a269
Add TreeHash derives for cache objects.
...
This allows us to avoid a verbose manual impl for BeaconState
2019-03-15 18:36:16 +11:00
Paul Hauner
7660cbd419
Update ChainSpec to v0.5.0
2019-03-15 18:35:27 +11:00
Paul Hauner
57c4389f9c
Add further BeaconBlock v0.5.0 updates
2019-03-15 18:34:54 +11:00
Paul Hauner
dffc26a466
Add field idents support to ssz_derive.
...
- Adds idents to skip ser, deser and tree hashing
2019-03-15 18:33:32 +11:00
Paul Hauner
563304c8d7
Update "block" family types to 0.5.0
...
- Removes Proposal
- Removes "readers" as they aren't actually being used anywhere.
2019-03-15 16:30:05 +11:00
Paul Hauner
a51de99d40
Fast-forward unchanged exit to v0.5.0
2019-03-15 16:06:02 +11:00
Paul Hauner
a1ee1a4523
Update Transfer to v0.5.0
2019-03-15 16:05:53 +11:00
Paul Hauner
db26b8fde7
Update Deposit to v0.5.0
2019-03-15 16:02:47 +11:00
Paul Hauner
77db79900e
Fast-forward some unchanged types to v0.5.0
2019-03-15 16:02:23 +11:00
Paul Hauner
dc2755c4ea
Update ProposerSlashing to v0.5.0
2019-03-15 15:59:04 +11:00
Paul Hauner
15c3e5eab5
Add HistoricalBatch type
2019-03-15 15:52:17 +11:00
Paul Hauner
142aaae8ce
Fast-forward PendingAttestation to v0.5.0
2019-03-15 15:51:57 +11:00
Paul Hauner
4ffdfbc993
Update Validator
to 0.5.0, add tests
2019-03-15 15:48:33 +11:00
Paul Hauner
d84850b892
Add BeaconBlockHeader
type.
2019-03-15 15:40:28 +11:00
Paul Hauner
2295322e3c
Update DepositInput to spec v0.5.0
...
Also modifies the API for creating a proof of possession and adds a test
2019-03-15 15:40:19 +11:00
Paul Hauner
20a439101e
Update "attestation" family of structs in types
...
Also adds/splits up some testing builders.
2019-03-15 15:20:33 +11:00
Paul Hauner
8050ed7a26
Fast-forward unchanged 0.4.0 structs to 0.5.0
2019-03-15 14:33:40 +11:00
Paul Hauner
f9964ebd8b
Update Fork struct to v0.5.0
2019-03-15 13:33:45 +11:00
Paul Hauner
ef86948259
Add bones of YAML state test parsing.
...
Is incomplete, need to update all our types to v0.5.0 first
2019-03-15 13:32:23 +11:00
Paul Hauner
236b97476a
Marge fixes to test_harness, add serdehex crate
2019-03-15 13:31:30 +11:00
Paul Hauner
902b80a579
Optimise epoch building
2019-03-14 22:16:21 +11:00
Paul Hauner
8154397114
Set map initial cacacity in epoch cache builder
...
This should help reduce reallocations
2019-03-14 20:54:44 +11:00
Paul Hauner
96d96ba9ba
Remove assertion in benches
2019-03-14 20:54:30 +11:00
Paul Hauner
5337fce433
Merge branch 'sigs-v0.6.1' into sane-case
2019-03-14 18:18:59 +11:00
Paul Hauner
65e3b388a0
Update signature-scheme to v0.6.1
2019-03-14 18:17:32 +11:00
Paul Hauner
d99a92d147
Merge branch 'new-pubkey-format' into sane-case
2019-03-14 17:53:47 +11:00
Paul Hauner
3dfdfc95ac
Fix test_utils macro definition
...
It needed to be defined before it was used in an module.
2019-03-14 17:53:13 +11:00
Paul Hauner
4fd8551e8b
Update loglevel, comments in benches
2019-03-14 17:49:39 +11:00
Paul Hauner
9e7d495dca
Merge branch 'master' into new-pubkey-format
2019-03-14 19:02:10 +13:00
Age Manning
1134ce1d8b
Merge pull request #304 from sigp/faster-rewards
...
Improve rewards processing time
2019-03-14 17:01:58 +11:00
Paul Hauner
2535f47f13
Add builder for benches
...
Also adds a "sane" case for block processing
2019-03-14 16:44:56 +11:00
Paul Hauner
e44f2fca8c
Merge pull request #305 from sigp/fork-choice-correction
...
Correct all fork choice rules for children with no votes.
2019-03-14 18:29:03 +13:00
Paul Hauner
ed49023b87
Merge branch 'faster-rewards' into sane-case
2019-03-14 16:11:41 +11:00
Paul Hauner
fc0cdb8226
Start building non-worst case benches
2019-03-14 18:10:36 +13:00
Paul Hauner
31c276822d
Merge pull request #300 from sigp/dupl-ssz-tests
...
Re-re-apply removal of duplicated ssz_tests
2019-03-14 18:07:42 +13:00
Paul Hauner
1c1c15a122
Tidy per epoch processing
...
- Add comments to ValidatorStatuses
- Add some checks to guard against a bad statuses list
- Remove unused attester_sets.rs file.
2019-03-14 16:00:22 +11:00
Age Manning
086e9574d2
Correct all fork choice rules for children with no votes.
2019-03-14 15:22:45 +11:00
Paul Hauner
f4959fc03c
Add TestingBeaconStateBuilder fn for cloned kps
...
Allows for faster test setups.
Implemented method for fork choice tests.
2019-03-14 15:10:20 +11:00
Paul Hauner
10aee6214c
Tidy per_epoch_processing
...
Mainly renaming variables and files for readability.
2019-03-14 14:59:30 +11:00
Age Manning
ac6dc81ebf
Merge pull request #302 from pawanjay176/lmd_ghost_tests
...
Adds additional tests for lmd ghost fork choice rules
2019-03-14 14:09:31 +11:00
Age Manning
8435a5b2ca
Merge pull request #297 from pawanjay176/optimized_ghost
...
[WIP] Add OptimizedLMDGhost fork choice rule and tests
2019-03-14 14:08:16 +11:00
Paul Hauner
95599ddc66
Update Attesters struct
...
- Renames variables
- Moves total balance calculation into struct
2019-03-14 12:49:48 +11:00
Paul Hauner
a319144835
Improve crosslink reward processing
2019-03-14 12:17:43 +11:00
Paul Hauner
6f919e6f7d
Add first iteration on faster rewards processing.
2019-03-14 11:53:50 +11:00
pawanjay176
804da3c3ff
Adds additional tests for lmd ghost fork choice rules
2019-03-14 00:58:15 +05:30
pawanjay176
4c45b90df5
Formatted changes using rustfmt
2019-03-13 14:34:00 +05:30
pawanjay176
181aeb3d71
Refactored to use max_by
2019-03-13 14:31:40 +05:30
Paul Hauner
b2fb2afb28
Revert "Move PublicKey
to store uncomp. bytes."
...
This reverts commit bfa2e71b46
.
2019-03-13 16:51:37 +11:00
Paul Hauner
587be831b5
Add method for dropping pubkey cache. Add bench.
2019-03-13 16:49:32 +11:00
Paul Hauner
6cd3c4bd1a
Add a cache for public keys to BeaconState
...
This allows for a fast lookup of "is this public key already in the
validator registry".
2019-03-13 16:40:28 +11:00
Age Manning
23a8fbfc74
Add default topics and initial topic subscription
2019-03-13 15:39:32 +11:00
Age Manning
8ee3523abd
Transition to secp256k1 default peer id
2019-03-13 14:43:24 +11:00
Paul Hauner
bfa2e71b46
Move PublicKey
to store uncompressed bytes.
...
This is an optimisation that allows for faster hashing of a public key,
however it adds a penalty to SSZ encoding because we need to go
decompressed -> PublicKey -> compressed.
The spec presently uses compressed bytes to store public keys, however
I'm hoping it will change.
2019-03-13 14:41:43 +11:00
Age Manning
af7128062a
Merge pull request #298 from sigp/optimise-slasher-builder
...
Optimize TestingAttesterSlashingBuilder
2019-03-13 13:18:06 +11:00
Paul Hauner
f68f52e206
Fix issues with previous cherry pick
2019-03-13 12:22:15 +11:00
Michael Sproul
6101036c8e
Re-apply removal of duplicated ssz_tests
...
Also, re-apply: "use cfg(test) for test macros"
2019-03-13 12:18:27 +11:00
Paul Hauner
243ef2db80
Merge pull request #258 from sigp/ssz-fuzzing
...
Basic Fuzz Tests
2019-03-13 14:05:41 +13:00
Paul Hauner
123650efbb
Merge pull request #290 from mjkeating/tree_hash_spec_update
...
Updated TreeHash logic as per revised spec
2019-03-13 14:04:42 +13:00
Paul Hauner
6f5593ef2b
Optimize TestingAttesterSlashingBuilder
2019-03-13 10:24:02 +11:00
pawanjay176
2b7aa269c3
Add OptimizedLMDGhost fork choice rule and tests
2019-03-13 00:22:15 +05:30
Luke Anderson
e942d7533b
A first go at persisting validator keys and handling configuration. Addresses issue #253 .
...
- Creates a keystore directory in the config
- Fetches serialized keys from the keystore directory
- If no keys, generates keys randomly, saves serialized keys to keystore dir.
2019-03-12 21:56:45 +11:00
Paul Hauner
2be0373f01
Add comments to new functions/structs.
2019-03-12 18:26:41 +11:00
Paul Hauner
f949919b9b
Add comments to epoch_processing
2019-03-12 18:02:53 +11:00
Paul Hauner
dc221f3220
Make attester/proposer slashing builders test-only
...
They didn't do anything useful or safe for production.
2019-03-12 17:30:00 +11:00
Paul Hauner
9057b436f3
Run rustfmt
2019-03-12 17:19:35 +11:00
Paul Hauner
fbfa233d36
Add debug messages to TestingBeaconStateBuilder
2019-03-12 17:16:12 +11:00
Paul Hauner
1b252c3f82
Implement new uncompressed bytes for PublicKey
2019-03-12 17:15:45 +11:00
Kirk Baird
c92f867cd8
Upgrade to signature scheme 0.6.0
2019-03-12 16:01:09 +11:00
Paul Hauner
efd56ebe37
Ignore file-exists error.
2019-03-12 14:42:31 +11:00
Paul Hauner
cce88c9923
Improve DX for loading validator keys from file
2019-03-12 14:39:16 +11:00
Paul Hauner
f34ae86cde
Add support for loading keypairs from file
2019-03-12 12:46:44 +11:00
Paul Hauner
9de6a0c733
Rename benching files
2019-03-12 09:57:00 +11:00
Paul Hauner
e81f1c31c9
Fix proof-of-possession issues.
...
These were introduced in an earlier commit
2019-03-11 19:47:33 +11:00
Paul Hauner
292991810d
Move state processing benches around
2019-03-11 19:46:22 +11:00
Paul Hauner
85e7dd8b5a
Merge branch 'timing-report' of github.com:sigp/lighthouse into timing-report
2019-03-11 19:03:22 +11:00
Paul Hauner
7e79a2b3d3
Improve PublicKey Hash impl efficiency
...
Instead of SSZ-encoding, we just use the AMCL tobytes method.
2019-03-11 19:01:44 +11:00
Paul Hauner
5e5cfb782e
Add concurrency to TestBeaconStateBuilder
...
Specifically to generating the initial validator objects.
2019-03-11 18:58:49 +11:00
Kirk Baird
25b08f0096
Run cargo fmt
2019-03-11 15:22:15 +11:00
Kirk Baird
2b991854ab
Merge branch 'timing-report' of github.com:sigp/lighthouse into timing-report
...
Signed-off-by: Kirk Baird <baird.k@outlook.com>
2019-03-11 15:19:09 +11:00
Kirk Baird
191759dad0
Modify create_proof_of_possession, and verifying proof_of_possession in process_deposits
2019-03-11 15:18:45 +11:00
Paul Hauner
36085f63e9
Rename state trans benches
2019-03-11 14:52:21 +11:00
Kirk Baird
9c225936b6
Merge branch 'timing-report' of github.com:sigp/lighthouse into timing-report
...
Signed-off-by: Kirk Baird <baird.k@outlook.com>
2019-03-11 11:55:41 +11:00
Kirk Baird
df52669888
Add changes of create_proof_of_possession to pull
2019-03-11 11:55:09 +11:00
Paul Hauner
41844841c6
Update project tests to use new genesis structure
2019-03-11 11:52:16 +11:00
Paul Hauner
827365cfb0
Update fork_choice tests to use new state builder.
2019-03-11 11:33:35 +11:00
Paul Hauner
0b7082e2b9
Move benching_utils
structs into types
2019-03-11 11:17:27 +11:00
Paul Hauner
6ae99a1462
Ensure drop times aren't included in benchmarks
...
Also moves to the new `iter_batched` method on criterion (instead of
`iter_with_setup`.
2019-03-11 10:56:31 +11:00
Paul Hauner
a44d80006a
Improve allocation in get_attestation_participants
2019-03-10 21:07:09 +11:00
Paul Hauner
53456a6c79
Remove last inclusion_slot(..) call
2019-03-10 21:06:40 +11:00
Paul Hauner
21d75ef0bd
Add tree hash benches
2019-03-10 18:31:14 +11:00
Paul Hauner
f27b62d410
Add optimisation for epoch processing
2019-03-10 17:49:06 +11:00
Paul Hauner
9cc8e2598f
Organise epoch benching file
2019-03-10 17:48:26 +11:00
Paul Hauner
89fc386264
Add extra checks for epoch benches finalization
2019-03-10 13:38:57 +11:00
Paul Hauner
e99da31da8
Tidy BeaconStateBuilder struct
2019-03-10 12:56:57 +11:00
Paul Hauner
c33e299176
Ensure epoch processing benches get new eth1 data
2019-03-10 12:56:37 +11:00
Paul Hauner
3f98849362
Optimise attester slashing processing.
2019-03-10 08:55:45 +11:00
Paul Hauner
e7fba3a473
Process transfers in parallel.
2019-03-10 08:36:49 +11:00
Paul Hauner
1ca99b8c4c
Optimise deposits processing.
2019-03-10 08:33:17 +11:00
Paul Hauner
5f3da0732f
Fix attestations bug in block builder.
...
It was previously producing too many attestations in some scenarios.
2019-03-10 08:31:40 +11:00
Paul Hauner
90d00773cb
Add slashings back into per-block processing.
...
I thought they would invalidate the attestations but I was wrong.
2019-03-10 08:30:36 +11:00
Paul Hauner
c1e386a0b1
Add deposits, transfers and exits to benches
2019-03-09 22:10:47 +11:00
Paul Hauner
6250c81bb9
Fix bug in attestation verification
...
We were ensuring that a validator was present on the aggregation
bitfield before adding their signature to the agg pub
2019-03-09 20:09:17 +11:00
Paul Hauner
62ab782ee2
Add TestingAttestationBuilder
2019-03-09 20:09:02 +11:00
Paul Hauner
4bf2490163
Re-organise types::test_utils dir
2019-03-09 18:59:32 +11:00
Paul Hauner
f8ec1e0cfa
Add slashings and attestations to per block benching
2019-03-09 18:56:01 +11:00