Skip to content

feat(rpc): impl getProgramAccounts#1267

Draft
prestonsn wants to merge 8 commits intoprestonsn/impl-get-account-info-for-db-twofrom
prestonsn/impl-get-program-accounts
Draft

feat(rpc): impl getProgramAccounts#1267
prestonsn wants to merge 8 commits intoprestonsn/impl-get-account-info-for-db-twofrom
prestonsn/impl-get-program-accounts

Conversation

@prestonsn
Copy link
Contributor

No description provided.

- Add filters.zig with RpcFilterType (dataSize, memcmp, tokenAccountState),
  JSON parsing, validation, and runtime matching against account data
- Define GetProgramAccounts param struct with config options
  (filters, encoding, dataSlice, commitment, withContext, sortResults)
- Make ACCOUNT_INITIALIZED_INDEX public for use in tokenAccountState filter
- add initial getByOwner query
- initial iterator impl
@prestonsn prestonsn self-assigned this Feb 27, 2026
@github-project-automation github-project-automation bot moved this to 🏗 In progress in Sig Feb 27, 2026
@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

❌ Patch coverage is 85.26786% with 33 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/accountsdb/two/Unrooted.zig 0.00% 20 Missing ⚠️
src/accountsdb/two/Rooted.zig 14.28% 6 Missing ⚠️
src/accountsdb/two/Two.zig 0.00% 4 Missing ⚠️
src/rpc/methods.zig 0.00% 3 Missing ⚠️
Files with missing lines Coverage Δ
src/rpc/account_codec/lib.zig 80.83% <ø> (-0.12%) ⬇️
src/rpc/account_codec/parse_token.zig 100.00% <ø> (ø)
src/rpc/filters.zig 100.00% <100.00%> (ø)
src/rpc/server/basic.zig 70.49% <100.00%> (+1.92%) ⬆️
src/rpc/server/server.zig 97.89% <100.00%> (+<0.01%) ⬆️
src/rpc/methods.zig 75.43% <0.00%> (-5.70%) ⬇️
src/accountsdb/two/Two.zig 96.73% <0.00%> (-2.60%) ⬇️
src/accountsdb/two/Rooted.zig 91.71% <14.28%> (-3.35%) ⬇️
src/accountsdb/two/Unrooted.zig 81.81% <0.00%> (-18.19%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…IENT.

Pass owner as *const Pubkey instead of by value so the data isn't a
stack copy. Lets us keep SQLITE_STATIC and avoids a zig compiler bug
where SQLITE_TRANSIENT (a sentinal func. ptr case from -1) fails
alightment chcks on aarch64.
…e diagnostics

Move query.deinit() from defer to explicit call after iteration loops
complete, preventing potential use-after-free during encoding/sort.
Replace direct .unowned_allocation field access with diagnostic switches
that produce clear panic messages naming the exact loop (rooted/unrooted)
if an unexpected AccountDataHandle variant is encountered.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

1 participant