Skip to content

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

Closed

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()

Activity

  1. added
    bug
    needs-triage
    on Jul 2, 2024
  2. added a commit that references this issue on Jul 9, 2024
    a3ec97e
  3. added 2 commits that reference this issue on Jul 9, 2024
    e465cab
    2ccba79
  4. added 2 commits that reference this issue on Jul 9, 2024
    a1b6c68
    a095cb8
  5. removed
    needs-triage
    on Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions