3122 Commits

Author SHA1 Message Date
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
erhant
1feebc1d91 fix(chain_state): dont allow same hash+msgId on a different blockId 2026-07-23 11:43:57 +03:00
erhant
caf38ebc0a chore: drop unused sequencer_service_protocol dep from integration_tests 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
Artem Gureev
6987a38da3
Merge pull request #591 from logos-blockchain/artem/view-tag-randomization
feat(circuit): view tag randomization for updated accounts
2026-07-23 11:37:22 +04:00
Pravdyvy
89240ae666 Merge branch 'Pravdyvy/request-distribution-for-multiple-sequencers' into Pravdyvyi/parallel-client-actualization 2026-07-23 08:34:10 +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
Artem Gureev
3474b375e4 test(circuit): view_tag is derived on init, passed through on update 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
e78b0724c6 feat(wallet): parallel actualization owned 2026-07-22 16:19:40 +03:00
Daniil Polyakov
b31ae10ee5
Merge pull request #606 from logos-blockchain/arjentix/sequencer-bootstrap
feat(sequencer): bootstrap state from Bedrock
2026-07-22 15:12:00 +03: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
moudyellaz
d4d2d56e47 chore: rebuild artifacts and regenerate test fixture 2026-07-22 04:22:17 +02: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
10e61bd354 fix(justfile): regenerate test fixture on artifacts rebuild 2026-07-21 22:46:47 +03:00
Daniil Polyakov
da2afba75a chore(lock): bump spin to 0.9.9 to satisfy cargo deny 2026-07-21 22:46:35 +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
Pravdyvy
4968db3dd7 Merge branch 'dev' into Pravdyvy/request-distribution-for-multiple-sequencers 2026-07-21 14:33:08 +03:00
Pravdyvy
ba43713328
Merge pull request #600 from logos-blockchain/Pravdyvy/multi-sequencer-client
feat(wallet)!: Multi-sequencer client
2026-07-21 14:30:27 +03: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
a0971018ea Merge branch 'dev' into Pravdyvy/multi-sequencer-client 2026-07-17 17:54:20 +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