Skip to content

Fix querying events with dash(-) in their name #3401

@Lockwarr

Description

@Lockwarr

Bug Report

Setup

CometBFT version: v0.38 line (tested with v0.38.7)

Have you tried the latest version: yes

ABCI app (name for built-in, URL for self-written if it's publicly available):

Environment:

  • OS (e.g. from /etc/os-release): ubuntu 22.04
  • Install tools:
  • Others:

node command runtime flags:

Config

What happened?

Started a cosmos-sdk chain with sdk50 + latest cometbft on a local instance.
Tried to query events whose name contains - and got an error that it's invalid input.
It was working fine in previous versions so I suspect this was introduced with the new changes in libs/pubsub/query/syntax/scanner.go

What did you expect to happen?

I expect queries on events that have worked in the past to stay working

How to reproduce it

Start a chain and try to query any event whose name contains -
binary q txs --query "any-event-with-dash.failing=...."

Logs

failed to search for txs: error in json rpc client, with http response metadata: (Status: 200 OK, Protocol HTTP/1.1). RPC error -32603 - Internal error: offset 4: invalid input - at offset 5

Anything else we need to know

I think this can be a quick fix but not sure if - is not supported on purpose for some unknown to me reason.
Maybe add - as an option in libs/pubsub/query/syntax/scanner.go -> isTagRune()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions