Raul Jordan
d077483577
Add V3 Suffix to All Prysm Packages ( #11083 )
...
* v3 import renamings
* tidy
* fmt
* rev
* Update beacon-chain/core/epoch/precompute/reward_penalty_test.go
* Update beacon-chain/core/helpers/validators_test.go
* Update beacon-chain/db/alias.go
* Update beacon-chain/db/alias.go
* Update beacon-chain/db/alias.go
* Update beacon-chain/db/iface/BUILD.bazel
* Update beacon-chain/db/kv/kv.go
* Update beacon-chain/db/kv/state.go
* Update beacon-chain/rpc/prysm/v1alpha1/validator/attester_test.go
* Update beacon-chain/rpc/prysm/v1alpha1/validator/attester_test.go
* Update beacon-chain/sync/initial-sync/service.go
* fix deps
* fix bad replacements
* fix bad replacements
* change back
* gohashtree version
* fix deps
Co-authored-by: Nishant Das <nishdas93@gmail.com>
Co-authored-by: Potuz <potuz@prysmaticlabs.com>
2022-08-16 12:20:13 +00:00
David
64920d719d
add mutex for validator.highestValidSlot ( #10722 )
...
* add mutex for validator.highestValidSlot
* fixed deadlock issue
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: terencechain <terence@prysmaticlabs.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2022-05-28 00:44:06 +00:00
Raul Jordan
20ab988a4a
Rename Block
Package in Consensus-Types to Interfaces ( #10605 )
...
* interfaces package
* builds
* gaz
2022-05-02 14:32:37 -04:00
Raul Jordan
16bbf5602f
Move Consensus Type Wrappers Into Consensus Types Package ( #10598 )
...
* builds
* move block to consensus-types
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-05-02 15:43:40 +00:00
Raul Jordan
84916672c6
Remove Eth2-Types Dependency in Prysm ( #10578 )
...
* replace eth2 types
* replace protos
* regen proto
* replace
* gaz
* deps
* amend
* regen proto
* mod
* gaz
* gaz
* ensure build
* ssz
* add dep
* no more eth2 types
* no more eth2
* remg
* all builds
* buidl
* tidy
* clean
* fmt
* val serv
* gaz
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2022-04-29 10:32:11 -04:00
Preston Van Loon
c1197d7881
Add static analysis for unsafe uint casting ( #10318 )
...
* Add static analysis for unsafe uint casting
* Fix violations of uintcast
* go mod tidy
* Add exclusion to nogo for darwin build
* Add test for math.Int
* Move some things to const so they are assured not to exceed int64
* Self review
* lint
* fix tests
* fix test
* Add init check for non 64 bit OS
* Move new deps from WORKSPACE to deps.bzl
* fix bazel build for go analysis runs
* Update BUILD.bazel
Remove TODO
* add math.AddInt method
* Add new test casts
* Add case where builtin functions and declared functions are covered
* Fix new findings
* cleanup
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
2022-03-11 09:34:30 +00:00
james-prysm
8da8855ad5
Web3Signer: Sign Method Implementation ( #10084 )
...
* breaking up changes from cli pr
* reverting some changes, adding in changes from remote-web3signer
* adding raul's change
* adding fork info to signing calls
* fixing imports
* gaz
* fixing gofmt
* removing unneeded comment
* Update validator/client/aggregate.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Update validator/client/sync_committee.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* addressing comments
* revert proto changes
* proto changes
* reserve
* reserve
* switching to passing slot from passing fork, using slot to find the fork
* removing unneeded check
* fixing missed unit test
* optional
* optional
* gaz
* improving some definitions with constants
* improving some definitions with constants
* rem opt
* rem
* gaz
* moving mocks to its own folder
* adding in bazel field to fix
* fixing type check error
* fixing build
* fixing strict imports
* fixing dependencies
* changing bazel build
* changing bazel build
* changing bazel build
* removing testing only dependency
* removing dependency on testing util package
* update bazel build
* Update checktags_test.go
* Update active_balance.go
* Update sync_committee_minimal.go
* Update sync_committee_mainnet.go
* Update active_balance_disabled.go
* Update committee.go
* Update committee_disabled.go
* Update sync_committee.pb.gw.go
* Update powchain.pb.gw.go
* Update proposer_indices.go
* Update proposer_indices_disabled.go
* Update sync_committee.go
* Update mainnet.go
* Update p2p_messages.pb.gw.go
* Update finalized_block_root_container.pb.gw.go
* Update beacon_block.pb.gw.go
* Update attestation.pb.gw.go
* Update secret_key_test.go
* Update beacon_state.pb.gw.go
* Update version.pb.gw.go
* Update sync_committee.pb.gw.go
* Update sync_committee_disabled.go
* Update mainnet_test.go
* Update minimal.go
* Update signature_test.go
* Update gocast.go
* Update cgo_symbolizer.go
* Update validator.pb.gw.go
* Update beacon_state.pb.gw.go
* Update signature.go
* Update public_key_test.go
* Update minimal_test.go
* Update checktags_test.go
* Update bls_benchmark_test.go
* Update public_key.go
* Update secret_key.go
* Update aliases.go
* Update init.go
* Update stub.go
* Update journald_linux.go
* Update attestation.pb.gw.go
* Update config_utils_develop.go
* Update stub.go
* Update stub.go
* Update beacon_block.pb.gw.go
* Update validator.pb.gw.go
* Update node.pb.gw.go
* Update config_utils_prod.go
* Update journald.go
* Update beacon_block.pb.gw.go
* Update beacon_chain.pb.gw.go
* Update beacon_state.pb.gw.go
* Update events.pb.gw.go
* Update validator/keymanager/remote-web3signer/keymanager.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* addressing comments from review
* updating length of comment
* Update validator/keymanager/remote-web3signer/keymanager.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update stub.go
revert changes
* Update validator/client/aggregate_test.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* addressing final comments
* fixing gofmt
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2022-01-18 14:31:58 -06:00
terence tsao
c69bce5d84
Use fieldparams for BLS public key ( #10042 )
...
* Use fieldparams for pubkey length
* Fix validator tests
* fix more tests
* fix mock validator
* Fix typo
* bunch of typos
* Update bytes.go
* Update BUILD.bazel
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2022-01-06 17:33:08 +00:00
terence tsao
c21e43e4c5
Refactor: move functions beacon-chain/core/time
-> time/slots
( #9719 )
...
* Move necessary functions beacon-chain/core/time -> time/slots
* Fix fuzz
* Fix build
* Update slot_epoch.go
2021-10-01 15:17:57 -05:00
Preston Van Loon
ee0a453b7b
core: refactor signing and domain methods from helper to core/signing pkg ( #9520 )
...
* Move domain function and all signing root functions from beacon-chain/core/helpers to beacon-chain/core
* @terencechain suggestion to put these methods under core/signing
2021-09-27 16:19:20 +00:00
Raul Jordan
29513c804c
Create Encoding Bytesutil ( #9658 )
...
* bytesutil
* gaz
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-23 15:23:37 +00:00
Raul Jordan
f3d6dbcc1e
Move Shared/Params Into Config/Params ( #9642 )
...
* config params into pkg
* gaz
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-21 19:59:25 +00:00
Raul Jordan
11a1f681e0
Move Shared Packages Into Async/ ( #9620 )
...
* async packages
* change pkg
* build
* working
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-18 17:26:11 +00:00
terence tsao
ee5d75732d
Add pkg crypto ( #9603 )
...
* Add pkg crypto
* Update go.yml
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-15 22:55:11 +00:00
terence tsao
31a78ab22a
Create config package for Shared/featureconfig ( #9593 )
...
* add config/features
* Gazelle
* Gazelle
* Fix build
* Go mod tidy
* active cache
Co-authored-by: rauljordan <raul@prysmaticlabs.com>
2021-09-15 01:18:39 +00:00
terence tsao
3e71997290
Create time Package for Shared/timeutil, mclock and slotutil ( #9594 )
...
* add time pkg
* Go fmt
2021-09-15 00:09:04 +00:00
Raul Jordan
9935ca3733
Move Shared/ Subpackages Into Monitoring/ Folder ( #9591 )
...
* add tracing
* monitoring pkg
* move prom
* Add client stats
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-14 20:59:51 +00:00
terence tsao
d7679d2e71
Validator: rest of the Altair changes ( #9532 )
...
* Bring in rest of the validator chagnes
* Go fmt
* Deepsource
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-09-07 18:43:50 +00:00
Raul Jordan
72cfe50eff
Move Validator Accounts Protos Into Proper Place ( #9416 )
...
* move into proper namespace
* package naming
* add strict deps
* regen protos
* add web api
* regen
* builds
* rename
* build
2021-08-18 21:24:01 +00:00
Raul Jordan
9145310647
Eliminate Proto V2 Namespace ( #9297 )
...
* get rid of v2 in prysm codebase
* replace block2
* builds
* terence comments
* gazelle
2021-07-28 21:23:44 +00:00
Raul Jordan
715aa408e3
Move Web Protos Into Prysm V2 ( #9249 )
...
* move web protos
* move web to v2
* update web protos
* gaz
* proto build
* replace mentions of validator v2
* gaz
2021-07-22 19:19:24 +00:00
Raul Jordan
6dadb80cc4
Move v1alpha1 into Prysm API namespace ( #9245 )
2021-07-21 21:34:07 +00:00
Raul Jordan
5aac06f04e
Move EthereumAPIs Into Prysm ( #8968 )
...
* begin move
* use same import path
* imports
* regen protos
* regen
* no rename
* generate ssz
* gaz
* fmt
* edit build file
* imports
* modify
* remove generated files
* remove protos
* edit imports in prysm
* beacon chain all builds
* edit script
* add generated pbs
* add replace rules
* license for ethereumapis protos
* change visibility
* fmt
* update build files to gaz ignore
* use proper form
* edit imports
* wrap block
* revert scripts
* revert go mod
2021-06-02 18:49:52 -05:00
Radosław Kapka
5374d07c4d
Reorganize validator client package ( #8592 )
...
* Reorganize validator client package
* reduce package visibility
2021-03-11 11:57:41 +00:00
terence tsao
3edfa8cb88
Use Custom Type ValidatorIndex Across Prysm ( #8478 )
...
* Use ValidtorIndex across Prysm. Build ok
* First take at fixing tests
* Clean up e2e, fuzz... etc
* Fix new lines
* Update beacon-chain/cache/proposer_indices_test.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update beacon-chain/core/helpers/rewards_penalties.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update beacon-chain/core/helpers/shuffle.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/graffiti/parse_graffiti_test.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Raul's feedback
* Fix downcast int -> uint64
* Victor's feedback
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-02-23 00:14:50 +00:00
Victor Farazdagi
b577869ed6
Fixes import aliases ( #8497 )
...
* Fixes import aliases
* another fix
* reset gw files
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-02-22 23:20:57 +00:00
Preston Van Loon
558b16275d
Validator: Annotate attestation error spans ( #8451 )
...
* Annotate attestation spans
* Annotate attestation spans
* gaz
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-02-16 09:06:52 +00:00
Victor Farazdagi
a069738c20
ETH2 Types: Slot ( #8408 )
...
* update shared/params
* update eth2-types deps
* update protobufs
* update shared/*
* fix testutil/state
* update beacon-chain/state
* update beacon-chain/db
* update tests
* fix test
* update beacon-chain/core
* update beacon-chain/blockchain
* update beacon-chain/cache
* beacon-chain/forkchoice
* update beacon-chain/operations
* update beacon-chain/p2p
* update beacon-chain/rpc
* update sync/initial-sync
* update deps
* update deps
* go fmt
* update beacon-chain/sync
* update endtoend/
* bazel build //beacon-chain - works w/o issues
* update slasher code
* udpate tools/
* update validator/
* update fastssz
* fix build
* fix test building
* update tests
* update ethereumapis deps
* fix tests
* update state/stategen
* fix build
* fix test
* add FarFutureSlot
* go imports
* Radek's suggestions
* Ivan's suggestions
* type conversions
* Nishant's suggestions
* add more tests to rpc_send_request
* fix test
* clean up
* fix conflicts
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: nisdas <nishdas93@gmail.com>
2021-02-16 07:45:34 +00:00
terence tsao
2bf03d5cba
Use strings builder for attester lock key ( #8349 )
...
* Use strings builder
* Handle error
2021-01-27 22:33:28 +00:00
terence tsao
0753636159
Add role based lock for validator ( #8347 )
2021-01-27 20:59:21 +00:00
terence tsao
b8037b0b50
Wait for one third before grabbing the lock ( #8348 )
2021-01-27 12:06:18 -06:00
terence tsao
91fe32a3d1
Handle subscriber error ( #8341 )
2021-01-26 13:56:24 -06:00
terence tsao
323eac6d6c
Remove timeout debug log ( #8247 )
...
* Disallow request epoch to be out of bound
* Remove debug log
* Revert "Disallow request epoch to be out of bound"
This reverts commit d2dc7db594a8565ee6a613d1ee8cd0bcf84c72ff.
2021-01-11 22:23:13 +00:00
terence tsao
9a1866b735
Hydrate header test helper ( #8234 )
...
* Hydrate headers and fix tests
* Gazelle
* Fix a slashing test
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2021-01-09 16:45:45 +00:00
terence tsao
35ed01e36c
Add timely attest flag to fix #8185 ( #8235 )
2021-01-08 17:54:46 -08:00
terence tsao
ba9b563e6e
Fix Attest early if valid block is received before 4 seconds ( #8197 )
...
* Better int -> string conversion
* First take
* More tests
* Gazelle
* Remove validator subpackage visiblity
* Remove span
* Update validator/client/attest.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Update validator/client/attest.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Update stream blocks call to use verified only
* Rename to waitOneThirdOrValidBlock
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2021-01-06 21:10:26 +00:00
Shay Zluf
f014374de2
Move attestation protection call after signing ( #8216 )
...
* Move validator protection after signing
* fix tests
* remove unused code
2021-01-06 11:41:00 -06:00
Raul Jordan
1fbfd52e52
Simpler and Safer Attester Slashing Protection ( #8086 )
...
* att sign validations
* eliminate old cached methods and use a simple approach in the db
* redefined db methods
* db package builds
* add multilock to attest and propose
* gaz
* removed concurrency tests that are no longer relevant
* add cache to db functions for attesting history checks
* passing
* add in feature flag --disable-attesting-history-db-cache
* remove lock
* Revert "remove lock"
This reverts commit b1a65020e406b9fa6e4f57c5cc6a5a0b2a11a240.
* comment
* gaz
2020-12-11 12:31:35 -06:00
Preston Van Loon
f44b2a35e4
Update waiting validator methods to be context aware ( #8078 )
...
* Update waiting validator methods to be context aware
* Enable debug logging for validator in e2e
* invert logic in deferred function, remove for loop
* return early if wait is 0 or less
* overwrite ctx
* t.Stop() chan closure is hanging. Doesnt make sense, so ignoring that cleanup task. It shouldnt happen at runtime anyway
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-12-10 10:00:48 -06:00
Shay Zluf
0cf9800b75
Fix locks and fallback to db read if attestation history map is missing a pub key data ( #7937 )
...
* minimal change to handle nil attesterHistoryByPubKey
* Revert "Always Update Attesting History If Not Slashable (#7935 )"
This reverts commit 3cc2ebc5d5
.
* remove unused functions
* move save before propose
* wait before go func
* move wait into the go routine
* handling map mutation
* remove map handling in this case
* log in case it is still not found
* fix log
* fix locks
* Update validator/client/attest_protect.go
* remove code duplication
* remove method extraction
* move metrics to their appropriate place
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-11-24 11:24:23 -06:00
Raul Jordan
3cc2ebc5d5
Always Update Attesting History If Not Slashable ( #7935 )
...
* update attesting history always if not slashable
* initialize empty if no history found
* rem duplicate logic
2020-11-24 02:48:20 +00:00
Raul Jordan
2cb814648a
Improve Slashing Protection for V1, More Tests and Observability ( #7934 )
...
* tests tests and more tests
* tests all passsss
* log for double vote
2020-11-23 19:03:04 -06:00
Shay Zluf
18be4a4e3e
Immediate Slashing Protection Data Storage ( #7789 )
...
* Immediate save of validator protection data
* fix error log
* separate delete from save
* remove logs
* rename delete into reset
* comment fix
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-11-12 22:07:32 +00:00
Potuz
e22dd3758d
Attestation performance metrics ( #7709 )
...
* call LogValidatorGainsAndLosses at end of epoch
* Reviewer fixes
* Reviewer fixes
* Reviewer fixes
* Export Inclusion Distance to Prometheus
* changed default value to 1
* removed default value
* Added other performance metrics
* add slot
* get rid of inclusion_slot
* Fix fmt test
* Reviewer changes
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-11-10 20:13:36 +00:00
Shay Zluf
7b0ee3adfe
Use new attestation protection ( #7605 )
...
* Use new attestation protection
* tests fixes
* fix tests
* fix comment
* fix TestSetTargetData
* fix tests
* empty history handling
* fix another test
* mock domain request
* fix empty handling
* use far future epoch
* use far future epoch
* migrate data
* copy byte array to resolve sigbus error
* init validator protection on pre validation
* raul feedback
* rename fixes
* nishant feedback
* map with values
* fix tests
* lock and add test
* add and fix concurrency tests
* added tests error msg
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2020-11-10 14:14:11 +00:00
Raul Jordan
a81c863ddb
Rename Accounts-V2 to Accounts ( #7545 )
...
* rename accounts v2
* rename keymanager and fix imports
* rename accounts-v2 instances
* imports
* build
* build fix
* deepsource
* fix up broken aliases
* imports
* gaz
* Update validator/accounts/accounts_import_test.go
Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>
* fmt
Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>
2020-10-15 22:31:52 +00:00
Raul Jordan
a840fa563d
Remove Accounts-V1 ( #7532 )
...
* remove accounts-v1
* get all tests to not panic
* all client tests passing
* fix node test
* eliminate old flags
* tidy up
2020-10-14 22:20:20 +00:00
Nishant Das
719e99ffd9
Replace Roughtime With Timeutils Across Prysm ( #7301 )
...
* remove roughtime
* change all references
* rename
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-09-22 19:49:58 +08: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
terence tsao
ceee7489dd
Update SignRequest
for key manager ( #6917 )
...
* Proto: update sign request fields
* Validator client: aggregate signing
* Validator client: proposal signing
* Validator client: attestation signing
* Validator client: update generic sign
* Proto: use ranges
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-08-06 18:18:38 -05:00