-
Notifications
You must be signed in to change notification settings - Fork 780
Description
Bug Report
Setup
CometBFT version (use cometbft version or git rev-parse --verify HEAD if installed from source): should be latest
Have you tried the latest version: no
ABCI app (name for built-in, URL for self-written if it's publicly available): Rebus
Environment:
- OS (e.g. from /etc/os-release): Ubuntu
- Install tools:
- Others:
node command runtime flags:
Config
What happened?
I am building a tool to subscribe to transactions and messages I need. Internally I use Query /libs/pubsub/query/query.go to filter out messages I do not need. One of my goals is to use values comparison (for example, as in this filter: delegate.amount > 10000000, to filter out MsgDelegate messages with amount less than 10m native tokens). It works okay with small values, but on chains with a different denom exponent (namely, Rebus, with exponent 18, and probably Evmos (haven't tested it with it, but it should result in a similar error)), when trying to subscribe to that filter, it would result in the following error:
7:52PM ERR Error querying for events err="failed to match against query message.action = '/cosmos.staking.v1beta1.MsgDelegate' AND delegate.amount > 10000000000000000000: got strconv.ParseInt: parsing \"10000000000000000000\": value out of range while trying to parse 10000000000000000000 as int64 (should never happen if the grammar is correct)" module=pubsub server=node
And if you do the same in app (try to create a filter from the following string and use query.Matches() on it, it would result in the error in this app.
What did you expect to happen?
Conversion is done without any errors.
How to reproduce it
- Start a Rebus node (or any other node that has denom exponent 18 or bigger)
- Subscribe via Tendermint Websockets to the updates on the following filter:
message.action = '/cosmos.staking.v1beta1.MsgDelegate' AND delegate.amount > 10000000000000000000 - Check logs and see errors if such transactions would occur, get a message like the one above per each.
Logs
See above
dump_consensus_state output
Anything else we need to know
This is a copy of tendermint/tendermint#9978 which was closed as stale but apparently never fixed.