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 was thinking the balance_changes table might be improved by doing the following:
Rename the amount column to balance
Introduce a new amount column which records the change in balance in that block for address/token.
The value could be computed in the crawler by querying each balance also at block N - 1 and storing the difference.
This can be computed in the database from the balance_changes table too, as long as it's 100% complete -- but this could provide a nice way to internally check the data integrity, as well as providing a convenient way to correlate a transaction with its effect on the balance.
The balances view would also be updated to query from the balance column (but can still be named amount there, so it doesn't require any API changes in the webserver).
If you agree that this would be worth the added cost of doubling the balance RPC queries in the crawler, I can send a PR that makes this change.
The text was updated successfully, but these errors were encountered:
interesting idea! I think we could try to do this but we would like to avoid changes to the table if not needed. Ill label this as enhancement and lets target to have it in v2!
I was thinking the
balance_changes
table might be improved by doing the following:amount
column tobalance
amount
column which records the change in balance in that block for address/token.N - 1
and storing the difference.This can be computed in the database from the
balance_changes
table too, as long as it's 100% complete -- but this could provide a nice way to internally check the data integrity, as well as providing a convenient way to correlate a transaction with its effect on the balance.The
balances
view would also be updated to query from thebalance
column (but can still be namedamount
there, so it doesn't require any API changes in the webserver).If you agree that this would be worth the added cost of doubling the balance RPC queries in the crawler, I can send a PR that makes this change.
The text was updated successfully, but these errors were encountered: