504 Commits

Author SHA1 Message Date
moudyellaz
eff31df9ce Merge origin/dev 2026-07-11 01:12:00 +02:00
erhant
f188dbdb97 test(indexer): rename test, move to more suitable file 2026-07-10 18:35:01 +03:00
erhant
2c395b95a6 chore: fix typos, enable ignored test 2026-07-10 18:35:00 +03:00
erhant
f94a63d8cf fix(indexer)!: address several reviews, use better return types with conversions, some docfixes
BREAKING CHANGE: dropping the serde rename attrs changes the FFI
`query_status` JSON: `state` values are now variant-cased
(`caught_up` -> `CaughtUp`) and fields snake_case
(`indexedBlockId` -> `indexed_block_id`, `lastError` -> `last_error`).
Consumers (lez-indexer-module, lez-explorer-ui) must update their parsing.
2026-07-10 18:35:00 +03:00
erhant
eaf2e2d07f feat(indexer): expose status over RPC and add integration coverage
test `RUST_LOG=info RISC0_DEV_MODE=1 cargo test -p integration_tests --test bridge --indexer_status_rpc_reports_caught_up_with_no_stall --exact --nocapture --include-ignored`
2026-07-10 18:35:00 +03: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
Artem Gureev
1b4d8fbcf4
Merge pull request #550 from logos-blockchain/artem/viewing-key-binding
feat!: viewing key and ciphertext binding
2026-07-08 20:17:37 +04:00
moudyellaz
e4da11c7b7 Merge origin/dev
Syncs dev (which merged main via #593) and reconciles the indexer testnet-state fix with the cross-zone genesis seed in block_store.rs open_db.
2026-07-04 08:57:02 +02: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
Sergio Chouhy
ae0705995f fix: solve merging conflicts with main 2026-07-03 15:07:35 -03:00
agureev
8e084e22d1 Merge remote-tracking branch 'origin/dev' into artem/viewing-key-binding 2026-07-02 20:04:30 +04:00
jonesmarvin8
571f35b384
refactor(integration_tests): cleaning up long functions (#533)
* refactoring integration_tests::keys

* refactor integration_tests: extract new_account/send/restored_private_account helpers

Move repeated account-creation and transfer boilerplate into four public
helpers in integration_tests/src/lib.rs (new_account, send,
restored_private_account, assert_public_account_restored), then apply them
across keys.rs, ata.rs, auth_transfer/public.rs, auth_transfer/private.rs,
token.rs, and amm.rs.  Net result: -816 lines of boilerplate.

* Additional refactors

* refactor(integration_tests): apply shared helpers to remaining test files

Use account_balance, get_account, new_account, send, and sync_private
helpers in public.rs, pinata.rs, private_pda.rs, program_deployment.rs,
and token.rs to reduce boilerplate and improve consistency.
2026-07-01 12:13:51 -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
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
Pravdyvy
97aa85d123
Merge pull request #577 from logos-blockchain/Pravdyvy/wallet-ffi-labels
Wallet ffi labels
2026-07-01 15:32:16 +03:00
Daniil Polyakov
fc800a7151 fix(sequencer): don't accept zero deposits & remove unreachable 2026-06-30 12:38:22 +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
fade3b488a feat(integration_tests): added integration tests for wallet ffi 2026-06-26 16:48:00 +03:00
moudyellaz
36ed949be0 chore: some cleanup 2026-06-25 09:38:30 +02:00
moudyellaz
ff7610804a feat(cross-zone): pin peer block-signing keys and distinguish verifier lag from forgery 2026-06-25 08:21:49 +02:00
moudyellaz
fef7ce2c38 feat(cross-zone): reject user-origin calls to the sequencer-only inbox 2026-06-25 05:49:44 +02:00
Daniil Polyakov
96b28827f6 fix(tests): fix tests 2026-06-24 20:20:40 +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
moudyellaz
4fd465b529 test(cross-zone): add lock-on-A mint-on-B bridge round trip 2026-06-24 14:51:52 +02:00
Pravdyvy
d8c50ceb59 Merge branch 'main' into Pravdyvy/ffi-mnemonic 2026-06-24 13:02:12 +03:00
Sergio Chouhy
47a94ac7e4 feat(wallet-ffi): add vault claim ffi 2026-06-24 10:35:31 +02:00
moudyellaz
60741a7191 fix(cross-zone): halt the indexer on a failed block and add the verified round-trip test 2026-06-23 18:20:44 +02:00
erhant
1c1e80f646 feat(indexer)!: make storage location caller-driven, not config-driven
The indexer's storage location was the `home` field of IndexerConfig, used only to derive the RocksDB dir. Defaulting to "." meant it landed in the process CWD — fine for the standalone service, but wrong when the indexer runs embedded in a logos_host subprocess (RocksDB ended up in an arbitrary/unwritable dir). Storage location is an operational concern the host should own, not something baked into a user-editable config.

Remove `home` from IndexerConfig and pass the storage directory explicitly:

  - core: `IndexerCore::new(config, storage_dir)` derives `<storage_dir>/rocksdb`.
  - ffi: `start_indexer(runtime, config_path, storage_dir)`; null/empty storage_dir falls back to ".". Lets a host (e.g. a Logos module's instance persistence path) own where state lives.
  - service: `run_server(config, storage_dir, port)` + a `--data-dir` flag (default ".") on the binary, preserving current behaviour.
  - drop `home` from the committed indexer config JSONs and the test fixtures.

BREAKING CHANGE: `start_indexer` gains a `storage_dir` parameter and IndexerConfig no longer has a `home` field.
2026-06-23 15:57:33 +03:00
erhant
0c52ec9695 fix(indexer): stop FFI integration tests segfaulting on query_account
The indexer FFI test helper borrowed `ctx.runtime()` via `Runtime::from_borrowed` and then moved `ctx` (and its by-value `tokio::runtime::Runtime` field) into the tuple returned from `setup()`. That move relocates the runtime, leaving the raw pointer the indexer stored dangling. Sync queries never touch the runtime, so they passed; `query_account` is the only path that `block_on`s it, so it dereferenced freed stack memory → SIGSEGV (hence only the two `indexer_ffi_state_consistency*` tests crashed).

Pass a null runtime so the FFI creates and owns its own — the same lifetime path the production module uses (`start_indexer(nullptr, …)`) — instead of borrowing a runtime whose address isn't stable across the move.
2026-06-23 15:57:33 +03:00
erhant
f3134cde58 chore: fmt and lint 2026-06-23 15:57:33 +03:00
erhant
ea13ef10d8 refactor: drastically shorten (480s to 160s) the test time by adding block wait helper 2026-06-23 15:57:33 +03:00
erhant
4a3fa1d4be refactor: logger now only enables for indexer crates + takes in a loglevel option 2026-06-23 15:57:33 +03:00
erhant
956dc6278a fix!(indexer_ffi): fix 3 existing issues, refactor the runtime handling, rm unused cbindgen.toml 2026-06-23 15:57:33 +03:00
moudyellaz
0ddb7a9291 feat(cross-zone): add Option B indexer verifier and seed inbox config consistently 2026-06-23 14:21:16 +02:00
agureev
090c368c14 tests: test and flow updates 2026-06-23 15:51:58 +04:00
Pravdyvy
4d055c71a7 fix(integration tests): fixed wallet ffi integration test 2026-06-23 14:50:23 +03:00
moudyellaz
b83a3c7556 test(cross-zone): add two-zone ping round-trip integration test 2026-06-23 10:42:30 +02:00
moudyellaz
77cfff5256 feat(cross-zone): add inbox watcher and seed inbox config at genesis 2026-06-23 10:17:46 +02:00
Pravdyvy
5c28acc961 fix(wallet_ffi): suggestion fix 2026-06-23 11:10:53 +03:00
Pravdyvy
ca64789a90 Merge branch 'main' into Pravdyvy/ffi-mnemonic 2026-06-22 14:00:08 +03:00
Sergio Chouhy
32c6b9e5fc feat: add withdraw ffi 2026-06-18 16:35:44 -03:00
Pravdyvy
c6d7f37a1a Merge branch 'main' into Pravdyvy/ffi-mnemonic 2026-06-18 18:44:00 +03:00
moudyellaz
26bc23482a test(fixtures): parameterize Bedrock channel per zone, add two-zone harness test 2026-06-18 02:02:46 +02:00
Daniil Polyakov
e5ca40c0f9 feat: add bedrock withdraw events validation 2026-06-16 22:10:11 +03:00
Daniil Polyakov
77f1fb3f21 feat(wallet): add bridge withdraw command 2026-06-16 22:10:11 +03:00
Daniil Polyakov
e9e30ff019 feat(sequencer): implement bridge withdraw flow 2026-06-16 22:10:11 +03:00