TBD54566975 / web5-go

Apache License 2.0
6 stars 6 forks source link

add DHT command line support #108

Closed mihai-chiorean closed 3 months ago

mihai-chiorean commented 3 months ago

Bencoding is changed to use a string pattern instead, for a few reasons:

  1. bencoding maps is non deterministic because we can't guarantee the order of the fields, which means the signature check fails
  2. the bencoding standard wraps the map into starting with d and ending in e. to respect bep44 requirements, we need to remove the first and last byte
  3. we only and always will have 2 fields here and bencoding results in a .. string. so, might as well use a string template to create the payload for signing
KendallWeihe commented 3 months ago

https://github.com/TBD54566975/web5-go/issues/65

mihai-chiorean commented 3 months ago

currently this is broken - publishing the did to the dht is responding with invalid signature