VeriBlock / vbk-ri-btc

Bitcoin Core integration/staging tree
https://bitcoincore.org/en/download
Other
4 stars 6 forks source link

connected vBitcoin chain () & APM (testnet) are not running on the same configured network #370

Closed Leonardiae closed 3 years ago

Leonardiae commented 4 years ago

First getdebuginfo is saying that vBTC and APM are running on the same network, then an error occurs related togetblockchaininfo rpc call and then I get a warning they are not running on the same network:

 > getdebuginfo
getdebuginfo
Running several checks, this may take a few moments...
{
  "information": [
    "SUCCESS - SPV connection: Connected",
    "SUCCESS - SPV synchronization status: Synchronized 0 blocks left (LocalHeight=996533 NetworkHeight=996533 InitialBlockDownload=false)",
    "SUCCESS - vBitcoin connection: Connected to http://localhost:18332",
    "SUCCESS - vBitcoin configured network: vBitcoin & APM are running on the same configured network (testnet)",
    "FAIL- vBitcoin synchronization status: Not synchronized, 0 blocks left (LocalHeight=6884 NetworkHeight=6884 InitialBlockDownload=true)",
    "SUCCESS - vBitcoin payoutAddress: 'x' is configured",
    "SUCCESS - vBitcoin configuration for autoMineRounds is valid",
    "FAIL - The tVBK PoP wallet does not contain sufficient funds: current balance: 0.00000000 tVBK, minimum required: 0.10000000, need 0.10000000 more. See: https://wiki.veriblock.org/index.php/Get_VBK"
  ]
200 success (12.45 ms)
2020-11-03 20:04:37 peer-input INFO  PeerSocketHandler         - Disconnected from peer /94.130.147.194:7501.
2020-11-03 20:04:37 peer-input INFO  PeerSocketHandler         - Output stream thread shutting down
2020-11-03 20:04:38 si-poll    WARN  BitcoinFamilyChain        - Unable to perform the getblockchaininfo rpc call to http://localhost:18332 (is it reachable?)
2020-11-03 20:04:38 si-poll    INFO  AltchainPoPMiner          - The connected vbtc chain & APM are running on the same configured network (testnet)
2020-11-03 20:04:38 si-poll    WARN  SecurityInheritingMonitor - The connected vBitcoin chain () & APM (testnet) are not running on the same configured network
2020-11-03 20:04:54 si-poll    INFO  AltchainPoPMiner          - Unable to connect to vBitcoin chain at http://localhost:18332, trying to reconnect...
2020-11-03 20:05:03 peer-input INFO  PeerSocketHandler         - Disconnected from peer /94.130.147.194:7501.
2020-11-03 20:05:03 peer-input INFO  PeerSocketHandler         - Output stream thread shutting down
2020-11-03 20:05:05 si-poll    INFO  AltchainPoPMiner          - The connected vbtc chain & APM are running on the same configured network (testnet)
Warchant commented 4 years ago

Show your APM config please.

Leonardiae commented 4 years ago

Note: This happens while vBTC is syncing and InitialBlockDownload=true

miner {
  feePerByte: 1000
  maxFee: 10000000
  api.port: 8181
#  connectDirectlyTo: ["127.0.0.1:7520"]
}
nodecore {
  network: testnet
  host: 127.0.0.1
  port: 10520
}
securityInheriting {
  vbtc: {
    // This can be set to [1,2,3,4]
    autoMineRounds: []
    payoutAddress: "tb1qdtdxzxrsusdw70ceu9f9w5mayuhp20q4rxltrz"
    pluginKey: btc
    id: 3860170
    name: "vBitcoin"
    host: "http://localhost:18332"
    // Uncomment if your vBTC daemon is auth protected
    auth: {
      username: "vbitcoin"
      password: "GAMMATeSt!"
    }
    payoutDelay: 50
    extraConfig: {
      enableRequestLogging: true
    }
  }
}

I just tried to reproduce this and it happened again (delete testner3 folder from data, start vbitcoin-qt, start APM):

2020-11-10 16:39:40 main       INFO  AltchainPoPMiner          - Loaded 0 suspended operations
2020-11-10 16:39:40 main       INFO  AltchainPoPMiner          - There are no suspended operations to submitted...
2020-11-10 16:39:40 main       INFO  ApiServer                 - Starting HTTP API on port 0.0.0.0:8181
2020-11-10 16:39:42 nc-poll    INFO  VeriBlockNetwork          - SPV is synchronized: 0 blocks left (LocalHeight=2618 NetworkHeight=2618 InitialBlockDownload=false)
2020-11-10 16:39:42 nc-poll    INFO  AltchainPoPMiner          - SPV is ready
2020-11-10 16:39:44 main       INFO  ApiServer                 - Hosting experimental user interface at http://localhost:8181
2020-11-10 16:39:45 DefaultDis INFO  AltchainPoPMiner          - SPV: Blockchain is downloading. 15699 / 0
2020-11-10 16:39:45 si-poll    INFO  SecurityInheritingMonitor - Connecting to vBitcoin daemon at http://localhost:18332...
2020-11-10 16:39:50 DefaultDis INFO  AltchainPoPMiner          - SPV: Blockchain is downloading. 39016 / 0
2020-11-10 16:39:51 si-poll    INFO  AltchainPoPMiner          - Successfully connected to vBitcoin chain at http://localhost:18332
2020-11-10 16:39:51 si-poll    INFO  AltchainPoPMiner          - The connected vbtc chain & APM are running on the same configured network (testnet)
2020-11-10 16:39:51 si-poll    INFO  SecurityInheritingMonitor - The connected vBitcoin chain is not synchronized: 0 blocks left (LocalHeight=60 NetworkHeight=60 InitialBlockDownload=true)
2020-11-10 16:39:51 nc-poll    INFO  AltchainPoPMiner          - Current balance: 76.22963928 tVBK
2020-11-10 16:39:51 nc-poll    INFO  AltchainPoPMiner          - PoP wallet contains sufficient funds: 76.22963928 tVBK
2020-11-10 16:39:54 nc-poll    INFO  VeriBlockNetwork          - SPV is not synchronized: 958914 blocks left (LocalHeight=57070 NetworkHeight=1015984 InitialBlockDownload=false)
2020-11-10 16:39:54 nc-poll    INFO  AltchainPoPMiner          - SPV is not ready
 > getdebuginfo
getdebuginfo
Running several checks, this may take a few moments...
{
  "information": [
    "SUCCESS - SPV connection: Connected",
    "FAIL - SPV synchronization status: Not synchronized. 958914 blocks left (LocalHeight=57070 NetworkHeight=1015984 InitialBlockDownload=false)",
    "SUCCESS - vBitcoin connection: Connected to http://localhost:18332",
    **"SUCCESS - vBitcoin configured network: vBitcoin & APM are running on the same configured network (testnet)",**
    "FAIL- vBitcoin synchronization status: Not synchronized, 0 blocks left (LocalHeight=60 NetworkHeight=60 InitialBlockDownload=true)",
    "SUCCESS - vBitcoin payoutAddress: 'tb1qdtdxzxrsusdw70ceu9f9w5mayuhp20q4rxltrz' is configured",
    "SUCCESS - vBitcoin configuration for autoMineRounds is valid",
    "SUCCESS - The tVBK PoP wallet contains sufficient funds, current balance: 76.22963928 tVBK"
  ],
  "diagnosticInfo": {
    "user_language": "en",
    "java_runtime_name": "Java(TM) SE Runtime Environment",
    "sun_boot_library_path": "C:\\Program Files\\Java\\jre1.8.0_221\\bin",
    "java_runtime_version": "1.8.0_221-b11",
    "java_specification_version": "1.8",
    "os_name": "Windows 10",
    "os_arch": "amd64",
    "os_version": "10.0",
    "memory_total_gb": "2.38 GB",
    "memory_max_gb": "26.67 GB",
    "processor_count": "24",
    "processor_type": "AMD64 Family 23 Model 1 Stepping 1, AuthenticAMD",
    "working_directory": "E:\\Veriblock\\vBTC\\vBTC-release.gamma-27c4d63\\vBTC-release.gamma-27c4d63\\altchain-pop-miner-0.4.11-dev.93_1\\bin",
    "datetime_now_utc": "2020-11-10 16:39:55.250+0100"
  }
}
200 success (11.18 ms)
2020-11-10 16:39:55 DefaultDis INFO  AltchainPoPMiner          - SPV: Blockchain is downloading. 60825 / 1015984
2020-11-10 16:39:59 progpow-23 INFO  ProgPoWCache              - Generating DAG cache for epoch 449 on demand...
2020-11-10 16:40:00 DefaultDis INFO  AltchainPoPMiner          - SPV: Blockchain is downloading. 78419 / 1015984
2020-11-10 16:40:05 DefaultDis INFO  AltchainPoPMiner          - SPV: Blockchain is downloading. 78419 / 1015984
2020-11-10 16:40:10 DefaultDis INFO  AltchainPoPMiner          - SPV: Blockchain is downloading. 78419 / 1015984
2020-11-10 16:40:10 si-poll    WARN  BitcoinFamilyChain        - Unable to perform the getblockchaininfo rpc call to http://localhost:18332 (is it reachable?)
**2020-11-10 16:40:10 si-poll    INFO  AltchainPoPMiner          - The connected vbtc chain & APM are running on the same configured network (testnet)
2020-11-10 16:40:10 si-poll    WARN  SecurityInheritingMonitor - The connected vBitcoin chain () & APM (testnet) are not running on the same configured network**
2020-11-10 16:40:15 DefaultDis INFO  AltchainPoPMiner          - SPV: Blockchain is downloading. 78419 / 1015984
2020-11-10 16:40:20 DefaultDis INFO  AltchainPoPMiner          - SPV: Blockchain is downloading. 94720 / 1015984
2020-11-10 16:40:25 DefaultDis INFO  AltchainPoPMiner          - SPV: Blockchain is downloading. 118712 / 1015984
Warchant commented 4 years ago

Try

securityInheriting {
  vbtc: {
    // This can be set to [1,2,3,4]
    autoMineRounds: []
    payoutAddress: "tb1qdtdxzxrsusdw70ceu9f9w5mayuhp20q4rxltrz"
    pluginKey: btc
    id: 3860170
    name: "vBitcoin"
    host: "http://localhost:18332"
    // Uncomment if your vBTC daemon is auth protected
    auth: {
      username: "vbitcoin"
      password: "GAMMATeSt!"
    }
    payoutDelay: 50
+   network: "testnet"
    extraConfig: {
      enableRequestLogging: true
    }
  }
}
Leonardiae commented 3 years ago

Looks like this extra line indeed fixes this error, I can't reproduce this anymore.