Skip to content

v2.1: transaction-status: Add confidential transfer tests (backport of #3786) #3797

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

Closed
wants to merge 1 commit into from

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Nov 26, 2024

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.


This is an automatic backport of pull request #3786 done by Mergify.

#### 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.

(cherry picked from commit 8730dbb)

# Conflicts:
#	Cargo.toml
#	transaction-status/src/parse_token/extension/confidential_mint_burn.rs
#	transaction-status/src/parse_token/extension/confidential_transfer.rs
@mergify mergify bot requested a review from a team as a code owner November 26, 2024 13:05
@mergify mergify bot added the conflicts label Nov 26, 2024
Copy link
Author

mergify bot commented Nov 26, 2024

Cherry-pick of 8730dbb has failed:

On branch mergify/bp/v2.1/pr-3786
Your branch is up to date with 'origin/v2.1'.

You are currently cherry-picking commit 8730dbbb88.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   Cargo.lock
	modified:   transaction-status/Cargo.toml
	modified:   transaction-status/src/parse_token/extension/confidential_transfer_fee.rs

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   Cargo.toml
	deleted by us:   transaction-status/src/parse_token/extension/confidential_mint_burn.rs
	both modified:   transaction-status/src/parse_token/extension/confidential_transfer.rs

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@willhickey
Copy link

v2.1 is nearly ready for mainnet-beta, so closing this as stale. Re-open if you think it deserves further consideration

@willhickey willhickey closed this Jan 10, 2025
@steviez steviez deleted the mergify/bp/v2.1/pr-3786 branch June 5, 2025 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants