forked from gnolang/gno
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add file-based transaction indexing (gnolang#546)
# Description This PR introduces file-based transaction indexing. As discussed in gnolang#275, transaction index parsing should be done as a separate process from the main node, meaning other services can be instantiated to index transactions as readers. The general architecture of the transaction indexers in this PR can be described with the following image: <img width="1481" alt="Architecture" src="https://user-images.githubusercontent.com/16712663/221845299-ff552470-8efc-4134-8c3d-e71e74929acc.png"> Each concrete indexer implementation decides how to handle transaction events, and where to store them. Independent processes from the indexers themselves read these events (by parsing files, logs, executing RPC queries...). ## File Indexer The `file` transaction indexer that is included in this PR utilizes `autofile.Group`s to write down transaction events. Users can now specify to use the file-based indexer with the following added flags to the `gnoland` command: - `--tx-indexer-type` - specify the type of indexer (none is default) - `--tx-indexer-path` - path for the file-based tx indexer # Changes include - [ ] Bugfix (non-breaking change that solves an issue) - [ ] Hotfix (change that solves an urgent issue, and requires immediate attention) - [x] New feature (non-breaking change that adds functionality) - [ ] Breaking change (change that is not backwards-compatible and/or changes current functionality) # Checklist (for contributors) - [x] I have assigned this PR to myself - [x] I have added at least 1 reviewer - [x] I have added the relevant labels - [ ] I have updated the official documentation - [x] I have added sufficient documentation in code # Testing - [x] I have tested this code with the official test suite - [x] I have tested this code manually ## Manual tests - Manually executed transactions and verified they were saved to disk. - Added unit tests that cover all added functionality. # Additional comments - [Relevant tendermint2 issue](tendermint/tendermint2#2) - Resolves gnolang#275 EDIT: After comments from @jaekwon, this `Indexer` functionality has been renamed to `EventStore`, and work on an independent indexer process (process that can read from the event store) will begin soon that will offer indexing functionality cc @ilgooz
- Loading branch information
1 parent
7709266
commit 8042f54
Showing
18 changed files
with
865 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.