Skip to content

perf: batch /v2/jettons enrichment into GetJettonMasters, resolve offset pagination via storage - #945

Merged
hsslbchtop merged 1 commit into
masterfrom
jettons-slice-ctx-error-20260813-183836
Aug 15, 2026
Merged

hsslbchtop merged 1 commit into
masterfrom
jettons-slice-ctx-error-20260813-183836

Conversation

@hsslbchtop

Copy link
Copy Markdown
Contributor

Summary

  • Eliminates per-item N+1 lookups in GetJettons/GetJettonInfosByAddresses (metadata, interfaces, scaled-UI, raw account) by relying on a single batched GetJettonMasters/GetJettonMastersByAddresses query on the storage side (see the companion tonapi2 PR).
  • JettonMaster.Enriched is now a *JettonMasterRich pointer (Metadata, Interfaces, ScaledUI) instead of a bare bool plus three flat fields, so "not enriched" is just nil rather than a bool you have to remember to check alongside three other fields.
  • Offset-based /v2/jettons pagination is served through a plain storage.GetJettonMastersByOffset method instead of a separate jettonMastersOffsetSource/WithJettonMastersOffsetSource indirection.

Test plan

  • go build ./...
  • go vet ./...
  • Deployed together with the companion tonapi2 change to dev and exercised /v2/jettons (cursor and offset) and /v2/jettons/_bulk

@hsslbchtop
hsslbchtop merged commit 78e9e55 into master Aug 15, 2026
1 check passed
@hsslbchtop
hsslbchtop deleted the jettons-slice-ctx-error-20260813-183836 branch August 15, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants