Skip to content

Conversation

@zsystm
Copy link
Contributor

@zsystm zsystm commented Jul 9, 2025

Description

Pad each ECDSA signature field (r, s, X, Y) to 32 bytes in signMsg to eliminate the intermittent “valid signature” test failures caused by un-padded big-int bytes.

Closes: #273


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • tackled an existing issue or discussed with a team member
  • left instructions on how to review the changes
  • targeted the main branch

Reviewers Checklist

All items are required.
Please add a note if the item is not applicable
and please add your handle next to the items reviewed
if you only reviewed selected items.

I have...

  • added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • confirmed all author checklist items have been addressed
  • confirmed that this PR does not change production code
  • reviewed content
  • tested instructions (if applicable)
  • confirmed all CI checks have passed

r or s could be less than 32 bytes sometimes. we should leftpad always to handle that cases also.
@zsystm zsystm marked this pull request as ready for review July 9, 2025 14:50
@zsystm zsystm self-assigned this Jul 9, 2025
@zsystm zsystm requested a review from vladjdk July 9, 2025 14:51
Copy link
Contributor

@cloudgray cloudgray left a comment

Choose a reason for hiding this comment

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

Thanks for fixing such a bothersome problem.

Copy link
Member

@vladjdk vladjdk left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@aljo242 @technicallyty this fixes the flaky test we've been having problems with :)

@vladjdk vladjdk merged commit e57a44e into cosmos:main Jul 14, 2025
15 checks passed
@songgaoye songgaoye mentioned this pull request Jul 24, 2025
9 tasks
zsystm added a commit to zsystm/evm that referenced this pull request Nov 2, 2025
r or s could be less than 32 bytes sometimes. we should leftpad always to handle that cases also.
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.

Intermittent failures in P256 precompile integration tests due to missing padding

3 participants