Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

txindex v0.37.x: Enable the indexer to parse slashes in query #382

Merged
merged 7 commits into from
Feb 25, 2023

Conversation

jmalicevic
Copy link
Contributor

@jmalicevic jmalicevic commented Feb 24, 2023

The transaction indexer indexes transaction events by creating a custom key containing the following:

  • event attribute key
  • event attribute value
  • txresult
  • height
  • event sequence

These elements are separated with a '/'. This however causes problems when the value (over which we have no control), contains a '/' . This PR fixes this by making sure to isolate the element containing the value.

The code was tested for backwards compatibility, making sure we can parse events indexed with older versions of Tendermint (without this fix).


PR checklist

  • Tests written/updated
  • Changelog entry added in .changelog (we use unclog to manage our changelog)
  • Updated relevant documentation (docs/ or spec/) and code comments

@jmalicevic jmalicevic self-assigned this Feb 24, 2023
@jmalicevic jmalicevic marked this pull request as ready for review February 24, 2023 11:58
@jmalicevic jmalicevic requested a review from a team as a code owner February 24, 2023 11:58
@jmalicevic jmalicevic changed the title txindex: Enable the indexer to parse slashes in query txindex v0.37.x: Enable the indexer to parse slashes in query Feb 24, 2023
state/txindex/kv/kv.go Outdated Show resolved Hide resolved
…g.md

Co-authored-by: Thane Thomson <connect@thanethomson.com>
@jmalicevic jmalicevic merged commit c676b8a into v0.37.x Feb 25, 2023
@jmalicevic jmalicevic deleted the jasmina/kvindex-slash-parsing-0.37 branch February 25, 2023 12:07
jmalicevic added a commit that referenced this pull request Feb 28, 2023
* txindexer handles slashes in event value


* Update .changelog/unreleased/bug-fixes/382-txindexer-fix-slash-parsing.md

Co-authored-by: Thane Thomson <connect@thanethomson.com>

---------

Co-authored-by: Thane Thomson <connect@thanethomson.com>
jmalicevic added a commit that referenced this pull request Mar 21, 2023
* v0.37.x:state/kvindexer: port 0.34 query fix (#77)
Backport of #77 from 0.37 and #382 to handle slashes
* state/kvindexer: associate event attributes with events (#9759)
* By event search is now default behaviour. Including fixes from PRs added to 0.34

---------

Co-authored-by: Lasaro <lasaro@gmail.com>
Co-authored-by: Thane Thomson <connect@thanethomson.com>
Co-authored-by: Sergio Mena <sergio@informal.systems>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants