Skip to content

Update address filter hashing to match provider spec - NIT-4754#183

Open
mahdy-nasr wants to merge 1 commit intomasterfrom
update-nitro-test-node-for-new-hashing-for-addressfilter
Open

Update address filter hashing to match provider spec - NIT-4754#183
mahdy-nasr wants to merge 1 commit intomasterfrom
update-nitro-test-node-for-new-hashing-for-addressfilter

Conversation

@mahdy-nasr
Copy link
Copy Markdown

Summary

  • Update hashing algorithm in scripts/config.ts to match nitro#4586
  • Salt generation changed from random hex bytes to UUID (crypto.randomUUID())
  • Hash input changed from binary SHA256(salt_bytes + addr_bytes) to string SHA256("{uuid}::0x{address}")
  • Fix MinIO healthcheck in docker-compose.yaml (curlmc ready local)

Testing

  • Verified hash output matches the Go implementation using known test vector (salt: 3ccf0cbf-..., address: 0xddfAbCdc..., expected hash: 0x8fb74f22...)
  • Full E2E test: started testnode with --l2-tx-filtering, added address to filter list, confirmed tx was rejected, removed address, confirmed tx succeeded again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants