@@ -202,7 +202,7 @@ function writeConfigs(argv: any) {
202202 "dangerous" : {
203203 "without-block-validator" : false
204204 } ,
205- "parent-chain-wallet" : {
205+ "parent-chain-wallet" : {
206206 "account" : namedAddress ( "validator" ) ,
207207 "password" : consts . l1passphrase ,
208208 "pathname" : consts . l1keystore ,
@@ -236,7 +236,7 @@ function writeConfigs(argv: any) {
236236 "redis-url" : argv . redisUrl ,
237237 "max-delay" : "30s" ,
238238 "l1-block-bound" : "ignore" ,
239- "parent-chain-wallet" : {
239+ "parent-chain-wallet" : {
240240 "account" : namedAddress ( "sequencer" ) ,
241241 "password" : consts . l1passphrase ,
242242 "pathname" : consts . l1keystore ,
@@ -268,7 +268,7 @@ function writeConfigs(argv: any) {
268268 } ,
269269 "execution" : {
270270 "sequencer" : {
271- "enable" : false ,
271+ "enable" : false
272272 } ,
273273 "forwarding-target" : "null" ,
274274 } ,
@@ -320,6 +320,13 @@ function writeConfigs(argv: any) {
320320 sequencerConfig . node [ "seq-coordinator" ] . enable = true
321321 sequencerConfig . execution [ "sequencer" ] . enable = true
322322 sequencerConfig . node [ "delayed-sequencer" ] . enable = true
323+ if ( argv . timeboost ) {
324+ sequencerConfig . execution . sequencer . dangerous = { } ;
325+ sequencerConfig . execution . sequencer . dangerous . timeboost = {
326+ "enable" : true ,
327+ "redis-url" : argv . redisUrl
328+ } ;
329+ }
323330 fs . writeFileSync ( path . join ( consts . configpath , "sequencer_config.json" ) , JSON . stringify ( sequencerConfig ) )
324331
325332 let posterConfig = JSON . parse ( baseConfJSON )
@@ -396,7 +403,7 @@ function writeL2ChainConfig(argv: any) {
396403 "EnableArbOS" : true ,
397404 "AllowDebugPrecompiles" : true ,
398405 "DataAvailabilityCommittee" : argv . anytrust ,
399- "InitialArbOSVersion" : 32 ,
406+ "InitialArbOSVersion" : 32 , // TODO For Timeboost, this still needs to be set to 31
400407 "InitialChainOwner" : argv . l2owner ,
401408 "GenesisBlockNum" : 0
402409 }
@@ -525,14 +532,67 @@ function dasBackendsJsonConfig(argv: any) {
525532 return backends
526533}
527534
535+ export const writeTimeboostConfigsCommand = {
536+ command : "write-timeboost-configs" ,
537+ describe : "writes configs for the timeboost autonomous auctioneer and bid validator" ,
538+ builder : {
539+ "auction-contract" : {
540+ string : true ,
541+ describe : "auction contract address" ,
542+ demandOption : true
543+ } ,
544+ } ,
545+ handler : ( argv : any ) => {
546+ writeAutonomousAuctioneerConfig ( argv )
547+ writeBidValidatorConfig ( argv )
548+ }
549+ }
550+
551+ function writeAutonomousAuctioneerConfig ( argv : any ) {
552+ const autonomousAuctioneerConfig = {
553+ "auctioneer-server" : {
554+ "auction-contract-address" : argv . auctionContract ,
555+ "db-directory" : "/data" ,
556+ "redis-url" : "redis://redis:6379" ,
557+ "use-redis-coordinator" : true ,
558+ "redis-coordinator-url" : "redis://redis:6379" ,
559+ "wallet" : {
560+ "account" : namedAddress ( "auctioneer" ) ,
561+ "password" : consts . l1passphrase ,
562+ "pathname" : consts . l1keystore
563+ } ,
564+ } ,
565+ "bid-validator" : {
566+ "enable" : false
567+ }
568+ }
569+ const autonomousAuctioneerConfigJSON = JSON . stringify ( autonomousAuctioneerConfig )
570+ fs . writeFileSync ( path . join ( consts . configpath , "autonomous_auctioneer_config.json" ) , autonomousAuctioneerConfigJSON )
571+ }
572+
573+ function writeBidValidatorConfig ( argv : any ) {
574+ const bidValidatorConfig = {
575+ "auctioneer-server" : {
576+ "enable" : false
577+ } ,
578+ "bid-validator" : {
579+ "auction-contract-address" : argv . auctionContract ,
580+ "redis-url" : "redis://redis:6379" ,
581+ "sequencer-endpoint" : "http://sequencer:8547"
582+ }
583+ }
584+ const bidValidatorConfigJSON = JSON . stringify ( bidValidatorConfig )
585+ fs . writeFileSync ( path . join ( consts . configpath , "bid_validator_config.json" ) , bidValidatorConfigJSON )
586+ }
587+
528588export const writeConfigCommand = {
529589 command : "write-config" ,
530590 describe : "writes config files" ,
531591 builder : {
532592 simple : {
533- boolean : true ,
534- describe : "simple config (sequencer is also poster, validator)" ,
535- default : false ,
593+ boolean : true ,
594+ describe : "simple config (sequencer is also poster, validator)" ,
595+ default : false ,
536596 } ,
537597 anytrust : {
538598 boolean : true ,
@@ -549,8 +609,12 @@ export const writeConfigCommand = {
549609 describe : "DAS committee member B BLS pub key" ,
550610 default : ""
551611 } ,
552-
553- } ,
612+ timeboost : {
613+ boolean : true ,
614+ describe : "run sequencer in timeboost mode" ,
615+ default : false
616+ } ,
617+ } ,
554618 handler : ( argv : any ) => {
555619 writeConfigs ( argv )
556620 }
@@ -626,8 +690,9 @@ export const writeL2DASKeysetConfigCommand = {
626690 describe : "DAS committee member B BLS pub key" ,
627691 default : ""
628692 } ,
629- } ,
693+ } ,
630694 handler : ( argv : any ) => {
631- writeL2DASKeysetConfig ( argv )
695+ writeL2DASKeysetConfig ( argv )
632696 }
633697}
698+
0 commit comments