Skip to content

refactor L1Message validation#12

Merged
FletcherMan merged 1 commit intoeip4844from
optm_collectedL1msgs
Jan 29, 2024
Merged

refactor L1Message validation#12
FletcherMan merged 1 commit intoeip4844from
optm_collectedL1msgs

Conversation

@FletcherMan
Copy link
Copy Markdown
Collaborator

No description provided.

@FletcherMan FletcherMan merged commit 457a55c into eip4844 Jan 29, 2024
FletcherMan added a commit that referenced this pull request Feb 7, 2024
* support eip4844 format batch

* refactor L1Message validation (#12)

* fix compile error

* update l2 genesis gen

* refactor chunk format for storing tx payload (#16)

* refactor chunk format for storing tx payload

* add testcase

* devnet-l1 move on

* wait proxy deployed

* support eip4844 (#17)

Co-authored-by: chengwenxi <22697326+chengwenxi@users.noreply.github.com>

* make L2-genesis work

* add L2-genesis to go.work

* make build work for node and geth

* add gasOracle

* make other components work

* add gateways deploy

* add predeploy address in bindings

* Ops marvel (#19)

* check in l1 geth code

* debug l1 beacon

* Eip4844 prover (#20)

* support eip4844

* blob chunk prove

---------

Co-authored-by: chengwenxi <22697326+chengwenxi@users.noreply.github.com>

* make repo tidy (#21)

* tidy contracts

* update l2 genesis gen

* go work update

* using replace go-ethereum

* refact ops code

* rm no use var in py

* upgrade go-ethereum

* allow all virtual host to access l1 8545

* fix

* EIP4844 prover (#22)

* Update from morph/prover (#18)

* update gen_chunk_proof

* batchBlob

* fix generate_proof

* update prover workflow

* update dependencies

---------

Co-authored-by: Kathy <842567494@qq.com>
Co-authored-by: chengwenxi <22697326+chengwenxi@users.noreply.github.com>

* Update from morph/prover (#18)

* WIP : Morph OPS (#13)

* update l2 genesis gen

* devnet-l1 move on

* wait proxy deployed

* make L2-genesis work

* add L2-genesis to go.work

* make build work for node and geth

* add gasOracle

* make other components work

* add gateways deploy

* add predeploy address in bindings

* Ops marvel (#19)

* check in l1 geth code

* debug l1 beacon

* make repo tidy (#21)

* tidy contracts

* update l2 genesis gen

* go work update

* using replace go-ethereum

* refact ops code

* rm no use var in py

* allow all virtual host to access l1 8545

* fix

* refine deploy script

---------

Co-authored-by: marvel.yu <marvelfisher@gmail.com>
Co-authored-by: anylots <842567494@qq.com>
Co-authored-by: FletcherMan <fanciture@163.com>

---------

Co-authored-by: kukoomomo <kukoomomo@gmail.com>
Co-authored-by: marvel.yu <marvelfisher@gmail.com>
Co-authored-by: vincent <vincent.ch.cn@gmail.com>
Co-authored-by: chengwenxi <22697326+chengwenxi@users.noreply.github.com>
Co-authored-by: anylots <842567494@qq.com>
Co-authored-by: kukoo <96556724+Kukoomomo@users.noreply.github.com>
@Kukoomomo Kukoomomo deleted the optm_collectedL1msgs branch February 7, 2024 06:58
chengwenxi added a commit that referenced this pull request Feb 7, 2024
* support eip4844 format batch

* refactor L1Message validation (#12)

* fix compile error

* pick from morph-l2/contracts#99

* upgrade to 0.8.24 to support blobhash

* update bindings

---------

Co-authored-by: FletcherMan <fanciture@163.com>
Co-authored-by: Rob Feng <rob.feng@bitget.com>
Co-authored-by: Rob Feng <flyq951@gmail.com>
Co-authored-by: chengwenxi <22697326+chengwenxi@users.noreply.github.com>
curryxbo added a commit that referenced this pull request Feb 26, 2024
* support eip4844 format batch

* refactor L1Message validation (#12)

* fix compile error

* derivation refactor

* fix log

* refactor chunk format for storing tx payload (#16)

* refactor chunk format for storing tx payload

* add testcase

* support eip4844 (#17)

Co-authored-by: chengwenxi <22697326+chengwenxi@users.noreply.github.com>

* replace BlobToData to DecodeRawTxPayload

* clean

* add beacon chain client

* reorganize TxHashes

* fix and clean

* fmt

* update ops

* revert irrelevant changes

* fix ops env

* fix validator test

* revert go version

* fix L1_BEACON_CHAIN_RPC

* fix docker env

* clean useless code

---------

Co-authored-by: FletcherMan <fanciture@163.com>
Co-authored-by: vincent <vincent.ch.cn@gmail.com>
Co-authored-by: chengwenxi <22697326+chengwenxi@users.noreply.github.com>
curryxbo pushed a commit that referenced this pull request May 9, 2026
…ed head anchors

Per morph-specs SPEC-005 §6.2 task table:

  #5  Drive derivation main loop on L1 safe; reorg detection unconditional
  #6  Persist safe_head anchor after each verified batch (+ metric)
  #6b finalized_head tracker advances at the tail of every iteration

Changes:

- node/derivation/config.go
  Default `Confirmations` flips from FinalizedBlockNumber to SafeBlockNumber,
  matching SPEC-005 §3.1 step 1. Operators may still override via
  `--derivation.confirmations`.

- node/derivation/derivation.go
  - Step 1: drop the `confirmations != Finalized` guard around detectReorg —
    reorg detection now runs every loop on the safe segment, per SPEC-005 §3.2.
  - After verifyBatchRoots success, write a HeadAnchor (L2 last block + L1
    commit block) as the new safe_head and update SafeHeadL2Number metric.
  - End of loop: invoke advanceFinalizedHead from the new finalized tracker.

- node/derivation/finalized_tracker.go (new)
  advanceFinalizedHead implements SPEC-005 §3.1 step 4. Two paths:
    cheap path:    safe_head.L1Number ≤ L1 finalized → ratchet to safe_head.
    steady-state:  walk commit-batch logs in (currentFinalized, L1 finalized],
                   decode-light the latest one, anchor finalized_head at its
                   L2 last block. Calldata-only — never fetches blob data.
  Monotonicity is enforced; any regression attempt halts the node.

- node/derivation/dual_channel.go
  Update header comment now that the main loop and finalized tracker are
  wired into both cursors.

Out of scope (per spec §6.2 / §8 and per project decision to leave full
rollback for the rollback-executor PR):
  - L1 anchor window depth tuning (#7 / §8 #1)
  - Path B implementation (#10) — skeleton stays
  - Rollback executor (#12) — skeleton stays in verify.go
  - Sequencer mutex wiring (#11) — skeleton stays
  - Admin RPC auth (#13 / §8 #2) — skeleton stays
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant