Skip to content

Commit 242d98c

Browse files
joncinquemergify[bot]
authored andcommitted
transaction-status: Add confidential transfer tests (#3786)
#### 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
1 parent 92f639b commit 242d98c

File tree

6 files changed

+1113
-0
lines changed

6 files changed

+1113
-0
lines changed

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,7 @@ solana-zk-sdk = { path = "zk-sdk", version = "=2.1.3" }
530530
solana-zk-token-proof-program = { path = "programs/zk-token-proof", version = "=2.1.3" }
531531
solana-zk-token-sdk = { path = "zk-token-sdk", version = "=2.1.3" }
532532
solana_rbpf = "=0.8.5"
533+
<<<<<<< HEAD
533534
spl-associated-token-account = "=4.0.0"
534535
spl-instruction-padding = "0.2"
535536
spl-memo = "=5.0.0"
@@ -538,6 +539,17 @@ spl-token = "=6.0.0"
538539
spl-token-2022 = "=4.0.0"
539540
spl-token-group-interface = "=0.3.0"
540541
spl-token-metadata-interface = "=0.4.0"
542+
=======
543+
spl-associated-token-account = "=6.0.0"
544+
spl-instruction-padding = "0.3"
545+
spl-memo = "=6.0.0"
546+
spl-pod = "=0.5.0"
547+
spl-token = "=7.0.0"
548+
spl-token-2022 = "=6.0.0"
549+
spl-token-confidential-transfer-proof-extraction = "0.2.0"
550+
spl-token-group-interface = "=0.5.0"
551+
spl-token-metadata-interface = "=0.6.0"
552+
>>>>>>> 8730dbbb88 (transaction-status: Add confidential transfer tests (#3786))
541553
static_assertions = "1.1.0"
542554
stream-cancel = "0.8.2"
543555
strum = "0.24"

transaction-status/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,9 @@ spl-token-group-interface = { workspace = true }
3131
spl-token-metadata-interface = { workspace = true }
3232
thiserror = { workspace = true }
3333

34+
[dev-dependencies]
35+
bytemuck = { workspace = true }
36+
spl-token-confidential-transfer-proof-extraction = { workspace = true }
37+
3438
[package.metadata.docs.rs]
3539
targets = ["x86_64-unknown-linux-gnu"]

0 commit comments

Comments
 (0)