Skip to content

Commit

Permalink
Upgrade op node to v1.9.5 and op geth to v1.101411.1 (#46)
Browse files Browse the repository at this point in the history
* ⬆️ Bump op-node to v1.9.5 and op-geth to v1.101411.1

* 🐳 Do not include Lisk Sepolia hotfix by default in the Docker images

* 🔧 Add support to run nodes on Lisk Sepolia
  • Loading branch information
sameersubudhi authored Nov 13, 2024
1 parent d6583fc commit 6c69752
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CLIENT=${CLIENT:-geth}
HOST_DATA_DIR=./${CLIENT}-data
HOST_DATA_DIR=./${CLIENT}-data
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,16 @@ cd lisk-node
> - Additionally, if you have the Docker Desktop installed on your system, please make sure to set `Memory limit` to a minimum of `16 GB`.<br>It can be set under `Settings -> Resources -> Resource Allocation -> Memory limit`.
1. Run:
<br>with `op-geth`:
<br>**IMPORTANT**: To run the node on Lisk Sepolia, first patch the Dockerfile(s) with:
```sh
git apply dockerfile-lisk-sepolia.patch
```

<br>with `op-geth` execution client:
```sh
docker compose up --build --detach
```
or, with `op-reth`:
or, with `op-reth` execution client:
```sh
CLIENT=reth RETH_BUILD_PROFILE=maxperf docker compose up --build --detach
```
Expand Down Expand Up @@ -281,4 +286,4 @@ echo Latest synced block behind by: \
$((($( date +%s )-\
$( curl -s -d '{"id":0,"jsonrpc":"2.0","method":"optimism_syncStatus"}' -H "Content-Type: application/json" http://localhost:9545 |
jq -r .result.unsafe_l2.timestamp))/60)) minutes
```
```
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ services:
env_file:
# select your network here:
# - .env.sepolia
- .env.mainnet
- .env.mainnet
34 changes: 34 additions & 0 deletions dockerfile-lisk-sepolia.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
diff --git a/geth/Dockerfile b/geth/Dockerfile
index 7316271..86e9a33 100644
--- a/geth/Dockerfile
+++ b/geth/Dockerfile
@@ -9,7 +9,11 @@ RUN git clone $REPO --branch op-node/$VERSION --single-branch . && \
git switch -c branch-$VERSION && \
bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]'

-RUN cd op-node && \
+# Patch to handle the legacy ConfigUpdate event GAS_CONFIG_ECOTONE that shouldn't be used anymore
+# Emitted only on Lisk Sepolia from the SystemConfig contract
+COPY op-node-lisk-hotfix.patch .
+RUN git apply op-node-lisk-hotfix.patch && \
+ cd op-node && \
make VERSION=$VERSION op-node

FROM golang:1.22 AS geth
diff --git a/reth/Dockerfile b/reth/Dockerfile
index 0144140..bbb833f 100644
--- a/reth/Dockerfile
+++ b/reth/Dockerfile
@@ -9,7 +9,11 @@ RUN git clone $REPO --branch op-node/$VERSION --single-branch . && \
git switch -c branch-$VERSION && \
bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]'

-RUN cd op-node && \
+# Patch to handle the legacy ConfigUpdate event GAS_CONFIG_ECOTONE that shouldn't be used anymore
+# Emitted only on Lisk Sepolia from the SystemConfig contract
+COPY op-node-lisk-hotfix.patch .
+RUN git apply op-node-lisk-hotfix.patch && \
+ cd op-node && \
make VERSION=$VERSION op-node

FROM rust:1.82 AS reth
14 changes: 5 additions & 9 deletions geth/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,22 @@ FROM golang:1.22 AS op
WORKDIR /app

ENV REPO=https://github.com/ethereum-optimism/optimism.git
ENV VERSION=v1.9.4
ENV COMMIT=2c24e652161187f3e30045eac1e176e6b53c469d
ENV VERSION=v1.9.5
ENV COMMIT=5662448279e4fb16e073e00baeb6e458b12a59b2
RUN git clone $REPO --branch op-node/$VERSION --single-branch . && \
git switch -c branch-$VERSION && \
bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]'

# Patch to handle the legacy ConfigUpdate event GAS_CONFIG_ECOTONE that shouldn't be used anymore
# Emitted only on Lisk Sepolia from the SystemConfig contract
COPY op-node-lisk-hotfix.patch .
RUN git apply op-node-lisk-hotfix.patch && \
cd op-node && \
RUN cd op-node && \
make VERSION=$VERSION op-node

FROM golang:1.22 AS geth

WORKDIR /app

ENV REPO=https://github.com/ethereum-optimism/op-geth.git
ENV VERSION=v1.101411.0
ENV COMMIT=d5a96613c22bc46238a21d6c0f805399c26c9d4c
ENV VERSION=v1.101411.1
ENV COMMIT=4539f2d3a77f14bdad362c24e3773dc6aad87d5b
RUN git clone $REPO --branch $VERSION --single-branch . && \
git switch -c branch-$VERSION && \
bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]'
Expand Down
26 changes: 12 additions & 14 deletions op-node-lisk-hotfix.patch
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
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
--- a/op-node/rollup/derive/system_config.go (revision 7283eb987be7b4413ae5b3088f83aa6a7b83c119)
+++ b/op-node/rollup/derive/system_config.go (revision 9720ac43f8564a80866c12c7c6fd1e60986ff98e)
@@ -21,6 +21,7 @@
SystemConfigUpdateGasConfig = common.Hash{31: 1}
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 (
@@ -142,6 +143,9 @@
return nil
@@ -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.
+ return nil
return nil
+ case SystemConfigUpdateGasConfigEcotone:
+ // HOTFIX: Ignore legacy ConfigUpdate event GAS_CONFIG_ECOTONE that shouldn't be used anymore
return nil
+ return nil
default:
return fmt.Errorf("unrecognized L1 sysCfg update type: %s", updateType)
}
10 changes: 3 additions & 7 deletions reth/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@ FROM golang:1.22 AS op
WORKDIR /app

ENV REPO=https://github.com/ethereum-optimism/optimism.git
ENV VERSION=v1.9.4
ENV COMMIT=2c24e652161187f3e30045eac1e176e6b53c469d
ENV VERSION=v1.9.5
ENV COMMIT=5662448279e4fb16e073e00baeb6e458b12a59b2
RUN git clone $REPO --branch op-node/$VERSION --single-branch . && \
git switch -c branch-$VERSION && \
bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]'

# Patch to handle the legacy ConfigUpdate event GAS_CONFIG_ECOTONE that shouldn't be used anymore
# Emitted only on Lisk Sepolia from the SystemConfig contract
COPY op-node-lisk-hotfix.patch .
RUN git apply op-node-lisk-hotfix.patch && \
cd op-node && \
RUN cd op-node && \
make VERSION=$VERSION op-node

FROM rust:1.82 AS reth
Expand Down

0 comments on commit 6c69752

Please sign in to comment.