Skip to content

hotfix: (PRO-639) Fix big transaction causing error when using v0 tra…#297

Merged
dev-jodee merged 1 commit intomainfrom
hotfix/PRO-639-bugfix-estimate-fee-for-message-big-transaction
Jan 12, 2026
Merged

hotfix: (PRO-639) Fix big transaction causing error when using v0 tra…#297
dev-jodee merged 1 commit intomainfrom
hotfix/PRO-639-bugfix-estimate-fee-for-message-big-transaction

Conversation

@dev-jodee
Copy link
Contributor

@dev-jodee dev-jodee commented Jan 12, 2026

…nsaction

  • Used to have an issue with agave validator that would not properly serialized, this seems to be resolved, so we can now use the function directly, which fixes transaction too big error when trying to manually serialize it

Important

Fixes transaction too big error by directly using v0_message in get_estimate_fee_resolved() in fee.rs, removing a workaround for Agave validator serialization issue.

  • Behavior:
    • Fixes transaction too big error by directly using v0_message in get_estimate_fee_resolved() in fee.rs.
    • Removes workaround for Agave validator serialization issue.
  • Code Simplification:
    • Removes creation of legacy message for VersionedMessage::V0 in get_estimate_fee_resolved().
  • Imports:
    • Removes unused import of Message from solana_message.

This description was created by Ellipsis for b805a49. You can customize this summary. It will automatically update as commits are pushed.

📊 Unit Test Coverage

Coverage

Unit Test Coverage: 80.7%

View Detailed Coverage Report

…nsaction

- Used to have an issue with agave validator that would not properly serialized, this seems to be resolved, so we can now use the function directly, which fixes transaction too big error when trying to manually serialize it
@dev-jodee dev-jodee requested a review from amilz January 12, 2026 15:44
@linear
Copy link

linear bot commented Jan 12, 2026

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to b805a49 in 1 minute and 5 seconds. Click for details.
  • Reviewed 35 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. crates/lib/src/fee/fee.rs:15
  • Draft comment:
    Removed unused import 'solana_message::Message'.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. crates/lib/src/fee/fee.rs:498
  • Draft comment:
    Directly calling get_fee_for_message for V0 messages removes the manual serialization workaround. Ensure this fits with the now-fixed agave validator behavior.
  • Reason this comment was not posted:
    Confidence changes required: 10% <= threshold 50% None

Workflow ID: wflow_aGgNKzrlSANOVhle

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 12, 2026

Greptile Overview

Greptile Summary

This PR removes a workaround for handling V0 transactions with address lookup tables in fee estimation. Previously, the code converted V0 messages to legacy format with resolved account keys before calling get_fee_for_message() to avoid serialization issues with the Agave validator. According to the PR description, this issue has been resolved upstream, allowing direct use of V0 messages.

Changes Made

  • Simplified V0 fee estimation: Removed the manual conversion of V0 messages to legacy format with resolved addresses
  • Direct RPC call: Now passes V0 messages directly to rpc_client.get_fee_for_message(v0_message)
  • Cleanup: Removed unused solana_message::Message import that was only needed for the workaround

Impact Analysis

The change affects the get_estimate_fee_resolved() function which is called in two places:

  1. estimate_transaction_fee() - Used for calculating total fee including Kora signature fees and payment instructions
  2. sign_transaction() in versioned_transaction.rs - Used for validating transaction fees before signing

The codebase has existing tests for V0 transactions with lookup tables (e.g., payment_address_v0_lut_tests.rs) that would validate this functionality continues to work correctly.

Confidence Score: 4/5

  • This PR is safe to merge with proper testing validation
  • The change simplifies fee estimation logic by removing a workaround that is no longer needed. The modification is well-scoped and straightforward - replacing manual V0-to-legacy conversion with direct V0 message handling. However, the score is 4 (not 5) because this change depends on an upstream fix that should be validated through integration tests before deployment to ensure the Agave validator properly handles V0 message serialization in all environments.
  • No files require special attention - the change is isolated and straightforward

Important Files Changed

File Analysis

Filename Score Overview
crates/lib/src/fee/fee.rs 4/5 Simplified V0 transaction fee estimation by removing workaround that converted V0 messages to legacy format. Now directly passes V0 messages to RPC client's get_fee_for_message(). Also removed unused import of solana_message::Message.

Sequence Diagram

sequenceDiagram
    participant Client
    participant RPC as RPC Method
    participant FeeUtil as TransactionFeeUtil
    participant RPCClient as Solana RPC Client
    
    Client->>RPC: Request fee estimation
    RPC->>FeeUtil: get_estimate_fee_resolved(resolved_transaction)
    
    alt Legacy Transaction
        FeeUtil->>RPCClient: get_fee_for_message(legacy_message)
        RPCClient-->>FeeUtil: fee (u64)
    else V0 Transaction (NEW)
        FeeUtil->>RPCClient: get_fee_for_message(v0_message)
        Note over FeeUtil,RPCClient: Direct call without workaround
        RPCClient-->>FeeUtil: fee (u64)
    end
    
    FeeUtil-->>RPC: fee estimate
    RPC-->>Client: fee response
Loading

@dev-jodee dev-jodee merged commit 36970d8 into main Jan 12, 2026
10 checks passed
@dev-jodee dev-jodee deleted the hotfix/PRO-639-bugfix-estimate-fee-for-message-big-transaction branch January 12, 2026 16:55
dev-jodee added a commit that referenced this pull request Jan 12, 2026
…nsaction (#297)

- Used to have an issue with agave validator that would not properly serialized, this seems to be resolved, so we can now use the function directly, which fixes transaction too big error when trying to manually serialize it

Co-authored-by: Jo D <dev-jodee@users.noreply.github.com>
This was referenced Jan 12, 2026
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.

2 participants