novitski / bitcoinj

Automatically exported from code.google.com/p/bitcoinj
Apache License 2.0
0 stars 0 forks source link

Differentiate between trusted peers and normal peers #305

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently if I add a trusted peer and this peer cannot be connected or is 
disconnected due to a quick peer restart. The peer is dropped like any normal 
peer.

I'd suggest either Peers or PeerAddresses to be tagged with the source of that 
address, values like DISCOVERED or TRUSTED. TRUSTED means that the address will 
stick around. TRUSTED could also be preferred for chain download if all other 
criteria are equal.

Original issue reported on code.google.com by andreas....@gmail.com on 8 Feb 2013 at 8:15

GoogleCodeExporter commented 9 years ago
I know what you mean by this, but really the whole point of Bitcoin is that 
there are no trusted peers. What is called trusted peer in Bitcoin Wallet might 
better be called default peer or something like that.

What we should do is have better retry behaviour for when the set of known peer 
addresses has all been tried and needs to be tried again. We used to have this 
and it got deleted as we improved the PeerGroup code, but it'll come back at 
some point.

Original comment by mh.in.en...@gmail.com on 9 Feb 2013 at 11:38

GoogleCodeExporter commented 9 years ago
You could also call it "sticky address". I call it "trusted" because I need to 
trust that peer it will not cheat me.

I know the ideal Bitcoin world is all random p2p. In reality, people want to 
connect to their own bitcoind peer for whatever reasons, for example I want it 
for testing.

Original comment by andreas....@gmail.com on 9 Feb 2013 at 11:49