Deploy Waku v2 node Merkle tree to DNS provider
Closed this issue · 2 comments
Background
Waku v2 has recently integrated a POC version of node discovery via DNS. This allows new nodes to discover a bootstrap list of Waku v2 peers to connect to using DNS queries. The list is encoded as a Merkle tree and deployed in TXT records to a DNS provider according to EIP-1459.
Deployment to DNS provider for test
fleet POC
In order to create a POC version of DNS discovery for Waku v2, the wakuv2.test
nodes were encoded as a Merkle tree, resulting in the following subdomains and TXT records.
In zone file format:
; name ttl class type content
@ 60 IN TXT enrtree-root:v1 e=XLH4Z6DFDGBT36MDANNCQH3EUM l=FDXN3SN67NA5DKA4J2GOK7BVQI seq=1 sig=3fwyT4idon8DaQwRaORQ-y00faWQk8_TEzzn4DS-30ZTG0uieGDR-WFu3BJF6UAtc8Hpz8iVhVyEXLgwQYaUzwA
FDXN3SN67NA5DKA4J2GOK7BVQI 86900 IN TXT enrtree-branch:
XLH4Z6DFDGBT36MDANNCQH3EUM 86900 IN TXT enrtree-branch:37W35K6WDTQZJYYHCEUHJUT7OM,LX3OHTPYYKHLGOX45A4ZHI73XU,PPIJVI5OG6T5HO7CQK26AA3DGA
PPIJVI5OG6T5HO7CQK26AA3DGA 86900 IN TXT enr:-IS4QCdt9fr5dayFCBx9FYCfJIiHR89iVAdD9GHOcV1fglAdebrRmYRcgJw4un8kf5YCmm7Trc2uGamp3N1IRQilZ4IBgmlkgnY0gmlwhC_y0kmJc2VjcDI1NmsxoQIQJvj-KupljjSnBp2yz1PFl2SeELNwMSG68nL3Oz1SrIN0Y3CCdl8
37W35K6WDTQZJYYHCEUHJUT7OM 86900 IN TXT enr:-IS4QAmC_o1PMi5DbR4Bh4oHVyQunZblg4bTaottPtBodAhJZvxVlWW-4rXITPNg4mwJ8cW__D9FBDc9N4mdhyMqB-EBgmlkgnY0gmlwhIbRi9KJc2VjcDI1NmsxoQOevTdO6jvv3fRruxguKR-3Ge4bcFsLeAIWEDjrfaigNoN0Y3CCdl8
LX3OHTPYYKHLGOX45A4ZHI73XU 86900 IN TXT enr:-IS4QBGb7cP-S3aD8y7a7ANcbD8o-kZp9L51Erh1wlbB5R8WCVtU5PmYN71fxRJ3qO7wHNdR-HQyjdAhXh2GIVpge8kBgmlkgnY0gmlwhGia74CJc2VjcDI1NmsxoQNYImLJllfa9siWWAIjBhyX4y5S3qgLkwKJFBjzf_6ZMYN0Y3CCdl8
These records should be deployed against the domain and subdomain names as indicated. Since this is for POC purposes, this can be done for any reasonable domain (though it will be great if the origin can be something like nodes.vac.dev
). From the root record, the entries at each subdomain (e.g. PPIJVI5OG6T5HO7CQK26AA3DGA.nodes.vac.dev
) are iteratively resolved by DNS discovery clients.
There you go: fc24a60e
> ENTRIES=("FDXN3SN67NA5DKA4J2GOK7BVQI." "XLH4Z6DFDGBT36MDANNCQH3EUM." "PPIJVI5OG6T5HO7CQK26AA3DGA." "37W35K6WDTQZJYYHCEUHJUT7OM." "LX3OHTPYYKHLGOX45A4ZHI73XU.")
> dig +short TXT test.nodes.vac.dev
"enrtree-root:v1 e=XLH4Z6DFDGBT36MDANNCQH3EUM l=FDXN3SN67NA5DKA4J2GOK7BVQI seq=1 sig=3fwyT4idon8DaQwRaORQ-y00faWQk8_TEzzn4DS-30ZTG0uieGDR-WFu3BJF6UAtc8Hpz8iVhVyEXLgwQYaUzwA"
> for ENTRY in $ENTRIES; do dig +short TXT "${ENTRY}test.nodes.vac.dev"; done
"enrtree-branch:"
"enrtree-branch:37W35K6WDTQZJYYHCEUHJUT7OM,LX3OHTPYYKHLGOX45A4ZHI73XU,PPIJVI5OG6T5HO7CQK26AA3DGA"
"enr:-IS4QCdt9fr5dayFCBx9FYCfJIiHR89iVAdD9GHOcV1fglAdebrRmYRcgJw4un8kf5YCmm7Trc2uGamp3N1IRQilZ4IBgmlkgnY0gmlwhC_y0kmJc2VjcDI1NmsxoQIQJvj-KupljjSnBp2yz1PFl2SeELNwMSG68nL3Oz1SrIN0Y3CCdl8"
"enr:-IS4QAmC_o1PMi5DbR4Bh4oHVyQunZblg4bTaottPtBodAhJZvxVlWW-4rXITPNg4mwJ8cW__D9FBDc9N4mdhyMqB-EBgmlkgnY0gmlwhIbRi9KJc2VjcDI1NmsxoQOevTdO6jvv3fRruxguKR-3Ge4bcFsLeAIWEDjrfaigNoN0Y3CCdl8"
"enr:-IS4QBGb7cP-S3aD8y7a7ANcbD8o-kZp9L51Erh1wlbB5R8WCVtU5PmYN71fxRJ3qO7wHNdR-HQyjdAhXh2GIVpge8kBgmlkgnY0gmlwhGia74CJc2VjcDI1NmsxoQNYImLJllfa9siWWAIjBhyX4y5S3qgLkwKJFBjzf_6ZMYN0Y3CCdl8"
@jm-clius looks good?