* `EpochFromString`: Use already defined `Uint64FromString` function.
* `Test_uint64FromString` => `Test_FromString`
This test function tests more functions than `Uint64FromString`.
* Slashing protection history: Remove unreachable code.
The function `NewKVStore` creates, via `kv.UpdatePublicKeysBuckets`,
a new item in the `proposal-history-bucket-interchange`.
IMO there is no real reason to prefer `proposal` than `attestation`
as a prefix for this bucket, but this is the way it is done right now
and renaming the bucket will probably be backward incompatible.
An `attestedPublicKey` cannot exist without
the corresponding `proposedPublicKey`.
Thus, the `else` portion of code removed in this commit is not reachable.
We raise an error if we get there.
This is also probably the reason why the removed `else` portion was not
tested.
* `NewKVStore`: Switch items in `createBuckets`.
So the order corresponds to `schema.go`
* `slashableAttestationCheck`: Fix comments and logs.
* `ValidatorClient.db`: Use `iface.ValidatorDB`.
* BoltDB database: Implement `GraffitiFileHash`.
* Filesystem database: Creates `db.go`.
This file defines the following structs:
- `Store`
- `Graffiti`
- `Configuration`
- `ValidatorSlashingProtection`
This files implements the following public functions:
- `NewStore`
- `Close`
- `Backup`
- `DatabasePath`
- `ClearDB`
- `UpdatePublicKeysBuckets`
This files implements the following private functions:
- `slashingProtectionDirPath`
- `configurationFilePath`
- `configuration`
- `saveConfiguration`
- `validatorSlashingProtection`
- `saveValidatorSlashingProtection`
- `publicKeys`
* Filesystem database: Creates `genesis.go`.
This file defines the following public functions:
- `GenesisValidatorsRoot`
- `SaveGenesisValidatorsRoot`
* Filesystem database: Creates `graffiti.go`.
This file defines the following public functions:
- `SaveGraffitiOrderedIndex`
- `GraffitiOrderedIndex`
* Filesystem database: Creates `migration.go`.
This file defines the following public functions:
- `RunUpMigrations`
- `RunDownMigrations`
* Filesystem database: Creates proposer_settings.go.
This file defines the following public functions:
- `ProposerSettings`
- `ProposerSettingsExists`
- `SaveProposerSettings`
* Filesystem database: Creates `attester_protection.go`.
This file defines the following public functions:
- `EIPImportBlacklistedPublicKeys`
- `SaveEIPImportBlacklistedPublicKeys`
- `SigningRootAtTargetEpoch`
- `LowestSignedTargetEpoch`
- `LowestSignedSourceEpoch`
- `AttestedPublicKeys`
- `CheckSlashableAttestation`
- `SaveAttestationForPubKey`
- `SaveAttestationsForPubKey`
- `AttestationHistoryForPubKey`
* Filesystem database: Creates `proposer_protection.go`.
This file defines the following public functions:
- `HighestSignedProposal`
- `LowestSignedProposal`
- `ProposalHistoryForPubKey`
- `ProposalHistoryForSlot`
- `ProposedPublicKeys`
* Ensure that the filesystem store implements the `ValidatorDB` interface.
* `slashableAttestationCheck`: Check the database type.
* `slashableProposalCheck`: Check the database type.
* `slashableAttestationCheck`: Allow usage of minimal slashing protection.
* `slashableProposalCheck`: Allow usage of minimal slashing protection.
* `ImportStandardProtectionJSON`: Check the database type.
* `ImportStandardProtectionJSON`: Allow usage of min slashing protection.
* Implement `RecursiveDirFind`.
* Implement minimal<->complete DB conversion.
3 public functions are implemented:
- `IsCompleteDatabaseExisting`
- `IsMinimalDatabaseExisting`
- `ConvertDatabase`
* `setupDB`: Add `isSlashingProtectionMinimal` argument.
The feature addition is located in `validator/node/node_test.go`.
The rest of this commit consists in minimal slashing protection testing.
* `setupWithKey`: Add `isSlashingProtectionMinimal` argument.
The feature addition is located in `validator/client/propose_test.go`.
The rest of this commit consists in tests wrapping.
* `setup`: Add `isSlashingProtectionMinimal` argument.
The added feature is located in the `validator/client/propose_test.go`
file.
The rest of this commit consists in tests wrapping.
* `initializeFromCLI` and `initializeForWeb`: Factorize db init.
* Add `convert-complete-to-minimal` command.
* Creates `--enable-minimal-slashing-protection` flag.
* `importSlashingProtectionJSON`: Check database type.
* `exportSlashingProtectionJSON`: Check database type.
* `TestClearDB`: Test with minimal slashing protection.
* KeyManager: Test with minimal slashing protection.
* RPC: KeyManager: Test with minimal slashing protection.
* `convert-complete-to-minimal`: Change option names.
Options were:
- `--source` (for source data directory), and
- `--target` (for target data directory)
However, since this command deals with slashing protection, which has
source (epochs) and target (epochs), the initial option names may confuse
the user.
In this commit:
`--source` ==> `--source-data-dir`
`--target` ==> `--target-data-dir`
* Set `SlashableAttestationCheck` as an iface method.
And delete `CheckSlashableAttestation` from iface.
* Move helpers functions in a more general directory.
No functional change.
* Extract common structs out of `kv`.
==> `filesystem` does not depend anymore on `kv`.
==> `iface` does not depend anymore on `kv`.
==> `slashing-protection` does not depend anymore on `kv`.
* Move `ValidateMetadata` in `validator/helpers`.
* `ValidateMetadata`: Test with mock.
This way, we can:
- Avoid any circular import for tests.
- Implement once for all `iface.ValidatorDB` implementations
the `ValidateMetadata`function.
- Have tests (and coverage) of `ValidateMetadata`in
its own package.
The ideal solution would have been to implement `ValidateMetadata` as
a method with the `iface.ValidatorDB`receiver.
Unfortunately, golang does not allow that.
* `iface.ValidatorDB`: Implement ImportStandardProtectionJSON.
The whole purpose of this commit is to avoid the `switch validatorDB.(type)`
in `ImportStandardProtectionJSON`.
* `iface.ValidatorDB`: Implement `SlashableProposalCheck`.
* Remove now useless `slashableProposalCheck`.
* Delete useless `ImportStandardProtectionJSON`.
* `file.Exists`: Detect directories and return an error.
Before, `Exists` was only able to detect if a file exists.
Now, this function takes an extra `File` or `Directory` argument.
It detects either if a file or a directory exists.
Before, if an error was returned by `os.Stat`, the the file was
considered as non existing.
Now, it is treated as a real error.
* Replace `os.Stat` by `file.Exists`.
* Remove `Is{Complete,Minimal}DatabaseExisting`.
* `publicKeys`: Add log if unexpected file found.
* Move `{Source,Target}DataDirFlag`in `db.go`.
* `failedAttLocalProtectionErr`: `var`==> `const`
* `signingRoot`: `32`==> `fieldparams.RootLength`.
* `validatorClientData`==> `validator-client-data`.
To be consistent with `slashing-protection`.
* Add progress bars for `import` and `convert`.
* `parseBlocksForUniquePublicKeys`: Move in `db/kv`.
* helpers: Remove unused `initializeProgressBar` function.
* First take at updating everything to v5
* Patch gRPC gateway to use prysm v5
Fix patch
* Update go ssz
---------
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* Initial code for head event streaming
* handle events and error
* keepalive event
* tests
* generate new mock
* remove single case select
* cleanup
* explain eventByteLimit
* use 2 channels in test
* review
* more review
---------
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
* WIP
* fixing tests
* fixing bazel
* fixing api client
* fixing tests
* fixing more tests and bazel
* fixing trace and more bazel issues
* fixing router path function definitions
* fixing more tests and deep source issues
* adding delete test
* if a route is provided, reregister before the catch all on the middleware.
* fixing linting
* fixing deepsource complaint
* gaz
* more deepsource issues
* fixing missed err check
* changing how routes are registered
* radek reviews
* Update validator/rpc/handlers_keymanager.go
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com>
* Update validator/rpc/handlers_keymanager.go
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com>
* fixing unit test after sammy's review
* adding radek's comments
---------
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com>
* WIP
* WIP
* adding in migration function
* updating mock validator and gaz
* adding descriptive logs
* fixing mocking
* fixing tests
* fixing mock
* adding changes to handle enable builder settings
* fixing tests and edge case
* reduce cognative complexity of function
* further reducing cognative complexity on function
* WIP
* fixing unit test on migration
* adding more tests
* gaz and fix unit test
* fixing deepsource issues
* fixing more deesource issues missed previously
* removing unused reciever name
* WIP fix to migration logic
* fixing loging info
* reverting migration logic, converting logic to address issues discussed on slack, adding unit tests
* adding test for builder setting only not saved to db
* addressing comment
* fixing flag
* removing accidently missed deprecated flags
* rolling back mock on pr
* fixing fmt linting
* updating comments based on feedback
* Update config/features/flags.go
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com>
* fixing based on feedback on PR
* Update config/validator/service/proposer_settings.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* Update validator/client/runner.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* Update validator/db/kv/proposer_settings.go
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* adding additional logs to clear up some steps based on feedback
* fixing log
* deepsource
* adding comments based on review feedback
---------
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com>
Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
* fixing stringslice issue and adding one more filter
* fixing linting and improving function based on feedback
* rolling back generic function to check ci
* adding function back in
* testing printing error
* reverting change
* Added gofmt detail flag
* temporary change
* Another flag added
* Revert changes
* Modifed entrypoint
* Another change
* Revert
* Change go image
* Added -e flag
* Switched to alpine image
* Switched go to strech
* Fix typo
* Yet another image added
* Added go alpine
* rolling back generic
* reverting version
* Update go.sum
reverting
* Update go.mod
reverting
* Update Dockerfile
rolling back
* Update entrypoint.sh
rolling back
* Update go.yml
reverting changes
* fixing flag for config
* reverting changes and moving change to another PR
* Update validator/node/node.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* updating based on review
* Update container/slice/slice.go
Co-authored-by: Taranpreet26311 <taran@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Startinb builder service and interface
* Get header from builder
* Add get builder block
* Single validator registration
* Add mev-builder http cli flag
* Add method to verify registration signature
* Add builder registration
* Add submit validator registration
* suporting yaml
* fix yaml unmarshaling
* rolling back some changes from unmarshal from file
* adding yaml support
* adding register validator support
* added new validator requests into client/validator
* fixing gofmt
* updating flags and including gas limit, unit tests are still broken
* fixing bazel
* more name changes and fixing unit tests
* fixing unit tests and renaming functions
* fixing unit tests and renaming to match changes
* adding new test for yaml
* fixing bazel linter
* reverting change on validator service proto
* adding clarifying logs
* renaming function name to be more descriptive
* renaming variable
* rolling back some files that will be added from the builder-1 branch
* reverting more
* more reverting
* need placeholder
* need placeholder
* fixing unit test
* fixing unit test
* fixing unit test
* fixing unit test
* fixing more unit tests
* fixing more unit tests
* rolling back mockgen
* fixing bazel
* rolling back changes
* removing duplicate function
* fixing client mock
* removing unused type
* fixing missing brace
* fixing bad field name
* fixing bazel
* updating naming
* fixing bazel
* fixing unit test
* fixing bazel linting
* unhandled err
* fixing gofmt
* simplifying name based on feedback
* using corrected function
* moving default fee recipient and gaslimit to beaconconfig
* missing a few constant changes
* fixing bazel
* fixing more missed default renames
* fixing more constants in tests
* fixing bazel
* adding update proposer setting per epoch
* refactoring to reduce complexity
* adding unit test for proposer settings
* Update validator/client/validator.go
Co-authored-by: terencechain <terence@prysmaticlabs.com>
* trying out renaming based on feedback
* adjusting based on review comments
* making tests more appropriate
* fixing bazel
* updating flag description based on review feedback
* addressing review feedback
* switching to pushing at start of epoch for more time
* adding new unit test and properly throwing error
* switching keys in error to count
* fixing log variable
* resolving conflict
* resolving more conflicts
* adjusting error message
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
* adding checksum check at validator client and beacon node
* adding validation and logs on validator client startup
* moving the log and validation
* fixing unit tests
* adding test for back checksum on validator client
* fixing bazel
* addressing comments
* fixing log display
* Update beacon-chain/node/config.go
* Apply suggestions from code review
* breaking up lines
* fixing unit test
* ugh another fix to unit test
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* send proposer data to config
* wip implementation with file and url based config import
* improving logic on get validator index
* fix function
* optimizing function for map and address bug
* fixing log
* update cache if it doesn't exist
* updating flags
* initial unit test scaffold
* fixing validator to call rpc call, removed temporary dependency
* adding the API calls for the runner
* fixing broken build
* fixing deepsource
* fixing interface
* fixing fatal
* fixing more deepsource issues
* adding test placeholders
* updating proposer config to add validation
* changing how if statement throws error
* removing unneeded validation, validating in a different way
* wip improving tests
* more unit test work
* fixing unit test
* fixing unit tests and edge cases
* adding unit tests and adjusting how the config is created
* fixing bazel builds
* fixing proto generation
* fixing imports
* fixing unit tests
* Update cmd/validator/flags/flags.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* updating flags based on comments, fixing unit tests
* fixing bazel
* removing unneeded function
* fixing unit tests
* refactors and unit test fixes based on comments
* fixing bazel build
* refactor the cache out fo the fee recipient function
* adding usecase for multiple fee recipient
* refactor burn name
* Update validator/client/validator.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/client/validator.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/client/validator.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* fixing bug with validator index based on code review
* edited flag descriptions to better communicate usage
* fixing manual reference to flag name
* fixing code review comments
* fixing linting
* Update validator/client/validator.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* addressing comments and renaming functions
* fixing linting
* Update cmd/validator/flags/flags.go
* Update cmd/validator/flags/flags.go
* Update cmd/validator/flags/flags.go
* improving comments
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* initial commit
* adding first testcase wip
* fixing test
* adding more unit tests
* adding bazel file
* adding more unit tests and file checks
* addressing comments
* refactoring based on comments
* added bazel
* fixing build
* adding in fixes for url
* fixing gazelle
* fixing wrong keymanager kind
* adding required scheme to urls
* fixing another unit test
* removing unused file
* adding new commit to retrigger deepsource ci
* imported -> local
* reverting to the state of the PR at eb1e3c3d1
* use changes from develop
* del
* rem patch
* patch
* rename to local
* gazelle
* add back build
* imported rename
* gaz
* local
* merge fix + remove proto changes
* comment revert
* build
* gofmt and one new reference
* gofmt pt2
* Update validator/accounts/wallet_edit.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Update validator/rpc/accounts.go
* rename
* gaz
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
* initial commit for cli integration of web3signer
* resolving conflicts and execution
* remove aggregation slot from proto
* rem aggregation slot
* define a sync message block root struct
* fix sync message name
* sync message block root struct
* amend where sync committee block root is used
* altered switch statement to return correct json request by type
* fixing fork data import, types, and unit tests
* reverting unwanted changes
* reverting more unwanted changes
* fixing deepsource issues
* fixing formatting
* more fixes for deepsource and code clean up
* only want to fetch once for fetch validating public keys
* adding more comments
* new unit tests for requests and fixing a mapper issue
* Update validator/client/validator.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/accounts/wallet/wallet.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* adjusting comment
* adjusting comment
* fixing import organization
* including more unit tests
* adding new cli edit
* adding in checks for wallet initialize
* adding web3signer flags to main.go
* some how resolved files did not save correctly
* adding in check to make sure web flag only works with types imported and derived
* Update validator/client/sync_committee.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/client/aggregate.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/accounts/wallet/wallet.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update cmd/validator/wallet/wallet.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update cmd/validator/wallet/wallet.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update cmd/validator/main.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update cmd/validator/flags/flags.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update cmd/validator/flags/flags.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update cmd/validator/wallet/wallet.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update cmd/validator/wallet/wallet.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* reverting changes that accidently got checked in
* reverting
* reverting
* continuing to revert unintenteded changes
* reverting
* removing more unneeded changes
* addressing review comment
* initial refactor
* adding in more clarifying comments
* fixing mock
* resolving desource issues
* addressing gosec scan for helper go file
* addressing gosec
* trying to fix bazel build
* removal of interface to fix build
* fixing maligned struct
* addressing deepsource
* fixing deepsource
* addressing efficiency of type checking
* fixing bazel test failure
* fixing go linter errors
* gaz
* web changes
* add w3signer
* new kind
* proper use
* align
* adding prysm validator flags to help flags list
* addressing root comment
* ci lint
* fixing standardapi tests
* fixing accounts_test after removal of keymanager from rpc server
* fixing more unit tests
* Update cmd/validator/flags/flags.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update cmd/validator/flags/flags.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/client/service.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/client/service.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* addressing missed err checks
* fixing mock tests
* fixing gofmt
* unskipping minimal e2e test and removing related TODOs
* Update testing/endtoend/components/validator.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Update testing/endtoend/components/validator.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* adding some error wrapers to clarify failure point
* fixing bazel build with new error checks
* taking preston's advice to make test fail faster to understand what's going on with the test
* checking if genesis validators root is not zero hash
* adding check for genesis validators root giving zero hash
* fixing missing dependency
* adding check for wallet
* log all
* fixing errors for http responses
* switching marshal to pretty print
* adding pretty sign request test
* fixing base url setting
* adding in check for web3signer and temporary wallet instead of having to open the wallet
* refactoring web3signer to not require wallet
* bazel build fix
* fixing gazelle build
* adding content type of request
* fixing more bazel
* removing unused code
* removing unused comments
* adding skip test back in
* addressing a validation and error message
* fix parse
* body
* fixing logic for datadir
* improving error handling
* show resp
* fix
* sign resp as str
* point of pointer remove
* sign resp
* unmarshal sig resp
* read body as str
* adding more verbose logging
* removing unused result
* fixing unit test
* reconfiguring files to properly nest code and mocks
* fix build issue
* using context when using client function calls
* fixing based on suggestion
* addressing comments
* gaz
* removing defined max timeout
* reverting json print pretty
* Update validator/accounts/wallet_edit.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* removing unneeded code restrictions
* should not introduce new code that may impact existing key manager types
* adjusting comments
* adding in json validation
* running go mod tidy
* some logging
* more logs
* fixing typo
* remove logs
* testing without byte trim
* fixing order or properties
* gaz
* tidy
* reverting some logs
* removing the confusing comments
* Update validator/client/aggregate.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/client/aggregate.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* addressing pr comments
* editing bytes test
* Run gazelle update-repos
* run gazelle
* improving unit test coverage
* fixing text
* fixing a potential escaped error
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* begin the middleware approach
* attempt middleware
* middleware works in tandem with web ui
* handle delete as well
* delete request
* DELETE working
* tool to perform imports
* functioning
* commentary
* build
* gaz
* smol test
* enable keymanager api use protonames
* edit
* one rule
* rem gw
* Fix custom compiler
(cherry picked from commit 3b1f65919e04ddf7e07c8f60cba1be883a736476)
* gen proto
* imports
* Update validator/node/node.go
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
* remaining comments
* update item
* rpc
* add
* run gateway
* simplify
* rem flag
* deep source
Co-authored-by: prestonvanloon <preston@prysmaticlabs.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* remove shared network and ip util
* forkutil
* gaz
* build
* gaz
* nogo
* genrule
* gaz
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* add maxprocs
* add prereqs
* add tos and version pkg
* add in all runtime packages
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* moved validator/rpc/gateway under shared, validator/rpc/web is not visiable to the new shared gateway
* decided to have one lib with two methods if needed, status and stop are the same, however New and Start are not
* moved beacon's gateway to shared and moved the main func to its own /server folder
* goftm
* gofmt
* removed the extra loggin
* reduce visibility
* tighter visibilty of the shared lib for beacon and validator only for now
* fix patterns , ctx needs to be first param
* fix comments
* gofmt
* added enum for the caller id
* added unit test for gateway
* deprecated .WithDialer to .WithContextDialer
* changed the string callerId to uint8, and rearranged the Gateway struct based on the compiler
* fix 1 based on comment
* iota type
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* validator cmd
* imports
* more imports
* e2e viz
* alias
* use native alias
* add actual
* fix macro
* work on fix e2e
* add viz
* gaz
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* initial implementation
* remove listening for changes from wallet creation
* goimports
* test fix
* more goimports
* listen for changes when initializing wallet through gRPC
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* Change LowestSignedProposal to Also Return a Boolean for Slashing Protection (#8020)
* amend to use bools
* ineff assign
* comment
* Update `LowestSignedTargetEpoch` to include exists (#8004)
* Replace highest with lowerest
* Update validator/db/kv/attestation_history_v2.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/db/kv/attestation_history_v2.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Invert equality for saveLowestSourceTargetToDB
* Add eip checks to ensure epochs cant be lower than db ones
* Should be less than equal to
* Check if epoch exists in DB getters
* Revert run time checks
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* Export Attesting History for Slashing Interchange Standard (#8027)
* added in att history checks
* logic for export
* export return nil
* test for export atts
* round trip passes first try!
* rem println
* fix up tests
* pass test
* Validate Proposers Are Not Slashable With Regard to Data Within Slasher Interchange JSON (#8031)
* filter slashable blocks and atts in same json stub
* add filter blocks func
* add test for filtering out the bad public keys
* Export Slashing Protection History Via CLI (#8040)
* include cli entrypoint for history exports
* builds properly
* test to confirm we export the data as expected
* abstract helpers properly
* full test suite
* gaz
* better errors
* marshal ident
* Add the additional eip-3076 attestation checks (#7966)
* Replace highest with lowerest
* Update validator/db/kv/attestation_history_v2.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Update validator/db/kv/attestation_history_v2.go
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Invert equality for saveLowestSourceTargetToDB
* Add eip checks to ensure epochs cant be lower than db ones
* Should be less than equal to
* Check if epoch exists in DB getters
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Add EIP-3076 Invariants for Proposer Slashing Protection (#8067)
* add invariant for proposer protection
* write different test cases
* pass tests
* Add EIP-3076 Interchange JSON CLI command to validator (#7880)
* Import JSON CLI
* CLI impotr
* f
* Begin adding new commands in slashing protection
* Move testing helpers to separate packae
* Add command for importing slashing protection JSONs
* fix import cycle
* fix test
* Undo cleaning changes
* Improvements
* Add better prompts
* Fix prompt
* Fix
* Fix
* Fix
* Fix conflict
* Fix
* Fixes
* Fixes
* Fix exported func
* test func
* Fixes
* fix test
* simplify import and standardize with export
* add round trip test
* true integration test works
* fix up comments
* logrus
* better error
* fix build
* build fix
* Update validator/slashing-protection/cli_export.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Update validator/slashing-protection/cli_import.go
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* fmt
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* Filter Slashable Attester Public Keys in Slashing Interchange Import (#8051)
* filter slashable attesters from the same JSON
* builds
* fix up initially broken test
* circular dep
* import fix
* giz
* added in attesting history package
* add test for filter slashable attester keys
* pass tests
* Save Slashable Keys to Disk in the Validator Client (#8082)
* begin db funcs
* add in test and bucket
* gaz
* rem changes to import
* ineff assign
* add godoc
* Properly Handle Duplicate Public Key Entries in Slashing Interchange Imports (#8089)
* Prevent Blacklisted Public Keys from Slashing Protection Imports from Having Duties at Runtime (#8084)
* tests on update duties
* ensure the slashable public keys are filtered out from update duties via test
* begin test
* attempt test
* rename for better context
* pass tests
* deep source
* ensure tests pass
* Check for Signing Root Mismatch When Submitting Proposals and Importing Proposals in Slashing Interchange (#8085)
* flexible signing root
* add test
* add tests
* fix test
* Preston's comments
* res tests
* ensure we consider the case for minimum proposals
* pass test
* tests passing
* rem unused code
* Set Empty Epochs in Between Attestations as FAR_FUTURE_EPOCH in Attesting History (#8113)
* set target data
* all tests passing
* ineff assign
* signing root
* Add Slashing Interchange, EIP-3076, Spec Tests to Prysm (#7858)
* Add interchange test framework
* add checks for attestations
* Import genesis root if necessary
* flexible signing root
* add test
* Sync
* fix up test build
* only 3 failing tests now
* two failing
* attempting to debug problems in conformity tests
* include latest changes
* protect test in validator/client passing
* pass tests
* imports
* spec tests passing with bazel
* gh archive link to spectests using tar.gz suffix
* rev
* rev more comment changes
* fix sha
* godoc
* add back save
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* Implement Migration for Unattested Epochs in Attesting History Database (#8121)
* migrate attesting history backbone done
* begin migration logic
* implement migration logic
* migration test
* add test
* migration logic
* bazel
* migration to its own file
* Handle empty blocks and attestations in interchange json and sort interchange json by public key (#8132)
* Handle empty blocks and attestations in interchange json
* add test
* sort json
* easier empty arrays
* pass test
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
* builds
* more tests finally build
* Align Slashing Interchange With Optimized Slashing Protection (#8268)
* attestation history should account for multiple targets per source
* attempt at some fixes
* attempt some test fixes
* experimenting with sorting
* only one more failing test
* tests now pass
* slash protect tests passing
* only few tests now failing
* only spec tests failing now
* spec tests passing
* all tests passing
* helper function for verifying double votes
* use helper
* gaz
* deep source
* tests fixed
* expect specific number of times for domain data calls
* final comments
* Batch Save Imported EIP-3076 Attestations (#8304)
* optimize save
* test added
* add test for sad path
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* revert bad find replace
* add comment to db func
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Ivan Martinez <ivanthegreatdev@gmail.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Shay Zluf <thezluf@gmail.com>