You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 ofVerifySignedData
.func UnsignedRoot(ctx context.Context, eth2Cl Eth2Provider, unsigned interface{}) ([32]byte, error) {
Refactor all manual instances to use this code.
The text was updated successfully, but these errors were encountered: