Commit Graph

69 Commits

Author SHA1 Message Date
Preston Van Loon
9abefc386d Remove redundant assignments request in validator attesting routine (#2166)
* remove redunant assignments request in validator attesting routine

* fix test
2019-04-05 14:29:13 +08:00
Preston Van Loon
f670a134a0
More span tags in validator (#2162)
* add more tags to spans when proposing a block

* more stuff tags on attestation span

* add slot
2019-04-04 20:23:48 -05:00
Preston Van Loon
ae4425ac2d add more tags to spans when proposing a block (#2161) 2019-04-04 18:07:15 -07:00
Preston Van Loon
f3a2fc64f1 take first validator key (#2116) 2019-03-30 15:13:01 -05:00
shayzluf
fe247f6cc5 keystore and account support for multi key (#2054)
* keystore and account support for multi key

* fix service issues

* fix Potential file inclusion

* fix Potential file inclusion try2

* Update shared/keystore/keystore.go

remove security detection for file read

Co-Authored-By: shayzluf <thezluf@gmail.com>

* getkeys uses map to pt multiple copies of the same key

* use 12 char of public key to differentiate file names

* use map in test

* fix changes from 2069 into here

* add // #nosec G304
2019-03-29 17:26:41 -05:00
Ivan Martinez
365a06e709 Fix multiple deposits to the same pubkey pre-chain-start (#2030) 2019-03-28 20:44:27 -07:00
Raul Jordan
839845645c
Request Assignments From Canonical Slot Upon Activation (#2097)
* request assignments from the canonical head slot at first

* imports
2019-03-27 20:03:25 -05:00
terence tsao
62ad3dfd61 Fix epoch numbers for logs (#2096)
* fixed loggings

* imports
2019-03-27 15:58:02 -05:00
Preston Van Loon
030f44bb04 Revert "Treat Post & Pre-ChainStart Validators Equally in Assignments Fetching (#2074)" (#2086)
This reverts commit fcc18fac02.
2019-03-26 22:30:22 -05:00
Raul Jordan
fcc18fac02
Treat Post & Pre-ChainStart Validators Equally in Assignments Fetching (#2074)
* treat post/prechainstart validators equally in assignment fetching

* Update validator/client/fake_validator_test.go

Co-Authored-By: rauljordan <raul@prysmaticlabs.com>

* status err code

* imports

* beyond activation epoch

* assigned to slot log

* gazelle
2019-03-26 09:03:05 -05:00
Preston Van Loon
2b3cb50461 Fix bug where proposer didn't also attest (#2073)
* fix bug, thanks @djrtwo

* remove unnecessary variable

* fix lint

* danny cfg
2019-03-26 00:14:03 -05:00
Raul Jordan
053038446c
Allow 8 Validator Multinode Cluster to Run Indefinitely (#2050)
* plug forkchoice to blockchain service's block processing

* fixed tests

* more fixes...

* clean ups

* fixed test

* Update beacon-chain/blockchain/block_processing.go

* merged with 2006 and started fixing tests

* remove prints

* fixed tests

* lint

* include ops service

* if there's a skip slot, slot--

* fixed typo

* started working on test

* no fork choice in propose

* bleh, need to fix state generator first

* state gen takes input slot

* feedback

* fixed tests

* preston's feedback

* fmt

* removed extra logging

* add more logs

* fixed validator attest

* builds

* fixed save block

* children fix

* removed verbose logs

* fix fork choice

* right logs

* Add Prometheus Counter for Reorg (#2051)

* fetch every slot (#2052)

* test Fixes

* lint

* only regenerate state if there was a reorg

* better logging

* fixed seed

* better logging

* process skip slots in assignment requests

* fix lint

* disable state root computation

* filter attestations in regular sync

* log important items

* better info logs

* added spans to stategen

* span in stategen

* set validator deadline

* randao stuff

* disable sig verify

* lint

* lint

* save only using historical states

* use new goroutine for handling sync messages

* change default buffer sizes

* better p2p

* rem some useless logs

* lint

* sync tests complete

* complete tests

* tests fixed

* lint

* fix flakey att service

* PR feedback

* undo k8s changes

* Update beacon-chain/blockchain/block_processing.go

* Update beacon-chain/sync/regular_sync.go

* Add feature flag to enable compute state root

* add comment

* gazelle lint fix
2019-03-25 10:21:21 -05:00
shayzluf
6335833c94 Validator: performing for multiple keys - update rpc proto (#2040)
* first version - broken

* Scripts to update mockgen

* working proto changes

* resolve review remarks

* fix goimport issues
2019-03-23 19:46:25 -05:00
Preston Van Loon
810930d6a7
Fix sleep logic for attesting (#2048)
* sleep before attesting

* Test
2019-03-20 19:51:25 -04:00
Raul Jordan
7a83acf46d
Improve Validator Logging and Default Flags (#2013)
* improve validator logging significantly

* warn validator not yet assigned to epoch

* build added

* report validator logs

* validator performance logging

* all logging improvements

* validator attest better logs

* improved attester logging

* average balances

* dont hash useless hashes

* Update validator/client/validator_propose.go

Co-Authored-By: rauljordan <raul@prysmaticlabs.com>

* address some comments

* standardize with block root hash32, renamings

* gazelle

* builds

* improve average eth balance

* eth net gains/losses

* fix tests

* spacing

* goimports

* avg balance

* update pbs

* addressed preston comments

* imports

* gazelle
2019-03-18 09:45:28 -06:00
Preston Van Loon
5ddf367291
Fix assignments bug where validators don't retry for assignments on failure (#2000) 2019-03-14 21:39:25 -04:00
Nishant Das
00ca1d7991 Fix Errors with Attestation to Current Chainhead (#1990)
* fix errors

* fix bit check to little endian

* fix all tests
2019-03-14 12:29:44 -04:00
Raul Jordan
ef8232ae2e
Do Not Propose if Assigned to Genesis Slot (#1989)
* do not propose if assigned to genesis

* fix bitset

* revert bitset

* regress test

* rem commented blocks
2019-03-14 10:13:57 -04:00
Ivan Martinez
84b7c3654b Rename forkutils -> forkutil (#1976) 2019-03-12 16:39:13 -07:00
terence tsao
bb46784735 Fix Attestation Aggregation Bitfield (#1975)
* fixed setting aggregation bitfield

* fix tests

* space

* travis
2019-03-12 16:05:08 -04:00
Preston Van Loon
a7a22856f2
Do not propose a block when compute state root fails (#1972) 2019-03-12 12:49:09 -04:00
Raul Jordan
c1a9937760
Post ChainStart Validator Activation (#1934)
* implemented all the merkle func signatures

* branch indices complete

* check for index out of range in generating merkle proof

* completed full tests for sparse merkle trie impl

* lint

* formatting

* gazelle

* commentary

* ivan comments

* fmt

* get rid of the deposit trie

* recalculate trie when eth1 data changes

* default data response recalculates tree

* update merkle trie to use raw bytes

* use the new verify merkle root func

* builds

* if default data response historical deposits are empty, return the deposit root at the contract at the time

* work on trie

* trying again with more logging

* keep track of merkle trie indices, use correct big int ops

* use uint for merkle idx

* add todo

* update ticker correctly

* fix config and remove unnecessary logs

* readd plus one fix

* clarify some details

* weird imports spacing

* gazelle, lint

* fix tests using the new deposit trie

* builds but tests still fail

* rpc tests

* lint

* tests pass

* bazel lint

* rem commented block

* revert att slot fix

* preston comments

* comments

* fix build

* address last comment

* use counter

* imports
2019-03-12 00:05:55 -04:00
Preston Van Loon
e4588d9be0
Revert "Create and Verify Signatures for Attestations (#1908)" (#1958)
This reverts commit 23072983ff.
2019-03-10 20:02:47 -04:00
Nishant Das
028506e7ed Handle Panics in Remaining Services (#1926)
* add recovery for initial sync

* add recovery for rpc

* adding to other services

* remaining services and tests

* fix test

* remove changes to rpc

* handle powchain

* handle in powchain

* abstract to shared package

* gazelle

* lint

* remove for operations

* add in more for operations

* travis

* fix lint
2019-03-10 17:53:28 -05:00
Preston Van Loon
16be050f4b fix validaotr pending attestations call (#1941) 2019-03-09 08:29:47 +08:00
Ivan Martinez
23072983ff Create and Verify Signatures for Attestations (#1908)
* Verify signatures of attestations

* Implement BLS Signing for attestations

* Remove custody bit 0 from the attestation for now

* Fixes tests for attestations

* Fix tests to ensure they use proper attester indice

* Run gazelle

* Goimports

* Test attestation sigs in block operations

* Change formatting and make sure signatures are actually verified

* Fix duplicate import

* Fix duplicate import from merge

* Organize attestation sig to be conssitent with codebase

* Update to comments

* Change signatures to use aggregation

* Run gazelle

* Change function to return err instead of bool
Also gofmt

* Fix for comments

* Move createAggregationSignature to a function in attestations.go
2019-03-08 15:30:01 +08:00
Preston Van Loon
90225aac31 PendingAttestations: allow for request to specify a slot (#1922)
* PendingAttestations: allow for request to specify a slot

* enhance the test
2019-03-07 09:56:22 -06:00
Preston Van Loon
34f0241f32
Fix wait for activation (#1913)
* fix but no test

* ensure a canonical state is sent
2019-03-06 15:13:09 -05:00
Raul Jordan
44edbd4fbc
Validator Client WaitForActivation Implementation (#1898)
* create wait for activation stream

* wait for activation server stream open

* complete server side logic

* formatting

* first test passing

* context closed test

* lint

* fix build failure

* imports

* implemented wait for activation on client side

* all tests pass for validator client

* weird spacing
2019-03-05 18:09:41 -06:00
terence tsao
17682321fe
Clean Up Validator RPC Server (#1798) 2019-03-03 14:55:12 -08:00
Ivan Martinez
5aa7320507 Clear Up Code Inconsistencies (#1836) 2019-03-03 09:31:29 -08:00
Nishant Das
9de86c0d3a make less aggressive log (#1786) 2019-03-02 08:58:58 -05:00
Nishant Das
615daa98e9
Add Error Log for Attester (#1759)
* add log

* add test
2019-03-02 09:57:02 +08:00
Raul Jordan
88765b6d3c
Fix Attestation Info at Slot to Match Justified Epoch Expectations (#1768)
* fix crosslinkt committees

* fix lint

* fix in epoch

* imports

* add gx tags

* epoch shuffling tests

* regress test

* preston comments

* service change

* advance to handle skip slots

* ready

* imports

* rem unnecessary log

* revert config

* last comment

* imports
2019-03-01 18:33:55 -06:00
Preston Van Loon
a19cb1864e Tracing additions (#1747) 2019-02-27 19:55:47 -08: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
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
Ivan Martinez
0d29b2cd91 Makes test naming consistent across codebase (#1636) 2019-02-22 07:11:26 -08:00
Raul Jordan
dcc0672a19
Fatal if ChainStart Receiving Fails (#1665)
* fatal if impossible to receive chainstart

* fix tests
2019-02-20 15:58:23 -06:00
terence tsao
06bfda24d5 Revert "Remove Redundant Committee Assignment Getters in Validator RPC Service (#1655)" (#1664)
This reverts commit 15f8b6a10d.
2019-02-20 14:46:30 -06:00
terence tsao
15f8b6a10d
Remove Redundant Committee Assignment Getters in Validator RPC Service (#1655) 2019-02-20 11:53:49 -08:00
Raul Jordan
19abe81472
Implement Randao Reveal Signing in Proposer Client (#1650)
* finish the BLS API wrapper

* all tests passing

* unexported comment

* gofmt tests for bls

* block processing test into own package to avoid cycle

* randao tests pass

* blocks test passing

* use common deposit generator

* helper

* resolved import cycle

* setup initial

* builds

* almost done with blockchain tests

* fix blockchain tests

* getting through with chaintests

* revert client change

* lint

* sync master conflict gazelle

* randao test fixes

* randao proposer impl

* tests pass
2019-02-20 12:58:34 -06:00
Raul Jordan
2425bef5c7
Update Configuration, Naming, and GenesisStart to Accommodate Randao (#1647)
* signature on startup configuration

* remove ref to hash32s for randao

* completed changes
2019-02-19 14:24:00 -06:00
Raul Jordan
c5c7d40398
Create Wrapper Around Pure Go BLS Project in Prysm (#1625)
* finish the BLS API wrapper

* all tests passing

* unexported comment

* gofmt tests for bls

* slice

* len

* cap err string

* tests

* imports

* gazelle
2019-02-19 09:09:50 -06:00
Raul Jordan
3e46381b3f
Fetch the Correct Chain Head During AttestHead (#1596)
* correct attester view of chain head and prioritize proposer

* fix attempt not working

* revise with correct logic

* attester fixess to root fetching, spec did not make sense

* comments to match code

* fix attester responsibility

* comments
2019-02-18 23:49:56 -06:00
Ivan Martinez
650372915f Hotfix/add both role case (#1627) 2019-02-18 14:51:49 -08: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