Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
v1.14: [zk-token-sdk] Add option to create proof context state in the…
Browse files Browse the repository at this point in the history
… proof verification program (backport of #29996) (#30739)

* [zk-token-sdk] Add option to create proof context state in the proof verification program (#29996)

* extend verifiable trait

* add PodBool

* implement ZkProofData trait

* add proof context program to zk-token-proof program

* update tests  for close account

* add close account instruction

* reorganize tests

* complete tests

* clean up and add docs

* clean up pod

* add proof program state

* update tests

* move proof program tests as separate module

* clippy

* cargo sort

* cargo fmt

* re-organize visibility

* add context state description

* update maintainer reference

* change `VerifyProofData` and `ProofContextState` to pod

* add tests for mixing proof types

* add tests for self owned context state accounts

* cargo fmt

* remove unnecessary scoping and add comments on scopes

* re-organize proof instructions

* clippy

* update zk-token-proof-test to 1.16.0

* upgrade spl-token-2022 to 0.6.1

* reoganize proof type

* cargo lock

* remove ZkProofContext trait

(cherry picked from commit 2d58bb2)

# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	programs/bpf/Cargo.lock
#	zk-token-sdk/src/instruction/transfer.rs

* resolve conflicts

* update zk-token-proof-tests version

* adjust for update in transaction context run time

* update spl-token to 0.6.1

* update ata to v1.1.3

---------

Co-authored-by: samkim-crypto <[email protected]>
  • Loading branch information
mergify[bot] and samkim-crypto authored Mar 31, 2023
1 parent b67c6cb commit e297b2e
Show file tree
Hide file tree
Showing 23 changed files with 1,534 additions and 309 deletions.
49 changes: 21 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ members = [
"programs/stake",
"programs/vote",
"programs/zk-token-proof",
"programs/zk-token-proof-tests",
"rayon-threadlimit",
"rbpf-cli",
"remote-wallet",
Expand Down
2 changes: 1 addition & 1 deletion account-decoder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ solana-config-program = { path = "../programs/config", version = "=1.14.18" }
solana-sdk = { path = "../sdk", version = "=1.14.18" }
solana-vote-program = { path = "../programs/vote", version = "=1.14.18" }
spl-token = { version = "=3.5.0", features = ["no-entrypoint"] }
spl-token-2022 = { version = "=0.6.0", features = ["no-entrypoint"] }
spl-token-2022 = { version = "=0.6.1", features = ["no-entrypoint"] }
thiserror = "1.0"
zstd = "0.11.2"

Expand Down
2 changes: 1 addition & 1 deletion client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ solana-streamer = { path = "../streamer", version = "=1.14.18" }
solana-transaction-status = { path = "../transaction-status", version = "=1.14.18" }
solana-version = { path = "../version", version = "=1.14.18" }
solana-vote-program = { path = "../programs/vote", version = "=1.14.18" }
spl-token-2022 = { version = "=0.6.0", features = ["no-entrypoint"] }
spl-token-2022 = { version = "=0.6.1", features = ["no-entrypoint"] }
thiserror = "1.0"
tokio = { version = "1", features = ["full"] }
tokio-stream = "0.1.9"
Expand Down
2 changes: 1 addition & 1 deletion ledger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ solana-storage-proto = { path = "../storage-proto", version = "=1.14.18" }
solana-transaction-status = { path = "../transaction-status", version = "=1.14.18" }
solana-vote-program = { path = "../programs/vote", version = "=1.14.18" }
spl-token = { version = "=3.5.0", features = ["no-entrypoint"] }
spl-token-2022 = { version = "=0.6.0", features = ["no-entrypoint"] }
spl-token-2022 = { version = "=0.6.1", features = ["no-entrypoint"] }
static_assertions = "1.1.0"
tempfile = "3.3.0"
thiserror = "1.0"
Expand Down
38 changes: 10 additions & 28 deletions programs/bpf/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions programs/zk-token-proof-tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[package]
name = "solana-zk-token-proof-program-tests"
authors = ["Solana Labs Maintainers <[email protected]>"]
repository = "https://github.com/solana-labs/solana"
version = "1.14.18"
license = "Apache-2.0"
edition = "2021"
publish = false

[dev-dependencies]
bytemuck = { version = "1.11.0", features = ["derive"] }
solana-program-runtime = { path = "../../program-runtime", version = "=1.14.18" }
solana-program-test = { path = "../../program-test", version = "=1.14.18" }
solana-sdk = { path = "../../sdk", version = "=1.14.18" }
solana-zk-token-sdk = { path = "../../zk-token-sdk", version = "=1.14.18" }
Loading

0 comments on commit e297b2e

Please sign in to comment.