MIP-0008

From Mochimo Wiki
Jump to: navigation, search

MIP-0008 - Implement distributed fountains with no DNS entries

Presented to the Core Contributor Team on May 22, 2021 by user sputnik

Sponsor(s)

The following Core Contributors have "sponsored" this MIP.

NOTE: Sponsorship for these purposes means that these Core Contributors have committed to developing the code on behalf of the community if this MIP is adopted. Note: Core Contributor sponsorship is not required for a MIP to be implemented. It just makes things easier on the community.

Problem Definition

In case we need to add new working fountains due to them being overloaded, with Mojo wallet V2.4-0 we would need to add them in the configuration manually, which is not so user friendly, would need support and would provide errors and so on.

Solution Summary

The fountains IPv4 or IPv6 addresses should be distributed the same way as the nodes are, so that there is no DNS entries needed anymore. This is the best way to go as it will allow having no user or community interaction, the network will run smoothely on its own. If someone adds a fountain, it would be detected automatically by the network and broadcasted to all other nodes and down to the wallets. This way the nodes maintainers do even not need to create a DNS entry, nor the community. Also, no API is needed to tell how many fountains are present, because the list of fountains will be automatically retried and hence its number comptued easily by the wallet.


Hard Fork Required ?

No.

Technical Details

The fountains for TAG creation should have their IPv4 or IPv6 addresses distributed on the network, a little bit or exactly how the nodes IP addresses are currently being distributed. So there could be a functionality flags 32 bits word that would contain several feature of the node when set to 1:
Bit 0 : The node is a full node
Bit 1 : The node is a ledger node
Bit 2 : The node is a fountain for TAG creation

These bits could cumulate several functionalities. When the wallet asks for the list of nodes to connect to, this functionality word will be provided to him so he knows what the IP address is capable of. He then gathers all fountains IPv4 or IPv6 addresses in a list. Then it queries this list by starting randomly somewhere in this list. It checks the fountain for its port to see if it is opened and accepts connections. If yes then it is fine. If no, then he needs to check the next fountain in the list, until one fountain has its port opened. If the tag creation shows an error, it needs to move to the next fountain and try the tag creation again, or else handle the error properly.

This way, no DNS entry needs to be adjusted or assigned manually by the community, everything is transparent and automatic. The wallet could still have a checkbox telling "Let me define the fountain", disabled by default. When the user clicks this checkbox, then a new field like it is with Mojo 2.4-0 beta. He could enter a fountain FQDN, IPv4 or PIv6 address, or select from a drop down list for other default fountains if needed.

This way the TAG creation would also be much clearer, the user doesn't care about that at all. Experts will easily be able to do what they want too.

These changes will imply wallets and nodes modifications.

Test Results