241 Commits

Author SHA1 Message Date
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
moudyellaz
113d5db6f5 fix(cross-zone): make InitConfig idempotent under genesis replay 2026-07-24 08:32:45 +02: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
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
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
erhant
1feebc1d91 fix(chain_state): dont allow same hash+msgId on a different blockId 2026-07-23 11:43:57 +03:00
erhant
8d09ffd733 feat(sequencer): two-tier chain state and multi-sequencer support
Decentralized-sequencing foundation: a shared chain_state crate (two-tier
head/final ChainState, apply_block, AcceptOutcome, StallReason, and the
absorbed channel-consistency machinery), turn-gated block production, the
publisher follow path for adopted/orphaned/finalized peer blocks, and
persistence that keeps disk order equal to apply order under the chain lock.

Rebased onto dev after #600/#606: chain_consistency is absorbed into
chain_state, the sequencer bootstrap's verify_and_reconstruct is re-wired
onto the two-tier ChainState (reconstruction applies channel history
through the final tier and persists via the follow-path primitives), and
test fixtures adopt the SequencerSetup builder extended with
with_bedrock_signing_key.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 11:43:57 +03:00
Pravdyvy
e1e55e72e5 fix(wallet): suggestions fix 2 2026-07-23 08:30:05 +03:00
moudyellaz
72195ce09e Merge origin/dev 2026-07-23 02:43:53 +02:00
Artem Gureev
0e4ab5006d feat(wallet): create a regular shared account under a supplied identifier 2026-07-22 22:31:32 +04:00
Artem Gureev
50a1972788 fix(wallet): catch up a shared account from genesis on registration 2026-07-22 22:31:32 +04:00
agureev
61cad70f9b feat(circuit): supply a view_tag on private-account updates 2026-07-22 22:31:31 +04:00
Pravdyvy
b6b5b4397a fix(wallet): suggestions fix 2026-07-22 13:21:27 +03:00
Pravdyvy
ff0efddccc fix(fmt): fmt 2026-07-22 10:47:37 +03:00
Pravdyvy
3f3f5d77d6 fix(wallet): unit test fix 2026-07-22 10:13:01 +03:00
Daniil Polyakov
e440430a50 feat(sequencer): add more reconstruction tests 2026-07-21 22:46:47 +03:00
Daniil Polyakov
61f17612d9 fix(storage): rename ZonCursor to ZoneAnchor 2026-07-21 22:46:47 +03:00
Daniil Polyakov
e3442c695f fix(sequencer): fix silent reconstruction when only genesis was committed 2026-07-21 22:46:47 +03:00
Daniil Polyakov
8fdc3f203d fix(sequencer): don't increment withdrawals count on reconstruction to prevent phantom counts 2026-07-21 22:46:47 +03:00
Daniil Polyakov
3e7e9ed4e1 fix(sequencer): fix double mint on deposit when reconstructing state 2026-07-21 22:46:47 +03:00
Daniil Polyakov
2d5489c04e feat(sequencer): bootstrap state from Bedrock 2026-07-21 22:46:25 +03:00
moudyellaz
e278437266 refactor(cross-zone): fund bridge-lock holdings with a real native balance 2026-07-21 18:28:04 +02:00
Pravdyvy
0c32025c4b feat(wallet_ffi): multi-poller 2026-07-21 18:01:04 +03:00
moudyellaz
f4a5d85c65 refactor(cross-zone): seed cross-zone config via genesis transactions 2026-07-21 15:19:16 +02:00
moudyellaz
a806ebb94a refactor(cross-zone)!: register cross-zone programs as base builtins
BREAKING CHANGE: GenesisAction::DeployProgram and IndexerConfig.deploy_programs are removed. The cross-zone programs (inbox, outbox, ping_sender, ping_receiver, bridge_lock, wrapped_token) are now base builtins in testnet_initial_state, because program bytecode exceeds the genesis block inscription limit, so they cannot be shipped through genesis transactions.
2026-07-21 10:50:41 +02:00
Pravdyvy
580c466124 feat(wallet): distributed transaction sending 2026-07-20 17:10:01 +03:00
Pravdyvy
396dd17c21 Merge branch 'Pravdyvy/multi-sequencer-client' into Pravdyvy/request-distribution-for-multiple-sequencers 2026-07-20 14:09:57 +03:00
Pravdyvy
0b327795f4 fix(integration_tests): integration tests fix 2 2026-07-20 13:47:06 +03:00
Pravdyvy
231c2387e0 fix(integration_tests): integration tests fix 2026-07-20 12:26:42 +03:00
Pravdyvy
7b51d0c200 fix(wallet): removed redundant clones 2026-07-20 11:50:37 +03:00
Pravdyvy
eaa76f5e7e fix(wallet): suggestions 3 2026-07-20 11:34:05 +03:00
Pravdyvy
1ac56373b6 fix:(wallet): suggestion 2 2026-07-17 17:44:09 +03:00
Pravdyvy
b3810ff77d fix(wallet): added client rotation 2026-07-17 17:31:11 +03:00
Pravdyvy
0bc08c7357 fix(wallet): suggestions 2026-07-17 16:57:12 +03:00
moudyellaz
9380198eb9 refactor(cross-zone): use the Balance alias for holding amounts and debug-log skipped replays 2026-07-16 12:44:36 +02:00
moudyellaz
0f88fda054 Merge origin/dev 2026-07-16 12:44:07 +02:00
Pravdyvy
441e43ef91 Merge branch 'dev' into Pravdyvy/multi-sequencer-client 2026-07-15 16:40:38 +03:00
Pravdyvy
9cd7f51e97 fix(wallet): multiple leaders inclusion 2026-07-15 16:36:45 +03:00
Pravdyvy
ba741da37b Merge branch 'dev' into Pravdyvy/multi-sequencer-client 2026-07-15 13:45:44 +03:00
Pravdyvy
651229c454 fix(wallet_ffi): merge upfix 2026-07-15 13:35:53 +03:00
Pravdyvy
e4fd9b2397 Merge branch 'dev' into Pravdyvy/pda-account-id-generation 2026-07-15 12:57:16 +03:00