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

v1.14: [zk-token-sdk] Add option to create proof context state in the proof verification program (backport of #29996) #30739

Merged
merged 6 commits into from
Mar 31, 2023

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Mar 15, 2023

This is an automatic backport of pull request #29996 done by Mergify.
Cherry-pick of 2d58bb2 has failed:

On branch mergify/bp/v1.14/pr-29996
Your branch is up to date with 'origin/v1.14'.

You are currently cherry-picking commit 2d58bb287.
  (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:
	new file:   programs/zk-token-proof-tests/Cargo.toml
	new file:   programs/zk-token-proof-tests/tests/process_transaction.rs
	modified:   programs/zk-token-proof/src/lib.rs
	modified:   zk-token-sdk/src/instruction/close_account.rs
	modified:   zk-token-sdk/src/instruction/mod.rs
	modified:   zk-token-sdk/src/instruction/pubkey_validity.rs
	modified:   zk-token-sdk/src/instruction/transfer_with_fee.rs
	modified:   zk-token-sdk/src/instruction/withdraw.rs
	modified:   zk-token-sdk/src/instruction/withdraw_withheld.rs
	modified:   zk-token-sdk/src/lib.rs
	modified:   zk-token-sdk/src/zk_token_elgamal/pod.rs
	modified:   zk-token-sdk/src/zk_token_proof_instruction.rs
	new file:   zk-token-sdk/src/zk_token_proof_state.rs

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   Cargo.lock
	both modified:   Cargo.toml
	both modified:   programs/bpf/Cargo.lock
	both modified:   zk-token-sdk/src/instruction/transfer.rs

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


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

…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
@samkim-crypto samkim-crypto force-pushed the mergify/bp/v1.14/pr-29996 branch from 0c3215a to c890b98 Compare March 27, 2023 21:33
@codecov
Copy link

codecov bot commented Mar 27, 2023

Codecov Report

Merging #30739 (11b2017) into v1.14 (ee657ce) will decrease coverage by 0.1%.
The diff coverage is 34.5%.

@@            Coverage Diff            @@
##            v1.14   #30739     +/-   ##
=========================================
- Coverage    82.1%    82.1%   -0.1%     
=========================================
  Files         662      663      +1     
  Lines      184916   185053    +137     
=========================================
+ Hits       151986   152003     +17     
- Misses      32930    33050    +120     

@samkim-crypto samkim-crypto force-pushed the mergify/bp/v1.14/pr-29996 branch from c890b98 to 6ad2cf6 Compare March 27, 2023 22:20
@samkim-crypto samkim-crypto force-pushed the mergify/bp/v1.14/pr-29996 branch from 4671872 to 11b2017 Compare March 28, 2023 05:27
@samkim-crypto samkim-crypto requested a review from joncinque March 28, 2023 07:48
@samkim-crypto samkim-crypto merged commit e297b2e into v1.14 Mar 31, 2023
@samkim-crypto samkim-crypto deleted the mergify/bp/v1.14/pr-29996 branch March 31, 2023 02:44
bw-solana pushed a commit to bw-solana/solana that referenced this pull request Jan 10, 2025
… proof verification program (backport of solana-labs#29996) (solana-labs#30739)

* [zk-token-sdk] Add option to create proof context state in the proof verification program (solana-labs#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)

* 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]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants