-
Notifications
You must be signed in to change notification settings - Fork 318
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
[sdk] Add ZK Elgamal Proof program feature gate #1679
Changes from all commits
0b0d555
07f4f71
058a937
5af2634
29d8393
84c1096
694074f
831879d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,11 @@ mod zk_token_proof_program { | |
solana_sdk::declare_id!("ZkTokenProof1111111111111111111111111111111"); | ||
} | ||
|
||
// Inline zk-elgamal-proof program id since it isn't available in the sdk | ||
mod zk_elgamal_proof_program { | ||
solana_sdk::declare_id!("ZkE1Gama1Proof11111111111111111111111111111"); | ||
} | ||
|
||
// ReservedAccountKeys is not serialized into or deserialized from bank | ||
// snapshots but the bank requires this trait to be implemented anyways. | ||
#[cfg(all(RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))] | ||
|
@@ -162,6 +167,7 @@ lazy_static! { | |
ReservedAccount::new_active(stake::program::id()), | ||
ReservedAccount::new_active(system_program::id()), | ||
ReservedAccount::new_active(vote::program::id()), | ||
ReservedAccount::new_pending(zk_elgamal_proof_program::id(), feature_set::add_new_reserved_account_keys::id()), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should have used the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe I'm missing something, but this PR was added before 2.0 was branched, so it's part of 2.0, along with the You're right that it would have made more sense to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Argh, apologies, I spelled Elgamal wrong when grepping git history. So this PR is fine as is, sorry for the noise. I do think it would have more sense to use the |
||
ReservedAccount::new_pending(zk_token_proof_program::id(), feature_set::add_new_reserved_account_keys::id()), | ||
|
||
// sysvars | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Sorry I'm only just noticing this now, but it seems like we only need this dependency for the program id -- can we also have it in
solana-zk-elgamal-proof-program
and remove this direct dependency? This can be done in a follow-up