-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat(indexer): new JRPC method to list substates #1049
Merged
sdbondi
merged 12 commits into
tari-project:development
from
mrnaveira:indexer-list-substates
Jun 19, 2024
Merged
feat(indexer): new JRPC method to list substates #1049
sdbondi
merged 12 commits into
tari-project:development
from
mrnaveira:indexer-list-substates
Jun 19, 2024
Conversation
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
LGTM - looks like a graphQL test is missing the timestamp field or it should be optional |
sdbondi
approved these changes
Jun 19, 2024
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.
utACK
Merged
via the queue into
tari-project:development
with commit Jun 19, 2024
03a72be
11 checks passed
3 tasks
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jun 24, 2024
Description --- * Unified the `SubstateType` enum (duplicated in both the wallet daemon and the indexer) into the `tari_dan_common_types` crate * Updated the indexer JRPC client to include the `list_substates` method * Updated the `substates.list` JRPC method in the wallet daemon to proxy the call to the corresponding method in the indexer. The request type now includes pagination support (offset + limit) but the resulting type (`WalletSubstateRecord`) was kept the same for now to avoid conflicts with existing applications. * Updated bindings for the substate type and the new pagination options for the wallet daemon substate listing Motivation and Context --- On #1049 we added a new indexer JRPC method for listing substates. The indexer substate listing is more advanced than the one in the wallet daemon: * Is capable of indexing all the network while the wallet only stores substates related to its own account's transactions * Supports pagination (limit + offset fields) This PR changes the `substates.list` JRPC method in the wallet daemon to proxy the call to the corresponding method in the indexer. It also adds pagination support. How Has This Been Tested? --- Manually by: * Spawning a local network with `tari_swarm` * Doing transactions to generate substates * Query the `substates.list` JRPC in the wallet daemon and inspecting the results What process can a PR reviewer use to test or verify this change? --- See previous sections Breaking Changes --- - [x] None - [ ] Requires data directory to be deleted - [ ] Other - Please specify
sdbondi
pushed a commit
to tari-project/tari-snap
that referenced
this pull request
Jun 25, 2024
After tari-project/tari-dan#1049 we now have a way to list substates via the indexer. This PR adds a new snap method `listSubstates` that proxies the call to the underlying indexer.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
template_address
,module_name
andtimestamp
to thesubstates
SQLite table.timestamp
to theevents
SQLite table. For now it's populated but not used by any method yet.event_scanner
fetches and stores in database the values for all the new fields in substates and eventslist_substates
event_manager
, it's all now done only on theevent_scanner
and controlled by the event filter in the indexer configMotivation and Context
On #1043 we refactored the Indexer to automatically store all substates related to events. This PR follows on that work and adds a new JRPC method
list_substates
that allows to fetch and filter all the substates stored in the Indexer database. It also adds some metadata (template_address
,module_name
,timestamp
) to substates.The new method JRPC method
list_substates
has the following optional parameters:"Component"
,"Resource"
,"Vault"
,"UnclaimedConfidentialOutput"
,"NonFungible",
"TransactionReceipt"
and"FeeClaim"
How Has This Been Tested?
Manually by:
tari_swarm
list_substate
methodWhat process can a PR reviewer use to test or verify this change?
See previous section
Breaking Changes