bob-wallet icon indicating copy to clipboard operation
bob-wallet copied to clipboard

Name Claim says incorrectly "You have submitted your name claim successfully!"

Open befranz opened this issue 4 years ago • 7 comments

Just tried the claim function in Bob 0.9.0 rc1 with recently claimed name "livesmag.com." (obviously by the right owner)

Even though Bob calculates of course a different TXT "hns-claim"-string than the one set in DNS, after pressing "Online DNS Service" and "Check DNS" Bob says "You have submitted your name claim successfully!"

befranz avatar Oct 26 '21 12:10 befranz

Could you elaborate? I see this claim as being processed a few hours ago:

[D:2021-10-26T00:08:39Z] (mempool) Added claim 383ff56f4e5597b160e55e87090b652eeb1194699853acf5b89b032c4f4bda42 to mempool (name=livesmag, claims=1).

Are you saying you do not own livesmag.com but attempted to claim anyway and Bob told you it was successful? There are a few possible explanations:

  • Bob does "successfully submit the claim" but if its invalid and rejected by peers, Bob doesn't really know that (its hard to track claims in the mempool and we need better tools for this in hsd actually)
  • If a reserved name has the claim TXT in its zone already, ANYONE can actually broadcast the claim (remember its signed by DNSSEC, not by the users wallet) so its possible you actually submitted the actual owner's claim before they did ;-)

pinheadmz avatar Oct 26 '21 12:10 pinheadmz

Maybe this was your invalid claim?

[D:2021-10-26T12:28:24Z] (mempool) Invalid covenant for 2f2d7dc2573384743ab543b711795bf87bb8466cf6702b9b6dc89110ab83df64 (91281): bad-claim-commit-hash.
[D:2021-10-26T12:28:24Z] (peer) Rejecting CLAIM 2f2d7dc2573384743ab543b711795bf87bb8466cf6702b9b6dc89110ab83df64 (X.X.X.X:XXXX) code=invalid reason=invalid-covenant.
[D:2021-10-26T12:28:24Z] (peer) Sending reject packet to peer (X.X.X.X:XXXX).
[I:2021-10-26T12:28:24Z] (net) Error: Verification failure: invalid-covenant (code=invalid score=0 hash=2f2d7dc2573384743ab543b711795bf87bb8466cf6702b9b6dc89110ab83df64)

pinheadmz avatar Oct 26 '21 12:10 pinheadmz

Oh, I thought Bob could compare the hns-claim strings online and created by Bob to see it doesn't match?

befranz avatar Oct 26 '21 12:10 befranz

We don't do that and since claim strings are just like address they change every time one is used. What we could do is check the TXT and decode the data from the string, extract the address and then check if that address is in our walletdb.

pinheadmz avatar Oct 26 '21 12:10 pinheadmz

If you wanted to add this check to Bob, you'd call this function to decode the TXT claim string: https://github.com/handshake-org/hsd/blob/master/lib/covenants/ownership.js#L122

Then theres a few ways to check if the address is in your wallet, heres one: https://hsd-dev.org/api-docs/#get-public-key-by-address

pinheadmz avatar Oct 26 '21 12:10 pinheadmz

Ok, I see. It was just confusing if Bob said it was successfully. Will close this then or do you want me to let it open?

befranz avatar Oct 26 '21 12:10 befranz

Let's leave this open, it can be closed with a patch

pinheadmz avatar Oct 26 '21 12:10 pinheadmz