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.
+ Ability to completely delete expired domains.
+ Support for storing of a domain and its subdomains.
- -1 should have higher priority only on partial matches.
- All dictionary keys are 256-bit, so there could be high storage costs.
- It is much safer to call accept_message() just after the signature is checked.
- In process_domain_delete dname_len is calculated from result of align_str, so following checks are useless.
- Ability to change code of an inited smart contract is very dangerous.
Couple notes about code:
1) does not use prefix dictionaries - uses hashes instead, as a result there is some weird nested loop logic required,
2) mtdns.fc:66 checks category >= -1, this is not always true, category=-2 is reserved for owner, and we can have any other negative category as well,
3) mtdns.fc:178-184 why unpack and then repack address? why not just return rec_slice? it limits types of values that can be stored to just addresses,
4) manage.fif is very smartly structured!
- gas credit decreases, or
- complex domain value arrives (that may overflow gas credit as per storage and processing costs), or
- possibly if domain tree grows too much and operations on it require much horsepower,
some operations or contract operating at all may become impossible. accept_message should be called right after validating the anti-replay measures and signature, message intergrity should be guaranteed by your scripts.
If the owner wanted to drain the contract he could simply replace the code with operation 0x11.