@@ -200,24 +200,44 @@ function getChainInfo(): ChainInfo {
200200}
201201
202202function applyTxFilteringConfig ( config : any ) {
203- config . execution [ "address-filter" ] = {
204- "enable" : true ,
205- "s3" : {
206- "access-key" : "minioadmin" ,
207- "secret-key" : "minioadmin" ,
208- "region" : "us-east-1" ,
209- "endpoint" : "http://minio:9000" ,
210- "bucket" : "tx-filtering" ,
211- "object-key" : "address-hashes.json"
212- } ,
213- "poll-interval" : "30s"
214- } ;
215- config . execution [ "transaction-filterer-rpc-client" ] = {
216- "url" : "http://transaction-filterer:8547"
203+ config . execution . sequencer [ "transaction-filtering" ] = {
204+ "address-filter" : {
205+ "enable" : true ,
206+ "s3" : {
207+ "access-key" : "minioadmin" ,
208+ "secret-key" : "minioadmin" ,
209+ "region" : "us-east-1" ,
210+ "endpoint" : "http://minio:9000" ,
211+ "bucket" : "tx-filtering" ,
212+ "object-key" : "address-hashes.json"
213+ } ,
214+ "poll-interval" : "30s"
215+ } ,
216+ "transaction-filterer-rpc-client" : {
217+ "url" : "http://transaction-filterer:8547"
218+ }
217219 } ;
218- config [ "init" ] = {
219- "transaction-filtering-enabled" : true
220+ }
221+
222+ function generateL2GenesisJson ( ) {
223+ const chainConfigPath = path . join ( consts . configpath , "l2_chain_config.json" ) ;
224+ const chainConfigStr = fs . readFileSync ( chainConfigPath ) . toString ( ) ;
225+
226+ const genesis = {
227+ "serializedChainConfig" : chainConfigStr ,
228+ "arbOSInit" : {
229+ "transactionFilteringEnabled" : true ,
230+ "nativeTokenSupplyManagementEnabled" : false
231+ } ,
232+ "gasLimit" : "0x0" ,
233+ "difficulty" : "0x0" ,
234+ "alloc" : { }
220235 } ;
236+
237+ fs . writeFileSync (
238+ path . join ( consts . configpath , "l2_genesis.json" ) ,
239+ JSON . stringify ( genesis )
240+ ) ;
221241}
222242
223243function writeConfigs ( argv : any ) {
@@ -335,6 +355,13 @@ function writeConfigs(argv: any) {
335355 }
336356 }
337357
358+ if ( argv . txfiltering ) {
359+ generateL2GenesisJson ( ) ;
360+ ( baseConfig as any ) [ "init" ] = {
361+ "genesis-json-file" : "/config/l2_genesis.json"
362+ } ;
363+ }
364+
338365 const baseConfJSON = JSON . stringify ( baseConfig )
339366
340367 if ( argv . simple ) {
@@ -395,6 +422,7 @@ function writeConfigs(argv: any) {
395422 }
396423
397424 let l3Config = JSON . parse ( baseConfJSON )
425+ delete l3Config [ "init" ]
398426 l3Config [ "parent-chain" ] . connection . url = argv . l2url
399427 // use the same account for l2 and l3 staker
400428 // l3Config.node.staker["parent-chain-wallet"].account = namedAddress("l3owner")
0 commit comments