Commit Graph

745 Commits

Author SHA1 Message Date
Patrick
624209eba7
Fix Pagination Bug When Total Size % Page Size == 0 (#6266)
* Add failing test for pagination

* Fix failing test for pagination

* Fix other tests for pagination

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-06-19 09:39:12 -05:00
Victor Farazdagi
90542c21dc
Implements max k-coverage greedy algorithm (#6305)
* implements max k-coverage greedy algorithm
* updates go-bitfield dependency
* gazelle
* update base aggregate
* re-arrange to shared
* clean references to atts in max cover
* max_cover: updates visibility
* fixes tests
* attestations related methods
* Merge branch 'master' into attaggregation-max-cover
* better op order
* fix comments
* removes debug stringer methods
* Merge refs/heads/master into attaggregation-max-cover
* log random seed
* Merge branch 'attaggregation-max-cover' of github.com:prysmaticlabs/prysm into attaggregation-max-cover
* Merge refs/heads/master into attaggregation-max-cover
* adds more comments
* Merge branch 'attaggregation-max-cover' of github.com:prysmaticlabs/prysm into attaggregation-max-cover
* fixes typo
2020-06-18 20:56:23 +00:00
Preston Van Loon
6926592065
Add a debug log statement when enabling dev flags (#6306)
* Add a debug log statement when enabling dev flags
* Merge refs/heads/master into add-dbg-log-for-dev-flags
2020-06-18 20:25:34 +00:00
Preston Van Loon
addc3897c4
Use STABLE_ prefix for git tag to force a relink of version (#6307)
* Use STABLE_ prefix for git tag to force a relink of version
* Add comment about STABLE_
2020-06-18 19:59:47 +00:00
Raul Jordan
7067c84c69
Stream Duties Client Implementation (#5867)
* include validator client stream

* Update validator/client/validator_attest.go

* gazelle

* rem extraneous logs

* fixing tests

* resolve most tests

* gaz

* add lock

* ivan feedback

* pass tests for update protect

* gaz

* duties gaz

* no need for canonical head slot

* fix ctx leak

* fmt

* add in feature flag

* add streaming subpackage

* add polling/streaming separation

* able to build

* fix duplicate package names

* fix polling

* imports

* confirm it works

* fixed up comment

* go lint comments

* gaz

* build

* Update validator/client/streaming/service_test.go

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

* tidy

* fmt

* add stream duties to e2e

* add stream duties to e2e flags

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-06-18 13:30:05 -05:00
Nishant Das
340ddf20cb
Update Node RPC Endpoints (#6289)
* checkpoint progress
* some more stuff
* fix tests
* fix tests
* lint
* fix test and initialization
* gaz
* Merge branch 'master' into updateP2PRPC
* Merge refs/heads/master into updateP2PRPC
* Merge refs/heads/master into updateP2PRPC
* Merge refs/heads/master into updateP2PRPC
* Merge refs/heads/master into updateP2PRPC
* Merge refs/heads/master into updateP2PRPC
* Merge refs/heads/master into updateP2PRPC
* Merge refs/heads/master into updateP2PRPC
* Merge refs/heads/master into updateP2PRPC
* Merge refs/heads/master into updateP2PRPC
2020-06-18 03:53:46 +00:00
Paul Nelson
c1c3b75867
Move generic HashTreeRoot funcs to //shared (#6167)
* Functions that are to be moved to //shared/htrutils captured in separate file.

* Move files into new //shared/htutils package

hash_function.go renamed to hashers.go

* Refactor to reference moved methods in new package

- Added import for htrutils to state and stateutil packages
- Update references to imported funcs (append "htrutils.")
- Updated funcs in htrutils to be exported where necessary

* Add tests
2020-06-18 10:15:13 +08:00
terence tsao
af3122a9e8
Fork choice avoids redundant call to get_ancestor (#6282)
* Add helper to prevent zero hashes

* Test

* Add cacheJustifiedStateBalances

* Cache justifed balances

* Use cached justified balances

* Remove unncessary justification checks during initial syncing

* Test

* Proper locking

* Use getter

* Add CheckPointIsEqual helper

* Test CheckPointIsEqual helper

* Update finalizedImpliesNewJustified

* Better tests for finalizedImpliesNewJustified

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-17 08:50:10 -05:00
Preston Van Loon
4740f7ed57
pre-allocate memory for AggregateVerify (#6285)
* pre-allocate memory for AggregateVerify
2020-06-16 23:21:31 +00:00
Preston Van Loon
213be4cfbe
Verify many block attestations at once (#6277) 2020-06-16 14:19:10 -07:00
Preston Van Loon
5fa3bbb991
Add --initial-sync-verify-all-signat as a dev flag. Issue #5176. (#6283) 2020-06-16 11:06:32 -07:00
Preston Van Loon
8097eea607
Fix underflow in SlotsSinceGenesis (#6275)
* Fix an underflow in genesis time calculation
* goimports
2020-06-15 21:56:11 +00:00
Raul Jordan
298955c92b
Add a Log for Newly Connected gRPC Clients in the Beacon Node (#6233)
* interceptor disable logging via feature flag
* Merge branch 'master' into validator-connection-logs
2020-06-12 20:41:05 +00:00
Raul Jordan
87ca73d605
Countdown Until Genesis (#6231)
* added in logic
* latest countdown
* fixed up formatting and add tests
* ready for review
* Merge branch 'master' into countdown-genesis
* no log if after genesis
* Merge branch 'countdown-genesis' of github.com:prysmaticlabs/prysm into countdown-genesis
* countdown
* smarter logging
* added buffer period for countdown
* Merge refs/heads/master into countdown-genesis
2020-06-12 18:47:18 +00:00
terence tsao
cf3260b948
Revert "Send blocks that fails validation to slasher" (#6217)
* Revert "Send blocks that fail p2p validation to slasher (#6164)"

This reverts commit f40a7575de.
* Merge branch 'master' into revert-6164-slasherP2P
2020-06-11 17:11:28 +00:00
Nishant Das
7f3dc5a2dd
Adds a User Agent for Libp2p (#6211)
* Add the latest git tag as part of the version string.

Example:

version=Prysm/v1.0.0-alpha.10/28e61fa40c7d16774b3b1c18d8382c64537bfa84. Built at: 2020-06-11 04:29:18+00:00

* add user agent

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-11 10:34:34 -05:00
Preston Van Loon
8815f6ced8
Add the latest git tag as part of the version string. (#6210)
Example:

version=Prysm/v1.0.0-alpha.10/28e61fa40c7d16774b3b1c18d8382c64537bfa84. Built at: 2020-06-11 04:29:18+00:00
2020-06-11 13:45:31 +08:00
Shay Zluf
f40a7575de
Send blocks that fail p2p validation to slasher (#6164)
* send blocks that fails validation to block feed for slasher. in order to enable slashing proposers

* add sig validation

* fix imports

* Update shared/featureconfig/config.go

Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>

* Update shared/featureconfig/config.go

Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>

* Update shared/featureconfig/flags.go

Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>

* remove extra validation path for slasher

* ivan feedback

* notify all blocks that pass minimal validation to block stream

* notify all blocks that pass minimal validation to block stream

* add to e2e flags

Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-10 13:24:05 -04:00
Nishant Das
a9e3ea3ccc
Add Host Flags for All Servers running in Prysm (#6202)
* Merge branch 'master' of https://github.com/prysmaticlabs/geth-sharding into removeHardLimit

# Conflicts:
add flags for all hosts
* lint
* Merge refs/heads/master into addFlagsForHosts
* Merge refs/heads/master into addFlagsForHosts
* Merge refs/heads/master into addFlagsForHosts
* use single flag
2020-06-10 16:04:32 +00:00
Preston Van Loon
1f20cbb3f0
Update bootnode ENR for Onyx (#6192)
* Update bootnode ENR for Onyx
* Merge refs/heads/master into update-bootnode
2020-06-10 01:38:27 +00:00
Nishant Das
d1a1043ef1
Update to v0.12 (#5614) 2020-06-09 15:40:48 -07:00
Victor Farazdagi
187e08d38d
Inverts enable-init-sync-wrr flag (#6187)
* Inverts enable-init-sync-wrr flag
2020-06-09 19:16:59 +00:00
terence tsao
568d8c7825
Invert reduce attester state copies (#6185)
* Invert cfg.ReduceAttesterStateCopy flag

* Fix build
2020-06-09 11:47:23 -05:00
terence tsao
0387641662
Add debug endpoint for individual vote status (#6166)
* Add IndividualVotesRequest protos

* Inplement GetIndividualVotes

* Tests

* Build

* Move from debug server to beacon server

* Remove protos

* Remove gen code

* Typo and build

* Gazelle

* Better mock

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-08 21:37:56 -05:00
Preston Van Loon
8ffe9858ec
Rename white/blacklist to allow/deny list (#6173)
* Rename white/blacklist to allow/deny list
* Deprecate flag properly
2020-06-08 04:35:15 +00:00
Preston Van Loon
6c0fbcc622
Only build with cgosymbolizer when explicitly requested (#6151)
* Only build with cgosymbolizer when explicitly desired. This fixes go builds for mac and others
2020-06-05 22:21:43 +00:00
Raul Jordan
302b0f8c80
Use FastSSZ Everywhere Applicable (#6135)
* use fast ssz anywhere applicable
* use fastssz clearly
* Merge branch 'master' into use-fastssz
* Apply suggestions from code review
* imports
* Update beacon-chain/p2p/fork.go
* Merge branch 'master' into use-fastssz
* update go-ssz
* update go-ssz
* Merge refs/heads/master into use-fastssz
* Merge refs/heads/master into use-fastssz
2020-06-05 13:48:40 +00:00
terence tsao
a8c13dcaf8
Add NewBeaconBlock to testutil (#6118)
* Use state util to get block root

* Add NewBeaconBlock
2020-06-03 20:21:36 -05:00
Raul Jordan
b2b78c8a79
Remove Websockets for ETH1 From Prysm (#6055)
* mark websockets flag as deprecated, begin removing uses
* powchain package now builds
* Merge branch 'master' into no-websocket
* use seconds per eth1 block
* fix tests
* Merge branch 'master' into no-websocket
* rem websocket req
* Merge branch 'no-websocket' of github.com:prysmaticlabs/prysm into no-websocket
* Merge refs/heads/master into no-websocket
* Merge refs/heads/master into no-websocket
* fix broken test
* Merge refs/heads/master into no-websocket
* Merge refs/heads/master into no-websocket
* Merge refs/heads/master into no-websocket
* Merge refs/heads/master into no-websocket
* Merge refs/heads/master into no-websocket
* Merge refs/heads/master into no-websocket
2020-06-03 20:28:16 +00:00
Victor Farazdagi
261a343ea5
Fixes intersection functions (uint64, int64, []byte) (#6067) 2020-06-01 06:35:29 -07:00
terence tsao
6e514b96fd
Remove unused code (#6065)
* Ran code cleanup from goland

* Typo

* Remove unused code

* Gazelle

* Delete comments
2020-05-31 15:47:15 -07:00
terence tsao
6e3b78b99e
Ran code cleanup from goland (#6064)
* Ran code cleanup from goland

* Typo
2020-05-31 15:08:36 -05:00
Preston Van Loon
49a0d3caf0
Refactor dependencies, make Prysm "go gettable" (#6053)
* Fix a few deps to work with go.mod, check in generated files

* Update Gossipsub to 1.1 (#5998)

* update libs

* add new validators

* add new deps

* new set of deps

* tls

* further fix gossip update

* get everything to build

* clean up

* gaz

* fix build

* fix all tests

* add deps to images

* imports

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

* Beacon chain builds with go build

* fix bazel

* fix dep

* lint

* Add github action for testing go

* on PR for any branch

* fix libp2p test failure

* Fix TestProcessBlock_PassesProcessingConditions by updating the proposer index in test

* Revert "Fix TestProcessBlock_PassesProcessingConditions by updating the proposer index in test"

This reverts commit 43676894ab01f03fe90a9b8ee3ecfbc2ec1ec4e4.

* Compute and set proposer index instead of hard code

* Add back go mod/sum, fix deps

* go build ./...

* Temporarily skip two tests

* Fix kafka confluent patch

* Fix kafka confluent patch

* fix kafka build

* fix kafka

* Add info in DEPENDENCIES. Added a stub link for Why Bazel? until https://github.com/prysmaticlabs/documentation/issues/138

* Update fuzz ssz files as well

* Update fuzz ssz files as well

* getting closer

* rollback rules_go and gazelle

* fix gogo protobuf

* install librdkafka-dev as part of github actions

* Update kafka to a recent version where librkafkfa is not required for go modules

* clarify comment

* fix kafka build

* disable go tests

* comment

* Fix geth dependencies for end to end

* rename word

* lint

* fix docker

Co-authored-by: Nishant Das <nishdas93@gmail.com>
Co-authored-by: rauljordan <raul@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-05-31 14:44:34 +08:00
Ivan Martinez
d35531cb17
Add index to activationStatus and MultipleValidatorStatus response (#6026)
* Cleanup val status

* More cleanup

* Fix tests

* Fix tests again

* Change to nonExistentIndice

* Fix test

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-05-29 13:17:27 -05:00
Victor Farazdagi
a0bf8cba52
Removes redundant type conversions (#6041)
* removes redundant type conversions
* remove redundant type in struct decl
* removes redundant parens
* Merge refs/heads/master into redundant-type-conversions
2020-05-29 12:42:39 +00:00
Ivan Martinez
0b64db5e21
Add voluntary exit processing to E2E (#6016)
* Add voluntary exit to E2E

* Fix long urnning e2e

* Fix for comments

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-05-28 22:51:00 -04:00
terence tsao
3fe47c0043
Reduce attester state copies (#6025)
* Test

* Fix

* Removed extra line

* Feature flag

* Gaz
2020-05-28 13:33:08 -04:00
terence tsao
e3180cf977
Invert state field trie (#6013)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-05-28 08:24:26 -05:00
Preston Van Loon
a139b75dc5
Add documentation and issue template for feature flags (#6018)
* Add details around feature flag usage and recommend filing tracking issues for feature flags.

* 🦄

* 🦄

* labels

* more comments
2020-05-27 20:37:37 -05:00
terence tsao
4c2ed410b0
Invert state ref copy flag (#6015)
* Revert "Release state-ref-copy flag (#6012)"

This reverts commit ebf7122d6f.

* Invert state ref copy flag
2020-05-27 14:30:54 -05:00
terence tsao
ebf7122d6f
Release state-ref-copy flag (#6012)
* Release state ref copy flag
* Merge refs/heads/master into invert-flag1
2020-05-27 18:08:12 +00:00
Nishant Das
7be8942079
Fix Fork Data in Local Node (#5997) 2020-05-27 08:07:40 -07:00
Ivan Martinez
5afee4ba3a
Use SlotTickerWithOffset for StreamIndexedAttestations (#5999)
* Change streamindexed to slot ticker with offset
* Make 2/3rds
* Add test
* Merge branch 'master' of github.com:prysmaticlabs/prysm into ticker-offset
* Add check for offset
* Merge branch 'master' of github.com:prysmaticlabs/prysm into ticker-offset
* Fix test
* Merge refs/heads/master into ticker-offset
2020-05-26 19:34:09 +00:00
Ivan Martinez
0f7cf212a2
Prepare E2E for v0.12 (#5991)
* Prepare e2e for v0.12

* Fix e2e

* Comments

* Attempt 100% participation

* Fixes

* Fix

* Update readme

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-05-26 14:04:42 -05:00
terence tsao
3b65cb6d0b
Consistent BLS function inputs (#5969)
* Make function input consistent

* Change back

* Typo

* Fixed test

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-05-25 16:08:12 -05:00
Raul Jordan
497307decd
Remove Warning on Using Default Mainnet Config (#5983)
* removed mainnet warn
2020-05-25 19:43:10 +00:00
Ivan Martinez
b810243f41
Reverse historical detection flag for slasher (#5958)
* Reverse historical detection flag
* Merge branch 'master' of github.com:prysmaticlabs/prysm into reverse-historical-flag
* Merge branch 'master' of github.com:prysmaticlabs/prysm into reverse-historical-flag
* Fix build
* Merge refs/heads/master into reverse-historical-flag
* Fix test
* Merge branch 'reverse-historical-flag' of github.com:prysmaticlabs/prysm into reverse-historical-flag
* Merge refs/heads/master into reverse-historical-flag
2020-05-23 06:40:15 +00:00
Ivan Martinez
6aabea2d80
Reverse broadcast-slashing flag to disable-broadcast-slashings (#5952)
* Reverse broadcast-slashings to disable-broadcast-slashings
* Fix tests
* Merge branch 'master' of github.com:prysmaticlabs/prysm into toggle-broadcast-flag
* Merge refs/heads/master into toggle-broadcast-flag
* Fix for comments
* Merge branch 'toggle-broadcast-flag' of github.com:prysmaticlabs/prysm into toggle-broadcast-flag
* Merge refs/heads/master into toggle-broadcast-flag
2020-05-22 17:19:45 +00:00
Nishant Das
6a9112bfae
remove byte mempool (#5951) 2020-05-21 20:39:06 -07:00
terence tsao
8eb7c7a0bc
Recover skipped archived point (#5950) 2020-05-21 18:15:16 -07:00