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

feat: Use H512 as transaction hash in HyperlaneProvider and Scraper #4759

Merged
merged 2 commits into from
Oct 25, 2024

Conversation

ameten
Copy link
Contributor

@ameten ameten commented Oct 25, 2024

Description

Use H512 as transaction hash in HyperlaneProvider and Scraper.

Related issues

Backward compatibility

Yes

Testing

Manual run of Scraper for Ethereum and Neutron

Copy link

changeset-bot bot commented Oct 25, 2024

⚠️ No Changeset found

Latest commit: bba63bc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codecov bot commented Oct 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.97%. Comparing base (a42616f) to head (bba63bc).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4759   +/-   ##
=======================================
  Coverage   73.97%   73.97%           
=======================================
  Files         101      101           
  Lines        1460     1460           
  Branches      191      191           
=======================================
  Hits         1080     1080           
  Misses        359      359           
  Partials       21       21           
Components Coverage Δ
core 84.61% <ø> (ø)
hooks 75.71% <ø> (ø)
isms 77.58% <ø> (ø)
token 89.01% <ø> (ø)
middlewares 77.39% <ø> (ø)

Copy link
Contributor

@daniel-savu daniel-savu left a comment

Choose a reason for hiding this comment

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

since so far the db has been storing these types as H256, what are the implications of starting to store_logs as H512?

@ameten
Copy link
Contributor Author

ameten commented Oct 25, 2024

There is no implication in this PR. Transaction hash is 32 bytes in Ethereum and Cosmos chains. We pass transaction hash as H512 (64 bytes). When we store the hash to database, we remove leading zeros and store it as 32-byte-long binary string into bytea datatype of Postgres.

Once we add support for Solana which has 64-byte long transaction hashes, we'll store transaction hashes as 64-byte-long bynary strings into the same bytea datatype.

@ameten ameten added this pull request to the merge queue Oct 25, 2024
Merged via the queue into main with commit 14e4719 Oct 25, 2024
36 checks passed
@ameten ameten deleted the ameten/adopt-h512-txn-hash-for-scraper-db branch October 25, 2024 13:07
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