Skip to content

Conversation

@snormore
Copy link
Contributor

@snormore snormore commented Feb 1, 2026

Summary of Changes

  • Add read-only Go, Python, and TypeScript SDKs for the serviceability, telemetry, and revenue distribution (revdist) onchain programs, each with typed deserialization, RPC clients, PDA derivation, and Rust-generated binary fixture tests for cross-language consistency
  • Add shared borsh-incremental library (Go, Python, TypeScript) providing cursor-based Borsh deserialization with backward-compatible trailing field defaults via tryRead* methods
  • Add enum string types for serviceability enums across all three languages, with a shared enum_strings.json fixture and bidirectional completeness checks to keep variants in sync
  • Add compat tests that deserialize live mainnet accounts via RPC (gated behind env vars)
  • Add CI workflow for SDK tests and npm/PyPI publish workflows for all three programs
  • Add sdk/README.md documenting the testing strategy and how to extend fixtures
  • Closes sdk: python implementation for reading serviceability and telemetry program state #2461

Testing Verification

  • Rust-generated binary fixtures verified by Go, Python, and TypeScript for all account types (serviceability: 12 fixtures, telemetry: 2, revdist: 5)
  • Comprehensive borsh-incremental unit tests: 75 (Go), 114 (Python), 105 (TypeScript)
  • Cross-language enum string fixture tests with bidirectional completeness check
  • PDA derivation tests in all three languages
  • Compat tests pass against live mainnet RPC for serviceability, telemetry, and revdist
  • make sdk-test and make sdk-compat-test pass

@snormore snormore force-pushed the snor/serviceability-telemetry-sdks branch from 87ea711 to adfee07 Compare February 1, 2026 16:12
@snormore snormore marked this pull request as ready for review February 2, 2026 13:55
@snormore snormore force-pushed the snor/serviceability-telemetry-sdks branch 3 times, most recently from 77b5f96 to 0d56ff2 Compare February 3, 2026 17:55
Add convenience constructors that use default program IDs and RPC URLs
for each environment (mainnet-beta, testnet, devnet, localnet):

- Go: NewForEnv(env), NewMainnetBeta(), NewTestnet(), etc.
- Python: Client.from_env(env), Client.mainnet_beta(), etc.
- TypeScript: Client.forEnv(env), Client.mainnetBeta(), etc.

Also adds config.go to revdist Go SDK with ProgramID and RPC URL maps,
and updates serviceability Go constructors to create RPC clients
internally (matching telemetry SDK pattern).
@snormore snormore force-pushed the snor/serviceability-telemetry-sdks branch from 0d56ff2 to 0ea0bb7 Compare February 3, 2026 18:16
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.

sdk: python implementation for reading serviceability and telemetry program state

2 participants