Commit Graph

40 Commits

Author SHA1 Message Date
Preston Van Loon
a19cb1864e Tracing additions (#1747) 2019-02-27 19:55:47 -08:00
Nishant Das
a27c52e3a3
Update Initial Sync (#1694)
* adding check for chainHead

* add batch block limit

* adding state root

* removing genesisHash

* removing setBlockForInitialSync

* fixing tests

* remove obsolete check

* changing to check for state initialization

* changing var name

* fix test

* add in tests

* fix all tests

* lint

* reduce test time

* merge fixes

* gazelle
2019-02-26 13:37:28 +08:00
Raul Jordan
20803b4c9d
Revert Usage of ssz.TreeHash Across Repo (#1711)
* revert using ssz.TreeHash

* gazelle
2019-02-25 21:42:31 -06:00
Raul Jordan
e19920aec1
Miscellaneous Runtime Fixes & Improvements - Raul (#1674)
* fatal if impossible to receive chainstart

* fix tests

* fix

* custom delay

* completed custom delay

* errors

* better logs, nothing at genesis

* use demo in val

* add gazelle

* log

* starting to log stuff

* pass in ops

* avoid printing the large #s for debug, still working on tests..

* all around better logging

* fixed build error in epoch process

* fixed state transiton tests

* fixed block tests

* lint

* verify sigs in randao

* ready for inclusion falg

* only print waiting when slot is not valid

* fix build

* mod config

* fixed last justified slot issue

* fix inclusion

* fixed attestation issue

* using zero hash from params instead

* fix tests

* update balance

* removed swp

* more `- genesis_slot` for logs

* rem unused log

* fix broken tests

* account for skip slots in state root computation

* fixes done

* validator guide bug fixes - 671

* epoch boundary at the last slot of the epoch

* fix epoch issue

* more balance cal logs for debugging

* greater balance

* attestaton fixes

* fixes

* addressed testrun

* fixed ejection balance

* fix tests with far future epoch

* revert sync change

* revert initial sync change

* fix changes

* off by one att fix

* revert the att fix

* address comments

* format

* fix build

* rem file
2019-02-24 20:09:45 -06:00
Nishant Das
f5c88e1bcb
Test Syncing with Another Fully Synced Service (#1594)
* clean up test

* adding test setup

* add chainstart check to sync querier

* goimports

* goimports

* backend cleanup

* adding getters

* lint

* moving to db

* gazelle

* adding more services setup

* adding more changes

* adding different test setups

* other merge issues

* imports

* fixing keys

* get intial sync able to be set up

* new changes and gazelle

* use simulated p2p

* everything finally works

* unexport fields

* revert changes from merge

* remove mock server

* add documentation

* gazelle

* add another node

* review comments

* fix tests
2019-02-23 11:36:20 +05:30
terence tsao
8c04ced1a6 Name Changes to Align with V0.3 (#1621)
* fixed epoch_processing

* penalize->slash

* exit -> voluntary_exit

*  SEED_LOOKAHEAD -> MIN_SEED_LOOKAHED

* ENTRY_EXIT_DELAY -> ACTIVATION_EXIT_DELAY

* `INCLUDER_REWARD_QUOTIENT` -> `ATTESTATION_INCLUSION_REWARD_QUOTIEN`

* LatestIndexRoots -> LatestActiveIndexRoots

* `MIN_VALIDATOR_WITHDRAWAL_EPOCHS` -> `MIN_VALIDATOR_WITHDRAWAL_DELAY`

* MAX_WITHDRAWALS_PER_EPOCH -> MAX_EXIT_DEQUEUES_PER_EPOCH

* ETH1_DATA_VOTING_PERIOD -> EPOCHS_PER_ETH1_VOTING_PERIOD

* SLOT_DURATION -> SECONDS_PER_SLOT

* EPOCH_LENGTH -> SLOTS_PER_EPOCH

* SLOT_DURATION -> SECONDS_PER_SLOT take 2

* rest of the misc fixes for config name changes

* remove tools/bootnode/.!74296!bootnode.go

* `current_epoch_start_shard` -> `current_shuffling_start_shard`, `current_shuffling_epoch`, `current_shuffling_see`

* go fmt

* fixed comment

* updated pseudocode comments

* merged master
2019-02-18 10:52:16 -06:00
Raul Jordan
ae13bb5c83
Use Tree Hashing Algorithm Everywhere for Block Roots and State Root (#1577)
* begin using tree hash instead of hash for state and blocks

* replace with ssz

* rem references to vote cache

* replace all instances of state/block hash with root

* goimports

* almost every test in the world fails

* goimports

* all tests pass, tree hash across repo
2019-02-14 14:04:47 -06:00
terence tsao
4cadd534db
Update Genesis Slot and Epoch (#1537) 2019-02-10 23:09:35 +01:00
Nishant Das
9ecef934d8 Update Beacon State to Match the Spec (#1489)
* first line of changes

* fix all tests in core package

* Finished fixing up all tests

* docs

* more docs
2019-02-06 10:44:27 -06:00
Raul Jordan
cec6c8de83 Standardize Naming of Shared Packages, Remove Deprecated Packages (#1435)
* rem txpool

* standardize repo shared utils, remove deprecated items

* complete

* package lvl godoc
2019-01-31 10:53:58 +08:00
Ed Mazurek
10b237e72d db methods: remove Get prefix (#1351)
* db methods: remove Get prefix for getter functions

* db methods: consistent test names by removing Get
2019-01-21 17:34:11 +08:00
Nishant Das
7ff544fddf
Fix travis and Other Linter Errors (#1356)
* fix travis and other linter errors

* remove megacheck
2019-01-21 13:35:34 +08:00
Preston Van Loon
592c5c3d92 Refactor hashing of beaconblock to shared (#1315)
* Add beacon block hash function

* Refactor/remove old hash method

* gazelle
2019-01-15 00:41:20 +08:00
terence tsao
e313e97666
Implement Validator Rotation Logic (#1279) 2019-01-13 12:52:31 -08:00
Andrei Ivasko
b29188128d ToBytes32 (#1306) 2019-01-13 09:04:14 -05:00
Raul Jordan
4bb6196f4f
Wrap Up Data Structure Renaming (#1270)
* spec renames

* fix goimports

* fix items
2019-01-09 03:49:17 -06:00
Raul Jordan
7e1af4fceb
Remove Use of Proto .GetX for Value Getters (#1235) 2019-01-04 21:58:19 -06:00
Raul Jordan
952dbe983e
Integrate Block Operations Into State Transition (#1135) 2018-12-26 21:15:12 -06:00
Nishant Das
5804dcfb67
Add Batch Syncing for Initial Sync (#1119)
* adding proto objects

* simulator changes

* adding stuff for initial sycn

* more changes

* finally fixed test

* fixing tests and sync

* test fix

* adding batched block response

* remove types references

* fix tests

* addressing review

* removing genesis block

* updating protos

* fix merge conflicts

* file permissions
2018-12-26 22:16:46 +08:00
Nishant Das
9db1002d87
Updating Genesis Block to Spec (#1172)
* Updating to spec

* addressing review comments
2018-12-25 14:47:07 +08:00
Raul Jordan
5d26efcfaa
Deprecate types.BeaconState with pb.BeaconState Generated Proto (#1164) 2018-12-23 16:51:04 -06:00
Preston Van Loon
10f45744d6
Use gogo protobuf as the protoc compiler (#1165)
* first commit, remote att types

* no more agg attestation proto

* regen mock

* only attestations

* proto

* att process

* fix att references

* more tests passing

* use att protos

* complete

* change visibility

* use gogoprotobu
2018-12-23 15:34:59 -05:00
Raul Jordan
e49a190754
Replace Types of Block Primitives With Proto Generated Types (#1137)
* refactor repo to use protos

* removed block successfully in types

* db package updated

* db, core passing

* chain service done

* no more block instances

* all pass

* deprecate all block protos

* tests pass
2018-12-20 17:00:38 -05:00
Nishant Das
724b036fff
Combine Sync Services (#1060)
* adding initial service

* got it working

* deleting redundant querier file

* golint

* formatting span messages

* lint

* lint

* addressing raul's comments
2018-12-10 13:26:44 +08:00
terence tsao
121654ff12
Removed Deprecated BeaconBlock Fields (#1035) 2018-12-03 08:10:47 -08:00
Raul Jordan
a99de08562
Merge Active/Cystallized State (#1019) 2018-12-01 16:09:12 -06:00
Nishant Das
16b04699d0 Allow Initial Sync to Work with Simulator (#669)
* polling interval

* adding proto message

* changing proto messages

* changing naming

* adding slot functionality

* initial sync working

* new changes

* more sync fixes

* its working now

* finally working

* add tests

* fix tests

* tests

* adding tests

* lint

* log checks

* making changes to simulator

* update logs

* fix tests

* get sync to work with crystallized state

* fixing race

* making requested changes

* unexport

* documentation

* gazelle and fix merge conflicts

* adding repeated requests

* fix lint

* adding new clock , db methods, and util func

* revert change to test

* gazelle

* add in test

* gazelle

* finally working

* save slot

* fix lint and constant
2018-11-21 10:00:36 -08:00
Nishant Das
f46ee335bd
Allow Sync Service to Query State Of Network (#787)
* adding proto messages

* adding fields

* adding new service

* new changes

* checking in file from syncFix

* fixing test

* add test

* adding to node

* goimports

* adding query service to sync services

* sync working

* finally works

* fix test

* lint

* fix build

* fix test
2018-11-19 09:59:11 +08:00
terence tsao
abfe430f03 Beacon Node Logging Enhancement (#826)
* fixed logging

* typo
2018-11-18 18:21:02 -05:00
Yutaro Mori
1f00cfe23e
Replaced HasStoredState with IsSyncedWithNetwork (#662) 2018-10-16 07:22:15 +09:00
Yutaro Mori
d1eefa5cc7 Use consistent hash formatting (#650) 2018-10-12 08:35:49 -07:00
terence tsao
efeb6976d1
Align Block and State Field Names with Spec (#628) 2018-10-09 19:34:50 -07:00
Raul Jordan
cd2073e84f
Cleanup and Refactor Shared Package (#634) 2018-10-09 00:58:54 -05:00
Yutaro Mori
ce99bd7605 Refactor to Create DB Package (#582) 2018-10-05 13:14:50 -04:00
Preston Van Loon
e5569c88f8
More todos (#558)
* Add TODO link for issue #555

* Remove database related TODO

* update todo for issue #426
2018-09-22 12:58:24 -04:00
Raul Jordan
419cff2512
--Dev Mode Flag for Local Demo/Development (#537) 2018-09-21 16:02:17 -05:00
Preston Van Loon
3c264be1c1
Clean up some p2p related TODOs (#521)
* Remove error checking for type assertions on p2p messages. The code should fail earlier in the p2p layer. Also fixed format on some TODOs

* format TODO again

* Add a bit more tests for p2p stuff

* goimports on feed_mock

* remove unused import
2018-09-16 14:02:53 -04:00
Nishant Das
cddae7a306
Implement RPC Messaging Between Validators (#475)
* Adding Proto files

* Move to shared package

* adding attestation sub

* gazelle

* attestation check

* proposal finished

* Add in attesters responsibilities

* fixing dependency issues

* adding topics

* refactoring tests

* Adding more tests

* adding more changes

* gazelle

* removing attester p2p

* remove mock

* changing to new proposer model

* changing tests

* making changes

* gazelle

* adding gomock

* adding rpc methods, reverting changes to other proto files

* gazelle and test changes

* adding tests

* adding mocks and tests

* gazelle

* fixing merge issues

* lint

* lint
2018-09-16 09:12:36 +08:00
Preston Van Loon
db1138ae1f
Fix p2p issues in #465 (#489) 2018-09-09 18:15:24 -04:00
Yutaro Mori
7cfda8a149 Extract Initial Sync Into its Own Package (#404)
* Initial commit to extract initial sync code

* Add stop/resume of sync/intialsync

* bazel run

* gometalinter

* add tests

* cleanup

* build fixes

* use infof rather than errorf if sync is not in correct state

* Add TODO comment detailing eventual completion of transition from initial sync to sync

* fix build

* pr comments

* fix tests

* bump
2018-08-22 09:52:03 +08:00