Skip to content

refactor(decoders): port serum layout to kit codecs and drop @project-serum/serum - #1393

Merged
Woody4618 merged 3 commits into
masterfrom
refactor/HOO-1309-kit-vendored-decoders
Oct 13, 2026
Merged

Woody4618 merged 3 commits into
masterfrom
refactor/HOO-1309-kit-vendored-decoders

Conversation

@amilz

@amilz amilz commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator
  • Use Kit for serum & mango decoders
  • Drops @project-serum/serum, bn.js, and @types/bn.js from the package

The Mango commit replaces a hand-rolled DataView read of the u32 discriminator with getU32Decoder(). Mango's legacy client was removed in #1087, so this is the only remaining part of that ticket.

Type of change

  • Bug fix
  • New feature
  • Protocol integration
  • Documentation update
  • Other (please describe): web3.js-to-kit migration, dependency removal (2.8a & 2.8b)

Closes HOO-1309 HOO-1310

amilz added 2 commits October 12, 2026 13:40
Replace @project-serum/serum's decodeInstruction with a kit-codec port of
its INSTRUCTION_LAYOUT and drop the serum, bn.js and @types/bn.js deps.
Test fixtures are the library's encoded bytes frozen as hex.

Refs HOO-1309
@amilz amilz self-assigned this Oct 12, 2026
@linear

linear Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

HOO-1310

HOO-1309

@vercel

vercel Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
explorer Ready Ready Preview Oct 12, 2026 9:34pm UTC

Request Review

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

📦 Bundle change vs master

6 changed · 0 added · 0 removed

Route Size First Load JS
/address/[address] 470 kB → 450 kB 890 kB → 910 kB
/block/[slot] 170 kB 590 kB → 610 kB
/block/[slot]/rewards 160 kB 580 kB → 600 kB
/tx/[signature] 470 kB 900 kB → 920 kB
/tx/[signature]/inspect 450 kB 890 kB → 910 kB
/tx/inspector 450 kB 890 kB → 910 kB
Full route table (fresh build)

Gzipped first-load sizes from .next/diagnostics/route-bundle-stats.json, rounded to reduce noise; a cell keeps its previous value while fresh bytes round within one step of it. Size is First Load JS minus the chunks shared by all routes; routes with no client JS show —.

Type Route Size First Load JS
Static / 140 kB 570 kB
Static /_not-found 0 B 450 kB
Dynamic /address/[address] 450 kB 910 kB
Dynamic /address/[address]/account-data 460 kB 900 kB
Dynamic /address/[address]/anchor-account 420 kB 870 kB
Dynamic /address/[address]/attestation 420 kB 870 kB
Dynamic /address/[address]/attributes 420 kB 870 kB
Dynamic /address/[address]/blockhashes 420 kB 870 kB
Dynamic /address/[address]/compression 420 kB 870 kB
Dynamic /address/[address]/concurrent-merkle-tree 420 kB 870 kB
Dynamic /address/[address]/domains 420 kB 870 kB
Dynamic /address/[address]/entries 420 kB 870 kB
Dynamic /address/[address]/feature-gate 420 kB 870 kB
Dynamic /address/[address]/idl 530 kB 970 kB
Dynamic /address/[address]/instructions 430 kB 880 kB
Dynamic /address/[address]/metadata 420 kB 870 kB
Dynamic /address/[address]/nftoken-collection-nfts 420 kB 870 kB
Dynamic /address/[address]/program-multisig 420 kB 870 kB
Dynamic /address/[address]/rewards 420 kB 870 kB
Dynamic /address/[address]/security 420 kB 860 kB
Dynamic /address/[address]/slot-hashes 420 kB 870 kB
Dynamic /address/[address]/stake-history 420 kB 870 kB
Dynamic /address/[address]/subscriptions 420 kB 870 kB
Dynamic /address/[address]/token-extensions 420 kB 860 kB
Dynamic /address/[address]/tokens 430 kB 870 kB
Dynamic /address/[address]/transfers 430 kB 880 kB
Dynamic /address/[address]/verified-build 420 kB 860 kB
Dynamic /address/[address]/vote-history 420 kB 870 kB
Dynamic /api/ans-domains/[address] — —
Dynamic /api/domain-info/[domain] — —
Dynamic /api/geo-location — —
Dynamic /api/idl-latest — —
Dynamic /api/log-drain — —
Dynamic /api/metadata/proxy — —
Dynamic /api/ping/[network] — —
Dynamic /api/search — —
Dynamic /api/security-txt — —
Dynamic /api/slot-time — —
Dynamic /api/sns-domains/[address] — —
Dynamic /api/stake-rewards/[address] — —
Dynamic /api/supply — —
Dynamic /api/token-image/[mintAddress] — —
Dynamic /api/token-info — —
Dynamic /api/token-market-data/[address] — —
Dynamic /api/token-price/[mintAddress] — —
Dynamic /api/verification/coingecko/[address] — —
Dynamic /api/verification/jupiter/[mintAddress] — —
Dynamic /api/verification/rugcheck/[mintAddress] — —
Dynamic /block/[slot] 170 kB 610 kB
Dynamic /block/[slot]/accounts 150 kB 590 kB
Dynamic /block/[slot]/programs 140 kB 590 kB
Dynamic /block/[slot]/rewards 160 kB 600 kB
Dynamic /epoch/[epoch] 20 kB 460 kB
Static /feature-gates 50 kB 490 kB
Dynamic /mcp — —
Static /mcp/start 30 kB 470 kB
Dynamic /og/feature-gate/[address] — —
Dynamic /og/receipt/[signature] — —
Dynamic /og/tx/[signature] — —
Static /opengraph-image.png — —
Dynamic /robots.txt — —
Static /tos 10 kB 460 kB
Dynamic /tx/[signature] 470 kB 920 kB
Dynamic /tx/[signature]/inspect 450 kB 910 kB
Static /tx/inspector 450 kB 910 kB

@greptile-apps

greptile-apps Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High impact] The changes since the previous review appear safe to merge.

Summary

The PR replaces Serum’s instruction layouts with Kit decoders, uses native bigint values, and removes the old Serum dependencies.

  • The Explorer decodes Serum instructions with Kit codecs.
  • Mango instruction names use Kit to read their code.

Reviews (2) · Last reviewed commit: "chore(bench): refresh BUILD.md" · Reviewed by Greptile

@Woody4618
Woody4618 added this pull request to the merge queue Oct 13, 2026
Merged via the queue into master with commit 69409ef Oct 13, 2026
16 checks passed
@Woody4618
Woody4618 deleted the refactor/HOO-1309-kit-vendored-decoders branch October 13, 2026 14:40

This branch was successfully deployed

1 active deployment
Preview — 7aab5096 Deployed Oct 12, 2026 by vercel[bot]
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.

3 participants