-
Notifications
You must be signed in to change notification settings - Fork 33
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
[Peristence] Fix TxIndexer
to index sender and recipient transactions with height and index suffixes
#677
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a naming change.
Good job on the smaller PRs btw. There's a time and place for small iterative once and a time and place for small once, and I think you've found the balance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing changelog in module: persistence/
Changelog verification failed. See error messages for more detail.
Please update the relevant CHANGELOG.md files and ensure they follow the correct format.
The check succeeded, dismissing the review comment.
* refactor/consolidate-p2p-modules: chore: update changelog switch to new dns introduced with helm charts [Consensus] Log warnings if server module is not enabled (#679) chore: update changelog add generated helm docs chore: update validator chart P2P hostname config chore: remove `use_libp2p` from validator chart [Peristence] Fix `TxIndexer` to index sender and recipient transactions with height and index suffixes (#677) Update e2e/docs/CHANGELOG.md (#681) Update devlog5.md (#672) [Infra] validator helm chart for LocalNet (#658) Update issue.md
* refactor/consolidate-p2p-modules: chore: update changelog switch to new dns introduced with helm charts [Consensus] Log warnings if server module is not enabled (#679) chore: update changelog add generated helm docs chore: update validator chart P2P hostname config chore: remove `use_libp2p` from validator chart [Peristence] Fix `TxIndexer` to index sender and recipient transactions with height and index suffixes (#677) Update e2e/docs/CHANGELOG.md (#681) Update devlog5.md (#672) [Infra] validator helm chart for LocalNet (#658) Update issue.md
## Description This PR aims to build out the RPC specification to have parity (not backwards compatability) with the V0 RPC specification. The OpenAPI YAML spec can be viewed [here](https://editor.swagger.io/?url=https://raw.githubusercontent.com/pokt-network/pocket/rpc-spec-parity/rpc/v1/openapi.yaml). This compares to the V0 spec which can be viewed [here](https://editor.swagger.io/?url=https://raw.githubusercontent.com/pokt-network/pocket-core/staging/doc/specs/rpc-spec.yaml) The CLI endpoints for the `v1/query` endpoints have also been implemented  Not only does this PR build out the specification but it also implements some new functionalities, laid out in the changes section below. Some have already been covered in the PRs #676 and #677 ## Issue Fixes #628 ## Type of change Please mark the relevant option(s): - [x] New feature, functionality or library - [ ] Bug fix - [x] Code health or cleanup - [ ] Major breaking change - [x] Documentation - [ ] Other ## List of changes - Add `networkId` and `timestamp` fields to the block - Ability to query the mempool for transactions yet to be commited to a block - Move the `utility/types/errors.go` file to `shared/core/types/errors.go` to be used throughout the codebase - Expose NO-OP functions for future implementation - Add Protobuf files for Sessions, Relays and Challenges for future implementations - Build out a functional RPC server and specification with CLI endpoints ## Testing - [x] `make develop_test`; if any code changes were made - [x] [Docker Compose LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md); if any major functionality was changed or introduced - [ ] [k8s LocalNet](https://github.com/pokt-network/pocket/blob/main/build/localnet/README.md); if any infrastructure or configuration changes were made ## Required Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have added, or updated, [`godoc` format comments](https://go.dev/blog/godoc) on touched members (see: [tip.golang.org/doc/comment](https://tip.golang.org/doc/comment)) - [x] I have tested my changes using the available tooling - [x] I have updated the corresponding CHANGELOG ### If Applicable Checklist - [ ] I have updated the corresponding README(s); local and/or global - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have added, or updated, [mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding README(s) - [ ] I have added, or updated, documentation and [mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*` if I updated `shared/*`README(s) --------- Co-authored-by: Daniel Olshansky <[email protected]> Co-authored-by: Daniel Olshansky <[email protected]>
Description
This PR fixes the
TxIndexer
so that it can index multiple transactions by sender and recipient instead of simply overwriting the previous transaction.By adding the height and index of the index as a suffix to the key when storing the transaction bytes in the TxIndexer KVStore, we can now query all transactions sent or received by a specific address, through the TxIndexer.
Issue
Fixes N/A
Type of change
Please mark the relevant option(s):
List of changes
Testing
make develop_test
; if any code changes were madeRequired Checklist
godoc
format comments on touched members (see: tip.golang.org/doc/comment)If Applicable Checklist
shared/docs/*
if I updatedshared/*
README(s)