rpc/pool: use urkel proofs for namestate in spv mode #647
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #646
Also see kyokan/bob-wallet#409
Restores SPV node RPC functionality for
getnameinfo
getnameresource
verifymessagewithname
andgetnamebyhash
.Each of these rpcs now accepts an extra boolean parameter
safe
. Whentrue
, the node gets historical data from the "safe height" which is the last tree root commitment with more than 12 confirmations. This is obviously historical data that any full node will have locally, but is also data that can be retrieved from the p2p network by an SPV node. This is the exact same mechanism used by SPV (and hnsd) for light client name resolution.Example:
Full Node
SPV Node
Here's the tradeoffs for using "safe height":
👍 SPV nodes can getnameinfo and getnameresource without relying on a centralized API
👎 This data may be outdated since it can only be verified with the most recent urkel tree root commitment
👎 Getting Urkel proofs from the p2p network may be slow and the RPC may time out