Open alex-pakalniskis opened 5 months ago
Hey @alex-pakalniskis ,
The developer experience was good, the documentation is pretty clear on how to implement. However, I faced some issues with timeseries, I was getting this error:
Subgraph failed with non-deterministic error: Failed to transact block operations: store error: duplicate key value violates unique constraint "post_stat_hour_id_key", retry_delay_s: 120, attempt: 0
It was a bit hard to debug because the fact that this are derived IDs, I fix it by changing the way I was handling initialization for the timeseries entity
Wild .. that shouldn't happen; the id
of timeseries entities (like PostTime
) is managed entirely by graph-node
, and it shouldn't matter what you pass in as the id
, though "auto"
is recommended. Did you deploy this in the hosted service/studio? If so, do you remember the IPFS hash that caused this error?
I deployed the subgraph on Artbitrum. I was just trying to find the ipfs hash of that caused the error and I realized that there was another error. I am cofused about this because it was working just fine.
Failed to start subgraph, code: SubgraphStartFailure, error: resolve error: Validation errors in subgraph
QmUg1jA63JEEcLFG7gggV4MQJ3nc2UhgKJ4EMWftw985DP: (1) - Type InteractionThumbsUp has a
timestampfield of type Int8, but it must be of type Timestamp (2) - Type InteractionThumbsDown has a
timestampfield of type Int8, but it must be of type Timestamp (3) - Type PostTime has a
timestampfield of type Int8, but it must be of type Timestamp (4) - Type ThumbsUpStat has a
timestampfield of type Int8, but it must be of type Timestamp (5) - Type ThumbsDownStat has a
timestampfield of type Int8, but it must be of type Timestamp (6) - Type PostStat has a
timestampfield of type Int8, but it must be of type Timestamp: Validation errors in subgraph
QmUg1jA63JEEcLFG7gggV4MQJ3nc2UhgKJ4EMWftw985DP: (1) - Type InteractionThumbsUp has a
timestampfield of type Int8, but it must be of type Timestamp (2) - Type InteractionThumbsDown has a
timestampfield of type Int8, but it must be of type Timestamp (3) - Type PostTime has a
timestampfield of type Int8, but it must be of type Timestamp (4) - Type ThumbsUpStat has a
timestampfield of type Int8, but it must be of type Timestamp (5) - Type ThumbsDownStat has a
timestampfield of type Int8, but it must be of type Timestamp (6) - Type PostStat has a
Hey .. I am very sorry about that, but we rolled out an update that requires a small modification of all subgraphs using aggregations. In your subgraphs schema, for timeseries and aggregations, you need to change timestamp: Int8!
to timestamp: Timestamp!
. There's no other change needed, but you'll need to redeploy the updated subgraph.
On the brighter side, we don't have any more plans to break backwards compatibility for aggregations (this change was one of the big reasons why aggregations are labeled as experimental, and thanks a ton for trying it out!)
Hey @marcusats,
I noticed you're using aggregations in this subgraph (https://github.com/marcusats/kanan-subgraph/blob/main/schema.graphql#L72).
Do you have any feedback (good or bad) on the feature? We'd love to hear about your experience.
Hope you are well, Alex (PM at Edge & Node)