Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3a27bae
fix devnet docker submitter config
panos-xyz May 7, 2026
b793c64
support reth execution client in devnet
panos-xyz May 7, 2026
67128c8
use published reth image by default
panos-xyz May 7, 2026
74eed9e
remove devnet execution client test
panos-xyz May 7, 2026
d2bb14e
chore(docker-sequencer-test): rename bitget to polyrepo
panos-xyz May 8, 2026
1672b69
docs(devnet): add docstring to compose_file_args
panos-xyz May 8, 2026
4a2e1f3
docs(devnet): add docstring to devnet_deploy
panos-xyz May 8, 2026
f932750
docs(devnet): add docstrings to remaining functions
panos-xyz May 8, 2026
6d8d745
fix(devnet): isolate geth build config to prevent reth from inheritin…
panos-xyz May 8, 2026
8a5fc0a
fix(devnet): reset reth inherited geth builds
panos-xyz May 8, 2026
58c70f9
Merge pull request #947 from morph-l2/codex/devnet-reth-client
panos-xyz May 9, 2026
c82a145
refactor(node): remove validator/challenge bypass per SPEC-005
May 12, 2026
09a2c72
merge: bring in feat/multi_batch (PR #935) for SPEC-005 baseline
May 12, 2026
e2c6f57
refactor(derivation): extract verifyBatchRoots into verify.go
May 12, 2026
9f01c53
feat(derivation): SPEC-005 Path B — local-rebuild blob verification
May 12, 2026
a73639d
feat(node): SPEC-005 derivation-driven tag management + validator rol…
May 13, 2026
b9ad14e
test(derivation): SPEC-005 verify-mode + Path B unit tests
May 13, 2026
ffad1fc
merge: integrate origin/feat/multi_batch (resolves PR #951 CONFLICTING)
May 13, 2026
6b096f8
style(derivation): fix gofmt + misspell lint failures
May 13, 2026
d27d088
fix(sync): make Syncer.Start idempotent via sync.Once
May 13, 2026
af90615
fix(types): RetryableClient — treat ethereum.NotFound as permanent
May 14, 2026
6a7d3df
feat(derivation): structured failure diagnostics for Path B
May 14, 2026
9d9629e
fix(derivation): Path B blob encoding selector — dispatch on ABI vari…
May 15, 2026
c20983d
fix(derivation): finalizer resolves batchIndex -> header from local m…
May 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 59 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,27 +137,70 @@ go-ubuntu-builder:

################## devnet 4 nodes ####################

devnet-up: submodules go-ubuntu-builder
python3 ops/devnet-morph/main.py --polyrepo-dir=.
EXECUTION_CLIENT ?= geth
MORPH_RETH_BUILD_FROM_SOURCE ?= false
ifeq ($(MORPH_RETH_BUILD_FROM_SOURCE),true)
MORPH_RETH_IMAGE ?= morph-reth:latest
MORPH_RETH_ENTRYPOINT ?= /app/morph-reth
else
MORPH_RETH_IMAGE ?= ghcr.io/morph-l2/morph-reth:latest
MORPH_RETH_ENTRYPOINT ?= /usr/local/bin/morph-reth
endif
MORPH_RETH_DIR ?= ../morph-reth
MORPH_RETH_BUILD_PROFILE ?= release
MORPH_RETH_RUSTFLAGS ?=
MORPH_RETH_DOCKER_TARGET ?= builder
export MORPH_RETH_IMAGE
export MORPH_RETH_DIR
export MORPH_RETH_BUILD_PROFILE
export MORPH_RETH_RUSTFLAGS
export MORPH_RETH_DOCKER_TARGET
export MORPH_RETH_ENTRYPOINT
DEVNET_COMPOSE_FILES := -f docker-compose-4nodes.yml

ifeq ($(EXECUTION_CLIENT),geth)
DEVNET_EXECUTION_DEPS := submodules
else ifeq ($(EXECUTION_CLIENT),reth)
DEVNET_COMPOSE_FILES += -f docker-compose-reth.yml
ifeq ($(MORPH_RETH_BUILD_FROM_SOURCE),true)
DEVNET_EXECUTION_DEPS := reth
else
DEVNET_EXECUTION_DEPS := reth-image
endif
else
$(error unsupported EXECUTION_CLIENT "$(EXECUTION_CLIENT)", expected "geth" or "reth")
endif

devnet-up: $(DEVNET_EXECUTION_DEPS) go-ubuntu-builder
python3 ops/devnet-morph/main.py --polyrepo-dir=. --execution-client=$(EXECUTION_CLIENT)
.PHONY: devnet-up

devnet-up-debugccc:
python3 ops/devnet-morph/main.py --polyrepo-dir=. --debugccc
devnet-up-reth:
$(MAKE) devnet-up EXECUTION_CLIENT=reth
.PHONY: devnet-up-reth

devnet-up-debugccc: $(DEVNET_EXECUTION_DEPS) go-ubuntu-builder
python3 ops/devnet-morph/main.py --polyrepo-dir=. --execution-client=$(EXECUTION_CLIENT) --debugccc
.PHONY: devnet-up-debugccc

devnet-down:
cd ops/docker && docker compose -f docker-compose-4nodes.yml down
cd ops/docker && docker compose $(DEVNET_COMPOSE_FILES) down
.PHONY: devnet-down

devnet-clean-build: devnet-l1-clean
cd ops/docker && docker compose -f docker-compose-4nodes.yml down --volumes --remove-orphans
cd ops/docker && docker compose $(DEVNET_COMPOSE_FILES) down --volumes --remove-orphans
docker volume ls --filter name=docker_ --format='{{.Name}}' | xargs docker volume rm 2>/dev/null || true
rm -rf ops/l2-genesis/.devnet
rm -rf ops/docker/.devnet
rm -rf ops/docker/consensus/beacondata ops/docker/consensus/validatordata ops/docker/consensus/genesis.ssz
rm -rf ops/docker/execution/geth
rm -rf ops/docker/execution/reth
.PHONY: devnet-clean-build

devnet-clean-build-reth:
$(MAKE) devnet-clean-build EXECUTION_CLIENT=reth
.PHONY: devnet-clean-build-reth

devnet-clean: devnet-clean-build
docker image ls '*morph*' --format='{{.Repository}}' | xargs -r docker rmi
docker image ls '*sentry-*' --format='{{.Repository}}' | xargs -r docker rmi
Expand All @@ -171,9 +214,18 @@ devnet-l1-clean:
.PHONY: devnet-l1-clean

devnet-logs:
@(cd ops/docker && docker-compose logs -f)
@(cd ops/docker && docker compose $(DEVNET_COMPOSE_FILES) logs -f)
.PHONY: devnet-logs

reth-image:
docker pull "$(MORPH_RETH_IMAGE)"
.PHONY: reth-image

reth:
@test -d "$(MORPH_RETH_DIR)" || (echo "morph-reth directory not found: $(MORPH_RETH_DIR)" && exit 1)
docker build -t "$(MORPH_RETH_IMAGE)" --target "$(MORPH_RETH_DOCKER_TARGET)" --build-arg BUILD_PROFILE="$(MORPH_RETH_BUILD_PROFILE)" --build-arg RUSTFLAGS="$(MORPH_RETH_RUSTFLAGS)" "$(MORPH_RETH_DIR)"
.PHONY: reth

# tx-submitter
SUBMITTERS := $(shell grep -o 'tx-submitter-[0-9]*[^:]' ops/docker/docker-compose-4nodes.yml | sort | uniq)
rebuild-all-tx-submitter:
Expand Down
21 changes: 15 additions & 6 deletions common/batch/batch_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ func (bc *BatchCache) CalculateCapWithProposalBlock(blockNumber uint64, withdraw
}

// Parse transactions, distinguish L1 and L2 transactions
txsPayload, l1TxHashes, newTotalL1MessagePopped, l2TxNum, err := parsingTxs(block.Transactions(), bc.totalL1MessagePopped)
txsPayload, l1TxHashes, newTotalL1MessagePopped, l2TxNum, err := ParsingTxs(block.Transactions(), bc.totalL1MessagePopped)
if err != nil {
return false, fmt.Errorf("failed to parse transactions: %w", err)
}
Expand All @@ -530,7 +530,7 @@ func (bc *BatchCache) CalculateCapWithProposalBlock(blockNumber uint64, withdraw
txsNum := l2TxNum + l1TxNum

// Build BlockContext (60 bytes)
blockContext := buildBlockContext(header, txsNum, l1TxNum)
blockContext := BuildBlockContext(header, txsNum, l1TxNum)

// Store to current, do not immediately append to batch
bc.currentBlockContext = blockContext
Expand Down Expand Up @@ -934,8 +934,14 @@ func (bc *BatchCache) createBatchHeader(dataHash common.Hash, sidecar *ethtypes.
return batchHeaderV0.Bytes()
}

// parsingTxs parses transactions, distinguishes L1 and L2 transactions
func parsingTxs(transactions []*ethtypes.Transaction, totalL1MessagePoppedBefore uint64) (
// ParsingTxs encodes a block's transactions into the on-chain payload format
// used by the batch builder: L2 transactions are RLP-marshalled and concatenated
// in order; L1 message transactions are excluded from the payload but their
// hashes and queue indices are tracked separately.
//
// Exported for derivation Path B (SPEC-005), which must rebuild blob bytes from
// local L2 blocks using the same encoding the sequencer applied at seal time.
func ParsingTxs(transactions []*ethtypes.Transaction, totalL1MessagePoppedBefore uint64) (
txsPayload []byte,
l1TxHashes []common.Hash,
totalL1MessagePopped uint64,
Expand Down Expand Up @@ -1010,9 +1016,12 @@ func (bc *BatchCache) sealEffectiveBlobCount(blockTimestamp uint64, replayCommit
return replayProtocolMaxBlobs
}

// buildBlockContext builds BlockContext from block header (60 bytes)
// BuildBlockContext serialises a block header + tx counts into the 60-byte
// BlockContext blob the batch builder writes for each block.
// Format: Number(8) || Timestamp(8) || BaseFee(32) || GasLimit(8) || numTxs(2) || numL1Messages(2)
func buildBlockContext(header *ethtypes.Header, txsNum, l1MsgNum int) []byte {
//
// Exported for derivation Path B (SPEC-005); see ParsingTxs.
func BuildBlockContext(header *ethtypes.Header, txsNum, l1MsgNum int) []byte {
blsBytes := make([]byte, 60)

// Number (8 bytes)
Expand Down
52 changes: 0 additions & 52 deletions node/blocktag/config.go

This file was deleted.

Loading
Loading