Skip to content
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 22 commits into from
Jan 11, 2022
Merged

Web3Signer: Object Mapper and Types #10061

merged 22 commits into from
Jan 11, 2022

Conversation

james-prysm
Copy link
Contributor

What type of PR is this?

Feature

Part of #9994

What does this PR do? Why is it needed?

This adds the JSON object types for web3signer and the object mapper functions to map from Prysm Datatypes to Web3signer datatypes

@james-prysm james-prysm added Enhancement New feature or request API Api related tasks Do Not Merge Web3Signer Web3Signer related tasks labels Jan 7, 2022
@james-prysm james-prysm requested a review from a team as a code owner January 7, 2022 14:03
@james-prysm james-prysm self-assigned this Jan 7, 2022
@james-prysm james-prysm linked an issue Jan 7, 2022 that may be closed by this pull request
23 tasks
- Files Added:
- validator/keymanager/remote-web3signer package

- Files Modified:
Copy link
Contributor Author

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

validator/keymanager/remote-web3signer/client.go Outdated Show resolved Hide resolved
validator/keymanager/remote-web3signer/client_test.go Outdated Show resolved Hide resolved
validator/keymanager/remote-web3signer/keymanager.go Outdated Show resolved Hide resolved
Deposits: make([]*Deposit, len(body.Deposits)),
VoluntaryExits: make([]*SignedVoluntaryExit, len(body.VoluntaryExits)),
SyncAggregate: &SyncAggregate{
SyncCommitteeBits: hexutil.Encode(body.SyncAggregate.SyncCommitteeBits),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think SyncCommitteeBits being a special type, (Bitvector), not sure if the hexutil will directly represent it as we need. You might want to call the .Bytes() method of bitvectors and bitlists https://github.com/prysmaticlabs/go-bitfield/blob/385d8c5e3fb7f24c83e25f32dd9511f5462ea0b8/bitvector512.go#L73 before doing hexutil.Encode

james-prysm and others added 6 commits January 11, 2022 13:25
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
rauljordan
rauljordan previously approved these changes Jan 11, 2022
@rauljordan rauljordan merged commit f52a214 into develop Jan 11, 2022
@rauljordan rauljordan deleted the web3signer-types branch January 11, 2022 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Api related tasks Enhancement New feature or request Web3Signer Web3Signer related tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Tracking] - Web3Signer capabilities for Prysm
2 participants