From 4ae62955349106e13154f0be1ea72fa53284942c Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Tue, 24 Dec 2024 17:40:53 +0400 Subject: [PATCH 01/16] add initial setup for eth --- starship/charts/devnet/templates/chains/eth/configmap.yaml | 0 starship/charts/devnet/templates/chains/eth/genesis.yaml | 0 starship/charts/devnet/templates/chains/eth/service.yaml | 0 starship/charts/devnet/templates/chains/eth/validator.yaml | 0 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 starship/charts/devnet/templates/chains/eth/configmap.yaml create mode 100644 starship/charts/devnet/templates/chains/eth/genesis.yaml create mode 100644 starship/charts/devnet/templates/chains/eth/service.yaml create mode 100644 starship/charts/devnet/templates/chains/eth/validator.yaml diff --git a/starship/charts/devnet/templates/chains/eth/configmap.yaml b/starship/charts/devnet/templates/chains/eth/configmap.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/starship/charts/devnet/templates/chains/eth/genesis.yaml b/starship/charts/devnet/templates/chains/eth/genesis.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/starship/charts/devnet/templates/chains/eth/service.yaml b/starship/charts/devnet/templates/chains/eth/service.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/starship/charts/devnet/templates/chains/eth/validator.yaml b/starship/charts/devnet/templates/chains/eth/validator.yaml new file mode 100644 index 000000000..e69de29bb From e6fa2ee13dbf26f82ed68f772249b8ca1a550169 Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Thu, 26 Dec 2024 13:26:15 +0400 Subject: [PATCH 02/16] initial setup for the execution layer chain --- starship/charts/devnet/defaults.yaml | 11 ++ .../templates/chains/eth/configmap.yaml | 32 ++++++ .../devnet/templates/chains/eth/genesis.yaml | 106 ++++++++++++++++++ .../devnet/templates/chains/eth/service.yaml | 27 +++++ starship/charts/devnet/values.schema.json | 3 +- starship/tests/e2e/configs/eth.yaml | 8 ++ 6 files changed, 186 insertions(+), 1 deletion(-) create mode 100644 starship/tests/e2e/configs/eth.yaml diff --git a/starship/charts/devnet/defaults.yaml b/starship/charts/devnet/defaults.yaml index b8e04510f..fbbf45eef 100644 --- a/starship/charts/devnet/defaults.yaml +++ b/starship/charts/devnet/defaults.yaml @@ -793,6 +793,17 @@ defaultChains: exponent: 6 coingecko_id: stake keywords: [ "stake" ] + etherum-execution: + image: ghcr.io/cosmology-tech/starship/ethereum/client-go:latest + home: /ethereum/execution + binary: geth + prefix: eth + denom: ueth + prettyName: Ethereum Execution Chain + coins: 100000000000000eth + hdPath: m/44'/60'/0'/0/0 + coinType: 60 + repo: https://github.com/ethereum/go-ethereum eth: storageClassName: hostpath genesisStateUrl: https://github.com/eth-clients/merge-testnets/blob/main/sepolia/genesis.ssz diff --git a/starship/charts/devnet/templates/chains/eth/configmap.yaml b/starship/charts/devnet/templates/chains/eth/configmap.yaml index e69de29bb..0036ed38c 100644 --- a/starship/charts/devnet/templates/chains/eth/configmap.yaml +++ b/starship/charts/devnet/templates/chains/eth/configmap.yaml @@ -0,0 +1,32 @@ +{{- range $chain := .Values.chains }} +{{- if hasPrefix "ethereum" $chain.name }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: genesis-{{ $chain.name }} +data: + genesis.json: |- + { + "config": { + "chainId": 1337, + "homesteadBlock": 0, + "eip150Block": 0, + "eip155Block": 0, + "eip158Block": 0, + "byzantiumBlock": 0, + "constantinopleBlock": 0, + "petersburgBlock": 0, + "istanbulBlock": 0 + }, + "difficulty": "0x1", + "gasLimit": "0x47b760", + "alloc": { + "0x0000000000000000000000000000000000000001": { + "balance": "0xde0b6b3a7640000" + } + } + } +--- +{{- end }} +{{- end }} diff --git a/starship/charts/devnet/templates/chains/eth/genesis.yaml b/starship/charts/devnet/templates/chains/eth/genesis.yaml index e69de29bb..aeb51800e 100644 --- a/starship/charts/devnet/templates/chains/eth/genesis.yaml +++ b/starship/charts/devnet/templates/chains/eth/genesis.yaml @@ -0,0 +1,106 @@ +{{- range $chain := .Values.chains }} +{{- if hasPrefix "ethereum-execution" $chain.name }} +{{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }} + +{{ $chain := include "devnet.fullchain" (dict "name" $chain.id "file" $defaultFile "context" $) | fromJson }} +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: {{ $chain.name }}-execution-chain + namespace: {{ $.Release.Namespace }} + labels: + app: {{ $chain.name }}-execution-chain +spec: + serviceName: {{ $chain.name }}-execution-chain + replicas: {{ $chain.replicas }} + selector: + matchLabels: + app.kubernetes.io/instance: {{ $chain.name }} + app.kubernetes.io/name: {{ $chain.id }}-genesis + template: + metadata: + annotations: + quality: release + role: api-gateway + sla: high + tier: gateway + labels: + app.kubernetes.io/instance: {{ $chain.name }} + app.kubernetes.io/type: {{ $chain.id }} + app.kubernetes.io/name: {{ $chain.id }}-genesis + app.kubernetes.io/rawname: {{ $chain.id }} + app.kubernetes.io/version: {{ $.Chart.AppVersion }} + spec: + {{- include "imagePullSecrets" $chain | indent 6 }} + initContainers: + - name: init-genesis + image: {{ $chain.image }} + imagePullPolicy: IfNotPresent + command: + - bash + - "-c" + - | + echo "Initializing genesis" + cp /genesis/genesis.json /ethereum/execution/genesis.json + geth --datadir /ethereum/execution init /ethereum/execution/genesis.json + resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} + volumeMounts: + - name: genesis + mountPath: /genesis + - name: ethereum + mountPath: /ethereum/execution + containers: + - name: node + image: {{ $chain.image }} + imagePullPolicy: IfNotPresent + env: + - name: NETWORK + value: {{ $chain.network }} + - name: LOG_LEVEL + value: {{ $chain.logLevel }} + - name: DATA_DIR + value: {{ $chain.dataDir }} + - name: HTTP_PORT + value: "8545" + - name: WS_PORT + value: "8546" + - name: RPC_PORT + value: "8551" + command: + - bash + - "-c" + - | + echo "Starting execution chain" + geth --datadir /ethereum/execution --http \ + --http.addr=0.0.0.0 \ + --http.port=$HTTP_PORT \ + --http.api=eth,net,web3,debug \ + --ws --ws.addr=0.0.0.0 \ + --ws.port=$WS_PORT \ + --authrpc.port=$RPC_PORT \ + --nodiscover \ + --http.corsdomain=* \ + --ws.api=eth,net,web3 \ + --ws.origins=* \ + --http.vhosts=* \ + --authrpc.vhosts=* \ + --authrpc.jwtsecret=/etc/secrets/jwt.hex \ + --allow-insecure-unlock \ + --unlock=0x123463a4B065722E99115D6c222f267d9cABb524 \ + --password=/dev/null \ + --syncmode=full \ + --networkid=32382 + resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} + volumeMounts: + - name: ethereum + mountPath: /ethereum/execution + volumes: + - name: genesis + configMap: + name: genesis-{{ $chain.name }} + - name: ethereum + emptyDir: { } +--- +{{- end }} +{{- end }} \ No newline at end of file diff --git a/starship/charts/devnet/templates/chains/eth/service.yaml b/starship/charts/devnet/templates/chains/eth/service.yaml index e69de29bb..2aa3f4db0 100644 --- a/starship/charts/devnet/templates/chains/eth/service.yaml +++ b/starship/charts/devnet/templates/chains/eth/service.yaml @@ -0,0 +1,27 @@ +{{ $portMap := dict "http" 8545 "ws" 8546 "rpc" 8551 }} +{{- range $chain := .Values.chains }} +{{- if hasPrefix "ethereum-beacon" $chain.name }} +{{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }} + +{{ $chain := include "devnet.fullchain" (dict "name" $chain.id "file" $defaultFile "context" $) | fromJson }} +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ $chain.name }} + labels: + app.kubernetes.io/name: {{ $chain.name }} +spec: + clusterIP: None + ports: + {{- range $name, $port := $portMap }} + - name: {{ $name }} + port: {{ $port }} + protocol: TCP + targetPort: {{ $port }} + {{- end }} + selector: + app.kubernetes.io/name: {{ $chain.name }} +--- +{{- end }} +{{- end }} diff --git a/starship/charts/devnet/values.schema.json b/starship/charts/devnet/values.schema.json index 327f27b83..063babf79 100644 --- a/starship/charts/devnet/values.schema.json +++ b/starship/charts/devnet/values.schema.json @@ -146,7 +146,8 @@ "agoric", "kujira", "hyperweb", - "noble" + "noble", + "ethereum-execution" ] }, "numValidators": { diff --git a/starship/tests/e2e/configs/eth.yaml b/starship/tests/e2e/configs/eth.yaml new file mode 100644 index 000000000..f403ae36b --- /dev/null +++ b/starship/tests/e2e/configs/eth.yaml @@ -0,0 +1,8 @@ +chains: + - id: ethereum-execution + name: ethereum-execution + image: ghcr.io/cosmology-tech/starship/ethereum/client-go:latest + numValidators: 1 + ports: + rest: 8545 + rpc: 8551 From 28c119b1baac4f7aaa94541eae24b9fde563380d Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Tue, 7 Jan 2025 12:43:30 +0400 Subject: [PATCH 03/16] run geth properly, setting up prysm nodes --- .../templates/chains/cosmos/cometmock.yaml | 2 +- .../templates/chains/cosmos/configmap.yaml | 2 +- .../templates/chains/cosmos/genesis.yaml | 2 +- .../templates/chains/cosmos/service.yaml | 2 +- .../templates/chains/cosmos/validator.yaml | 2 +- .../devnet/templates/chains/eth/beacon.yaml | 92 +++++++++++++++++++ .../templates/chains/eth/configmap.yaml | 9 +- .../eth/{genesis.yaml => execution.yaml} | 25 ++--- .../devnet/templates/chains/eth/service.yaml | 2 +- starship/tests/e2e/configs/eth.yaml | 8 ++ 10 files changed, 125 insertions(+), 21 deletions(-) create mode 100644 starship/charts/devnet/templates/chains/eth/beacon.yaml rename starship/charts/devnet/templates/chains/eth/{genesis.yaml => execution.yaml} (87%) diff --git a/starship/charts/devnet/templates/chains/cosmos/cometmock.yaml b/starship/charts/devnet/templates/chains/cosmos/cometmock.yaml index 80b4a38de..5f98b128e 100644 --- a/starship/charts/devnet/templates/chains/cosmos/cometmock.yaml +++ b/starship/charts/devnet/templates/chains/cosmos/cometmock.yaml @@ -1,5 +1,5 @@ {{- range $chain := .Values.chains }} -{{- if ne $chain.name "virtual" }} +{{- if not (hasPrefix "ethereum" $chain.name) }} {{ $dataExposer := dict "chain" $chain.id "port" ($.Values.exposer.ports.rest | quote | default "8081") }} {{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }} diff --git a/starship/charts/devnet/templates/chains/cosmos/configmap.yaml b/starship/charts/devnet/templates/chains/cosmos/configmap.yaml index 13b7f144a..ac7df34ef 100644 --- a/starship/charts/devnet/templates/chains/cosmos/configmap.yaml +++ b/starship/charts/devnet/templates/chains/cosmos/configmap.yaml @@ -1,5 +1,5 @@ {{- range $chain := .Values.chains }} -{{- if ne $chain.name "virtual" }} +{{- if not (hasPrefix "ethereum" $chain.name) }} {{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }} {{ $chain := include "devnet.fullchain" (dict "name" $chain.id "file" $defaultFile "context" $) | fromJson }} --- diff --git a/starship/charts/devnet/templates/chains/cosmos/genesis.yaml b/starship/charts/devnet/templates/chains/cosmos/genesis.yaml index 7748d34d4..e49bcbcba 100644 --- a/starship/charts/devnet/templates/chains/cosmos/genesis.yaml +++ b/starship/charts/devnet/templates/chains/cosmos/genesis.yaml @@ -1,5 +1,5 @@ {{- range $chain := .Values.chains }} -{{- if ne $chain.name "virtual" }} +{{- if not (hasPrefix "ethereum" $chain.name) }} {{ $dataExposer := dict "chain" $chain.id "port" ($.Values.exposer.ports.rest | quote | default "8081") }} {{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }} diff --git a/starship/charts/devnet/templates/chains/cosmos/service.yaml b/starship/charts/devnet/templates/chains/cosmos/service.yaml index be0e4883d..75234cae5 100644 --- a/starship/charts/devnet/templates/chains/cosmos/service.yaml +++ b/starship/charts/devnet/templates/chains/cosmos/service.yaml @@ -1,6 +1,6 @@ {{ $portMap := dict "p2p" 26656 "address" 26658 "grpc" 9090 "grpc-web" 9091 "rest" 1317 }} {{- range $chain := .Values.chains }} -{{- if ne $chain.name "virtual" }} +{{- if not (hasPrefix "ethereum" $chain.name) }} {{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }} {{ $chain := include "devnet.fullchain" (dict "name" $chain.id "file" $defaultFile "context" $) | fromJson }} diff --git a/starship/charts/devnet/templates/chains/cosmos/validator.yaml b/starship/charts/devnet/templates/chains/cosmos/validator.yaml index 3e9438e18..0012b008d 100644 --- a/starship/charts/devnet/templates/chains/cosmos/validator.yaml +++ b/starship/charts/devnet/templates/chains/cosmos/validator.yaml @@ -1,5 +1,5 @@ {{- range $chain := .Values.chains }} -{{- if ne $chain.name "virtual" }} +{{- if not (hasPrefix "ethereum" $chain.name) }} {{- if gt $chain.numValidators 1.0 }} {{ $dataExposer := dict "chain" $chain.id "port" ($.Values.exposer.ports.rest | quote | default "8081") }} {{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }} diff --git a/starship/charts/devnet/templates/chains/eth/beacon.yaml b/starship/charts/devnet/templates/chains/eth/beacon.yaml new file mode 100644 index 000000000..cf9b5d1e7 --- /dev/null +++ b/starship/charts/devnet/templates/chains/eth/beacon.yaml @@ -0,0 +1,92 @@ +{{- range $chain := .Values.chains }} +{{- if hasPrefix "ethereum-beacon" $chain.name }} +{{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }} + +{{ $chain := include "devnet.fullchain" (dict "name" $chain.id "file" $defaultFile "context" $) | fromJson }} +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: {{ $chain.name }}-beacon-chain + namespace: {{ $.Release.Namespace }} + labels: + app: {{ $chain.name }}-beacon-chain +spec: + serviceName: {{ $chain.name }}-beacon-chain + replicas: {{ $chain.replicas }} + selector: + matchLabels: + app.kubernetes.io/instance: {{ $chain.name }} + app.kubernetes.io/name: {{ $chain.id }}-genesis + template: + metadata: + annotations: + quality: release + role: api-gateway + sla: high + tier: gateway + labels: + app.kubernetes.io/instance: {{ $chain.name }} + app.kubernetes.io/type: {{ $chain.id }} + app.kubernetes.io/name: {{ $chain.id }}-beacon + app.kubernetes.io/rawname: {{ $chain.id }} + app.kubernetes.io/version: {{ $.Chart.AppVersion }} + spec: + {{- include "imagePullSecrets" $chain | indent 6 }} + initContainers: + - name: init-genesis + image: gcr.io/prysmaticlabs/prysm/cmd/prysmctl + imagePullPolicy: IfNotPresent + command: + - bash + - "-c" + - | + echo "Initializing genesis" + + + echo "Copy secrets over" + cp /config/jwt.hex /etc/secrets/jwt.hex + resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} + volumeMounts: + - name: secrets + mountPath: /etc/secrets + - name: config + mountPath: /config + - name: ethereum + mountPath: /ethereum/consensus + containers: + - name: node + image: {{ $chain.image }} + imagePullPolicy: IfNotPresent + env: + - name: HTTP_PORT + value: "8545" + - name: WS_PORT + value: "8546" + - name: RPC_PORT + value: "8551" + command: + - bash + - "-c" + - | + echo "Starting consensus chain" + beacon-chain \ + --execution-endpoint=http://localhost:8551 \ + --jwt-secret=/etc/secrets/jwt.hex + resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} + volumeMounts: + - name: ethereum + mountPath: /ethereum/execution + - name: secrets + mountPath: /etc/secrets + volumes: + - name: config + configMap: + name: config-{{ $chain.name }} + - name: ethereum + emptyDir: { } + - name: secrets + emptyDir: { } +--- +{{- end }} +{{- end }} \ No newline at end of file diff --git a/starship/charts/devnet/templates/chains/eth/configmap.yaml b/starship/charts/devnet/templates/chains/eth/configmap.yaml index 0036ed38c..d05eb31e6 100644 --- a/starship/charts/devnet/templates/chains/eth/configmap.yaml +++ b/starship/charts/devnet/templates/chains/eth/configmap.yaml @@ -4,7 +4,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: genesis-{{ $chain.name }} + name: config-{{ $chain.name }} data: genesis.json: |- { @@ -17,16 +17,19 @@ data: "byzantiumBlock": 0, "constantinopleBlock": 0, "petersburgBlock": 0, - "istanbulBlock": 0 + "istanbulBlock": 0, + "terminalTotalDifficulty": 0 }, "difficulty": "0x1", "gasLimit": "0x47b760", "alloc": { "0x0000000000000000000000000000000000000001": { - "balance": "0xde0b6b3a7640000" + "balance": "1000000000000000000000" } } } + jwt.hex: |- + 3fe89f53368415a79e065f3c885b7273b41540d5598488ef475cfdc4009850a4 --- {{- end }} {{- end }} diff --git a/starship/charts/devnet/templates/chains/eth/genesis.yaml b/starship/charts/devnet/templates/chains/eth/execution.yaml similarity index 87% rename from starship/charts/devnet/templates/chains/eth/genesis.yaml rename to starship/charts/devnet/templates/chains/eth/execution.yaml index aeb51800e..9c72b837c 100644 --- a/starship/charts/devnet/templates/chains/eth/genesis.yaml +++ b/starship/charts/devnet/templates/chains/eth/execution.yaml @@ -42,12 +42,15 @@ spec: - "-c" - | echo "Initializing genesis" - cp /genesis/genesis.json /ethereum/execution/genesis.json + cp /config/genesis.json /ethereum/execution/genesis.json + cp /config/jwt.hex /etc/secrets/jwt.hex geth --datadir /ethereum/execution init /ethereum/execution/genesis.json resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} volumeMounts: - - name: genesis - mountPath: /genesis + - name: secrets + mountPath: /etc/secrets + - name: config + mountPath: /config - name: ethereum mountPath: /ethereum/execution containers: @@ -55,12 +58,6 @@ spec: image: {{ $chain.image }} imagePullPolicy: IfNotPresent env: - - name: NETWORK - value: {{ $chain.network }} - - name: LOG_LEVEL - value: {{ $chain.logLevel }} - - name: DATA_DIR - value: {{ $chain.dataDir }} - name: HTTP_PORT value: "8545" - name: WS_PORT @@ -90,17 +87,21 @@ spec: --unlock=0x123463a4B065722E99115D6c222f267d9cABb524 \ --password=/dev/null \ --syncmode=full \ - --networkid=32382 + --networkid=1337 resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} volumeMounts: - name: ethereum mountPath: /ethereum/execution + - name: secrets + mountPath: /etc/secrets volumes: - - name: genesis + - name: config configMap: - name: genesis-{{ $chain.name }} + name: config-{{ $chain.name }} - name: ethereum emptyDir: { } + - name: secrets + emptyDir: { } --- {{- end }} {{- end }} \ No newline at end of file diff --git a/starship/charts/devnet/templates/chains/eth/service.yaml b/starship/charts/devnet/templates/chains/eth/service.yaml index 2aa3f4db0..ab4cb7ed6 100644 --- a/starship/charts/devnet/templates/chains/eth/service.yaml +++ b/starship/charts/devnet/templates/chains/eth/service.yaml @@ -1,6 +1,6 @@ {{ $portMap := dict "http" 8545 "ws" 8546 "rpc" 8551 }} {{- range $chain := .Values.chains }} -{{- if hasPrefix "ethereum-beacon" $chain.name }} +{{- if hasPrefix "ethereum-execution" $chain.name }} {{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }} {{ $chain := include "devnet.fullchain" (dict "name" $chain.id "file" $defaultFile "context" $) | fromJson }} diff --git a/starship/tests/e2e/configs/eth.yaml b/starship/tests/e2e/configs/eth.yaml index f403ae36b..09f2d23dc 100644 --- a/starship/tests/e2e/configs/eth.yaml +++ b/starship/tests/e2e/configs/eth.yaml @@ -3,6 +3,14 @@ chains: name: ethereum-execution image: ghcr.io/cosmology-tech/starship/ethereum/client-go:latest numValidators: 1 + beacon: ethereum-beacon ports: rest: 8545 rpc: 8551 + - id: ethereum-beacon + name: ethereum-beacon + image: ghcr.io/cosmology-tech/starship/prysm/beacon-chain:stable + numValidators: 1 + ports: + rest: 4000 + rpc: 4001 From 9ef0eb400dc529d50073d6a8bbeb39ca453049ab Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Tue, 7 Jan 2025 15:09:15 +0400 Subject: [PATCH 04/16] add defaults --- starship/charts/devnet/defaults.yaml | 11 +++++ .../devnet/templates/chains/eth/beacon.yaml | 38 +++++++++++---- .../templates/chains/eth/configmap.yaml | 46 ++++++++++++++++++- .../templates/chains/eth/execution.yaml | 2 +- starship/charts/devnet/values.schema.json | 6 ++- 5 files changed, 89 insertions(+), 14 deletions(-) diff --git a/starship/charts/devnet/defaults.yaml b/starship/charts/devnet/defaults.yaml index fbbf45eef..11bc46947 100644 --- a/starship/charts/devnet/defaults.yaml +++ b/starship/charts/devnet/defaults.yaml @@ -804,6 +804,17 @@ defaultChains: hdPath: m/44'/60'/0'/0/0 coinType: 60 repo: https://github.com/ethereum/go-ethereum + etherum-beacon: + image: ghcr.io/cosmology-tech/starship/ethereum/client-go:latest + home: /ethereum/execution + binary: geth + prefix: eth + denom: ueth + prettyName: Ethereum Execution Chain + coins: 100000000000000eth + hdPath: m/44'/60'/0'/0/0 + coinType: 60 + repo: https://github.com/ethereum/go-ethereum eth: storageClassName: hostpath genesisStateUrl: https://github.com/eth-clients/merge-testnets/blob/main/sepolia/genesis.ssz diff --git a/starship/charts/devnet/templates/chains/eth/beacon.yaml b/starship/charts/devnet/templates/chains/eth/beacon.yaml index cf9b5d1e7..7671d7a08 100644 --- a/starship/charts/devnet/templates/chains/eth/beacon.yaml +++ b/starship/charts/devnet/templates/chains/eth/beacon.yaml @@ -17,7 +17,7 @@ spec: selector: matchLabels: app.kubernetes.io/instance: {{ $chain.name }} - app.kubernetes.io/name: {{ $chain.id }}-genesis + app.kubernetes.io/name: {{ $chain.id }}-beacon template: metadata: annotations: @@ -35,25 +35,38 @@ spec: {{- include "imagePullSecrets" $chain | indent 6 }} initContainers: - name: init-genesis - image: gcr.io/prysmaticlabs/prysm/cmd/prysmctl + image: ghcr.io/cosmology-tech/starship/prysm/cmd/prysmctl:stable imagePullPolicy: IfNotPresent command: - bash - "-c" - | - echo "Initializing genesis" + mkdir -p /ethereum/consensus /ethereum/execution + cp /config-execution/genesis.json /ethereum/execution/genesis.json + cp /config-consensus/config.yaml /ethereum/consensus/config.yaml + echo "Initializing genesis" + prysmctl testnet generate-genesis \ + --fork=capella \ + --num-validators=64 \ + --genesis-time-delay=15 \ + --output-ssz=/ethereum/consensus/genesis.ssz \ + --chain-config-file=/ethereum/consensus/config.yaml \ + --geth-genesis-json-in=/ethereum/execution/genesis.json \ + --geth-genesis-json-out=/ethereum/execution/genesis.json echo "Copy secrets over" - cp /config/jwt.hex /etc/secrets/jwt.hex + cp /config-execution/jwt.hex /etc/secrets/jwt.hex resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} volumeMounts: - name: secrets mountPath: /etc/secrets - - name: config - mountPath: /config + - name: config-beacon + mountPath: /config-beacon + - name: config-execution + mountPath: /config-execution - name: ethereum - mountPath: /ethereum/consensus + mountPath: /ethereum containers: - name: node image: {{ $chain.image }} @@ -70,19 +83,24 @@ spec: - "-c" - | echo "Starting consensus chain" + sleep infinity + beacon-chain \ --execution-endpoint=http://localhost:8551 \ --jwt-secret=/etc/secrets/jwt.hex resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} volumeMounts: - name: ethereum - mountPath: /ethereum/execution + mountPath: /ethereum - name: secrets mountPath: /etc/secrets volumes: - - name: config + - name: config-beacon + configMap: + name: config-beacon + - name: config-execution configMap: - name: config-{{ $chain.name }} + name: config-execution - name: ethereum emptyDir: { } - name: secrets diff --git a/starship/charts/devnet/templates/chains/eth/configmap.yaml b/starship/charts/devnet/templates/chains/eth/configmap.yaml index d05eb31e6..305dbd45c 100644 --- a/starship/charts/devnet/templates/chains/eth/configmap.yaml +++ b/starship/charts/devnet/templates/chains/eth/configmap.yaml @@ -1,10 +1,10 @@ {{- range $chain := .Values.chains }} -{{- if hasPrefix "ethereum" $chain.name }} +{{- if hasPrefix "ethereum-execution" $chain.name }} --- apiVersion: v1 kind: ConfigMap metadata: - name: config-{{ $chain.name }} + name: config-execution data: genesis.json: |- { @@ -25,6 +25,10 @@ data: "alloc": { "0x0000000000000000000000000000000000000001": { "balance": "1000000000000000000000" + }, + "0x4242424242424242424242424242424242424242": { + "code": "0x60806040526004361061003f5760003560e01c806301ffc9a71461004457806322895118146100b6578063621fd130146101e3578063c5f2892f14610273575b600080fd5b34801561005057600080fd5b5061009c6004803603602081101561006757600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061029e565b604051808215151515815260200191505060405180910390f35b6101e1600480360360808110156100cc57600080fd5b81019080803590602001906401000000008111156100e957600080fd5b8201836020820111156100fb57600080fd5b8035906020019184600183028401116401000000008311171561011d57600080fd5b90919293919293908035906020019064010000000081111561013e57600080fd5b82018360208201111561015057600080fd5b8035906020019184600183028401116401000000008311171561017257600080fd5b90919293919293908035906020019064010000000081111561019357600080fd5b8201836020820111156101a557600080fd5b803590602001918460018302840111640100000000831117156101c757600080fd5b909192939192939080359060200190929190505050610370565b005b3480156101ef57600080fd5b506101f8610fd0565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561023857808201518184015260208101905061021d565b50505050905090810190601f1680156102655780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561027f57600080fd5b50610288610fe2565b6040518082815260200191505060405180910390f35b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061036957507f85640907000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b603087879050146103cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806116ec6026913960400191505060405180910390fd5b60208585905014610428576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806116836036913960400191505060405180910390fd5b60608383905014610484576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602981526020018061175f6029913960400191505060405180910390fd5b670de0b6b3a76400003410156104e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806117396026913960400191505060405180910390fd5b6000633b9aca0034816104f457fe5b061461054b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260338152602001806116b96033913960400191505060405180910390fd5b6000633b9aca00348161055a57fe5b04905067ffffffffffffffff80168111156105c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806117126027913960400191505060405180910390fd5b60606105cb82611314565b90507f649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c589898989858a8a610600602054611314565b60405180806020018060200180602001806020018060200186810386528e8e82818152602001925080828437600081840152601f19601f82011690508083019250505086810385528c8c82818152602001925080828437600081840152601f19601f82011690508083019250505086810384528a818151815260200191508051906020019080838360005b838110156106a657808201518184015260208101905061068b565b50505050905090810190601f1680156106d35780820380516001836020036101000a031916815260200191505b508681038352898982818152602001925080828437600081840152601f19601f820116905080830192505050868103825287818151815260200191508051906020019080838360005b8381101561073757808201518184015260208101905061071c565b50505050905090810190601f1680156107645780820380516001836020036101000a031916815260200191505b509d505050505050505050505050505060405180910390a1600060028a8a600060801b6040516020018084848082843780830192505050826fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff1916815260100193505050506040516020818303038152906040526040518082805190602001908083835b6020831061080e57805182526020820191506020810190506020830392506107eb565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610850573d6000803e3d6000fd5b5050506040513d602081101561086557600080fd5b8101908080519060200190929190505050905060006002808888600090604092610891939291906115da565b6040516020018083838082843780830192505050925050506040516020818303038152906040526040518082805190602001908083835b602083106108eb57805182526020820191506020810190506020830392506108c8565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa15801561092d573d6000803e3d6000fd5b5050506040513d602081101561094257600080fd5b8101908080519060200190929190505050600289896040908092610968939291906115da565b6000801b604051602001808484808284378083019250505082815260200193505050506040516020818303038152906040526040518082805190602001908083835b602083106109cd57805182526020820191506020810190506020830392506109aa565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610a0f573d6000803e3d6000fd5b5050506040513d6020811015610a2457600080fd5b810190808051906020019092919050505060405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610a8e5780518252602082019150602081019050602083039250610a6b565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610ad0573d6000803e3d6000fd5b5050506040513d6020811015610ae557600080fd5b810190808051906020019092919050505090506000600280848c8c604051602001808481526020018383808284378083019250505093505050506040516020818303038152906040526040518082805190602001908083835b60208310610b615780518252602082019150602081019050602083039250610b3e565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610ba3573d6000803e3d6000fd5b5050506040513d6020811015610bb857600080fd5b8101908080519060200190929190505050600286600060401b866040516020018084805190602001908083835b60208310610c085780518252602082019150602081019050602083039250610be5565b6001836020036101000a0380198251168184511680821785525050505050509050018367ffffffffffffffff191667ffffffffffffffff1916815260180182815260200193505050506040516020818303038152906040526040518082805190602001908083835b60208310610c935780518252602082019150602081019050602083039250610c70565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610cd5573d6000803e3d6000fd5b5050506040513d6020811015610cea57600080fd5b810190808051906020019092919050505060405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610d545780518252602082019150602081019050602083039250610d31565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610d96573d6000803e3d6000fd5b5050506040513d6020811015610dab57600080fd5b81019080805190602001909291905050509050858114610e16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252605481526020018061162f6054913960600191505060405180910390fd5b6001602060020a0360205410610e77576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061160e6021913960400191505060405180910390fd5b60016020600082825401925050819055506000602054905060008090505b6020811015610fb75760018083161415610ec8578260008260208110610eb757fe5b018190555050505050505050610fc7565b600260008260208110610ed757fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610f335780518252602082019150602081019050602083039250610f10565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610f75573d6000803e3d6000fd5b5050506040513d6020811015610f8a57600080fd5b8101908080519060200190929190505050925060028281610fa757fe5b0491508080600101915050610e95565b506000610fc057fe5b5050505050505b50505050505050565b6060610fdd602054611314565b905090565b6000806000602054905060008090505b60208110156111d057600180831614156110e05760026000826020811061101557fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310611071578051825260208201915060208101905060208303925061104e565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa1580156110b3573d6000803e3d6000fd5b5050506040513d60208110156110c857600080fd5b810190808051906020019092919050505092506111b6565b600283602183602081106110f057fe5b015460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061114b5780518252602082019150602081019050602083039250611128565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa15801561118d573d6000803e3d6000fd5b5050506040513d60208110156111a257600080fd5b810190808051906020019092919050505092505b600282816111c057fe5b0491508080600101915050610ff2565b506002826111df602054611314565b600060401b6040516020018084815260200183805190602001908083835b6020831061122057805182526020820191506020810190506020830392506111fd565b6001836020036101000a0380198251168184511680821785525050505050509050018267ffffffffffffffff191667ffffffffffffffff1916815260180193505050506040516020818303038152906040526040518082805190602001908083835b602083106112a55780518252602082019150602081019050602083039250611282565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa1580156112e7573d6000803e3d6000fd5b5050506040513d60208110156112fc57600080fd5b81019080805190602001909291905050509250505090565b6060600867ffffffffffffffff8111801561132e57600080fd5b506040519080825280601f01601f1916602001820160405280156113615781602001600182028036833780820191505090505b50905060008260c01b90508060076008811061137957fe5b1a60f81b8260008151811061138a57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806006600881106113c657fe5b1a60f81b826001815181106113d757fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060056008811061141357fe5b1a60f81b8260028151811061142457fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060046008811061146057fe5b1a60f81b8260038151811061147157fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806003600881106114ad57fe5b1a60f81b826004815181106114be57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806002600881106114fa57fe5b1a60f81b8260058151811061150b57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060016008811061154757fe5b1a60f81b8260068151811061155857fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060006008811061159457fe5b1a60f81b826007815181106115a557fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535050919050565b600080858511156115ea57600080fd5b838611156115f757600080fd5b600185028301915084860390509450949250505056fe4465706f736974436f6e74726163743a206d65726b6c6520747265652066756c6c4465706f736974436f6e74726163743a207265636f6e7374727563746564204465706f7369744461746120646f6573206e6f74206d6174636820737570706c696564206465706f7369745f646174615f726f6f744465706f736974436f6e74726163743a20696e76616c6964207769746864726177616c5f63726564656e7469616c73206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c7565206e6f74206d756c7469706c65206f6620677765694465706f736974436f6e74726163743a20696e76616c6964207075626b6579206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f20686967684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f206c6f774465706f736974436f6e74726163743a20696e76616c6964207369676e6174757265206c656e677468a2646970667358221220230afd4b6e3551329e50f1239e08fa3ab7907b77403c4f237d9adf679e8e43cf64736f6c634300060b0033", + "balance": "0" } } } @@ -32,4 +36,42 @@ data: 3fe89f53368415a79e065f3c885b7273b41540d5598488ef475cfdc4009850a4 --- {{- end }} +{{- if hasPrefix "ethereum-beacon" $chain.name }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-beacon +data: + config.yaml: |- + CONFIG_NAME: interop + PRESET_BASE: interop + + # Genesis + GENESIS_FORK_VERSION: 0x20000089 + + # Altair + ALTAIR_FORK_EPOCH: 0 + ALTAIR_FORK_VERSION: 0x20000090 + + # Merge + BELLATRIX_FORK_EPOCH: 0 + BELLATRIX_FORK_VERSION: 0x20000091 + TERMINAL_TOTAL_DIFFICULTY: 0 + + # Capella + CAPELLA_FORK_EPOCH: 0 + CAPELLA_FORK_VERSION: 0x20000092 + MAX_WITHDRAWALS_PER_PAYLOAD: 16 + + DENEB_FORK_VERSION: 0x20000093 + + # Time parameters + SECONDS_PER_SLOT: 12 + SLOTS_PER_EPOCH: 6 + + # Deposit contract + DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242 +--- +{{- end }} {{- end }} diff --git a/starship/charts/devnet/templates/chains/eth/execution.yaml b/starship/charts/devnet/templates/chains/eth/execution.yaml index 9c72b837c..aa7ddc57a 100644 --- a/starship/charts/devnet/templates/chains/eth/execution.yaml +++ b/starship/charts/devnet/templates/chains/eth/execution.yaml @@ -97,7 +97,7 @@ spec: volumes: - name: config configMap: - name: config-{{ $chain.name }} + name: config-execution - name: ethereum emptyDir: { } - name: secrets diff --git a/starship/charts/devnet/values.schema.json b/starship/charts/devnet/values.schema.json index 063babf79..d17f047ea 100644 --- a/starship/charts/devnet/values.schema.json +++ b/starship/charts/devnet/values.schema.json @@ -147,7 +147,8 @@ "kujira", "hyperweb", "noble", - "ethereum-execution" + "ethereum-execution", + "ethereum-beacon" ] }, "numValidators": { @@ -562,6 +563,9 @@ }, "readinessProbe": { "type": "object" + }, + "beacon": { + "type": "string" } }, "additionalProperties": false, From 4614bba3bd460169aec720f3dd246290c75643f1 Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Tue, 7 Jan 2025 17:45:56 +0400 Subject: [PATCH 05/16] try and fix other beacon chain k8s yaml --- .../devnet/templates/chains/eth/beacon.yaml | 7 +++-- .../templates/chains/eth/configmap.yaml | 26 +++++++++++++++---- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/starship/charts/devnet/templates/chains/eth/beacon.yaml b/starship/charts/devnet/templates/chains/eth/beacon.yaml index 7671d7a08..fc034a853 100644 --- a/starship/charts/devnet/templates/chains/eth/beacon.yaml +++ b/starship/charts/devnet/templates/chains/eth/beacon.yaml @@ -35,7 +35,7 @@ spec: {{- include "imagePullSecrets" $chain | indent 6 }} initContainers: - name: init-genesis - image: ghcr.io/cosmology-tech/starship/prysm/cmd/prysmctl:stable + image: gcr.io/prysmaticlabs/prysm/cmd/prysmctl:stable imagePullPolicy: IfNotPresent command: - bash @@ -43,10 +43,10 @@ spec: - | mkdir -p /ethereum/consensus /ethereum/execution cp /config-execution/genesis.json /ethereum/execution/genesis.json - cp /config-consensus/config.yaml /ethereum/consensus/config.yaml + cp /config-beacon/config.yaml /ethereum/consensus/config.yaml echo "Initializing genesis" - prysmctl testnet generate-genesis \ + ./prysmctl testnet generate-genesis \ --fork=capella \ --num-validators=64 \ --genesis-time-delay=15 \ @@ -83,7 +83,6 @@ spec: - "-c" - | echo "Starting consensus chain" - sleep infinity beacon-chain \ --execution-endpoint=http://localhost:8551 \ diff --git a/starship/charts/devnet/templates/chains/eth/configmap.yaml b/starship/charts/devnet/templates/chains/eth/configmap.yaml index 305dbd45c..95bccf66d 100644 --- a/starship/charts/devnet/templates/chains/eth/configmap.yaml +++ b/starship/charts/devnet/templates/chains/eth/configmap.yaml @@ -18,19 +18,31 @@ data: "constantinopleBlock": 0, "petersburgBlock": 0, "istanbulBlock": 0, - "terminalTotalDifficulty": 0 + "terminalTotalDifficulty": 0, + "terminalTotalDifficultyPassed": true }, - "difficulty": "0x1", + "nonce": "0x0", + "timestamp": "0x677d172f", + "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", "gasLimit": "0x47b760", + "difficulty": "0x1", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "coinbase": "0x0000000000000000000000000000000000000000", "alloc": { "0x0000000000000000000000000000000000000001": { - "balance": "1000000000000000000000" + "balance": "0x3635c9adc5dea00000" }, "0x4242424242424242424242424242424242424242": { "code": "0x60806040526004361061003f5760003560e01c806301ffc9a71461004457806322895118146100b6578063621fd130146101e3578063c5f2892f14610273575b600080fd5b34801561005057600080fd5b5061009c6004803603602081101561006757600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061029e565b604051808215151515815260200191505060405180910390f35b6101e1600480360360808110156100cc57600080fd5b81019080803590602001906401000000008111156100e957600080fd5b8201836020820111156100fb57600080fd5b8035906020019184600183028401116401000000008311171561011d57600080fd5b90919293919293908035906020019064010000000081111561013e57600080fd5b82018360208201111561015057600080fd5b8035906020019184600183028401116401000000008311171561017257600080fd5b90919293919293908035906020019064010000000081111561019357600080fd5b8201836020820111156101a557600080fd5b803590602001918460018302840111640100000000831117156101c757600080fd5b909192939192939080359060200190929190505050610370565b005b3480156101ef57600080fd5b506101f8610fd0565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561023857808201518184015260208101905061021d565b50505050905090810190601f1680156102655780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561027f57600080fd5b50610288610fe2565b6040518082815260200191505060405180910390f35b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061036957507f85640907000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b603087879050146103cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806116ec6026913960400191505060405180910390fd5b60208585905014610428576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806116836036913960400191505060405180910390fd5b60608383905014610484576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602981526020018061175f6029913960400191505060405180910390fd5b670de0b6b3a76400003410156104e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806117396026913960400191505060405180910390fd5b6000633b9aca0034816104f457fe5b061461054b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260338152602001806116b96033913960400191505060405180910390fd5b6000633b9aca00348161055a57fe5b04905067ffffffffffffffff80168111156105c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806117126027913960400191505060405180910390fd5b60606105cb82611314565b90507f649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c589898989858a8a610600602054611314565b60405180806020018060200180602001806020018060200186810386528e8e82818152602001925080828437600081840152601f19601f82011690508083019250505086810385528c8c82818152602001925080828437600081840152601f19601f82011690508083019250505086810384528a818151815260200191508051906020019080838360005b838110156106a657808201518184015260208101905061068b565b50505050905090810190601f1680156106d35780820380516001836020036101000a031916815260200191505b508681038352898982818152602001925080828437600081840152601f19601f820116905080830192505050868103825287818151815260200191508051906020019080838360005b8381101561073757808201518184015260208101905061071c565b50505050905090810190601f1680156107645780820380516001836020036101000a031916815260200191505b509d505050505050505050505050505060405180910390a1600060028a8a600060801b6040516020018084848082843780830192505050826fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff1916815260100193505050506040516020818303038152906040526040518082805190602001908083835b6020831061080e57805182526020820191506020810190506020830392506107eb565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610850573d6000803e3d6000fd5b5050506040513d602081101561086557600080fd5b8101908080519060200190929190505050905060006002808888600090604092610891939291906115da565b6040516020018083838082843780830192505050925050506040516020818303038152906040526040518082805190602001908083835b602083106108eb57805182526020820191506020810190506020830392506108c8565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa15801561092d573d6000803e3d6000fd5b5050506040513d602081101561094257600080fd5b8101908080519060200190929190505050600289896040908092610968939291906115da565b6000801b604051602001808484808284378083019250505082815260200193505050506040516020818303038152906040526040518082805190602001908083835b602083106109cd57805182526020820191506020810190506020830392506109aa565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610a0f573d6000803e3d6000fd5b5050506040513d6020811015610a2457600080fd5b810190808051906020019092919050505060405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610a8e5780518252602082019150602081019050602083039250610a6b565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610ad0573d6000803e3d6000fd5b5050506040513d6020811015610ae557600080fd5b810190808051906020019092919050505090506000600280848c8c604051602001808481526020018383808284378083019250505093505050506040516020818303038152906040526040518082805190602001908083835b60208310610b615780518252602082019150602081019050602083039250610b3e565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610ba3573d6000803e3d6000fd5b5050506040513d6020811015610bb857600080fd5b8101908080519060200190929190505050600286600060401b866040516020018084805190602001908083835b60208310610c085780518252602082019150602081019050602083039250610be5565b6001836020036101000a0380198251168184511680821785525050505050509050018367ffffffffffffffff191667ffffffffffffffff1916815260180182815260200193505050506040516020818303038152906040526040518082805190602001908083835b60208310610c935780518252602082019150602081019050602083039250610c70565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610cd5573d6000803e3d6000fd5b5050506040513d6020811015610cea57600080fd5b810190808051906020019092919050505060405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610d545780518252602082019150602081019050602083039250610d31565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610d96573d6000803e3d6000fd5b5050506040513d6020811015610dab57600080fd5b81019080805190602001909291905050509050858114610e16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252605481526020018061162f6054913960600191505060405180910390fd5b6001602060020a0360205410610e77576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061160e6021913960400191505060405180910390fd5b60016020600082825401925050819055506000602054905060008090505b6020811015610fb75760018083161415610ec8578260008260208110610eb757fe5b018190555050505050505050610fc7565b600260008260208110610ed757fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610f335780518252602082019150602081019050602083039250610f10565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610f75573d6000803e3d6000fd5b5050506040513d6020811015610f8a57600080fd5b8101908080519060200190929190505050925060028281610fa757fe5b0491508080600101915050610e95565b506000610fc057fe5b5050505050505b50505050505050565b6060610fdd602054611314565b905090565b6000806000602054905060008090505b60208110156111d057600180831614156110e05760026000826020811061101557fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310611071578051825260208201915060208101905060208303925061104e565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa1580156110b3573d6000803e3d6000fd5b5050506040513d60208110156110c857600080fd5b810190808051906020019092919050505092506111b6565b600283602183602081106110f057fe5b015460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061114b5780518252602082019150602081019050602083039250611128565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa15801561118d573d6000803e3d6000fd5b5050506040513d60208110156111a257600080fd5b810190808051906020019092919050505092505b600282816111c057fe5b0491508080600101915050610ff2565b506002826111df602054611314565b600060401b6040516020018084815260200183805190602001908083835b6020831061122057805182526020820191506020810190506020830392506111fd565b6001836020036101000a0380198251168184511680821785525050505050509050018267ffffffffffffffff191667ffffffffffffffff1916815260180193505050506040516020818303038152906040526040518082805190602001908083835b602083106112a55780518252602082019150602081019050602083039250611282565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa1580156112e7573d6000803e3d6000fd5b5050506040513d60208110156112fc57600080fd5b81019080805190602001909291905050509250505090565b6060600867ffffffffffffffff8111801561132e57600080fd5b506040519080825280601f01601f1916602001820160405280156113615781602001600182028036833780820191505090505b50905060008260c01b90508060076008811061137957fe5b1a60f81b8260008151811061138a57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806006600881106113c657fe5b1a60f81b826001815181106113d757fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060056008811061141357fe5b1a60f81b8260028151811061142457fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060046008811061146057fe5b1a60f81b8260038151811061147157fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806003600881106114ad57fe5b1a60f81b826004815181106114be57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806002600881106114fa57fe5b1a60f81b8260058151811061150b57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060016008811061154757fe5b1a60f81b8260068151811061155857fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060006008811061159457fe5b1a60f81b826007815181106115a557fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535050919050565b600080858511156115ea57600080fd5b838611156115f757600080fd5b600185028301915084860390509450949250505056fe4465706f736974436f6e74726163743a206d65726b6c6520747265652066756c6c4465706f736974436f6e74726163743a207265636f6e7374727563746564204465706f7369744461746120646f6573206e6f74206d6174636820737570706c696564206465706f7369745f646174615f726f6f744465706f736974436f6e74726163743a20696e76616c6964207769746864726177616c5f63726564656e7469616c73206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c7565206e6f74206d756c7469706c65206f6620677765694465706f736974436f6e74726163743a20696e76616c6964207075626b6579206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f20686967684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f206c6f774465706f736974436f6e74726163743a20696e76616c6964207369676e6174757265206c656e677468a2646970667358221220230afd4b6e3551329e50f1239e08fa3ab7907b77403c4f237d9adf679e8e43cf64736f6c634300060b0033", - "balance": "0" + "balance": "0x0" } - } + }, + "number": "0x0", + "gasUsed": "0x0", + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "baseFeePerGas": "0x7", + "excessBlobGas": null, + "blobGasUsed": null } jwt.hex: |- 3fe89f53368415a79e065f3c885b7273b41540d5598488ef475cfdc4009850a4 @@ -66,6 +78,10 @@ data: DENEB_FORK_VERSION: 0x20000093 + # Electra (newer fork) + ELECTRA_FORK_EPOCH: 999999999999 + ELECTRA_FORK_VERSION: 0x20000094 + # Time parameters SECONDS_PER_SLOT: 12 SLOTS_PER_EPOCH: 6 From 9033b002ecd59bb3c187005be15a5bfe95f71267 Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Wed, 15 Jan 2025 14:58:09 +0530 Subject: [PATCH 06/16] update docker files for eth beacon --- starship/docker/chains/Dockerfile.eth-beacon | 9 ++++++--- starship/docker/chains/versions.yaml | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/starship/docker/chains/Dockerfile.eth-beacon b/starship/docker/chains/Dockerfile.eth-beacon index 6fa3cc2ab..a7b000549 100644 --- a/starship/docker/chains/Dockerfile.eth-beacon +++ b/starship/docker/chains/Dockerfile.eth-beacon @@ -2,16 +2,19 @@ ARG BASE_IMAGE ARG VERSION FROM ${BASE_IMAGE}:${VERSION} AS source -FROM alpine:3.17 +FROM golang:1.22.0-bullseye LABEL org.opencontainers.image.source="https://github.com/cosmology-tech/starship" COPY --from=source /beacon-chain /usr/bin # Set up dependencies -ENV PACKAGES curl make bash jq sed +ENV PACKAGES curl make bash jq sed build-essential # Install minimum necessary dependencies -RUN apk add --no-cache $PACKAGES +RUN apt-get update --yes && \ + apt-get install $PACKAGES --no-install-recommends --yes && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* WORKDIR /opt diff --git a/starship/docker/chains/versions.yaml b/starship/docker/chains/versions.yaml index 4abff0820..92914a522 100644 --- a/starship/docker/chains/versions.yaml +++ b/starship/docker/chains/versions.yaml @@ -147,7 +147,7 @@ chains: - stable - v1.14.12 - v1.14.11 - - name: prysm/beacon-chain + - name: prysm-beacon-chain base: gcr.io/prysmaticlabs/prysm/beacon-chain file: Dockerfile.eth-beacon tags: From 79537da0edb47c4ac6b277b44aa2bdca18cd92db Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Wed, 15 Jan 2025 19:40:22 +0530 Subject: [PATCH 07/16] add dockerfile for prysm dockerfiles and nodes --- starship/docker/chains/Dockerfile.eth-beacon | 19 ++++++++++----- .../docker/chains/Dockerfile.eth-prysmctl | 24 +++++++++++++------ .../docker/chains/Dockerfile.eth-validator | 24 +++++++++++++------ starship/docker/chains/versions.yaml | 5 +--- 4 files changed, 48 insertions(+), 24 deletions(-) diff --git a/starship/docker/chains/Dockerfile.eth-beacon b/starship/docker/chains/Dockerfile.eth-beacon index a7b000549..3152ee966 100644 --- a/starship/docker/chains/Dockerfile.eth-beacon +++ b/starship/docker/chains/Dockerfile.eth-beacon @@ -1,15 +1,10 @@ -ARG BASE_IMAGE ARG VERSION -FROM ${BASE_IMAGE}:${VERSION} AS source - FROM golang:1.22.0-bullseye LABEL org.opencontainers.image.source="https://github.com/cosmology-tech/starship" -COPY --from=source /beacon-chain /usr/bin - # Set up dependencies -ENV PACKAGES curl make bash jq sed build-essential +ENV PACKAGES curl make bash jq sed # Install minimum necessary dependencies RUN apt-get update --yes && \ @@ -18,3 +13,15 @@ RUN apt-get update --yes && \ rm -rf /var/lib/apt/lists/* WORKDIR /opt + +# Download and install the beacon-chain binary +RUN ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') && \ + PLATFORM=$(uname -s | tr '[:upper:]' '[:lower:]') && \ + BINARY_NAME="beacon-chain-${VERSION}-${PLATFORM}-${ARCH}" && \ + echo "Downloading binary: $BINARY_NAME" && \ + curl -LO https://github.com/prysmaticlabs/prysm/releases/download/${VERSION}/$BINARY_NAME && \ + chmod +x $BINARY_NAME && \ + mv $BINARY_NAME /usr/bin/beacon-chain + +# Verify installation +RUN beacon-chain --version diff --git a/starship/docker/chains/Dockerfile.eth-prysmctl b/starship/docker/chains/Dockerfile.eth-prysmctl index 70b85394b..2ddcd58d7 100644 --- a/starship/docker/chains/Dockerfile.eth-prysmctl +++ b/starship/docker/chains/Dockerfile.eth-prysmctl @@ -1,17 +1,27 @@ -ARG BASE_IMAGE ARG VERSION -FROM ${BASE_IMAGE}:${VERSION} AS source - -FROM alpine:3.17 +FROM golang:1.22.0-bullseye LABEL org.opencontainers.image.source="https://github.com/cosmology-tech/starship" -COPY --from=source /prysmctl /usr/bin - # Set up dependencies ENV PACKAGES curl make bash jq sed # Install minimum necessary dependencies -RUN apk add --no-cache $PACKAGES +RUN apt-get update --yes && \ + apt-get install $PACKAGES --no-install-recommends --yes && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* WORKDIR /opt + +# Download and install the prysmctl binary +RUN ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') && \ + PLATFORM=$(uname -s | tr '[:upper:]' '[:lower:]') && \ + BINARY_NAME="prysmctl-${VERSION}-${PLATFORM}-${ARCH}" && \ + echo "Downloading binary: $BINARY_NAME" && \ + curl -LO https://github.com/prysmaticlabs/prysm/releases/download/${VERSION}/$BINARY_NAME && \ + chmod +x $BINARY_NAME && \ + mv $BINARY_NAME /usr/bin/prysmctl + +# Verify installation +RUN prysmctl --version diff --git a/starship/docker/chains/Dockerfile.eth-validator b/starship/docker/chains/Dockerfile.eth-validator index d5c670c8a..7633b2ae5 100644 --- a/starship/docker/chains/Dockerfile.eth-validator +++ b/starship/docker/chains/Dockerfile.eth-validator @@ -1,17 +1,27 @@ -ARG BASE_IMAGE ARG VERSION -FROM ${BASE_IMAGE}:${VERSION} AS source - -FROM alpine:3.17 +FROM golang:1.22.0-bullseye LABEL org.opencontainers.image.source="https://github.com/cosmology-tech/starship" -COPY --from=source /validator /usr/bin - # Set up dependencies ENV PACKAGES curl make bash jq sed # Install minimum necessary dependencies -RUN apk add --no-cache $PACKAGES +RUN apt-get update --yes && \ + apt-get install $PACKAGES --no-install-recommends --yes && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* WORKDIR /opt + +# Download and install the validator binary +RUN ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') && \ + PLATFORM=$(uname -s | tr '[:upper:]' '[:lower:]') && \ + BINARY_NAME="validator-${VERSION}-${PLATFORM}-${ARCH}" && \ + echo "Downloading binary: $BINARY_NAME" && \ + curl -LO https://github.com/prysmaticlabs/prysm/releases/download/${VERSION}/$BINARY_NAME && \ + chmod +x $BINARY_NAME && \ + mv $BINARY_NAME /usr/bin/validator + +# Verify installation +RUN validator --version diff --git a/starship/docker/chains/versions.yaml b/starship/docker/chains/versions.yaml index 92914a522..60a10cf5a 100644 --- a/starship/docker/chains/versions.yaml +++ b/starship/docker/chains/versions.yaml @@ -147,21 +147,18 @@ chains: - stable - v1.14.12 - v1.14.11 - - name: prysm-beacon-chain + - name: prysm/beacon-chain base: gcr.io/prysmaticlabs/prysm/beacon-chain file: Dockerfile.eth-beacon tags: - - stable - v5.2.0 - name: prysm/validator base: gcr.io/prysmaticlabs/prysm/validator file: Dockerfile.eth-validator tags: - - stable - v5.2.0 - name: prysm/cmd/prysmctl base: gcr.io/prysmaticlabs/prysm/cmd/prysmctl file: Dockerfile.eth-prysmctl tags: - - stable - v5.2.0 From f86384605e75062c1240c4b9f8aecb968ad88202 Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Wed, 15 Jan 2025 21:31:18 +0530 Subject: [PATCH 08/16] got connection working with beacon and exeuction chain --- .../devnet/templates/chains/eth/beacon.yaml | 31 +++++++++++-------- .../templates/chains/eth/execution.yaml | 15 ++++----- starship/tests/e2e/configs/eth.yaml | 2 +- 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/starship/charts/devnet/templates/chains/eth/beacon.yaml b/starship/charts/devnet/templates/chains/eth/beacon.yaml index fc034a853..7a3a79aa9 100644 --- a/starship/charts/devnet/templates/chains/eth/beacon.yaml +++ b/starship/charts/devnet/templates/chains/eth/beacon.yaml @@ -7,17 +7,17 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - name: {{ $chain.name }}-beacon-chain + name: {{ $chain.name }} namespace: {{ $.Release.Namespace }} labels: - app: {{ $chain.name }}-beacon-chain + app: {{ $chain.name }} spec: - serviceName: {{ $chain.name }}-beacon-chain + serviceName: {{ $chain.name }} replicas: {{ $chain.replicas }} selector: matchLabels: app.kubernetes.io/instance: {{ $chain.name }} - app.kubernetes.io/name: {{ $chain.id }}-beacon + app.kubernetes.io/name: {{ $chain.name }} template: metadata: annotations: @@ -27,16 +27,16 @@ spec: tier: gateway labels: app.kubernetes.io/instance: {{ $chain.name }} - app.kubernetes.io/type: {{ $chain.id }} - app.kubernetes.io/name: {{ $chain.id }}-beacon - app.kubernetes.io/rawname: {{ $chain.id }} + app.kubernetes.io/type: {{ $chain.name }} + app.kubernetes.io/name: {{ $chain.name }} + app.kubernetes.io/rawname: {{ $chain.name }} app.kubernetes.io/version: {{ $.Chart.AppVersion }} spec: {{- include "imagePullSecrets" $chain | indent 6 }} initContainers: - name: init-genesis - image: gcr.io/prysmaticlabs/prysm/cmd/prysmctl:stable - imagePullPolicy: IfNotPresent + image: ghcr.io/cosmology-tech/starship/prysm/cmd/prysmctl:v5.2.0 + imagePullPolicy: Always command: - bash - "-c" @@ -46,7 +46,7 @@ spec: cp /config-beacon/config.yaml /ethereum/consensus/config.yaml echo "Initializing genesis" - ./prysmctl testnet generate-genesis \ + prysmctl testnet generate-genesis \ --fork=capella \ --num-validators=64 \ --genesis-time-delay=15 \ @@ -70,7 +70,7 @@ spec: containers: - name: node image: {{ $chain.image }} - imagePullPolicy: IfNotPresent + imagePullPolicy: Always env: - name: HTTP_PORT value: "8545" @@ -78,6 +78,10 @@ spec: value: "8546" - name: RPC_PORT value: "8551" + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace command: - bash - "-c" @@ -85,8 +89,9 @@ spec: echo "Starting consensus chain" beacon-chain \ - --execution-endpoint=http://localhost:8551 \ - --jwt-secret=/etc/secrets/jwt.hex + --execution-endpoint=http://ethereum-execution-0.ethereum-execution.default.svc.cluster.local:8551 \ + --jwt-secret=/etc/secrets/jwt.hex \ + --accept-terms-of-use resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} volumeMounts: - name: ethereum diff --git a/starship/charts/devnet/templates/chains/eth/execution.yaml b/starship/charts/devnet/templates/chains/eth/execution.yaml index aa7ddc57a..088a9ca14 100644 --- a/starship/charts/devnet/templates/chains/eth/execution.yaml +++ b/starship/charts/devnet/templates/chains/eth/execution.yaml @@ -7,17 +7,17 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - name: {{ $chain.name }}-execution-chain + name: {{ $chain.name }} namespace: {{ $.Release.Namespace }} labels: - app: {{ $chain.name }}-execution-chain + app: {{ $chain.name }} spec: - serviceName: {{ $chain.name }}-execution-chain + serviceName: {{ $chain.name }} replicas: {{ $chain.replicas }} selector: matchLabels: app.kubernetes.io/instance: {{ $chain.name }} - app.kubernetes.io/name: {{ $chain.id }}-genesis + app.kubernetes.io/name: {{ $chain.name }} template: metadata: annotations: @@ -27,9 +27,9 @@ spec: tier: gateway labels: app.kubernetes.io/instance: {{ $chain.name }} - app.kubernetes.io/type: {{ $chain.id }} - app.kubernetes.io/name: {{ $chain.id }}-genesis - app.kubernetes.io/rawname: {{ $chain.id }} + app.kubernetes.io/type: {{ $chain.name }} + app.kubernetes.io/name: {{ $chain.name }} + app.kubernetes.io/rawname: {{ $chain.name }} app.kubernetes.io/version: {{ $.Chart.AppVersion }} spec: {{- include "imagePullSecrets" $chain | indent 6 }} @@ -75,6 +75,7 @@ spec: --http.api=eth,net,web3,debug \ --ws --ws.addr=0.0.0.0 \ --ws.port=$WS_PORT \ + --authrpc.addr=0.0.0.0 \ --authrpc.port=$RPC_PORT \ --nodiscover \ --http.corsdomain=* \ diff --git a/starship/tests/e2e/configs/eth.yaml b/starship/tests/e2e/configs/eth.yaml index 09f2d23dc..cd1633e7c 100644 --- a/starship/tests/e2e/configs/eth.yaml +++ b/starship/tests/e2e/configs/eth.yaml @@ -9,7 +9,7 @@ chains: rpc: 8551 - id: ethereum-beacon name: ethereum-beacon - image: ghcr.io/cosmology-tech/starship/prysm/beacon-chain:stable + image: ghcr.io/cosmology-tech/starship/prysm/beacon-chain:v5.2.0 numValidators: 1 ports: rest: 4000 From 4cba42deb2acf8da0f19b23d3b1067b8b57133c8 Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Fri, 17 Jan 2025 15:27:20 +0530 Subject: [PATCH 09/16] fix chain-id for beacon-chain to connect to execution chain --- starship/charts/devnet/templates/chains/eth/beacon.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/starship/charts/devnet/templates/chains/eth/beacon.yaml b/starship/charts/devnet/templates/chains/eth/beacon.yaml index 7a3a79aa9..5a20dd37d 100644 --- a/starship/charts/devnet/templates/chains/eth/beacon.yaml +++ b/starship/charts/devnet/templates/chains/eth/beacon.yaml @@ -91,7 +91,8 @@ spec: beacon-chain \ --execution-endpoint=http://ethereum-execution-0.ethereum-execution.default.svc.cluster.local:8551 \ --jwt-secret=/etc/secrets/jwt.hex \ - --accept-terms-of-use + --accept-terms-of-use \ + --chain-id=1337 resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} volumeMounts: - name: ethereum From 712d13507bc4dc9b29a6b013a36b27e858615ed6 Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Mon, 3 Feb 2025 20:32:06 +0400 Subject: [PATCH 10/16] update beacon and eth configmaps --- .../devnet/templates/chains/eth/beacon.yaml | 15 ++++++++++++++- .../devnet/templates/chains/eth/configmap.yaml | 12 ++++++------ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/starship/charts/devnet/templates/chains/eth/beacon.yaml b/starship/charts/devnet/templates/chains/eth/beacon.yaml index 5a20dd37d..8b1ece4db 100644 --- a/starship/charts/devnet/templates/chains/eth/beacon.yaml +++ b/starship/charts/devnet/templates/chains/eth/beacon.yaml @@ -92,7 +92,20 @@ spec: --execution-endpoint=http://ethereum-execution-0.ethereum-execution.default.svc.cluster.local:8551 \ --jwt-secret=/etc/secrets/jwt.hex \ --accept-terms-of-use \ - --chain-id=1337 + --http-host 0.0.0.0 \ + --rpc-host 0.0.0.0 \ + --chain-id 1337 \ + --contract-deployment-block=0 \ + --accept-terms-of-use \ + --datadir /ethereum/consensus \ + --genesis-state /ethereum/consensus/genesis.ssz \ + --min-sync-peers=0 \ + --chain-config-file=/ethereum/consensus/config.yaml \ + --network-id 1 \ + --suggested-fee-recipient=0x123463a4b065722e99115d6c222f267d9cabb524 \ + --minimum-peers-per-subnet=0 \ + --enable-debug-rpc-endpoints \ + --force-clear-db resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} volumeMounts: - name: ethereum diff --git a/starship/charts/devnet/templates/chains/eth/configmap.yaml b/starship/charts/devnet/templates/chains/eth/configmap.yaml index 95bccf66d..231b43c29 100644 --- a/starship/charts/devnet/templates/chains/eth/configmap.yaml +++ b/starship/charts/devnet/templates/chains/eth/configmap.yaml @@ -31,11 +31,11 @@ data: "alloc": { "0x0000000000000000000000000000000000000001": { "balance": "0x3635c9adc5dea00000" - }, - "0x4242424242424242424242424242424242424242": { - "code": "0x60806040526004361061003f5760003560e01c806301ffc9a71461004457806322895118146100b6578063621fd130146101e3578063c5f2892f14610273575b600080fd5b34801561005057600080fd5b5061009c6004803603602081101561006757600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061029e565b604051808215151515815260200191505060405180910390f35b6101e1600480360360808110156100cc57600080fd5b81019080803590602001906401000000008111156100e957600080fd5b8201836020820111156100fb57600080fd5b8035906020019184600183028401116401000000008311171561011d57600080fd5b90919293919293908035906020019064010000000081111561013e57600080fd5b82018360208201111561015057600080fd5b8035906020019184600183028401116401000000008311171561017257600080fd5b90919293919293908035906020019064010000000081111561019357600080fd5b8201836020820111156101a557600080fd5b803590602001918460018302840111640100000000831117156101c757600080fd5b909192939192939080359060200190929190505050610370565b005b3480156101ef57600080fd5b506101f8610fd0565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561023857808201518184015260208101905061021d565b50505050905090810190601f1680156102655780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561027f57600080fd5b50610288610fe2565b6040518082815260200191505060405180910390f35b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061036957507f85640907000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b603087879050146103cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806116ec6026913960400191505060405180910390fd5b60208585905014610428576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806116836036913960400191505060405180910390fd5b60608383905014610484576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602981526020018061175f6029913960400191505060405180910390fd5b670de0b6b3a76400003410156104e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806117396026913960400191505060405180910390fd5b6000633b9aca0034816104f457fe5b061461054b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260338152602001806116b96033913960400191505060405180910390fd5b6000633b9aca00348161055a57fe5b04905067ffffffffffffffff80168111156105c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806117126027913960400191505060405180910390fd5b60606105cb82611314565b90507f649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c589898989858a8a610600602054611314565b60405180806020018060200180602001806020018060200186810386528e8e82818152602001925080828437600081840152601f19601f82011690508083019250505086810385528c8c82818152602001925080828437600081840152601f19601f82011690508083019250505086810384528a818151815260200191508051906020019080838360005b838110156106a657808201518184015260208101905061068b565b50505050905090810190601f1680156106d35780820380516001836020036101000a031916815260200191505b508681038352898982818152602001925080828437600081840152601f19601f820116905080830192505050868103825287818151815260200191508051906020019080838360005b8381101561073757808201518184015260208101905061071c565b50505050905090810190601f1680156107645780820380516001836020036101000a031916815260200191505b509d505050505050505050505050505060405180910390a1600060028a8a600060801b6040516020018084848082843780830192505050826fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff1916815260100193505050506040516020818303038152906040526040518082805190602001908083835b6020831061080e57805182526020820191506020810190506020830392506107eb565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610850573d6000803e3d6000fd5b5050506040513d602081101561086557600080fd5b8101908080519060200190929190505050905060006002808888600090604092610891939291906115da565b6040516020018083838082843780830192505050925050506040516020818303038152906040526040518082805190602001908083835b602083106108eb57805182526020820191506020810190506020830392506108c8565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa15801561092d573d6000803e3d6000fd5b5050506040513d602081101561094257600080fd5b8101908080519060200190929190505050600289896040908092610968939291906115da565b6000801b604051602001808484808284378083019250505082815260200193505050506040516020818303038152906040526040518082805190602001908083835b602083106109cd57805182526020820191506020810190506020830392506109aa565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610a0f573d6000803e3d6000fd5b5050506040513d6020811015610a2457600080fd5b810190808051906020019092919050505060405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610a8e5780518252602082019150602081019050602083039250610a6b565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610ad0573d6000803e3d6000fd5b5050506040513d6020811015610ae557600080fd5b810190808051906020019092919050505090506000600280848c8c604051602001808481526020018383808284378083019250505093505050506040516020818303038152906040526040518082805190602001908083835b60208310610b615780518252602082019150602081019050602083039250610b3e565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610ba3573d6000803e3d6000fd5b5050506040513d6020811015610bb857600080fd5b8101908080519060200190929190505050600286600060401b866040516020018084805190602001908083835b60208310610c085780518252602082019150602081019050602083039250610be5565b6001836020036101000a0380198251168184511680821785525050505050509050018367ffffffffffffffff191667ffffffffffffffff1916815260180182815260200193505050506040516020818303038152906040526040518082805190602001908083835b60208310610c935780518252602082019150602081019050602083039250610c70565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610cd5573d6000803e3d6000fd5b5050506040513d6020811015610cea57600080fd5b810190808051906020019092919050505060405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610d545780518252602082019150602081019050602083039250610d31565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610d96573d6000803e3d6000fd5b5050506040513d6020811015610dab57600080fd5b81019080805190602001909291905050509050858114610e16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252605481526020018061162f6054913960600191505060405180910390fd5b6001602060020a0360205410610e77576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061160e6021913960400191505060405180910390fd5b60016020600082825401925050819055506000602054905060008090505b6020811015610fb75760018083161415610ec8578260008260208110610eb757fe5b018190555050505050505050610fc7565b600260008260208110610ed757fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610f335780518252602082019150602081019050602083039250610f10565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610f75573d6000803e3d6000fd5b5050506040513d6020811015610f8a57600080fd5b8101908080519060200190929190505050925060028281610fa757fe5b0491508080600101915050610e95565b506000610fc057fe5b5050505050505b50505050505050565b6060610fdd602054611314565b905090565b6000806000602054905060008090505b60208110156111d057600180831614156110e05760026000826020811061101557fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310611071578051825260208201915060208101905060208303925061104e565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa1580156110b3573d6000803e3d6000fd5b5050506040513d60208110156110c857600080fd5b810190808051906020019092919050505092506111b6565b600283602183602081106110f057fe5b015460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061114b5780518252602082019150602081019050602083039250611128565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa15801561118d573d6000803e3d6000fd5b5050506040513d60208110156111a257600080fd5b810190808051906020019092919050505092505b600282816111c057fe5b0491508080600101915050610ff2565b506002826111df602054611314565b600060401b6040516020018084815260200183805190602001908083835b6020831061122057805182526020820191506020810190506020830392506111fd565b6001836020036101000a0380198251168184511680821785525050505050509050018267ffffffffffffffff191667ffffffffffffffff1916815260180193505050506040516020818303038152906040526040518082805190602001908083835b602083106112a55780518252602082019150602081019050602083039250611282565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa1580156112e7573d6000803e3d6000fd5b5050506040513d60208110156112fc57600080fd5b81019080805190602001909291905050509250505090565b6060600867ffffffffffffffff8111801561132e57600080fd5b506040519080825280601f01601f1916602001820160405280156113615781602001600182028036833780820191505090505b50905060008260c01b90508060076008811061137957fe5b1a60f81b8260008151811061138a57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806006600881106113c657fe5b1a60f81b826001815181106113d757fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060056008811061141357fe5b1a60f81b8260028151811061142457fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060046008811061146057fe5b1a60f81b8260038151811061147157fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806003600881106114ad57fe5b1a60f81b826004815181106114be57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806002600881106114fa57fe5b1a60f81b8260058151811061150b57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060016008811061154757fe5b1a60f81b8260068151811061155857fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060006008811061159457fe5b1a60f81b826007815181106115a557fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535050919050565b600080858511156115ea57600080fd5b838611156115f757600080fd5b600185028301915084860390509450949250505056fe4465706f736974436f6e74726163743a206d65726b6c6520747265652066756c6c4465706f736974436f6e74726163743a207265636f6e7374727563746564204465706f7369744461746120646f6573206e6f74206d6174636820737570706c696564206465706f7369745f646174615f726f6f744465706f736974436f6e74726163743a20696e76616c6964207769746864726177616c5f63726564656e7469616c73206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c7565206e6f74206d756c7469706c65206f6620677765694465706f736974436f6e74726163743a20696e76616c6964207075626b6579206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f20686967684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f206c6f774465706f736974436f6e74726163743a20696e76616c6964207369676e6174757265206c656e677468a2646970667358221220230afd4b6e3551329e50f1239e08fa3ab7907b77403c4f237d9adf679e8e43cf64736f6c634300060b0033", - "balance": "0x0" } +{{/* "0x4242424242424242424242424242424242424242": {*/}} +{{/* "code": "0x60806040526004361061003f5760003560e01c806301ffc9a71461004457806322895118146100b6578063621fd130146101e3578063c5f2892f14610273575b600080fd5b34801561005057600080fd5b5061009c6004803603602081101561006757600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061029e565b604051808215151515815260200191505060405180910390f35b6101e1600480360360808110156100cc57600080fd5b81019080803590602001906401000000008111156100e957600080fd5b8201836020820111156100fb57600080fd5b8035906020019184600183028401116401000000008311171561011d57600080fd5b90919293919293908035906020019064010000000081111561013e57600080fd5b82018360208201111561015057600080fd5b8035906020019184600183028401116401000000008311171561017257600080fd5b90919293919293908035906020019064010000000081111561019357600080fd5b8201836020820111156101a557600080fd5b803590602001918460018302840111640100000000831117156101c757600080fd5b909192939192939080359060200190929190505050610370565b005b3480156101ef57600080fd5b506101f8610fd0565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561023857808201518184015260208101905061021d565b50505050905090810190601f1680156102655780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561027f57600080fd5b50610288610fe2565b6040518082815260200191505060405180910390f35b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061036957507f85640907000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b603087879050146103cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806116ec6026913960400191505060405180910390fd5b60208585905014610428576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806116836036913960400191505060405180910390fd5b60608383905014610484576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602981526020018061175f6029913960400191505060405180910390fd5b670de0b6b3a76400003410156104e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806117396026913960400191505060405180910390fd5b6000633b9aca0034816104f457fe5b061461054b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260338152602001806116b96033913960400191505060405180910390fd5b6000633b9aca00348161055a57fe5b04905067ffffffffffffffff80168111156105c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806117126027913960400191505060405180910390fd5b60606105cb82611314565b90507f649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c589898989858a8a610600602054611314565b60405180806020018060200180602001806020018060200186810386528e8e82818152602001925080828437600081840152601f19601f82011690508083019250505086810385528c8c82818152602001925080828437600081840152601f19601f82011690508083019250505086810384528a818151815260200191508051906020019080838360005b838110156106a657808201518184015260208101905061068b565b50505050905090810190601f1680156106d35780820380516001836020036101000a031916815260200191505b508681038352898982818152602001925080828437600081840152601f19601f820116905080830192505050868103825287818151815260200191508051906020019080838360005b8381101561073757808201518184015260208101905061071c565b50505050905090810190601f1680156107645780820380516001836020036101000a031916815260200191505b509d505050505050505050505050505060405180910390a1600060028a8a600060801b6040516020018084848082843780830192505050826fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff1916815260100193505050506040516020818303038152906040526040518082805190602001908083835b6020831061080e57805182526020820191506020810190506020830392506107eb565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610850573d6000803e3d6000fd5b5050506040513d602081101561086557600080fd5b8101908080519060200190929190505050905060006002808888600090604092610891939291906115da565b6040516020018083838082843780830192505050925050506040516020818303038152906040526040518082805190602001908083835b602083106108eb57805182526020820191506020810190506020830392506108c8565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa15801561092d573d6000803e3d6000fd5b5050506040513d602081101561094257600080fd5b8101908080519060200190929190505050600289896040908092610968939291906115da565b6000801b604051602001808484808284378083019250505082815260200193505050506040516020818303038152906040526040518082805190602001908083835b602083106109cd57805182526020820191506020810190506020830392506109aa565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610a0f573d6000803e3d6000fd5b5050506040513d6020811015610a2457600080fd5b810190808051906020019092919050505060405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610a8e5780518252602082019150602081019050602083039250610a6b565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610ad0573d6000803e3d6000fd5b5050506040513d6020811015610ae557600080fd5b810190808051906020019092919050505090506000600280848c8c604051602001808481526020018383808284378083019250505093505050506040516020818303038152906040526040518082805190602001908083835b60208310610b615780518252602082019150602081019050602083039250610b3e565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610ba3573d6000803e3d6000fd5b5050506040513d6020811015610bb857600080fd5b8101908080519060200190929190505050600286600060401b866040516020018084805190602001908083835b60208310610c085780518252602082019150602081019050602083039250610be5565b6001836020036101000a0380198251168184511680821785525050505050509050018367ffffffffffffffff191667ffffffffffffffff1916815260180182815260200193505050506040516020818303038152906040526040518082805190602001908083835b60208310610c935780518252602082019150602081019050602083039250610c70565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610cd5573d6000803e3d6000fd5b5050506040513d6020811015610cea57600080fd5b810190808051906020019092919050505060405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610d545780518252602082019150602081019050602083039250610d31565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610d96573d6000803e3d6000fd5b5050506040513d6020811015610dab57600080fd5b81019080805190602001909291905050509050858114610e16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252605481526020018061162f6054913960600191505060405180910390fd5b6001602060020a0360205410610e77576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061160e6021913960400191505060405180910390fd5b60016020600082825401925050819055506000602054905060008090505b6020811015610fb75760018083161415610ec8578260008260208110610eb757fe5b018190555050505050505050610fc7565b600260008260208110610ed757fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610f335780518252602082019150602081019050602083039250610f10565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610f75573d6000803e3d6000fd5b5050506040513d6020811015610f8a57600080fd5b8101908080519060200190929190505050925060028281610fa757fe5b0491508080600101915050610e95565b506000610fc057fe5b5050505050505b50505050505050565b6060610fdd602054611314565b905090565b6000806000602054905060008090505b60208110156111d057600180831614156110e05760026000826020811061101557fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310611071578051825260208201915060208101905060208303925061104e565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa1580156110b3573d6000803e3d6000fd5b5050506040513d60208110156110c857600080fd5b810190808051906020019092919050505092506111b6565b600283602183602081106110f057fe5b015460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061114b5780518252602082019150602081019050602083039250611128565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa15801561118d573d6000803e3d6000fd5b5050506040513d60208110156111a257600080fd5b810190808051906020019092919050505092505b600282816111c057fe5b0491508080600101915050610ff2565b506002826111df602054611314565b600060401b6040516020018084815260200183805190602001908083835b6020831061122057805182526020820191506020810190506020830392506111fd565b6001836020036101000a0380198251168184511680821785525050505050509050018267ffffffffffffffff191667ffffffffffffffff1916815260180193505050506040516020818303038152906040526040518082805190602001908083835b602083106112a55780518252602082019150602081019050602083039250611282565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa1580156112e7573d6000803e3d6000fd5b5050506040513d60208110156112fc57600080fd5b81019080805190602001909291905050509250505090565b6060600867ffffffffffffffff8111801561132e57600080fd5b506040519080825280601f01601f1916602001820160405280156113615781602001600182028036833780820191505090505b50905060008260c01b90508060076008811061137957fe5b1a60f81b8260008151811061138a57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806006600881106113c657fe5b1a60f81b826001815181106113d757fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060056008811061141357fe5b1a60f81b8260028151811061142457fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060046008811061146057fe5b1a60f81b8260038151811061147157fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806003600881106114ad57fe5b1a60f81b826004815181106114be57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806002600881106114fa57fe5b1a60f81b8260058151811061150b57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060016008811061154757fe5b1a60f81b8260068151811061155857fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060006008811061159457fe5b1a60f81b826007815181106115a557fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535050919050565b600080858511156115ea57600080fd5b838611156115f757600080fd5b600185028301915084860390509450949250505056fe4465706f736974436f6e74726163743a206d65726b6c6520747265652066756c6c4465706f736974436f6e74726163743a207265636f6e7374727563746564204465706f7369744461746120646f6573206e6f74206d6174636820737570706c696564206465706f7369745f646174615f726f6f744465706f736974436f6e74726163743a20696e76616c6964207769746864726177616c5f63726564656e7469616c73206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c7565206e6f74206d756c7469706c65206f6620677765694465706f736974436f6e74726163743a20696e76616c6964207075626b6579206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f20686967684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f206c6f774465706f736974436f6e74726163743a20696e76616c6964207369676e6174757265206c656e677468a2646970667358221220230afd4b6e3551329e50f1239e08fa3ab7907b77403c4f237d9adf679e8e43cf64736f6c634300060b0033",*/}} +{{/* "balance": "0x0"*/}} +{{/* }*/}} }, "number": "0x0", "gasUsed": "0x0", @@ -76,10 +76,10 @@ data: CAPELLA_FORK_VERSION: 0x20000092 MAX_WITHDRAWALS_PER_PAYLOAD: 16 + # Deneb DENEB_FORK_VERSION: 0x20000093 - # Electra (newer fork) - ELECTRA_FORK_EPOCH: 999999999999 + # Electra ELECTRA_FORK_VERSION: 0x20000094 # Time parameters From 8c1ff7bb78e87d966e757aa68943c4a585861760 Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Tue, 4 Feb 2025 17:16:41 +0400 Subject: [PATCH 11/16] add validator nodes as well --- .../devnet/templates/chains/eth/beacon.yaml | 62 +++++++++++++++++-- .../templates/chains/eth/configmap.yaml | 12 ++-- .../templates/chains/eth/execution.yaml | 16 ++++- 3 files changed, 77 insertions(+), 13 deletions(-) diff --git a/starship/charts/devnet/templates/chains/eth/beacon.yaml b/starship/charts/devnet/templates/chains/eth/beacon.yaml index 8b1ece4db..a734161cc 100644 --- a/starship/charts/devnet/templates/chains/eth/beacon.yaml +++ b/starship/charts/devnet/templates/chains/eth/beacon.yaml @@ -4,6 +4,18 @@ {{ $chain := include "devnet.fullchain" (dict "name" $chain.id "file" $defaultFile "context" $) | fromJson }} --- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: devnet-genesis-pvc + namespace: default +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi +--- apiVersion: apps/v1 kind: StatefulSet metadata: @@ -48,7 +60,7 @@ spec: echo "Initializing genesis" prysmctl testnet generate-genesis \ --fork=capella \ - --num-validators=64 \ + --num-validators=1 \ --genesis-time-delay=15 \ --output-ssz=/ethereum/consensus/genesis.ssz \ --chain-config-file=/ethereum/consensus/config.yaml \ @@ -57,6 +69,9 @@ spec: echo "Copy secrets over" cp /config-execution/jwt.hex /etc/secrets/jwt.hex + cp /ethereum/execution/genesis.json /genesis/execution/genesis.json + + touch /genesis/execution/genesis.ready resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} volumeMounts: - name: secrets @@ -67,6 +82,8 @@ spec: mountPath: /config-execution - name: ethereum mountPath: /ethereum + - name: genesis-volume + mountPath: /genesis/execution containers: - name: node image: {{ $chain.image }} @@ -86,8 +103,9 @@ spec: - bash - "-c" - | + echo "Waiting 15 seconds for execution client to be ready..." + sleep 15 echo "Starting consensus chain" - beacon-chain \ --execution-endpoint=http://ethereum-execution-0.ethereum-execution.default.svc.cluster.local:8551 \ --jwt-secret=/etc/secrets/jwt.hex \ @@ -96,15 +114,13 @@ spec: --rpc-host 0.0.0.0 \ --chain-id 1337 \ --contract-deployment-block=0 \ - --accept-terms-of-use \ --datadir /ethereum/consensus \ --genesis-state /ethereum/consensus/genesis.ssz \ --min-sync-peers=0 \ --chain-config-file=/ethereum/consensus/config.yaml \ - --network-id 1 \ - --suggested-fee-recipient=0x123463a4b065722e99115d6c222f267d9cabb524 \ + --network-id 1337 \ + --suggested-fee-recipient=0x123463a4B065722E99115D6c222f267d9cABb524 \ --minimum-peers-per-subnet=0 \ - --enable-debug-rpc-endpoints \ --force-clear-db resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} volumeMounts: @@ -112,6 +128,37 @@ spec: mountPath: /ethereum - name: secrets mountPath: /etc/secrets + - name: validator + image: ghcr.io/cosmology-tech/starship/prysm/validator:v5.2.0 + imagePullPolicy: Always + env: + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + command: + - bash + - "-c" + - | + echo "Waiting 15 seconds for execution client to be ready..." + sleep 20 + mkdir -p /ethereum/consensus/validator + echo "Starting validator node" + validator \ + --accept-terms-of-use \ + --beacon-rpc-provider=localhost:4000 \ + --datadir=/ethereum/consensus/validator \ + --interop-num-validators=1 \ + --interop-start-index=0 \ + --force-clear-db \ + --chain-config-file=/ethereum/consensus/config.yaml \ + --suggested-fee-recipient=0x0C46c2cAFE097b4f7e1BB868B89e5697eE65f934 + resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} + volumeMounts: + - name: ethereum + mountPath: /ethereum + - name: secrets + mountPath: /etc/secrets volumes: - name: config-beacon configMap: @@ -123,6 +170,9 @@ spec: emptyDir: { } - name: secrets emptyDir: { } + - name: genesis-volume + persistentVolumeClaim: + claimName: devnet-genesis-pvc --- {{- end }} {{- end }} \ No newline at end of file diff --git a/starship/charts/devnet/templates/chains/eth/configmap.yaml b/starship/charts/devnet/templates/chains/eth/configmap.yaml index 231b43c29..a19ae54d4 100644 --- a/starship/charts/devnet/templates/chains/eth/configmap.yaml +++ b/starship/charts/devnet/templates/chains/eth/configmap.yaml @@ -18,6 +18,8 @@ data: "constantinopleBlock": 0, "petersburgBlock": 0, "istanbulBlock": 0, + "londonBlock": 0, + "berlinBlock": 0, "terminalTotalDifficulty": 0, "terminalTotalDifficultyPassed": true }, @@ -31,11 +33,11 @@ data: "alloc": { "0x0000000000000000000000000000000000000001": { "balance": "0x3635c9adc5dea00000" + }, + "0x4242424242424242424242424242424242424242": { + "code": "0x60806040526004361061003f5760003560e01c806301ffc9a71461004457806322895118146100b6578063621fd130146101e3578063c5f2892f14610273575b600080fd5b34801561005057600080fd5b5061009c6004803603602081101561006757600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061029e565b604051808215151515815260200191505060405180910390f35b6101e1600480360360808110156100cc57600080fd5b81019080803590602001906401000000008111156100e957600080fd5b8201836020820111156100fb57600080fd5b8035906020019184600183028401116401000000008311171561011d57600080fd5b90919293919293908035906020019064010000000081111561013e57600080fd5b82018360208201111561015057600080fd5b8035906020019184600183028401116401000000008311171561017257600080fd5b90919293919293908035906020019064010000000081111561019357600080fd5b8201836020820111156101a557600080fd5b803590602001918460018302840111640100000000831117156101c757600080fd5b909192939192939080359060200190929190505050610370565b005b3480156101ef57600080fd5b506101f8610fd0565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561023857808201518184015260208101905061021d565b50505050905090810190601f1680156102655780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561027f57600080fd5b50610288610fe2565b6040518082815260200191505060405180910390f35b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061036957507f85640907000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b603087879050146103cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806116ec6026913960400191505060405180910390fd5b60208585905014610428576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806116836036913960400191505060405180910390fd5b60608383905014610484576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602981526020018061175f6029913960400191505060405180910390fd5b670de0b6b3a76400003410156104e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806117396026913960400191505060405180910390fd5b6000633b9aca0034816104f457fe5b061461054b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260338152602001806116b96033913960400191505060405180910390fd5b6000633b9aca00348161055a57fe5b04905067ffffffffffffffff80168111156105c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806117126027913960400191505060405180910390fd5b60606105cb82611314565b90507f649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c589898989858a8a610600602054611314565b60405180806020018060200180602001806020018060200186810386528e8e82818152602001925080828437600081840152601f19601f82011690508083019250505086810385528c8c82818152602001925080828437600081840152601f19601f82011690508083019250505086810384528a818151815260200191508051906020019080838360005b838110156106a657808201518184015260208101905061068b565b50505050905090810190601f1680156106d35780820380516001836020036101000a031916815260200191505b508681038352898982818152602001925080828437600081840152601f19601f820116905080830192505050868103825287818151815260200191508051906020019080838360005b8381101561073757808201518184015260208101905061071c565b50505050905090810190601f1680156107645780820380516001836020036101000a031916815260200191505b509d505050505050505050505050505060405180910390a1600060028a8a600060801b6040516020018084848082843780830192505050826fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff1916815260100193505050506040516020818303038152906040526040518082805190602001908083835b6020831061080e57805182526020820191506020810190506020830392506107eb565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610850573d6000803e3d6000fd5b5050506040513d602081101561086557600080fd5b8101908080519060200190929190505050905060006002808888600090604092610891939291906115da565b6040516020018083838082843780830192505050925050506040516020818303038152906040526040518082805190602001908083835b602083106108eb57805182526020820191506020810190506020830392506108c8565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa15801561092d573d6000803e3d6000fd5b5050506040513d602081101561094257600080fd5b8101908080519060200190929190505050600289896040908092610968939291906115da565b6000801b604051602001808484808284378083019250505082815260200193505050506040516020818303038152906040526040518082805190602001908083835b602083106109cd57805182526020820191506020810190506020830392506109aa565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610a0f573d6000803e3d6000fd5b5050506040513d6020811015610a2457600080fd5b810190808051906020019092919050505060405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610a8e5780518252602082019150602081019050602083039250610a6b565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610ad0573d6000803e3d6000fd5b5050506040513d6020811015610ae557600080fd5b810190808051906020019092919050505090506000600280848c8c604051602001808481526020018383808284378083019250505093505050506040516020818303038152906040526040518082805190602001908083835b60208310610b615780518252602082019150602081019050602083039250610b3e565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610ba3573d6000803e3d6000fd5b5050506040513d6020811015610bb857600080fd5b8101908080519060200190929190505050600286600060401b866040516020018084805190602001908083835b60208310610c085780518252602082019150602081019050602083039250610be5565b6001836020036101000a0380198251168184511680821785525050505050509050018367ffffffffffffffff191667ffffffffffffffff1916815260180182815260200193505050506040516020818303038152906040526040518082805190602001908083835b60208310610c935780518252602082019150602081019050602083039250610c70565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610cd5573d6000803e3d6000fd5b5050506040513d6020811015610cea57600080fd5b810190808051906020019092919050505060405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610d545780518252602082019150602081019050602083039250610d31565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610d96573d6000803e3d6000fd5b5050506040513d6020811015610dab57600080fd5b81019080805190602001909291905050509050858114610e16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252605481526020018061162f6054913960600191505060405180910390fd5b6001602060020a0360205410610e77576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061160e6021913960400191505060405180910390fd5b60016020600082825401925050819055506000602054905060008090505b6020811015610fb75760018083161415610ec8578260008260208110610eb757fe5b018190555050505050505050610fc7565b600260008260208110610ed757fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610f335780518252602082019150602081019050602083039250610f10565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610f75573d6000803e3d6000fd5b5050506040513d6020811015610f8a57600080fd5b8101908080519060200190929190505050925060028281610fa757fe5b0491508080600101915050610e95565b506000610fc057fe5b5050505050505b50505050505050565b6060610fdd602054611314565b905090565b6000806000602054905060008090505b60208110156111d057600180831614156110e05760026000826020811061101557fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310611071578051825260208201915060208101905060208303925061104e565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa1580156110b3573d6000803e3d6000fd5b5050506040513d60208110156110c857600080fd5b810190808051906020019092919050505092506111b6565b600283602183602081106110f057fe5b015460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061114b5780518252602082019150602081019050602083039250611128565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa15801561118d573d6000803e3d6000fd5b5050506040513d60208110156111a257600080fd5b810190808051906020019092919050505092505b600282816111c057fe5b0491508080600101915050610ff2565b506002826111df602054611314565b600060401b6040516020018084815260200183805190602001908083835b6020831061122057805182526020820191506020810190506020830392506111fd565b6001836020036101000a0380198251168184511680821785525050505050509050018267ffffffffffffffff191667ffffffffffffffff1916815260180193505050506040516020818303038152906040526040518082805190602001908083835b602083106112a55780518252602082019150602081019050602083039250611282565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa1580156112e7573d6000803e3d6000fd5b5050506040513d60208110156112fc57600080fd5b81019080805190602001909291905050509250505090565b6060600867ffffffffffffffff8111801561132e57600080fd5b506040519080825280601f01601f1916602001820160405280156113615781602001600182028036833780820191505090505b50905060008260c01b90508060076008811061137957fe5b1a60f81b8260008151811061138a57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806006600881106113c657fe5b1a60f81b826001815181106113d757fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060056008811061141357fe5b1a60f81b8260028151811061142457fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060046008811061146057fe5b1a60f81b8260038151811061147157fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806003600881106114ad57fe5b1a60f81b826004815181106114be57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806002600881106114fa57fe5b1a60f81b8260058151811061150b57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060016008811061154757fe5b1a60f81b8260068151811061155857fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060006008811061159457fe5b1a60f81b826007815181106115a557fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535050919050565b600080858511156115ea57600080fd5b838611156115f757600080fd5b600185028301915084860390509450949250505056fe4465706f736974436f6e74726163743a206d65726b6c6520747265652066756c6c4465706f736974436f6e74726163743a207265636f6e7374727563746564204465706f7369744461746120646f6573206e6f74206d6174636820737570706c696564206465706f7369745f646174615f726f6f744465706f736974436f6e74726163743a20696e76616c6964207769746864726177616c5f63726564656e7469616c73206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c7565206e6f74206d756c7469706c65206f6620677765694465706f736974436f6e74726163743a20696e76616c6964207075626b6579206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f20686967684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f206c6f774465706f736974436f6e74726163743a20696e76616c6964207369676e6174757265206c656e677468a2646970667358221220230afd4b6e3551329e50f1239e08fa3ab7907b77403c4f237d9adf679e8e43cf64736f6c634300060b0033", + "balance": "0x0" } -{{/* "0x4242424242424242424242424242424242424242": {*/}} -{{/* "code": "0x60806040526004361061003f5760003560e01c806301ffc9a71461004457806322895118146100b6578063621fd130146101e3578063c5f2892f14610273575b600080fd5b34801561005057600080fd5b5061009c6004803603602081101561006757600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061029e565b604051808215151515815260200191505060405180910390f35b6101e1600480360360808110156100cc57600080fd5b81019080803590602001906401000000008111156100e957600080fd5b8201836020820111156100fb57600080fd5b8035906020019184600183028401116401000000008311171561011d57600080fd5b90919293919293908035906020019064010000000081111561013e57600080fd5b82018360208201111561015057600080fd5b8035906020019184600183028401116401000000008311171561017257600080fd5b90919293919293908035906020019064010000000081111561019357600080fd5b8201836020820111156101a557600080fd5b803590602001918460018302840111640100000000831117156101c757600080fd5b909192939192939080359060200190929190505050610370565b005b3480156101ef57600080fd5b506101f8610fd0565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561023857808201518184015260208101905061021d565b50505050905090810190601f1680156102655780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561027f57600080fd5b50610288610fe2565b6040518082815260200191505060405180910390f35b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061036957507f85640907000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b603087879050146103cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806116ec6026913960400191505060405180910390fd5b60208585905014610428576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806116836036913960400191505060405180910390fd5b60608383905014610484576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602981526020018061175f6029913960400191505060405180910390fd5b670de0b6b3a76400003410156104e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806117396026913960400191505060405180910390fd5b6000633b9aca0034816104f457fe5b061461054b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260338152602001806116b96033913960400191505060405180910390fd5b6000633b9aca00348161055a57fe5b04905067ffffffffffffffff80168111156105c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806117126027913960400191505060405180910390fd5b60606105cb82611314565b90507f649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c589898989858a8a610600602054611314565b60405180806020018060200180602001806020018060200186810386528e8e82818152602001925080828437600081840152601f19601f82011690508083019250505086810385528c8c82818152602001925080828437600081840152601f19601f82011690508083019250505086810384528a818151815260200191508051906020019080838360005b838110156106a657808201518184015260208101905061068b565b50505050905090810190601f1680156106d35780820380516001836020036101000a031916815260200191505b508681038352898982818152602001925080828437600081840152601f19601f820116905080830192505050868103825287818151815260200191508051906020019080838360005b8381101561073757808201518184015260208101905061071c565b50505050905090810190601f1680156107645780820380516001836020036101000a031916815260200191505b509d505050505050505050505050505060405180910390a1600060028a8a600060801b6040516020018084848082843780830192505050826fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff1916815260100193505050506040516020818303038152906040526040518082805190602001908083835b6020831061080e57805182526020820191506020810190506020830392506107eb565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610850573d6000803e3d6000fd5b5050506040513d602081101561086557600080fd5b8101908080519060200190929190505050905060006002808888600090604092610891939291906115da565b6040516020018083838082843780830192505050925050506040516020818303038152906040526040518082805190602001908083835b602083106108eb57805182526020820191506020810190506020830392506108c8565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa15801561092d573d6000803e3d6000fd5b5050506040513d602081101561094257600080fd5b8101908080519060200190929190505050600289896040908092610968939291906115da565b6000801b604051602001808484808284378083019250505082815260200193505050506040516020818303038152906040526040518082805190602001908083835b602083106109cd57805182526020820191506020810190506020830392506109aa565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610a0f573d6000803e3d6000fd5b5050506040513d6020811015610a2457600080fd5b810190808051906020019092919050505060405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610a8e5780518252602082019150602081019050602083039250610a6b565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610ad0573d6000803e3d6000fd5b5050506040513d6020811015610ae557600080fd5b810190808051906020019092919050505090506000600280848c8c604051602001808481526020018383808284378083019250505093505050506040516020818303038152906040526040518082805190602001908083835b60208310610b615780518252602082019150602081019050602083039250610b3e565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610ba3573d6000803e3d6000fd5b5050506040513d6020811015610bb857600080fd5b8101908080519060200190929190505050600286600060401b866040516020018084805190602001908083835b60208310610c085780518252602082019150602081019050602083039250610be5565b6001836020036101000a0380198251168184511680821785525050505050509050018367ffffffffffffffff191667ffffffffffffffff1916815260180182815260200193505050506040516020818303038152906040526040518082805190602001908083835b60208310610c935780518252602082019150602081019050602083039250610c70565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610cd5573d6000803e3d6000fd5b5050506040513d6020811015610cea57600080fd5b810190808051906020019092919050505060405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610d545780518252602082019150602081019050602083039250610d31565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610d96573d6000803e3d6000fd5b5050506040513d6020811015610dab57600080fd5b81019080805190602001909291905050509050858114610e16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252605481526020018061162f6054913960600191505060405180910390fd5b6001602060020a0360205410610e77576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061160e6021913960400191505060405180910390fd5b60016020600082825401925050819055506000602054905060008090505b6020811015610fb75760018083161415610ec8578260008260208110610eb757fe5b018190555050505050505050610fc7565b600260008260208110610ed757fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610f335780518252602082019150602081019050602083039250610f10565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610f75573d6000803e3d6000fd5b5050506040513d6020811015610f8a57600080fd5b8101908080519060200190929190505050925060028281610fa757fe5b0491508080600101915050610e95565b506000610fc057fe5b5050505050505b50505050505050565b6060610fdd602054611314565b905090565b6000806000602054905060008090505b60208110156111d057600180831614156110e05760026000826020811061101557fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310611071578051825260208201915060208101905060208303925061104e565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa1580156110b3573d6000803e3d6000fd5b5050506040513d60208110156110c857600080fd5b810190808051906020019092919050505092506111b6565b600283602183602081106110f057fe5b015460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061114b5780518252602082019150602081019050602083039250611128565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa15801561118d573d6000803e3d6000fd5b5050506040513d60208110156111a257600080fd5b810190808051906020019092919050505092505b600282816111c057fe5b0491508080600101915050610ff2565b506002826111df602054611314565b600060401b6040516020018084815260200183805190602001908083835b6020831061122057805182526020820191506020810190506020830392506111fd565b6001836020036101000a0380198251168184511680821785525050505050509050018267ffffffffffffffff191667ffffffffffffffff1916815260180193505050506040516020818303038152906040526040518082805190602001908083835b602083106112a55780518252602082019150602081019050602083039250611282565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa1580156112e7573d6000803e3d6000fd5b5050506040513d60208110156112fc57600080fd5b81019080805190602001909291905050509250505090565b6060600867ffffffffffffffff8111801561132e57600080fd5b506040519080825280601f01601f1916602001820160405280156113615781602001600182028036833780820191505090505b50905060008260c01b90508060076008811061137957fe5b1a60f81b8260008151811061138a57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806006600881106113c657fe5b1a60f81b826001815181106113d757fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060056008811061141357fe5b1a60f81b8260028151811061142457fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060046008811061146057fe5b1a60f81b8260038151811061147157fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806003600881106114ad57fe5b1a60f81b826004815181106114be57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806002600881106114fa57fe5b1a60f81b8260058151811061150b57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060016008811061154757fe5b1a60f81b8260068151811061155857fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060006008811061159457fe5b1a60f81b826007815181106115a557fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535050919050565b600080858511156115ea57600080fd5b838611156115f757600080fd5b600185028301915084860390509450949250505056fe4465706f736974436f6e74726163743a206d65726b6c6520747265652066756c6c4465706f736974436f6e74726163743a207265636f6e7374727563746564204465706f7369744461746120646f6573206e6f74206d6174636820737570706c696564206465706f7369745f646174615f726f6f744465706f736974436f6e74726163743a20696e76616c6964207769746864726177616c5f63726564656e7469616c73206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c7565206e6f74206d756c7469706c65206f6620677765694465706f736974436f6e74726163743a20696e76616c6964207075626b6579206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f20686967684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f206c6f774465706f736974436f6e74726163743a20696e76616c6964207369676e6174757265206c656e677468a2646970667358221220230afd4b6e3551329e50f1239e08fa3ab7907b77403c4f237d9adf679e8e43cf64736f6c634300060b0033",*/}} -{{/* "balance": "0x0"*/}} -{{/* }*/}} }, "number": "0x0", "gasUsed": "0x0", @@ -45,7 +47,7 @@ data: "blobGasUsed": null } jwt.hex: |- - 3fe89f53368415a79e065f3c885b7273b41540d5598488ef475cfdc4009850a4 + 0x3fe89f53368415a79e065f3c885b7273b41540d5598488ef475cfdc4009850a4 --- {{- end }} {{- if hasPrefix "ethereum-beacon" $chain.name }} diff --git a/starship/charts/devnet/templates/chains/eth/execution.yaml b/starship/charts/devnet/templates/chains/eth/execution.yaml index 088a9ca14..6d3bf7d8c 100644 --- a/starship/charts/devnet/templates/chains/eth/execution.yaml +++ b/starship/charts/devnet/templates/chains/eth/execution.yaml @@ -41,8 +41,12 @@ spec: - bash - "-c" - | + echo "Waiting for genesis file to be ready..." + while [ ! -f /genesis/execution/genesis.ready ]; do sleep 1; done + echo "Genesis file is ready." + echo "Initializing genesis" - cp /config/genesis.json /ethereum/execution/genesis.json + cp /genesis/execution/genesis.json /ethereum/execution/genesis.json cp /config/jwt.hex /etc/secrets/jwt.hex geth --datadir /ethereum/execution init /ethereum/execution/genesis.json resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} @@ -53,6 +57,8 @@ spec: mountPath: /config - name: ethereum mountPath: /ethereum/execution + - name: genesis-volume + mountPath: /genesis/execution containers: - name: node image: {{ $chain.image }} @@ -68,6 +74,7 @@ spec: - bash - "-c" - | + echo "Starting execution chain" echo "Starting execution chain" geth --datadir /ethereum/execution --http \ --http.addr=0.0.0.0 \ @@ -88,7 +95,9 @@ spec: --unlock=0x123463a4B065722E99115D6c222f267d9cABb524 \ --password=/dev/null \ --syncmode=full \ - --networkid=1337 + --networkid=1337 \ + --mine \ + --log.vmodule=engine=6 resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} volumeMounts: - name: ethereum @@ -103,6 +112,9 @@ spec: emptyDir: { } - name: secrets emptyDir: { } + - name: genesis-volume + persistentVolumeClaim: + claimName: devnet-genesis-pvc --- {{- end }} {{- end }} \ No newline at end of file From 290cc0af969c0d68c4da2e76b13006d788cfdc5e Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Sat, 8 Feb 2025 13:43:02 +0400 Subject: [PATCH 12/16] update eth reading from config --- starship/charts/devnet/defaults.yaml | 11 +++++-- .../devnet/templates/chains/eth/beacon.yaml | 30 +++++-------------- .../templates/chains/eth/execution.yaml | 9 +----- starship/tests/e2e/configs/eth.yaml | 4 +-- 4 files changed, 19 insertions(+), 35 deletions(-) diff --git a/starship/charts/devnet/defaults.yaml b/starship/charts/devnet/defaults.yaml index 00fb42c22..318c76b64 100644 --- a/starship/charts/devnet/defaults.yaml +++ b/starship/charts/devnet/defaults.yaml @@ -794,7 +794,7 @@ defaultChains: coingecko_id: stake keywords: [ "stake" ] etherum-execution: - image: ghcr.io/cosmology-tech/starship/ethereum/client-go:latest + image: ghcr.io/hyperweb-io/starship/ethereum/client-go:latest home: /ethereum/execution binary: geth prefix: eth @@ -805,7 +805,7 @@ defaultChains: coinType: 60 repo: https://github.com/ethereum/go-ethereum etherum-beacon: - image: ghcr.io/cosmology-tech/starship/ethereum/client-go:latest + image: ghcr.io/hyperweb-io/starship/prysm/beacon-chain:v5.2.0 home: /ethereum/execution binary: geth prefix: eth @@ -815,6 +815,13 @@ defaultChains: hdPath: m/44'/60'/0'/0/0 coinType: 60 repo: https://github.com/ethereum/go-ethereum + config: + validator: + enabled: true + image: ghcr.io/cosmology-tech/starship/prysm/validator:v5.2.0 + numValidator: 64 + prysmctl: + image: ghcr.io/cosmology-tech/starship/prysm/cmd/prysmctl:v5.2.0 eth: storageClassName: hostpath genesisStateUrl: https://github.com/eth-clients/merge-testnets/blob/main/sepolia/genesis.ssz diff --git a/starship/charts/devnet/templates/chains/eth/beacon.yaml b/starship/charts/devnet/templates/chains/eth/beacon.yaml index a734161cc..70607b1c6 100644 --- a/starship/charts/devnet/templates/chains/eth/beacon.yaml +++ b/starship/charts/devnet/templates/chains/eth/beacon.yaml @@ -3,18 +3,7 @@ {{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }} {{ $chain := include "devnet.fullchain" (dict "name" $chain.id "file" $defaultFile "context" $) | fromJson }} ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: devnet-genesis-pvc - namespace: default -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 1Gi +{{ $initParams := dict "chains" (list $chain.id) "port" $.Values.exposer.ports.rest "context" $ }} --- apiVersion: apps/v1 kind: StatefulSet @@ -47,7 +36,7 @@ spec: {{- include "imagePullSecrets" $chain | indent 6 }} initContainers: - name: init-genesis - image: ghcr.io/cosmology-tech/starship/prysm/cmd/prysmctl:v5.2.0 + image: {{ $chain.config.prysmctl }} imagePullPolicy: Always command: - bash @@ -60,7 +49,9 @@ spec: echo "Initializing genesis" prysmctl testnet generate-genesis \ --fork=capella \ - --num-validators=1 \ + {{- if $chain.config.validator.enabled }} + --num-validators={{ $chain.config.validator.numValidator }} \ + {{- end }} --genesis-time-delay=15 \ --output-ssz=/ethereum/consensus/genesis.ssz \ --chain-config-file=/ethereum/consensus/config.yaml \ @@ -69,9 +60,6 @@ spec: echo "Copy secrets over" cp /config-execution/jwt.hex /etc/secrets/jwt.hex - cp /ethereum/execution/genesis.json /genesis/execution/genesis.json - - touch /genesis/execution/genesis.ready resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} volumeMounts: - name: secrets @@ -82,8 +70,7 @@ spec: mountPath: /config-execution - name: ethereum mountPath: /ethereum - - name: genesis-volume - mountPath: /genesis/execution + {{- include "devnet.init.wait" $initParams | indent 8 }} containers: - name: node image: {{ $chain.image }} @@ -104,7 +91,7 @@ spec: - "-c" - | echo "Waiting 15 seconds for execution client to be ready..." - sleep 15 + echo "Starting consensus chain" beacon-chain \ --execution-endpoint=http://ethereum-execution-0.ethereum-execution.default.svc.cluster.local:8551 \ @@ -170,9 +157,6 @@ spec: emptyDir: { } - name: secrets emptyDir: { } - - name: genesis-volume - persistentVolumeClaim: - claimName: devnet-genesis-pvc --- {{- end }} {{- end }} \ No newline at end of file diff --git a/starship/charts/devnet/templates/chains/eth/execution.yaml b/starship/charts/devnet/templates/chains/eth/execution.yaml index 6d3bf7d8c..1705bead4 100644 --- a/starship/charts/devnet/templates/chains/eth/execution.yaml +++ b/starship/charts/devnet/templates/chains/eth/execution.yaml @@ -41,12 +41,8 @@ spec: - bash - "-c" - | - echo "Waiting for genesis file to be ready..." - while [ ! -f /genesis/execution/genesis.ready ]; do sleep 1; done - echo "Genesis file is ready." - echo "Initializing genesis" - cp /genesis/execution/genesis.json /ethereum/execution/genesis.json + cp /config/genesis.json /ethereum/execution/genesis.json cp /config/jwt.hex /etc/secrets/jwt.hex geth --datadir /ethereum/execution init /ethereum/execution/genesis.json resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} @@ -112,9 +108,6 @@ spec: emptyDir: { } - name: secrets emptyDir: { } - - name: genesis-volume - persistentVolumeClaim: - claimName: devnet-genesis-pvc --- {{- end }} {{- end }} \ No newline at end of file diff --git a/starship/tests/e2e/configs/eth.yaml b/starship/tests/e2e/configs/eth.yaml index cd1633e7c..97a1c1622 100644 --- a/starship/tests/e2e/configs/eth.yaml +++ b/starship/tests/e2e/configs/eth.yaml @@ -1,5 +1,5 @@ chains: - - id: ethereum-execution + - id: ethereum-execution-1337 name: ethereum-execution image: ghcr.io/cosmology-tech/starship/ethereum/client-go:latest numValidators: 1 @@ -7,7 +7,7 @@ chains: ports: rest: 8545 rpc: 8551 - - id: ethereum-beacon + - id: ethereum-beacon-1337 name: ethereum-beacon image: ghcr.io/cosmology-tech/starship/prysm/beacon-chain:v5.2.0 numValidators: 1 From 7583c7a67b693339efa9e118cebc6bd93b2a9e1b Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Sat, 8 Feb 2025 19:17:43 +0400 Subject: [PATCH 13/16] update eth setup --- starship/charts/devnet/defaults.yaml | 10 +- .../devnet/templates/chains/eth/beacon.yaml | 79 +++++++++---- .../templates/chains/eth/configmap.yaml | 95 ---------------- .../templates/chains/eth/execution.yaml | 106 +++++++++++++++--- .../devnet/templates/chains/eth/service.yaml | 6 +- .../templates/chains/eth/validator.yaml | 0 starship/charts/devnet/values.schema.json | 6 +- starship/tests/e2e/configs/eth.yaml | 10 +- 8 files changed, 164 insertions(+), 148 deletions(-) delete mode 100644 starship/charts/devnet/templates/chains/eth/configmap.yaml delete mode 100644 starship/charts/devnet/templates/chains/eth/validator.yaml diff --git a/starship/charts/devnet/defaults.yaml b/starship/charts/devnet/defaults.yaml index 318c76b64..a47311ae0 100644 --- a/starship/charts/devnet/defaults.yaml +++ b/starship/charts/devnet/defaults.yaml @@ -793,7 +793,7 @@ defaultChains: exponent: 6 coingecko_id: stake keywords: [ "stake" ] - etherum-execution: + ethereum-execution: image: ghcr.io/hyperweb-io/starship/ethereum/client-go:latest home: /ethereum/execution binary: geth @@ -804,7 +804,7 @@ defaultChains: hdPath: m/44'/60'/0'/0/0 coinType: 60 repo: https://github.com/ethereum/go-ethereum - etherum-beacon: + ethereum-beacon: image: ghcr.io/hyperweb-io/starship/prysm/beacon-chain:v5.2.0 home: /ethereum/execution binary: geth @@ -818,10 +818,10 @@ defaultChains: config: validator: enabled: true - image: ghcr.io/cosmology-tech/starship/prysm/validator:v5.2.0 - numValidator: 64 + image: "ghcr.io/cosmology-tech/starship/prysm/validator:v5.2.0" + numValidator: 1 prysmctl: - image: ghcr.io/cosmology-tech/starship/prysm/cmd/prysmctl:v5.2.0 + image: "ghcr.io/cosmology-tech/starship/prysm/cmd/prysmctl:v5.2.0" eth: storageClassName: hostpath genesisStateUrl: https://github.com/eth-clients/merge-testnets/blob/main/sepolia/genesis.ssz diff --git a/starship/charts/devnet/templates/chains/eth/beacon.yaml b/starship/charts/devnet/templates/chains/eth/beacon.yaml index 70607b1c6..28ead9094 100644 --- a/starship/charts/devnet/templates/chains/eth/beacon.yaml +++ b/starship/charts/devnet/templates/chains/eth/beacon.yaml @@ -4,21 +4,30 @@ {{ $chain := include "devnet.fullchain" (dict "name" $chain.id "file" $defaultFile "context" $) | fromJson }} {{ $initParams := dict "chains" (list $chain.id) "port" $.Values.exposer.ports.rest "context" $ }} + +{{ $executionChain := include "devnet.fullchain" (dict "name" $chain.config.execution.id "file" $defaultFile "context" $) | fromJson }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-{{ $chain.name }} +data: + --- apiVersion: apps/v1 kind: StatefulSet metadata: - name: {{ $chain.name }} + name: {{ $chain.name }}-{{ $chain.id }} namespace: {{ $.Release.Namespace }} labels: - app: {{ $chain.name }} + app: {{ $chain.name }}-{{ $chain.id }} spec: - serviceName: {{ $chain.name }} + serviceName: {{ $chain.name }}-{{ $chain.id }} replicas: {{ $chain.replicas }} selector: matchLabels: - app.kubernetes.io/instance: {{ $chain.name }} - app.kubernetes.io/name: {{ $chain.name }} + app.kubernetes.io/instance: {{ $chain.name }}-{{ $chain.id }} + app.kubernetes.io/name: {{ $chain.name }}-{{ $chain.id }} template: metadata: annotations: @@ -27,16 +36,16 @@ spec: sla: high tier: gateway labels: - app.kubernetes.io/instance: {{ $chain.name }} - app.kubernetes.io/type: {{ $chain.name }} - app.kubernetes.io/name: {{ $chain.name }} - app.kubernetes.io/rawname: {{ $chain.name }} + app.kubernetes.io/instance: {{ $chain.name }}-{{ $chain.id }} + app.kubernetes.io/type: {{ $chain.name }}-{{ $chain.id }} + app.kubernetes.io/name: {{ $chain.name }}-{{ $chain.id }} + app.kubernetes.io/rawname: "{{ $chain.id }}" app.kubernetes.io/version: {{ $.Chart.AppVersion }} spec: {{- include "imagePullSecrets" $chain | indent 6 }} initContainers: - name: init-genesis - image: {{ $chain.config.prysmctl }} + image: {{ $chain.config.prysmctl.image }} imagePullPolicy: Always command: - bash @@ -49,9 +58,7 @@ spec: echo "Initializing genesis" prysmctl testnet generate-genesis \ --fork=capella \ - {{- if $chain.config.validator.enabled }} --num-validators={{ $chain.config.validator.numValidator }} \ - {{- end }} --genesis-time-delay=15 \ --output-ssz=/ethereum/consensus/genesis.ssz \ --chain-config-file=/ethereum/consensus/config.yaml \ @@ -70,7 +77,6 @@ spec: mountPath: /config-execution - name: ethereum mountPath: /ethereum - {{- include "devnet.init.wait" $initParams | indent 8 }} containers: - name: node image: {{ $chain.image }} @@ -91,21 +97,22 @@ spec: - "-c" - | echo "Waiting 15 seconds for execution client to be ready..." + sleep 15 echo "Starting consensus chain" beacon-chain \ - --execution-endpoint=http://ethereum-execution-0.ethereum-execution.default.svc.cluster.local:8551 \ + --execution-endpoint=http://{{ $executionChain.name }}-{{ $executionChain.id }}-0.{{ $executionChain.name }}-{{ $executionChain.id }}.default.svc.cluster.local:8551 \ --jwt-secret=/etc/secrets/jwt.hex \ --accept-terms-of-use \ --http-host 0.0.0.0 \ --rpc-host 0.0.0.0 \ - --chain-id 1337 \ + --chain-id {{ $executionChain.id }} \ --contract-deployment-block=0 \ --datadir /ethereum/consensus \ --genesis-state /ethereum/consensus/genesis.ssz \ --min-sync-peers=0 \ --chain-config-file=/ethereum/consensus/config.yaml \ - --network-id 1337 \ + --network-id {{ $executionChain.id }} \ --suggested-fee-recipient=0x123463a4B065722E99115D6c222f267d9cABb524 \ --minimum-peers-per-subnet=0 \ --force-clear-db @@ -116,7 +123,7 @@ spec: - name: secrets mountPath: /etc/secrets - name: validator - image: ghcr.io/cosmology-tech/starship/prysm/validator:v5.2.0 + image: {{ $chain.config.validator.image }} imagePullPolicy: Always env: - name: NAMESPACE @@ -135,7 +142,7 @@ spec: --accept-terms-of-use \ --beacon-rpc-provider=localhost:4000 \ --datadir=/ethereum/consensus/validator \ - --interop-num-validators=1 \ + --interop-num-validators={{ $chain.config.validator.numValidator }} \ --interop-start-index=0 \ --force-clear-db \ --chain-config-file=/ethereum/consensus/config.yaml \ @@ -146,13 +153,39 @@ spec: mountPath: /ethereum - name: secrets mountPath: /etc/secrets + - name: exposer + image: {{ $.Values.exposer.image }} + imagePullPolicy: Always + env: + - name: GENESIS_HOST + value: "{{ $chain.name }}-{{ $chain.id }}-0" + - name: GENESIS_PORT + value: "{{ $.Values.exposer.ports.rest }}" + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: EXPOSER_HTTP_PORT + value: "8081" + - name: EXPOSER_GRPC_PORT + value: "9099" + - name: EXPOSER_GENESIS_FILE + value: /ethereum/execution/genesis.json + - name: EXPOSER_GENESIS_SSZ + value: /ethereum/execution/genesis.ssz + - name: EXPOSER_PRIV_VAL_FILE + value: {{ $chain.home }}/config/priv_validator_key.json + - name: EXPOSER_NODE_KEY_FILE + value: {{ $chain.home }}/config/node_key.json + - name: EXPOSER_NODE_ID_FILE + value: {{ $chain.home }}/config/node_id.json + - name: EXPOSER_PRIV_VAL_STATE_FILE + value: {{ $chain.home }}/data/priv_validator_state.json + resources: {{- include "devnet.exposer.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} volumes: - - name: config-beacon - configMap: - name: config-beacon - - name: config-execution + - name: config configMap: - name: config-execution + name: config-ethereum - name: ethereum emptyDir: { } - name: secrets diff --git a/starship/charts/devnet/templates/chains/eth/configmap.yaml b/starship/charts/devnet/templates/chains/eth/configmap.yaml deleted file mode 100644 index a19ae54d4..000000000 --- a/starship/charts/devnet/templates/chains/eth/configmap.yaml +++ /dev/null @@ -1,95 +0,0 @@ -{{- range $chain := .Values.chains }} -{{- if hasPrefix "ethereum-execution" $chain.name }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: config-execution -data: - genesis.json: |- - { - "config": { - "chainId": 1337, - "homesteadBlock": 0, - "eip150Block": 0, - "eip155Block": 0, - "eip158Block": 0, - "byzantiumBlock": 0, - "constantinopleBlock": 0, - "petersburgBlock": 0, - "istanbulBlock": 0, - "londonBlock": 0, - "berlinBlock": 0, - "terminalTotalDifficulty": 0, - "terminalTotalDifficultyPassed": true - }, - "nonce": "0x0", - "timestamp": "0x677d172f", - "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", - "gasLimit": "0x47b760", - "difficulty": "0x1", - "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "0x0000000000000000000000000000000000000000", - "alloc": { - "0x0000000000000000000000000000000000000001": { - "balance": "0x3635c9adc5dea00000" - }, - "0x4242424242424242424242424242424242424242": { - "code": "0x60806040526004361061003f5760003560e01c806301ffc9a71461004457806322895118146100b6578063621fd130146101e3578063c5f2892f14610273575b600080fd5b34801561005057600080fd5b5061009c6004803603602081101561006757600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061029e565b604051808215151515815260200191505060405180910390f35b6101e1600480360360808110156100cc57600080fd5b81019080803590602001906401000000008111156100e957600080fd5b8201836020820111156100fb57600080fd5b8035906020019184600183028401116401000000008311171561011d57600080fd5b90919293919293908035906020019064010000000081111561013e57600080fd5b82018360208201111561015057600080fd5b8035906020019184600183028401116401000000008311171561017257600080fd5b90919293919293908035906020019064010000000081111561019357600080fd5b8201836020820111156101a557600080fd5b803590602001918460018302840111640100000000831117156101c757600080fd5b909192939192939080359060200190929190505050610370565b005b3480156101ef57600080fd5b506101f8610fd0565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561023857808201518184015260208101905061021d565b50505050905090810190601f1680156102655780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561027f57600080fd5b50610288610fe2565b6040518082815260200191505060405180910390f35b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061036957507f85640907000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b603087879050146103cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806116ec6026913960400191505060405180910390fd5b60208585905014610428576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806116836036913960400191505060405180910390fd5b60608383905014610484576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602981526020018061175f6029913960400191505060405180910390fd5b670de0b6b3a76400003410156104e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806117396026913960400191505060405180910390fd5b6000633b9aca0034816104f457fe5b061461054b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260338152602001806116b96033913960400191505060405180910390fd5b6000633b9aca00348161055a57fe5b04905067ffffffffffffffff80168111156105c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806117126027913960400191505060405180910390fd5b60606105cb82611314565b90507f649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c589898989858a8a610600602054611314565b60405180806020018060200180602001806020018060200186810386528e8e82818152602001925080828437600081840152601f19601f82011690508083019250505086810385528c8c82818152602001925080828437600081840152601f19601f82011690508083019250505086810384528a818151815260200191508051906020019080838360005b838110156106a657808201518184015260208101905061068b565b50505050905090810190601f1680156106d35780820380516001836020036101000a031916815260200191505b508681038352898982818152602001925080828437600081840152601f19601f820116905080830192505050868103825287818151815260200191508051906020019080838360005b8381101561073757808201518184015260208101905061071c565b50505050905090810190601f1680156107645780820380516001836020036101000a031916815260200191505b509d505050505050505050505050505060405180910390a1600060028a8a600060801b6040516020018084848082843780830192505050826fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff1916815260100193505050506040516020818303038152906040526040518082805190602001908083835b6020831061080e57805182526020820191506020810190506020830392506107eb565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610850573d6000803e3d6000fd5b5050506040513d602081101561086557600080fd5b8101908080519060200190929190505050905060006002808888600090604092610891939291906115da565b6040516020018083838082843780830192505050925050506040516020818303038152906040526040518082805190602001908083835b602083106108eb57805182526020820191506020810190506020830392506108c8565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa15801561092d573d6000803e3d6000fd5b5050506040513d602081101561094257600080fd5b8101908080519060200190929190505050600289896040908092610968939291906115da565b6000801b604051602001808484808284378083019250505082815260200193505050506040516020818303038152906040526040518082805190602001908083835b602083106109cd57805182526020820191506020810190506020830392506109aa565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610a0f573d6000803e3d6000fd5b5050506040513d6020811015610a2457600080fd5b810190808051906020019092919050505060405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610a8e5780518252602082019150602081019050602083039250610a6b565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610ad0573d6000803e3d6000fd5b5050506040513d6020811015610ae557600080fd5b810190808051906020019092919050505090506000600280848c8c604051602001808481526020018383808284378083019250505093505050506040516020818303038152906040526040518082805190602001908083835b60208310610b615780518252602082019150602081019050602083039250610b3e565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610ba3573d6000803e3d6000fd5b5050506040513d6020811015610bb857600080fd5b8101908080519060200190929190505050600286600060401b866040516020018084805190602001908083835b60208310610c085780518252602082019150602081019050602083039250610be5565b6001836020036101000a0380198251168184511680821785525050505050509050018367ffffffffffffffff191667ffffffffffffffff1916815260180182815260200193505050506040516020818303038152906040526040518082805190602001908083835b60208310610c935780518252602082019150602081019050602083039250610c70565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610cd5573d6000803e3d6000fd5b5050506040513d6020811015610cea57600080fd5b810190808051906020019092919050505060405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610d545780518252602082019150602081019050602083039250610d31565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610d96573d6000803e3d6000fd5b5050506040513d6020811015610dab57600080fd5b81019080805190602001909291905050509050858114610e16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252605481526020018061162f6054913960600191505060405180910390fd5b6001602060020a0360205410610e77576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061160e6021913960400191505060405180910390fd5b60016020600082825401925050819055506000602054905060008090505b6020811015610fb75760018083161415610ec8578260008260208110610eb757fe5b018190555050505050505050610fc7565b600260008260208110610ed757fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610f335780518252602082019150602081019050602083039250610f10565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610f75573d6000803e3d6000fd5b5050506040513d6020811015610f8a57600080fd5b8101908080519060200190929190505050925060028281610fa757fe5b0491508080600101915050610e95565b506000610fc057fe5b5050505050505b50505050505050565b6060610fdd602054611314565b905090565b6000806000602054905060008090505b60208110156111d057600180831614156110e05760026000826020811061101557fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310611071578051825260208201915060208101905060208303925061104e565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa1580156110b3573d6000803e3d6000fd5b5050506040513d60208110156110c857600080fd5b810190808051906020019092919050505092506111b6565b600283602183602081106110f057fe5b015460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061114b5780518252602082019150602081019050602083039250611128565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa15801561118d573d6000803e3d6000fd5b5050506040513d60208110156111a257600080fd5b810190808051906020019092919050505092505b600282816111c057fe5b0491508080600101915050610ff2565b506002826111df602054611314565b600060401b6040516020018084815260200183805190602001908083835b6020831061122057805182526020820191506020810190506020830392506111fd565b6001836020036101000a0380198251168184511680821785525050505050509050018267ffffffffffffffff191667ffffffffffffffff1916815260180193505050506040516020818303038152906040526040518082805190602001908083835b602083106112a55780518252602082019150602081019050602083039250611282565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa1580156112e7573d6000803e3d6000fd5b5050506040513d60208110156112fc57600080fd5b81019080805190602001909291905050509250505090565b6060600867ffffffffffffffff8111801561132e57600080fd5b506040519080825280601f01601f1916602001820160405280156113615781602001600182028036833780820191505090505b50905060008260c01b90508060076008811061137957fe5b1a60f81b8260008151811061138a57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806006600881106113c657fe5b1a60f81b826001815181106113d757fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060056008811061141357fe5b1a60f81b8260028151811061142457fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060046008811061146057fe5b1a60f81b8260038151811061147157fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806003600881106114ad57fe5b1a60f81b826004815181106114be57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806002600881106114fa57fe5b1a60f81b8260058151811061150b57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060016008811061154757fe5b1a60f81b8260068151811061155857fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060006008811061159457fe5b1a60f81b826007815181106115a557fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535050919050565b600080858511156115ea57600080fd5b838611156115f757600080fd5b600185028301915084860390509450949250505056fe4465706f736974436f6e74726163743a206d65726b6c6520747265652066756c6c4465706f736974436f6e74726163743a207265636f6e7374727563746564204465706f7369744461746120646f6573206e6f74206d6174636820737570706c696564206465706f7369745f646174615f726f6f744465706f736974436f6e74726163743a20696e76616c6964207769746864726177616c5f63726564656e7469616c73206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c7565206e6f74206d756c7469706c65206f6620677765694465706f736974436f6e74726163743a20696e76616c6964207075626b6579206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f20686967684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f206c6f774465706f736974436f6e74726163743a20696e76616c6964207369676e6174757265206c656e677468a2646970667358221220230afd4b6e3551329e50f1239e08fa3ab7907b77403c4f237d9adf679e8e43cf64736f6c634300060b0033", - "balance": "0x0" - } - }, - "number": "0x0", - "gasUsed": "0x0", - "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "baseFeePerGas": "0x7", - "excessBlobGas": null, - "blobGasUsed": null - } - jwt.hex: |- - 0x3fe89f53368415a79e065f3c885b7273b41540d5598488ef475cfdc4009850a4 ---- -{{- end }} -{{- if hasPrefix "ethereum-beacon" $chain.name }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: config-beacon -data: - config.yaml: |- - CONFIG_NAME: interop - PRESET_BASE: interop - - # Genesis - GENESIS_FORK_VERSION: 0x20000089 - - # Altair - ALTAIR_FORK_EPOCH: 0 - ALTAIR_FORK_VERSION: 0x20000090 - - # Merge - BELLATRIX_FORK_EPOCH: 0 - BELLATRIX_FORK_VERSION: 0x20000091 - TERMINAL_TOTAL_DIFFICULTY: 0 - - # Capella - CAPELLA_FORK_EPOCH: 0 - CAPELLA_FORK_VERSION: 0x20000092 - MAX_WITHDRAWALS_PER_PAYLOAD: 16 - - # Deneb - DENEB_FORK_VERSION: 0x20000093 - - # Electra - ELECTRA_FORK_VERSION: 0x20000094 - - # Time parameters - SECONDS_PER_SLOT: 12 - SLOTS_PER_EPOCH: 6 - - # Deposit contract - DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242 ---- -{{- end }} -{{- end }} diff --git a/starship/charts/devnet/templates/chains/eth/execution.yaml b/starship/charts/devnet/templates/chains/eth/execution.yaml index 1705bead4..a33518db5 100644 --- a/starship/charts/devnet/templates/chains/eth/execution.yaml +++ b/starship/charts/devnet/templates/chains/eth/execution.yaml @@ -4,20 +4,101 @@ {{ $chain := include "devnet.fullchain" (dict "name" $chain.id "file" $defaultFile "context" $) | fromJson }} --- +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-ethereum +data: + genesis.json: |- + { + "config": { + "chainId": {{ $chain.id }}, + "homesteadBlock": 0, + "eip150Block": 0, + "eip155Block": 0, + "eip158Block": 0, + "byzantiumBlock": 0, + "constantinopleBlock": 0, + "petersburgBlock": 0, + "istanbulBlock": 0, + "londonBlock": 0, + "berlinBlock": 0, + "terminalTotalDifficulty": 0, + "terminalTotalDifficultyPassed": true + }, + "nonce": "0x0", + "timestamp": "0x677d172f", + "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", + "gasLimit": "0x47b760", + "difficulty": "0x1", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "coinbase": "0x0000000000000000000000000000000000000000", + "alloc": { + "0x0000000000000000000000000000000000000001": { + "balance": "0x3635c9adc5dea00000" + }, + "0x4242424242424242424242424242424242424242": { + "code": "0x60806040526004361061003f5760003560e01c806301ffc9a71461004457806322895118146100b6578063621fd130146101e3578063c5f2892f14610273575b600080fd5b34801561005057600080fd5b5061009c6004803603602081101561006757600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061029e565b604051808215151515815260200191505060405180910390f35b6101e1600480360360808110156100cc57600080fd5b81019080803590602001906401000000008111156100e957600080fd5b8201836020820111156100fb57600080fd5b8035906020019184600183028401116401000000008311171561011d57600080fd5b90919293919293908035906020019064010000000081111561013e57600080fd5b82018360208201111561015057600080fd5b8035906020019184600183028401116401000000008311171561017257600080fd5b90919293919293908035906020019064010000000081111561019357600080fd5b8201836020820111156101a557600080fd5b803590602001918460018302840111640100000000831117156101c757600080fd5b909192939192939080359060200190929190505050610370565b005b3480156101ef57600080fd5b506101f8610fd0565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561023857808201518184015260208101905061021d565b50505050905090810190601f1680156102655780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561027f57600080fd5b50610288610fe2565b6040518082815260200191505060405180910390f35b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061036957507f85640907000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b603087879050146103cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806116ec6026913960400191505060405180910390fd5b60208585905014610428576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806116836036913960400191505060405180910390fd5b60608383905014610484576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602981526020018061175f6029913960400191505060405180910390fd5b670de0b6b3a76400003410156104e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806117396026913960400191505060405180910390fd5b6000633b9aca0034816104f457fe5b061461054b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260338152602001806116b96033913960400191505060405180910390fd5b6000633b9aca00348161055a57fe5b04905067ffffffffffffffff80168111156105c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806117126027913960400191505060405180910390fd5b60606105cb82611314565b90507f649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c589898989858a8a610600602054611314565b60405180806020018060200180602001806020018060200186810386528e8e82818152602001925080828437600081840152601f19601f82011690508083019250505086810385528c8c82818152602001925080828437600081840152601f19601f82011690508083019250505086810384528a818151815260200191508051906020019080838360005b838110156106a657808201518184015260208101905061068b565b50505050905090810190601f1680156106d35780820380516001836020036101000a031916815260200191505b508681038352898982818152602001925080828437600081840152601f19601f820116905080830192505050868103825287818151815260200191508051906020019080838360005b8381101561073757808201518184015260208101905061071c565b50505050905090810190601f1680156107645780820380516001836020036101000a031916815260200191505b509d505050505050505050505050505060405180910390a1600060028a8a600060801b6040516020018084848082843780830192505050826fffffffffffffffffffffffffffffffff19166fffffffffffffffffffffffffffffffff1916815260100193505050506040516020818303038152906040526040518082805190602001908083835b6020831061080e57805182526020820191506020810190506020830392506107eb565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610850573d6000803e3d6000fd5b5050506040513d602081101561086557600080fd5b8101908080519060200190929190505050905060006002808888600090604092610891939291906115da565b6040516020018083838082843780830192505050925050506040516020818303038152906040526040518082805190602001908083835b602083106108eb57805182526020820191506020810190506020830392506108c8565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa15801561092d573d6000803e3d6000fd5b5050506040513d602081101561094257600080fd5b8101908080519060200190929190505050600289896040908092610968939291906115da565b6000801b604051602001808484808284378083019250505082815260200193505050506040516020818303038152906040526040518082805190602001908083835b602083106109cd57805182526020820191506020810190506020830392506109aa565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610a0f573d6000803e3d6000fd5b5050506040513d6020811015610a2457600080fd5b810190808051906020019092919050505060405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610a8e5780518252602082019150602081019050602083039250610a6b565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610ad0573d6000803e3d6000fd5b5050506040513d6020811015610ae557600080fd5b810190808051906020019092919050505090506000600280848c8c604051602001808481526020018383808284378083019250505093505050506040516020818303038152906040526040518082805190602001908083835b60208310610b615780518252602082019150602081019050602083039250610b3e565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610ba3573d6000803e3d6000fd5b5050506040513d6020811015610bb857600080fd5b8101908080519060200190929190505050600286600060401b866040516020018084805190602001908083835b60208310610c085780518252602082019150602081019050602083039250610be5565b6001836020036101000a0380198251168184511680821785525050505050509050018367ffffffffffffffff191667ffffffffffffffff1916815260180182815260200193505050506040516020818303038152906040526040518082805190602001908083835b60208310610c935780518252602082019150602081019050602083039250610c70565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610cd5573d6000803e3d6000fd5b5050506040513d6020811015610cea57600080fd5b810190808051906020019092919050505060405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610d545780518252602082019150602081019050602083039250610d31565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610d96573d6000803e3d6000fd5b5050506040513d6020811015610dab57600080fd5b81019080805190602001909291905050509050858114610e16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252605481526020018061162f6054913960600191505060405180910390fd5b6001602060020a0360205410610e77576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061160e6021913960400191505060405180910390fd5b60016020600082825401925050819055506000602054905060008090505b6020811015610fb75760018083161415610ec8578260008260208110610eb757fe5b018190555050505050505050610fc7565b600260008260208110610ed757fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310610f335780518252602082019150602081019050602083039250610f10565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa158015610f75573d6000803e3d6000fd5b5050506040513d6020811015610f8a57600080fd5b8101908080519060200190929190505050925060028281610fa757fe5b0491508080600101915050610e95565b506000610fc057fe5b5050505050505b50505050505050565b6060610fdd602054611314565b905090565b6000806000602054905060008090505b60208110156111d057600180831614156110e05760026000826020811061101557fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b60208310611071578051825260208201915060208101905060208303925061104e565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa1580156110b3573d6000803e3d6000fd5b5050506040513d60208110156110c857600080fd5b810190808051906020019092919050505092506111b6565b600283602183602081106110f057fe5b015460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061114b5780518252602082019150602081019050602083039250611128565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa15801561118d573d6000803e3d6000fd5b5050506040513d60208110156111a257600080fd5b810190808051906020019092919050505092505b600282816111c057fe5b0491508080600101915050610ff2565b506002826111df602054611314565b600060401b6040516020018084815260200183805190602001908083835b6020831061122057805182526020820191506020810190506020830392506111fd565b6001836020036101000a0380198251168184511680821785525050505050509050018267ffffffffffffffff191667ffffffffffffffff1916815260180193505050506040516020818303038152906040526040518082805190602001908083835b602083106112a55780518252602082019150602081019050602083039250611282565b6001836020036101000a038019825116818451168082178552505050505050905001915050602060405180830381855afa1580156112e7573d6000803e3d6000fd5b5050506040513d60208110156112fc57600080fd5b81019080805190602001909291905050509250505090565b6060600867ffffffffffffffff8111801561132e57600080fd5b506040519080825280601f01601f1916602001820160405280156113615781602001600182028036833780820191505090505b50905060008260c01b90508060076008811061137957fe5b1a60f81b8260008151811061138a57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806006600881106113c657fe5b1a60f81b826001815181106113d757fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060056008811061141357fe5b1a60f81b8260028151811061142457fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060046008811061146057fe5b1a60f81b8260038151811061147157fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806003600881106114ad57fe5b1a60f81b826004815181106114be57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350806002600881106114fa57fe5b1a60f81b8260058151811061150b57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060016008811061154757fe5b1a60f81b8260068151811061155857fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060006008811061159457fe5b1a60f81b826007815181106115a557fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535050919050565b600080858511156115ea57600080fd5b838611156115f757600080fd5b600185028301915084860390509450949250505056fe4465706f736974436f6e74726163743a206d65726b6c6520747265652066756c6c4465706f736974436f6e74726163743a207265636f6e7374727563746564204465706f7369744461746120646f6573206e6f74206d6174636820737570706c696564206465706f7369745f646174615f726f6f744465706f736974436f6e74726163743a20696e76616c6964207769746864726177616c5f63726564656e7469616c73206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c7565206e6f74206d756c7469706c65206f6620677765694465706f736974436f6e74726163743a20696e76616c6964207075626b6579206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f20686967684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f206c6f774465706f736974436f6e74726163743a20696e76616c6964207369676e6174757265206c656e677468a2646970667358221220230afd4b6e3551329e50f1239e08fa3ab7907b77403c4f237d9adf679e8e43cf64736f6c634300060b0033", + "balance": "0x0" + } + }, + "number": "0x0", + "gasUsed": "0x0", + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "baseFeePerGas": "0x7", + "excessBlobGas": null, + "blobGasUsed": null + } + jwt.hex: |- + 3fe89f53368415a79e065f3c885b7273b41540d5598488ef475cfdc4009850a4 + config.yaml: |- + CONFIG_NAME: interop + PRESET_BASE: interop + + # Genesis + GENESIS_FORK_VERSION: 0x20000089 + + # Altair + ALTAIR_FORK_EPOCH: 0 + ALTAIR_FORK_VERSION: 0x20000090 + + # Merge + BELLATRIX_FORK_EPOCH: 0 + BELLATRIX_FORK_VERSION: 0x20000091 + TERMINAL_TOTAL_DIFFICULTY: 0 + + # Capella + CAPELLA_FORK_EPOCH: 0 + CAPELLA_FORK_VERSION: 0x20000092 + MAX_WITHDRAWALS_PER_PAYLOAD: 16 + + # Deneb + DENEB_FORK_VERSION: 0x20000093 + + # Electra + ELECTRA_FORK_VERSION: 0x20000094 + + # Time parameters + SECONDS_PER_SLOT: 12 + SLOTS_PER_EPOCH: 6 + + # Deposit contract + DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242 +--- apiVersion: apps/v1 kind: StatefulSet metadata: - name: {{ $chain.name }} + name: {{ $chain.name }}-{{ $chain.id }} namespace: {{ $.Release.Namespace }} labels: - app: {{ $chain.name }} + app: {{ $chain.name }}-{{ $chain.id }} spec: - serviceName: {{ $chain.name }} + serviceName: {{ $chain.name }}-{{ $chain.id }} replicas: {{ $chain.replicas }} selector: matchLabels: - app.kubernetes.io/instance: {{ $chain.name }} - app.kubernetes.io/name: {{ $chain.name }} + app.kubernetes.io/instance: {{ $chain.name }}-{{ $chain.id }} + app.kubernetes.io/name: {{ $chain.name }}-{{ $chain.id }} template: metadata: annotations: @@ -26,10 +107,10 @@ spec: sla: high tier: gateway labels: - app.kubernetes.io/instance: {{ $chain.name }} - app.kubernetes.io/type: {{ $chain.name }} - app.kubernetes.io/name: {{ $chain.name }} - app.kubernetes.io/rawname: {{ $chain.name }} + app.kubernetes.io/instance: {{ $chain.name }}-{{ $chain.id }} + app.kubernetes.io/type: {{ $chain.name }}-{{ $chain.id }} + app.kubernetes.io/name: {{ $chain.name }}-{{ $chain.id }} + app.kubernetes.io/rawname: "{{ $chain.id }}" app.kubernetes.io/version: {{ $.Chart.AppVersion }} spec: {{- include "imagePullSecrets" $chain | indent 6 }} @@ -53,8 +134,6 @@ spec: mountPath: /config - name: ethereum mountPath: /ethereum/execution - - name: genesis-volume - mountPath: /genesis/execution containers: - name: node image: {{ $chain.image }} @@ -70,7 +149,6 @@ spec: - bash - "-c" - | - echo "Starting execution chain" echo "Starting execution chain" geth --datadir /ethereum/execution --http \ --http.addr=0.0.0.0 \ @@ -91,7 +169,7 @@ spec: --unlock=0x123463a4B065722E99115D6c222f267d9cABb524 \ --password=/dev/null \ --syncmode=full \ - --networkid=1337 \ + --networkid={{ $chain.id }} \ --mine \ --log.vmodule=engine=6 resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} @@ -103,7 +181,7 @@ spec: volumes: - name: config configMap: - name: config-execution + name: config-ethereum - name: ethereum emptyDir: { } - name: secrets diff --git a/starship/charts/devnet/templates/chains/eth/service.yaml b/starship/charts/devnet/templates/chains/eth/service.yaml index ab4cb7ed6..dcfe010ad 100644 --- a/starship/charts/devnet/templates/chains/eth/service.yaml +++ b/starship/charts/devnet/templates/chains/eth/service.yaml @@ -8,9 +8,9 @@ apiVersion: v1 kind: Service metadata: - name: {{ $chain.name }} + name: {{ $chain.name }}-{{ $chain.id }} labels: - app.kubernetes.io/name: {{ $chain.name }} + app.kubernetes.io/name: {{ $chain.name }}-{{ $chain.id }} spec: clusterIP: None ports: @@ -21,7 +21,7 @@ spec: targetPort: {{ $port }} {{- end }} selector: - app.kubernetes.io/name: {{ $chain.name }} + app.kubernetes.io/name: {{ $chain.name }}-{{ $chain.id }} --- {{- end }} {{- end }} diff --git a/starship/charts/devnet/templates/chains/eth/validator.yaml b/starship/charts/devnet/templates/chains/eth/validator.yaml deleted file mode 100644 index e69de29bb..000000000 diff --git a/starship/charts/devnet/values.schema.json b/starship/charts/devnet/values.schema.json index d17f047ea..2b2e20a4b 100644 --- a/starship/charts/devnet/values.schema.json +++ b/starship/charts/devnet/values.schema.json @@ -112,7 +112,7 @@ "type": "object", "properties": { "id": { - "type": "string" + "type": ["string", "integer"] }, "name": { "type": "string", @@ -564,8 +564,8 @@ "readinessProbe": { "type": "object" }, - "beacon": { - "type": "string" + "config": { + "type": "object" } }, "additionalProperties": false, diff --git a/starship/tests/e2e/configs/eth.yaml b/starship/tests/e2e/configs/eth.yaml index 97a1c1622..48f571891 100644 --- a/starship/tests/e2e/configs/eth.yaml +++ b/starship/tests/e2e/configs/eth.yaml @@ -1,16 +1,16 @@ chains: - - id: ethereum-execution-1337 + - id: 1337 name: ethereum-execution - image: ghcr.io/cosmology-tech/starship/ethereum/client-go:latest numValidators: 1 - beacon: ethereum-beacon ports: rest: 8545 rpc: 8551 - - id: ethereum-beacon-1337 + - id: 2337 name: ethereum-beacon - image: ghcr.io/cosmology-tech/starship/prysm/beacon-chain:v5.2.0 numValidators: 1 ports: rest: 4000 rpc: 4001 + config: + execution: + id: 1337 From abbd38c853e6eae818fb986fb82f9295cca89025 Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Sat, 8 Feb 2025 19:25:43 +0400 Subject: [PATCH 14/16] get chain assets from chain registry --- starship/charts/devnet/defaults.yaml | 46 ++++++++++++++++++---------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/starship/charts/devnet/defaults.yaml b/starship/charts/devnet/defaults.yaml index a47311ae0..ab1ad658d 100644 --- a/starship/charts/devnet/defaults.yaml +++ b/starship/charts/devnet/defaults.yaml @@ -793,35 +793,47 @@ defaultChains: exponent: 6 coingecko_id: stake keywords: [ "stake" ] - ethereum-execution: + ethereum: image: ghcr.io/hyperweb-io/starship/ethereum/client-go:latest - home: /ethereum/execution + home: /ethereum binary: geth prefix: eth - denom: ueth + denom: wei prettyName: Ethereum Execution Chain - coins: 100000000000000eth - hdPath: m/44'/60'/0'/0/0 - coinType: 60 - repo: https://github.com/ethereum/go-ethereum - ethereum-beacon: - image: ghcr.io/hyperweb-io/starship/prysm/beacon-chain:v5.2.0 - home: /ethereum/execution - binary: geth - prefix: eth - denom: ueth - prettyName: Ethereum Execution Chain - coins: 100000000000000eth + coins: 100000000000000wei hdPath: m/44'/60'/0'/0/0 coinType: 60 repo: https://github.com/ethereum/go-ethereum + assets: + - base: wei + name: "Ether" + description: "The native token of Ethereum" + display: "eth" + symbol: "ETH" + logo_URIs: + png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/_non-cosmos/ethereum/images/eth-white.png" + svg: "https://raw.githubusercontent.com/cosmos/chain-registry/master/_non-cosmos/ethereum/images/eth-white.svg" + denom_units: + - denom: wei + exponent: 0 + - denom: gwei + exponent: 9 + - denom: ether + exponent: 18 + aliases: + - "ether" + coingecko_id: "ethereum" config: + beacon: + enabled: true + image: "ghcr.io/hyperweb-io/starship/prysm/beacon-chain:v5.2.0" + numValidator: 1 validator: enabled: true - image: "ghcr.io/cosmology-tech/starship/prysm/validator:v5.2.0" + image: "ghcr.io/hyperweb-io/starship/prysm/validator:v5.2.0" numValidator: 1 prysmctl: - image: "ghcr.io/cosmology-tech/starship/prysm/cmd/prysmctl:v5.2.0" + image: "ghcr.io/hyperweb-io/starship/prysm/cmd/prysmctl:v5.2.0" eth: storageClassName: hostpath genesisStateUrl: https://github.com/eth-clients/merge-testnets/blob/main/sepolia/genesis.ssz From 15e7032e02ad63c60b53a54850ca9895fba840a1 Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Sat, 8 Feb 2025 20:05:25 +0400 Subject: [PATCH 15/16] unify execution and beacon chain into one --- .../devnet/templates/chains/eth/beacon.yaml | 7 -- .../templates/chains/eth/execution.yaml | 112 ++++++++++++++++-- starship/charts/devnet/values.schema.json | 3 +- starship/tests/e2e/configs/eth.yaml | 12 +- 4 files changed, 108 insertions(+), 26 deletions(-) diff --git a/starship/charts/devnet/templates/chains/eth/beacon.yaml b/starship/charts/devnet/templates/chains/eth/beacon.yaml index 28ead9094..193749fb5 100644 --- a/starship/charts/devnet/templates/chains/eth/beacon.yaml +++ b/starship/charts/devnet/templates/chains/eth/beacon.yaml @@ -6,13 +6,6 @@ {{ $initParams := dict "chains" (list $chain.id) "port" $.Values.exposer.ports.rest "context" $ }} {{ $executionChain := include "devnet.fullchain" (dict "name" $chain.config.execution.id "file" $defaultFile "context" $) | fromJson }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: config-{{ $chain.name }} -data: - --- apiVersion: apps/v1 kind: StatefulSet diff --git a/starship/charts/devnet/templates/chains/eth/execution.yaml b/starship/charts/devnet/templates/chains/eth/execution.yaml index a33518db5..ed72c9f4e 100644 --- a/starship/charts/devnet/templates/chains/eth/execution.yaml +++ b/starship/charts/devnet/templates/chains/eth/execution.yaml @@ -1,5 +1,5 @@ {{- range $chain := .Values.chains }} -{{- if hasPrefix "ethereum-execution" $chain.name }} +{{- if hasPrefix "ethereum" $chain.name }} {{ $defaultFile := $.Files.Get "defaults.yaml" | fromYaml }} {{ $chain := include "devnet.fullchain" (dict "name" $chain.id "file" $defaultFile "context" $) | fromJson }} @@ -115,16 +115,45 @@ spec: spec: {{- include "imagePullSecrets" $chain | indent 6 }} initContainers: - - name: init-genesis - image: {{ $chain.image }} + - name: init-genesis-beacon + image: {{ $chain.config.prysmctl.image }} imagePullPolicy: IfNotPresent command: - bash - "-c" - | - echo "Initializing genesis" + mkdir -p /ethereum/consensus /ethereum/execution cp /config/genesis.json /ethereum/execution/genesis.json + cp /config/config.yaml /ethereum/consensus/config.yaml + + echo "Initializing genesis" + prysmctl testnet generate-genesis \ + --fork=capella \ + --num-validators={{ $chain.config.validator.numValidator }} \ + --genesis-time-delay=15 \ + --output-ssz=/ethereum/consensus/genesis.ssz \ + --chain-config-file=/ethereum/consensus/config.yaml \ + --geth-genesis-json-in=/ethereum/execution/genesis.json \ + --geth-genesis-json-out=/ethereum/execution/genesis.json + + echo "Copy secrets over" cp /config/jwt.hex /etc/secrets/jwt.hex + resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} + volumeMounts: + - name: secrets + mountPath: /etc/secrets + - name: config + mountPath: /config + - name: ethereum + mountPath: /ethereum + - name: init-genesis-execution + image: {{ $chain.image }} + imagePullPolicy: IfNotPresent + command: + - bash + - "-c" + - | + echo "Initializing genesis geth" geth --datadir /ethereum/execution init /ethereum/execution/genesis.json resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} volumeMounts: @@ -133,9 +162,9 @@ spec: - name: config mountPath: /config - name: ethereum - mountPath: /ethereum/execution + mountPath: /ethereum containers: - - name: node + - name: geth image: {{ $chain.image }} imagePullPolicy: IfNotPresent env: @@ -175,7 +204,76 @@ spec: resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} volumeMounts: - name: ethereum - mountPath: /ethereum/execution + mountPath: /ethereum + - name: secrets + mountPath: /etc/secrets + - name: beacon-chain + image: {{ $chain.config.beacon.image }} + imagePullPolicy: Always + env: + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + command: + - bash + - "-c" + - | + echo "Waiting 15 seconds for execution client to be ready..." + sleep 15 + + echo "Starting consensus chain" + beacon-chain \ + --execution-endpoint=http://0.0.0.0:8551 \ + --jwt-secret=/etc/secrets/jwt.hex \ + --accept-terms-of-use \ + --http-host 0.0.0.0 \ + --rpc-host 0.0.0.0 \ + --chain-id {{ $chain.id }} \ + --contract-deployment-block=0 \ + --datadir /ethereum/consensus \ + --genesis-state /ethereum/consensus/genesis.ssz \ + --min-sync-peers=0 \ + --chain-config-file=/ethereum/consensus/config.yaml \ + --network-id {{ $chain.id }} \ + --suggested-fee-recipient=0x123463a4B065722E99115D6c222f267d9cABb524 \ + --minimum-peers-per-subnet=0 \ + --force-clear-db + resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} + volumeMounts: + - name: ethereum + mountPath: /ethereum + - name: secrets + mountPath: /etc/secrets + - name: validator + image: {{ $chain.config.validator.image }} + imagePullPolicy: Always + env: + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + command: + - bash + - "-c" + - | + echo "Waiting 15 seconds for execution client to be ready..." + sleep 20 + mkdir -p /ethereum/consensus/validator + echo "Starting validator node" + validator \ + --accept-terms-of-use \ + --beacon-rpc-provider=localhost:4000 \ + --datadir=/ethereum/consensus/validator \ + --interop-num-validators={{ $chain.config.validator.numValidator }} \ + --interop-start-index=0 \ + --force-clear-db \ + --chain-config-file=/ethereum/consensus/config.yaml \ + --suggested-fee-recipient=0x0C46c2cAFE097b4f7e1BB868B89e5697eE65f934 + resources: {{- include "devnet.node.resources" ( dict "node" $chain "context" $ ) | trim | nindent 12 }} + volumeMounts: + - name: ethereum + mountPath: /ethereum - name: secrets mountPath: /etc/secrets volumes: diff --git a/starship/charts/devnet/values.schema.json b/starship/charts/devnet/values.schema.json index 2b2e20a4b..b573808ec 100644 --- a/starship/charts/devnet/values.schema.json +++ b/starship/charts/devnet/values.schema.json @@ -147,8 +147,7 @@ "kujira", "hyperweb", "noble", - "ethereum-execution", - "ethereum-beacon" + "ethereum" ] }, "numValidators": { diff --git a/starship/tests/e2e/configs/eth.yaml b/starship/tests/e2e/configs/eth.yaml index 48f571891..af3033760 100644 --- a/starship/tests/e2e/configs/eth.yaml +++ b/starship/tests/e2e/configs/eth.yaml @@ -1,16 +1,8 @@ chains: - id: 1337 - name: ethereum-execution + name: ethereum numValidators: 1 ports: rest: 8545 rpc: 8551 - - id: 2337 - name: ethereum-beacon - numValidators: 1 - ports: - rest: 4000 - rpc: 4001 - config: - execution: - id: 1337 + exposer: 8001 From c1bc9171fd14fffc9b1731242f4c39c0b2fcc134 Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Sat, 8 Feb 2025 20:16:16 +0400 Subject: [PATCH 16/16] update eth test config --- starship/tests/e2e/configs/eth.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/starship/tests/e2e/configs/eth.yaml b/starship/tests/e2e/configs/eth.yaml index af3033760..de33f8683 100644 --- a/starship/tests/e2e/configs/eth.yaml +++ b/starship/tests/e2e/configs/eth.yaml @@ -5,4 +5,3 @@ chains: ports: rest: 8545 rpc: 8551 - exposer: 8001