diff --git a/docker-compose.yaml b/docker-compose.yaml index 896d7e38..f14d9785 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -492,7 +492,7 @@ services: MINIO_ROOT_PASSWORD: minioadmin command: server /data --console-address ":9001" healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] + test: ["CMD", "mc", "ready", "local"] interval: 5s timeout: 5s retries: 5 diff --git a/scripts/config.ts b/scripts/config.ts index 114d62c5..8f494f95 100644 --- a/scripts/config.ts +++ b/scripts/config.ts @@ -873,7 +873,7 @@ export const initTxFilteringMinioCommand = { command: "init-tx-filtering-minio", describe: "initializes MinIO bucket and empty address hash list", handler: async () => { - const salt = crypto.randomBytes(32).toString('hex'); + const salt = crypto.randomUUID(); const initialAddressList = { "salt": salt, "hashing_scheme": "Sha256", @@ -902,9 +902,9 @@ export const initTxFilteringMinioCommand = { } function computeAddressHash(address: string, salt: string): string { - const normalizedAddress = address.toLowerCase(); - const data = salt + normalizedAddress.replace('0x', ''); - const hash = crypto.createHash('sha256').update(Buffer.from(data, 'hex')).digest('hex'); + const normalizedAddress = address.toLowerCase().replace('0x', ''); + const hashInput = salt + '::0x' + normalizedAddress; + const hash = crypto.createHash('sha256').update(hashInput).digest('hex'); return hash; }