Info

Download ZIP (11.2 KB)

Testing and Issues

You can test this entry and submit issues during the testing period of the Blockchain Contest contest.

Entries with serious issues will not be able to win the contest, but even minor issues might be important for overall results.

Voting

34

Comments

Manual DNS resolver smart contract.
Written in FunC with unit tests in Fift.
@Huge Giraffe

cont'd:

3. I experimented with arbitrary data (you can see remaining traces of it in lines 125 and 129 of `dns-resolve-manual.fc.postfix.fif`), but the task description explicitly said that the DNS should resolve to a dns-record-value and section 4.3.4 of the TON whitepaper lists 256-bit values: addresses, account identifiers etc. I decided to go with the 256 bit uints, at least until we get a clarification on this.
4. I included unit tests in the original submission. The contract itself is pretty straightforward to use and heavily standardized, so there should be no surprises or unexpected behavior at all.
You have not added any comments yet...
by rating

Issues

Clever Turkey Nov 4, 2019 at 19:38
Manual DNS:
- There is no support for partial matches and -1 category in dnsresolve.
- There is no support for 0 category in dnsresolve.
- There is no way to completely delete expired domains.
- When domain is found, but category is not found the returned length must be non-zero.
- All dictionary keys are 256-bit, so there could be high storage costs.
- There is no seqno() method.
10
Manual DNS
- does not use prefix dicts, uses 256 bit keys instead
- prepend_zero_byte gets called twice (line 138, 114)
- dns values are limited to 256 bit ints, not arbitrary data
- no scripts?
Regal Fox Oct 19, 2019 at 11:05
Nikita, thank you for your review!

1. The contest task description didn't force the usage of prefix dicts, so I decided to store subdomain keys as hashes. This can be changed quite easily if required.
2. You are correct, I accidentally submitted an outdated version of contract where `prepend_zero_bytes` gets called twice. It should not affect the correctness of the DNS algo, because `prepend_zero_bytes` checks for the first byte to be non-zero (line 96). The gas consumption may be slightly increased, so your comment is deifinitely valid.
There are no user interface fift scripts to create and manage the contract at all. Only some testing scripts.

Domain names should end with zero byte, not be started with. But not really critical because this is only meaningful inside implementation details.

There is no support for special 0 category (return entire domain's dict) and for the next resolver (-1) for partial matches.

Incorrect value returned for found domain but missing category (0, null) instead of (8m, null).
Nobody added any issues yet...