Info

Download ZIP (8.5 KB)

Pull request

https://github.com/ton-blockchain/ton/pull/60

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

33

Comments

Manual TON DNS
3
You have not added any comments yet...
by rating

Issues

Clever Turkey Nov 4, 2019 at 18:49
Manual DNS:
+ 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.
10
Thank you for the runvm change!

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!
2
While preventing possibility of balance draining in error (if owner sends malformed message), calling accept_message() that late may cause problems because most of heavy lifting is done before it, therefore in case:
- 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.
It also seems that in your dnsresolve request -1 has higher priority then any other entry, but that is not always the case. -1 should be used only in case of partial matches. For example having org∅ domain and looking up org∅telegram∅ domain it should return -1 of org∅ domain. But in your case looking up non-zero category of org∅ domain itself seem to return -1 value nevertheless, which is not expected behaviour (it should return the requested category).
Nobody added any issues yet...