Bitcoin Forum
September 27, 2016, 01:50:53 PM *
News: Due to DDoS attacks, there may be periodic downtime.
 
   Home   Help Search Donate Login Register  
Pages: « 1 [2]  All
  Print  
Author Topic: [PATCH REQUEST] Variable ports (205BTC reward)  (Read 3730 times)
mizerydearia
Hero Member
*****
Offline Offline

Activity: 574



View Profile
September 22, 2010, 12:11:18 AM
 #21

no reason to change that, as other clients only try to connect to 8333, afaict. IRC only advertises IP, right?

No, both IP and port are encoded in the #bitcoin IRC usernames (see the EncodeAddress/DecodeAddress routines in irc.cpp).

(so mizerydearia:  no need to do what you done did...)

Mm...  On a slightly unrelated issue.  Since it is possible to detect majority of all nodes in the p2p network by visiting the bootstrapping irc channel, it seems fairly easy to determine where exactly all the nodes are in case any attempt to disconnect Internet or seize hardwares ever occurs.  Perhaps another thread should be used to discuss this.
1474984253
Hero Member
*
Offline Offline

Posts: 1474984253

View Profile Personal Message (Offline)

Ignore
1474984253
Reply with quote  #2

1474984253
Report to moderator
1474984253
Hero Member
*
Offline Offline

Posts: 1474984253

View Profile Personal Message (Offline)

Ignore
1474984253
Reply with quote  #2

1474984253
Report to moderator
1474984253
Hero Member
*
Offline Offline

Posts: 1474984253

View Profile Personal Message (Offline)

Ignore
1474984253
Reply with quote  #2

1474984253
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1474984253
Hero Member
*
Offline Offline

Posts: 1474984253

View Profile Personal Message (Offline)

Ignore
1474984253
Reply with quote  #2

1474984253
Report to moderator
1474984253
Hero Member
*
Offline Offline

Posts: 1474984253

View Profile Personal Message (Offline)

Ignore
1474984253
Reply with quote  #2

1474984253
Report to moderator
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1470


View Profile
September 29, 2010, 05:31:55 PM
 #22

Patch updated for latest SVN.

Jeff Garzik, bitcoin core dev team and BitPay engineer; opinions are my own, not my employer.
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
mizerydearia
Hero Member
*****
Offline Offline

Activity: 574



View Profile
September 29, 2010, 05:35:18 PM
 #23

original post edited to include link to patch.
mizerydearia
Hero Member
*****
Offline Offline

Activity: 574



View Profile
December 24, 2010, 12:11:45 PM
 #24

This patch doesn't work anymore.  Is this still necessary or has it made it into official svn?
wumpus
Hero Member
*****
qt
Offline Offline

Activity: 798

No Maps for These Territories


View Profile
December 24, 2010, 01:21:54 PM
 #25

This patch doesn't work anymore.  Is this still necessary or has it made it into official svn?
Nope, it's not in official SVN yet.

On a related note: from discussion on IRC I understood that the peer exchange protocol somehow doesn't have support for alternative ports. Does this patch work as advertised at all?

Bitcoin Core developer [PGP] Warning: For most, coin loss is a larger risk than coin theft. A disk can die any time. Regularly back up your wallet through FileBackup Wallet to an external storage or the (encrypted!) cloud. Use a separate offline wallet for storing larger amounts.
theymos
Administrator
Legendary
*
expert
Offline Offline

Activity: 2422


View Profile
December 24, 2010, 08:49:20 PM
 #26

On a related note: from discussion on IRC I understood that the peer exchange protocol somehow doesn't have support for alternative ports. Does this patch work as advertised at all?

The protocol supports alternative ports just fine, though you won't receive incoming connections because Bitcoin prefers not to connect to peers that are using non-standard ports.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
dsg
Jr. Member
*
Offline Offline

Activity: 37


View Profile
December 26, 2010, 12:09:36 AM
 #27

On a related note: from discussion on IRC I understood that the peer exchange protocol somehow doesn't have support for alternative ports. Does this patch work as advertised at all?

The protocol supports alternative ports just fine, though you won't receive incoming connections because Bitcoin prefers not to connect to peers that are using non-standard ports.

Interesting, is this by design or a bug?

I think it will be imperative for bitcoin to randomise port and use encryption, in order to avoid being blocked by firewalls or DPI boxes. Hopefully this will be implemented before it's needed.
theymos
Administrator
Legendary
*
expert
Offline Offline

Activity: 2422


View Profile
December 26, 2010, 12:17:06 AM
 #28

Interesting, is this by design or a bug?

It's by design. Here is Bitcoin choosing which peers to connect to:
Code:
// Randomize the order in a deterministic way, putting the standard port first
int64 nRandomizer = (uint64)(nStart * 4951 + addr.nLastTry * 9567851 + addr.ip * 7789) % (2 * 60 * 60);
if (addr.port != GetDefaultPort())
    nRandomizer += 2 * 60 * 60;

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!