Repository navigation
Feature/agave - #33
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical issues in simulation handling, cleanup resource validation, and mixed-version compatibility can halt observers, leave funds unreturned, or cause divergent validator state transitions.
7 open issues
Prepare simulation fails before funding withdrawals are created · New Validate signed transaction size before simulation · New Budget durable-nonce prepares for token account creation · New Avoid panicking on transaction validation errors · New Enforce independent resource limits for v1 cleanups · New Coordinate v1 cleanup activation across validators · New Retry transient simulation RPC errors · New
What changed in this PR
Updates Computer’s Solana integration for the v1 transaction format, while retaining support for verifying legacy cleanup transactions.
Changes:
- Builds v1 transactions with simulated resource limits and capped priority fees.
- Adds version-aware wire validation and legacy-compatible cleanup comparison.
- Uses base64 RPC encoding, retries fee queries, and avoids mint collisions in tests.
| File | Description |
|---|---|
solana/system_call.go |
Updates cleanup comparison and validates decoded transactions. |
solana/solana.go |
Separates cleanup construction from version-preserving verification. |
solana/solana_test.go |
Generates a fresh mint account for the creation test. |
solana/request.go |
Adds wire validation for attached post-process transactions. |
solana/observer.go |
Applies wire validation to signed calls before submission. |
apps/solana/transaction.go |
Adds v1 resource estimation, fee calculation, and reusable builders. |
apps/solana/rpc.go |
Adds bounded fee-query retries and base64 transaction encoding. |
apps/solana/common.go |
Adds version-specific size limits and message, signature-slot, and resource validation. |
Review effort: Max
| if err != nil { | ||
| return fmt.Errorf("invalid post call transaction: %v", err) | ||
| } | ||
| err = solanaApp.ValidateWireTransaction(tx) |
| case solana.MessageVersionV0: | ||
| builder.SetVersion(solana.MessageVersionV0) | ||
| case solana.MessageVersionV1: | ||
| builder.SetTransactionConfig(comparison.Message.TransactionConfig) |
Comment on lines
+388
to
+390
| expected = node.createPostProcessTransaction(ctx, main, nonce, nil, nil, actual) | ||
| case store.CallTypePrepare: | ||
| expected = node.CreateRefundWithdrawalTransaction(ctx, call, main, nonce) | ||
| expected = node.createRefundWithdrawalTransaction(ctx, call, main, nonce, actual) |
There was a problem hiding this comment.
🟡 Changes recommended
Cleanup verification compares submitted resource limits against themselves, allowing transactions with insufficient execution budgets to be signed, fail terminally, and leave funds unreturned.
6 open issues
Enforce priority-fee cap for legacy and V0 transactions · New Build expected cleanup limits from deterministic defaults · New Coordinate v1 cleanup activation across validators Enforce independent resource limits for v1 cleanups Avoid panicking on transaction validation errors Add offline tests for V1 cleanup construction and verification · New
4 resolved since last review
Review effort: Max
Comment on lines
+114
to
+116
| if tx.Message.GetVersion() != solana.MessageVersionV1 { | ||
| return nil | ||
| } |
| case solana.MessageVersionV0: | ||
| builder.SetVersion(solana.MessageVersionV0) | ||
| case solana.MessageVersionV1: | ||
| builder.SetTransactionConfig(comparison.Message.TransactionConfig) |
Comment on lines
+667
to
+668
| case solana.MessageVersionV1: | ||
| builder.SetTransactionConfig(comparison.Message.TransactionConfig) |
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.


No description provided.