This pull request parametrizes the bitcoin scanner and so adds support for scanning other bitcoin-derived protocols.
Report changes
To be able to store the dynamic information I created a per-service report map BitcoinService. This contains the bitcoin fields that used to be on the report directly, but per scan.
For example, after scanning a bitcoin testnet node:
Please let me know if this is the right approach or if you'd prefer something else.
Coins
To get started I added dogecoin and litecoin, as well as the respective testnets of bitcoin, dogecoin and litecoin.
There are tons of bitcoin testnet nodes to be found on Tor. I haven't actually managed to find any onion nodes for litecoin and dogecoin though. Maybe you have more luck :)
I did not enable the scans for litecoin and dogecoin testnets by default. As their mainnet nodes are already so hard to find on tor, looking for these is probably a waste of time.
Adding new coins
There are literally hundreds of different altcoins derived from the bitcoin source, although most have no user base to speak of.
Assuming a coin's protocol (the subset for version negotiation and address exchange) is close enough to that of bitcoin for this to work, adding support for a new coin is trivial:
Find the port and the four message start bytes for the coin. Usually these are in src/chainparams.h
Add them to NewBitcoinProtocolScanner in a new case option
This pull request parametrizes the bitcoin scanner and so adds support for scanning other bitcoin-derived protocols.
Report changes
To be able to store the dynamic information I created a per-service report map
BitcoinService
. This contains the bitcoin fields that used to be on the report directly, but per scan.For example, after scanning a bitcoin testnet node:
Please let me know if this is the right approach or if you'd prefer something else.
Coins
To get started I added dogecoin and litecoin, as well as the respective testnets of bitcoin, dogecoin and litecoin.
There are tons of bitcoin testnet nodes to be found on Tor. I haven't actually managed to find any onion nodes for litecoin and dogecoin though. Maybe you have more luck :)
I did not enable the scans for litecoin and dogecoin testnets by default. As their mainnet nodes are already so hard to find on tor, looking for these is probably a waste of time.
Adding new coins
There are literally hundreds of different altcoins derived from the bitcoin source, although most have no user base to speak of.
Assuming a coin's protocol (the subset for version negotiation and address exchange) is close enough to that of bitcoin for this to work, adding support for a new coin is trivial:
src/chainparams.h
NewBitcoinProtocolScanner
in a new case optiononionscan.PerformNextAction