Skip to content

Conversation

@mariuszzak
Copy link
Collaborator

Description

  • Add signature normalization to convert ECDSA recovery ID (v) from Ethereum format (27/28) to raw format (0/1) for go-ethereum compatibility (Inconsistent usage of V values in signatures ethereum/go-ethereum#19751)
  • Change ABI encoding from flat params to tuple-wrapped struct format to match Solidity's abi.encode(PacketAttestation)
  • Use raw commitment comparison instead of keccak256-hashed values to align with Solidity attestor light client

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
  • Include changelog entry when appropriate (e.g. chores should be omitted from changelog).
  • Wrote unit and integration tests if relevant.
  • Updated documentation (docs/) if anything is changed.
  • Added godoc comments if relevant.
  • Self-reviewed Files changed in the GitHub PR explorer.
  • Provide a conventional commit message to follow the repository standards.

…encoding

      - Add normalizeSignature function to convert ECDSA recovery ID (v) from
        Ethereum format (27/28) to raw format (0/1) for go-ethereum's SigToPub
      - Change ABI encoding from flat params to tuple-wrapped struct format
        to match Solidity's abi.encode(PacketAttestation)
      - Use raw commitment comparison instead of keccak256-hashed values
        to align with Solidity attestor light client behavior
      - Update tests and documentation accordingly
@mariuszzak mariuszzak self-assigned this Dec 5, 2025
@mariuszzak mariuszzak requested a review from srdtrk December 5, 2025 11:52
@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 76.66667% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.64%. Comparing base (421839a) to head (95b4331).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
modules/light-clients/attestations/signature.go 69.23% 4 Missing ⚠️
modules/light-clients/attestations/abi.go 81.25% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8723      +/-   ##
==========================================
+ Coverage   58.62%   58.64%   +0.02%     
==========================================
  Files         329      329              
  Lines       18465    18479      +14     
==========================================
+ Hits        10825    10837      +12     
- Misses       6990     6993       +3     
+ Partials      650      649       -1     
Flag Coverage Δ
08-wasm 64.81% <ø> (ø)
e2e 0.95% <ø> (ø)
ibc-go 64.00% <76.66%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@srdtrk srdtrk left a comment

Choose a reason for hiding this comment

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

Lgtm

@srdtrk srdtrk changed the title feat(attestations): add Solidity compatibility for signature and ABI encoding fix(attestations): add Solidity compatibility for signature and ABI encoding Dec 5, 2025
@srdtrk srdtrk merged commit 2db9e3e into main Dec 5, 2025
53 checks passed
@srdtrk srdtrk deleted the mariuszzak/fix-discrepancies-in-attestations branch December 5, 2025 12:25
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.

3 participants