21 Commits

Author SHA1 Message Date
ba92ba0e06 Zk instructions check length (#24103)
* zk-token-sdk: add a length check before decoding proof instruction

* zk-token-sdk: fix minor spelling

* zk-token-sdk: one-liner for length check

* zk-token-sdk: one-liner fix
2022-04-05 08:40:45 -04:00
1b45c509c3 Refactor: Use InstructionContext::get_instruction_data() (#24014)
* 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.
2022-04-01 15:48:05 +02:00
b4100a9b5d Add additional zkp for fee (#23112)
* zk-token-sdk: add equality proof for fee

* zk-token-sdk: tweak some naming conventions for readability

* zk-token-sdk: add verify withdraw withheld instruction

* zk-token-sdk: add test for withdraw withheld verification

* zk-token-sdk: more renaming of variables for readability

* zk-token-sdk: cargo fmt

* zk-token-sdk: minor

* zk-token-sdk: resolve bpf compilation warnings

* zk-token-sdk: minor update to doc
2022-02-17 12:45:07 -05:00
a47b76afcc zk-token-sdk: add verify transfer with fee instruction (#22924) 2022-02-04 08:52:49 -05:00
ab02dba96f Add get_processed_sibling_instruction syscall (#22859) 2022-02-02 16:45:57 -08:00
551c24da57 nit: consistent name (#22857) 2022-02-01 07:46:04 +00:00
69e632a337 Adapt zk-token-{sdk,proof-program} for use in the monorepo 2022-01-05 08:51:18 -08:00
f2e7f0c32b Adapt to changes to native program entrypoint 2022-01-05 08:51:18 -08:00
d5196046dd remove UpdateAccountPk instruction 2022-01-05 08:51:18 -08:00
11cac460aa Consume compute units since proof verification is an expensive operation 2022-01-05 08:51:18 -08:00
62b6eafd7c Prevent proof program from being invoked as an inner instruction 2022-01-05 08:51:18 -08:00
af80203522 Merge transfer instructions 2022-01-05 08:51:18 -08:00
6cdb94ccc5 Rename crypto crate to sdk 2022-01-05 08:51:18 -08:00
f1345c7bb3 Merge sdk/ back into crypto/ 2022-01-05 08:51:18 -08:00
b902ee6ad5 Adjust crate names 2022-01-05 08:51:18 -08:00
b1be9a7907 Move solana-specific parts of crypto/ into sdk/ 2022-01-05 08:51:18 -08:00
b96e07d161 Drop 'With' from TransferRangeProof/TransferValidityProof 2022-01-05 08:51:18 -08:00
0e8aa331ad Add transfer proof-program instructions 2022-01-05 08:51:18 -08:00
6ba3f4dc6d Add WithdrawData proof program plumbing 2022-01-05 08:51:18 -08:00
8b15d7bc28 Add CloseAccountData proof program plumbing 2022-01-05 08:51:18 -08:00
00fa5a93b8 Rename some files 2022-01-05 08:51:18 -08:00