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

fix: ensure API signatures are even in length #2434

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

iamacook
Copy link
Member

@iamacook iamacook commented Mar 7, 2025

Summary

We currently validate that transaction signatures from our API are hex and a denomination fo 130 and that message signatures are hex.

Whilst we can be sure that incoming signatures from clients are a denomination of 130 (because the interface does not currently support proposal of contract signatures), we cannot be sure that the Transaction Service hasn't indexed contract signatures with dynamic parts.

This creates a new HexBytesSchema which ensures a string is hex and even in length, aka "byte-aligned", applying it to the validation of transaction/message signatures from our API.

Changes

  • Add and use HexBytesSchema
  • Add/update tests accordingly

@iamacook iamacook self-assigned this Mar 7, 2025
@iamacook iamacook requested a review from a team as a code owner March 7, 2025 16:07
@iamacook iamacook requested a review from hectorgomezv March 10, 2025 07:50
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