Skip to content

sdk: migrate all Go consumers to new serviceability SDK and remove old one#2777

Draft
snormore wants to merge 24 commits intomainfrom
snor/migrate-to-new-serviceability-sdk
Draft

sdk: migrate all Go consumers to new serviceability SDK and remove old one#2777
snormore wants to merge 24 commits intomainfrom
snor/migrate-to-new-serviceability-sdk

Conversation

@snormore
Copy link
Contributor

@snormore snormore commented Feb 1, 2026

Summary of Changes

  • Migrate all Go consumers (75+ files across controlplane, telemetry, client, e2e, examples) from the old serviceability SDK (smartcontract/sdk/go/serviceability) to the new read-only SDK (sdk/serviceability/go)
  • Remove the old serviceability SDK entirely (3,800+ lines): client, executor, deserializer, state types, InfluxDB helpers, and all tests
  • Move ToLineProtocol InfluxDB helper into controlplane/monitor/internal/serviceability since the new SDK is read-only
  • Add ProgramDataProvider interface and IsDrained()/IsHardDrained() methods to the new SDK to support consumers that need them
  • Adapt to new SDK API differences: ProgramConfig as pointer, ConfigGlobalConfig, field renames (TunnelTunnelBlockDeviceTunnelBlock, Local_asnLocalASN), removed statuses (*Suspended*Deleting)

Testing Verification

  • Unit tests passing for all migrated packages
  • E2E tests passing

@snormore snormore force-pushed the snor/serviceability-telemetry-sdks branch 2 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).
Move ToLineProtocol into monitor's internal serviceability package since
the new SDK is read-only and doesn't include InfluxDB helpers.
@snormore snormore force-pushed the snor/migrate-to-new-serviceability-sdk branch from ffccd30 to 45c36c5 Compare February 3, 2026 18:16
@snormore snormore force-pushed the snor/serviceability-telemetry-sdks branch 2 times, most recently from 8ab0cd6 to 3bf2ac2 Compare February 4, 2026 18:27
Base automatically changed from snor/serviceability-telemetry-sdks to main February 5, 2026 17:23
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.

1 participant