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

A decoding issue #1

Open
abernatskiy opened this issue Mar 11, 2024 · 8 comments
Open

A decoding issue #1

abernatskiy opened this issue Mar 11, 2024 · 8 comments

Comments

@abernatskiy
Copy link
Collaborator

Hi! Trying to sync the squid. When I got to the batch starting at 3576740 I got

TypeError: Cannot read properties of undefined (reading 'liquidityGross')
    at handleBurn (/home/abernatskiy/algebra/algebra-ricqcodes/lib/mappings/core.js:317:79)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async processEvents (/home/abernatskiy/algebra/algebra-ricqcodes/lib/main.js:512:13)
    at async /home/abernatskiy/algebra/algebra-ricqcodes/lib/main.js:192:5
    at async TypeormDatabase.performUpdates (/home/abernatskiy/algebra/algebra-ricqcodes/node_modules/@subsquid/typeorm-store/lib/database.js:139:13)
    at async /home/abernatskiy/algebra/algebra-ricqcodes/node_modules/@subsquid/typeorm-store/lib/database.js:84:13
    at async EntityManager.transaction (/home/abernatskiy/algebra/algebra-ricqcodes/node_modules/typeorm/entity-manager/EntityManager.js:73:28)
    at async TypeormDatabase.submit (/home/abernatskiy/algebra/algebra-ricqcodes/node_modules/@subsquid/typeorm-store/lib/database.js:151:24)
    at async Runner.withProgressMetrics (/home/abernatskiy/algebra/algebra-ricqcodes/node_modules/@subsquid/util-internal-processor-tools/lib/runner.js:183:22)
    at async Runner.handleFinalizedBlocks (/home/abernatskiy/algebra/algebra-ricqcodes/node_modules/@subsquid/util-internal-processor-tools/lib/runner.js:140:9)

Please fix.

@RicqCodes
Copy link
Owner

Thank you, i'm working on fixing now. How long do i have until deadline?

@abernatskiy
Copy link
Collaborator Author

The deadline is the end of the day Sunday, March 24th.

@abernatskiy
Copy link
Collaborator Author

This subgraph is a tough one, even the best submissions have substantial data discrepancies. If I were you I'd try to get the syncing errors out of the way ASAP.

@RicqCodes
Copy link
Owner

Alright thanks, will fix asap

@RicqCodes
Copy link
Owner

Hi @abernatskiy i have been able to make squid sync completely with latest commit, i just have a minor mismatch that i am already working on fixing

@RicqCodes
Copy link
Owner

I think i fixed it, awaiting a response now

@abernatskiy
Copy link
Collaborator Author

Hi! Good work, certainly enough for acceptance. There are still some issues which you might want to fix if you want to compete for the StellaSwap prizes:

  1. You use BigInt instead of Int for dates in many entities. This complicates testing, would be easier to work with an API with types matching these of the subgraph.
  2. The conversions from elementary units (wei, satoshis etc) to common units (eth, btc etc) are missing throughout the squid. This leads to values of prices, volumes and the like to be off by ~18 or so digits very often.
  3. Timestamps are in milliseconds instead of seconds. Normally that'd be fine, but they are often used in IDs, making it impossible to retrieve the same data by the same ID.

Let me know if you get to fixing these - will do another round of tests.

@RicqCodes
Copy link
Owner

Alright thank you very much! on it right now!

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

No branches or pull requests

2 participants