projectpai / paicoin

Official repo of PAI Coin
https://projectpai.com
MIT License
63 stars 35 forks source link

Node consistently crashing with "Failed to vote" error #397

Open mharvilla opened 3 years ago

mharvilla commented 3 years ago

The node 3.135.218.147 keeps crashing. Some excerpts of the log before the crashes are shown below. Full logs also available.

Excerpt 1

021-05-14 09:36:49 AddToWallet fa537e52381303649b21cb703117c7036f2fcb302f0641298f4300f61cd7120a  new
2021-05-14 09:36:49 AddToWallet fa537e52381303649b21cb703117c7036f2fcb302f0641298f4300f61cd7120a
2021-05-14 09:36:49 Relaying wtx fa537e52381303649b21cb703117c7036f2fcb302f0641298f4300f61cd7120a
2021-05-14 09:36:49 CAutoVoter: Failed to vote: (-5) Ticket is already used for a vote in mempool - ()
2021-05-14 09:36:49 CAutoVoter: Voted: 6082aa10a2fff9f915e4aa54592534148dfef7782507284e0a4edf5752011f6f, 2d89753157c2792827737476c4e6d1567c81a3ed872d8b47aac5057168d7105c, fa537e52381303649b21cb703117c7036f2fcb302f0641298f4300f61cd7120a
2021-05-14 09:36:49 UpdateTip: new best=00000000000957722df48174eb7f100a23d9b41cdd64a79117218a1e65f5f435 height=186500 version=0xa0000000 log2_work=73.956906 tx=909063 date='2021-05-14 09:36:29' progress=1.000000 cache=11.3MiB(2419txo)
2021-05-14 09:36:49 AddToWallet 180bafc5f1cb10b1e24306624dbe44e7be940b67733c0ec9971be5bf7de66b4a  update
2021-05-14 09:36:49 CAutoVoter: Failed to vote: (-5) Ticket is already used for a vote in mempool - ()
2021-05-14 09:36:49 CAutoVoter: Failed to vote: (-5) Ticket is already used for a vote in mempool - ()
2021-05-14 09:36:49 CAutoVoter: Failed to vote: (-5) Ticket is already used for a vote in mempool - ()

Excerpt 2

2021-05-16 02:04:37 connect() to 77.37.134.130:8567 failed after select(): Connection refused (111)
2021-05-16 02:04:53 Relaying wtx ab21ffe9b357d1f948558d36c5b4f7f306ac4355c557eada28512d0bb02c8993
2021-05-16 02:04:53 ResendWalletTransactions: rebroadcast 1 unconfirmed transactions
2021-05-16 02:05:36 receive version message: /Turing:2.0.2/: version 70015, blocks=185008, us=3.135.218.147:8567, peer=127
2021-05-16 02:12:43 CAutoVoter: received NewPoWValidBlock, height=186745, pstake=0x7fdaa827f690
2021-05-16 02:12:43 CommitTransaction:
CTransaction(hash=71805293a2, ver=3, vin.size=2, vout.size=2, nLockTime=0, nExpiry=0)
    CTxIn(COutPoint(0000000000, 4294967295), coinbase 0000)
    CTxIn(COutPoint(2a14714087, 1), scriptSig=47304402206ca639fd07eb05)
    CScriptWitness()
    CScriptWitness()
    CTxOut(nValue=0.00000000, scriptPubKey=6ac05100005251203865dc233e649b)
    CTxOut(nValue=393.59370089, scriptPubKey=76a91496a9abde5a48a9cc2e28dd2f)
2021-05-16 02:12:43 AddToWallet 71805293a2d852149521101d50042122c6bb0bb731e013c6c03f1c688e5a04d1  new
2021-05-16 02:12:43 AddToWallet 71805293a2d852149521101d50042122c6bb0bb731e013c6c03f1c688e5a04d1
2021-05-16 02:12:43 Relaying wtx 71805293a2d852149521101d50042122c6bb0bb731e013c6c03f1c688e5a04d1
2021-05-16 02:12:43 CAutoVoter: Voted: 71805293a2d852149521101d50042122c6bb0bb731e013c6c03f1c688e5a04d1
2021-05-16 02:12:43 UpdateTip: new best=000000000009f90485708c2ebcb8dd91b150d593755116758d9b643e23dc6538 height=186745 version=0xa0000000 log2_work=73.956906 tx=911677 date='2021-05-16 02:12:31' progress=1.000000 cache=11.4MiB(2676txo)
2021-05-16 02:12:43 CAutoVoter: Failed to vote: (-5) Ticket is already used for a vote in mempool - ()
mharvilla commented 3 years ago

@pgerzani @sebastianrusu I am not sure if it is related to the same issue, but my node just crashed with the following error (this time I launched the node in a screen so errors print directly to screen, as suggested by Patrick):

2021-06-03 04:03:09 sending pong (8 bytes) peer=594
2021-06-03 04:03:11 sending ping (8 bytes) peer=2
2021-06-03 04:03:11 received: pong (8 bytes) peer=2
2021-06-03 04:03:15 received: cmpctblock (300 bytes) peer=289
2021-06-03 04:03:15 Initialized PartiallyDownloadedBlock for block 00000000000191788b865ee58744259675d2ad060f9e7050386a108531aedcac using a cmpctblock of size 300
2021-06-03 04:03:15 received: blocktxn (33 bytes) peer=289
2021-06-03 04:03:15 Successfully reconstructed block 00000000000191788b865ee58744259675d2ad060f9e7050386a108531aedcac with 1 txn prefilled, 7 txn from mempool (incl at least 0 from extra pool) and 0 txn requested
2021-06-03 04:03:15 CAutoVoter: received NewPoWValidBlock, height=189321, pstake=0x7fdf08b52290
2021-06-03 04:03:15   - Load block from disk: 0.00ms [13.47s]
2021-06-03 04:03:15     - Sanity checks: 0.00ms [5.94s (0.03ms/blk)]
2021-06-03 04:03:15     - Fork checks: 0.16ms [10.12s (0.05ms/blk)]
2021-06-03 04:03:15       - Connect 8 transactions: 0.69ms (0.087ms/tx, 0.023ms/txin) [31.92s (0.17ms/blk)]
2021-06-03 04:03:15     - Verify 30 txins: 0.75ms (0.025ms/txin) [158.68s (0.84ms/blk)]
2021-06-03 04:03:15     - Index writing: 0.12ms [19.80s (0.10ms/blk)]
2021-06-03 04:03:15     - Callbacks: 0.03ms [5.55s (0.03ms/blk)]
2021-06-03 04:03:15   - Connect total: 1.20ms [216.26s (1.14ms/blk)]
2021-06-03 04:03:15   - Flush: 0.04ms [8.06s (0.04ms/blk)]
2021-06-03 04:03:15   - Writing chainstate: 0.02ms [5.75s (0.03ms/blk)]
2021-06-03 04:03:15 Blockpolicy estimates updated by 7 of 7 block txs, since last block 7 of 23 tracked, mempool map size 12, max target 904 from current
2021-06-03 04:03:15 UpdateTip: new best=00000000000191788b865ee58744259675d2ad060f9e7050386a108531aedcac height=189321 version=0xa0000000 log2_work=73.95691 tx=977621 date='2021-06-03 04:03:13' progress=1.000000 cache=11.7MiB(4993txo)
2021-06-03 04:03:15   - Connect postprocess: 0.66ms [16.06s (0.08ms/blk)]
2021-06-03 04:03:15 - Connect block: 1.92ms [259.60s (1.37ms/blk)]
2021-06-03 04:03:15 CTicketBuyer: Skipping purchase: low available balance
Segmentation fault (core dumped)
mharvilla commented 3 years ago

FYI - Following the above comment, I've left the node in its current state without relaunching paicoind in case that would be useful for debugging purposes.

mharvilla commented 3 years ago

FYI - This happened just again. See below.

2021-06-15 01:57:42 received: cmpctblock (348 bytes) peer=12
2021-06-15 01:57:42 Initialized PartiallyDownloadedBlock for block 00000000000767c45b0c5d8ecaad70f00b2f1ebc17e2ac8502d638f6e9ce89e3 using a cmpctblock of size 348
2021-06-15 01:57:42 received: blocktxn (33 bytes) peer=12
2021-06-15 01:57:42 Successfully reconstructed block 00000000000767c45b0c5d8ecaad70f00b2f1ebc17e2ac8502d638f6e9ce89e3 with 1 txn prefilled, 6 txn from mempool (incl at least 0 from extra pool) and 0 txn requested
2021-06-15 01:57:42 CAutoVoter: received NewPoWValidBlock, height=190997, pstake=0x7ff1454005c0
2021-06-15 01:57:42   - Load block from disk: 0.00ms [14.67s]
2021-06-15 01:57:42     - Sanity checks: 0.00ms [6.54s (0.03ms/blk)]
2021-06-15 01:57:42     - Fork checks: 0.22ms [10.37s (0.05ms/blk)]
2021-06-15 01:57:42       - Connect 7 transactions: 0.52ms (0.075ms/tx, 0.021ms/txin) [40.67s (0.21ms/blk)]
2021-06-15 01:57:42     - Verify 25 txins: 0.58ms (0.023ms/txin) [172.26s (0.90ms/blk)]
2021-06-15 01:57:42     - Index writing: 0.12ms [46.07s (0.24ms/blk)]
2021-06-15 01:57:42     - Callbacks: 0.03ms [6.08s (0.03ms/blk)]
2021-06-15 01:57:42   - Connect total: 1.07ms [266.48s (1.39ms/blk)]
2021-06-15 01:57:42   - Flush: 0.03ms [8.87s (0.05ms/blk)]
2021-06-15 01:57:42   - Writing chainstate: 0.02ms [7.54s (0.04ms/blk)]
2021-06-15 01:57:42 Blockpolicy estimates updated by 6 of 6 block txs, since last block 6 of 11 tracked, mempool map size 6, max target 788 from current
2021-06-15 01:57:42 UpdateTip: new best=00000000000767c45b0c5d8ecaad70f00b2f1ebc17e2ac8502d638f6e9ce89e3 height=190997 version=0xa0000000 log2_work=73.956913 tx=997157 date='2021-06-15 01:57:17' progress=1.000000 cache=11.1MiB(334txo)
2021-06-15 01:57:42   - Connect postprocess: 0.44ms [19.15s (0.10ms/blk)]
2021-06-15 01:57:42 - Connect block: 1.56ms [316.71s (1.66ms/blk)]
2021-06-15 01:57:42 CTicketBuyer: Skipping purchase: low available balance
Segmentation fault (core dumped)