Private test network - Outgoing connections ? #17321

issue jpeisenbarth opened this issue on October 30, 2019
  1. jpeisenbarth commented at 4:28 PM on October 30, 2019: none

    Hello,

    I wanted to make a private network of bitcoin nodes (in testnet) but they are not connecting to each other. They receive ADDR messages but do not issue a connection afterwards. I have 4 different hosts with 4 different IP adresses (but same sub network). 3 of them are connected to a fourth one (addnode rpc call). The fourth one issues ADDR messages to the nodes but they won't connect to each other.

    Describe the issue

    What behavior did you expect?

    If a node learn about a new node (by receiving an ADDR message) and if its 8 outgoing connections are not filled it will try to connect to the new node

    What was the actual behavior (provide screenshots if the issue is GUI-related)?

    The node won't issue an outgoing connection

    How reliably can you reproduce the issue, what are the steps to do so?

    All host : $ ./bitcoind -datadir=/home/jpe/bitcoin-test/datadir -conf=bitcoin.conf -debug=net -debug=rpc -debug=addrman -printtoconsole -logips

    Test the connection with bitcoin-cli getconnectioncount RPC call

    What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)?

    Bitcoin 0.18.1, from the website

    Any extra information that might be useful in the debugging process.

    Bitcoin.conf
    # Generated by https://jlopp.github.io/bitcoin-core-config-generator/
    
    # This config should be placed in following path:
    # ~/.bitcoin/bitcoin.conf
    
    # [network]
    # Allow DNS lookups for -addnode, -seednode and -connect values.
    dns=0
    # Query for peer addresses via DNS lookup, if low on addresses.
    dnsseed=0
    # Automatically create Tor hidden service.
    listenonion=0
    listen=1
    
    # [debug]
    # Run this node on the Bitcoin Test Network.
    testnet=1
    
    # [rpc]
    # Accept command line and JSON-RPC commands.
    server=1
    rpcuser=user
    rpcpassword=qwerty
    
    # [Sections]
    # Most options automatically apply to mainnet, testnet, and regtest networks.
    # If you want to confine an option to just one network, you should add it in the relevant section.
    # EXCEPTIONS: The options addnode, connect, port, bind, rpcport, rpcbind and wallet
    # only apply to mainnet unless they appear in the appropriate section below.
    
    # Options only for mainnet
    [main]
    
    # Options only for testnet
    [test]
    # Listen for incoming connections on non-default port.
    # Listen for JSON-RPC connections on this port
    rpcport=16590
    rpcallowip=[my_ip_here]
    rpcbind=0.0.0.0
    
    # Options only for regtest
    [regtest]
    
    Logs

    The node connected to the 3 others

    2019-10-29T16:39:12Z Bitcoin Core version v0.18.1 (release build)
    2019-10-29T16:39:12Z Assuming ancestors of block 0000000000000037a8cd3e06cd5edbfe9dd1dbcc5dacab279376ef7cfc2b4c75 have valid signatures.
    2019-10-29T16:39:12Z Setting nMinimumChainWork=00000000000000000000000000000000000000000000007dbe94253893cbd463
    2019-10-29T16:39:12Z Using the 'sse4(1way),sse41(4way)' SHA256 implementation
    2019-10-29T16:39:12Z Using RdRand as an additional entropy source
    2019-10-29T16:39:12Z Default data directory /home/jpe/.bitcoin
    2019-10-29T16:39:12Z Using data directory /home/jpe/bitcoin-test/datadir/testnet3
    2019-10-29T16:39:12Z Config file: /home/jpe/bitcoin-test/datadir/bitcoin.conf
    2019-10-29T16:39:12Z Using at most 125 automatic connections (1024 file descriptors available)
    2019-10-29T16:39:12Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
    2019-10-29T16:39:12Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
    2019-10-29T16:39:12Z Using 16 threads for script verification
    2019-10-29T16:39:12Z scheduler thread start
    2019-10-29T16:39:12Z WARNING: the RPC server is not safe to expose to untrusted networks such as the public internet
    2019-10-29T16:39:12Z HTTP: creating work queue of depth 16
    2019-10-29T16:39:12Z Starting RPC
    2019-10-29T16:39:12Z Starting HTTP RPC server
    2019-10-29T16:39:12Z Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcauth for rpcauth auth generation.
    2019-10-29T16:39:12Z HTTP: starting 4 worker threads
    2019-10-29T16:39:12Z Using wallet directory /home/jpe/bitcoin-test/datadir/testnet3
    2019-10-29T16:39:12Z init message: Verifying wallet(s)...
    2019-10-29T16:39:12Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
    2019-10-29T16:39:12Z Using wallet /home/jpe/bitcoin-test/datadir/testnet3
    2019-10-29T16:39:12Z BerkeleyEnvironment::Open: LogDir=/home/jpe/bitcoin-test/datadir/testnet3/database ErrorFile=/home/jpe/bitcoin-test/datadir/testnet3/db.log
    2019-10-29T16:39:12Z init message: Loading banlist...
    2019-10-29T16:39:12Z Loaded 0 banned node ips/subnets from banlist.dat  0ms
    2019-10-29T16:39:12Z net: setting try another outbound peer=false
    2019-10-29T16:39:12Z Cache configuration:
    2019-10-29T16:39:12Z * Using 2.0 MiB for block index database
    2019-10-29T16:39:12Z * Using 8.0 MiB for chain state database
    2019-10-29T16:39:12Z * Using 440.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space)
    2019-10-29T16:39:12Z init message: Loading block index...
    2019-10-29T16:39:12Z Opening LevelDB in /home/jpe/bitcoin-test/datadir/testnet3/blocks/index
    2019-10-29T16:39:12Z Opened LevelDB successfully
    2019-10-29T16:39:12Z Using obfuscation key for /home/jpe/bitcoin-test/datadir/testnet3/blocks/index: 0000000000000000
    2019-10-29T16:39:12Z LoadBlockIndexDB: last block file = 0
    2019-10-29T16:39:12Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=1, size=293, heights=0...0, time=2011-02-02...2011-02-02)
    2019-10-29T16:39:12Z Checking all blk files are present...
    2019-10-29T16:39:12Z Opening LevelDB in /home/jpe/bitcoin-test/datadir/testnet3/chainstate
    2019-10-29T16:39:12Z Opened LevelDB successfully
    2019-10-29T16:39:12Z Using obfuscation key for /home/jpe/bitcoin-test/datadir/testnet3/chainstate: d94cbd34778bbbff
    2019-10-29T16:39:12Z Loaded best chain: hashBestChain=000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943 height=0 date=2011-02-02T23:16:42Z progress=0.000000
    2019-10-29T16:39:12Z init message: Rewinding blocks...
    2019-10-29T16:39:12Z init message: Verifying blocks...
    2019-10-29T16:39:12Z  block index             383ms
    2019-10-29T16:39:12Z init message: Loading wallet...
    2019-10-29T16:39:12Z BerkeleyEnvironment::Open: LogDir=/home/jpe/bitcoin-test/datadir/testnet3/database ErrorFile=/home/jpe/bitcoin-test/datadir/testnet3/db.log
    2019-10-29T16:39:12Z [default wallet] nFileVersion = 180100
    2019-10-29T16:39:12Z [default wallet] Keys: 2001 plaintext, 0 encrypted, 2001 w/ metadata, 2001 total. Unknown wallet records: 0
    2019-10-29T16:39:13Z [default wallet] Wallet completed loading in             116ms
    2019-10-29T16:39:13Z [default wallet] setKeyPool.size() = 2000
    2019-10-29T16:39:13Z [default wallet] mapWallet.size() = 0
    2019-10-29T16:39:13Z [default wallet] mapAddressBook.size() = 0
    2019-10-29T16:39:13Z mapBlockIndex.size() = 1
    2019-10-29T16:39:13Z nBestHeight = 0
    2019-10-29T16:39:13Z Imported mempool transactions from disk: 0 succeeded, 0 failed, 0 expired, 0 already there
    2019-10-29T16:39:13Z AddLocal([ip_address_host1]:18333,1)
    2019-10-29T16:39:13Z Discover: IPv4 eno1: [ip_address_host1]
    2019-10-29T16:39:13Z Bound to [ip_address_host1]:18333
    2019-10-29T16:39:13Z AddLocal([ip_address_host1]:18333,2)
    2019-10-29T16:39:13Z init message: Loading P2P addresses...
    2019-10-29T16:39:13Z Loaded 7 addresses from peers.dat  1ms
    2019-10-29T16:39:13Z init message: Starting network threads...
    2019-10-29T16:39:13Z DNS seeding disabled
    2019-10-29T16:39:13Z net thread start
    2019-10-29T16:39:13Z addcon thread start
    2019-10-29T16:39:13Z opencon thread start
    2019-10-29T16:39:13Z init message: Done loading
    2019-10-29T16:39:13Z msghand thread start
    2019-10-29T16:42:25Z Added connection to [ip_address_host3]:49051 peer=0
    2019-10-29T16:42:25Z connection from [ip_address_host3]:49051 accepted
    2019-10-29T16:42:25Z received: version (102 bytes) peer=0
    2019-10-29T16:42:25Z sending version (102 bytes) peer=0
    2019-10-29T16:42:25Z send version message: version 70015, blocks=0, us=[::]:0, them=[ip_address_host3]:49051, peer=0
    2019-10-29T16:42:25Z sending verack (0 bytes) peer=0
    2019-10-29T16:42:25Z receive version message: /Satoshi:0.18.1/: version 70015, blocks=0, us=[ip_address_host1]:18333, peer=0, peeraddr=[ip_address_host3]:49051
    2019-10-29T16:42:25Z added time data, samples 2, offset +0 (+0 minutes)
    2019-10-29T16:42:25Z received: verack (0 bytes) peer=0
    2019-10-29T16:42:25Z sending sendheaders (0 bytes) peer=0
    2019-10-29T16:42:25Z sending sendcmpct (9 bytes) peer=0
    2019-10-29T16:42:25Z sending sendcmpct (9 bytes) peer=0
    2019-10-29T16:42:25Z sending ping (8 bytes) peer=0
    2019-10-29T16:42:25Z initial getheaders (0) to peer=0 (startheight:0)
    2019-10-29T16:42:25Z sending getheaders (69 bytes) peer=0
    2019-10-29T16:42:25Z sending feefilter (8 bytes) peer=0
    2019-10-29T16:42:25Z received: getaddr (0 bytes) peer=0
    2019-10-29T16:42:25Z received: sendheaders (0 bytes) peer=0
    2019-10-29T16:42:25Z received: sendcmpct (9 bytes) peer=0
    2019-10-29T16:42:25Z received: sendcmpct (9 bytes) peer=0
    2019-10-29T16:42:25Z received: ping (8 bytes) peer=0
    2019-10-29T16:42:25Z sending pong (8 bytes) peer=0
    2019-10-29T16:42:25Z received: getheaders (69 bytes) peer=0
    2019-10-29T16:42:25Z Ignoring getheaders from peer=0 because node is in initial block download
    2019-10-29T16:42:25Z received: feefilter (8 bytes) peer=0
    2019-10-29T16:42:25Z received: feefilter of 0.00001000 BTC/kB from peer=0
    2019-10-29T16:42:25Z received: pong (8 bytes) peer=0
    2019-10-29T16:42:29Z sending addr (31 bytes) peer=0
    2019-10-29T16:43:31Z Added connection to [ip_address_host2]:47834 peer=1
    2019-10-29T16:43:31Z connection from [ip_address_host2]:47834 accepted
    2019-10-29T16:43:31Z received: version (102 bytes) peer=1
    2019-10-29T16:43:31Z sending version (102 bytes) peer=1
    2019-10-29T16:43:31Z send version message: version 70015, blocks=0, us=[::]:0, them=[ip_address_host2]:47834, peer=1
    2019-10-29T16:43:31Z sending verack (0 bytes) peer=1
    2019-10-29T16:43:31Z receive version message: /Satoshi:0.18.1/: version 70015, blocks=0, us=[ip_address_host1]:18333, peer=1, peeraddr=[ip_address_host2]:47834
    2019-10-29T16:43:31Z added time data, samples 3, offset +0 (+0 minutes)
    2019-10-29T16:43:31Z received: verack (0 bytes) peer=1
    2019-10-29T16:43:31Z sending sendheaders (0 bytes) peer=1
    2019-10-29T16:43:31Z sending sendcmpct (9 bytes) peer=1
    2019-10-29T16:43:31Z sending sendcmpct (9 bytes) peer=1
    2019-10-29T16:43:31Z sending ping (8 bytes) peer=1
    2019-10-29T16:43:31Z sending feefilter (8 bytes) peer=1
    2019-10-29T16:43:31Z received: getaddr (0 bytes) peer=1
    2019-10-29T16:43:31Z received: sendheaders (0 bytes) peer=1
    2019-10-29T16:43:31Z received: sendcmpct (9 bytes) peer=1
    2019-10-29T16:43:31Z received: sendcmpct (9 bytes) peer=1
    2019-10-29T16:43:31Z received: ping (8 bytes) peer=1
    2019-10-29T16:43:31Z sending pong (8 bytes) peer=1
    2019-10-29T16:43:31Z received: getheaders (69 bytes) peer=1
    2019-10-29T16:43:31Z Ignoring getheaders from peer=1 because node is in initial block download
    2019-10-29T16:43:31Z received: feefilter (8 bytes) peer=1
    2019-10-29T16:43:31Z received: feefilter of 0.00001000 BTC/kB from peer=1
    2019-10-29T16:43:31Z received: pong (8 bytes) peer=1
    2019-10-29T16:43:56Z sending addr (31 bytes) peer=1
    2019-10-29T16:44:25Z received: ping (8 bytes) peer=0
    2019-10-29T16:44:25Z sending pong (8 bytes) peer=0
    2019-10-29T16:44:25Z sending ping (8 bytes) peer=0
    2019-10-29T16:44:25Z received: pong (8 bytes) peer=0
    2019-10-29T16:45:31Z received: ping (8 bytes) peer=1
    2019-10-29T16:45:31Z sending pong (8 bytes) peer=1
    2019-10-29T16:45:31Z sending ping (8 bytes) peer=1
    2019-10-29T16:45:31Z received: pong (8 bytes) peer=1
    2019-10-29T16:46:25Z sending ping (8 bytes) peer=0
    2019-10-29T16:46:25Z received: pong (8 bytes) peer=0
    2019-10-29T16:46:25Z received: ping (8 bytes) peer=0
    2019-10-29T16:46:25Z sending pong (8 bytes) peer=0
    2019-10-29T16:47:31Z received: ping (8 bytes) peer=1
    2019-10-29T16:47:31Z sending pong (8 bytes) peer=1
    2019-10-29T16:47:31Z sending ping (8 bytes) peer=1
    2019-10-29T16:47:31Z received: pong (8 bytes) peer=1
    2019-10-29T16:48:25Z received: ping (8 bytes) peer=0
    2019-10-29T16:48:25Z sending pong (8 bytes) peer=0
    2019-10-29T16:48:25Z sending ping (8 bytes) peer=0
    2019-10-29T16:48:25Z received: pong (8 bytes) peer=0
    2019-10-29T16:49:31Z received: ping (8 bytes) peer=1
    2019-10-29T16:49:31Z sending pong (8 bytes) peer=1
    2019-10-29T16:49:31Z sending ping (8 bytes) peer=1
    2019-10-29T16:49:31Z received: pong (8 bytes) peer=1
    2019-10-29T16:50:25Z received: ping (8 bytes) peer=0
    2019-10-29T16:50:25Z sending pong (8 bytes) peer=0
    2019-10-29T16:50:25Z sending ping (8 bytes) peer=0
    2019-10-29T16:50:25Z received: pong (8 bytes) peer=0
    2019-10-29T16:51:31Z sending ping (8 bytes) peer=1
    2019-10-29T16:51:31Z received: pong (8 bytes) peer=1
    2019-10-29T16:51:31Z received: ping (8 bytes) peer=1
    2019-10-29T16:51:31Z sending pong (8 bytes) peer=1
    2019-10-29T16:52:25Z received: ping (8 bytes) peer=0
    2019-10-29T16:52:25Z sending pong (8 bytes) peer=0
    2019-10-29T16:52:25Z sending ping (8 bytes) peer=0
    2019-10-29T16:52:25Z received: pong (8 bytes) peer=0
    2019-10-29T16:53:32Z sending ping (8 bytes) peer=1
    2019-10-29T16:53:32Z received: pong (8 bytes) peer=1
    2019-10-29T16:53:32Z received: ping (8 bytes) peer=1
    2019-10-29T16:53:32Z sending pong (8 bytes) peer=1
    2019-10-29T16:54:13Z Flushed 7 addresses to peers.dat  32ms
    2019-10-29T16:54:25Z received: ping (8 bytes) peer=0
    2019-10-29T16:54:25Z sending pong (8 bytes) peer=0
    2019-10-29T16:54:25Z sending ping (8 bytes) peer=0
    2019-10-29T16:54:25Z received: pong (8 bytes) peer=0
    2019-10-29T16:54:38Z Added connection to [ip_address_host4]:51666 peer=2
    2019-10-29T16:54:38Z connection from [ip_address_host4]:51666 accepted
    2019-10-29T16:54:38Z received: version (102 bytes) peer=2
    2019-10-29T16:54:38Z sending version (102 bytes) peer=2
    2019-10-29T16:54:38Z send version message: version 70015, blocks=0, us=[::]:0, them=[ip_address_host4]:51666, peer=2
    2019-10-29T16:54:38Z sending verack (0 bytes) peer=2
    2019-10-29T16:54:38Z receive version message: /Satoshi:0.18.1/: version 70015, blocks=0, us=[ip_address_host1]:18333, peer=2, peeraddr=[ip_address_host4]:51666
    2019-10-29T16:54:38Z added time data, samples 4, offset +0 (+0 minutes)
    2019-10-29T16:54:38Z received: verack (0 bytes) peer=2
    2019-10-29T16:54:38Z sending sendheaders (0 bytes) peer=2
    2019-10-29T16:54:38Z sending sendcmpct (9 bytes) peer=2
    2019-10-29T16:54:38Z sending sendcmpct (9 bytes) peer=2
    2019-10-29T16:54:38Z sending ping (8 bytes) peer=2
    2019-10-29T16:54:38Z sending feefilter (8 bytes) peer=2
    2019-10-29T16:54:38Z received: getaddr (0 bytes) peer=2
    2019-10-29T16:54:38Z received: sendheaders (0 bytes) peer=2
    2019-10-29T16:54:38Z received: sendcmpct (9 bytes) peer=2
    2019-10-29T16:54:38Z received: sendcmpct (9 bytes) peer=2
    2019-10-29T16:54:38Z received: ping (8 bytes) peer=2
    2019-10-29T16:54:38Z sending pong (8 bytes) peer=2
    2019-10-29T16:54:38Z received: getheaders (69 bytes) peer=2
    2019-10-29T16:54:38Z Ignoring getheaders from peer=2 because node is in initial block download
    2019-10-29T16:54:38Z received: feefilter (8 bytes) peer=2
    2019-10-29T16:54:38Z received: feefilter of 0.00001000 BTC/kB from peer=2
    2019-10-29T16:54:38Z received: pong (8 bytes) peer=2
    2019-10-29T16:55:18Z sending addr (31 bytes) peer=2
    2019-10-29T16:55:32Z received: ping (8 bytes) peer=1
    2019-10-29T16:55:32Z sending pong (8 bytes) peer=1
    2019-10-29T16:55:32Z sending ping (8 bytes) peer=1
    2019-10-29T16:55:32Z received: pong (8 bytes) peer=1
    2019-10-29T16:56:25Z received: ping (8 bytes) peer=0
    2019-10-29T16:56:25Z sending pong (8 bytes) peer=0
    2019-10-29T16:56:25Z sending ping (8 bytes) peer=0
    2019-10-29T16:56:25Z received: pong (8 bytes) peer=0
    2019-10-29T16:56:38Z sending ping (8 bytes) peer=2
    2019-10-29T16:56:38Z received: pong (8 bytes) peer=2
    2019-10-29T16:56:38Z received: ping (8 bytes) peer=2
    2019-10-29T16:56:38Z sending pong (8 bytes) peer=2
    2019-10-29T16:57:32Z sending ping (8 bytes) peer=1
    2019-10-29T16:57:32Z received: pong (8 bytes) peer=1
    2019-10-29T16:57:32Z received: ping (8 bytes) peer=1
    2019-10-29T16:57:32Z sending pong (8 bytes) peer=1
    2019-10-29T16:58:25Z received: ping (8 bytes) peer=0
    2019-10-29T16:58:25Z sending pong (8 bytes) peer=0
    2019-10-29T16:58:25Z sending ping (8 bytes) peer=0
    2019-10-29T16:58:25Z received: pong (8 bytes) peer=0
    

    Logs of one of the 3 node connected to the fourth one :

    2019-10-29T16:41:48Z Bitcoin Core version v0.18.1 (release build)
    2019-10-29T16:41:48Z Assuming ancestors of block 0000000000000037a8cd3e06cd5edbfe9dd1dbcc5dacab279376ef7cfc2b4c75 have valid signatures.
    2019-10-29T16:41:48Z Setting nMinimumChainWork=00000000000000000000000000000000000000000000007dbe94253893cbd463
    2019-10-29T16:41:48Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
    2019-10-29T16:41:48Z Using RdRand as an additional entropy source
    2019-10-29T16:41:49Z Default data directory /home/jpe/.bitcoin
    2019-10-29T16:41:49Z Using data directory /home/jpe/bitcoin-test/datadir/testnet3
    2019-10-29T16:41:49Z Config file: /home/jpe/bitcoin-test/datadir/bitcoin.conf
    2019-10-29T16:41:49Z Using at most 125 automatic connections (1024 file descriptors available)
    2019-10-29T16:41:49Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
    2019-10-29T16:41:49Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
    2019-10-29T16:41:49Z Using 12 threads for script verification
    2019-10-29T16:41:49Z scheduler thread start
    2019-10-29T16:41:49Z WARNING: the RPC server is not safe to expose to untrusted networks such as the public internet
    2019-10-29T16:41:49Z HTTP: creating work queue of depth 16
    2019-10-29T16:41:49Z Starting RPC
    2019-10-29T16:41:49Z Starting HTTP RPC server
    2019-10-29T16:41:49Z Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcauth for rpcauth auth generation.
    2019-10-29T16:41:49Z HTTP: starting 4 worker threads
    2019-10-29T16:41:49Z Using wallet directory /home/jpe/bitcoin-test/datadir/testnet3
    2019-10-29T16:41:49Z init message: Verifying wallet(s)...
    2019-10-29T16:41:49Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
    2019-10-29T16:41:49Z Using wallet /home/jpe/bitcoin-test/datadir/testnet3
    2019-10-29T16:41:49Z BerkeleyEnvironment::Open: LogDir=/home/jpe/bitcoin-test/datadir/testnet3/database ErrorFile=/home/jpe/bitcoin-test/datadir/testnet3/db.log
    2019-10-29T16:41:49Z init message: Loading banlist...
    2019-10-29T16:41:49Z Loaded 0 banned node ips/subnets from banlist.dat  0ms
    2019-10-29T16:41:49Z net: setting try another outbound peer=false
    2019-10-29T16:41:49Z Cache configuration:
    2019-10-29T16:41:49Z * Using 2.0 MiB for block index database
    2019-10-29T16:41:49Z * Using 8.0 MiB for chain state database
    2019-10-29T16:41:49Z * Using 440.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space)
    2019-10-29T16:41:49Z init message: Loading block index...
    2019-10-29T16:41:49Z Opening LevelDB in /home/jpe/bitcoin-test/datadir/testnet3/blocks/index
    2019-10-29T16:41:49Z Opened LevelDB successfully
    2019-10-29T16:41:49Z Using obfuscation key for /home/jpe/bitcoin-test/datadir/testnet3/blocks/index: 0000000000000000
    2019-10-29T16:41:49Z LoadBlockIndexDB: last block file = 0
    2019-10-29T16:41:49Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=1, size=293, heights=0...0, time=2011-02-02...2011-02-02)
    2019-10-29T16:41:49Z Checking all blk files are present...
    2019-10-29T16:41:49Z Opening LevelDB in /home/jpe/bitcoin-test/datadir/testnet3/chainstate
    2019-10-29T16:41:49Z Opened LevelDB successfully
    2019-10-29T16:41:49Z Using obfuscation key for /home/jpe/bitcoin-test/datadir/testnet3/chainstate: 690559680cb906bf
    2019-10-29T16:41:49Z Loaded best chain: hashBestChain=000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943 height=0 date=2011-02-02T23:16:42Z progress=0.000000
    2019-10-29T16:41:49Z init message: Rewinding blocks...
    2019-10-29T16:41:49Z init message: Verifying blocks...
    2019-10-29T16:41:49Z  block index             128ms
    2019-10-29T16:41:49Z init message: Loading wallet...
    2019-10-29T16:41:49Z BerkeleyEnvironment::Open: LogDir=/home/jpe/bitcoin-test/datadir/testnet3/database ErrorFile=/home/jpe/bitcoin-test/datadir/testnet3/db.log
    2019-10-29T16:41:49Z [default wallet] nFileVersion = 180100
    2019-10-29T16:41:49Z [default wallet] Keys: 2001 plaintext, 0 encrypted, 2001 w/ metadata, 2001 total. Unknown wallet records: 0
    2019-10-29T16:41:49Z [default wallet] Wallet completed loading in              64ms
    2019-10-29T16:41:49Z [default wallet] setKeyPool.size() = 2000
    2019-10-29T16:41:49Z [default wallet] mapWallet.size() = 0
    2019-10-29T16:41:49Z [default wallet] mapAddressBook.size() = 0
    2019-10-29T16:41:49Z mapBlockIndex.size() = 1
    2019-10-29T16:41:49Z nBestHeight = 0
    2019-10-29T16:41:49Z Imported mempool transactions from disk: 0 succeeded, 0 failed, 0 expired, 0 already there
    2019-10-29T16:41:49Z AddLocal([ip_address_host2]:18333,1)
    2019-10-29T16:41:49Z Discover: IPv4 em1: [ip_address_host2]
    2019-10-29T16:41:49Z Bound to [ip_address_host2]:18333
    2019-10-29T16:41:49Z AddLocal([ip_address_host2]:18333,2)
    2019-10-29T16:41:49Z init message: Loading P2P addresses...
    2019-10-29T16:41:49Z Loaded 7 addresses from peers.dat  0ms
    2019-10-29T16:41:49Z init message: Starting network threads...
    2019-10-29T16:41:49Z DNS seeding disabled
    2019-10-29T16:41:49Z net thread start
    2019-10-29T16:41:49Z init message: Done loading
    2019-10-29T16:41:49Z addcon thread start
    2019-10-29T16:41:49Z opencon thread start
    2019-10-29T16:41:49Z msghand thread start
    2019-10-29T16:42:23Z ThreadRPCServer method=addnode user=user peeraddr=[ip_address_host_bitcoin-cli]:60266
    2019-10-29T16:42:25Z trying connection [ip_address_host1] lastseen=0.0hrs
    2019-10-29T16:42:25Z Added connection to [ip_address_host1] peer=0
    2019-10-29T16:42:25Z sending version (102 bytes) peer=0
    2019-10-29T16:42:25Z send version message: version 70015, blocks=0, us=[::]:0, them=[ip_address_host1]:18333, peer=0
    2019-10-29T16:42:25Z received: version (102 bytes) peer=0
    2019-10-29T16:42:25Z sending verack (0 bytes) peer=0
    2019-10-29T16:42:25Z sending getaddr (0 bytes) peer=0
    2019-10-29T16:42:25Z receive version message: /Satoshi:0.18.1/: version 70015, blocks=0, us=[ip_address_host2]:49051, peer=0, peeraddr=[ip_address_host1]:18333
    2019-10-29T16:42:25Z added time data, samples 2, offset +0 (+0 minutes)
    2019-10-29T16:42:25Z received: verack (0 bytes) peer=0
    2019-10-29T16:42:25Z New outbound peer connected: version: 70015, blocks=0, peer=0, peeraddr=[ip_address_host1]:18333
    2019-10-29T16:42:25Z sending sendheaders (0 bytes) peer=0
    2019-10-29T16:42:25Z sending sendcmpct (9 bytes) peer=0
    2019-10-29T16:42:25Z sending sendcmpct (9 bytes) peer=0
    2019-10-29T16:42:25Z sending ping (8 bytes) peer=0
    2019-10-29T16:42:25Z initial getheaders (0) to peer=0 (startheight:0)
    2019-10-29T16:42:25Z sending getheaders (69 bytes) peer=0
    2019-10-29T16:42:25Z sending feefilter (8 bytes) peer=0
    2019-10-29T16:42:25Z received: sendheaders (0 bytes) peer=0
    2019-10-29T16:42:25Z received: sendcmpct (9 bytes) peer=0
    2019-10-29T16:42:25Z received: sendcmpct (9 bytes) peer=0
    2019-10-29T16:42:25Z received: ping (8 bytes) peer=0
    2019-10-29T16:42:25Z sending pong (8 bytes) peer=0
    2019-10-29T16:42:25Z received: getheaders (69 bytes) peer=0
    2019-10-29T16:42:25Z Ignoring getheaders from peer=0 because node is in initial block download
    2019-10-29T16:42:25Z received: feefilter (8 bytes) peer=0
    2019-10-29T16:42:25Z received: feefilter of 0.00001000 BTC/kB from peer=0
    2019-10-29T16:42:25Z received: pong (8 bytes) peer=0
    2019-10-29T16:42:29Z received: addr (31 bytes) peer=0
    2019-10-29T16:44:25Z sending ping (8 bytes) peer=0
    2019-10-29T16:44:25Z received: pong (8 bytes) peer=0
    2019-10-29T16:44:25Z received: ping (8 bytes) peer=0
    2019-10-29T16:44:25Z sending pong (8 bytes) peer=0
    2019-10-29T16:46:25Z received: ping (8 bytes) peer=0
    2019-10-29T16:46:25Z sending pong (8 bytes) peer=0
    2019-10-29T16:46:25Z sending ping (8 bytes) peer=0
    2019-10-29T16:46:25Z received: pong (8 bytes) peer=0
    2019-10-29T16:48:25Z sending ping (8 bytes) peer=0
    2019-10-29T16:48:25Z received: pong (8 bytes) peer=0
    2019-10-29T16:48:25Z received: ping (8 bytes) peer=0
    2019-10-29T16:48:25Z sending pong (8 bytes) peer=0
    2019-10-29T16:50:25Z sending ping (8 bytes) peer=0
    2019-10-29T16:50:25Z received: pong (8 bytes) peer=0
    2019-10-29T16:50:25Z received: ping (8 bytes) peer=0
    2019-10-29T16:50:25Z sending pong (8 bytes) peer=0
    2019-10-29T16:52:25Z sending ping (8 bytes) peer=0
    2019-10-29T16:52:25Z received: pong (8 bytes) peer=0
    2019-10-29T16:52:25Z received: ping (8 bytes) peer=0
    2019-10-29T16:52:25Z sending pong (8 bytes) peer=0
    2019-10-29T16:54:25Z sending ping (8 bytes) peer=0
    2019-10-29T16:54:25Z received: pong (8 bytes) peer=0
    2019-10-29T16:54:25Z received: ping (8 bytes) peer=0
    2019-10-29T16:54:25Z sending pong (8 bytes) peer=0
    2019-10-29T16:56:25Z sending ping (8 bytes) peer=0
    2019-10-29T16:56:25Z received: pong (8 bytes) peer=0
    2019-10-29T16:56:25Z received: ping (8 bytes) peer=0
    2019-10-29T16:56:25Z sending pong (8 bytes) peer=0
    2019-10-29T16:56:49Z Flushed 7 addresses to peers.dat  14ms
    2019-10-29T16:58:25Z sending ping (8 bytes) peer=0
    2019-10-29T16:58:25Z received: pong (8 bytes) peer=0
    2019-10-29T16:58:25Z received: ping (8 bytes) peer=0
    2019-10-29T16:58:25Z sending pong (8 bytes) peer=0
    2019-10-29T17:00:25Z sending ping (8 bytes) peer=0
    2019-10-29T17:00:25Z received: pong (8 bytes) peer=0
    2019-10-29T17:00:25Z received: ping (8 bytes) peer=0
    2019-10-29T17:00:25Z sending pong (8 bytes) peer=0
    2019-10-29T17:02:25Z sending ping (8 bytes) peer=0
    2019-10-29T17:02:25Z received: pong (8 bytes) peer=0
    2019-10-29T17:02:25Z received: ping (8 bytes) peer=0
    2019-10-29T17:02:25Z sending pong (8 bytes) peer=0
    2019-10-29T17:04:25Z received: ping (8 bytes) peer=0
    2019-10-29T17:04:25Z sending pong (8 bytes) peer=0
    2019-10-29T17:04:25Z sending ping (8 bytes) peer=0
    2019-10-29T17:04:25Z received: pong (8 bytes) peer=0
    2019-10-29T17:06:25Z received: ping (8 bytes) peer=0
    2019-10-29T17:06:25Z sending pong (8 bytes) peer=0
    2019-10-29T17:06:25Z sending ping (8 bytes) peer=0
    2019-10-29T17:06:25Z received: pong (8 bytes) peer=0
    2019-10-29T17:08:25Z received: ping (8 bytes) peer=0
    2019-10-29T17:08:25Z sending pong (8 bytes) peer=0
    2019-10-29T17:08:25Z sending ping (8 bytes) peer=0
    2019-10-29T17:08:25Z received: pong (8 bytes) peer=0
    2019-10-29T17:10:25Z received: ping (8 bytes) peer=0
    2019-10-29T17:10:25Z sending pong (8 bytes) peer=0
    2019-10-29T17:10:25Z sending ping (8 bytes) peer=0
    2019-10-29T17:10:25Z received: pong (8 bytes) peer=0
    2019-10-29T17:11:49Z Flushed 7 addresses to peers.dat  15ms
    2019-10-29T17:12:25Z received: ping (8 bytes) peer=0
    2019-10-29T17:12:25Z sending pong (8 bytes) peer=0
    2019-10-29T17:12:25Z sending ping (8 bytes) peer=0
    2019-10-29T17:12:25Z received: pong (8 bytes) peer=0
    2019-10-29T17:14:04Z Potential stale tip detected, will try using extra outbound peer (last tip update: 1890 seconds ago)
    2019-10-29T17:14:04Z net: setting try another outbound peer=true
    2019-10-29T17:14:25Z received: ping (8 bytes) peer=0
    2019-10-29T17:14:25Z sending pong (8 bytes) peer=0
    2019-10-29T17:14:25Z sending ping (8 bytes) peer=0
    2019-10-29T17:14:25Z received: pong (8 bytes) peer=0
    2019-10-29T17:16:25Z received: ping (8 bytes) peer=0
    2019-10-29T17:16:25Z sending pong (8 bytes) peer=0
    2019-10-29T17:16:25Z sending ping (8 bytes) peer=0
    2019-10-29T17:16:25Z received: pong (8 bytes) peer=0
    2019-10-29T17:18:25Z received: ping (8 bytes) peer=0
    2019-10-29T17:18:25Z sending pong (8 bytes) peer=0
    2019-10-29T17:18:25Z sending ping (8 bytes) peer=0
    2019-10-29T17:18:25Z received: pong (8 bytes) peer=0
    2019-10-29T17:20:25Z received: ping (8 bytes) peer=0
    2019-10-29T17:20:25Z sending pong (8 bytes) peer=0
    2019-10-29T17:20:25Z sending ping (8 bytes) peer=0
    2019-10-29T17:20:25Z received: pong (8 bytes) peer=0
    2019-10-29T17:22:25Z received: ping (8 bytes) peer=0
    2019-10-29T17:22:25Z sending pong (8 bytes) peer=0
    2019-10-29T17:22:25Z sending ping (8 bytes) peer=0
    2019-10-29T17:22:25Z received: pong (8 bytes) peer=0
    2019-10-29T17:24:25Z received: ping (8 bytes) peer=0
    2019-10-29T17:24:25Z sending pong (8 bytes) peer=0
    2019-10-29T17:24:25Z sending ping (8 bytes) peer=0
    2019-10-29T17:24:25Z received: pong (8 bytes) peer=0
    2019-10-29T17:24:34Z Potential stale tip detected, will try using extra outbound peer (last tip update: 2520 seconds ago)
    2019-10-29T17:24:34Z net: setting try another outbound peer=true
    
    
  2. laanwj added the label Questions and Help on Oct 30, 2019
  3. nixbox commented at 4:17 AM on November 5, 2019: contributor

    Shouldn't you be using "-connect=<ip>" option (which can be specified multiple times)?

    Currently, since you do not specify that option, it could connect to other nodes on the testnet as well.

    Your log says:

    2019-10-29T16:41:49Z Loaded 7 addresses from peers.dat 0ms

    Which means it discovered some testnet peers earlier and connects to them. If you want to limit, you could use the option that I mentioned above.

  4. jpeisenbarth commented at 10:00 AM on November 5, 2019: none

    The documentation says :

    -connect=<ip>
           Connect only to the specified node
    -listen
           Accept connections from outside (default: 1 if no -proxy or -connect)
    

    This means that it will block incoming connection if I use -connect, right ? This is why I used -addnode.

    3 hosts could successfully connect to a fourth one (manual -addnode). The fourth one sent the ADDR messages to the other nodes and then they do not connect to each other as expected.

                   +----------------+                                                  
                   |                |                                                  
                   |       1        |                                                  
                   +----------------+                                                  
                      -    |   --                                                      
                    -/     |     \-                                                    
                  -/       |       \-                                                  
                -/         |         \--                                               
              -/           |            \-                                             
            -/             |              \-                                           
          -/               |                \-                                         
    +----------+      +----------+     +----------+                                    
    |          |  ?   |          |  ?  |          |                                    
    |    2     |------|     3    |-----|     4    |                                    
    +----------+      +----------+     +----------+                                    
           --                              /--                                         
             \---                      /---                                            
                 \---             /----                                                
                     \---  ?  /---                                                     
                         \----                                                         
    

    nodes 2,3,4 are connected to node 1 (with a manual bitcoin-cli -addnode ip_addr_of_1 add node 1 sends ADDR messages to 2,3,4 node 2 doesn't connect to node 3 or node 4, node 3 doesn't connect to node 4, etc ...

    You said that my nodes discovered some testnet peers and connect to them but this is not true. When I do bitcoin-cli getconnectioncount on 2,3,4, it says 1 And when I do bitcoin-cli getconnectioncount on 1, it says 3 I checked with bitcoin-cli getpeerinfo on 2,3,4, it is indeed the node 1 and for node 1, it is nodes 2,3,4.

  5. MarcoFalke commented at 6:15 PM on November 5, 2019: member

    Are the IP addresses from the local network or publicly reachable. The addrman distinguishes those cases: https://dev.visucore.com/bitcoin/doxygen/class_c_net_addr.html#a4e3b2fea2a6151c76684b3812df4a5c3

  6. jpeisenbarth commented at 10:06 AM on November 8, 2019: none

    They are not publicly reachable, I will take a look at this isRoutable function Thank you

  7. jpeisenbarth commented at 3:18 PM on November 27, 2019: none

    I recompiled the bitcoin client to check the return of the IsRoutable function. Even though my nodes are not publicly reachable, this function returns true. They are not publicly reachable because of firewall rules. The IP adresses are not local.

    It seems this function is not the problem, do you think of anything else ?

  8. cryptohazard commented at 10:26 AM on January 28, 2020: none

    Did you manage to fix this? I have a similar problem.

  9. jpeisenbarth commented at 9:02 AM on January 29, 2020: none

    @cryptohazard No I didn't but I did not try to figure this out since.

  10. MarcoFalke commented at 5:20 PM on April 26, 2020: member

    Sorry, not sure how we can help here.

  11. MarcoFalke closed this on Apr 26, 2020

  12. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-26 06:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me