Closed idirall22 closed 4 months ago
This is expected and needed for time travel queries (https://github.com/checkpoint-labs/checkpoint/pull/297).
With this you can look up state of the data at specific block:
{
users (block: 65309) {
id
created_at
created_at_block
}
This is also needed for upcoming reorg support so data can be rolled back.
Is there anything you try to do that doesn't work with this change? This change should be transparent from consumer point of view (in writers and when querying data you shouldn't need to worry about it). If you only want to see latest data in DB you can filter your results with upper_inf(block_range)
.
I'd imagine that in your case this might result in lots of entires if user balances changes happen frequently, we are planning on making time travel optional and just store data for last 500 blocks or so to still be able to support reorgs.
Hi @Sekhmet Thanks for the quick and clear answer! I'll add modifications on my side to include this new feature...
Description
I'm indexing a contract to store the user balance. The ID I use is a combination of the contract address and the user's address
The idea is to store the user balance one time, so before inserting a new row in the database I'm doing this check
The issue I have in version
0.1.37
, is that I can not update the row based on the ID it creates a new row each time with the same ID.