Skip to content

Conversation

@unnawut
Copy link
Contributor

@unnawut unnawut commented Feb 10, 2026

What was wrong?

Implement leanEthereum/leanSpec#380

  • Removed TreeHash derive from SignedAttestation because it's not used and it's in turn requiring Signature to implement TreeHash as well which requires custom logic but also not used.
  • Change Signature::inner from FixedBytes<SIGNATURE_SIZE> to LeanSigSignature so that the final Signature scheme type is used directly without needing FixedBytes in-between
  • Implemented Encode/Decode on Signature replacing the FixedBytes implementation
  • Because leanSpec is giving us the expected outputs in json and camelCase format, we have to parse it to Ream/Rust types. So I created passthrough_conversion, simple_conversion, nested_conversion, custom_conversion to handle the json camelCase conversion to Ream types.

To-Do

@unnawut
Copy link
Contributor Author

unnawut commented Feb 10, 2026

I need to do another round of self-review before marking this ready for review

Comment on lines -17 to +14
pub inner: FixedBytes<SIGNATURE_SIZE>,
pub inner: LeanSigSignature,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if this is the right way to do it, but since FixedBytes is how Ream stores it internally and needs conversion to LeanSigSignature to do any operation anyway, so I'm thinking we could just remove this interim FixedBytes and use LeanSigSignature directly

Copy link
Contributor

Choose a reason for hiding this comment

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

Will LeanSigSignature encode to FixedBytes though is the question? I will read your code, but that would be the concern

@unnawut unnawut marked this pull request as ready for review February 11, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants