Commit Graph

757 Commits

Author SHA1 Message Date
Raul Jordan
a4128f691b
Refactor DB Package to Enable Multiple Blocks/States at Slots (#2540)
* prefixed blocks blocked

* db refactor

* new historical state saving

* builds but tests fail

* more tests pass

* fix tests

* fix tests

* delete buf

* Update beacon-chain/db/block.go

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

* Update beacon-chain/db/block.go

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

* rem unused
2019-05-09 10:42:12 -05:00
Preston Van Loon
7c47db0015 add attestation data req cache (#2542)
* add attestation data req cache

* add tests

* godocs

* fix cache size gauge

* lint

* fix tests

* gazelle

* add more comments
2019-05-08 19:27:29 -05:00
terence tsao
b05f64ff91 enhance forkchoice log (#2537) 2019-05-08 19:00:30 -05:00
Preston Van Loon
8a4f322e2c Check context has not expired before expensive operations (#2541)
* use ctx.Err for potentially expensive RPC methods, use batch for saving attestations

* more

* in sync too

* Update BUILD.bazel

* fix spacing
2019-05-08 18:51:00 -05:00
terence tsao
104966b63d Sync Responds With Canonical Block Lists (#2539)
* first attempt at canonical blk list

* lint

* condition 1

* ctx w/ time out

* added canonical block list tests

* revert

* add to BeaconChainFlags

* dont use map, use proto

* attempt to use proto, take 1

* add run

* like canonical better than head

* removed unused

* Update proto/beacon/p2p/v1/messages.proto

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

* protos
2019-05-08 18:23:06 -05:00
terence tsao
fe3fd57600 removed unused doesParentExist (#2538) 2019-05-08 11:37:00 -05:00
Raul Jordan
0bab9f492d Do Not Run Fork Choice on Block Proposals (#2526) 2019-05-07 23:02:52 -07:00
Preston Van Loon
57495bc8fe Revert "Canonical Blocks for Batch Block Request (#2511)" (#2532)
This reverts commit a818564b8d.
2019-05-08 00:52:34 -05:00
Preston Van Loon
e5cb1db5bc Sort list before processing batched blocks (#2531) 2019-05-08 12:27:00 +08:00
Raul Jordan
76881fd1ae
Do Not Subscribe to Blocks in Initial Sync (#2524)
* only sub to block batches

* batch sub remove

* tests

* fix lint

* gazelle

* delete old im mem blocks code
2019-05-07 21:12:36 -05:00
terence tsao
7642f950d8
delete failed pending atts (#2528) 2019-05-07 18:46:16 -07:00
terence tsao
eb626e5834
fixed atts verification (#2527) 2019-05-07 15:51:41 -07:00
terence tsao
0f0510096e Update Attestation Target for AttestHead (#2525)
* update attestation target for AttestHead

* fixed test
2019-05-07 17:31:06 -05:00
Nishant Das
1be950f90c fix validator flags (#2518) 2019-05-06 21:49:03 -05:00
Raul Jordan
cd0002a6af
Do Not Broadcast Attestations in Operations Service (#2509)
* no att broadcast

* broadcast in rpc but not operations

* fix space

* tests
2019-05-06 15:30:29 -05:00
Raul Jordan
4954ed0221
Use Single Code Path for Receiving Blocks and Fork Choice (#2514)
* insert canonical

* one path

* single entry

* travis

* lint
2019-05-06 15:06:41 -05:00
terence tsao
a818564b8d
Canonical Blocks for Batch Block Request (#2511)
* only reply canonical block for reg sync

* CanonicalBlock test

* lint
2019-05-06 11:02:04 -07:00
Preston Van Loon
e5a00fdca9
Add GCP test configuration and p2p-host-ip flag (#2510)
* Add GCP startup script

* add flag for external IP

* specify that it must be for linux

* /deploy/create

* gofmt
2019-05-06 13:33:19 -04:00
Raul Jordan
d68111e051
Fix Status Update Progression in RPC Server (#2495)
* fix status updates

* standardize logs in validator

* tests

* fix conditional
2019-05-05 17:39:12 -05:00
Raul Jordan
f60f3dfd2d Lookup Validator Index in State in Status Check (#2494)
* state lookup

* refactor duplicate code

* refactor with mapping

* fix broken tests

* finish refactor
2019-05-05 16:09:02 -04:00
Nishant Das
409111e374 Estimate the Time Till Follow Distance Is Completed (#2486)
* use estimation instead

* fix test

* fixing another test

* fix tests and preston's comments

* remove unused var

* fix condition

* Revert "fix condition"

This reverts commit dee0e3112c01f68f30a2e50cd4eb35f29f672e1d.

* dont return error
2019-05-05 13:18:57 -04:00
Raul Jordan
406fb40883
Fix Validator Status Field in RPC Server (#2492)
* fix status of key

* status test fix

* fmt
2019-05-05 12:05:21 -05:00
Raul Jordan
d5c0a99578 Display Only Active Validator Data (#2490) 2019-05-05 09:40:21 -07:00
Nishant Das
2442b1a4d6
fix chainstart waiting on rpc server (#2488) 2019-05-04 20:04:12 +08:00
Nishant Das
16b42f4ac6
change logging (#2487) 2019-05-04 12:11:34 +08:00
terence tsao
71b702a3ab Only Log Active Balances (#2485)
* only log active balance

* dont need ()
2019-05-04 11:31:26 +08:00
Raul Jordan
939382ac86 Better Error Message if Failing to Exit Initial Sync (#2483)
* no err throw

* nil errors

* better error on init sync
2019-05-04 10:13:33 +08:00
Raul Jordan
329d467008
Fix Status Nil Pointer Error (#2480)
* no err throw

* nil errors
2019-05-03 16:55:56 -05:00
Raul Jordan
f612d9ff5b
no err throw (#2479) 2019-05-03 15:28:11 -05:00
Nishant Das
7d88e1e15e Allow Client to Retrieve Multiple Validator Statuses (#2474)
* multiple validator statuses

* gazelle

* context

* fixing bugs

* remove old way of checking

* fix logging

* make activation queue more accurate

* fix rpc test

* add test

* fix remaining tests

* lint

* comment

* review comments
2019-05-03 12:13:34 -05:00
Raul Jordan
94a1aca640 standardize slot numbers (#2475) 2019-05-03 13:28:09 +08:00
Raul Jordan
7007a9e8fa Fix Estimation of Deposit Inclusion Slot in ValidatorActivationStatus (#2472)
* fix spacing

* fix time estimates

* correct slot estimation

* naming

* Update beacon-chain/rpc/validator_server.go

Co-Authored-By: rauljordan <raul@prysmaticlabs.com>
2019-05-02 19:13:51 -04:00
Raul Jordan
629b76cf44 Only Perform Initial Sync With a Single Peer (#2471)
* fix spacing

* use send instead of broadcast in initial sync
2019-05-02 15:36:23 -04:00
Raul Jordan
f876df42d7
ValidatorStatus Estimating Activation RPC Server (#2469)
* fix spacing

* working on position in queue

* fmt

* spacing

* feedback

* tests

* rename
2019-05-02 14:14:25 -05:00
terence tsao
b1334c6120 Revert "Reverts RPC Disabling (#2435)" (#2468)
This reverts commit e16f1e1533.
2019-05-02 09:17:45 -04:00
terence tsao
38da4a5cd4
Add Forkchoice Tie Breaker (#2459) 2019-05-01 10:18:56 -07:00
Raul Jordan
05336e16e0
Querier Polls Forever Until 1st Response (#2458)
* revert changes to protos

* typo
2019-05-01 12:10:39 -05:00
terence tsao
de6ea81790 Recent Block Roots RPC API (#2455)
* add metrics for corret participation rate

* gaz

* add recent canonical roots API

* gaz

* all tests passed

* comments

* fmt
2019-05-01 10:14:46 -05:00
Raul Jordan
aa74b1dca3 Various Logging Improvements (#2454) 2019-04-30 14:55:59 -07:00
Raul Jordan
acf2d0699c Fixed HasAnyValidators to Fallback to Looking Into the BeaconState (#2453) 2019-04-30 14:18:16 -07:00
terence tsao
a015056332 Add metric for correctly attested rate (#2452)
* add metrics for corret participation rate

* gaz
2019-04-30 16:06:31 -05:00
terence tsao
d453b0f199 fixed typos (#2444) 2019-04-30 14:55:14 -05:00
terence tsao
7a7b4e55c9
prevent validator exit reentrance (#2443) 2019-04-29 16:25:31 -07:00
terence tsao
22fa595665 Prune Atts One Epoch Older (#2442)
* prune atts > one epoch old

* use VerifyAttestation instead

* added test to prune invalid att

* space

* added ctx

* fixed existing tests

* gaz

* gazelle

* update filter for pruning atts

* gaz
2019-04-29 15:45:04 -05:00
terence tsao
bff774de32 Operation service prunes invalid attestation (#2439)
* prune atts > one epoch old

* use VerifyAttestation instead

* added test to prune invalid att

* space

* added ctx

* fixed existing tests

* gaz

* gazelle
2019-04-29 15:03:28 -05:00
Raul Jordan
aa80c308ce
Save Deposit to DB Even If Fails to Deserialize (#2440)
* include bad deposits in the db

* fmt

* Update beacon-chain/powchain/log_processing.go

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

* lint

* comment
2019-04-29 14:50:18 -05:00
terence tsao
63998b92aa Add and Use Truncate Hash Library (#2417)
* add truncate lib

* use trunc

* spaces
2019-04-29 13:11:51 -05:00
Nishant Das
c288af5e9b Continue Processing Invalid Deposits (#2437)
* fix for pending deposits

* add regression tests
2019-04-29 09:54:55 -05:00
terence tsao
4a90f82bcc Fix Validator Ejection for Testnet (#2438)
* set ejection threshold and add gauge

* spaces

* gaz
2019-04-29 09:39:31 -05:00
Nishant Das
e16f1e1533 Reverts RPC Disabling (#2435)
* make changes

* more changes
2019-04-29 08:23:24 -05:00