Open pinheadmz opened 2 years ago
Request Urkel proof for name from full node, which returns a complete NameState object
With https://github.com/handshake-org/hsd/pull/647 it's possible to get the namestate, but it will be stale (2 hours?) so would need a warning or something I guess.
https://github.com/kyokan/bob-wallet/blob/6f3f93bf202740f27cda1b46684d78e94ae68a96/app/background/node/service.js#L491-L514
This is (a) broken because
getNameInfo()
will always returnnull
for every name in SPV mode. (rpc getnameinfo
relies on the Urkel Tree, which in SPV mode is always empty). It is (b) insecure because it relies on an API server togetCoin()
(even though it never will, becausegetnameinfo
will always benull
)Verify with name is possible in SPV mode though, consider this:
NameState
objectNameState
containsowner
which ishash
andindex
of a UTXONameState.owner
index
in the TX it just verifiedUpdate: ok I misread the code, getnameinfo is actually fetched from the API server, so its not broken its just insecure.