ol
New member
Abstract
This is a proposal to improve Dash Core software by making its networking support more modular, resilient and extensible. Adding an extension for working on top of I2P, (an anonymous overlay network) is also included in this proposal.
This will allow to use a network protocol that prevents oppressive regimes and other adversaries from disrupting Dash network and damaging trust in Dash. Also, this will open a way to add extensions for other network protocols for better resilience and performance.
The Problem
The current Dash Core software uses TCP-based protocol inherited from Bitcoin. Implementation of this protocol is hardcoded into the software. It uses fixed port number (9999) for mainnet. The same protocol is used for communication between all full nodes, including masternodes. All communication is performed in cleartext, without any measures to conceal identity of participating nodes or content of messages passed between them.
Although existing protocol allows quite efficient communication, it does not prevent the Dash network from malicious interference and censorship by powerful adversaries. Until now, this was not a big problem in practice, but situation may change when Dash becomes a major payment system big enough to compete with national currencies of states with oppressive regimes that can afford large-scale network filtering.
Current Dash inter-node protocol is very easy to filter because of its use of fixed port number. But even if Dash switches to dynamic port numbers, its protocol is still vulnerable to deep packet inspection: every message starts with a header that is easily distinguishable as Dash protocol header.
Government-mandated ISP-level filtering can disrupt all or most nodes in a whole country, rendering Dash network unavailable without using special measures like VPNs. But there is a threat much more sinister than that: filtering at a border, like Chinese Great Firewall does. This can cause a long-lasting network split that leads to blockchain fork with disastrous consequences.
Imagine if a large part of Dash network becomes isolated. This part has enough full nodes and masternodes to keep functioning independently. It develops its own blockchain fork with enough blocks mined that transactions in this fork are treated by merchants as confirmed. Then after days or weeks of total isolation, a node that has connectivity to both parts of the network suddenly appears. It starts announcing a longer valid blockchain fork that contains no blocks that were mined in isolated part, making all transactions in those blocks unconfirmed again. Essentially, merchants suddenly lose money that were considered safely received long ago, causing irreparable damage to trust in Dash.
A way for Dash nodes to circumvent censorship and filtering is needed to prevent disastrous long-term blockchain forks and other attacks against Dash network.
The Solution
I propose to perform the following work on improving Dash Core software.
As a result of this project, Dash will be improved in the following ways.
A salary for one person team to work for 4 months is needed to complete this project.
Monthly salary will be €4500 per month, or €18000 total.
At current rate of €50 per Dash it's 90 Dash per month or 360 Dash total.
The deliverable of this proposal will be Dash Core node software that has a framework to be extended with network protocol modules and has two networking modules implementing:
The Timeline
The estimated work timeline is following.
The Team
I am Oleg Girko, experienced C++ developer and former Dash Core team member. I was working on networking code refactoring, so I know this code quite well. Also, I have background in Linux system administration, network administration, networking, grid computing, system and network security.
I think, a short-term software development project like this with narrow and well-defined scope is ideal for one-person team.
I need funding to complete this work, so I can concentrate on it and work full-time without being distracted by need to do other work to support my subsistence during this period of time.
Contacts
If you have questions or suggestions about this proposal, please leave a comments in this thread.
Also, you can contact me using the following channels.
https://github.com/OlegGirko/dash/commits/modular_net_backend
But be careful if you check out this branch: I'm going to rebase it a lot before submitting pull requests.
Update. Added a link to Github branch.
Update. Added short summary of I2P benefits.
Update. Increased required amount in Dash to adjust to Dash price fall.
Update. Proposal submitted: https://www.dashcentral.org/p/modular-net-backend
This is a proposal to improve Dash Core software by making its networking support more modular, resilient and extensible. Adding an extension for working on top of I2P, (an anonymous overlay network) is also included in this proposal.
This will allow to use a network protocol that prevents oppressive regimes and other adversaries from disrupting Dash network and damaging trust in Dash. Also, this will open a way to add extensions for other network protocols for better resilience and performance.
The Problem
The current Dash Core software uses TCP-based protocol inherited from Bitcoin. Implementation of this protocol is hardcoded into the software. It uses fixed port number (9999) for mainnet. The same protocol is used for communication between all full nodes, including masternodes. All communication is performed in cleartext, without any measures to conceal identity of participating nodes or content of messages passed between them.
Although existing protocol allows quite efficient communication, it does not prevent the Dash network from malicious interference and censorship by powerful adversaries. Until now, this was not a big problem in practice, but situation may change when Dash becomes a major payment system big enough to compete with national currencies of states with oppressive regimes that can afford large-scale network filtering.
Current Dash inter-node protocol is very easy to filter because of its use of fixed port number. But even if Dash switches to dynamic port numbers, its protocol is still vulnerable to deep packet inspection: every message starts with a header that is easily distinguishable as Dash protocol header.
Government-mandated ISP-level filtering can disrupt all or most nodes in a whole country, rendering Dash network unavailable without using special measures like VPNs. But there is a threat much more sinister than that: filtering at a border, like Chinese Great Firewall does. This can cause a long-lasting network split that leads to blockchain fork with disastrous consequences.
Imagine if a large part of Dash network becomes isolated. This part has enough full nodes and masternodes to keep functioning independently. It develops its own blockchain fork with enough blocks mined that transactions in this fork are treated by merchants as confirmed. Then after days or weeks of total isolation, a node that has connectivity to both parts of the network suddenly appears. It starts announcing a longer valid blockchain fork that contains no blocks that were mined in isolated part, making all transactions in those blocks unconfirmed again. Essentially, merchants suddenly lose money that were considered safely received long ago, causing irreparable damage to trust in Dash.
A way for Dash nodes to circumvent censorship and filtering is needed to prevent disastrous long-term blockchain forks and other attacks against Dash network.
The Solution
I propose to perform the following work on improving Dash Core software.
- Design and implement a framework for modular networking backends.
- Refactor code implementing current networking protocol into a module within this framework.
- Implement additional networking module allowing inter-node communication through I2P (Invisible Internet Project), an anonymous overlay network that provides even higher level of anonimity than Tor and is extremely difficult to block.
- Write documentation on implementing other networking backend modules.
- doesn't use dedicated directory servers to store list of available nodes;
- uses packet switching instead of circuit switching, allowing better resilience;
- routes inbound and outbound traffic using different routes, making traffic analysis much harder;
- mixes parts of messages from different peers with control messages together, making traffic analysis much harder;
- uses several transports based on TCP and UDP.
As a result of this project, Dash will be improved in the following ways.
- Ability to circumvent restrictive network filters and prevent blockchain forks caused by them.
- Ability to have fully anonymous nodes running over I2P only. Fully anonymous masternodes will be theoretically possible, but further discussion is needed whether to allow them.
- A facility for easy extension by writing other modules if necessary, implementing various network protocols. This extensibility allows unlimited possibilities of protocols not only for privacy and anonimity, but also for performance and resilience: datagram-based protocols (including multicast), non-IP based protocols etc., but these ideas are out of scope of this proposal.
A salary for one person team to work for 4 months is needed to complete this project.
Monthly salary will be €4500 per month, or €18000 total.
At current rate of €50 per Dash it's 90 Dash per month or 360 Dash total.
The deliverable of this proposal will be Dash Core node software that has a framework to be extended with network protocol modules and has two networking modules implementing:
- existing TCP-based protocol;
- a new protocol that works on top of I2P.
The Timeline
The estimated work timeline is following.
- Writing an abstract base for modular networking backends — done already.
- Preparing proposal for changing serialisation format of network address in existing inter-node protocol and various cache files to be variable-size and include protocol label — 2 weeks.
- Abstracting away addressing (making CNetAddr class and all classes inheriting it universal and not specific to TCP) — almost done, 3 weeks more needed.
- Implementing changes to network address serialisation — 3 weeks.
- Completely moving current networking protocol implementation to modular networking backend — 3 weeks.
- Writing networking backend for I2P — 4 weeks.
- Writing documentation on writing other networking backends — 2 weeks.
The Team
I am Oleg Girko, experienced C++ developer and former Dash Core team member. I was working on networking code refactoring, so I know this code quite well. Also, I have background in Linux system administration, network administration, networking, grid computing, system and network security.
I think, a short-term software development project like this with narrow and well-defined scope is ideal for one-person team.
I need funding to complete this work, so I can concentrate on it and work full-time without being distracted by need to do other work to support my subsistence during this period of time.
Contacts
If you have questions or suggestions about this proposal, please leave a comments in this thread.
Also, you can contact me using the following channels.
- Email: [email protected]
- Matrix / Riot: @ol:infoserver.lv
- IRC: ol at Freenode network
https://github.com/OlegGirko/dash/commits/modular_net_backend
But be careful if you check out this branch: I'm going to rebase it a lot before submitting pull requests.
Update. Added a link to Github branch.
Update. Added short summary of I2P benefits.
Update. Increased required amount in Dash to adjust to Dash price fall.
Update. Proposal submitted: https://www.dashcentral.org/p/modular-net-backend
Last edited: