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

[zk-token-sdk] divide fee encryption into two ciphertexts #28472

Merged
merged 6 commits into from
Nov 30, 2022
Merged

[zk-token-sdk] divide fee encryption into two ciphertexts #28472

merged 6 commits into from
Nov 30, 2022

Conversation

samkim-crypto
Copy link
Contributor

Problem

The transfer fees for confidential transfers are encrypted as one single ciphertext, which prevents it from being added on to the destination token account's pending balance.

Summary of Changes

Divide the transfer fee and encrypt it as two separate ciphertexts. Update the zk proofs accordingly.

@CriesofCarrots
Copy link
Contributor

CriesofCarrots commented Nov 29, 2022

Fyi #28979 ... I went ahead and rebased

@samkim-crypto samkim-crypto merged commit 11efaf7 into solana-labs:master Nov 30, 2022
@samkim-crypto samkim-crypto deleted the zk-token-sdk/clean-up-transfer-with-fee branch December 1, 2022 00:34
mergify bot pushed a commit that referenced this pull request Dec 2, 2022
* divide fee encryption into two ciphertexts

* clippy

* update range proof

* add fee ciphertext decryption

* clean up split_u64 function

* remove unnecessary casting

(cherry picked from commit 11efaf7)

# Conflicts:
#	zk-token-sdk/src/instruction/transfer_with_fee.rs
mergify bot added a commit that referenced this pull request Dec 2, 2022
…28472) (#29036)

* [zk-token-sdk] divide fee encryption into two ciphertexts (#28472)

* divide fee encryption into two ciphertexts

* clippy

* update range proof

* add fee ciphertext decryption

* clean up split_u64 function

* remove unnecessary casting

(cherry picked from commit 11efaf7)

# Conflicts:
#	zk-token-sdk/src/instruction/transfer_with_fee.rs

* resolve conflict marker

Co-authored-by: samkim-crypto <skim13@cs.stanford.edu>
gnapoli23 pushed a commit to gnapoli23/solana that referenced this pull request Dec 16, 2022
…s#28472)

* divide fee encryption into two ciphertexts

* clippy

* update range proof

* add fee ciphertext decryption

* clean up split_u64 function

* remove unnecessary casting
nickfrosty pushed a commit to nickfrosty/solana that referenced this pull request Jan 4, 2023
…s#28472)

* divide fee encryption into two ciphertexts

* clippy

* update range proof

* add fee ciphertext decryption

* clean up split_u64 function

* remove unnecessary casting
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants