3113 Commits

Author SHA1 Message Date
Artem Gureev
e13b4cb237 feat!: key note encryption on the nullifier, drop the output index
BREAKING!

Before: The ciphertext key got generated via using the commmitment and
its index as the key.

After: The ciphertext key replaces the commitment dependence by a
nullifier dependence, still making the key unique by global state. The
nullifier is assumed to be the nullifier of the pre-state of the account.

Mitigation: Use the new decryption algorithm.
2026-07-28 11:09:28 +00:00
Artem Gureev
a9f492bb3f refactor(lee_core): expose nullifier byte-array 2026-07-28 10:58:57 +00:00
Pravdyvy
787a15aad3
Merge pull request #638 from logos-blockchain/Pravdyvyi/parallel-client-actualization
feat(wallet): multi-sequencer client parallelizm
2026-07-28 11:37:41 +03:00
Pravdyvy
7df30eb90f
Merge pull request #646 from logos-blockchain/Pravdyvy/valid-proof-test-runs-only-on-main-or-dev-commits
ci!: valid_proof_test removed from PRs
2026-07-28 10:12:11 +03:00
Pravdyvy
012464a719 ci!: valid_proof_test removed from PRs 2026-07-28 08:03:29 +03:00
Pravdyvy
277f641472 fix(wallet): suggestions 3 2026-07-28 07:55:43 +03:00
Artem Gureev
e018dc9ac4
Merge pull request #592 from logos-blockchain/artem/dummy-note-padding
feat: dummy note padding
2026-07-27 21:11:01 +04:00
Pravdyvy
8389f060c4 fix(wallet): suggestions 2 2026-07-27 16:14:03 +03:00
Pravdyvy
b8818950c9 Merge branch 'dev' into Pravdyvyi/parallel-client-actualization 2026-07-27 13:36:33 +03:00
Pravdyvy
60a78aec08 fix(wallet): suggestions fix 2026-07-27 13:24:56 +03:00
Sergio Chouhy
63e1a952c5
Merge pull request #596 from logos-blockchain/schouhy/add-wallet-cli-change-network-command
feat(lez/wallet): add change-network command
2026-07-25 00:27:39 -03:00
Sergio Chouhy
d958066d78 feat(lez/wallet): add change-network command 2026-07-24 22:58:32 -03:00
Sergio Chouhy
1335593cb3
Merge pull request #594 from logos-blockchain/schouhy/fix-wallet-recipient-signing
fix(lez/wallet): drop signing with recipient keys
2026-07-24 22:57:48 -03:00
Sergio Chouhy
b3eb74cf46 fix(lez/wallet): drop signing with recipient keys 2026-07-24 18:05:40 -03:00
agureev
df13f3f17d chore: regenerate artifacts 2026-07-24 21:48:24 +04:00
Artem Gureev
2e8a01ac95 refactor: warn on private-padding saturation and rename to execute_and_prove_with_padded_inputs 2026-07-24 17:00:36 +00:00
agureev
2ed620097b chore: regenerate artifacts and fixtures 2026-07-24 16:38:04 +00:00
Artem Gureev
147967c1d8 test(wallet): pin private-transaction note padding to max 2026-07-24 16:38:04 +00:00
Artem Gureev
2999288a57 test(lee): pin for_dummy nullifier and commitment derivations 2026-07-24 16:38:04 +00:00
agureev
93b1ee2839 chore: regenerate artifacts and fixtures 2026-07-24 16:38:04 +00:00
Artem Gureev
fd3646e127 feat(wallet): pad private transactions to a fixed maximum 2026-07-24 16:37:52 +00:00
Artem Gureev
d30490442d fix(wallet): encapsulate dummy note epk in wallet 2026-07-24 16:37:52 +00:00
Artem Gureev
0a783a35ca refactor(wallet): dedup randomness helpers, fill dummy note directly 2026-07-24 16:37:15 +00:00
Artem Gureev
4ba0268bab feat(wallet): construct and submit dummy inputs
Ciphers submitted currently have no data
2026-07-24 16:36:13 +00:00
Artem Gureev
5d13e0acc5 feat(circuit): use dummy_inputs in ppc 2026-07-24 16:36:13 +00:00
Artem Gureev
31a17d74a3 feat(lee): add for_dummy nullifier and commitment derivations 2026-07-24 16:36:13 +00:00
Artem Gureev
b9c03d3805 feat(lee): add dummy account type for function-privacy padding 2026-07-24 16:36:13 +00:00
Moudy
fb98e2d564
Merge pull request #615 from logos-blockchain/moudy/cross-zone-cleanup
refactor!(cross-zone): deploy programs at genesis instead of builtins
2026-07-24 18:24:43 +02:00
moudyellaz
d6a2075a7c fix(sequencer): gate bootstrap republish on channel existence, not finalized-scan emptiness 2026-07-24 14:33:24 +02:00
Pravdyvy
ee0313b80c Merge branch 'dev' into Pravdyvyi/parallel-client-actualization 2026-07-24 13:48:10 +03:00
Pravdyvy
a3c2f08ea5 fix(wallet_ffi): simplification 2026-07-24 13:46:45 +03:00
Pravdyvy
7e5728b535
Merge pull request #623 from logos-blockchain/Pravdyvy/request-distribution-for-multiple-sequencers
feat(wallet)!: Request distribution for multiple sequencers
2026-07-24 12:50:22 +03:00
moudyellaz
cf83da946a test(sequencer): give bootstrap finalize-waits a dedicated longer timeout 2026-07-24 08:32:55 +02:00
moudyellaz
113d5db6f5 fix(cross-zone): make InitConfig idempotent under genesis replay 2026-07-24 08:32:45 +02:00
Pravdyvy
bfb62d9b30 Merge branch 'Pravdyvy/request-distribution-for-multiple-sequencers' into Pravdyvyi/parallel-client-actualization 2026-07-24 08:11:51 +03:00
Pravdyvy
a27255c5ce Merge branch 'dev' into Pravdyvy/request-distribution-for-multiple-sequencers 2026-07-24 08:10:42 +03:00
Pravdyvy
93eed48112 fix(wallet): suggestion fix 3 2026-07-24 08:02:03 +03:00
moudyellaz
d9787eb72f style(sequencer): backtick InitConfig in build_initial_state doc comment 2026-07-24 01:07:41 +02:00
moudyellaz
150cd17ff5 Merge origin/dev 2026-07-24 00:56:00 +02:00
moudyellaz
124bbee6c6 Merge origin/dev 2026-07-23 23:59:36 +02:00
jonesmarvin8
6c0bd71523
refactor: PrivateUnauthorized authorization changed to true (#621)
* refactor: rename PrivateUnauthorized to PrivateForeignInit

The account_identity's is_authorized flag no longer determines
authorization for this variant, so keep the name tied to what
actually distinguishes it: no nsk, only npk (a foreign account init).

* chore: rebuild guest artifacts and bump spin to clear yanked advisory

Regenerate ELF artifacts after the PrivateForeignInit rename in lee_core
(compiled into every guest program), and update spin 0.9.8 -> 0.9.9 since
0.9.8 was yanked from crates.io, per cargo deny check advisories.

* test: align is_authorized with PrivateForeignInit's flipped semantics

Recipient pre-states built for PrivateForeignInit now need is_authorized:
true to match the assertion in output.rs. Also rewrites the boundary test
that checked the old invalid case to check the new one, and updates
stale "unauthorized" wording left over from the PrivateUnauthorized name.

* chore: rebuild guest artifacts

Reproducible across repeated local builds; likely toolchain drift since
the prior artifact commit rather than a source change, since no
guest-relevant source or Cargo.lock changed in between.

* fix(tests): align integration tests with PrivateForeignInit and regenerate fixture

prove_init_with_commitment_root (private.rs) and build_privacy_transaction
(tps.rs) still built PrivateForeignInit recipients with is_authorized: false,
same stale-semantics bug fixed earlier in the lee crate's own tests.

The prebuilt sequencer DB dump embeds program IDs derived from guest ELF
bytes, which shifted once the PrivateForeignInit rename changed lee_core
(compiled into every guest program). The stale dump caused widespread
"Unknown program" failures across integration test suites that exercise
deployed programs (wallet_ffi, auth_transfer, bridge, amm, token, pinata,
ata, indexer state-consistency checks). Regenerated via
`just regenerate-test-fixture`.

* fix(tests): rename leftover PrivateUnauthorized to PrivateForeignInit and regenerate fixture

* test: align is_authorized with PrivateForeignInit's flipped semantics

* chore: regenerate test fixture after rebase onto dev

* chore: regenerate test fixture after rebase onto dev

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 17:32:01 -04:00
moudyellaz
dc977db7ab refactor: destructure genesis fingerprint and return an iterator from bridge_lock_holdings 2026-07-23 21:55:55 +02:00
jonesmarvin8
914f14e870
refactor(keycard_wallet): replace keycard-py with keycard-rs (#595)
* refactor(keycard_wallet): replace keycard-py (pyo3) with native keycard-rs

Rewrites the Keycard integration to talk to the LEE-flavored applet
directly from Rust via keycard-rs (pinned git dependency), dropping the
pyo3 shim, python_path.rs, and the vendored keycard-py Python library
entirely. Verified end-to-end against real hardware: pairing, PIN
verification, mnemonic loading, BIP340 Schnorr signing, and transfers
between keycard and public/private accounts.

Also cleans up the pyo3 usage that had leaked into wallet's signing
path (signing.rs, account_manager.rs) beyond the keycard CLI itself,
and trims wallet_with_keycard.sh's Python setup down to just pyscard,
which is only needed by the force_unpower.py test helper now.

* Updated to v2 secure communication

* ci: install libpcsclite-dev for pcsc crate builds

* docs(keycard): clarify personalization is mandatory and document default CA

Reinstalling the applet via `./gradlew install` wipes any existing
personalization regardless of firmware source, which wasn't previously
called out and is a common source of "card not available" confusion.
Also state plainly that personalization is required before any command
works, and document keycard-rs's actual baked-in default CA public key
instead of only describing the override mechanism.

Export KEYCARD_CA_PUBLIC_KEY in all keycard test scripts so they work
against the dev/test-CA personalization flow they rely on.

* fix(keycard): address PR #595 review comments

- Propagate the load_mnemonic error instead of swallowing it behind
  is_ok(), matching every other command handler in this file.
- Add deny.toml allowing the keycard-rs git source, fixing the
  source-not-allowed failure in `cargo deny check`. Licenses and
  advisories checks still have pre-existing, separate failures not
  addressed here.
- Drop the pinned rev for the keycard-rs git dependency so it tracks
  the upstream default branch instead.

* chore(deny): trim deny.toml to essentials and allow all in-use licenses

Replace the full cargo-deny init template with just the two sections
that matter: the keycard-rs git-source allowance, and an explicit
license allow-list covering every license currently in the dependency
tree. cargo deny check now passes on sources, bans, and licenses;
advisories still fails on a pre-existing, unrelated RUSTSEC advisory.

* fix(deny): remove second config and add source to the original one

* chore: pin keycard-rs dependency and fix factory-reset debug-gate doc

* chore: regenerate test fixture and lockfile after rebase onto dev

---------

Co-authored-by: Daniil Polyakov <arjentix@gmail.com>
2026-07-23 15:50:30 -04:00
jonesmarvin8
7bc4c460a2
fix!(state_machine): reject public transactions that silently drop a d… (#625)
* fix(state_machine): reject public transactions that silently drop a declared account

ValidatedStateDiff::from_public_transaction never checked that the accounts
touched in a program's output matched the caller-declared message.account_ids
— it just folded whatever pairs the program returned into the diff. A program
(or a macro-generated dispatcher wrapping one) that silently drops an account
from both sides of its own output together stays internally consistent
(pre_states.len() == post_states.len()) and passes validate_execution's
existing checks, so the dropped account simply vanishes with no error.

Add a check after the chained-call loop: every account_id in
message.account_ids must appear in the final state_diff, or the transaction is
rejected with the new DeclaredAccountMissingFromOutput error.

Add a dropped_account test-guest program that reproduces the exact shape of
the bug (two pre_states in, one consistent (pre, post) pair out) and a
regression test proving the transaction is now rejected. Verified the test
fails with Ok(()) when the check is removed, and passes once it's restored.

* style: tighten comments and apply nightly rustfmt

Condense the explanatory comments on the new account-accounting check and the
dropped_account test guest, and fix imprecise wording (the account is dropped
from both pre_state and post_states together, not just pre_state). Also
applies cargo +nightly fmt's wrapping of the new error message.

* chore: regenerate test fixture after rebase onto dev
2026-07-23 12:09:16 -04:00
Pravdyvy
70ac6b3294 fix(wallet): merge postfix 2026-07-23 14:59:54 +03:00
Pravdyvy
17aaef0b03 Merge branch 'dev' into Pravdyvy/request-distribution-for-multiple-sequencers 2026-07-23 14:57:29 +03:00
Pravdyvy
d34d269350 fix(wallet): more parallelization 2026-07-23 14:56:18 +03:00
erhant
6a1a2911d9
Merge pull request #603 from logos-blockchain/erhant/lez-two-tip-chain-state
feat!(indexer, sequencer): common two-tip chain state for decentralized sequencing
2026-07-23 12:44:23 +03:00
erhant
2abb643129 chore: regenerate test fixture for the view-tag circuit 2026-07-23 12:01:24 +03:00
erhant
71b59ac1b8 fix(sequencer): add apply_produced which is like apply_adopted but for our own block, which is not in channel yet 2026-07-23 11:43:57 +03:00