[GraphQL/DataLoader] Transaction DataLoader
Description
Implement Transaction DataLoader using the tx_digests lookaside table to translate digests into a checkpoint and transaction sequence number that can be used to query into the partitioned transactions table without having to query each partition.
Test plan
sui$ cargo nextest run
sui-graphql-e2e-tests$ cargo nextest run --features pg_integration
And run the following query, which should perform better after this optimisation:
query {
objects(first: 10) {
nodes {
previousTransactionBlock {
effects {
status
dependencies(first: 10) {
nodes {
digest
effects {
status
dependencies(first: 10) {
nodes {
effects {
status
}
}
}
}
}
}
}
}
}
}
}
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| sui-docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 8, 2024 5:36pm |
4 Ignored Deployments
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| explorer | ⬜️ Ignored (Inspect) | May 8, 2024 5:36pm | ||
| multisig-toolkit | ⬜️ Ignored (Inspect) | Visit Preview | May 8, 2024 5:36pm | |
| sui-kiosk | ⬜️ Ignored (Inspect) | Visit Preview | May 8, 2024 5:36pm | |
| sui-typescript-docs | ⬜️ Ignored (Inspect) | Visit Preview | May 8, 2024 5:36pm |
@gegaowp, I rebased your idx_tx_digests commit in order to base this PR off of it. Let me know what the right protocol is for landing that (we can split it back out, or land it together with this change, or whatever you like).
Additionally, there are probably some tweaks we want to make to that commit (like changing the column names to be consistent with other transaction tables), so let me know the best way to handle those as well.
The failure around epoch_test_data seems to be from me messing up the rebase of the underlying indexer work -- I needed to do the rebase to pick up the changes around background task and CheckpointViewedAt, so will wait to address this issue to hear from @gegaowp on how to deal with the interplay.
This PR is now ready for review!