20 Commits

Author SHA1 Message Date
jonesmarvin8
cf9177a095
feat(wallet): add keycard support for public tx for auth-transfer (#451)
* feat: add basic commands for communicating with keycard

* initialize changes

* reorganization

* add script file for easier wallet access

* update commands

* fixes

* fixed load for non continuous run

* Updates for signatures with keycard

* fix BIP-340 signatures for fixed sized messages

* fmt

* refactor and add pin support to program facades

* fix unit test

* fixes

* Revert "fixes"

This reverts commit 41f34f4ff4145b7abb60fd9bec168ae4b60f23b4.

* fixes

* fixes

* Removed privacy keycard calls

* Revert "Removed privacy keycard calls"

This reverts commit d70ef505a1f40b87159099761f5fce5a31e3f17b.

* Add domain separators

* Removed privacy txs for keycard

* CI fixes

* CI fixes

* addressed some comments

* fix ci

* ci fixes

* fix integration test issue and updated keycard firmware

* addressed more comments

* fixed deny

* remove keycard-py

* fixed from earlier merge

* add hash_message tests

* add test

* fix deny

* CI fixes

* fixed integration tests

* Update public.rs

* update artifacts

* ci and comments

* addressed comments

* comment fixes

* fixes from merging main

* first round of comments

* Revert "Merge branch 'main' into marvin/keycard-commands"

This reverts commit 3fce53f663a3996938dddf77680854570063ca21, reversing
changes made to e7b42a5177641455a8917bd2e29db20afd9690e5.

* python comments

* addressed comments

* compile error fixed

* fix artifacts

* fix main merge error

* adjust signer logic workflow

* fmt

* merge main and shift keycard tests

* deny fix

* artifacts fix

* remove keycard scripts from root

* tps fix

* fmt
2026-05-21 20:46:13 -04:00
Moudy
a9bf3fbfe7 feat(cycle_bench): add criterion verify bench for G_verify 2026-05-21 16:44:40 +02:00
Moudy
b608d10ca1 feat(crypto_primitives_bench): migrate to criterion harness 2026-05-21 16:44:40 +02:00
moudyellaz
b0a5b3478b docs(integration_bench): add canonical run numbers from docker-compose sweep 2026-05-20 12:58:25 +02:00
moudyellaz
0119b38c1b refactor(integration_bench)!: pivot to docker-compose via TestContext, share one node per run
BREAKING CHANGE:
- crate renamed e2e_bench → integration_bench. Run via `cargo run -p integration_bench`.
- env vars removed: LEZ_BEDROCK_BIN, LEZ_BEDROCK_CONFIG_DIR, LEZ_BEDROCK_PORT. Replaced by a docker prerequisite (docker-compose Bedrock via test_fixtures::TestContext).
- output filenames: target/e2e_bench_{dev,prove}.json → target/integration_bench_{dev,prove}.json.
- JSON schema: per-scenario `setup_s` field removed; replaced by run-level `shared_setup_s` (one TestContext is shared across all scenarios in a run).
- internal: bedrock_handle.rs and bench_context.rs deleted; placeholder-string config (PLACEHOLDER_CHAIN_START_TIME) gone.
2026-05-20 11:04:06 +02:00
moudyellaz
c3daa9897d docs(e2e_bench): drop machine table and stale benchmark numbers 2026-05-19 18:54:11 +02:00
Moudy
20b9868ace feat: add e2e_bench tool for end-to-end scenario latency, block, and tx-byte measurements 2026-05-19 09:45:26 +02:00
Moudy
0ab3075e78 Merge remote-tracking branch 'origin/main' into moudy/wallet-crypto-bench-tool
# Conflicts:
#	Cargo.toml
#	docs/benchmarks/README.md
2026-05-18 18:25:58 +02:00
Moudy
ba65b168dd rename(wallet_crypto_bench): rename to crypto_primitives_bench 2026-05-18 17:13:07 +02:00
Moudy
84a1fec942 feat: add wallet_crypto_bench tool for wallet-side cryptographic primitives 2026-05-15 10:51:51 +02:00
Moudy
75e1cc51d5
Update README.md 2026-05-15 00:24:16 +02:00
Moudy
1e2d41f941
Update cycle_bench.md 2026-05-15 00:23:49 +02:00
Moudy
05f41f81e9 feat: add cycle_bench tool for executor, prove, PPE, and verify cycle measurements 2026-05-14 18:14:37 +02:00
Sergio Chouhy
6738d8ef28 update docs 2026-04-28 00:14:55 -03:00
Sergio Chouhy
7c45b5af3c Merge branch 'main' into schouhy/generalize-npk-to-multiple-accounts 2026-04-24 01:04:55 -03:00
Moudy
0183eac5cc refactor: unify PDA AccountId construction via AccountId::for_{public,private}_pda
Addresses the following review comment:

- "I think this should be a constructor `AccountId::for_private_pda`.
  Consider also removing the existing `impl From<(ProgramId, Seed)> for
  AccountId` for public pdas in favor of a `AccountId::for_public_pda`
  to have a unified way of constructing pdas"

I replaced `impl From<(&ProgramId, &PdaSeed)> for AccountId` with
`AccountId::for_public_pda(program_id: &ProgramId, seed: &PdaSeed) ->
Self` and replaced the free function `private_pda_account_id(...)`
with `AccountId::for_private_pda(program_id: &ProgramId, seed:
&PdaSeed, npk: &NullifierPublicKey) -> Self`. Both live in an inherent
`impl AccountId` block in nssa/core/src/program.rs next to the PDA
derivation logic. Migrated all call sites across nssa/core,
nssa/src/state.rs, nssa/src/validated_state_diff.rs,
program_methods/guest/src/bin/privacy_preserving_circuit.rs,
programs/amm/core, programs/associated_token_account/core, the example
tail-call binary, and the ATA tutorial doc. Test function names that
referenced the old free function were also renamed
(private_pda_account_id_* to for_private_pda_*).
2026-04-21 12:35:19 +02:00
Sergio Chouhy
3ec166ff7c bring back new private account command for simplicity 2026-04-21 02:35:50 -03:00
Sergio Chouhy
3dfbea9b66 update token transfer tutorial 2026-04-17 19:45:42 -03:00
r4bbit
0ed91e869e feat(programs): add Associated Token Account program with wallet CLI and tutorial
Introduce the ATA program, which derives deterministic per-token holding
accounts from (owner, token_definition) via SHA256, eliminating the need
to manually create and track holding account IDs.

Program (programs/associated_token_account/):
- Create, Transfer, and Burn instructions with PDA-based authorization
- Deterministic address derivation: SHA256(owner || definition) → seed → AccountId
- Idempotent Create (no-op if ATA already exists)

Wallet CLI (`wallet ata`):
- `address` — derive ATA address locally (no network call)
- `create`  — initialize an ATA on-chain
- `send`    — transfer tokens from owner's ATA to a recipient
- `burn`    — burn tokens from owner's ATA
- `list`    — query ATAs across multiple token definitions

Usage:
  wallet deploy-program artifacts/program_methods/associated_token_account.bin
  wallet ata address --owner <ID> --token-definition <DEF_ID>
  wallet ata create --owner Public/<ID> --token-definition <DEF_ID>
  wallet ata send --from Public/<ID> --token-definition <DEF_ID> --to <RECIPIENT> --amount 100
  wallet ata burn --holder Public/<ID> --token-definition <DEF_ID> --amount 50
  wallet ata list --owner <ID> --token-definition <DEF1> <DEF2>

Includes tutorial: docs/LEZ testnet v0.1 tutorials/associated-token-accounts.md
2026-03-26 13:19:29 +01:00
Daniil Polyakov
3855bf2399 chore: move tutorial to docs 2026-02-23 16:10:01 +03:00