Commit Graph

2334 Commits

Author SHA1 Message Date
Ivan Martinez
c69b3f568e
Move hard-coded constants to global consts (#6467)
* Move hard-coded constants to global consts
* Fixes
* Merge branch 'master' into remove-hard-constants
* Merge refs/heads/master into remove-hard-constants
* Merge refs/heads/master into remove-hard-constants
* Merge refs/heads/master into remove-hard-constants
* Merge refs/heads/master into remove-hard-constants
* Comments
* Merge refs/heads/master into remove-hard-constants
* Merge refs/heads/master into remove-hard-constants
* Merge refs/heads/master into remove-hard-constants
* Merge refs/heads/master into remove-hard-constants
* Merge refs/heads/master into remove-hard-constants
* Merge branch 'master' of github.com:prysmaticlabs/prysm into remove-hard-constants
2020-07-03 15:25:32 +00:00
Nishant Das
7896e087e5
Add in Better Logging for Requests (#6483)
* add in better logging
* gaz
* last one
* mess about
* check strings
* fix
2020-07-03 10:08:45 +00:00
Nishant Das
ac9bc5d98b
Reset Streams at the End of the Request (#6481)
* close all incoming streams

* use proper helper

* shift to debug

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-07-03 16:21:18 +08:00
terence tsao
d62e989a67
Minor clean up on state gen package (#6480)
* Remove unused fields and function
* Rename splitInfo to finalizedInfo
* Merge branch 'master' into stategen-cleanup
* Fmt
* Merge branch 'stategen-cleanup' of github.com:prysmaticlabs/prysm into stategen-cleanup
* Merge refs/heads/master into stategen-cleanup
2020-07-03 06:33:58 +00:00
Preston Van Loon
6b9d9e5d3a
Add a few test cases to ReceiveBlockNoPubsub with race detection (#6298)
* Add a few test cases to ReceiveBlockNoPubsub with race detection, fix data race in state
* Expose voluntary exits included API. More race condition fixes in state. More tests
* add tests to norace as well for coverage
* Merge branch 'master' of github.com:prysmaticlabs/prysm into add-test-coverage-on-receive-block
* PR feedback
* Fixed can't save head in DB by:
1.) Remove new state mgmt condition in SaveHeadBlockRoot
2.) Reuse state summary cache between db and service
* Merge branch 'master' of github.com:prysmaticlabs/prysm into add-test-coverage-on-receive-block
* passing tests
* gofmt and goimports
* Merge branch 'master' of github.com:prysmaticlabs/prysm into add-test-coverage-on-receive-block
* lint
* move import and goimport again
* move import and goimport again
* Merge refs/heads/master into add-test-coverage-on-receive-block
* Merge refs/heads/master into add-test-coverage-on-receive-block
* Add bool to selectively record events
* Merge refs/heads/master into add-test-coverage-on-receive-block
* Merge refs/heads/master into add-test-coverage-on-receive-block
* Merge refs/heads/master into add-test-coverage-on-receive-block
* Merge refs/heads/master into add-test-coverage-on-receive-block
2020-07-03 05:46:53 +00:00
dv8silencer
0d2bce8200
Improve consistency in peer connect/disconnect logging (#6409)
* Improve consistency in peer connect/disconnect logging
* Merge branch 'master' into dv8s-iss6328
* Merge branch 'master' into dv8s-iss6328
* Merge branch 'master' into dv8s-iss6328
* Merge branch 'master' into dv8s-iss6328
* Merge branch 'master' into dv8s-iss6328
* Corrected capitalization.  Refactored out duplicated logic
* Merge branch 'master' into dv8s-iss6328
* Merge branch 'master' into dv8s-iss6328
* Merge branch 'master' into dv8s-iss6328
* Merge branch 'master' into dv8s-iss6328
* Merge branch 'master' into dv8s-iss6328
* Merge branch 'master' into dv8s-iss6328
* Merge branch 'master' into dv8s-iss6328
* Merge branch 'master' into dv8s-iss6328
* Merge branch 'master' into dv8s-iss6328
* Merge branch 'master' into dv8s-iss6328
* Merge branch 'master' into dv8s-iss6328
* Merge branch 'master' into dv8s-iss6328
* Merge branch 'master' into dv8s-iss6328
* Merge branch 'master' into dv8s-iss6328
* Merge branch 'master' into dv8s-iss6328
* Merge branch 'master' into dv8s-iss6328
2020-07-03 04:44:57 +00:00
Raul Jordan
5b708b54d9
QSP-13 Only Allow Snappy P2P Encoding (#6415)
* enforce only snappy

* fix up tests

* replace with ssz snappy in tests

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-07-03 11:24:30 +08:00
Preston Van Loon
aa52e693ce
Sync: do not remove attestations from pool on failed block processing (#6474)
* Add test and return error on failed block processing
* use atts in body
* Merge branch 'master' into p2p-potential-error-block
2020-07-02 20:24:30 +00:00
Raul Jordan
091525deb8
Revert Stream Duties (#6473)
* ensure gazelle
* fix up propose test
* build
* comment
2020-07-02 17:50:05 +00:00
Victor Farazdagi
f279cf09b8
Removes excessive concurrency from init-sync queue (#6471)
* Removes excessive concurrency from init-sync queue
* update buffer size
2020-07-02 13:06:12 +00:00
Victor Farazdagi
92c5c651f7
Refactors init-sync: queue streams blocks in batches (#6470)
* init-sync: queue streams blocks in batches
2020-07-02 11:19:07 +00:00
terence tsao
8c8cc144f1
Archival RPC usages removal (#6453)
* Starting to delete archived rpc usages
* Fixed rest of the tests
* Gaz
* Merge branch 'master' into deprecate-archival-rpc
* Merge branch 'master' into deprecate-archival-rpc
* Merge refs/heads/master into deprecate-archival-rpc
* Merge refs/heads/master into deprecate-archival-rpc
* Merge refs/heads/master into deprecate-archival-rpc
2020-07-01 20:04:02 +00:00
Victor Farazdagi
270a64f059
QSP-BestPractice: Refactors singular/plural KV-store functions (#6462)
* updates SaveBlock
* updates DeleteAttestation
* updates DeleteState
* updates SaveAttestation
* updates SaveState
* updates SaveStateSummary
* Merge refs/heads/master into kv-refactor-singular-pl-methods
* Merge refs/heads/master into kv-refactor-singular-pl-methods
* Merge refs/heads/master into kv-refactor-singular-pl-methods
2020-07-01 18:33:05 +00:00
terence tsao
1f3d9873cd
Archival service removal (#6448) 2020-07-01 10:04:06 -07:00
Victor Farazdagi
1b0cfb408e
QSP-BestPractice: Refactors inline ttfb/resp time constants (#6463)
* refactors inline ttfb/resp time constants
2020-07-01 09:47:59 +00:00
terence tsao
4e180e452d
Add spans to db kv's encode and decode (#6458) 2020-06-30 21:00:49 -07:00
terence tsao
8d8da76aa0
API: Fix finalization/justification slot representations (#6443)
* Fix finalized/justified slots representations
* Update tests
* Merge refs/heads/master into use-epochs
* Merge refs/heads/master into use-epochs
* Merge refs/heads/master into use-epochs
* Merge refs/heads/master into use-epochs
* Go fmt
* Merge branch 'use-epochs' of github.com:prysmaticlabs/prysm into use-epochs
* Merge refs/heads/master into use-epochs
* Merge refs/heads/master into use-epochs
* Fixed TestServer_StreamChainHead_OnHeadUpdated
* Merge branch 'use-epochs' of github.com:prysmaticlabs/prysm into use-epochs
* Merge refs/heads/master into use-epochs
2020-06-30 15:17:59 +00:00
Raul Jordan
a0c38c8d0a
QSP-33 Check Max Response For All Topics (#6424)
* remove max len funcs

* fix up tests

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-30 09:50:28 -05:00
Nishant Das
21ead0a025
Record Peer Latency (#6456)
* add latency
* Merge branch 'master' into addLatency
* Merge refs/heads/master into addLatency
2020-06-30 03:53:14 +00:00
Preston Van Loon
98e26d1dcc
Bulk verify block deposits with BLS (#6454)
* First pass at adding bulk signature verification for block deposits

* checkpoint

* some refactoring to allow for bulk deposit signature verification

* nil check

* fix goimports

* fmt

* rename ProcessPreGenesisDeposit -> ProcessPreGenesisDeposits
2020-06-29 20:52:19 -05:00
terence tsao
1f93a1f4c3
Remove unused prune old states (#6450) 2020-06-29 15:02:31 -07:00
Raul Jordan
6c7131cb54
Fix Concurrent Map Write in gRPC Client Connected Logger (#6446)
* fix up concurrent map write
* fix import
* Merge refs/heads/master into concurrent-write-fix
2020-06-29 15:52:10 +00:00
Victor Farazdagi
196f4c6222
QSP-BestPractice Refactors failover peer selection in init-sync (#6442)
* refactors failover peer selection in init-sync
* Merge refs/heads/master into init-sync-more-effective-failover
2020-06-29 15:23:04 +00:00
Ivan Martinez
e7b24323e6
Move MaxRPCPageSize flag from beacon node to shared/cmd (#6297)
* Allow other clients to set MaxRPCPageSize

* Fixes

* Remove default

* Add init

* Fix default

* Set default

* Fix

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-29 09:17:24 -05:00
Nishant Das
adf9bf7094
QSP 50, QSP 51: Make Noise Default (#6440)
* enable noise

* add secio
2020-06-29 11:19:25 +08:00
Preston Van Loon
bfb6e5e4a0
Use spec attestation time verification in gRPC requests (#6429)
* Re-use attestation time verification

* lint

* fix imports

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-28 14:37:17 -07:00
Ivan Martinez
d973c00c6c
Slasher detection improvements (#6432)
* Slashing fixes

* Fixess

* Change fatals to error

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-28 02:34:21 -04:00
terence tsao
43b1bcb84f
Use CopyValidator for ValidatorAtIndex (#6430)
* Use CopyValidator
* Merge refs/heads/master into validator-at-index
2020-06-26 23:21:11 +00:00
Preston Van Loon
c6179307b3
Add spans for head state access (#6418)
* Add a span for HeadState access
* more spans
* Merge refs/heads/master into add-span
* Merge refs/heads/master into add-span
* Merge refs/heads/master into add-span
* Merge refs/heads/master into add-span
* Merge refs/heads/master into add-span
* Merge refs/heads/master into add-span
* Merge refs/heads/master into add-span
* Merge refs/heads/master into add-span
2020-06-26 22:52:11 +00:00
Preston Van Loon
67b8a88b65
Add span for updateRecentCanonicalBlocks (#6421)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-26 15:08:53 -05:00
Preston Van Loon
3ba3133657
Cleanup validateAggregateAttTime with a better error message, more tests, and more clear inline comments (#6423)
* Add span for updateRecentCanonicalBlocks
* Cleanup validateAggregateAttTime with a better error message, more tests, and more clear inline comments
* Merge branch 'master' into cleanup-validateAggregateAttTime
* revert beacon-chain/blockchain/head.go
* Merge branch 'cleanup-validateAggregateAttTime' of github.com:prysmaticlabs/prysm into cleanup-validateAggregateAttTime
* Merge refs/heads/master into cleanup-validateAggregateAttTime
* Merge refs/heads/master into cleanup-validateAggregateAttTime
2020-06-26 19:36:44 +00:00
terence tsao
01b97ffd5e
Fix ListValidators retrieval for new state (#6417)
* Retrieve the correct state for new state
* Test
* Gaz
* Merge branch 'master' into fix-list-validators
* Merge refs/heads/master into fix-list-validators
* Merge refs/heads/master into fix-list-validators
* Merge refs/heads/master into fix-list-validators
* Merge refs/heads/master into fix-list-validators
2020-06-26 19:01:46 +00:00
Preston Van Loon
886afb054c
Remove duplicated randao mix copy (#6420)
* remove duplicated randao mix copy
* Merge refs/heads/master into rm-dup-copy
* Merge refs/heads/master into rm-dup-copy
* Merge refs/heads/master into rm-dup-copy
2020-06-26 18:27:48 +00:00
Raul Jordan
001547f215
QSP-55 Remove Support for Other Pubsub Protocols (#6419)
* remove nongossip protocols
* Merge refs/heads/master into remove-other-protocols
2020-06-26 17:33:18 +00:00
Nishant Das
f1c0b2e0da
Fix Invalid SSZ in Block Roots RPC Request (#6405)
* fix block roots error
* remove comment
* fix
* Merge branch 'master' of https://github.com/prysmaticlabs/geth-sharding into fixBlockRootsError
* change back
* add stream deadlines
* Merge branch 'master' into fixBlockRootsError
* add todos
* Merge branch 'fixBlockRootsError' of https://github.com/prysmaticlabs/geth-sharding into fixBlockRootsError
* Update beacon-chain/sync/rpc_beacon_blocks_by_root.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* gofmt
* fix test
* fix failing test
* Merge branch 'master' of https://github.com/prysmaticlabs/geth-sharding into fixBlockRootsError
* fix all
* Merge branch 'master' into fixBlockRootsError
* Merge branch 'master' into fixBlockRootsError
* Merge refs/heads/master into fixBlockRootsError
2020-06-26 17:05:04 +00:00
Raul Jordan
ab89053597
QSP-45 Add Check for No Connected Peers BestFinalized (#6402)
* no error returned
* no target root
* fix build
* Merge refs/heads/master into best-finalized
2020-06-26 16:35:12 +00:00
Raul Jordan
252f758baa
QSP-9 Prevent Casting to Int if Possible (#6349)
* no cast to int

* fix up significant casting issues

* more casting

* even more casting fixes

* more casts

* fix subnets

* back to ints

* final touches

* broken test fix

* add in blocks test fix

* unskip

* revert bytes fixes

* casting fixes

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

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

* fmt

* slash:

* fix val tests

* fix up conf

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2020-06-26 11:07:00 -05:00
Victor Farazdagi
78465e2549
QSP-6: Enforces crypto-secure PRNGs (#6401)
* adds cryptorand analyzer

* better naming

* rely on suffix

* sync/pending_* use crypto/rand

* define shared/rand

* updates fetcher

* fixes rand issue in sync package

* gofmt

* shared/rand: more docs + add exclusion nogo_config.json

* updates validator/assignments

* updates comment

* fixes remaning cases

* re-arranges comments

* fixes tests

* renames in shared/rand API

* adds simple no-panic test

* gazelle

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-26 09:58:47 -05:00
Nishant Das
73f3a653bf
Clean Up Dead Peers (#6413)
* clean up dead peers
* Merge refs/heads/master into clearDeadPeers
* comment
* Merge branch 'clearDeadPeers' of https://github.com/prysmaticlabs/geth-sharding into clearDeadPeers
2020-06-26 12:24:55 +00:00
dv8silencer
812a663671
Add flag to allow reading bootstrap nodes from a file (#6351)
* parent c837dfb2f2
author dv8silencer <dv8silencer+github@gmail.com> 1592805180 -0500
committer dv8silencer <dv8silencer+github@gmail.com> 1592855989 -0500
Create a bootstrap-node-file flag which reads nodes from a YAML file and make the flag mutually exclusive to the bootstrap-node flag
* Merge branch 'master' into dv8s-iss6316
* Refactor so that boot node reading is in its own function.  Added test
* Added period

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* Merge branch 'master' into dv8s-iss6316
* Edit Bazel to include go-yaml dep
* Help Bazel build successfully
* Merge branch 'master' into dv8s-iss6316
* bazel run //:gazella -- fix
* Handle error from YAML parser to address build checks
* Merge branch 'master' into dv8s-iss6316
* Merge branch 'master' into dv8s-iss6316
* Updated flags.go to refine the Usage for the BootStrapNodeFile flag

Co-authored-by: Nishant Das <nish1993@hotmail.com>
* Merge branch 'master' into dv8s-iss6316
* Utilize stdlib TempFile to avoid polluting
* Merge branch 'master' into dv8s-iss6316
* Merge branch 'master' into dv8s-iss6316
* Merge branch 'master' into dv8s-iss6316
* Merge branch 'master' into dv8s-iss6316
* Merge branch 'master' into dv8s-iss6316
* Merge branch 'master' into dv8s-iss6316
* Merge branch 'master' into dv8s-iss6316
* Merge branch 'master' into dv8s-iss6316
* Merge branch 'master' into dv8s-iss6316
* Merge branch 'master' into dv8s-iss6316
* Merge branch 'master' into dv8s-iss6316
* merge master into this branch
* Merge branch 'master' into dv8s-iss6316
* Merge branch 'master' into dv8s-iss6316
* Merge branch 'master' into dv8s-iss6316
* Merge branch 'master' into dv8s-iss6316
* Merge branch 'master' into dv8s-iss6316
* Merge branch 'master' into dv8s-iss6316
* Merge branch 'master' into dv8s-iss6316
* Merge branch 'master' into dv8s-iss6316
* Merge branch 'master' into dv8s-iss6316
* Changed bootstrap-node to StringSlice flag to allow multiple nodes to be passed.  Each value can be .enr file which will be YAML parsed to extract nodes
* Refactored to create separate readbootNodes function and added a test for it.
* More cleaning up
* Changed wording in the cli help for --bootstrap-node
* Merge branch 'master' into dv8s-iss6316
* Since we are taking YAML files, got rid of .enr check and instead we check for the string prefix of a enr record or not to determine if file.
* Merge with dv8silencer/tempissue6316
* Correct spacing

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Changed how we check for YAML file vs CLI-direct ENR
* Minor:  Changed to 1 string from concatenating 2
* Merge branch 'master' into dv8s-iss6316
2020-06-26 11:23:38 +00:00
terence tsao
461bc4694f
QST40 QST42 QST44 - Move deletes to test scope only (#6410)
* Rm delete from interface
* Rm passthroughs
* Unexport
* Lint
* Merge branch 'master' into unexport-delete
* Merge refs/heads/master into unexport-delete
* Merge refs/heads/master into unexport-delete
* Merge refs/heads/master into unexport-delete
2020-06-26 04:29:13 +00:00
Preston Van Loon
806a465117
Remove unused p2p encoding method (#6411)
* Remove unused p2p encoding method
2020-06-26 04:02:09 +00:00
Raul Jordan
1b430e0c17
QSP-62 Corrupted Clock In Stream Deadlines (#6404)
* deadline warn
* add proper godoc information
* clarify
* Merge refs/heads/master into corrupted-clock
* fix broken build
* Merge refs/heads/master into corrupted-clock
* Merge refs/heads/master into corrupted-clock
2020-06-25 22:36:18 +00:00
Raul Jordan
6b27452947
QSP-39 AreEth1DataEqual Should Return True If Both Nil (#6372)
* resolve small core issue

* add tests

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-25 18:01:58 -04:00
terence tsao
ac69dbc2f8
Deprecates --disable-init-sync-batch-save-blocks flag (#6403)
* Deprecate flags in feature config

* Deprecate usages

* Update test

* Go fmt

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-25 15:55:43 -05:00
Raul Jordan
45e1c0bb8c
QSP-54 Handle Default Datadir Empty String (#6394)
* default datadir
* Merge refs/heads/master into default-data-dir
* Merge refs/heads/master into default-data-dir
* Merge refs/heads/master into default-data-dir
* Merge refs/heads/master into default-data-dir
* Update node.go
* Merge refs/heads/master into default-data-dir
* Merge refs/heads/master into default-data-dir
* Merge refs/heads/master into default-data-dir
* Merge refs/heads/master into default-data-dir
* Merge refs/heads/master into default-data-dir
* Merge refs/heads/master into default-data-dir
2020-06-25 18:02:07 +00:00
Shay Zluf
9103ec98cb
QSP-14 consistent file permissions (#6378)
* QSP-14 consistent file permissions
* Merge refs/heads/master into consistent_permissions
* Merge refs/heads/master into consistent_permissions
* default io file permissions
* Merge branch 'consistent_permissions' of github.com:prysmaticlabs/prysm into consistent_permissions
* fix comments
* Merge refs/heads/master into consistent_permissions
* Merge refs/heads/master into consistent_permissions
* gaz
* Merge branch 'consistent_permissions' of github.com:prysmaticlabs/prysm into consistent_permissions
* Merge refs/heads/master into consistent_permissions
* Rename IoConfig.go to io_config.go
* Update shared/params/BUILD.bazel
* Merge refs/heads/master into consistent_permissions
* raul feedback
* Merge branch 'consistent_permissions' of github.com:prysmaticlabs/prysm into consistent_permissions
* Merge refs/heads/master into consistent_permissions
* Merge refs/heads/master into consistent_permissions
* Merge refs/heads/master into consistent_permissions
* Merge refs/heads/master into consistent_permissions
* Merge refs/heads/master into consistent_permissions
* Merge refs/heads/master into consistent_permissions
* gaz
* Merge branch 'consistent_permissions' of github.com:prysmaticlabs/prysm into consistent_permissions
* Merge refs/heads/master into consistent_permissions
* Merge refs/heads/master into consistent_permissions
* Merge refs/heads/master into consistent_permissions
* Merge refs/heads/master into consistent_permissions
2020-06-25 16:12:59 +00:00
Victor Farazdagi
00f24f5729
Deprecates --disable-init-sync-wrr flag (#6400)
* deprecates wrr-related flag

* gofmt + gazelle

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-25 10:26:30 -05:00
Nishant Das
5fdf6310f7
add back handler (#6398)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-25 13:07:31 +03:00
Raul Jordan
662c5cd302
QSP-47 Remove Meaningless Relay Addr Check (#6388)
* add relay factory fix
* Merge refs/heads/master into qsp-47
* Merge refs/heads/master into qsp-47
* Merge refs/heads/master into qsp-47
* Merge refs/heads/master into qsp-47
* Merge refs/heads/master into qsp-47
* Merge refs/heads/master into qsp-47
* Merge refs/heads/master into qsp-47
* Merge refs/heads/master into qsp-47
* Merge refs/heads/master into qsp-47
2020-06-25 09:16:30 +00:00
Raul Jordan
26e27bf052
QSP-41 Clarify Block Filters Passthrough In DB (#6397)
* clarify filters
* Merge refs/heads/master into blocks-filter-criteria
* Merge refs/heads/master into blocks-filter-criteria
2020-06-25 08:31:07 +00:00
terence tsao
9a156bd73a
Best practice follow up - remove outdated todos (#6392)
* Addressed 30.

* Remove outdated todos

* Go fmt

* Go fmt

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-24 23:14:11 -05:00
Raul Jordan
0b178b446a
QSP-64 Conditional for Rebuilding BlockRoots Trie in State Setters (#6390)
* rebuild trie for block roots
* Merge refs/heads/master into rebuild-trie-fix
* Merge refs/heads/master into rebuild-trie-fix
2020-06-25 02:03:18 +00:00
Preston Van Loon
fb8be4d555
Refactor BLS (#6395)
* refactor BLS to expose an interface rather than a single implementation
* Split up tests, gofmt, goimports, docs
* godoc for signature.Copy()
* more godocs
* revert gomod / deps changes
* rm newline
* revert proto changes
* rename bls12 to herumi for clarity
2020-06-25 00:47:51 +00:00
terence tsao
d0e2e0e979
Best practice feedback - part 1 (#6385)
* log error for metric
* reuse epoch e
* Better node comments
* Remove not needed breaks
* Use j over i
* Merge branch 'master' of github.com:prysmaticlabs/prysm into best-practice-pt1
* Descendent/Descendant
* Merge refs/heads/master into best-practice-pt1
* Update beacon-chain/forkchoice/protoarray/nodes.go
* Merge refs/heads/master into best-practice-pt1
* Merge refs/heads/master into best-practice-pt1
2020-06-24 21:09:47 +00:00
Raul Jordan
ac77a5c054
QSP-25 Only Enable Relay if Flag Provided (#6386)
* only add relay if flag is on
* Merge branch 'master' into qsp-25
* Merge refs/heads/master into qsp-25
* Merge refs/heads/master into qsp-25
2020-06-24 19:30:40 +00:00
terence tsao
a9c1d25a35
Best practice feedback - part 2 (#6389)
* Feedback 10. Rename to highest epoch
* Feedback 11. Rename to pidepoch
* Feedback 39. Swap length
* Typo
* Merge refs/heads/master into best-practice-pt2
2020-06-24 18:06:19 +00:00
Raul Jordan
bfce4c7f63
QSP-65 Clarify Why UnshuffleList is Used (#6381)
* clarify why unshuffle list
* Update beacon-chain/core/helpers/committee.go
* Merge branch 'master' into qsp-65
2020-06-24 16:57:09 +00:00
Nishant Das
045a983032
Add Altona Config (#6380) 2020-06-24 07:03:16 -07:00
Shay Zluf
b8e1bf0445
Fix proposer slashing context timeout test (#6379)
* Fix proposer slashing context timeout test
* goimports
* revert slashing change
* Merge branch 'master' into fix_proposer_slashing_test
2020-06-24 12:10:40 +00:00
Shay Zluf
edb08bd209
QPS-20 implement removeDisconnectedPeerStatus (#6370)
* QPS-20 implement removeDisconnectedPeerStatus
* Merge refs/heads/master into remove_disconnected_peer_status
* Merge refs/heads/master into remove_disconnected_peer_status
* Merge refs/heads/master into remove_disconnected_peer_status
* Merge refs/heads/master into remove_disconnected_peer_status
* Merge refs/heads/master into remove_disconnected_peer_status
* Merge refs/heads/master into remove_disconnected_peer_status
* Merge refs/heads/master into remove_disconnected_peer_status
* Merge refs/heads/master into remove_disconnected_peer_status
* Merge refs/heads/master into remove_disconnected_peer_status
* Merge refs/heads/master into remove_disconnected_peer_status
* Merge refs/heads/master into remove_disconnected_peer_status
* Merge refs/heads/master into remove_disconnected_peer_status
* remove function
* Merge branch 'remove_disconnected_peer_status' of github.com:prysmaticlabs/prysm into remove_disconnected_peer_status
* Merge refs/heads/master into remove_disconnected_peer_status
* Merge branch 'remove_disconnected_peer_status' of github.com:prysmaticlabs/prysm into remove_disconnected_peer_status
2020-06-24 10:40:33 +00:00
Nishant Das
e45a06cbf1
Revert "QSP-42 Remove Double Unsubscribe in Initial Sync" (#6376)
* Revert "QSP-42 Remove Double Unsubscribe in Initial Sync (#6368)"

This reverts commit 637354f037.

* comment

* add go fmt
2020-06-24 17:01:48 +08:00
Ivan Martinez
e9a597b43c
[QSP-6] Change usages of math/rand to crypto/rand (#6362)
* Change math/rand to crypto/rand
* Change length
* Merge branch 'master' of github.com:prysmaticlabs/prysm into change-to-crypto-rand
* Change assignments to true random
* Merge branch 'master' into change-to-crypto-rand
* Change randomness
* Merge branch 'change-to-crypto-rand' of github.com:prysmaticlabs/prysm into change-to-crypto-rand
* Remove comments
* Test
* Fix test
* Merge refs/heads/master into change-to-crypto-rand
* Merge refs/heads/master into change-to-crypto-rand
* Merge refs/heads/master into change-to-crypto-rand
* Merge refs/heads/master into change-to-crypto-rand
* Merge refs/heads/master into change-to-crypto-rand
* Merge refs/heads/master into change-to-crypto-rand
* Merge refs/heads/master into change-to-crypto-rand
* Merge refs/heads/master into change-to-crypto-rand
* Merge refs/heads/master into change-to-crypto-rand
* Merge refs/heads/master into change-to-crypto-rand
* Merge refs/heads/master into change-to-crypto-rand
2020-06-24 05:47:51 +00:00
terence tsao
a4cfd147ff
Address spec adherence feedbacks (#6365)
* Addressed 1
* Address 2.
* Addressed 3. and 4.
* Addressed 6.
* Addressed 7
* Addressed 8
* Addressed 9.
* Addressed 10.
* Addressed 11.
* Addressed 12.
* Addressed 13.
* Delete old test
* Merge refs/heads/master into spec-feedbacks
* Change comment "pure" to "stateless"
* Fmt
* Typo
* Merge refs/heads/master into spec-feedbacks
* Merge refs/heads/master into spec-feedbacks
* Merge refs/heads/master into spec-feedbacks
* Merge refs/heads/master into spec-feedbacks
* Merge refs/heads/master into spec-feedbacks
* Merge refs/heads/master into spec-feedbacks
* Merge refs/heads/master into spec-feedbacks
* Merge refs/heads/master into spec-feedbacks
* Merge refs/heads/master into spec-feedbacks
* Merge refs/heads/master into spec-feedbacks
2020-06-24 03:14:44 +00:00
Nishant Das
e9057185a5
Fix Peering Issues in Discovery (#6346)
* add current changes
* comment
* Merge branch 'master' into fixPeeringIssues
* Merge refs/heads/master into fixPeeringIssues
* Merge refs/heads/master into fixPeeringIssues
* Merge refs/heads/master into fixPeeringIssues
* clean up
* add comment
* Merge refs/heads/master into fixPeeringIssues
* Merge branch 'master' of https://github.com/prysmaticlabs/geth-sharding into fixPeeringIssues
* Merge refs/heads/master into fixPeeringIssues
* Merge refs/heads/master into fixPeeringIssues
* Merge refs/heads/master into fixPeeringIssues
* Merge refs/heads/master into fixPeeringIssues
* Merge refs/heads/master into fixPeeringIssues
* Merge refs/heads/master into fixPeeringIssues
* Merge refs/heads/master into fixPeeringIssues
* Merge refs/heads/master into fixPeeringIssues
* Merge refs/heads/master into fixPeeringIssues
* Merge refs/heads/master into fixPeeringIssues
* Merge refs/heads/master into fixPeeringIssues
* Merge refs/heads/master into fixPeeringIssues
* Merge refs/heads/master into fixPeeringIssues
* Merge refs/heads/master into fixPeeringIssues
* Merge refs/heads/master into fixPeeringIssues
* Merge refs/heads/master into fixPeeringIssues
* Merge refs/heads/master into fixPeeringIssues
2020-06-24 01:09:09 +00:00
Nishant Das
24d09f083f
Release State Reference Copy (#6341)
* release flag
* add comment
* improve
* Merge refs/heads/master into releaseStateRef
* Merge refs/heads/master into releaseStateRef
* Merge branch 'master' into releaseStateRef
* Merge refs/heads/master into releaseStateRef
* Merge refs/heads/master into releaseStateRef
* Merge refs/heads/master into releaseStateRef
* Merge refs/heads/master into releaseStateRef
* Merge branch 'master' of https://github.com/prysmaticlabs/geth-sharding into releaseStateRef
* remove old flags
* gaz
* Merge refs/heads/master into releaseStateRef
* Merge refs/heads/master into releaseStateRef
* Merge refs/heads/master into releaseStateRef
* Merge refs/heads/master into releaseStateRef
* Merge refs/heads/master into releaseStateRef
* Merge refs/heads/master into releaseStateRef
* Merge refs/heads/master into releaseStateRef
2020-06-24 00:24:59 +00:00
Raul Jordan
637354f037
QSP-42 Remove Double Unsubscribe in Initial Sync (#6368)
* rem double unsub
* Update beacon-chain/sync/initial-sync/service.go

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Merge refs/heads/master into qsp-unsub
* Merge refs/heads/master into qsp-unsub
* Merge refs/heads/master into qsp-unsub
* Merge refs/heads/master into qsp-unsub
* Merge refs/heads/master into qsp-unsub
2020-06-23 23:50:52 +00:00
terence tsao
c3adde3b32
QSP10, QSP11 - Add proper locking (#6350)
* Proper locking based on audit feedbacks
* Merge refs/heads/master into qsp10-11
* Merge refs/heads/master into qsp10-11
* Preston's feedback
* Merge branch 'qsp10-11' of github.com:prysmaticlabs/prysm into qsp10-11
* Unlock in invalid index branch
* Merge refs/heads/master into qsp10-11
* Merge refs/heads/master into qsp10-11
* Merge refs/heads/master into qsp10-11
* Merge refs/heads/master into qsp10-11
* Merge refs/heads/master into qsp10-11
* Merge refs/heads/master into qsp10-11
* Merge refs/heads/master into qsp10-11
* Merge refs/heads/master into qsp10-11
* Merge refs/heads/master into qsp10-11
* Merge refs/heads/master into qsp10-11
* Merge refs/heads/master into qsp10-11
* Merge refs/heads/master into qsp10-11
* Merge branch 'master' into qsp10-11
* Merge refs/heads/master into qsp10-11
* Merge refs/heads/master into qsp10-11
* Merge refs/heads/master into qsp10-11
* Merge refs/heads/master into qsp10-11
2020-06-23 23:08:08 +00:00
Raul Jordan
2bdb825c04
QSP-61 Clarify Why Process Pending Attestations May Exit Early (#6371)
* clarify with comment
* Merge refs/heads/master into qsp-61
* Merge refs/heads/master into qsp-61
* Merge refs/heads/master into qsp-61
2020-06-23 22:34:31 +00:00
Raul Jordan
7ba26aa433
Add Mutex to Hot State Cache (#6366)
* mutex to hot state cache
* Merge branch 'master' into add-hotstate-lock
* Merge refs/heads/master into add-hotstate-lock
* Merge refs/heads/master into add-hotstate-lock
2020-06-23 22:06:47 +00:00
terence tsao
374a84d577
Remove new state mgmt within db package (#6373)
* Remove new state mgmt within db package
* Merge refs/heads/master into rm-new-state-db
2020-06-23 21:36:21 +00:00
Raul Jordan
e1310adb4c
QSP-Docs All Documentation Improvements from Quantstamp Audit Report (#6367)
* docs improvements so far
* all misc docs items
* finalized
* Merge branch 'master' into qsp-docs
* fix broken test
* Merge branch 'master' into qsp-docs
2020-06-23 21:11:20 +00:00
Preston Van Loon
f9038674d1
Refactor setupDB to return the state summary cache used by the database (#6369) 2020-06-23 13:40:55 -07:00
Victor Farazdagi
33b2636bf1
Enables new aggregation implementation (#6344)
* adds feature flag
* aggregations/attestation package
* better tests
* bazel visibility issues
* removes redundant code
* Merge branch 'master' into aggregation-attestations-package
* updates previous implementation
* Merge branch 'master' into aggregation-enable-new-aggregation
* resolve merge conflict
* resolve merge conflict (more)
* Merge branch 'master' into aggregation-enable-new-aggregation
* force max_cover aggregation on --dev
* Merge branch 'aggregation-enable-new-aggregation' of github.com:prysmaticlabs/prysm into aggregation-enable-new-aggregation
* Merge branch 'master' into aggregation-enable-new-aggregation
* Merge refs/heads/master into aggregation-enable-new-aggregation
* Merge refs/heads/master into aggregation-enable-new-aggregation
* Merge refs/heads/master into aggregation-enable-new-aggregation
* Merge refs/heads/master into aggregation-enable-new-aggregation
* Merge refs/heads/master into aggregation-enable-new-aggregation
2020-06-23 19:13:55 +00:00
terence tsao
c417b00675
Fix cold state replay to start at correct slot (#6361)
* Fix off by 1
* Regression tests
* Merge branch 'master' of github.com:prysmaticlabs/prysm into fix-offset
* Go fmt
* Merge refs/heads/master into fix-offset
* Merge refs/heads/master into fix-offset
2020-06-23 16:04:42 +00:00
Ivan Martinez
81786159e9
Move permanent globally needed flags to shared/cmd and makes them accessible (#6312)
* Move permanent flags to shared/cmd and make them accessible
* Merge branch 'master' of github.com:prysmaticlabs/prysm into move-flags-to-cmd
* Add test
* Add comment
* Fix gaz
* Replace with new config
* Gaz
* replace
* gaz
* Merge branch 'master' into move-flags-to-cmd
* Merge refs/heads/master into move-flags-to-cmd
* Prestons comments
* Nishant comments
* Merge branch 'move-flags-to-cmd' of github.com:prysmaticlabs/prysm into move-flags-to-cmd
* Merge refs/heads/master into move-flags-to-cmd
* Merge refs/heads/master into move-flags-to-cmd
* Merge refs/heads/master into move-flags-to-cmd
* Merge refs/heads/master into move-flags-to-cmd
* Merge refs/heads/master into move-flags-to-cmd
* Merge refs/heads/master into move-flags-to-cmd
* Merge refs/heads/master into move-flags-to-cmd
* Merge refs/heads/master into move-flags-to-cmd
* Merge refs/heads/master into move-flags-to-cmd
* Merge refs/heads/master into move-flags-to-cmd
* Merge refs/heads/master into move-flags-to-cmd
* Merge branch 'master' into move-flags-to-cmd
* Merge refs/heads/master into move-flags-to-cmd
* fmt
2020-06-23 15:41:20 +00:00
Anton
fe6cf9f33b
SubscribeCommitteeSubnets fields length check (#6359)
* SubscribeCommitteeSubnets fields length check

A case where `len(req.Slots) != len(req.CommitteeIds)` but `len(req.CommitteeIds) == len(req.IsAggregator)`
should also throw an error. Without this fix only 2 length inequalities will throw the error.

Greetings from PwC Switzerland
* Added diff length SubscribeCommitteeSubnets test
* Merge branch 'master' into patch-1
2020-06-23 14:50:46 +00:00
Victor Farazdagi
078c157f56
Resolves issues from the best practices in beacon-chain/db (#6358)
* fixes 51
* fixes 52
* fixes 53
* fixes 54
* fixes 56
* Merge branch 'master' into db-best-practices
* fixes 62
* fixes 64
* fixes 65
* fixes 68
* fixes 69
2020-06-23 13:51:00 +00:00
Victor Farazdagi
22b3123ebe
Resolves issues from the best practices in sync package (#6357)
* removes redundant locks
* fixes 37
* fixes 38
* reverts lock removal
* Merge branch 'master' into sync-best-practices-updates
* Merge refs/heads/master into sync-best-practices-updates
2020-06-23 12:00:29 +00:00
Victor Farazdagi
64b0f775d3
Fixes receiver name in db/kv (#6356)
* Fixes receinver name in db/kv
* Merge refs/heads/master into fix-receiver-name
* Merge refs/heads/master into fix-receiver-name
2020-06-23 10:15:01 +00:00
Victor Farazdagi
89ef3cfdc6
Fixes error message wording (#6355)
* fixes error message wording
* Merge refs/heads/master into fix-error-msg-wording
2020-06-23 09:44:39 +00:00
Nishant Das
36c82b26e4
Minor Improvements (#6353)
* minor improvements
* Update beacon-chain/sync/deadlines.go
* go fmt
2020-06-23 09:00:09 +00:00
Victor Farazdagi
5c90038007
Adds aggregation/attestations package (#6343)
* adds feature flag

* aggregations/attestation package

* better tests

* bazel visibility issues

* removes redundant code

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-22 23:00:38 -05:00
Raul Jordan
71a6c73e93
Remove All Instances of Kademlia from Prysm (#6323)
* fully remove kad
* Merge branch 'master' into rem-kad
* Update beacon-chain/p2p/service.go
* no workspace kad
* Merge branch 'rem-kad' of github.com:prysmaticlabs/prysm into rem-kad
* mod tidy
* Merge refs/heads/master into rem-kad
* Merge refs/heads/master into rem-kad
* Merge refs/heads/master into rem-kad
* add back bootnode query tool
* Merge branch 'rem-kad' of github.com:prysmaticlabs/prysm into rem-kad
* fix up multiaddr tests
* fix build
* fix up go build
* fix go build
* update dep
* Merge refs/heads/master into rem-kad
* Merge refs/heads/master into rem-kad
* Merge refs/heads/master into rem-kad
* Merge refs/heads/master into rem-kad
2020-06-23 02:53:11 +00:00
terence tsao
5c8da7a1c4
QSP58, QSP59 - Fix DB spans (#6352)
* Fix spans
* Merge refs/heads/master into qsp58-59
2020-06-23 02:22:22 +00:00
terence tsao
368af7e53f
Clean up old block processing paths (#6311)
* Remove old block processing paths

* Go fmt

* Go fmt again

* Fix tests

* Using the wright receiver

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-06-22 17:19:33 -07:00
Victor Farazdagi
41c8ff4c1b
Renames receiver in sync service (#6348)
* updates coinciding vars
* renames receiver in sync service
* Merge branch 'master' into sync-rename-receiver
2020-06-22 20:37:48 +00:00
terence tsao
c837dfb2f2
ActivationEligibilityEpoch nil case (#6347) 2020-06-22 14:41:21 -05:00
Nishant Das
3b2dc8346d
Release State Field Trie (#6340)
* remove flag and references
* fix flag
* Merge refs/heads/master into releaseStateFieldTrie
* Merge refs/heads/master into releaseStateFieldTrie
2020-06-22 15:25:55 +00:00
Victor Farazdagi
6f8349cdb4
Reclaims leakybucket resources in sync service (#6339)
* Reclaims leakybucket resources
* move calls to defer
* do not reuse queue, after stopping
2020-06-22 11:23:23 +00:00
Preston Van Loon
d4545233cd
Fix race condition issues in beacon state (#6322)
* Fix race condition issues in beacon state
* Merge branch 'master' of github.com:prysmaticlabs/prysm into race-condition-fixes
* Checkout beacon-chain/state/stateutil/BUILD.bazel from master
* @nisdas PR feedback. defer unlock
2020-06-20 00:27:23 +00:00
rkapka
4f4846794a
renamed variable (#6319) 2020-06-19 13:46:18 -07:00
Nishant Das
7e1a61f8eb
Add Debug Endpoints For Peers (#6304)
* add debug endpoints

* gaz

* add more stuff

* add tests

* clean up

* Update beacon-chain/rpc/debug/server.go

* fmt

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-19 13:25:47 -05:00
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
terence tsao
394f3ab53a
Revert "Fetch deposit data only up to canonical Eth1 height when proposing (#6309)" (#6313)
This reverts commit fb26b0b65c.
2020-06-18 16:56:38 -07:00
rkapka
fb26b0b65c
Fetch deposit data only up to canonical Eth1 height when proposing (#6309)
* get data up to canonical block height

* gofmt

* simplified calculation of canonical height
2020-06-18 17:31:26 -05: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
Jim McDonald
10af753f59
Unlock mutex on return (#6303)
Co-authored-by: Nishant Das <nishdas93@gmail.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-06-18 11:04:08 -05:00
Jim McDonald
86e9b0ae51
Ping handler timeout (#6302)
* Fix goroutine using cancelled context.

* Only close stream when finished

* Simplify function structure
2020-06-18 19:59:18 +08: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
640bba8a6c
Avoid active validator count cache for genesis (#6292)
* Add helper to prevent zero hashes

* Test

* Don't use cache if it's genesis

* Regression test

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-17 19:48:10 -05:00
terence tsao
6781bd643b
Fix getting att pre state in sync (#6295) 2020-06-17 16:44:43 -07:00
terence tsao
802bdf5561
Fix GetValidatorPerformance before/after balances (#6293)
* Add helper to prevent zero hashes

* Test

* Fix precompute validators to have before/after balances

* Update tests to use correct values

* Even better test setups

* Gaz

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-17 13:46:42 -05:00
terence tsao
523fc621d9
First part of block chain service cleanup (#6286)
* Add helper to prevent zero hashes
* Test
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Remove ReceiveBlockNoPubsubForkchoice and rename ReceiveBlockInitialSync
* Apply feature flag to process_block.go
* Update mock and tests
* Update beacon-chain/blockchain/process_block.go

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Merge refs/heads/master into bc-pkg-cleanup
* Merge refs/heads/master into bc-pkg-cleanup
* Fix mock ReceiveBlockInitialSync. Thanks Victor!
* Merge branch 'bc-pkg-cleanup' of github.com:prysmaticlabs/prysm into bc-pkg-cleanup
* Merge refs/heads/master into bc-pkg-cleanup
* Merge refs/heads/master into bc-pkg-cleanup
2020-06-17 17:11:21 +00:00
Shay Zluf
472fbd3949
Less restrictive block stream for slashing detection (#6269)
* verify sig in stream

* state cache used

* fix import

* fix import

* fix tests

* add log for proposer slashing

* fix e2e

* use chain head to verify sig

* revert fix

* remove extra line

* add line

* revert extra log

* fix tests

* terence feedback

* fix

* fix test

* remove extra setup

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-17 12:38:07 -04:00
Raul Jordan
0bfa1ecd03
Clarify Insecure gRPC Connection Logs (#6276)
* clarify insecure conn
* fix up broken test
* Merge refs/heads/master into amend-grpc-instructions
* Merge refs/heads/master into amend-grpc-instructions
* Merge refs/heads/master into amend-grpc-instructions
* Merge refs/heads/master into amend-grpc-instructions
* Merge refs/heads/master into amend-grpc-instructions
* Merge refs/heads/master into amend-grpc-instructions
* Merge refs/heads/master into amend-grpc-instructions
2020-06-17 14:32:13 +00: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
213be4cfbe
Verify many block attestations at once (#6277) 2020-06-16 14:19:10 -07:00
terence tsao
fe2f8a1c04
Use justified balances for fork choice (#6272) 2020-06-16 08:10:34 -07:00
Nishant Das
ed883c9fff
More Fixes For Powchain (#6278)
* fix issues

* add check

* Update beacon-chain/powchain/service.go

* Update beacon-chain/powchain/service.go

* Update beacon-chain/powchain/service.go

* Update beacon-chain/powchain/service.go

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-06-15 21:07:20 -05:00
terence tsao
4c143f4ed4
Fix underflow in resyncIfBehind (#6274) 2020-06-15 16:46:36 -07:00
Ivan Martinez
4b4a7459d9
Fix windows DB path error and make errors more concise (#6270)
* Make DB errors more verbose, fix windows path error
* Merge branch 'master' into windows-err
* Merge refs/heads/master into windows-err
* Merge refs/heads/master into windows-err
2020-06-15 20:00:35 +00:00
terence tsao
e59ee2f203
Fix validator summary reporting (#6267)
* Add helper to prevent zero hashes
* Test
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Update validator summary
* Update existing tests to work with new indices
* Remove extra log
* Gazelle
* Merge branch 'master' into fix-validatory-summary
* Merge refs/heads/master into fix-validatory-summary
* Merge refs/heads/master into fix-validatory-summary
2020-06-15 17:25:58 +00:00
Nishant Das
87084ec9f1
fix issues (#6265) 2020-06-15 10:43:45 -05:00
terence tsao
a9070ad725
ActiveValidatorCount to use cache (#6254)
* Add helper to prevent zero hashes

* Test

* Add ActiveIndicesCount getter for committee cache

* ActiveIndicesCount test

* ActiveValidatorCount to use cache

* Update cache on miss

* Update tests
2020-06-14 15:24:49 -07:00
terence tsao
f4e9e2f49c
Minor clean up to 6249 (#6253)
* Add helper to prevent zero hashes

* Test

* Comments

* Comments
2020-06-14 10:43:25 -07:00
Nishant Das
1dfeb645b6
Filter Peers Properly With Connection Gater (#6251)
* add new filtering
* add new tests
* gaz
* shay's review
* Merge branch 'master' into fixFiltering
2020-06-14 14:47:58 +00:00
Nishant Das
933ab6808b
mark peer as bad (#6250) 2020-06-14 07:10:18 -07:00
Nishant Das
f9d80e4a28
Fix Genesis Justified Checkpoints (#6249)
* handle zero hash
2020-06-14 09:02:56 +00:00
Nishant Das
caf61bd824
Use Connection Gater to Manage Peer Connections (#6243)
* use gater
* Merge branch 'master' into connGater
* Update beacon-chain/p2p/testing/p2p.go
* fmt
* gaz
2020-06-14 07:35:05 +00:00
terence tsao
87ba5a5993
Fix ancestor to return most recent root in the case of skip slot (#6242)
* Revert "remove excess copies (#6142)"

This reverts commit c956905cf0.
* Update ancestor function to handle skip slot
* Test
* Revert "Revert "remove excess copies (#6142)""

This reverts commit f1222b5e77f9356dd370182808d9c1e5fc3f5e12.
* Merge refs/heads/master into fix-ancestor
2020-06-14 06:58:36 +00:00
Nishant Das
0067e52b1e
Revert "Remove Excess State Copies" (#6240)
* Revert "remove excess copies (#6142)"

This reverts commit c956905cf0.
2020-06-14 06:34:33 +00:00
terence tsao
c29cccf78e
Don't regen parent state for genesis state (#6237) 2020-06-13 11:04:04 -07: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
de45a54991
Do Not Ignore Max Gateway Size gRPC (#6232)
* do not ignore max message size in gateway
* fix build
2020-06-12 20:02:20 +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
bc76c95d62
Skip proposer duty calculation for slot 0 (#6228)
* Skip proposer assignment for slot 0

* Test

* Clear cache before test

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-12 11:20:50 -07:00
Preston Van Loon
c461c72777
Add dockerhub image endpoints (#6230)
* Add dockerhub image endpoints
2020-06-12 17:06:12 +00:00
Nishant Das
c725a9c8f2
Sort Duplicate Blocks In Response (#6222)
* sort out new blocks
* add unit test
* Merge refs/heads/master into sortDuplicates
* victor's review
* Merge branch 'sortDuplicates' of https://github.com/prysmaticlabs/geth-sharding into sortDuplicates
* Merge refs/heads/master into sortDuplicates
2020-06-12 13:50:07 +00:00
Nishant Das
412da8e7cc
Follow Up to #6225 (#6226)
* don't wait
* Merge branch 'master' of https://github.com/prysmaticlabs/geth-sharding into dontWait
* revert some changes
* bring back
2020-06-12 13:23:29 +00:00
Nishant Das
82f4d6a14a
Do Not Wait Till Genesis (#6225)
* don't wait
2020-06-12 11:44:04 +00:00
Preston Van Loon
89762492c8
Reduce JSON-RPC queries (#6221)
* Delete unused client property
* Only update the logs every 5 minutes
* Merge branch 'master' into reduce-json-rpc-calls
* Merge refs/heads/master into reduce-json-rpc-calls
* Merge refs/heads/master into reduce-json-rpc-calls
* PR feedback from @nisdas
* gofmt
* Merge branch 'reduce-json-rpc-calls' of github.com:prysmaticlabs/prysm into reduce-json-rpc-calls
2020-06-12 04:05:40 +00:00
Nishant Das
1a6edbbaa2
Fix Proposer Bug in Prysm (#6213)
* advance slots instead of setting slots
* Merge branch 'master' into fixProposerBug
* comment
* Merge branch 'fixProposerBug' of https://github.com/prysmaticlabs/geth-sharding into fixProposerBug
* Refactor `packAttestations` to utilize same advanced state
* Merge branch 'master' into fixProposerBug
* Merge branch 'master' into fixProposerBug
* Merge branch 'master' into fixProposerBug
* Merge refs/heads/master into fixProposerBug
* Merge refs/heads/master into fixProposerBug
* Update beacon-chain/rpc/validator/proposer.go

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Merge refs/heads/master into fixProposerBug
2020-06-11 23:05:10 +00:00
Raul Jordan
abec538fda
Prevent Whistleblower Index Bug (#6219)
* resolve proposer panic

* proposer is whistleblower

* import

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-11 15:08:26 -05:00
Raul Jordan
2fb485598b
Resolve Nil Validator Panic (#6218)
* resolve proposer panic
* Merge refs/heads/master into panic-proposer-slashed
2020-06-11 17:38:03 +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
terence tsao
83242466f4
Fix proposer calculation in sync (#6214) 2020-06-11 09:31:01 -07: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
Fabrice Cheng
28e61fa40c
Verify External IP is reachable or log a warning if not (#6155)
* Only build with cgosymbolizer when explicitly desired. This fixes go builds for mac and others

* Try to dial external IP set and display a warning message is not reachable

* fix dialTimeout adding the port

* add connectivity check for UDP as well

* add connectivy verification for both UDP and TCP and move function in p2p/utils.go

* return if Resolving UDP fails

* move constant in utils

* add missing time dependencies

* leverage dial for both TCP/UDP (even thoguh UDP is not supported & add a unit tests for `verifyConnectivity`

* handle err from conn.Close()

* add utils_test go p2p gazelle

* Update beacon-chain/p2p/utils.go

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

* Update beacon-chain/p2p/utils.go

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>

* Update beacon-chain/p2p/utils.go

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>

* do not defer closing the connection

* leverage util helper testutil.AssertLogsContain and testutil.AssertLogsDoNotContain

* remove old code

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>
2020-06-10 18:41:11 -05:00
terence tsao
edeb359ded
Use SSZ HTR as baseline (#6207)
* Use ssz htr as baseline to compare
* Merge branch 'master' into fix-test
* One more. Fix for TestBlockBodyRoot_NilIsSameAsEmpty
* Merge branch 'fix-test' of github.com:prysmaticlabs/prysm into fix-test
2020-06-10 17:51:06 +00: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
Jim McDonald
61855bc596
Add block number to deposit log (#6200)
* Add block number to deposit log
* Update beacon-chain/powchain/log_processing.go

Co-authored-by: Nishant Das <nish1993@hotmail.com>
* Merge branch 'master' into log-deposit-block
* gofmt
* Merge branch 'master' into log-deposit-block
2020-06-10 14:31:58 +00:00
Nishant Das
d66570c72b
change gateway port (#6203) 2020-06-10 06:56:39 -07:00
Nishant Das
8188fc0f9e
Use Updated Connection Manager (#6184)
* introduce updated connection manager
* Merge branch 'master' into removeHardLimit
* remove forked connection manager
* Merge branch 'removeHardLimit' of https://github.com/prysmaticlabs/geth-sharding into removeHardLimit
* Merge branch 'master' into removeHardLimit
* Merge branch 'master' into removeHardLimit
* Merge branch 'master' of https://github.com/prysmaticlabs/geth-sharding into removeHardLimit
* Merge branch 'master' of https://github.com/prysmaticlabs/geth-sharding into removeHardLimit

# Conflicts:
tidy up
* Merge branch 'removeHardLimit' of https://github.com/prysmaticlabs/geth-sharding into removeHardLimit
2020-06-10 00:22:45 +00:00
Nishant Das
d1a1043ef1
Update to v0.12 (#5614) 2020-06-09 15:40:48 -07:00
Preston Van Loon
47dacb88f7
Make a simple json-rpc call to ensure we are connected to a real ETH1 node (#6191)
* Make a simple json-rpc call to ensure we are connected to a real node
* Merge refs/heads/master into check-connection
2020-06-09 21:26:15 +00:00
Victor Farazdagi
50af507407
Improves operations/attestations/kv test coverage (#6181)
* fixes span names
* TestKV_SaveUnaggregatedAttestation tests added
* TestKV_SaveUnaggregatedAttestations test
* adds count tests
* TestKV_Unaggregated_CanDelete
* fixes naming
* Merge branch 'master' into att-pool-kv-cleanup
* better naming
* Merge branch 'att-pool-kv-cleanup' of github.com:prysmaticlabs/prysm into att-pool-kv-cleanup
* naming
* TestKV_Aggregated_SaveUnaggregatedAttestation added
* Merge branch 'master' into att-pool-kv-cleanup
* naming
* updates TestKV_Aggregated_HasAggregatedAttestation
* updates delete tests
* fix order
* Merge branch 'master' into att-pool-kv-cleanup
2020-06-09 21:00:36 +00:00
Nishant Das
c956905cf0
remove excess copies (#6142)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-06-09 10:11:11 -05:00