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
{{ message }}
Repository navigation
kvindexer: enable parsing event values which exceed the max value of int64 #767
CometBFT version (use cometbft version or git rev-parse --verify HEAD if installed from source):
0.34.x, 0.37.x, 0.38.x
Have you tried the latest version: yes/no
yes
What happened?
For parsing event values within the kvindexer we use parseInt which will not parse values bigger than the maximum value of int64. As pointed out in #726, there are many chains using big denoms and we might end up in a situation where their data is not indexed properly.
ParseInt was used only for range queries in Comet and Tendermint core versions prior to 0.34.27. v0.34.27+ uses ParseInt in many other places.
What did you expect to happen?
If an event of the form: sender.amount = 10000000000000000000 exists, a query for it should return this event. Currently, an error is produced.
Supporting the "8atom" case seems wrong to me. It gives the impression to users that a unit can be passed and be interpreted, but that is not the case. For example, if a value had been stored as BTC and someone queried for the equivalent in Satoshis, then the query will not return the expected results. We should deprecate and remove this feature.
Activity
jmalicevic commentedon Apr 27, 2023
Depends on closing #769 first.
sergio-mena commentedon May 16, 2023
Reopening this to remember to handle the "8atom" case in kvindexer (will be done in PR separate from #797).
lasarojc commentedon May 16, 2023
Supporting the "8atom" case seems wrong to me. It gives the impression to users that a unit can be passed and be interpreted, but that is not the case. For example, if a value had been stored as BTC and someone queried for the equivalent in Satoshis, then the query will not return the expected results. We should deprecate and remove this feature.
jmalicevic commentedon Jul 10, 2023
Opened a separate issue for this: #1108 . Closing this.