Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solana: Fix logic error in Inbox release process #336

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Commits on May 9, 2024

  1. solana: Fix logic error in Inbox release process

    There are a few suspicious aspects of the inbox release logic:
    1. `release_inbound_unlock` takes a flag that determines whether a
       `false` result from `try_release` should cause an error. The flag
       indicates that it should revert on delay. However, `try_release` can
       also return `false` when a transaction has not been approved. If the
       flag is set, the transaction will not return an error when a user
       tries to release a transaction that is not approved even though
       whether a transaction is approved has nothing to do with its expected
       behaviour when it is delayed
    2. The custom error TransferNotApproved is defined but unused
    
    Taken together, I believe `try_release()` should revert with the
    TransferNotApproved error. This would disambiguate the various 'false'
    results and provide more intuitive behaviour when a user tries to
    release a transaction that is not approved.
    johnsaigle committed May 9, 2024
    Configuration menu
    Copy the full SHA
    e5004eb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    86f5a74 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5eea9b3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ef961ad View commit details
    Browse the repository at this point in the history
  5. solana: update IDL

    johnsaigle committed May 9, 2024
    Configuration menu
    Copy the full SHA
    ed933ac View commit details
    Browse the repository at this point in the history