-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web3Signer: Object Mapper and Types #10061
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
952e937
initial commit
james-prysm 33c2a26
fixing some types and renaming file
james-prysm 95f1993
initial map function commit and moving to a v1 folder
james-prysm 98615a0
adding in remaining mapper functions and comments for types and initi…
james-prysm d3e02b2
adding readme
james-prysm 014d16a
fixing unit tests and errors caught
james-prysm 554c55a
fixed a few missed properties and names
james-prysm 2d44b6a
Merge branch 'develop' into web3signer-types
james-prysm 1bcb0b7
updating error handling to be more descriptive
james-prysm 39cb7b7
Merge branch 'develop' into web3signer-types
james-prysm 5a0a40c
Update validator/keymanager/remote-web3signer/client_test.go
james-prysm 112d4b0
Update validator/keymanager/remote-web3signer/keymanager.go
james-prysm 148ab0a
Update validator/keymanager/remote-web3signer/v1/custom_mappers.go
james-prysm 655ca36
Update validator/keymanager/remote-web3signer/v1/custom_mappers.go
james-prysm 638a626
fixing comments
james-prysm f6d86f4
fixing comments
james-prysm cd325f9
adding more error checks
james-prysm 25ead3a
Merge branch 'develop' into web3signer-types
james-prysm 147b938
Update validator/keymanager/remote-web3signer/client.go
rauljordan c52f411
fmt and bazel build
rauljordan 0e96c61
fixing unit tests
james-prysm 846d3cd
lint needed
rauljordan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Web3Signer | ||
|
||
Web3Signer is a popular remote signer tool by Consensys to allow users to store validation keys outside the validation | ||
client and signed without the vc knowing the private keys. Web3Signer Specs are found by | ||
searching `Consensys' Web3Signer API specification` | ||
|
||
issue: https://github.com/prysmaticlabs/prysm/issues/9994 | ||
|
||
## Support | ||
|
||
WIP | ||
|
||
## Features | ||
|
||
### CLI | ||
|
||
WIP | ||
|
||
### API | ||
|
||
- Get Public keys: returns all public keys currently stored with web3signer excluding newly added keys if reload keys | ||
was not run. | ||
- Sign: Signs a message with a given public key. There are several types of messages that can be signed ( web3signer | ||
type to prysm type): | ||
- BLOCK <- *validatorpb.SignRequest_Block | ||
- ATTESTATION <- *validatorpb.SignRequest_AttestationData | ||
- AGGREGATE_AND_PROOF <- *validatorpb.SignRequest_AggregateAttestationAndProof | ||
- AGGREGATION_SLOT <- *validatorpb.SignRequest_Slot | ||
- BLOCK_V2 <- *validatorpb.SignRequest_BlockV2 | ||
- BLOCK_V3 <- *validatorpb.SignRequest_BlockV3 | ||
- DEPOSIT <- not supported | ||
- RANDAO_REVEAL <- *validatorpb.SignRequest_Epoch | ||
- VOLUNTARY_EXIT <- *validatorpb.SignRequest_Exit | ||
- SYNC_COMMITTEE_MESSAGE <- *validatorpb.SignRequest_SyncMessageBlockRoot | ||
- SYNC_COMMITTEE_SELECTION_PROOF <- *validatorpb.SignRequest_SyncAggregatorSelectionData | ||
- SYNC_COMMITTEE_CONTRIBUTION_AND_PROOF <- *validatorpb.SignRequest_ContributionAndProof | ||
- Reload Keys: reloads all public keys from the web3signer. | ||
- Get Server Status: returns OK if the web3signer is ok. | ||
|
||
## Files Added and Files Changed | ||
|
||
- Files Added: | ||
- validator/keymanager/remote-web3signer package | ||
|
||
- Files Modified: | ||
- modified: cmd/validator/flags/flags.go | ||
- modified: validator/accounts/accounts_backup.go | ||
- modified: validator/accounts/accounts_list.go | ||
- modified: validator/accounts/iface/wallet.go | ||
- modified: validator/accounts/userprompt/prompt.go | ||
- modified: validator/accounts/wallet/wallet.go | ||
- modified: validator/accounts/wallet_create.go | ||
- modified: validator/client/runner.go | ||
- modified: validator/client/validator.go | ||
- modified: validator/keymanager/remote-web3signer/keymanager.go | ||
- modified: validator/keymanager/types.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
load("@prysm//tools/go:def.bzl", "go_library", "go_test") | ||
|
||
go_library( | ||
name = "go_default_library", | ||
srcs = [ | ||
"custom_mappers.go", | ||
"mocks.go", | ||
"web3signer_types.go", | ||
], | ||
importpath = "github.com/prysmaticlabs/prysm/validator/keymanager/remote-web3signer/v1", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//config/fieldparams:go_default_library", | ||
"//proto/prysm/v1alpha1:go_default_library", | ||
"@com_github_ethereum_go_ethereum//common/hexutil:go_default_library", | ||
"@com_github_pkg_errors//:go_default_library", | ||
"@com_github_prysmaticlabs_go_bitfield//:go_default_library", | ||
], | ||
) | ||
|
||
go_test( | ||
name = "go_default_test", | ||
srcs = ["custom_mappers_test.go"], | ||
embed = [":go_default_library"], | ||
deps = [ | ||
"//config/fieldparams:go_default_library", | ||
"//proto/prysm/v1alpha1:go_default_library", | ||
"//testing/util:go_default_library", | ||
"@com_github_ethereum_go_ethereum//common/hexutil:go_default_library", | ||
"@com_github_prysmaticlabs_go_bitfield//:go_default_library", | ||
], | ||
) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is actually part of the cli pr so please ignore this section, it was just to keep track of file changes as we might want to refactor this in the future