Closed mrnaveira closed 1 month ago
535 tests - 6 535 :white_check_mark: - 6 1h 39m 38s :stopwatch: - 7m 43s 63 suites ±0 0 :zzz: ±0 2 files ±0 0 :x: ±0
Results for commit 0031ed88. ± Comparison against base commit ad490ae3.
:recycle: This comment has been updated with latest results.
Description
event_scanner
moduleget_non_fungibles
functionality to fetch all non fungibles of a collection from the network on the flyevent_manager
andsubstate_manager
to simplify and properly split them, as a lot of functionality was duplicated and overlapped between the two modules.Motivation and Context
Up until now, the behaviour of the indexer regarding events and substates was:
This PR refactors the indexer behaviour to be more useful:
Regarding the event filtering:
topic
,substate_id
,template_address
andentity_id
. All filter fields are optional. An event will match a filter if all of its fields match the values specified in the filter.entity_id
one can be used when we want to store everything that happens in a particular EntityId no matter the type of substate (component, vault or resource).Regarding the substate storing:
up_substates
field) corresponding to the event we are storing. This is a handy optimization because it avoids a query to the network to fetch the related substate.This PR removes functionality regarding substate monitoring and address watchlist, as now the substate storing is determined by the events.
This PR keeps existing functionality regarding:
get_substate
method. Even if the substate is not stored in the database, the indexer will try to fetch it from the network.get_non_fungibles
method. This functionality requires to fetch the non fungibles from the network on the fly, as currently we don't emit the proper events regarding NFT minting. Even if we do in a future, we would need to account for NFT burning (thus deleting the substate from the database in that case)How Has This Been Tested?
Manually by:
tari_swarm
.event_filters
configurations in the indexer.What process can a PR reviewer use to test or verify this change?
See previous section.
Breaking Changes