Skip to content

device/telemetry: lower batch size to be within transaction size limit#882

Merged
snormore merged 1 commit into
mainfrom
snor/sdk-telem-batch-size-245
Jul 22, 2025
Merged

device/telemetry: lower batch size to be within transaction size limit#882
snormore merged 1 commit into
mainfrom
snor/sdk-telem-batch-size-245

Conversation

@snormore
Copy link
Copy Markdown
Contributor

Summary of Changes

Testing Verification

  • Added e2e test coverage for Go SDK submitting samples at the batch limit and 1 over the batch limit

@snormore snormore requested a review from Copilot July 21, 2025 16:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR reduces the device telemetry batch size from 2560 to 245 samples to comply with Solana's transaction size limits based on IPv6 MTU constraints. The change ensures transactions stay within the 1232-byte packet data limit after accounting for headers.

  • Updated MaxSamplesPerBatch constant from a calculated value based on data increase limits to a hardcoded 245 samples (980 bytes)
  • Added comprehensive e2e tests to verify the new batch limit works and exceeding it fails appropriately
  • Updated existing unit tests to reflect the new batch size calculations

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
smartcontract/sdk/go/telemetry/constants.go Updated MaxSamplesPerBatch constant and added detailed documentation explaining the IPv6 MTU size constraint
e2e/sdk_telemetry_test.go Added e2e tests for maximum batch size and over-limit failure scenarios
controlplane/telemetry/internal/telemetry/submitter_test.go Updated test assertions to match new batch size calculations

Comment thread smartcontract/sdk/go/telemetry/constants.go
@snormore snormore requested a review from a team July 21, 2025 16:32
@snormore snormore force-pushed the snor/sdk-telem-batch-size-245 branch 2 times, most recently from ff5b9c7 to 522b42c Compare July 21, 2025 17:50
@snormore snormore force-pushed the snor/sdk-telem-batch-size-245 branch from 522b42c to 4561217 Compare July 22, 2025 00:21
@snormore snormore merged commit f32866b into main Jul 22, 2025
14 checks passed
@snormore snormore deleted the snor/sdk-telem-batch-size-245 branch July 22, 2025 13:54
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.

device/telemetry: failing with transaction too large after running out of funds

3 participants