Skip to content

kvindexer: enable parsing event values which exceed the max value of int64 #767

Closed

Description

@jmalicevic

Bug Report

Setup

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.

Activity

  1. added
    bug
    on Apr 26, 2023
  2. added this to the 2023-Q2 milestone on Apr 26, 2023
  3. self-assigned this
    on Apr 26, 2023
  4. moved this from Todo to In Progress in CometBFT 2023on Apr 26, 2023
  5. jmalicevic commented on Apr 27, 2023

    @jmalicevic
    CollaboratorAuthor

    Depends on closing #769 first.

  6. moved this from In Progress to Done in CometBFT 2023on May 16, 2023
  7. sergio-mena commented on May 16, 2023

    @sergio-mena
    Collaborator

    Reopening this to remember to handle the "8atom" case in kvindexer (will be done in PR separate from #797).

  8. lasarojc commented on May 16, 2023

    @lasarojc
    Contributor

    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.

  9. added
    backlog
    on Jul 5, 2023
  10. modified the milestones: 2023-Q2, 2023-Q3 on Jul 5, 2023
  11. jmalicevic commented on Jul 10, 2023

    @jmalicevic
    CollaboratorAuthor

    Opened a separate issue for this: #1108 . Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

backlogbugindexer

Type

No type

Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions