Closed grao1991 closed 2 weeks ago
This looks really good! Did we test this? Also don't forget to deploy before merging. For testing, maybe @rtso and @yuunlimm can help? We should at least compare the before and after, but it could also be a great case for an integration test looking for diffs.
This looks really good! Did we test this? Also don't forget to deploy before merging. For testing, maybe @rtso and @yuunlimm can help? We should at least compare the before and after, but it could also be a great case for an integration test looking for diffs.
I don't have a good way to get a full coverage for everything. I only manually sampled some rows and didn't see any difference before and after.
The general code structure looks good to me, but I'm hesitant to stamp this until we do adequate testing because it's such a big change. We can either write some integration tests (@yuunlimm or @larry-aptos do either of you have bandwidth to write these tests?) or we can deploy to devnet and manually check each resource is indexed.
Rebased my PR on top of tests. PTAL @rtso @yuunlimm @larry-aptos
This PR is trying to move some common logic/type/constant to resources.rs, avoid duplicate/unnecessary parsing/deserialization logic when converting between generic write resource and a specific resource type.
The main motivation is to improve the performance, no other behavior change is expected. To give an idea on the performance impact, when running simple token minting workload, the processing time of token_v2_processor is 5x less than before.
This PR only handles FA and TokenV2 resources, leave other resources like Coin and Token for future PRs.