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

Extract signing root function for all eth2 types #920

Closed
corverroos opened this issue Aug 5, 2022 · 0 comments · Fixed by #1372
Closed

Extract signing root function for all eth2 types #920

corverroos opened this issue Aug 5, 2022 · 0 comments · Fixed by #1372
Assignees
Labels
enhancement New feature or request

Comments

@corverroos
Copy link
Contributor

Problem to be solved

We sign eth2 structs in validatormock and in many tests. Signing requires calculating the domain wrapped signature root of the struct. We currently do this manually in many places. It is time to DRY.

Proposed solution

Create a function in eth2util/signing that calculates signing roots for all unsigned eth2 types, following the example of VerifySignedData.

func UnsignedRoot(ctx context.Context, eth2Cl Eth2Provider, unsigned interface{}) ([32]byte, error) {

Refactor all manual instances to use this code.

@corverroos corverroos added the enhancement New feature or request label Aug 5, 2022
@dB2510 dB2510 self-assigned this Oct 6, 2022
obol-bulldozer bot pushed a commit that referenced this issue Oct 31, 2022
Refactors signature verification logic to simplify for each signed data.

category: refactor
ticket: #920
@dB2510 dB2510 linked a pull request Oct 31, 2022 that will close this issue
obol-bulldozer bot pushed a commit that referenced this issue Oct 31, 2022
Adds tests for eth2signeddata.

category: test
ticket: #920
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants