Skip to content

Commit

Permalink
Prepare for Sepolia Holocene hardfork (#49)
Browse files Browse the repository at this point in the history
* Use Superchain Registry data for Lisk network

* 🔨 Configure node to pull configs from the superchain registry

* 🐛 Fix setup to run op-reth client

* 🔨 Rename op-node patch file to be appropriate

* 🔥 Remove unnecessary rollup configs

* 👌 Apply review feedback

* Update for sepolia holocene hardfork

* Move holocene overrride flag to conditional env variable

* Update patch file

---------

Co-authored-by: Matjaz Verbole <[email protected]>
Co-authored-by: Sameer Kumar Subudhi <[email protected]>
  • Loading branch information
3 people authored Nov 25, 2024
1 parent 3990684 commit 16864e8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion geth/geth-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ AUTHRPC_PORT="${AUTHRPC_PORT:-8551}"
METRICS_PORT="${METRICS_PORT:-6060}"
HOST_IP="" # put your external IP address here and open port 30303 to improve peer connectivity
P2P_PORT="${P2P_PORT:-30303}"
ADDITIONAL_ARGS=""
OP_GETH_GCMODE="${OP_GETH_GCMODE:-full}"
OP_GETH_SYNCMODE="${OP_GETH_SYNCMODE:-full}"
[ "$OP_NODE_NETWORK" = lisk-sepolia ] && ADDITIONAL_ARGS="--override.holocene=1732633200" || ADDITIONAL_ARGS=""

if [[ -z "$OP_NODE_NETWORK" ]]; then
echo "expected OP_NODE_NETWORK to be set" 1>&2
Expand Down
5 changes: 4 additions & 1 deletion op-node-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ echoBanner() {
echo -e "------------------------------------------------------------------------------------------------------------\n"
}

[ "$OP_NODE_NETWORK" = lisk-sepolia ] && ADDITIONAL_ARGS="--override.holocene=1732633200" || ADDITIONAL_ARGS=""

get_public_ip() {
# Define a list of HTTP-based providers
local PROVIDERS=(
Expand Down Expand Up @@ -54,4 +56,5 @@ echo "$OP_NODE_L2_ENGINE_AUTH_RAW" > "$OP_NODE_L2_ENGINE_AUTH"
# Start service
echoBanner "Starting op-node..."
exec ./op-node \
--network="$OP_NODE_NETWORK"
--network="$OP_NODE_NETWORK" \
$ADDITIONAL_ARGS # intentionally unquoted
40 changes: 18 additions & 22 deletions op-node-lisk-sepolia.patch
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
Subject: [PATCH] Lisk Sepolia patch
---
Index: op-node/rollup/derive/system_config.go
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/op-node/rollup/derive/system_config.go b/op-node/rollup/derive/system_config.go
index 72c4e713c..c8141d514 100644
--- a/op-node/rollup/derive/system_config.go
+++ b/op-node/rollup/derive/system_config.go
@@ -21,7 +21,8 @@ var (
SystemConfigUpdateFeeScalars = common.Hash{31: 1}
SystemConfigUpdateGasLimit = common.Hash{31: 2}
SystemConfigUpdateUnsafeBlockSigner = common.Hash{31: 3}
- SystemConfigUpdateEIP1559Params = common.Hash{31: 4}
+ SystemConfigUpdateGasConfigEcotone = common.Hash{31: 4}
+ SystemConfigUpdateEIP1559Params = common.Hash{31: 5}
)

var (
@@ -160,6 +161,9 @@ func ProcessSystemConfigUpdateLogEvent(destSysCfg *eth.SystemConfig, ev *types.L
case SystemConfigUpdateUnsafeBlockSigner:
// Ignored in derivation. This configurable applies to runtime configuration outside of the derivation.
--- a/op-node/rollup/derive/system_config.go (revision bd0ef87f20bc2575c060571b92de9b4ce249fac5)
+++ b/op-node/rollup/derive/system_config.go (revision 8c0a1fc612c062a61253cb2763796f1bffe95e89)
@@ -142,6 +142,9 @@
destSysCfg.GasLimit = gasLimit
return nil
+ case SystemConfigUpdateGasConfigEcotone:
+ // HOTFIX: Ignore legacy ConfigUpdate event GAS_CONFIG_ECOTONE that shouldn't be used anymore
+ return nil
default:
return fmt.Errorf("unrecognized L1 sysCfg update type: %s", updateType)
}
case SystemConfigUpdateEIP1559Params:
+ if !rollupCfg.IsHolocene(l1Time) {
+ return nil // ignore event prior to Holocene
+ }
if pointer, err := solabi.ReadUint64(reader); err != nil || pointer != 32 {
return NewCriticalError(errors.New("invalid pointer field"))
}
1 change: 1 addition & 0 deletions sepolia/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -15280,6 +15280,7 @@
"bedrockBlock": 0,
"regolithTime": 0,
"shanghaiTime": 1705312994,
"holoceneTime": 1732633200,
"istanbulBlock": 0,
"byzantiumBlock": 0,
"homesteadBlock": 0,
Expand Down

0 comments on commit 16864e8

Please sign in to comment.