Skip to content

Commit ba4b246

Browse files
maybe these will fix mysterious ci fails
1 parent eb7af38 commit ba4b246

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

scripts/config.ts

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ function getChainInfo(): ChainInfo {
187187
function writeConfigs(argv: any) {
188188
const valJwtSecret = path.join(consts.configpath, "val_jwt.hex")
189189
const chainInfoFile = path.join(consts.configpath, "l2_chain_info.json")
190-
let baseConfig: any = {
190+
let baseConfig = {
191191
"ensure-rollup-deployment": false,
192192
"parent-chain": {
193193
"connection": {
@@ -269,7 +269,8 @@ function writeConfigs(argv: any) {
269269
// TODO Fix das config to not need this redundant config
270270
"parent-chain-node-url": argv.l1url,
271271
"sequencer-inbox-address": "not_set"
272-
}
272+
},
273+
"da": {},
273274
},
274275
"execution": {
275276
"sequencer": {
@@ -305,8 +306,10 @@ function writeConfigs(argv: any) {
305306
}
306307
}
307308

309+
const baseConfJSON = JSON.stringify(baseConfig)
310+
308311
if (argv.simple) {
309-
let simpleConfig = baseConfig
312+
let simpleConfig = JSON.parse(baseConfJSON)
310313
simpleConfig.node.staker.enable = true
311314
simpleConfig.node.staker["use-smart-contract-wallet"] = false // TODO: set to true when fixed
312315
simpleConfig.node.staker.dangerous["without-block-validator"] = true
@@ -321,16 +324,17 @@ function writeConfigs(argv: any) {
321324
}
322325
fs.writeFileSync(path.join(consts.configpath, "sequencer_config.json"), JSON.stringify(simpleConfig))
323326
} else {
324-
let validatorConfig = baseConfig
327+
let validatorConfig = JSON.parse(baseConfJSON)
325328
validatorConfig.node.staker.enable = true
326329
validatorConfig.node.staker["use-smart-contract-wallet"] = false // TODO: set to true when fixed
327-
fs.writeFileSync(path.join(consts.configpath, "validator_config.json"), JSON.stringify(validatorConfig))
330+
let validconfJSON = JSON.stringify(validatorConfig)
331+
fs.writeFileSync(path.join(consts.configpath, "validator_config.json"), validconfJSON)
328332

329-
let unsafeStakerConfig = validatorConfig
333+
let unsafeStakerConfig = JSON.parse(validconfJSON)
330334
unsafeStakerConfig.node.staker.dangerous["without-block-validator"] = true
331335
fs.writeFileSync(path.join(consts.configpath, "unsafe_staker_config.json"), JSON.stringify(unsafeStakerConfig))
332336

333-
let sequencerConfig = baseConfig
337+
let sequencerConfig = JSON.parse(baseConfJSON)
334338
sequencerConfig.node.sequencer = true
335339
sequencerConfig.node["seq-coordinator"].enable = true
336340
sequencerConfig.execution["sequencer"].enable = true
@@ -343,7 +347,7 @@ function writeConfigs(argv: any) {
343347
}
344348
fs.writeFileSync(path.join(consts.configpath, "sequencer_config.json"), JSON.stringify(sequencerConfig))
345349

346-
let posterConfig = baseConfig
350+
let posterConfig = JSON.parse(baseConfJSON)
347351
posterConfig.node["seq-coordinator"].enable = true
348352
posterConfig.node["batch-poster"].enable = true
349353
if (argv.anytrust) {
@@ -355,7 +359,7 @@ function writeConfigs(argv: any) {
355359
fs.writeFileSync(path.join(consts.configpath, "poster_config.json"), JSON.stringify(posterConfig))
356360
}
357361

358-
let l3Config = baseConfig
362+
let l3Config = JSON.parse(baseConfJSON)
359363
l3Config["parent-chain"].connection.url = argv.l2url
360364
// use the same account for l2 and l3 staker
361365
// l3Config.node.staker["parent-chain-wallet"].account = namedAddress("l3owner")
@@ -375,7 +379,7 @@ function writeConfigs(argv: any) {
375379
l3Config.node["batch-poster"]["redis-url"] = ""
376380
fs.writeFileSync(path.join(consts.configpath, "l3node_config.json"), JSON.stringify(l3Config))
377381

378-
let validationNodeConfig = {
382+
let validationNodeConfig = JSON.parse(JSON.stringify({
379383
"persistent": {
380384
"chain": "local"
381385
},
@@ -393,7 +397,7 @@ function writeConfigs(argv: any) {
393397
"jwtsecret": valJwtSecret,
394398
"addr": "0.0.0.0",
395399
},
396-
}
400+
}))
397401
fs.writeFileSync(path.join(consts.configpath, "validation_node_config.json"), JSON.stringify(validationNodeConfig))
398402
}
399403

test-node.bash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,11 +586,11 @@ if $force_init; then
586586
if $l2referenceda; then
587587
referenceDaNodeConfigLine="--referenceDA"
588588
fi
589+
590+
echo "== Writing configs"
589591
if $simple; then
590-
echo == Writing configs
591592
run_script write-config --simple $anytrustNodeConfigLine $referenceDaNodeConfigLine $timeboostNodeConfigLine
592593
else
593-
echo == Writing configs
594594
run_script write-config $anytrustNodeConfigLine $referenceDaNodeConfigLine $timeboostNodeConfigLine
595595

596596
echo == Initializing redis

0 commit comments

Comments
 (0)