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

Scraper: H512 tx hashes for eventual Solana support #3331

Open
Tracked by #2527 ...
tkporter opened this issue Feb 29, 2024 · 0 comments
Open
Tracked by #2527 ...

Scraper: H512 tx hashes for eventual Solana support #3331

tkporter opened this issue Feb 29, 2024 · 0 comments

Comments

@tkporter
Copy link
Collaborator

tkporter commented Feb 29, 2024

Note:

This isn't strictly required at the moment, and is only strictly needed for the scraper to work well with Solana chains for when we eventually implement this!

Problem

Because of Solana's 64 byte tx hash lengths (instead of the typical 32 bytes in Ethereum), we moved much of the agent code to using H512 for tx hashes. However we didn't change the scraper - it still works only with 32 byte tx hashes.

We'll still use bytea which isn't fixed length for storing tx hashes. However we'll need to change some logic to support H512 tx hashes to avoid stuff like this:

.expect("256-bit transaction ids are the maximum supported at this time"),

Solution

Our options are:

  1. always write H512s, and have application logic know to grab the latter 32 bytes for Ethereum chains, etc
  2. write tx hashes with a length dependent upon the protocol being used

1 is probably easier in the way that things are set up in the agent codebase

@tkporter tkporter changed the title Scraper: H512 tx hashes for Solana support Scraper: H512 tx hashes for eventual Solana support Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants