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

transaction-status: Add confidential transfer tests #3786

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joncinque
Copy link

Problem

The new parsers for the confidential transfer extensions in #3431 don't have any tests, which is dangerous because they involve indexing directly into arrays, which can panic at runtime.

Summary of changes

Add tests for all the instructions involving proofs, which have the more complicated parsing logic. Specifically, it's testing to make sure that nothing panics.

These tests actually uncovered a bug that triggered a panic for instructions with just barely enough accounts and also the instructions sysvar.

We'll need to backport this with #3645.

#### Problem

The new parsers for the confidential transfer extensions in solana-labs#3431 don't
have any tests, which is dangerous because they involve indexing
directly into arrays, which can panic at runtime.

#### Summary of changes

Add tests for all the instructions involving proofs, which have the more
complicated parsing logic. Specifically, it's testing to make sure that
nothing panics.

These tests actually uncovered a bug that triggered a panic for
instructions with just barely enough accounts and also the instructions
sysvar.
@joncinque joncinque added the v2.1 Backport to v2.1 branch label Nov 25, 2024
Copy link

mergify bot commented Nov 25, 2024

Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis.

Copy link

@samkim-crypto samkim-crypto left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2.1 Backport to v2.1 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants