56 Commits

Author SHA1 Message Date
erhant
6eb1435062 refactor(sequencer, storage): review nit-fixes, sync follow sink, validate-on-deserialize with turn bounds. 2026-07-20 15:05:26 +03:00
erhant
0135049710 fix(chain_state, sequencer, storage): rebuild the two-tier state on restart
- persist a final-tier snapshot (state + meta) atomically with the follow update that advanced it; on boot, anchor `final` on it and replay stored blocks above it as `head`, so a post-restart orphan of a not-yet-finalized block still reverts instead of silently diverging
- correlate orphan/finalize events by block hash: restored head entries carry hash-derived sentinel MsgIds (the real ones are not persisted)
- a finalized block chaining on an unfinalized head entry finalizes that prefix (finality is prefix-monotone)
- warn on (and keep ignoring) a same-height adopted competitor that arrives without its orphan sibling — an SDK-contract breach worth surfacing
- follow path reverts orphans via one batched `apply_channel_update` (single truncate + head re-derivation) instead of a re-derivation per orphan
- remove DESIGN.md, move to task docs instead
- trim very long comments / docstrings
2026-07-16 18:11:44 +03:00
erhant
f8bc1581ce fix(chain_state, sequencer, indexer): finalized re-delivery dedup, non-blocking orphan resubmit, fail-fast validation 2026-07-16 14:10:54 +03:00
erhant
c9e3bf2a05 feat(sequencer): multi-sequencer demo ergonomics (--home override, pubkey helper, demo recipes) 2026-07-15 13:35:23 +03:00
erhant
ed8c9c253d fix(sequencer): persist follow updates atomically in one write batch 2026-07-15 13:35:23 +03:00
erhant
9d1d33363a fix(sequencer): skip persistence when a produced block loses the competing-write race 2026-07-15 13:35:23 +03:00
erhant
abd70d699c fix(sequencer): use ED25519_SECRET_KEY_SIZE and retain BoundedError message 2026-07-15 13:35:23 +03:00
erhant
2c5bac506b docs(sequencer): clarify queued semantics of adminConfigureChannel 2026-07-15 13:35:23 +03:00
erhant
e802a2a364 feat(sequencer): adminConfigureChannel RPC for channel roster changes 2026-07-15 13:35:23 +03:00
erhant
f761d66dba feat(sequencer): channel roster configuration through the block publisher 2026-07-15 13:22:00 +03:00
erhant
0612132bed test(chain_state,sequencer): add unit tests for chain_state 2026-07-15 13:22:00 +03:00
erhant
0b6a947713 fix(sequencer): correct test assertion 2026-07-15 13:22:00 +03:00
erhant
a0f7957468 chore: add TODO doc about transient apply failures [skip ci] 2026-07-15 13:22:00 +03:00
erhant
0046a1c822 feat(sequencer): now keep orphaned in mempool + use with_state to avoid clone for method calls to V03State 2026-07-15 13:22:00 +03:00
erhant
cb23561b3a feat(sequencer): store adopted and finalized blocks on disk within on_follow 2026-07-15 13:20:38 +03:00
erhant
82bb454615 chore: formatting 2026-07-15 13:20:38 +03:00
erhant
530f7d77c4 feat!(sequencer): derive state from ChainState via state() method, remove the state attribute 2026-07-15 13:20:38 +03:00
erhant
c0d4aa4fac fix(sequencer): apply the own-published block immediately to the head & dedup it later if received 2026-07-15 13:20:38 +03:00
erhant
d0be0fe46c feat(sequencer): read channel_update and respect adopted/orphaned blocks 2026-07-15 13:20:38 +03:00
erhant
d4d28d1134 feat!(sequencer): add is_our_turn 2026-07-15 13:20:38 +03:00
moudyellaz
eff31df9ce Merge origin/dev 2026-07-11 01:12:00 +02:00
Daniil Polyakov
d0aaddbec1 feat(test_fixtures): use prebuilt sequencer dp to speed up integration tests 2026-07-09 17:15:29 +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
moudyellaz
9f7db3fa38 Merge origin/dev 2026-07-04 00:48:40 +02:00
moudyellaz
71c9351727 feat(cross-zone): add interactive two-zone chat demo app 2026-07-04 00:47:20 +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
8e084e22d1 Merge remote-tracking branch 'origin/dev' into artem/viewing-key-binding 2026-07-02 20:04:30 +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
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
Daniil Polyakov
d11b706756 feat(sequencer): add getChannelId rpc endpoint 2026-06-25 16:47:04 +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
d3e507f25d refactor!(artifacts): keep lee and lez artifacts separated 2026-06-24 18:10:41 +03:00
moudyellaz
2c387899c4 feat(cross-zone): recognize multiple emitters via a shared extractor 2026-06-24 11:33:15 +02: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
moudyellaz
77cfff5256 feat(cross-zone): add inbox watcher and seed inbox config at genesis 2026-06-23 10:17:46 +02:00
Pravdyvy
855788c2ea fix(ci): ci fix 2026-06-17 12:54:27 +03:00
Pravdyvy
0fae6aada2 Merge branch 'main' into Pravdyvy/programs-elfs-deployments 2026-06-17 10:36:19 +03: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
d6e68a52ca feat(state): forbid private bridge withdrawals 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
Petar Radovic
a12d8ecf87 clippy 2026-06-15 12:30:18 +02:00
Petar Radovic
c2f93aff59 clippy 2026-06-15 12:28:05 +02:00
Petar Radovic
13f15530e4 update logos blockchain deps + drive loop fix 2026-06-15 12:22:00 +02:00