You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm indexing the same token on two chains. For this I have to separate projects, each running
ponder start --port 6060 --schema ethereum
ponder start --port 6060 --schema polygon
Using the same DB.
There is a concerning lack of schema awareness somewhere (up to the point that I don't know if the data is being written on the table I expect or if the data is getting mixed up) causing errors similar to this:
10:38:20 AM INFO app Indexed 21 events with 100% complete and 2ms remaining
10:38:20 AM ERROR indexing Internal error occurred while flushing cache. Please report this error here: https://github.com/ponder-sh/ponder/issues
10:38:20 AM WARN user Failed 'holder.flush()' database method
10:38:20 AM ERROR indexing Error while processing 'Token:Transfer' event in 'mainnet' block 21429711
FlushError: column "account_type" is of type polygon.account_type but expression is of type text
at /Users/[redacted]/ethereum/src/Token.ts:190:21
188 | // Update Token Stats Table
189 | // Find the total holder metric from the latest block
> 190 | const prevStats = await context.db.sql
| ^
191 | .select()
192 | .from(tokenStat)
193 | .orderBy(desc(tokenStat.blockNumber))
Event arguments:
from 0x3[redacted]9
to 0x1[redacted]3
value 1000000000
10:38:20 AM WARN process Encountered indexing error, starting shutdown sequence
10:38:20 AM FATAL process Finished shutdown sequence, terminating (exit code 1)
Expected behavior
While running ponder start --port 6060 --schema ethereum
I don't expect to see any mention to tables in the polygon schema
Steps to reproduce
Use the same ponder.schema.ts across two different projects, each targeting a different chain e.g. ethereum/polygon:
I saw this issue first with this ponder.schema.ts:
This yielded the error BaseError: column "account_type" is of type polygon.account_type but expression is of type ethereum.account_type
So I thought it was because of the accountType fancy onchain enum, so I made it text in my Ethereum project and kept it as Enum in the Polygon project. In which case I still have the error which is being reported above.
Hey, this looks like a bug in ponder. I haven't been able to reproduce this, so if you could include some more information about the steps that led up to this bug, it would be helpful.
did you change the schema in between running the ethereum and polygon deployment?
which deployment did you run first?
do you see any missing or irregular data when inspecting your database (with psql and \dT)?
do you have a value set for `DATABASE_SCHEMA in .env.local ?
Version
0.8.6
Current behavior
I'm indexing the same token on two chains. For this I have to separate projects, each running
ponder start --port 6060 --schema ethereum
ponder start --port 6060 --schema polygon
Using the same DB.
There is a concerning lack of schema awareness somewhere (up to the point that I don't know if the data is being written on the table I expect or if the data is getting mixed up) causing errors similar to this:
Expected behavior
While running
ponder start --port 6060 --schema ethereum
I don't expect to see any mention to tables in the
polygon
schemaSteps to reproduce
Use the same
ponder.schema.ts
across two different projects, each targeting a different chain e.g. ethereum/polygon:I saw this issue first with this
ponder.schema.ts
:This yielded the error
BaseError: column "account_type" is of type polygon.account_type but expression is of type ethereum.account_type
So I thought it was because of the
accountType
fancy onchain enum, so I made ittext
in my Ethereum project and kept it as Enum in the Polygon project. In which case I still have the error which is being reported above.ponder.config.ts
:Link to repository
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: