How Dcrd Works And The Shortage Of Public Dcrd Nodes

Discussion in 'Technical Development' started by David, Mar 25, 2016.

  1. 2017/12/15 - Decred v1.1.2 released! → Release Notes  → Downloads
  1. BoMBeR

    BoMBeR New Member

    Jan 17, 2016
    75
    21
    Im assuming for the new people on that scan the % is off? Also what is the good 0/1 mean?
     
    chappjc likes this.
  2. chappjc

    chappjc Full Member
    Developer Pool Operator (PoS)

    Those are reliability metrics, not times accessible divided by times contacted within that time period, as is intuitive. The good flag is based in part on the reliability information.
     
  3. Kandiru

    Kandiru Member

    Feb 21, 2016
    206
    87
    #63 Kandiru, Mar 29, 2016
    Last edited: Mar 29, 2016
    Thanks for this, I hadn't realised that my public IP and internal IP were different, (Thanks AWS) using
    Code:
    curl ipecho.net/plain
    
    I got my IP and fixed it, and it's now appearing in the list :)

    One thing that I was thinking, was with Decred there is incentive to PoS and PoW, but no reward for running a full node. This means people are essentially running them solely out of the goodness of their heart. We could use the development funds to issue a small amount of DCR manually via a lottery to full nodes running the latest version of dcrd?
     
    chappjc likes this.
  4. MarSas

    MarSas New Member

    Feb 12, 2016
    54
    14
    Male
    Not a bad idea, Kandiru.
     
  5. Kandiru

    Kandiru Member

    Feb 21, 2016
    206
    87
    #65 Kandiru, Mar 29, 2016
    Last edited: Mar 29, 2016
    I suppose implementation would be: You write a bot which spiders the currently active nodes, and compiles them into a list if they are using the latest version. Then, every 1000 blocks, it uses a pseudorandom number based on the block hash to select a winner, which gets credited with some DCR. (In a similar way to the PoS ticket selection.) The list would be published publicly, and sorted by IP address, so people could verify that the bot hadn't cheated.

    People running a node would need to register their IP address and DCR addresses with the bot, so it would know where to send the payment to.

    This step seems to be the only difficult one, as how would you prove that your node was actually yours? Maybe you could set your version of DCRD to include your address for payment, before the version number? That option could be added to a future version of DCRD I suppose.

    (Also for anyone on AWS, you need to open port 9108 inbound TCP. You need to allocate an Elastic IP using the dashboard, then assign it to your instance, then stop your dcrd and restart with the --externalip parameter on dcrd to set your node to notify other nodes about that IP. Your wallet with re-connect to your dcrd automatically, but you need to re-unlock your wallet if you are PoS mining!)
     
    David and chappjc like this.
  6. MarSas

    MarSas New Member

    Feb 12, 2016
    54
    14
    Male
  7. chappjc

    chappjc Full Member
    Developer Pool Operator (PoS)

    #67 chappjc, Mar 29, 2016
    Last edited: Mar 29, 2016
    Right. Before this thread started, I illustrated that here:
    https://forum.decred.org/threads/dcrstats-com-decred-network-dashboard.809/page-4#post-15211
    The Elastic IP is important so the public IP isn't lost on restart. In Google Cloud, you also have to select static since the default of Ephemeral will also lose your IP. Both services work great though.
     
    David and Kandiru like this.
  8. Kandiru

    Kandiru Member

    Feb 21, 2016
    206
    87
    Out of the various rules you have there, only the 9108 inbound was needed to get inbound connections working. Does the ICMP Echo rule help for dreced, or was it there for something else?
     
  9. chappjc

    chappjc Full Member
    Developer Pool Operator (PoS)

    No those were extraneous. Although it's not unreasonable to respond to a ping.
     
  10. Lee Sharp

    Lee Sharp Sr. Member

    Dec 28, 2015
    308
    217
    Male
    Independent Consultant
    Houston, Texas
    And I am one of them. More importantly, I am one of them with the "--externalip fw-sharp.no-ip.org" so dynamic dns works. But, how will it work when I change?

    And I love the lottery idea, but it will have to take changing IP addresses into account.
     
    David likes this.
  11. Kandiru

    Kandiru Member

    Feb 21, 2016
    206
    87
    Not sure changing IP addresses matter, you can put a unique DCR address in your dcrd version header, which the lottery can then use to send you winnings. It wouldn't need to keep track of your IP address! So if your IP address changes, then it shouldn't matter.
     
    drunkenmugsy likes this.
  12. root

    root Member

    Feb 3, 2016
    381
    76
    You have to have unchanged IP so the bot knows your node is online. Or unchanged DNS record.

    I am migrating from one free aws to the second one at the moment (yes, 12 month free plan is still available as long as you can give them your credit card,phone and e-mail), so once it is done, I will
    1) make the old one a full node to help the network
    2) publish the IP address and leave 2 DCR for hackers ;)
    3) publish dcr addr so everybody can check and/or increase the incentive ;)

    Any ideas / thoughts ?
     
  13. Halestorm

    Halestorm Jr. Member

    Jan 22, 2016
    83
    32
    Male
    Data Center
    Texas, USA
    I just put one up publicly, and I'm seeing incoming connections, but I'm seeing a "lost peer" message right after that:

    Is this normal behavior?

    Also, I only opened port 9108, and a quick port scan shows those ports aren't open, so I don't know why it's showing different random ports.
     
    David likes this.
  14. David

    David Sr. Member

    Jan 22, 2016
    364
    207
    Male
    USA
    I've been seeing that same thing on my IPv6 node as well. I don't know if it's a bug or if IPv6 just isn't fully implemented in dcrd yet.
     
    Halestorm likes this.
  15. Halestorm

    Halestorm Jr. Member

    Jan 22, 2016
    83
    32
    Male
    Data Center
    Texas, USA
    It's doing it on IPv4 as well. Weirdness.
     
  16. David

    David Sr. Member

    Jan 22, 2016
    364
    207
    Male
    USA
    I see. Do you want to PM me your IPv4 or IPv6 address and I'll try to manually connect to you?
     
    Halestorm likes this.
  17. Halestorm

    Halestorm Jr. Member

    Jan 22, 2016
    83
    32
    Male
    Data Center
    Texas, USA
    Sent!
     
    David likes this.
  18. David

    David Sr. Member

    Jan 22, 2016
    364
    207
    Male
    USA
    You should have just seen me connect.. probably from a 72.213 IPv4 address. I'll try your IPv6 address in a minute... but it seems to be working just fine.

    Code:
     New valid peer 23.x.x.x:9108 (outbound) (/dcrwire:0.0.1/dcrd:0.1.1/)
     Syncing to block height 23074 from peer 23.x.x.x:9108
     Processed 64 blocks in the last 10s (170 transactions, height 15967, 2016-04-02 19:30:13 -0700 PDT)
     Processed 75 blocks in the last 10.13s (207 transactions, height 16042, 2016-04-03 02:01:41 -0700 PDT)
     Processed 76 blocks in the last 10.08s (198 transactions, height 16118, 2016-04-03 08:46:05 -0700 PDT)
     Processed 69 blocks in the last 10.05s (151 transactions, height 16187, 2016-04-03 13:22:07 -0700 PDT)
     Processed 72 blocks in the last 10.13s (204 transactions, height 16259, 2016-04-03 20:14:42 -0700 PDT)
     Processed 75 blocks in the last 10.01s (228 transactions, height 16334, 2016-04-04 04:29:04 -0700 PDT)
    
     
    Halestorm likes this.
  19. Halestorm

    Halestorm Jr. Member

    Jan 22, 2016
    83
    32
    Male
    Data Center
    Texas, USA
    Nice! When you connected I noticed that it tagged you with (/dcrwire:0.0.1/dcrd:0.1.1/), whereas the others were tagged with (/decred-seeder:0.01/) - so that must be whatever is cataloging nodes. So it appears to be fine after all. :) Thanks man!
     
    David likes this.
  20. David

    David Sr. Member

    Jan 22, 2016
    364
    207
    Male
    USA
    I am running the "normal" Windows dcrd binary, and the decred-seeder is basically a network crawler that keeps track of the hosts, their versions, and their uptimes, which is what @chappjc is running on his site (listed on the 1st post of this thread).

    I did see some weird stuff with IPv6... can you post the IPv6 log from your end which includes my connection? I'm guessing you saw the "lost peer" message on our IPv6 connection.

    Code:
    08:26:18 2016-04-27 [INF] BMGR: New valid peer [2001:4800:7817:104:be76:4eff:fe05:ca1a]:9108 (outbound) (/dcrwire:0.0.1/dcrd:0.1.1/)
    08:26:18 2016-04-27 [INF] BMGR: Syncing to block height 23075 from peer [2001:4800:7817:104:be76:4eff:fe05:ca1a]:9108
    08:26:28 2016-04-27 [INF] BMGR: Processed 60 blocks in the last 10.12s (174 transactions, height 18193, 2016-04-10 14:28:07 -0700 PDT)
    08:26:38 2016-04-27 [INF] BMGR: Processed 67 blocks in the last 10.01s (208 transactions, height 18260, 2016-04-10 20:56:35 -0700 PDT)
    08:26:48 2016-04-27 [INF] BMGR: Processed 73 blocks in the last 10.04s (210 transactions, height 18333, 2016-04-11 02:54:23 -0700 PDT)
    08:30:03 2016-04-27 [ERR] PEER: Can't read message from [2001:4800:7817:104:be76:4eff:fe05:ca1a]:9108 (outbound): read tcp [2001:57a:f301:100:88de:8b3
    a:8fc3:660c]:5791->[2001:4800:7817:104:be76:4eff:fe05:ca1a]:9108: wsarecv: An existing connection was forcibly closed by the remote host.
    08:30:03 2016-04-27 [ERR] PEER: Can't send message to [2001:4800:7817:104:be76:4eff:fe05:ca1a]:9108 (outbound): write tcp [2001:57a:f301:100:88de:8b3a
    :8fc3:660c]:5791->[2001:4800:7817:104:be76:4eff:fe05:ca1a]:9108: wsasend: An existing connection was forcibly closed by the remote host.
    08:30:03 2016-04-27 [INF] BMGR: Lost peer [2001:4800:7817:104:be76:4eff:fe05:ca1a]:9108 (outbound)
    08:30:03 2016-04-27 [WRN] BMGR: No sync peer candidates available
    08:30:08 2016-04-27 [INF] BMGR: New valid peer [2001:4800:7817:104:be76:4eff:fe05:ca1a]:9108 (outbound) (/dcrwire:0.0.1/dcrd:0.1.1/)
    08:30:08 2016-04-27 [INF] BMGR: Syncing to block height 23076 from peer [2001:4800:7817:104:be76:4eff:fe05:ca1a]:9108
    08:30:09 2016-04-27 [INF] BMGR: Processed 1 block in the last 3m21.12s (1 transaction, height 18334, 2016-04-11 02:57:11 -0700 PDT)
    08:30:19 2016-04-27 [INF] BMGR: Processed 76 blocks in the last 10.09s (200 transactions, height 18410, 2016-04-11 08:44:43 -0700 PDT)
    08:30:29 2016-04-27 [INF] BMGR: Processed 76 blocks in the last 10.11s (244 transactions, height 18486, 2016-04-11 15:17:05 -0700 PDT)
    08:30:39 2016-04-27 [INF] BMGR: Processed 73 blocks in the last 10.01s (198 transactions, height 18559, 2016-04-11 22:35:32 -0700 PDT)
    08:30:49 2016-04-27 [INF] BMGR: Processed 74 blocks in the last 10.1s (199 transactions, height 18633, 2016-04-12 04:01:38 -0700 PDT)
    08:30:59 2016-04-27 [INF] BMGR: Processed 1 block in the last 10.35s (3 transactions, height 18634, 2016-04-12 04:02:14 -0700 PDT)
    08:31:10 2016-04-27 [INF] BMGR: Processed 76 blocks in the last 10.13s (213 transactions, height 18710, 2016-04-12 09:17:45 -0700 PDT)
    08:31:20 2016-04-27 [INF] BMGR: Processed 72 blocks in the last 10.06s (231 transactions, height 18782, 2016-04-12 14:53:50 -0700 PDT)
    08:31:27 2016-04-27 [INF] CHAN: Adding orphan block 0000000000001621a7fab7b14b30cad36a80ef18f7b3a11d10ea2c8c1156e0ba with parent 0000000000001be44b8ec
    8a1848be4d3c125396b0c4bcdce79b17acd5d9735df
    08:31:30 2016-04-27 [INF] BMGR: Processed 73 blocks in the last 10.01s (217 transactions, height 18855, 2016-04-12 21:41:05 -0700 PDT)
    08:31:40 2016-04-27 [INF] BMGR: Processed 66 blocks in the last 10.1s (227 transactions, height 18921, 2016-04-13 03:01:02 -0700 PDT)
    08:31:50 2016-04-27 [INF] BMGR: Processed 67 blocks in the last 10.07s (187 transactions, height 18988, 2016-04-13 08:03:51 -0700 PDT)
    08:32:00 2016-04-27 [INF] BMGR: Processed 71 blocks in the last 10.03s (232 transactions, height 19059, 2016-04-13 14:30:25 -0700 PDT)
    08:32:10 2016-04-27 [INF] BMGR: Processed 74 blocks in the last 10.08s (229 transactions, height 19133, 2016-04-13 21:55:11 -0700 PDT)
     
    Halestorm likes this.

Share This Page