From 1290772a8ecc95a248b7308ad63cd1ce4440bc6b Mon Sep 17 00:00:00 2001 From: Diego Ximenes Date: Wed, 13 May 2026 15:52:46 -0300 Subject: [PATCH 1/2] Update filter address list format to match canonical hashed list Make the file written by init-tx-filtering-minio / add-filtered-address / remove-filtered-address use the same shape as filtered-addresses-hashed-list.json: {id, extract_uuid, salt, issued_at, hashing_scheme: "sha256-stringinput", hashes: ["0x", ...]}. id, extract_uuid and issued_at are regenerated on each add/remove since each upload is a freshly issued list. Co-Authored-By: Claude Opus 4.7 (1M context) --- scripts/config.ts | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/scripts/config.ts b/scripts/config.ts index 8f494f95..a69e9485 100644 --- a/scripts/config.ts +++ b/scripts/config.ts @@ -875,9 +875,12 @@ export const initTxFilteringMinioCommand = { handler: async () => { const salt = crypto.randomUUID(); const initialAddressList = { - "salt": salt, - "hashing_scheme": "Sha256", - "address_hashes": [] + id: crypto.randomUUID(), + extract_uuid: crypto.randomUUID(), + salt: salt, + issued_at: new Date().toISOString().replace(/\.\d{3}Z$/, "Z"), + hashing_scheme: "sha256-stringinput", + hashes: [] as string[], }; fs.writeFileSync(path.join(consts.configpath, "initial_address_hashes.json"), JSON.stringify(initialAddressList, null, 2)); fs.writeFileSync(path.join(consts.configpath, "tx_filtering_salt.hex"), salt); @@ -965,18 +968,21 @@ export const addFilteredAddressCommand = { } const salt = fs.readFileSync(saltPath).toString().trim(); const hash = computeAddressHash(argv.address, salt); + const hashWithPrefix = "0x" + hash; const addressListPath = path.join(consts.configpath, "initial_address_hashes.json"); const addressList = JSON.parse(fs.readFileSync(addressListPath).toString()); - const exists = addressList.address_hashes.some((entry: any) => entry.hash === hash); - if (!exists) { - addressList.address_hashes.push({ hash: hash }); + if (!addressList.hashes.includes(hashWithPrefix)) { + addressList.hashes.push(hashWithPrefix); + addressList.id = crypto.randomUUID(); + addressList.extract_uuid = crypto.randomUUID(); + addressList.issued_at = new Date().toISOString().replace(/\.\d{3}Z$/, "Z"); fs.writeFileSync(addressListPath, JSON.stringify(addressList, null, 2)); - console.log("Added address hash:", hash); + console.log("Added address hash:", hashWithPrefix); await uploadFilteredAddressesToMinio(); } else { - console.log("Address hash already in list:", hash); + console.log("Address hash already in list:", hashWithPrefix); } } } @@ -999,18 +1005,22 @@ export const removeFilteredAddressCommand = { } const salt = fs.readFileSync(saltPath).toString().trim(); const hash = computeAddressHash(argv.address, salt); + const hashWithPrefix = "0x" + hash; const addressListPath = path.join(consts.configpath, "initial_address_hashes.json"); const addressList = JSON.parse(fs.readFileSync(addressListPath).toString()); - const index = addressList.address_hashes.findIndex((entry: any) => entry.hash === hash); + const index = addressList.hashes.indexOf(hashWithPrefix); if (index > -1) { - addressList.address_hashes.splice(index, 1); + addressList.hashes.splice(index, 1); + addressList.id = crypto.randomUUID(); + addressList.extract_uuid = crypto.randomUUID(); + addressList.issued_at = new Date().toISOString().replace(/\.\d{3}Z$/, "Z"); fs.writeFileSync(addressListPath, JSON.stringify(addressList, null, 2)); - console.log("Removed address hash:", hash); + console.log("Removed address hash:", hashWithPrefix); await uploadFilteredAddressesToMinio(); } else { - console.log("Address hash not in list:", hash); + console.log("Address hash not in list:", hashWithPrefix); } } } From a13839c30fb79b07d4dfdc27d497a025bd8e0e7e Mon Sep 17 00:00:00 2001 From: Diego Ximenes Date: Wed, 13 May 2026 16:22:10 -0300 Subject: [PATCH 2/2] Fixes transaction-filtering config setting --- scripts/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/config.ts b/scripts/config.ts index a69e9485..6cec4661 100644 --- a/scripts/config.ts +++ b/scripts/config.ts @@ -211,7 +211,7 @@ function createDataAvailabilityConfig(argv: any, anytrust: boolean) { } function applyTxFilteringConfig(config: any) { - config.execution.sequencer["transaction-filtering"] = { + config.execution["transaction-filtering"] = { "address-filter": { "enable": true, "s3": {