Commit Graph

4676 Commits

Author SHA1 Message Date
Radosław Kapka
cc147c7097
Align eth1data Majority Vote with the spec (#7200)
* align voting with the spec
* Merge branch 'master' into eth1vote-spec-align
* remove redundant else statements
* add comment to exported variable
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge branch 'master' into eth1vote-spec-align

# Conflicts:
#	beacon-chain/rpc/validator/proposer_test.go
* refactor tests
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* fix mock POWChain
* move last block's time check and add more test cases
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
* Merge refs/heads/master into eth1vote-spec-align
2020-09-18 09:46:31 +00:00
Preston Van Loon
852082cdb4
Check that the headers are equal while ignoring the signature for proposer slashings (#7252)
* Check that the headers are equal while ignoring the signature for proposer slashings. Resolves https://github.com/sigp/beacon-fuzz/issues/74

* fix test

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-09-18 17:10:14 +08:00
Preston Van Loon
e927a3d170
Streaming logs: add backfill of messages for new connections" (#7265)
* add backfill of logs

* Add test and gofmt
2020-09-17 19:34:03 -05:00
Raul Jordan
7c2096f209
Websocket Connection Fixes (#7263)
* socket improvements
* Merge branch 'master' into socket-fix
* Merge refs/heads/master into socket-fix
2020-09-17 19:55:34 +00:00
terence tsao
dcdf5d0eac
Add and verify weak-subjectivity-checkpoint flag (#7256)
* Handle weak subjectivity input

* Typo

* Feedbacks

* Better error string @rauljordan

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-09-17 14:32:40 -05:00
terence tsao
3db6784990
Update Spadina fork version to 0x02 (#7261)
* Update Spadina fork version to 0x02
2020-09-17 18:50:01 +00:00
terence tsao
d51ead76eb
Implement and test GetWeakSubjectivityCheckpoint (#7216)
* Implement and test GetWeakSubjectivityCheckpoint

* Go mod tidy

* Add mock

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-09-17 12:50:31 -05:00
Radosław Kapka
a2cf235687
No-op Instruction analyzer (#7249)
* analyzer, tests and fixes
* error check
* gazelle
* add more asserts
* Merge branch 'master' into nop-analyzer
* Merge refs/heads/master into nop-analyzer
* fix no-op in blst package
* Merge refs/heads/master into nop-analyzer
* add assert after mutation
* mark test as TODO
* add issue number to TODO
2020-09-17 16:18:19 +00:00
Victor Farazdagi
e1e233a6d0
Fix gazelle warning when fuzzing_enabled is not provided (#7260)
* adds fuzzing_enabled configurable files to gazelle ignore list
* more fine grained
2020-09-17 12:58:03 +00:00
Victor Farazdagi
76bac74562
Disables resync when init-sync is disabled (#7259)
* disables resync when init-sync is disabled
2020-09-17 11:42:57 +00:00
Nishant Das
a335bbbb61
Add Flag To Disable Initial Sync (#7258)
* add new flag
* terence's review
2020-09-17 06:11:21 +00:00
Nishant Das
913e4aa538
Fix IPV6 Address Retrieval (#7257)
* fix
2020-09-17 03:02:20 +00:00
Raul Jordan
4b4641bae3
Restructure Prysm Wallet V2 Package to Prevent Import Cycles (#7247)
* fix up tests

* fix test build

* tests pass

* imports and remove shadowing

* lint

* visibility

* lint fix

* wallet init

* remove v22

* fix imports

* fixed broken password test

* Update validator/accounts/v2/wallet_create.go

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

* Update validator/rpc/server.go

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

* Update validator/node/node.go

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

* fmt

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>
2020-09-16 20:34:42 -05:00
Raul Jordan
6bfb2b1e46
Use Bufio Large Buffer Instead of Scanner for Large Files in E2E (#7254)
* use readline
* Fix
* max file buffer size
2020-09-16 23:41:41 +00:00
dv8silencer
a97de0d474
Use passphrase for HD-wallets (#7222)
* Use wallet password
* Fix test
* Address another test
* Address linter's feedback.
* Merge branch 'master' into dv8-i7213
* Merge branch 'master' into dv8-i7213
* Delete temp file
* Merge branch 'master' into dv8-i7213
* Merge branch 'master' into dv8-i7213
* Merge branch 'master' into dv8-i7213
* Merge branch 'dv8-i7213' of https://github.com/dv8silencer/prysm into dv8-i7213
* Merge branch 'master' into dv8-i7213
* Add regression test.
* Skip mnemonic confirmation
* Merge branch 'master' into dv8-i7213
* Merge branch 'master' into dv8-i7213
* Merge branch 'master' into dv8-i7213
* Merge branch 'master' into dv8-i7213
2020-09-16 20:12:16 +00:00
terence tsao
f6d3c28ae1
Save cached blocks before Stop() in blockchains service (#7245)
* Save cached blocks before Stop()
* Merge refs/heads/master into save-cached-blocks
* Merge refs/heads/master into save-cached-blocks
* Merge refs/heads/master into save-cached-blocks
* Merge refs/heads/master into save-cached-blocks
* Merge refs/heads/master into save-cached-blocks
* Regression test
* Merge branch 'save-cached-blocks' of github.com:prysmaticlabs/prysm into save-cached-blocks
2020-09-16 16:55:14 +00:00
Raul Jordan
3197748240
Streaming Logs via Websocket Server (#7240)
* Log streaming proof of concept

* fix broken imports

* imports

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-09-16 09:03:52 -05:00
Preston Van Loon
14dbc2b74d
Add blst for BLS (#6539)
* Add blst third party dep

* initial build

* add init

* blst passing tests

* add feature flag

* blst and herumi for spec tests

* maybe this works for mac

* Actually set feature flag

* Add stub for VerifyMultipleSignatures for blst

* verifyCompressed

* use correct cores sizes

* aggregate public keys

* add multi-sig verification

* encode not hash

* revert back

* go mod tidy

* update blst to latest commit

* add batch decompress

* fix

* add test

* gofmt

* update blst

* go mod tidy

* remove kubesec, fix

* mod tidy

* disable some remote cache

* disable some remote cache

* disable some remote cache

* disable some remote cache

* Switch to -D__ADX__

* update

* tidy

* fix build

* Make blst for only linux,amd64

* gofmt

* lint

* lint

* gazelle

* fix build tag

* more stub methods

* shift adx instructions to x86

* fix arm64

* Revert "fix arm64"

This reverts commit 4d34ac21b7509a1b385374e3039efecfcab614c1.

* add one more in

* Revert "Revert "fix arm64""

This reverts commit 1c8ae24ad16ff9811590f1058b9d98c90b63251a.

* try darwin now

* Revert "try darwin now"

This reverts commit 6f884714b8e14a7a803b72157672b6e942047f37.

* Add sha256

* remove TODO

* checkpoint

* finally builds

* fix up

* add tag

* try again

* explicit disabling

* remove

* select properly

* fix

* better

* make CI happy too

* Update .bazelrc

* Update .bazelrc

* fix tests

* revert back

* Update shared/bls/blst/public_key.go

Co-authored-by: Victor Farazdagi <simple.square@gmail.com>

* Update shared/bls/blst/public_key.go

Co-authored-by: Victor Farazdagi <simple.square@gmail.com>

* clean up tests

* more clean up

* clean up

* add

* Update shared/bls/blst/signature.go

* Update shared/bls/blst/signature.go

* Update .buildkite-bazelrc

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

* try again

* remove go tag

* revert change

* gaz

* gazelle ignore

Co-authored-by: nisdas <nishdas93@gmail.com>
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-09-16 21:28:28 +08:00
terence tsao
b0917db4c7
Core pkg: properly return errs (#7246)
* Return errs instead of nils

* Update a few more tests

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-09-15 22:55:57 -05:00
terence tsao
ee4ebe4c38
Opt out batch verify (#7244) 2020-09-15 18:53:51 -07:00
Nishant Das
56d6e05196
QSP-16 Fix Support for IPv6 (#6363)
* checkpoint changes

* new changes

* comment

* clean up

* set

* fix

* fix more

* more stuff

* clean up

* clean up

* remove

* clean up

* clean up

* comment

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-09-16 08:17:22 +08:00
terence tsao
bb374362e4
Opt out --use-check-point-cache (#7242)
* Make check point info cache an opt-out
* Typo
* Merge branch 'master' of github.com:prysmaticlabs/prysm into cp-cache-opt-out
2020-09-15 17:14:04 +00:00
dv8silencer
c1114fa6be
Fix issue with direct wallet's password being overwritten by incorrect password during import. (#7212)
* Maintain working password instead of overwriting it.

* Check for error first

* fix test

* Address linter

* TEMP, INCOMPLETE;  Working on regression test

* WORK IN PROGRESS - changed promptutil to create a mock password reader

* Test working now

* Address testing bugs

* Spacing

* Comments.  Fixed counter bug.

* gazelle fix

Co-authored-by: dv8silencer <15720668+dv8silencer@users.noreply.github.com>
2020-09-15 09:52:07 -05:00
terence tsao
36c921c601
Add spadina config (#7235) 2020-09-14 21:21:46 -07:00
dv8silencer
f31f49582b
Fix accounts-v2 deposit and related bugs (#7219) 2020-09-14 16:04:22 -07:00
Preston Van Loon
cebb62997d
Add beacon state unmarshal fuzzer, afl support (#6625)
* Add AFL third_party libraries

* add beacon state fuzzing, add afl fuzz bundle

* rm fuzzing engine

* fix and lint

* Check for array out of bounds when calculating proposer delta

* failing test

* fix

* Checkpoint progress

* Add requirement that inclusion distance is not zero, add regression test

* No need for HTR since that is covered in process slots

* Removing some fuzzit logic, old fuzz tests

* Add ssz encoder test and fix

* Fuzzing checkpoint, adding fuzzing to the p2p layer

* ignore some libfuzzer files

* Full testing of p2p processing of blocks, with some mocked stuff

* use tmpdir and always process blocks

* use checkptr

* Update ethereumapis

* go mod tidy

* benchmarks for ferran's fast ssz hash tree root

* Update fastssz

* fmt

* gaz

* goimports

* Fix

* fix ethereumapis

* fix again

* kafka

* fix gen file

* fix compute signing root

* gofmt

* checkpoint progress

* progress

* checkpoint

* updates

* updates

* merge fix

* WIP

* merge

* fix build

* fix merge related issues

* cleanup

* revert unrelated

* lint

* lint

* lint

* manual tags for fuzz

* Commentary on upload script

* some import fixes, but not all

* fix //fuzz:fuzz_tests

* rm unused test

* update generated ssz

* Set // +build libfuzzer

* remove debug code

* A bit of refactoring ot explain why there is a committee_disabled file

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-09-14 11:42:08 -07:00
Victor Farazdagi
e477df321c
Updates proposer tests namings (#7234)
* adds proposer_ namespacing
* remove redundant string
* Merge branch 'master' into proposer-test-fix-naming
* Merge refs/heads/master into proposer-test-fix-naming
2020-09-14 12:55:20 +00:00
Radosław Kapka
828156b9d4
fix exit comment (#7233)
* fix exit comment
* Merge branch 'master' into fix-exit-comment
* Merge refs/heads/master into fix-exit-comment
2020-09-14 11:44:50 +00:00
Radosław Kapka
aaa3abf630
Shadowed Predeclared Indentifier analyzer (#7215)
* wip

* working for some ast nodes

* works for all but assignment

* works for all but mixed assignments

* change test name

* plug in the analyzer

* remove `copy` from predeclared list

* rename few shadowing names

* rename `len` to `length`

* add one more test case

* rename `panic` to `panicResult`

* replace `panic` with `panicResult` in error message

* remove test case not covered by the tool

* add `byte` to predeclared list

* additional test cases

* rename `copy` to `copyHandler`

* exclude functions with receivers

* revert to good names

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-09-14 12:49:15 +02:00
terence tsao
e1aa920fc6
Fix out of bound check in AncestorRoot (#7226)
* Move out of bound check to the correct scope
* Merge refs/heads/master into store-out-of-bound
2020-09-14 09:10:52 +00:00
Shay Zluf
fcfd828725
Local protection proposal schema update (#7197)
* Local protection schema update
* Merge branch 'master' of github.com:prysmaticlabs/prysm into proposal_protection_schema_update
* fix interface issue
* fix lint
* gaz
* Merge refs/heads/master into proposal_protection_schema_update
* Merge refs/heads/master into proposal_protection_schema_update
* Merge refs/heads/master into proposal_protection_schema_update
* Merge refs/heads/master into proposal_protection_schema_update
* Merge refs/heads/master into proposal_protection_schema_update
* Merge refs/heads/master into proposal_protection_schema_update
* Merge refs/heads/master into proposal_protection_schema_update
* Merge refs/heads/master into proposal_protection_schema_update
* Merge refs/heads/master into proposal_protection_schema_update
* Merge refs/heads/master into proposal_protection_schema_update
* Merge refs/heads/master into proposal_protection_schema_update
* Update validator/db/kv/new_proposal_history_test.go
2020-09-14 01:55:33 +00:00
terence tsao
3374a06f63
Skip initial roughtime result when EnableRoughtime is disabled (#7221) 2020-09-13 08:53:14 -07:00
Jim McDonald
0b497e57e4
Reverse error condition. (#7217)
* Reverse error condition.
2020-09-11 20:21:50 +00:00
Shay Zluf
af46fc7707
Fix propose protect error handling (#7188)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-09-11 09:53:53 -05:00
Radosław Kapka
b1e2238df9
Invert enable-finalized-deposits-cache (#7214)
* make flag opt-out
2020-09-11 09:49:24 +00:00
Shay Zluf
acddb6035a
Fix rename issue (#7205)
* Fix rename issue

* nishant feedback

* add test

* Update shared/fileutil/fileutil.go

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

* preston feedback

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-09-11 00:56:58 +03:00
terence tsao
3147a5ee01
Check attestation slot before broadcast (#7209) 2020-09-10 13:16:35 -07:00
Victor Farazdagi
572227d25e
Removes attestation pool pruning from UnaggregatedAttestations getter (#7204)
* removes att pool changing in getter
* test
* add prunning
* Merge refs/heads/master into no-pruning-in-unagg-att-getter
* Merge refs/heads/master into no-pruning-in-unagg-att-getter
* Merge refs/heads/master into no-pruning-in-unagg-att-getter
* Merge refs/heads/master into no-pruning-in-unagg-att-getter
2020-09-10 18:35:57 +00:00
terence tsao
84273e9a34
Implement helper method WeakSubjectivityCheckptEpoch (#7201)
* Implement and test WeakSubjectivityCheckptEpoch
* Merge refs/heads/master into get-wss
* Merge refs/heads/master into get-wss
* Merge refs/heads/master into get-wss
* Merge refs/heads/master into get-wss
* Update beacon-chain/core/helpers/slot_epoch.go

Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2020-09-10 17:37:52 +00:00
Victor Farazdagi
114fac5149
Att aggregator filter by slot and index (#7206)
* Adds AggregateUnaggregatedAttestationsBySlotIndex method
* tests
* filter attestations by slot/index for aggregator to process
* Merge branch 'master' into att-aggregator-filter-by-slot-and-index
* Merge refs/heads/master into att-aggregator-filter-by-slot-and-index
* Merge refs/heads/master into att-aggregator-filter-by-slot-and-index
2020-09-10 15:55:45 +00:00
Victor Farazdagi
2d9fe5f2cf
Disallows bitlist duplicates in seen_bits cache (#7203)
* disallows bitlist duplicates in seen_bits cache
* Merge refs/heads/master into upd-has-seen
2020-09-10 15:24:23 +00:00
Radosław Kapka
6daf45cb8f
Correct accounts and validator error messages (#7207)
* incorrect account password
* misleading exit error
2020-09-10 14:49:13 +00:00
terence tsao
c8e93f8789
Verify indices in no verify method (#7199) 2020-09-09 13:38:19 -07:00
Radosław Kapka
94fa046ce1
Voluntary exit CLI/Client integration (#7162)
* rewrite of ProposeExit

# Conflicts:
#	validator/accounts/v2/accounts_exit.go

* translate todos to English

* use node client to calculate current epoch

* resolve dependency cycle

* add missing dependencies

* changed required epochs error message

* fix ProposeExit tests

* remove unused metrics

* simplify public-keys flag name

* organize CLI function

* fix incorrect list of exited keys

* fix formatting of non-exited keys

* add exit root to span attributes

* use errors instead of logs

* log info when all exits failed

* do not log stack trace for non-critical errors

* modify test asserts

* use standard way of displaying errors

* remove todo

* add missing function to wallet mock

* gazelle

* gazelle after stash

* move creating clients to separate function

* gazelle
2020-09-09 13:29:17 -05:00
Preston Van Loon
a74cf5de90
Replace context.Background() with more appropriate context (#7136)
* Replace context.Background() with more appropriate context
* replace a few context.TODO
* Merge refs/heads/master into fix-ctx
* Update validator/accounts/v2/accounts_create.go

Co-authored-by: terence tsao <terence@prysmaticlabs.com>
* Fix tests
* fix stream tests
* gofmt
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* fix conflicts and remove ctx background uses
* fix broken test
* Merge branch 'master' into fix-ctx
* imports
* Merge branch 'fix-ctx' of github.com:prysmaticlabs/prysm into fix-ctx
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* fix conflicts
* Merge refs/heads/master into fix-ctx
* fmt
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* Merge refs/heads/master into fix-ctx
* fixes tests
2020-09-09 09:48:52 +00:00
Raul Jordan
6d83770534
Fix Small Issue in Validator RPC Health Endpoint (#7195)
* amend node connection response
* imports
* fix err
* fix conf
* err
* test fix
* Merge branch 'master' into fix-health-endpoint
2020-09-08 22:35:31 +00:00
terence tsao
593442a0fa
Fix span names in transition.go (#7192)
* Fix span names

* Go fmt

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-09-08 14:36:02 -07:00
Raul Jordan
bd46abc71d
Add Chain Genesis Info to Node Connection Response (#7194)
* amend node connection response
* imports
2020-09-08 20:54:56 +00:00
Raul Jordan
cb1f44872d
Fix Health Reporting for Validator Client Node Connection (#7181)
* fix health reporting
* import
* Merge refs/heads/master into fix-health
* account test
* Merge branch 'fix-health' of github.com:prysmaticlabs/prysm into fix-health
* Merge refs/heads/master into fix-health
* Merge refs/heads/master into fix-health
* Merge refs/heads/master into fix-health
* Merge refs/heads/master into fix-health
* Merge branch 'fix-health' of github.com:prysmaticlabs/prysm into fix-health
* Merge refs/heads/master into fix-health
* Merge branch 'fix-health' of github.com:prysmaticlabs/prysm into fix-health
* Merge refs/heads/master into fix-health
* fmt
* Merge refs/heads/master into fix-health
2020-09-08 20:02:12 +00:00
Victor Farazdagi
8baa22f065
Fix unclosed tickers/timers (#7190)
* fix resource leak
* fixes leak in blocks fetcher
* client/validator release ticker resorces
* powchain, more straightforward ticker closing
* adds missing ticker.stop() calls
* more straightforward ticker closing
* Merge refs/heads/master into fix-unclosed-tickers-timers
* Merge refs/heads/master into fix-unclosed-tickers-timers
* Merge refs/heads/master into fix-unclosed-tickers-timers
* gofmt issues introduced in https://github.com/prysmaticlabs/prysm/pull/7176
2020-09-08 18:05:38 +00:00