9
9
10
10
import
11
11
std/ os,
12
- stew/ [ byteutils, objects] , stew/ shims/ macros, nimcrypto/ hash,
12
+ stew/ byteutils, stew/ shims/ macros, nimcrypto/ hash,
13
13
web3/ [conversions],
14
14
web3/ primitives as web3types,
15
15
chronicles,
84
84
# Parsing `enr.Records` is still not possible at compile-time
85
85
bootstrapNodes* : seq [string ]
86
86
87
- depositContractBlock* : uint64
88
- depositContractBlockHash* : Eth2Digest
89
-
90
87
genesis* : GenesisMetadata
91
88
92
89
func hasGenesis * (metadata: Eth2NetworkMetadata ): bool =
@@ -142,9 +139,6 @@ proc loadEth2NetworkMetadata*(
142
139
let
143
140
genesisPath = path & " /genesis.ssz"
144
141
configPath = path & " /config.yaml"
145
- deployBlockPath = path & " /deploy_block.txt"
146
- depositContractBlockPath = path & " /deposit_contract_block.txt"
147
- depositContractBlockHashPath = path & " /deposit_contract_block_hash.txt"
148
142
bootstrapNodesLegacyPath = path & " /bootstrap_nodes.txt" # <= Dec 2024
149
143
bootstrapNodesPath = path & " /bootstrap_nodes.yaml"
150
144
bootEnrPath = path & " /boot_enr.yaml"
@@ -160,43 +154,6 @@ proc loadEth2NetworkMetadata*(
160
154
else :
161
155
defaultRuntimeConfig
162
156
163
- depositContractBlockStr = if fileExists (depositContractBlockPath):
164
- readFile (depositContractBlockPath).strip
165
- else :
166
- " "
167
-
168
- depositContractBlockHashStr = if fileExists (depositContractBlockHashPath):
169
- readFile (depositContractBlockHashPath).strip
170
- else :
171
- " "
172
-
173
- deployBlockStr = if fileExists (deployBlockPath):
174
- readFile (deployBlockPath).strip
175
- else :
176
- " "
177
-
178
- depositContractBlock = if depositContractBlockStr.len > 0 :
179
- parseBiggestUInt depositContractBlockStr
180
- elif deployBlockStr.len > 0 :
181
- parseBiggestUInt deployBlockStr
182
- elif not runtimeConfig.DEPOSIT_CONTRACT_ADDRESS .isDefaultValue:
183
- raise newException (ValueError ,
184
- " A network with deposit contract should specify the " &
185
- " deposit contract deployment block in a file named " &
186
- " deposit_contract_block.txt or deploy_block.txt" )
187
- else :
188
- 1 'u64
189
-
190
- depositContractBlockHash = if depositContractBlockHashStr.len > 0 :
191
- Eth2Digest .strictParse (depositContractBlockHashStr)
192
- elif not runtimeConfig.DEPOSIT_CONTRACT_ADDRESS .isDefaultValue:
193
- raise newException (ValueError ,
194
- " A network with deposit contract should specify the " &
195
- " deposit contract deployment block hash in a file " &
196
- " name deposit_contract_block_hash.txt" )
197
- else :
198
- default (Eth2Digest )
199
-
200
157
bootstrapNodes = deduplicate (
201
158
readBootstrapNodes (bootstrapNodesLegacyPath) &
202
159
readBootEnr (bootstrapNodesPath) &
@@ -206,8 +163,6 @@ proc loadEth2NetworkMetadata*(
206
163
eth1Network: eth1Network,
207
164
cfg: runtimeConfig,
208
165
bootstrapNodes: bootstrapNodes,
209
- depositContractBlock: depositContractBlock,
210
- depositContractBlockHash: depositContractBlockHash,
211
166
genesis:
212
167
if downloadGenesisFrom.isSome:
213
168
GenesisMetadata (kind: BakedInUrl ,
0 commit comments