Commit Graph

2360 Commits

Author SHA1 Message Date
Nishant Das
859e59b6f7
Change Sync Error Logs To Debug Logs (#6865)
* switch over to debug logs
* change back
* Change e2e to debug logging
* Merge refs/heads/master into changeToDebug-2
* Merge refs/heads/master into changeToDebug-2
2020-08-04 20:30:40 +00:00
Shay Zluf
0d6fb72496
Slasher protection race condition fix (#6871)
* Slasher lock on update
* gaz
* Merge branch 'master' of github.com:prysmaticlabs/prysm into slasher_lock_on_update
* goimports
* line space
* ivan feedback
* Merge refs/heads/master into slasher_lock_on_update
2020-08-04 19:50:23 +00:00
terence tsao
ef69ac4496
Validate attestation: fix error log (#6874)
* attestation: fix  error log
2020-08-04 18:37:35 +00:00
Nishant Das
daedb7411c
Fix Justified and Finalized Retrieval in Genesis (#6861)
* fix
* fix tests
* add test
2020-08-04 03:34:17 +00:00
terence tsao
ee7da0d451
ForceCheckpoint return early when zero hashes (#6852)
* Setter: return early with zero hashes
* Test: zero hashes don't panic
* Merge branch 'master' of github.com:prysmaticlabs/prysm
* Merge refs/heads/master into zero-hashes
* Merge refs/heads/master into zero-hashes
* Merge refs/heads/master into zero-hashes
2020-08-03 18:34:54 +00:00
Nishant Das
69e0e302b3
Use Less Intensive Search (#6848)
* use less intensive search
* Add mock method to implement Listener
* Merge refs/heads/master into lessIntensiveSearch
* Merge refs/heads/master into lessIntensiveSearch
2020-08-03 18:10:23 +00:00
terence tsao
d06dcd2eec
Update DepositContractFlag default to Medalla (#6853)
* Update medalla deposit contract address
2020-08-03 17:40:05 +00:00
Shay Zluf
6582014b80
Fix deposit data copy (#6847)
* fix deposit data copy

* goimports
2020-08-03 16:25:19 +03:00
Ivan Martinez
7903ec0b12
Fix CMD Config and modify --historical-slasher-node (#6730)
* Fix CMD config overwriting
* Rename and change historical slasher node
* Merge branch 'master' of github.com:prysmaticlabs/prysm into fix-cmd-config
* Fix
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Add storage warning
* Merge branch 'fix-cmd-config' of github.com:prysmaticlabs/prysm into fix-cmd-config
* Remove period
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Add default values test
* Merge branch 'fix-cmd-config' of github.com:prysmaticlabs/prysm into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Gaz
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Fix inits
* Merge branch 'fix-cmd-config' of github.com:prysmaticlabs/prysm into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Fix
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
* Merge branch 'master' of github.com:prysmaticlabs/prysm into fix-cmd-config
* Fix
* Merge refs/heads/master into fix-cmd-config
* Merge refs/heads/master into fix-cmd-config
2020-08-02 22:09:10 +00:00
Nishant Das
002bbf53d0
Remove Custom Genesis Delay (#6827)
* remove custom delay
* gaz
* Merge branch 'master' into removeCustomGenesisDelay
2020-08-01 16:11:36 +00:00
Victor Farazdagi
bf59530d93
Adds block provider scorer (#6756)
* prepares peer scorer collection

* decouples scoring service into separate object

* updates references

* renames package

* removes redundant test init

* gazelle

* gofmt

* updates comment

* fix build

* adds block provider scorer

* score rounding factor constant (per Nishant's suggestion)

* updates penalty applying

* updates score block provider tests

* updates scorer tests

* expand test suite

* get rid of penalties + counters for requested/returned blocks

* removes start score

* fixes provider test

* fixes scorer manager tests

* updates comments

* moves roundScore test function

* maxscore tests

* improves test coverage

* Update beacon-chain/p2p/peers/score_block_providers.go

Co-authored-by: Nishant Das <nishdas93@gmail.com>

* renames var to make it less ambigous - per Nishant's suggestion

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
2020-08-01 12:20:05 +03:00
terence tsao
c7c1c660ab
Load config after Configure config (#6821)
* Node: load config after configure
* Merge refs/heads/master into load-config
2020-08-01 00:46:55 +00:00
Nishant Das
2011896005
Fix Local IP Address (#6781)
* fix local ip
* Merge refs/heads/master into fixLocalIP
* Merge refs/heads/master into fixLocalIP
* Merge refs/heads/master into fixLocalIP
* Merge refs/heads/master into fixLocalIP
* Merge refs/heads/master into fixLocalIP
* Merge refs/heads/master into fixLocalIP
* Merge refs/heads/master into fixLocalIP
2020-07-30 20:23:30 +00:00
terence tsao
ec4de10001
Add helper ComputeDomainAndSign (#6773)
* Starting
* Merge branch 'master' of github.com:prysmaticlabs/prysm into domain-and-sign
* core blocks tests: updated
* core state tests: updated
* rpc validator tests updated
* sync tests updated
* testutil updated
* Beacon-chain: update tests
* Shared: update tests
* Rest of the tests
* Merge branch 'master' of github.com:prysmaticlabs/prysm into domain-and-sign
* Merge refs/heads/master into domain-and-sign
* Merge refs/heads/master into domain-and-sign
* Merge refs/heads/master into domain-and-sign
* Merge refs/heads/master into domain-and-sign
* Sync with master
* Merge branch 'domain-and-sign' of github.com:prysmaticlabs/prysm into domain-and-sign
* Merge refs/heads/master into domain-and-sign
2020-07-30 19:11:22 +00:00
Nishant Das
edc9fcd0d6
Harden Against DOS Attacks (#6780)
* harden
* gaz
* trace log
* Update beacon-chain/p2p/service.go

Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
* yield go-routine
* Merge refs/heads/master into hardenAgainstDOS
* Merge branch 'hardenAgainstDOS' of https://github.com/prysmaticlabs/geth-sharding into hardenAgainstDOS
* Merge refs/heads/master into hardenAgainstDOS
* Merge refs/heads/master into hardenAgainstDOS
* Merge refs/heads/master into hardenAgainstDOS
* Merge refs/heads/master into hardenAgainstDOS
2020-07-30 18:42:22 +00:00
terence tsao
bcea2c1b22
Config/flag: medalla as default (#6770)
* config: use medalla as default

* Tests: align with medalla spec

* Config/flag: deprecate medalla feature flag

* Update shared/featureconfig/flags.go

* Spectest: set genesis forkversion to 0,0,0,0

* Config: set medalla as defat in Configure

* Extra space

* Shard: use copy

* Revert a p2p fork test

* Update default medalla for tools

* Use medalla config for e2e

* Fix E2E

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>
2020-07-30 08:45:00 -05:00
Nishant Das
353bec600f
Fix Handshake (#6776)
* remove security issue
* Merge branch 'master' into fixHandshake
2020-07-30 01:04:35 +00:00
Raul Jordan
62c92af247
Remove Deprecated SSZ Decode Edge Case for BeaconBlocksByRoots (#6771)
* remove temp unmarshal edge case
* removed deprecated func
* final err fix
* Merge refs/heads/master into fix-exploit
2020-07-29 23:15:14 +00:00
Nishant Das
ecf197c11e
Update Pubsub Parameters (#6744)
* initial commit

* fix

* lint

* clean up

* fix bug
2020-07-29 11:14:15 -05:00
Victor Farazdagi
84697a0a59
Adds peer scorer manager (#6752)
* prepares peer scorer collection
* decouples scoring service into separate object
* updates references
* renames package
* removes redundant test init
* gazelle
* gofmt
* Merge branch 'master' into peer-scorer-manager
* updates comment
* fix build
* Merge refs/heads/master into peer-scorer-manager
* Merge refs/heads/master into peer-scorer-manager
* Merge refs/heads/master into peer-scorer-manager
* Merge refs/heads/master into peer-scorer-manager
* Merge refs/heads/master into peer-scorer-manager
* Merge refs/heads/master into peer-scorer-manager
* Merge refs/heads/master into peer-scorer-manager
* Merge refs/heads/master into peer-scorer-manager
* Merge refs/heads/master into peer-scorer-manager
* Merge refs/heads/master into peer-scorer-manager
2020-07-29 09:26:46 +00:00
terence tsao
d6eb6d3f41
Move ValidateAttestationTime earlier for sync (#6755)
* Move time checks to the start
* Merge branch 'master' of github.com:prysmaticlabs/prysm into check-time-first
* Merge refs/heads/master into check-time-first
* Merge refs/heads/master into check-time-first
* Merge refs/heads/master into check-time-first
* Merge refs/heads/master into check-time-first
* Merge refs/heads/master into check-time-first
2020-07-29 05:31:50 +00:00
Fabrice Cheng
cbd731152e
Return INVALID validator status if the BLS signature is invalid (#6576)
* return INVALID status if BLS signature is invalid

* add unit tests for VerifyDepositSignature function

* fix lint

* lint fix

* gazelle run run

* update ethereumapis dependencies in go module

* tidy go mod

* update VerifyDepositSignature function to use the proper way of generating sig

* update tests

* update gazelle

* add ValidatorStatus test

* update to Warn

* reorder impot

* merge verifyDepositDataSigningRoot with VerifyDepositSignature

* refactor one last time

* align with specs for computing Domain

* add warn error logs
2020-07-28 23:19:07 -05:00
Raul Jordan
9d08ba49de
Accounts Revamp Fixes: "Overall" Wallet Improvements (#6736)
* change default wallet dir path to not be hidden

* gaz + pass wallet dir

* gaz + move const to flags

* move to flags

* move to flags

* use filepath join in order to create a valid dir name

* add wallet dir

* return err no wallet found issues

* fix up edit remote

* all tests passing

* fix test

* create or open wallet

* ivan feedback

* enter password for account with pubkey

* Update validator/accounts/v2/accounts_create.go

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

* works

* preston feedback

* nothing to export

* fmt

* test for create or open

* gaz

Co-authored-by: shayzluf <thezluf@gmail.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>
2020-07-28 20:20:13 -05:00
terence tsao
c0d6a231bf
Faster ancestor root look up via fork choice store (#6753)
* forkchoice: add `HasParent` and `AncestorRoot` getters
* Tests
* Interfaces
* process block: use getters in `ancestor`
* Update tests
* Merge branch 'master' of github.com:prysmaticlabs/prysm into faster-ancestor-block
* feedback from @rauljordan
2020-07-28 22:29:34 +00:00
rkapka
becb0b19e2
Voting With The Majority (#6644)
* eth1DataMajorityVote draft
* Merge branch 'origin-master' into eth1-majority-voting
* small test change
* move minimal config's HeadOfVotingPeriodLength closer to sqroot(32)
* remove todo
* remove head period and simplify equality check
* extract private functions from eth1DataMajorityVote
* feature flag
* Merge branch 'origin-master' into eth1-majority-voting
* add bytes import to tests
* Merge branch 'master' into eth1-majority-voting
* re-run build
* Merge branch 'master' into eth1-majority-voting
* Merge branch 'master' into eth1-majority-voting
* Merge branch 'master' into eth1-majority-voting
2020-07-28 20:29:12 +00:00
Preston Van Loon
06ee5695fb
Save finalized checkpoint on beacon chain close (#6431)
* Save finalized checkpoint on save

* gofmt and goimport

* remove head.root arg

* test

* fixes

* remove comment

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-07-28 13:35:17 -05:00
terence tsao
027ee4c18c
Add a ComputeDomainVerifySigningRoot helper (#6743)
* Add ComputeDomainVerifySigningRoot
* Update validate aggregate proof signatures to use it
* Update verify proposer slashing to use it
* Update test to use it
* Merge branch 'master' into domain-and-signingroot
* Quick fix on test
* Merge branch 'domain-and-signingroot' of github.com:prysmaticlabs/prysm into domain-and-signingroot
* Merge branch 'master' of github.com:prysmaticlabs/prysm into domain-and-signingroot
* Merge refs/heads/master into domain-and-signingroot
* Merge refs/heads/master into domain-and-signingroot
2020-07-28 16:49:47 +00:00
terence tsao
905a57cbd7
Fix checkForChainStart pre-genesis state and 0 validator (#6739) 2020-07-27 10:35:01 -07:00
Nishant Das
664349e553
Account for Bad Blocks in Gossip (#6726)
* add bad block cache

* terence's review

* terence's review

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-07-27 19:57:19 +08:00
terence tsao
3a852bc032
eth1 chain ID and network checks (#6727)
* Add config
* Update config values
* Add checks
* Merge refs/heads/master into eth1network
* Merge refs/heads/master into eth1network
* Update e2e test config for devnet
* Merge branch 'eth1network' of github.com:prysmaticlabs/prysm into eth1network
2020-07-27 04:48:36 +00:00
Victor Farazdagi
630cbfb1b6
Fixes issue with concurrent map writes in gossipsub (#6731)
* Fixes issue with concurrent map writes in gossipsub
* Merge refs/heads/master into fix-concurrent-map-write-in-pubsub
2020-07-27 00:56:55 +00:00
terence tsao
ca04621849
saveHeadNoDB does not invalidate hot state cache (#6729) 2020-07-26 17:10:35 -07:00
Nishant Das
2cd359bde5
preset memory (#6722) 2020-07-25 11:54:54 -07:00
Nishant Das
7a12fc6d75
Fix Metadata Sequence Checks (#6711)
* checkpoint

* Update beacon-chain/sync/rpc_test.go

* change conditional

* fix test

* fmt

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-07-25 11:53:41 -05:00
Nishant Das
ada351d087
Applies Assertion And Require Test Functions to Powchain (#6652)
* change all tests
* save
* fix tests
* Update deposit_test.go
* Update deposit_test.go
* Update log_processing_test.go
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* fix failing test
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
* Merge refs/heads/master into powchainAssert
2020-07-25 06:20:21 +00:00
terence tsao
d114c6c6b7
Update comments for get_committee_count_per_slot (#6717)
* Update comment
* Merge branch 'master' into epochwise_committee_count_per_slot
* Merge refs/heads/master into epochwise_committee_count_per_slot
* Merge refs/heads/master into epochwise_committee_count_per_slot
* Merge refs/heads/master into epochwise_committee_count_per_slot
* Merge refs/heads/master into epochwise_committee_count_per_slot
* Merge refs/heads/master into epochwise_committee_count_per_slot
* Merge refs/heads/master into epochwise_committee_count_per_slot
2020-07-25 05:29:30 +00:00
terence tsao
01f3a6e6db
Update on block/attestation comments (#6720)
* Update on att comments
* Update on block comments
* Merge refs/heads/master into forkchoice-comments
* Merge refs/heads/master into forkchoice-comments
2020-07-25 04:55:42 +00:00
terence tsao
366e53c416
Add committee ID check to process attestation (#6718) 2020-07-24 17:12:15 -07:00
terence tsao
0b9212c685
Revert "Optimize AppendValidator for beacon state" (#6710)
* Revert "Optimize `AppendValidator` for beacon state (#6659)"

This reverts commit c41e382255.
* Test. H/t to @prestonvanloon
* Merge branch 'master' of github.com:prysmaticlabs/prysm into revert-6659-deposit
* Merge branch 'master' into revert-6659-deposit
2020-07-24 05:43:15 +00:00
terence tsao
403dab43f5
Use config DepositContractTreeDepth (#6708) 2020-07-23 21:30:28 -07:00
terence tsao
cc773a1641
Rm unused HashTreeRootState (#6697)
* Remove hash tree root implementations

* Delete benchmark tests

* Update existing tests

* Gaz

* Remove outdated ssz cache fuzz test

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-07-23 17:19:05 -05:00
Preston Van Loon
2c11fcb242
Stategen: always invalidate hot cache state in StateByRootInitialSync (#6698)
* Stategen: always invalidate hot cache state in StateByRootInitialSync
* Sanity test. @nisdas feedback
* Merge refs/heads/master into defer-invalidate
2020-07-23 04:25:50 +00:00
rkapka
95efcb6410
Applies assertion funcs to forkchoice tests (#6685)
* refactored 3 files
* refactored the rest of files
* Merge branch 'origin-master' into refactor-forkchoice-tests
* gazelle fix
* Merge branch 'master' into refactor-forkchoice-tests
* Merge branch 'master' into refactor-forkchoice-tests
* Merge branch 'master' into refactor-forkchoice-tests
2020-07-22 21:11:03 +00:00
Victor Farazdagi
4400321081
Handles case when no peers with finalized blocks are found (#6679)
* Handles case when no peers with finalized blocks are found
* more tests
* Merge branch 'master' into handle-zero-block-init-sync
* Merge branch 'master' into handle-zero-block-init-sync
2020-07-22 18:14:24 +00:00
terence tsao
17f845dcb0
Update head before send feed (#6681)
* Update head before state feed
* Test
* Merge branch 'master' of github.com:prysmaticlabs/prysm into update-head
2020-07-22 17:05:17 +00:00
Preston Van Loon
62ae22e3f9
Use correct context for chainHeadRetrieval (#6678)
* Use correct context for chainHeadRetrieval
* Merge refs/heads/master into fix-context
2020-07-22 16:20:20 +00:00
Nishant Das
647599e87f
fix for virtual networks (#6676) 2020-07-22 10:44:17 -05:00
terence tsao
d1a828ad87
Rm archival service db usages and proto definitions (#6671) 2020-07-21 17:04:46 -07:00
terence tsao
c41e382255
Optimize AppendValidator for beacon state (#6659) 2020-07-21 12:58:30 -07:00
Preston Van Loon
784f4169ef
Check gossip message decoded length before decoding (#6663)
* Check gossip message decoded length before decoding
* gofmt
* Merge refs/heads/master into snappy-decodedlen-check
* Merge refs/heads/master into snappy-decodedlen-check
* Merge refs/heads/master into snappy-decodedlen-check
* @nisdas feedback
2020-07-21 19:14:34 +00:00