I am learning and trying to implement my own cryptocurrency and I am thinking about how could I achieve the peer to peer connections.

I read that bitcoin is using DNS seeds for discovering users. In such case when running full node at home, one must configure his router to forward the port, firewall, etc..

What do you think about webRTC technology? Do you think this could be good way of solving p2p network? In this case, no router configuration is needed and firewall is ok.

Do you see some pros/cons of these aproaches?

  • What does port forwarding and firewalls have to do with DNS seeds? Those are two completely unrelated things. Even without DNS seeds you still need to port forward.
    – Andrew Chow
    Nov 20 '18 at 15:14
  • well i am trying to say, that's the way how are peers discovered in bitcoin. And if I want for example to be full node, i need configure firewall and router. Do I understand it correctly?
    – dtechlearn
    Nov 20 '18 at 15:17
  • No, you do not need to configure your router and firewall to run a full node. Contrary to popular belief, full nodes do not need to accept incoming connections. If you only make outbound connections, you are still helping the network because you are still receiving, verifying, and relaying blocks and transactions.
    – Andrew Chow
    Nov 20 '18 at 15:20
  • That's true, so I just implement connection from client(home) to public nodes? but what if all nodes are behind nat(homes) . Then I should configure it hm?
    – dtechlearn
    Nov 20 '18 at 15:24

To deal with WebRTC u need to understand SIP which is big deal already. Once u understand SIP u know then that u need server. Many servers. Read more here https://bloggeek.me/webrtc-not-p2p/ Sounds like totally away from Crypto.

  • I don't understand Boris... I just need the stun server and signaling server to know currently connected users, which is similar to those addresses from bitcoin to initiate the connection Isn't that correct?
    – dtechlearn
    Nov 20 '18 at 10:16
  • But where is decentralization? What if I DDOS 2 ur servers? Nov 20 '18 at 10:45
  • Maybe it would be possible to make the signaling server every in node that is connected. Just thinking. So you think this is not good idea to use webRTC for such a thing?
    – dtechlearn
    Nov 20 '18 at 13:02
  • I don't think it is secure and anonymous enough (as it was developed for another purpose) to be used in crypto. Nov 20 '18 at 13:43
  • so its purpose is to exchange media, data... So you would suggest using DNS seed... which mean If someone wants to use my app, they must configure their router to forward port right? In bitcoin paper, they say, that core attempts to reconfigure the router. Is this possible to send request for forwarding port programaticly? thanks Boris
    – dtechlearn
    Nov 20 '18 at 15:00

I read that bitcoin is using DNS seeds for discovering users. In such case when running full node at home, one must configure his router to forward the port, firewall, etc.

That isn't true for wallets at least. You can certainly run Bitcoin-core without configuring port-forwarding or changing any firewall rules.

What do you think about webRTC technology?

It seems designed for real-time communications between web-browsers.

That means it is not a good fit for cryptocurrency networks that work anything like Bitcoin.

  • You don't need real-time communications - predictability of response times is not at all critical.

  • You probably don't want to be restricted to browser-based communications or to solutions optimised for browsers.

  • So for wallets(SPV's) I don't configure it, but still I have to comunicate to the full node. How would you suggest establishing connection between full node and SPV(light node)?
    – dtechlearn
    Nov 20 '18 at 20:43
  • @dtechlearn: I would probably follow the model for SPV defined in the Bitcoin whitepaper and bip-0037 etc. Nov 20 '18 at 23:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.