Skip to content

Commit

Permalink
add hack to schedule 6493 on prague in cli for stablecontainer devnets
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Jun 29, 2024
1 parent 2f3df33 commit e41779b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
12 changes: 12 additions & 0 deletions packages/client/bin/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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://<id>@<host:port>,enode://..." ("[?discport=<port>]" not supported) or path to a bootnode.txt file',
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions packages/client/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export interface ClientOpts {
gethGenesis?: string
trustedSetup?: string
mergeForkIdPostMerge?: boolean
eip6493AtPrague?: boolean
bootnodes?: string | string[]
port?: number
extIP?: string
Expand Down
5 changes: 4 additions & 1 deletion packages/client/test/rpc/engine/newPayloadEip6493.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e41779b

Please sign in to comment.