Skip to content

Commit 277d429

Browse files
authored
feat: update node config for BoLD (#264)
1 parent 75b9e6e commit 277d429

File tree

5 files changed

+374
-108
lines changed

5 files changed

+374
-108
lines changed

examples/prepare-node-config/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ async function main() {
6464
await parentChainPublicClient.getTransactionReceipt({ hash: txHash }),
6565
);
6666

67+
const config = tx.getInputs()[0].config;
6768
// get the chain config from the transaction inputs
68-
const chainConfig: ChainConfig = JSON.parse(tx.getInputs()[0].config.chainConfig);
69+
const chainConfig: ChainConfig = JSON.parse(config.chainConfig);
6970
// get the core contracts from the transaction receipt
7071
const coreContracts = txReceipt.getCoreContracts();
7172

@@ -76,6 +77,7 @@ async function main() {
7677
coreContracts,
7778
batchPosterPrivateKey: process.env.BATCH_POSTER_PRIVATE_KEY as `0x${string}`,
7879
validatorPrivateKey: process.env.VALIDATOR_PRIVATE_KEY as `0x${string}`,
80+
stakeToken: config.stakeToken,
7981
parentChainId: parentChain.id,
8082
parentChainRpcUrl: getRpcUrl(parentChain),
8183
};

src/prepareNodeConfig.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export type PrepareNodeConfigParams = {
3030
coreContracts: CoreContracts;
3131
batchPosterPrivateKey: string;
3232
validatorPrivateKey: string;
33+
stakeToken: string;
3334
parentChainId: ParentChainId;
3435
parentChainIsArbitrum?: boolean;
3536
parentChainRpcUrl: string;
@@ -51,6 +52,7 @@ export function prepareNodeConfig({
5152
coreContracts,
5253
batchPosterPrivateKey,
5354
validatorPrivateKey,
55+
stakeToken,
5456
parentChainId,
5557
parentChainIsArbitrum: parentChainIsArbitrumParam,
5658
parentChainRpcUrl,
@@ -89,6 +91,7 @@ export function prepareNodeConfig({
8991
'rollup': coreContracts.rollup,
9092
'validator-utils': coreContracts.validatorUtils,
9193
'validator-wallet-creator': coreContracts.validatorWalletCreator,
94+
'stake-token': stakeToken,
9295
'deployed-at': coreContracts.deployedAtBlockNumber,
9396
},
9497
},
@@ -132,6 +135,10 @@ export function prepareNodeConfig({
132135
'no-sequencer-coordinator': true,
133136
'disable-blob-reader': getDisableBlobReader(parentChainId),
134137
},
138+
'bold': {
139+
enable: true,
140+
strategy: 'MakeNodes',
141+
},
135142
},
136143
'execution': {
137144
'forwarding-target': '',

src/scripts/generateNodeConfigType.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Project, WriterFunction, Writers } from 'ts-morph';
55
const { objectType } = Writers;
66

77
function getNitroNodeImageTag(): string {
8-
const defaultNitroNodeTag = 'v2.3.3-6a1c1a7';
8+
const defaultNitroNodeTag = 'v3.5.6-9a29a1e';
99
const argv = process.argv.slice(2);
1010

1111
if (argv.length < 2 || argv[0] !== '--nitro-node-tag') {
@@ -49,11 +49,17 @@ function parseCliOptions(fileContents: string): CliOption[] {
4949
strings: 'string[]',
5050
stringArray: 'string[]',
5151
int: 'number',
52+
int16: 'number',
53+
int32: 'number',
5254
uint: 'number',
55+
uint16: 'number',
5356
uint32: 'number',
5457
float: 'number',
58+
AllowedSeeks: 'number',
59+
backendConfigList: 'string',
5560
boolean: 'boolean',
5661
duration: 'string',
62+
durationSlice: 'string[]',
5763
};
5864

5965
// split into lines

0 commit comments

Comments
 (0)