* make `ElGamalKeypair` fields private
* update the rest of `zk-token-sdk` for the visibility update
* update `zk-token-proof-tests` for the visibility update
* update `zk-keygen` for the visibility update
* update `zk-token-proof` benches for the updated visibility
* cargo fmt
* rename `ElGamalKeypair::new` to `ElGamalKeypair::new_for_tests`
* add bench test for `VerifyPubkeyValidity`
* add bench test for `VerifyRangeProofU64`
* add bench test for `VerifyWithdraw`
* add bench test for `VerifyZeroBalance`
* add bench test for `VerifyGroupedCiphertextValidity`
* add bench test for `VerifyCiphertextCommitmentEquality`
* add bench test for `VerifyCiphertextCiphertextEquality`
* add bench test for `VerifyBatchedGroupedCiphertextValidity`
* add bench test for `VerifyBatchedRangeProofu64`, `VerifyBatchedRangeProofU128`, `VerifyBatchedRangeProofU256`
* add bench test for `VerifyTransfer` and `VerifyTransferWithFee`
* use add `criterion` to workspace cargo
* add bench to ci
* add aggregate range proof instructions data
* add aggregate range proof instruction
* update proof program processor for aggregate range proof instructions
* cargo fmt
* Update zk-token-sdk/src/instruction/aggregate_range_proof/aggregate_range_proof_256.rs
Co-authored-by: mvines <mvines@gmail.com>
* add remark in instruction description that context state account must be pre-allocated
* use `u64::BITS` and `u128::BITS`
* add proof description in `zk_token_proof_instruction.rs`
* rename instruction names to `VerifyBatchedRangeProofU{N}`
* rename module names from `aggregate` to `batched`
* add `tokio::test` that was lost in rebase
---------
Co-authored-by: mvines <mvines@gmail.com>
* add `VerifyRangeProof` instruction
* update proof program processor for `VerifyRangeProof64`
* specify target arch for `RANGEPROOF64_BIT_LENGTH
* rename `transcript_new` to `new_transcript`
* add constructor for `VerifyRangeProof64`
* add remark in the instruction description that context state account must be pre-allocated
* add proof description in `zk_token_proof_instruction.rs`
* rename `VerifyRangeProof64` to `VerifyRangeProofU64`
* use `u64::BITS`
* Update zk-token-sdk/src/zk_token_proof_instruction.rs
Co-authored-by: Tyera <teulberg@gmail.com>
* Apply suggestions from code review
Co-authored-by: Tyera <teulberg@gmail.com>
* fix range proof test
---------
Co-authored-by: Tyera <teulberg@gmail.com>
* rename and restruct ProofInstruction::VerifyCloseAccount to ProofInstruction::VerifyZeroBalance
* rename `PubkeySigmaProof` to `PubkeyValidityProof`
* refactor equality proofs into separate modules
* rename and restructure ProofInstruction::VerifyWithdrawWithheld to ProofInstruction::VerifyCiphertextCiphertextEquality
* add and reorg documentation for the proof instructions
* generalize ciphertext-ciphertext equality proof data constructor
* Update zk-token-sdk/src/instruction/ctxt_ctxt_equality.rs
Co-authored-by: Jon Cinque <joncinque@pm.me>
---------
Co-authored-by: Jon Cinque <joncinque@pm.me>
* Uses declare_process_instruction!() in all tests.
* Adds post_adjustments to mock_process_instruction().
Removes "solana_sbf_rust_external_spend" from assert_instruction_count() as it panics.
* Moves stable_log::program_invoke(), stable_log::program_success() and stable_log::program_failure() calls from bpf_loader into InvokeContext::process_executable_chain().
* Turns result of ProcessInstructionWithContext from InstructionError into Box<dyn std::error::Error>.
* Bump to solana_rbpf v0.3.0
* Removes Result from return type of EbpfVm::new().
* Turns EbpfError into Box<dyn std::error::Error>.
* Removes BpfError.
* Removes SyscallError::InstructionError.
* Adds a type alias for Box<dyn std::error::Error> in syscalls.
* add feature gate
* builtins consume statically defined units at beginning of process_instruction()
* Add new instructionError; return error if builtin did not consume units to enforce builtin to consume units;
* updated related tests
* updated ProgramTest with deactivated native_programs_consume_cu feature to continue support existing mock/test programs that do not consume units
* introduce workspace.package
* introduce workspace.dependencies
* read version from root cargo.toml
* pass check when version = { workspace = true }
* don't bump version when version = { workspace = true }
* including workspace Cargo.toml when bump version
* programs/sbf use workspace inheritance
* fix increasing cargo version ignore program/sbf/Cargo.toml
* introduce workspace.package
* introduce workspace.dependencies
* read version from root cargo.toml
* pass check when version = { workspace = true }
* don't bump version when version = { workspace = true }
* including workspace Cargo.toml when bump version
* programs/sbf use workspace inheritance
* fix increasing cargo version ignore program/sbf/Cargo.toml
* Bumps solana_rbpf to v0.2.36
* Removes ThisInstructionMeter.
* Removes one "unsafe" expression.
* Removes redundant call to solana_rbpf:🧝:register_bpf_function().
* Adjusts SyscallFunction and SyscallRegistry.
* Inlines ProgramEnvironment into EbpfVm.
* Refactors trait SyscallConsume into fn consume_compute_meter().
* Inlines ComputeMeter into InvokeContext.
* Removes solana-metrics dependency from bpf_loader.
* Replaces RBPF tracer functionality by the debugger.
* Take compute_units_consumed from execute_program().
* Merges execute_program_interpreted() and execute_program_jit().
* Adds transaction_context and instruction_context where invoke_context.get_keyed_accounts() is used.
* Use instruction_context.get_instruction_data() instead of an explicit parameter.
* Removes instruction_data parameter from Executor::execute().
* Removes instruction_data parameter from ProcessInstructionWithContext.