8000 pubsub: Properly parse big numbers · Issue #769 · cometbft/cometbft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content 8000
pubsub: Properly parse big numbers #769
Closed
@jmalicevic

Description

@jmalicevic

Bug Report

Setup

CometBFT version (use cometbft version or git rev-parse --verify HEAD if installed from source):
0.38.x, main,
Have you tried the latest version: yes/no
yes

What happened?

The performance optimizations introduced with tendermint/tendermint#7319 parse all numbers occurring in a query using ParseFloat, including integers. While this solves the problem of parsing big integers, it might lead to a loss of precision.

One way to achieve this is introduce a TFNumber and TIntNumber in query/syntax/scanner which would replace the current TNumber type. The function scanNumber already detects potential . in the number.

What did you expect to happen?

Integers are parsed using either ParseInt or parsed as big integers (for example by using math/big).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglibs

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0