Commit Graph

3016 Commits

Author SHA1 Message Date
terence tsao
aa389c82a1
Send attestations over feed at right place (#8605) 2021-03-15 07:47:10 -07:00
Radosław Kapka
c577fbd772
Move attestation's source checkpoint validation to VerifyAttestationNoVerifySignature (#8598)
* Move attestation's source checkpoint validation to VerifyAttestationNoVerifySignature

* change parameter type to ReadOnlyBeaconState

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2021-03-12 21:43:20 +00:00
Preston Van Loon
eb694ab5d5
Update rules_go and fix proto conflicts (#8596)
* Update rules_go and fix proto conflicts

* gaz

* Update generated code

* more emptypb fixes

* gaz

Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2021-03-11 18:03:19 -06:00
Victor Farazdagi
fa2084330b
Fix race condition in TestService_Initialized (#8597) 2021-03-11 21:16:40 +00:00
terence tsao
b62619ae3a
State: Refactor Reference and ValidatorMapHandler to stateutil pkg (#8589)
* Starting

* Fix tests

* Gazelle
2021-03-10 20:57:46 -06:00
terence tsao
dc0fc94c13
Use read lock (#8588) 2021-03-10 15:11:25 -08:00
Victor Farazdagi
548b471b8a
Simplify nil assignments (#8587)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-03-10 20:38:16 +00:00
Victor Farazdagi
fa92766095
Fixes flaky TestBlocksFetcher_nonSkippedSlotAfter test (#8586)
* Fixes flaky TestBlocksFetcher_nonSkippedSlotAfter test

* fix conditional
2021-03-10 20:03:26 +00:00
terence tsao
bdf2b2019b
Use beacon state interfaces across (#8552) 2021-03-08 14:37:33 -08:00
Victor Farazdagi
f2125e5f64
Proposer attestation selection using max-cover (#8571)
* Proposer attestation selection using max-cover

* better alisgn struct field

* more tests

* cleanup

* simplify expressions

* add benchmarks

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-03-08 18:46:24 +00:00
Victor Farazdagi
294b031fa4
Fixes incorrect usages of gazelle:ignore (#8562)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-03-08 18:09:39 +00:00
Radosław Kapka
79754bded2
Implement SubmitAttestations in the beacon API (#8563)
* update ethereumapis deps

* V1AttToV1Alpha1 migration

* Implementation plus happy path test

* fix root variable names

* Invalid attestation test

* gzl

* mod tidy

* use a single append to concatenate two slices

* remove outdated comment from attestation processing

* invoke ProcessAttestationNoVerifySignature when validating attestations

* implement missing PoolMock members

* use new VerifyAttestationNoVerifySignature function
2021-03-08 15:42:05 +01:00
terence tsao
90da16432f
Refactor ProcessAttestationNoVerifySignature to VerifyAttestationNoVerifySignature (#8566)
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-03-06 14:53:28 +00:00
Radosław Kapka
edd86fd358
Simplify API beacon pool tests (#8564)
* fix comment of FarFutureEpoch

* remove not needed validator configuration
2021-03-05 16:10:48 +00:00
Nishant Das
067a519b37
Add Spans To Attestation Caches (#8556)
* add spans

* preston's comments

* add span
2021-03-05 09:17:27 -06:00
Raul Jordan
32f2f711db
Exclude Instead of Ignore With Gazelle (#8559)
* exclude and not ignore

* fix broken test

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-03-04 21:01:32 +00:00
terence tsao
c1d4ff6239
Use deep ssz (#8557) 2021-03-04 13:31:39 -06:00
terence tsao
1c7c62cf8a
Attestation pool: continue if bad (#8550)
* Continue saving attestation when one is bad

* Gazelle

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-03-04 08:14:47 +00:00
Raul Jordan
ff329df808
Add All Other Prysm CLI Entrypoints to "cmd" Folder (#8545)
* other cmd

* comments

* gaz

* gaz ignored file

* build

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-03-03 17:05:37 +00:00
Nishant Das
565d51009d
Make DB Backup More Efficient (#8543)
* checkpoint

* add test

* Update beacon-chain/db/kv/backup_test.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-03-03 15:37:13 +00:00
terence tsao
c6b74b2ba7
Beacon state: Add interfaces (#8544)
* Define Readonly and writeonly

* Comment

* First take at clean up

* Completed interfaces

* Fix build and test

* Reordering interfaces

* Add build.bazel

* Add build.bazel

* Fix visibility
2021-03-03 02:26:24 +00:00
Raul Jordan
090fbbf18c
Add Goland Standard "cmd" Pattern for Beacon-Chain Binaries (#8540)
* beacon chain cmd pattern

* imports spacing

* more import fix

* edit build file

* e2e viz

* amend e2e
2021-03-02 13:36:03 -06:00
terence tsao
4c49d4af7e
Clean up state pkg's getter and setter (#8533)
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-03-02 12:37:36 +00:00
Panagiotis Georgiadis
46f6bd6d08
A bit of cleanup based on goconst tool (#8529)
* Make 1 occurence of 'foo', 'bar' and 'fizz!'

* Make 1 occurence of 'merkleizing list that is too large, over limit' string

* Limit password occurrences

* Make only 1 occurence of 'strongPass'

* Limit testMnemonic occurrences

* Limit expected epoch error messages

* Rename errors and use constant

* Update bazel dependencies

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2021-03-02 11:39:54 +00:00
Preston Van Loon
b3dcbfe2a4
Update snappy to fix ARM64 with go.1.16 (Reverts #8538) (#8539)
* Revert "Revert "Update to go 1.16" (#8538)"

This reverts commit a92b20d2bb.

* Update snappy
2021-03-02 16:54:16 +08:00
Nishant Das
a92b20d2bb
Revert "Update to go 1.16" (#8538)
This reverts commit f4adc0ea86.
2021-03-02 05:35:08 +00:00
Radosław Kapka
f973924fbf
Implement SubmitVoluntaryExit and SubmitProposerSlashing in the beacon API (#8532)
* SubmitProposerSlashing

* SubmitVoluntaryExit

* rename variables
2021-03-01 16:08:39 +00:00
Nishant Das
e39ce36f1c
Fix Default Transport Option (#8525)
* fix

* mod
2021-02-26 10:26:39 +01:00
Preston Van Loon
f4adc0ea86
Update to go 1.16 (#8521)
* Update to go 1.16

* Also update go.mod

* rm go.sum then run go mod tidy

* go mod tidy with go 1.16

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-02-25 21:38:19 +00:00
terence tsao
658cbf5631
RPC: Proper status code for error (#8519)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-02-25 20:00:33 +00:00
Radosław Kapka
c3f875bf65
Implement SubmitAttesterSlashing in the beacon API (#8515)
* Implement SubmitAttesterSlashing in the beacon API

* gzl

* remove migration test rule

* fix BUILD file formatting

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-02-25 11:14:04 -06:00
pinglamb
5db5ca7056
Use eth2-types SSZUint64 (#8514) 2021-02-25 05:51:26 -08:00
Potuz
d44c27ec63
Log block arrival time (#8485)
* Log block arrival time

* Comment formatting

* Update beacon-chain/sync/validate_beacon_blocks.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2021-02-24 20:35:19 +00:00
Nishant Das
0625a6906c
Add Better Peer Pruning (#8501)
* add better pruning

* add test

* gaz

* victor's review

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-02-24 18:40:06 +00:00
Radosław Kapka
4da7a7797e
Implement ListPoolProposerSlashings and ListPoolVoluntaryExits in the beacon API (#8508)
* Implement ListPoolProposerSlashings in the beacon API

* implement ListPoolAttesterSlashings

* add comments to bool arguments

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-02-24 15:29:25 +00:00
terence tsao
eca8d85446
Remove outdated and skipped TestConsistentGenesisState (#8506)
* Rm skipped TestConsistentGenesisState

* Fix build: remove unused imports

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2021-02-24 13:40:19 +00:00
terence tsao
1db3c86b68
Use DeepSSZEqual to satisfy go tests (#8499)
* Use DeepSSZEqual to satisfy go tests

* New line

* New line

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-02-23 22:20:11 +00:00
Raul Jordan
0c599521b1
Better Handling of Subscriber Errors in Logs Streams (#8505)
* handle subscriber error and increase buffer sizes

* operation order in unsub and close
2021-02-23 15:33:23 -06:00
Radosław Kapka
e40fba7679
Implement ListPoolAttesterSlashings in the beacon API (#8492)
* pool interface and mock

* implementation

* gofmt

* gzl

* Use migration package for slashing mapping

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-02-23 16:17:07 +01:00
terence tsao
6b82873737
Use validatorIndex instead of validatorID (#8498)
* Use ValidtorIndex across Prysm. Build ok

* First take at fixing tests

* Clean up e2e, fuzz... etc

* Fix new lines

* Update beacon-chain/cache/proposer_indices_test.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* Update beacon-chain/core/helpers/rewards_penalties.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* Update beacon-chain/core/helpers/shuffle.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* Update validator/graffiti/parse_graffiti_test.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* Raul's feedback

* Fix downcast int -> uint64

* Victor's feedback

* Replace validator id with validator index

* Replace validator id with validator index

* Typo

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-02-22 19:40:58 -06:00
terence tsao
3edfa8cb88
Use Custom Type ValidatorIndex Across Prysm (#8478)
* Use ValidtorIndex across Prysm. Build ok

* First take at fixing tests

* Clean up e2e, fuzz... etc

* Fix new lines

* Update beacon-chain/cache/proposer_indices_test.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* Update beacon-chain/core/helpers/rewards_penalties.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* Update beacon-chain/core/helpers/shuffle.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* Update validator/graffiti/parse_graffiti_test.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>

* Raul's feedback

* Fix downcast int -> uint64

* Victor's feedback

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-02-23 00:14:50 +00:00
Victor Farazdagi
b577869ed6
Fixes import aliases (#8497)
* Fixes import aliases

* another fix

* reset gw files

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-02-22 23:20:57 +00:00
Ivan Martinez
5c14b4c833
ETH2 API: Add outline for debug endpoints (#8496)
* Add outline for debug endpoints

* Add outline for debug endpoints

* Fix comment

* Fix visibility
2021-02-22 16:48:49 -06:00
Potuz
dd08305aa7
Clean duplicated topic field in debug log (#8489)
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-02-22 18:13:26 +00:00
Victor Farazdagi
1395c11c29
Fix duplicate import (#8494) 2021-02-22 17:36:18 +00:00
Potuz
ef48f6a061
Move timings of synced block to debug level (#8491)
* Move timings of synced block to debug level

* go fmt

* Change message text

Co-authored-by: terence tsao <terence@prysmaticlabs.com>

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-02-22 16:32:23 +00:00
terence tsao
09ddfae1d9
Use DeepSSZEqual for tests (#8484)
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-02-22 15:33:55 +00:00
Radosław Kapka
7d3e53f3e4
Constrain read/write channels (#8479) 2021-02-19 15:39:27 +00:00
terence tsao
dc1bec79ed
Use Eth2 type CommitteeIndex (#8477)
* Use types.CommitteeIndex

* Go fmt

* Update validator pkg

* Fix e2e

* Happy fuzz tests

* Sync with upstream ethereumapi

* Go mod tidy

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-02-18 20:11:20 +00:00
terence tsao
d472380fef
Hide beacon operation field in log if it's 0 (#8330)
* Hide beacon operation field if it's 0

* Update test

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-02-18 19:08:27 +00:00