52 Commits

Author SHA1 Message Date
moudyellaz
eff31df9ce Merge origin/dev 2026-07-11 01:12:00 +02:00
Daniil Polyakov
7408955f08 feat!(wallet): wait for deploy tx inclusion in block
Breaking:
  1. Now a lot of wallet commands return `TransactionExecuted`, instead of `Empty`.
  2. Sequencer's `getTransaction()` RPC response changed from `tx` to `(tx, block_id)`
2026-07-09 00:32:53 +03:00
moudyellaz
9f7db3fa38 Merge origin/dev 2026-07-04 00:48:40 +02:00
moudyellaz
4f75e29a3c Merge origin/main
Integrates origin/main (per-program-crate refactor) and re-homes the cross-zone messaging feature onto it.

BREAKING CHANGE: Genesis state root changes. This registers six builtin programs
(cross_zone_outbox, cross_zone_inbox, ping_sender, ping_receiver, bridge_lock,
wrapped_token) and seeds their genesis accounts (the wrapped_token authorized
minter config, the per-zone inbox config, and optional bridge-lock holdings).
Building the new cores alongside the existing builtins also enables serde/alloc
for the shared programs build, regenerating every builtin program image id. All
nodes must upgrade together.
2026-07-04 00:47:20 +02:00
agureev
49d3823a75 chore: remove unused deps 2026-07-02 20:43:34 +04:00
agureev
8e084e22d1 Merge remote-tracking branch 'origin/dev' into artem/viewing-key-binding 2026-07-02 20:04:30 +04:00
jonesmarvin8
072ea3b066
refactor(lee::state_machine): clean up long functions and files (#535)
* refactor(lee): split large modules into directories and extract tests

Split state.rs, program.rs, circuit.rs, validated_state_diff.rs,
merkle_tree, and core/program.rs into module directories with separate
test files. State tests are further split into themed files (genesis,
authenticated_transfer, circuit, claiming, etc.). Extract
authenticate_public_transaction_signers helper in validated_state_diff
to remove duplicated authentication logic.

* chore: rebuild artifacts
2026-07-01 11:11:08 -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
jonesmarvin8
3b3857594f
refactor(lee::key_protocol) - cleaned up duplicated logic (#532)
* Clean up key protocol

* added test for helper function

* address comment

* chore: apply nightly fmt
2026-07-01 10:11:08 -04: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
Sergio Chouhy
3c54bbf0b9 fix(lee): use test program in empty tx instead of authenticated tranfer 2026-06-25 14:47:22 -03:00
moudyellaz
36ed949be0 chore: some cleanup 2026-06-25 09:38:30 +02:00
Daniil Polyakov
64f8444a67
Merge pull request #524 from logos-blockchain/arjentix/refactor-lee-lez
Decouple last parts of LEZ from LEE
2026-06-24 23:46:43 +03:00
agureev
a815b50275 doc: update encapsulation documentation 2026-06-24 21:34:59 +04:00
jonesmarvin8
77af662ac6
fix: reject public transactions with empty account_ids (#552)
Closes #513
2026-06-24 13:33:51 -04:00
agureev
b31fe5e4a7 refactor: change message_hash to esk for encapsulation 2026-06-24 21:24:12 +04:00
Daniil Polyakov
96b28827f6 fix(tests): fix tests 2026-06-24 20:20:40 +03:00
agureev
01accb788c feat: add prefix to the ML KEM kdf 2026-06-24 21:17:43 +04:00
Daniil Polyakov
d3e507f25d refactor!(artifacts): keep lee and lez artifacts separated 2026-06-24 18:10:41 +03:00
moudyellaz
4fd465b529 test(cross-zone): add lock-on-A mint-on-B bridge round trip 2026-06-24 14:51:52 +02:00
moudyellaz
5d77359fd8 feat(cross-zone)!: add wrapped_token and bridge_lock programs
BREAKING CHANGE: registers the wrapped_token and bridge_lock builtin programs and seeds the wrapped_token config account at genesis, changing the genesis state.
2026-06-24 10:12:40 +02:00
agureev
f2778ea5d0 test: regenerate hardcoded values 2026-06-23 18:02:48 +04:00
agureev
128ebc0c64 tests: add vpk binding tests 2026-06-23 15:51:59 +04:00
agureev
973061e88f test: fix state test 2026-06-23 15:51:58 +04:00
agureev
090c368c14 tests: test and flow updates 2026-06-23 15:51:58 +04:00
agureev
526f9ccb32 feat(ppc)!: introduce protocol-level changes for vpk binding
BREAKING:

Before: The epk and the vpk of the receiver were not bound to the ss
that was directly fed to the circuit.

After: The ss, epk, tag fields are removed as explicit arguments
per-account and instead replaced by supplying a vpk, esk per
account. The ss, epk, tag all constructed in-circuit. Account ID
generation now uses vpk as additional argument.

Mitigation: Change Account ID generation to include the vpk, change
proving inputs.
2026-06-23 15:46:23 +04:00
agureev
10066be8e3 feat: optimize encryption computation by using slices 2026-06-23 14:54:24 +04:00
agureev
2fd8c1b157 refactor: expose ML KEM and esk in-guest 2026-06-23 14:54:03 +04:00
moudyellaz
77cfff5256 feat(cross-zone): add inbox watcher and seed inbox config at genesis 2026-06-23 10:17:46 +02:00
moudyellaz
0631ffc481 feat(cross-zone): add ping_sender and thread target_accounts through outbox emission 2026-06-22 17:55:22 +02:00
moudyellaz
42078d0305 test(cross-zone): add ping_receiver and a single-zone inbox dispatch test 2026-06-19 17:50:50 +02:00
moudyellaz
30bd869ac2 feat(cross-zone): add inbox and outbox guest programs with genesis registration 2026-06-19 00:48:10 +02:00
Daniil Polyakov
d6e68a52ca feat(state): forbid private bridge withdrawals 2026-06-16 22:10:11 +03:00
jonesmarvin8
79ba5a1194
refactor(lee::signature) (#531)
* address issue 514

* Fixed clippy
2026-06-16 09:18:31 -04:00
Artem Gureev
68062b33c7
Merge pull request #523 from logos-blockchain/artem/bind-discovery-to-journal
fix: bind the EncryptedAccountData to instance
2026-06-12 13:18:31 +04:00
Roman Zajic
109b27ecbf
Merge pull request #522 from logos-blockchain/test-address-missed-mutants
test: Address missed mutants discovered during fuzzing
2026-06-12 10:12:32 +08:00
Roman
9e42371c34
fix: remove pinata token program related test 2026-06-12 08:20:56 +08:00
jonesmarvin8
61f3ab7b52
feat!(key_protocol): update public account keys to be PQ resilient. (#362)
* initialize pq-keys branch

* minor update

* fixed lint and unit test

* clippy fixes

* fmt

* Update private_key.rs

* fixed tests

* addressed comments

* fix expect message

* change key labels for better naming

* clippy and fmt fixes

* Rebased
2026-06-11 15:20:46 -04:00
agureev
31f1268365 refactor: use exlicit ViewTag type 2026-06-11 16:33:13 +04:00
agureev
761ca5e127 chore: fmt 2026-06-11 16:11:41 +04:00
agureev
64b3113ac9 chore: lint changes 2026-06-11 16:04:49 +04:00
agureev
5d2b998ed2 tests: add tests for encryption data binding 2026-06-11 14:38:10 +04:00
Roman
759d4a849e
test: address mutants discovered during fuzzing 2026-06-11 17:37:21 +08:00
agureev
4f64d82c11 test: change up tests 2026-06-10 22:14:09 +04:00
agureev
94157ead38 feat(lee): bind epk/view tag verifier side 2026-06-10 22:11:05 +04:00
agureev
70efcdc59d feat(lee): push full encryption data to circuit output 2026-06-10 22:06:42 +04:00
agureev
6c9ee8896a feat(lee): make EncryptedAccountData guest-availiable
Likewise moves the epk definition outside of host-gated module
2026-06-10 21:59:55 +04:00
moudyellaz
b784ee565d fix: address review feedback 2026-06-08 19:36:28 +02:00
moudyellaz
a2c89866a4 fix: reject malformed privacy-preserving proof instead of panicking 2026-06-08 12:06:19 +02:00