Include full simulation data in compute limit estimation error#27
Merged
lorisleiva merged 2 commits intomainfrom Mar 11, 2026
Merged
Conversation
This PR updates the `SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT` error to include the full simulation result data in its context, matching the shape of the preflight failure error (`Omit<RpcSimulateTransactionResult, 'err'>`). Previously, only `unitsConsumed` (downcast to number) was included. The unitsConsumed field is now passed through as the raw `bigint` from the RPC response — the u64→u32 downcast only applies to the success return path. Bumps `@solana/kit` to `^6.3.0` which ships the updated error context type.
mcintyre94
approved these changes
Mar 11, 2026
Member
mcintyre94
left a comment
There was a problem hiding this comment.
Nice, this error is way more helpful!
lorisleiva
added a commit
to anza-xyz/kit-plugins
that referenced
this pull request
Mar 11, 2026
… ^6.3.0 This updates `@solana-program/compute-budget` from ^0.14.0 to ^0.15.0, which includes full simulation data in the compute limit estimation error context (solana-program/compute-budget#27). The new version requires `@solana/kit` ^6.3.0 as a peer dependency, so all `@solana/kit` references across the monorepo are bumped accordingly. The error context for `SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT` now contains `Omit<RpcSimulateTransactionResult, 'err'>` instead of just `{ unitsConsumed: number }`. The `unitsConsumed` field is now a raw `bigint` from the RPC response rather than a downcast `number`. The RPC executor's skip-preflight recovery path is updated to downcast the bigint to a u32 number, matching the downcast logic on the success path.
lorisleiva
added a commit
to anza-xyz/kit-plugins
that referenced
this pull request
Mar 11, 2026
… ^6.3.0 (#145) This updates `@solana-program/compute-budget` from ^0.14.0 to ^0.15.0, which includes full simulation data in the compute limit estimation error context (solana-program/compute-budget#27). The new version requires `@solana/kit` ^6.3.0 as a peer dependency, so all `@solana/kit` references across the monorepo are bumped accordingly. The error context for `SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT` now contains `Omit<RpcSimulateTransactionResult, 'err'>` instead of just `{ unitsConsumed: number }`. The `unitsConsumed` field is now a raw `bigint` from the RPC response rather than a downcast `number`. The RPC executor's skip-preflight recovery path is updated to downcast the bigint to a u32 number, matching the downcast logic on the success path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates the
SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMITerror to include the full simulation result data in its context, matching the shape of the preflight failure error (Omit<RpcSimulateTransactionResult, 'err'>). Previously, onlyunitsConsumed(downcast to number) was included. The unitsConsumed field is now passed through as the rawbigintfrom the RPC response — the u64→u32 downcast only applies to the success return path. Bumps@solana/kitto^6.3.0which ships the updated error context type.