Skip to content

Commit

Permalink
Fix config.ts to allow sequencer node to start
Browse files Browse the repository at this point in the history
  • Loading branch information
zacshowa committed Dec 11, 2024
1 parent d7d2be3 commit 58900f5
Showing 1 changed file with 3 additions and 29 deletions.
32 changes: 3 additions & 29 deletions scripts/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ function writeConfigs(argv: any) {
url: argv.validationNodeUrl,
jwtsecret: valJwtSecret,
},
"dangerous": {"reset-block-validation": false},
dangerous: { "reset-block-validation": false },
},
feed: {
input: {
Expand Down Expand Up @@ -292,15 +292,8 @@ function writeConfigs(argv: any) {

if (argv.espresso) {
let config = baseConfig as any;
config.node["block-validator"]["espresso"] = false;
config.node["block-validator"]["light-client-address"] = "";
config.node["batch-poster"]["hotshot-url"] = "";
config.node["batch-poster"]["light-client-address"] = "";
config.node["transaction-streamer"] = {
"sovereign-sequencer-enabled": false,
"hotshot-url": "",
"espresso-namespace": 412346,
};
}

baseConfig.node["data-availability"]["sequencer-inbox-address"] =
Expand All @@ -318,12 +311,6 @@ function writeConfigs(argv: any) {
simpleConfig.node["delayed-sequencer"].enable = true;
simpleConfig.node["batch-poster"].enable = true;
simpleConfig.node["batch-poster"]["redis-url"] = "";
if (argv.espresso) {
simpleConfig.node["transaction-streamer"]["hotshot-url"] =
argv.espressoUrl;
simpleConfig.node["transaction-streamer"]["sovereign-sequencer-enabled"] =
true;
}
simpleConfig.execution["sequencer"].enable = true;

if (argv.anytrust) {
Expand All @@ -334,9 +321,6 @@ function writeConfigs(argv: any) {
simpleConfig.node["batch-poster"]["hotshot-url"] = argv.espressoUrl;
simpleConfig.node["batch-poster"]["light-client-address"] =
argv.lightClientAddress;
simpleConfig.node["block-validator"]["espresso"] = true;
simpleConfig.node["block-validator"]["light-client-address"] =
argv.lightClientAddress;
simpleConfig.node["block-validator"]["dangerous"][
"reset-block-validation"
] = true;
Expand Down Expand Up @@ -386,9 +370,6 @@ function writeConfigs(argv: any) {
validatorConfig.node.staker.enable = true;
validatorConfig.node.staker["use-smart-contract-wallet"] = true;
if (argv.espresso) {
validatorConfig.node["block-validator"]["espresso"] = true;
validatorConfig.node["block-validator"]["light-client-address"] =
argv.lightClientAddress;
validatorConfig.node["block-validator"]["dangerous"][
"reset-block-validation"
] = true;
Expand All @@ -412,7 +393,6 @@ function writeConfigs(argv: any) {
sequencerConfig.node["delayed-sequencer"].enable = true;

if (argv.espresso) {
sequencerConfig.execution.sequencer["enable-espresso-sovereign"] = true;
sequencerConfig.node.feed.output.enable = true;
sequencerConfig.node.dangerous["no-sequencer-coordinator"] = true;
} else {
Expand All @@ -422,7 +402,6 @@ function writeConfigs(argv: any) {
if (argv.espresso && argv.enableEspressoFinalityNode) {
sequencerConfig.execution.sequencer["enable-espresso-finality-node"] =
true;
sequencerConfig.execution.sequencer["enable-espresso-sovereign"] = false;
sequencerConfig.execution.sequencer["espresso-finality-node-config"] = {
"hotshot-url": argv.espressoUrl,
"start-block": 0,
Expand All @@ -445,10 +424,6 @@ function writeConfigs(argv: any) {
posterConfig.node["batch-poster"]["hotshot-url"] = argv.espressoUrl;
posterConfig.node["batch-poster"]["light-client-address"] =
argv.lightClientAddress;
posterConfig.node["transaction-streamer"]["hotshot-url"] =
argv.espressoUrl;
posterConfig.node["transaction-streamer"]["sovereign-sequencer-enabled"] =
true;
} else {
posterConfig.node["seq-coordinator"].enable = true;
}
Expand Down Expand Up @@ -481,7 +456,6 @@ function writeConfigs(argv: any) {
l3Config.node["batch-poster"].enable = true;
l3Config.node["batch-poster"]["redis-url"] = "";
if (argv.espresso) {
l3Config.execution.sequencer["enable-espresso-sovereign"] = true;
l3Config.node.feed.output.enable = true;
l3Config.node.dangerous["no-sequencer-coordinator"] = true;
}
Expand Down Expand Up @@ -549,8 +523,8 @@ function writeL2ChainConfig(argv: any) {
};
if (argv.espresso) {
let chainConfig = l2ChainConfig as any;
chainConfig.arbitrum["EspressoTEEVerifierAddress"] =
"0x5eCF728ffC5C5E802091875f96281B5aeECf6C49";
chainConfig.arbitrum["EnableEspresso"] = true;
chainConfig["espresso"] = true;
}
const l2ChainConfigJSON = JSON.stringify(l2ChainConfig);
fs.writeFileSync(
Expand Down

0 comments on commit 58900f5

Please sign in to comment.