Skip to content

KV search by events ignores second height parameter if there is a event parameter #1435

@kstoykov

Description

@kstoykov

Bug Report

Setup

CometBFT version: v0.37.2

Have you tried the latest version: no, but based on the code, the bug should be reproducible in the newest version as well.

Environment:

  • OS: Ubuntu 22.04

What happened?

I'm trying to query transactions using txSearch. I'm using three parameter: tx.height >= X AND tx.height <= Y and event.key = value. In this case the second tx.height is ignored. If event.key=value is missing then both tx.height params are respected.

What did you expect to happen?

The query should respect all of the parameters.

How to reproduce it

Add two transactions to the indexer. One should be at height X and the other - at height Y. Let's both transactions have an event with key "account" and value "number" equals "1". Making a query tx.height >= X AND tx.height <= Y-1 and account.number = 1 MUST return only the transaction at height X but now it returns both transactions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingindexer

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions