Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions scripts/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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;
}

Expand Down
Loading