Commit Graph

39 Commits

Author SHA1 Message Date
Raul Jordan
cfd3e548cd Use Map for Inclusion Distance in EpochProcessing (#2346) 2019-04-22 17:08:20 -07:00
Raul Jordan
629626dbe6
Loop Once Over state.LatestAttestations in Epoch Processing (#2342)
* single loop for extracting attestations

* complete
2019-04-22 17:31:01 -05:00
Preston Van Loon
fa5d627545
Remove too many spans in block/slot/epoch processing (#2236)
* remove too many spans

* gazelle
2019-04-12 00:55:07 -04:00
terence tsao
97b5ef0cc2
remove unused funcs and vars (#2214) 2019-04-08 16:29:02 +10:00
Raul Jordan
a98912ea58
State Transition Configuration Options (#2023)
* logging config options

* tests pass

* better naming

* log proposer idx instead of sig

* log avg balance
2019-03-18 00:19:44 -06:00
terence tsao
d8da9757d8
Add Spans for Epoch Processing (#1895) 2019-03-05 14:18:07 -08:00
Ivan Martinez
5aa7320507 Clear Up Code Inconsistencies (#1836) 2019-03-03 09:31:29 -08:00
terence tsao
6dc6a9b766 Misc Fixes for Epoch Processing (#1762)
* misc fixes for epoch processing

* more fixes

* more fixes

* added todos

* fixed tests

* lint
2019-02-28 20:47:32 -06:00
terence tsao
9f950211d8
Rename Shard Block Root to Crosslink Data Root (#1743) 2019-02-27 15:07:39 -08:00
Ivan Martinez
136950e0c5 Update some of client to v0.3 spec (#1733)
* Update validator to v0.3 spec

* Fix typos with rename
2019-02-27 12:21:15 -08:00
Raul Jordan
f1114ca35c
Align Epoch Processing With Spec (#1703)
* fix current boundary issue

* gazelle

* test fix

* deprecate old epoch processing justified hash indices

* finality fixes

* fmt

* pseudocode

* underflow conditions

* add back att fix

* remove off by one fix

* fix most tests

* fix all tests
2019-02-25 15:16:12 -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
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
terence tsao
de4c8667fd Fixed Get Block Root (#1616)
* fixed epoch_processing

* test p2p

* fixed get block root and tests

* in test nightmare, yay

* fixed all the tests

* lint
2019-02-15 17:19:36 -06:00
terence tsao
f8d8865020
Moved Rewards/Penalties Helpers to Helper Packages (#1583) 2019-02-13 17:33:45 +00:00
terence tsao
05b29d6226 Update PendingAttestationRecord Proto (#1567)
* fixed epoch_processing

* test p2p

* PendingAttestationRecord -> PendingAttestation
2019-02-12 12:04:30 -06:00
terence tsao
4cadd534db
Update Genesis Slot and Epoch (#1537) 2019-02-10 23:09:35 +01:00
terence tsao
b5e2a49dac Fixed a Prev Boundary Epoch Attestation Bug (#1547)
* fixed epoch_processing

* test p2p

* fixed PrevBoundaryAttestations and its tests
2019-02-10 11:28:33 -06:00
terence tsao
d008388bd1 Aligning ETH2.0 spec - Attestation and Epoch Processing - Part 2 (#1523)
* fixed epoch_processing

* epoch processing functions aligned

* fixed the last test!

* addressed nishant's comments
2019-02-09 14:15:59 -06:00
terence tsao
d837e5ef9e Aligning ETH2.0 spec - Attestation and Epoch Processing - Part 1 (#1519)
* fixed epoch_processing

* updated references in code

* starting fixing tests

* fixed rest of the tests. yay

* fixed transition test again
2019-02-07 15:46:22 -06: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
61026103c6
Validator Attester Rewrite (#1487)
* initial validator attesthead rewrite based on proposer rewrite

* proceed with fetching committees and tree hashing the canonical head at assigned attester slot

* complete filling the properties of attestation data and all associated root hashes

* add when to attest todo

* finish entire attester client logic

* tests with mocks checked in

* tests passing in client

* stubbed out server implementation

* fixed build due to old property

* regen mocks with new mockgen version

* fixed broken tests

* complete bazel build fix

* address some review comments

* deep proto test

* tests passing after checking for empty committee and crosslink root

* address nishant comments
2019-02-06 10:20:38 -06:00
terence tsao
2441266898
Aligning ETH2.0 spec - Crosslink Records (#1507)
* updated proto state fields to unlock alignment

* moved AttestationParticipants to rightful location

* crosslink committees to use epoch
2019-02-06 15:00:50 +01:00
terence tsao
720c80d8ee Aligning ETH2.0 spec - Make Epoch First Citizen (Package: Committee) (#1477)
* able to bazel build beacon chain.. yay

* fixed package validator tests

* fixed a few more package tests (epoch, blockops, forkchoice)

* fixed all the tests! and lint. Woohoo

* moving committee helpers to own package

* more fixes at epoch processing

* fixed rewards and penalties tests

* fixed rest of the tests. yay
2019-02-04 15:27:28 -06:00
terence tsao
3acffd878c
Aligning ETH2.0 spec - RANDAO helpers (#1454) 2019-02-01 22:22:52 +01:00
terence tsao
cdf50e2fa2 Aligning ETH2.0 Spec - Implemented Slot & Epoch Helpers (#1447)
* starting to use SlotToEpoch...

* updated exisiting functions...

* fixed epoch tests

* fixed rest of the tests

* tests for newly added helper functions

* fixed visiblity

* added PrevEpoch and NextEpoch helpers

* lint

* removed file from other commit
2019-02-02 00:52:35 +08:00
terence tsao
3eff953df3
Inclusion Distance with Multiple Attestations (#1404) 2019-01-31 10:33:12 +01: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
terence tsao
c0f36e467b
Eliminate Custody Logic for Phase 0 (#1408) 2019-01-30 11:11:13 +01:00
terence tsao
af1c382828
Remove Shard Committees 5 - Align Core Package (#1379) 2019-01-25 08:20:02 -08:00
terence tsao
821e7148f8
Remove Shard Committees 4 - Validator Registries Processing (#1368) 2019-01-23 23:09:52 -08:00
terence tsao
987b6e53b8
Remove Shard Committees 3 - Get RANDAO Mix Helper (#1364) 2019-01-23 22:44:19 -08:00
terence tsao
060a311a14 Core Package Clean up Part 2 (#1268)
* comments on core package declarations

* fixed sentence

* cap

* no extra line

* fixed tests

* gazelle
2019-01-10 07:49:50 +08:00
terence tsao
911d30031a
Hook up Epoch-Processing Logic Inside State Transitions (#1246) 2019-01-09 09:26:40 -08: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
terence tsao
72428239b8
Rewards/Penalties for Justification and Finalization Case 1 (#1173) 2018-12-26 07:46:06 -08:00
terence tsao
c7a92b88c8
Epoch Processing: Receipt Root, Justification and Finalization (#1158) 2018-12-23 22:36:09 -08:00
terence tsao
b9a233da7d Implemented Rest of Epoch Helpers (#1145)
* beginning epoch processing helper funcs

* renamed helpers to under epoch_operations

* implemented AttestingValidatorIndices

* deleted old epoch_processing.go file

* implemented WinningRoot & LowerThan helper funcs

* rest of the epoch helpers

* gazelle

* added tests

* merged

* mentioned LowerThan is for big endian format

* fixed spelling
2018-12-22 15:38:09 -05:00