Dustin Brody
13de015038
more 0.4.0 spec updates: renamings, continue Proposal updates, and note several more functions which were verified not to have changed in 0.4.0 ( #163 )
2019-03-11 09:33:24 -06:00
Jacek Sieka
aec31b1126
Updates for finalizing chain! ( #162 )
...
* set epoch_boundary_root - chain finalizes!
* fix slotStart to offset GENESIS_SLOT
* work around bug that will be fixed by
https://github.com/ethereum/eth2.0-specs/pull/732
* compile with debug info (there was a GC-related crash in C land)
2019-03-09 04:23:14 +00:00
Dustin Brody
1afdcda62d
spec version 0.4.0 update: shard_block_root -> crosslink_data_root; switch from validator.slashed_epoch -> validator.slashed approach; a couple assert -> doAssert; note fix for underflow-prone spec changes in checkAttestation; GENESIS_SLOT change from 2^63 to 2^32; refactor Proposer and ProposalSlashing structure; add signed_root; remove duplicate slashValidator ( #159 )
...
* spec version 0.4.0 update: shard_block_root -> crosslink_data_root; switch from validator.slashed_epoch -> validator.slashed approach; a couple assert -> doAssert; note fix for underflow-prone spec changes in checkAttestation; GENESIS_SLOT change from 2^63 to 2^32; refactor Proposer and ProposalSlashing structure; add signed_root; remove duplicate slashValidator
* re-apply shard_block_root -> crosslink_data_root
* remove incorrect humaneSlotNum
* add (run-time only, alas) sanity check on signed_root
2019-03-08 17:44:31 +00:00
Jacek Sieka
6bcefc0e42
verify blocks before storing in block pool / database ( #158 )
...
* fix state db lookup typo
* fix randao reveal slot when proposing blocks
* only store blocks that can be applied to a state
* store state at every epoch boundary (yes, needs pruning!)
* split out state advancement function when there's no block
* default state sim to 0.9 attestation ratio
2019-03-08 10:40:17 -06:00
Jacek Sieka
4d55cf8eea
beacon node sim: various improvements ( fixes #111 ) ( #156 )
...
* allow running more or fewer validators
* use deterministic key generation for tests to avoid exhausting system
RNG
* update README with simulator docs
* write the data of each validator to separate file, instead of a big
chainstart.json (makes it easier to run different validator counts)
2019-03-07 13:59:28 +00:00
Yuriy Glukhov
bed6510da3
Initial full sync impl
2019-03-01 19:39:38 +02:00
Jacek Sieka
125231d321
add initial block pool ( #139 )
...
* implement in-memory block graph
* store tail block in database
* resolve unknown parents by syncing them from peers
* introduce concept of resolved blocks and attestations - those that
follow minimal protocol rules
* update state head lazily
* log more stuff
* shortHash -> shortLog
* start 9/10 beacon nodes by default, last can be started manually
* see also #134
* fix start.sh epoch length
2019-02-28 15:21:29 -06:00
Yuriy Glukhov
5b60c3b45f
Enable discovery service regardless bootnodes are provided
2019-02-28 09:48:33 +02:00
Dustin Brody
34e6149f89
fix crosslink epoch refs to begin with GENESIS_EPOCH; more minor epoch processing tweaks/unstubbed-code ( #137 )
...
* fix crosslink epoch refs to begin with GENESIS_EPOCH; more minor epoch processing tweaks/unstubbed-code
* remove obsolete TODO and use humanEpochNum
2019-02-27 13:58:07 +00:00
Jacek Sieka
4c2d212781
updates
...
* comment on last finalized state
* use explicitly named proc's instead of type tricks
2019-02-21 15:38:26 -06:00
Jacek Sieka
1d9c91d230
cleanups
...
* add ancestor getter to db layer, and use
* remove head block call
* add trivial beacon chain db test
2019-02-21 11:20:50 -06:00
Jacek Sieka
2d307e2257
initial state replay implementation
...
* fix initial attestation pool on reordered attestations
* simplify db layer api
* load head block from database on startup, then load state
* significantly changes database format
* move subscriptions to separate proc's
* implement block replay from historical state
* avoid rescheduling epoch actions on block receipt (why?)
* make sure genesis block is created and used
* relax initial state sim parameters a bit
2019-02-20 22:42:17 -06:00
Dustin Brody
132f1147a2
spec 0.3.0 updates: EPOCH_LENGTH -> SLOTS_PER_EPOCH, SlotNumber -> Slot, EpochNumber -> Epoch ( #127 )
...
* spec 0.3.0 updates: EPOCH_LENGTH -> SLOTS_PER_EPOCH, SlotNumber -> Slot, EpochNumber -> Epoch
2019-02-19 19:33:58 -06:00
Jacek Sieka
4670d6c98a
naive attestation pool, in preparation of fork choice integration ( #125 )
...
* move attestation pool to separate file
* combine attestations lazily when needed
* advance state when there's a gap while attesting
* compile beacon node with optimizations - it's tooo slow right now
* log when unable to keep up
2019-02-20 00:35:02 +01:00
Dustin Brody
1269e001ad
get most 0.3.0 spec renamings ( #126 )
...
* get most 0.3.0 spec renamings
2019-02-19 17:07:56 -06:00
Jacek Sieka
c64cd2f275
a few simple SlotNumber cleanups
2019-02-18 22:43:33 +02:00
Mamy Ratsimbazafy
8e48bac58b
[WIP] Fix some issues after introducing "humaneEpochNumber" ( #118 )
...
* Fix some issues after introducing "humaneEpochNumber" + use slot_duration to 4
* Address humane comments
* Fix comment
2019-02-18 16:58:34 +01:00
Jacek Sieka
0e9cc20cfe
beacon node simplifications ( #116 )
...
* remove previous randao scheme code
* fix some epoch logging
* move genesis time selection to state generation
2019-02-15 17:33:32 +01:00
Dustin Brody
d3f97c1d5c
Merge pull request #115 from status-im/nus
...
complete switching to v0.2.0 RANDAO scheme, with verification enabled
2019-02-15 10:57:14 +00:00
Dustin Brody
8fbf87aa8c
complete switching to v0.2.0 RANDAO scheme, with verification enabled
2019-02-14 13:41:04 -08:00
Jacek Sieka
a71424d768
add more config options and log compile parameters ( #114 )
...
default sim runs with smaller chain now
2019-02-14 13:32:33 -06:00
Mamy Ratsimbazafy
b60fa131f1
Fix simulation regression due to custody_bitfield ( #108 )
2019-02-12 23:50:02 +01:00
Yuriy Glukhov
56a48cc60f
Fixed epoch actions ( #105 )
...
* Fixed epoch actions
* debugging asserts
* Revert "debugging asserts"
This reverts commit 9a11f5a7d8
.
2019-02-12 16:56:58 +01:00
Dustin Brody
d44999abc5
latest_crosslink_root -> latest_crosslink; adjust checkAttestation; add SHUFFLE_ROUND_COUNT and FORK_CHOICE_BALANCE_INCREMENT constants; some additional casts because a few places where ValidatorIndex was used are now uint64; remove some old commented-out lines of code from shardcommittee transition
2019-02-11 15:32:27 +01:00
Zahary Karadjov
c567bc410f
Use human-readable names for the slot numbers
2019-02-07 22:14:08 +01:00
Yuriy Glukhov
f1f1beb703
Fixed block proposal signature domain
2019-02-07 21:55:44 +01:00
Dustin Brody
072c1607fd
implement new RANDAO reveals ( #92 )
...
* implement new RANDAO reveals
2019-02-07 21:13:10 +01:00
Zahary Karadjov
dfcd22519b
Fix for getting the current epoch number
2019-02-07 16:40:00 +01:00
Jacek Sieka
ed8f7ab475
schedule epoch actions for all 64 slots in an epoch
2019-02-07 13:18:00 +01:00
Jacek Sieka
976e1e1f10
spec: remove unused code, fix state_sim speed
2019-02-07 13:03:02 +01:00
cheatfate
20e7ca48b5
Fix `validator not in registry` and `$` bugs.
2019-02-07 12:51:21 +02:00
Dustin Brody
2d71b998c7
Spec update to v0.1 ( #88 )
...
* update based on https://github.com/ethereum/eth2.0-specs/pull/483
* more spec updates
2019-02-07 11:43:21 +01:00
Dustin Brody
788b093284
Merge pull request #87 from status-im/vdy
...
Spec updates
2019-02-06 22:52:36 +00:00
Dustin Brody
74cb86ec21
more spec changes
2019-02-06 21:37:21 +01:00
Jacek Sieka
2f96c4bade
spec: remove ShardCommittee remnants, add CrosslinkCommittee helper
2019-02-06 20:37:25 +01:00
Mamy Ratsimbazafy
11da02c34f
Asyncdispatch2 rebranding to chronos ( #84 )
...
* Asyncdispatch2 rebranding to chronos
* nim-eth and nim-chronos part of nimble packages
* fix package name
2019-02-06 18:56:04 +01:00
Yuriy Glukhov
7f1bddb267
Use nim-eth ( #82 )
2019-02-05 20:21:18 +01:00
Yuriy Glukhov
bbd94185a4
State storage predicate moved to beacon_node, split persistBlock to persistBlock and persistState
2019-02-04 21:44:37 +01:00
Yuriy Glukhov
917c48d9a5
More persistance
2019-02-04 21:44:37 +01:00
Dustin Brody
8dadbd3257
fix spurious assertion per https://github.com/ethereum/eth2.0-specs/issues/515
2019-01-28 20:49:20 -08:00
Dustin Brody
4574178836
epochs replace slots as main first-class entity; several mechanical renamings (ForkData -> Fork; .fork_data -> .fork; remove stub custody types/code; some type aliasing to keep slots and epochs more enforceably separate; fix test_state_transition.nim assumption that GENESIS_SLOT == 0
2019-01-28 19:22:22 -08:00
Dustin Brody
b46183047f
remove BeaconState.shard_committees_at_slots in favor of crosslink committees; validator_registry_latest_change_slot -> validator_registry_update_slot mechanical renaming
2019-01-28 23:43:55 +02:00
Dustin Brody
f85088651c
Revert "remove BeaconState.shard_committees_at_slots in favor of crosslink committees; validator_registry_latest_change_slot -> validator_registry_update_slot mechanical renaming"
...
This reverts commit 2222a8e222
.
2019-01-26 11:17:22 -08:00
Dustin Brody
2222a8e222
remove BeaconState.shard_committees_at_slots in favor of crosslink committees; validator_registry_latest_change_slot -> validator_registry_update_slot mechanical renaming
2019-01-26 11:15:33 -08:00
Jacek Sieka
e0a257406e
clean up and add some logging ( #70 )
2019-01-25 11:35:22 -06:00
Zahary Karadjov
a9c026b957
More logging close to the code that fails often
2019-01-21 21:43:08 +02:00
Dustin Brody
476052b314
deposit root to Eth1Data transition
2019-01-18 12:47:30 +02:00
Zahary Karadjov
43ae45fe7e
Add --logLevel command-line flag; Fix running the start.sh script from the beacon-chain repo
2019-01-17 14:38:27 +02:00
Yuriy Glukhov
7e4d264887
Back the db by rocksdb backend
2019-01-17 14:38:16 +02:00
Dustin Brody
1bf876f5c1
mechanical renamings
2019-01-16 02:21:06 -08:00