bob-wallet
bob-wallet copied to clipboard
Name Claim says incorrectly "You have submitted your name claim successfully!"
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!"
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 ;-)
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)
Oh, I thought Bob could compare the hns-claim strings online and created by Bob to see it doesn't match?
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.
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
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?
Let's leave this open, it can be closed with a patch