test: make cloudflare fake claims deterministic #517
Merged
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 #516
Resolves a5cc393
There are several tests that make "fake" reserved name claims in order to test the HNS reserved name claim system. That system looks up actual, real-world, ICANN-rooted DNS records and checks the DNSSEC chain. The only thing "fake" about the tests is that once we download the actual live DNSSEC chain, the test inserts a wallet claim such as this into the
cloudflare.comzone:Of course this invalidates the
RRSIG TXTin that zone, but we have a bypass just for this precise case so we can test everything else:hsd/test/auction-reorg-test.js
Lines 454 to 459 in 7826128
The issue is that now the test suite is dependent on the runner's ability to access the internet, and lookup the
cloudflare.comDNS zone. I think that is OK -- since the ability to do so is also crucial for the HNS reserved name claims system to work.What this PR fixes is a set value that the fake claim redeems by claiming
cloudflareon regtest. The claim still pays a fee, which is an amount of HNS based on the size of the claim (just like any other type of transaction). However, cloudflare is welcome to change their DNS records at any time -- add or remove TXT in their zone, sign RRSIGs with different key algorithms, etc. This means we can not predetermine the size of the fake claim for the test and therefore can not assert that a specific value of HNS will be redeemed by submitting the claim on regtest.Solution: set the fee rate to zero :-)