diff --git a/espresso/streamer.go b/espresso/streamer.go index 70d8c705923e9..8a5ab9bd2cfb6 100644 --- a/espresso/streamer.go +++ b/espresso/streamer.go @@ -202,6 +202,7 @@ const HOTSHOT_BLOCK_LOAD_LIMIT = 100 // HOTSHOT_BLOCK_LOAD_LIMIT blocks ahead or the current block height, whichever // is smaller. func (s *EspressoStreamer[B]) computeEspressoBlockHeightsRange(currentBlockHeight uint64) (start uint64, finish uint64) { + log.Info("computeEspressoBlockHeightsRange", "hotShotPos", s.hotShotPos, "currentBlockHeight", currentBlockHeight) start = s.hotShotPos if start > 0 { // We've already processed the block in hotShotPos. In order to avoid diff --git a/flake.nix b/flake.nix index fdcb01dc3555d..b40fce20738a5 100644 --- a/flake.nix +++ b/flake.nix @@ -14,12 +14,12 @@ inputs.foundry.overlay ]; - go_1_22_7 = pkgs.go_1_22.overrideAttrs (oldAttrs: rec { - version = "1.22.7"; + go_1_22_10 = pkgs.go_1_22.overrideAttrs (oldAttrs: rec { + version = "1.22.10"; src = pkgs.fetchurl { - url = "https://go.dev/dl/go1.22.7.src.tar.gz"; - sha256 = "sha256-ZkMth9heDPrD7f/mN9WTD8Td9XkzE/4R5KDzMwI8h58="; + url = "https://go.dev/dl/go1.22.10.src.tar.gz"; + sha256 = "sha256-HpT9SL51DR+vtNmztt0xpunSc10zm/JGK8l7ZMpMEDc="; }; }); @@ -95,7 +95,7 @@ pkgs.python311 pkgs.foundry-bin pkgs.just - go_1_22_7 + go_1_22_10 pkgs.gotools pkgs.go-ethereum pkgs.golangci-lint diff --git a/kurtosis-devnet/celo.yaml b/kurtosis-devnet/celo.yaml new file mode 100644 index 0000000000000..b8bd5c5ebc48f --- /dev/null +++ b/kurtosis-devnet/celo.yaml @@ -0,0 +1,84 @@ +optimism_package: + chains: + - participants: + - el_type: op-geth + el_image: "" + el_log_level: "" + el_extra_env_vars: {} + el_extra_labels: {} + el_extra_params: [] + el_tolerations: [] + el_volume_size: 0 + el_min_cpu: 0 + el_max_cpu: 0 + el_min_mem: 0 + el_max_mem: 0 + cl_type: op-node + cl_image: {{ localDockerImage "op-node" }} + cl_log_level: "" + cl_extra_env_vars: {} + cl_extra_labels: {} + cl_extra_params: + - "--sequencer.use-finalized=true" + cl_tolerations: [] + cl_volume_size: 0 + cl_min_cpu: 0 + cl_max_cpu: 0 + cl_min_mem: 0 + cl_max_mem: 0 + node_selectors: {} + tolerations: [] + count: 1 + network_params: + network: "kurtosis" + network_id: "2151908" # not "42220"? # Celo mainnet network ID + seconds_per_slot: 2 + name: "op-kurtosis" + fjord_time_offset: 0 + granite_time_offset: 0 + holocene_time_offset: 0 + fund_dev_accounts: true + batcher_params: + image: {{ localDockerImage "op-batcher" }} + extra_params: [] + challenger_params: + image: {{ localDockerImage "op-challenger" }} + cannon_prestate_path: "" + cannon_prestates_url: "http://fileserver/proofs/op-program/cannon" + extra_params: [] + proposer_params: + image: {{ localDockerImage "op-proposer" }} + extra_params: [] + game_type: 1 + proposal_interval: 10m + mev_params: + rollup_boost_image: "" + builder_host: "" + builder_port: "" + additional_services: [] + op_contract_deployer_params: + image: {{ localDockerImage "op-deployer" }} + l1_artifacts_locator: {{ localContractArtifacts "l1" }} + l2_artifacts_locator: {{ localContractArtifacts "l2" }} + global_deploy_overrides: + faultGameAbsolutePrestate: {{ localPrestate.Hashes.prestate }} + global_log_level: "info" + global_node_selectors: {} + global_tolerations: [] + persistent: false +ethereum_package: + participants: + - el_type: geth + cl_type: teku + network_params: + preset: minimal + genesis_delay: 5 + additional_preloaded_contracts: | + { + "0x4e59b44847b379578588920cA78FbF26c0B4956C": { + "balance": "0ETH", + "code": "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf3", + "storage": {}, + "nonce": "1" + } + } diff --git a/kurtosis-devnet/justfile b/kurtosis-devnet/justfile index c1718faf9cf15..fc3a6d80948dc 100644 --- a/kurtosis-devnet/justfile +++ b/kurtosis-devnet/justfile @@ -95,6 +95,9 @@ pectra-devnet: (devnet "pectra.yaml") # Isthmus devnet isthmus-devnet: (devnet "isthmus.yaml") +# Celo Claude devnet +celo-devnet: (devnet "celo.yaml") + # subshells enter-devnet DEVNET CHAIN='Ethereum' NODE_INDEX='0': exec go run ../devnet-sdk/shell/cmd/enter/main.go --devnet kt://{{DEVNET}} --chain {{CHAIN}} --node-index {{NODE_INDEX}} @@ -127,6 +130,28 @@ external-batcher: echo "$command" $command +external-batcher-celo: + #!/usr/bin/env sh + function external_url () { + kurtosis service inspect celo-devnet "${1}" | yq .Ports."${2}" | sed -E 's#.*->\s+(.*\/)?#http://#' + } + batcher="$(pwd)/../op-batcher/bin/op-batcher" + command="${batcher} "\ + "--l2-eth-rpc=$(external_url 'op-el-1-op-geth-op-node-op-kurtosis' 'rpc') "\ + "--rollup-rpc=$(external_url 'op-cl-1-op-node-op-geth-op-kurtosis' 'http') "\ + "--l1-eth-rpc=$(external_url 'el-1-geth-teku' 'rpc') "\ + "--espresso-url=http://localhost:24000,http://localhost:24000 "\ + "--espresso-light-client-addr=0x703848f4c85f18e3acd8196c8ec91eb0b7bd0797 "\ + "--testing-espresso-batcher-private-key=0xb3d2d558e3491a3709b7c451100a0366b5872520c7aa020c17a0e7fa35b6a8df "\ + "--poll-interval=1s --sub-safety-margin=6 --num-confirmations=1 --safe-abort-nonce-too-low-count=3 "\ + "--resubmission-timeout=30s --rpc.addr=0.0.0.0 --rpc.port=8548 --rpc.enable-admin "\ + "--max-channel-duration=1 --private-key=0xb3d2d558e3491a3709b7c451100a0366b5872520c7aa020c17a0e7fa35b6a8df "\ + "--data-availability-type=calldata --metrics.enabled --metrics.addr=0.0.0.0 --metrics.port=9001 "\ + "--log.level=debug" + echo "Running batcher:" + echo "$command" + $command + # Start an external batcher (assuming espresso-eb-devnet is running) external-batcher-parameters: #!/usr/bin/env sh diff --git a/op-batcher/batcher/espresso.go b/op-batcher/batcher/espresso.go index 6fd2579cba6d5..5fdc03a2083e9 100644 --- a/op-batcher/batcher/espresso.go +++ b/op-batcher/batcher/espresso.go @@ -683,7 +683,6 @@ func (l *BatchSubmitter) queueBlockToEspresso(ctx context.Context, block *types. l.Log.Warn("Failed to create Espresso transaction from a batch", "err", err) return fmt.Errorf("failed to create Espresso transaction from a batch: %w", err) } - l.espressoSubmitter.SubmitTransaction(transaction) return nil @@ -753,7 +752,6 @@ func (l *BatchSubmitter) espressoBatchLoadingLoop(ctx context.Context, wg *sync. } l.espressoSyncAndRefresh(ctx, newSyncStatus) - err = l.espressoStreamer.Update(ctx) remainingListLen := len(l.espressoStreamer.RemainingBatches) if remainingListLen > 0 { @@ -843,17 +841,16 @@ func (l *BlockLoader) EnqueueBlocks(ctx context.Context, blocksToQueue inclusive l.reset(ctx) break } - blockRef, err := derive.L2BlockToBlockRef(l.batcher.RollupConfig, block) if err != nil { + l.batcher.Log.Warn("Failed to convert block to block ref", "err", err) continue } - err = l.batcher.queueBlockToEspresso(ctx, block) if err != nil { + l.batcher.Log.Warn("Failed to queue block to Espresso", "err", err) continue } - l.queuedBlocks = append(l.queuedBlocks, blockRef) } }