From e41779bcf9548276543efd2ea3079240e9a3ddbc Mon Sep 17 00:00:00 2001 From: harkamal Date: Sat, 29 Jun 2024 21:12:28 +0530 Subject: [PATCH] add hack to schedule 6493 on prague in cli for stablecontainer devnets --- packages/client/bin/cli.ts | 12 ++++++++++++ packages/client/src/types.ts | 1 + .../client/test/rpc/engine/newPayloadEip6493.spec.ts | 5 ++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/client/bin/cli.ts b/packages/client/bin/cli.ts index e305d87fd81..5320296b906 100755 --- a/packages/client/bin/cli.ts +++ b/packages/client/bin/cli.ts @@ -126,6 +126,12 @@ const args: ClientOpts = yargs boolean: true, default: true, }) + // just a hack to insert 6493 on pragueTime for input genesis + .option('eip6493AtPrague', { + describe: 'Just for stablecontainer devnets testing', + boolean: true, + default: true, + }) .option('bootnodes', { describe: 'Comma-separated list of network bootnodes (format: "enode://@,enode://..." ("[?discport=]" not supported) or path to a bootnode.txt file', @@ -1003,6 +1009,12 @@ async function run() { // Use geth genesis parameters file if specified const genesisFile = JSON.parse(readFileSync(args.gethGenesis, 'utf-8')) const chainName = path.parse(args.gethGenesis).base.split('.')[0] + // just a hack for stable container devnets to schedule 6493 at prague + if (args.eip6493AtPrague === true) { + genesisFile.config.eip6493Time = genesisFile.config.pragueTime + console.log('Scheduling eip6493AtPrague', genesisFile.config) + } + common = Common.fromGethGenesis(genesisFile, { chain: chainName, mergeForkIdPostMerge: args.mergeForkIdPostMerge, diff --git a/packages/client/src/types.ts b/packages/client/src/types.ts index bbebaabb05a..ad6fb6f957f 100644 --- a/packages/client/src/types.ts +++ b/packages/client/src/types.ts @@ -107,6 +107,7 @@ export interface ClientOpts { gethGenesis?: string trustedSetup?: string mergeForkIdPostMerge?: boolean + eip6493AtPrague?: boolean bootnodes?: string | string[] port?: number extIP?: string diff --git a/packages/client/test/rpc/engine/newPayloadEip6493.spec.ts b/packages/client/test/rpc/engine/newPayloadEip6493.spec.ts index bc825a40cf0..091ffc032c9 100644 --- a/packages/client/test/rpc/engine/newPayloadEip6493.spec.ts +++ b/packages/client/test/rpc/engine/newPayloadEip6493.spec.ts @@ -101,7 +101,10 @@ describe(`${method}: call with executionPayloadV4`, () => { ).sign(pk) await service.txPool.add(normalLegacyTx, true) - console.log({normalLegacyTx: normalLegacyTx.toJSON(), payloadjson: normalLegacyTx.toExecutionPayloadTx()}) + console.log({ + normalLegacyTx: normalLegacyTx.toJSON(), + payloadjson: normalLegacyTx.toExecutionPayloadTx(), + }) res = await rpc.request('engine_getPayloadV4', [payloadId]) const { executionPayload } = res.result