50 Commits

Author SHA1 Message Date
Artem Gureev
a7511eecfc Merge branch 'batched-merkle-proofs' into dummy-note-padding
Bring one-snapshot proof fetching (getProofsAndRoot) into the dummy-note
padding branch: updates, inits, and dummy padding notes now share a single
commitment-set root from one sequencer snapshot, so a padding note's
published root no longer distinguishes it from a real input.
2026-07-07 10:15:03 +00:00
Artem Gureev
84b5d66346 fix(wallet): encapsulate dummy note epk in wallet 2026-07-06 23:59:17 +04:00
Artem Gureev
3f8cd84a88 feat(sequencer): serve proofs and root in one rpc call 2026-07-06 23:18:51 +04:00
Artem Gureev
d0fda9b3dd refactor(wallet): dedup randomness helpers, fill dummy note directly 2026-07-03 20:55:12 +04:00
Artem Gureev
3d95594b4f feat(wallet): construct and submit dummy inputs
Ciphers submitted currently have no data
2026-07-03 20:17:36 +04:00
Artem Gureev
640d4f6502 feat(circuit): supply a view_tag on private-account updates 2026-07-03 10:17:30 +04:00
Artem Gureev
859ffd3900 Merge origin/artem/change-wallet-balance-fetch into artem/user-view-tag
Brings the nullifier-based wallet balance fetch (NullifierIndex,
sync_updates_via_nullifiers) onto the vpk-binding base, so account
updates are found by nullifier rather than only by view tag.

Conflict resolutions (semantic):
- wallet/lib.rs: keep vpk-binding's for_private_account(npk, vpk, kind);
  add theirs' nsk into the 4-tuple consumed by index.track().
- wallet/storage/key_chain.rs: keep theirs' private_account/private_accounts
  split (the iterator is reused by the nullifier index) and restore the vpk
  in the derivation; adapt 4 pre-vpk call sites (for_private_account 2->3 arg,
  AccountId::from((npk,id)) -> (npk,vpk,id)).
- artifacts/*: took ours; regenerate with `just build-artifacts`.
2026-07-02 18:40:13 +00:00
agureev
8e084e22d1 Merge remote-tracking branch 'origin/dev' into artem/viewing-key-binding 2026-07-02 20:04:30 +04:00
Artem Gureev
6c1dd53aa5 refactor(wallet): thread &Message through the view-tag sync passes 2026-07-02 14:13:30 +04:00
Artem Gureev
b6e148249e refactor(wallet): inline the hit loop in sync_updates_via_nullifiers 2026-07-02 14:13:29 +04:00
Artem Gureev
d2633af413 refactor(wallet): introduce a NullifierIndex struct 2026-07-01 22:24:41 +04:00
Artem Gureev
15f6306362 refactor(wallet): place private_accounts next to private_account 2026-07-01 21:57:08 +04:00
Artem Gureev
2a9c8574cd refactor(wallet): compute update nullifiers inlined 2026-07-01 21:57:06 +04:00
agureev
296afdc4a3 Merge remote-tracking branch 'origin/dev' into artem/change-wallet-balance-fetch 2026-07-01 21:12:14 +04:00
agureev
cb6d21a937 refactor: docs, renaming 2026-07-01 20:58:03 +04:00
Artem Gureev
ca8acb1c38 test(wallet): cover shared-account update sync 2026-07-01 19:36:17 +04:00
Artem Gureev
51cc82b50b docs: document new methods 2026-07-01 19:34:15 +04:00
Artem Gureev
f32e6bb178 refactor(key_protocol): use SharedAccountTag seed in GroupKeyHolder 2026-07-01 19:34:15 +04:00
Artem Gureev
d8e990a68f test(wallet): cover nullifier-based update sync 2026-07-01 19:34:04 +04:00
Artem Gureev
6bb2d7ffc3 refactor(wallet): move nullifier-watch sync onto UserKeyChain 2026-07-01 19:16:43 +04:00
Artem Gureev
5fda1608a3 feat(wallet): skip nullifier-handled slots in the view-tag pass 2026-07-01 19:16:42 +04:00
Artem Gureev
a24d2ca4ec fix(wallet): make nullifier watch updatable during sync 2026-07-01 19:16:42 +04:00
Artem Gureev
6025cb53ad feat(wallet): detect private-account updates via nullifier scanning 2026-07-01 19:16:41 +04:00
Artem Gureev
d09a4215d8 refactor(wallet): use shared-key derivation helper 2026-07-01 19:16:40 +04:00
Artem Gureev
eea069c663 feat(wallet): nullifier-watch for updated private accounts 2026-07-01 19:16:39 +04:00
jonesmarvin8
f786aca73e
refactor(lez): clean up long functions (#541)
* add helper functions

* CI fixes

* additional refactors

* fix: clarify doc comment on apply_mempool_transaction

* chore: apply nightly fmt

* fix: import missing ML_KEM_768_CIPHERTEXT_LEN in auth_transfer private test
2026-07-01 10:23:21 -04:00
jonesmarvin8
f8d859394b
refactor(privacy_preserving_circuit): introduce helper functions to shorten long functions (#545)
* refactor(privacy_preserving_circuit): extract functions for readability

* refactor(privacy_preserving_circuit): address PR review comments

Bundle shared handle_* arguments into PrivateOutputHandler struct in
output.rs and fix misplaced docstring on resolve_external_seed in
execution_state.rs.

* feat: update commitment mechanism for new private account (#546)

* refactor(privacy_preserving_circuit): extract functions for readability

* feat: update commitment mechanism for new private accounts

Allow init accounts to optionally use a real membership proof for
DUMMY_COMMITMENT instead of hardcoding DUMMY_COMMITMENT_HASH as the
CommitmentSetDigest. The wallet fetches the proof from the sequencer
and passes it through the circuit.

* fix: address clippy lints and fix integration test visibility

* add tests

* refactor: removed duplicated code

* refactor: simplify init nullifier mechanism

Replace Option<MembershipProof> with Option<CommitmentSetDigest> on init
variants (PrivateAuthorizedInit, PrivateUnauthorized, PrivatePdaInit).
The circuit now receives the commitment tree root directly instead of
recomputing it from a Merkle proof.

* refactor: use CommitmentSetDigest directly instead of Option for init commitment root

Address PR #546 review feedback: the circuit now accepts CommitmentSetDigest
directly on init variants (PrivateAuthorizedInit, PrivateUnauthorized,
PrivatePdaInit), with callers providing DUMMY_COMMITMENT_HASH as the default.
Also fixes duplicate resolve_external_seed from rebase and rebuilds artifacts.

* style: run cargo +nightly fmt
2026-07-01 10:14:32 -04:00
Pravdyvy
53ae6dcfdd fix(wallet_ffi): asref suggestion 2026-06-30 12:46:52 +03:00
Marvin Jones
6155bd9a37 fix(encryption): rename os_random to random_seed and fix ESK derivation in tests
Rename os_random field to random_seed per review feedback. Fix tests
that constructed SharedSecretKey with a hardcoded EphemeralSecretKey
instead of deriving it via EphemeralSecretKey::new.
2026-06-29 09:10:43 -04:00
Marvin Jones
060a83879b feat(encryption): derive esk from account state, remove chacha20poly1305 logic
Introduce EphemeralSecretKey as a proper struct with EphemeralSecretKey::new()
that derives esk from SHA256("/LEE/v0.3/esk/" || account_id || os_random || nonce).
Rename witness field from esk to os_random. Simplify encapsulate_deterministic
to accept pre-derived EphemeralSecretKey directly.
2026-06-29 09:10:43 -04:00
Pravdyvy
860746dac9 feat(wallet_ffi): labels added 2026-06-25 18:29:35 +03:00
Daniil Polyakov
c74b03582b refactor!(wallet): pass program_id instead of program in send_pub_tx() 2026-06-24 20:19:12 +03:00
Daniil Polyakov
d3e507f25d refactor!(artifacts): keep lee and lez artifacts separated 2026-06-24 18:10:41 +03:00
agureev
090c368c14 tests: test and flow updates 2026-06-23 15:51:58 +04:00
Pravdyvy
5c28acc961 fix(wallet_ffi): suggestion fix 2026-06-23 11:10:53 +03:00
Pravdyvy
c6d7f37a1a Merge branch 'main' into Pravdyvy/ffi-mnemonic 2026-06-18 18:44:00 +03:00
moudyellaz
87d6869e15 fix(wallet): reset last_synced_block on storage restore so notes re-scan from genesis 2026-06-18 13:33:09 +02:00
Daniil Polyakov
77f1fb3f21 feat(wallet): add bridge withdraw command 2026-06-16 22:10:11 +03:00
Pravdyvy
a8c81f5445
Merge pull request #491 from logos-blockchain/Pravdyvy/wallet-ffi-extension
feat(wallet_ffi): wallet ffi generic transactions
2026-06-16 09:11:38 +03:00
Daniil Polyakov
1c7711c10e feat(wallet): add vault cli commands 2026-06-15 21:53:15 +03:00
Pravdyvy
8ff353df0c Merge branch 'main' into Pravdyvy/wallet-ffi-extension 2026-06-15 14:14:45 +03:00
Pravdyvy
4af5651c9e fix(wallet_ffi): fiull restoration reproduction 2026-06-15 11:53:07 +03:00
agureev
5430954551 bump: pyo3 to 0.29 2026-06-12 14:25:37 +04:00
agureev
be6f82cb92 fix(wallet): adapt wallet 2026-06-10 22:12:50 +04:00
Pravdyvy
e0348dc331 feat(integration_tests): mnemonic test 2026-06-10 19:25:58 +03:00
Pravdyvy
a3ed222887 feat(wallet-ffi): mnemonic checnges 2026-06-09 19:47:12 +03:00
jonesmarvin8
feb6cb7f92
feat(wallet): add keycard support for public accounts for public/privacy txs for program facades (#461)
* 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

* initialize branch

* 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

* privacy command fixes

* ci and comments

* addressed comments

* comment fixes

* fixes from merging main

* adding support to other programs

* expanded support

* ci fixes

* ci and add private account keys test

* some fixes and setup notes

* Ci fixes

* ci fixes

* update key paths to avoid collisions in tests

* added separated files for keycard_tests_2.sh

* 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

* updating logic

* fmt

* refactored

* clippy fix

* minor fix

* addressing comments

* minor fix

* ci fix

* addressed deferred comments

* clean up

* minor cleanup

* ci fixes

* fmt fix

* feat!(wallet): Merged `SigningGroup` with `AccountManager` (#500)

* feat: account manager extension

* feat(wallet): added unified way of sending public transactions to all facades

* fix(wallet): no sign option added

* fix(deny): deny fix

* fix(wallet): suggestion 1

* fix(wallet): suggestion fix 1

* feat!: Add new path for externally provided seed to the circuit.

BREAKING CHANGE: add identity variants to the circuit and change semantics for `Claim::Authorized` for private PDAs

* feat(ci): use separate job per each integration tests module

* feat(ci): cache rust artifacts

* feat(ci): build integration tests binary once and reuse it

* fix(wallet): fmt

* ci: add bench-regression workflow with criterion-compare for crypto_primitives_bench

* fix(wallet): merge postfix

* feat!(wallet): SigningGroup merged with AccountManager

* fix(ci): deny and artifacts fix

* fix(deny): deny fix

* fix keycard and lint

---------

Co-authored-by: Sergio Chouhy <sergio.chouhy@gmail.com>
Co-authored-by: Daniil Polyakov <arjentix@gmail.com>
Co-authored-by: Moudy <m.ellaz@hotmail.com>
Co-authored-by: Sergio Chouhy <41742639+schouhy@users.noreply.github.com>
Co-authored-by: jonesmarvin8 <83104039+jonesmarvin8@users.noreply.github.com>

* addressed comments

* minor comments

* Rebase to main

* CI fixes

---------

Co-authored-by: Pravdyvy <46261001+Pravdyvy@users.noreply.github.com>
Co-authored-by: Sergio Chouhy <sergio.chouhy@gmail.com>
Co-authored-by: Daniil Polyakov <arjentix@gmail.com>
Co-authored-by: Moudy <m.ellaz@hotmail.com>
Co-authored-by: Sergio Chouhy <41742639+schouhy@users.noreply.github.com>
2026-06-05 17:35:10 -04:00
jonesmarvin8
2104f71e39
feat(key-protocol/nssa)!: PQ resistance primitives for vsk/vpk for shared key agreement (#474)
* initialize pq encryption changes

* key agreement update

* add test and other fixes

* ci fixes

* fix unit tests

* updates from main and ci

* added updated specs for pq encryption

* addressing comments

* addressed comments

* fix clippy errors from main merge

* Rebased to main
2026-06-03 14:40:06 -04:00
Pravdyvy
a999563a2d Merge branch 'main' into Pravdyvy/wallet-ffi-extension 2026-06-03 15:09:55 +03:00
Sergio Chouhy
50be74580b refactor!: move LEZ related crates to dedicated directory
BREAKING CHANGE: LEZ crates have been moved from top-level directories into
  a dedicated `lez/` subdirectory. The following crates were relocated:

    common          → lez/common
    indexer         → lez/indexer
    explorer_service→ lez/explorer_service
    keycard_wallet  → lez/keycard_wallet
    mempool         → lez/mempool
    sequencer       → lez/sequencer
    storage         → lez/storage
    testnet_initial_state → lez/testnet_initial_state
    wallet          → lez/wallet
    wallet-ffi      → lez/wallet-ffi

  Any external tooling, scripts, or paths referencing these crates at their
  previous top-level locations must be updated.
2026-06-02 14:17:59 -03:00