chia-blockchain: [BUG] full_node chia.full_node.full_node: WARNING Wasn't able to add transaction with id

beeing spamed in the debug.log file of chia with following output:

2021-05-02T15:46:09.100 full_node chia.full_node.full_node: ERROR    Respond peers exception: . Traceback: Traceback (most recent call last):
  File "/INSTALL/chia-blockchain/chia/server/node_discovery.py", line 507, in respond_peers
    await self._respond_peers_common(request, peer_src, is_full_node)
  File "/INSTALL/chia-blockchain/chia/server/node_discovery.py", line 397, in _respond_peers_common
    await self.address_manager.add_to_new_table(peers_adjusted_timestamp, peer_src, 2 * 60 * 60)
  File "/INSTALL/chia-blockchain/chia/server/address_manager.py", line 602, in add_to_new_table
    async with self.lock:
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 92, in __aenter__
    await self.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 192, in acquire
    await fut
concurrent.futures._base.CancelledError

2021-05-02T15:46:09.100 full_node chia.full_node.full_node: ERROR    Respond peers exception: . Traceback: Traceback (most recent call last):
  File "/INSTALL/chia-blockchain/chia/server/node_discovery.py", line 507, in respond_peers
    await self._respond_peers_common(request, peer_src, is_full_node)
  File "/INSTALL/chia-blockchain/chia/server/node_discovery.py", line 397, in _respond_peers_common
    await self.address_manager.add_to_new_table(peers_adjusted_timestamp, peer_src, 2 * 60 * 60)
  File "/INSTALL/chia-blockchain/chia/server/address_manager.py", line 602, in add_to_new_table
    async with self.lock:
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 92, in __aenter__
    await self.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 192, in acquire
    await fut
concurrent.futures._base.CancelledError

2021-05-03T04:49:00.350 full_node chia.full_node.full_node: WARNING  Do not have sub slot XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2021-05-03T22:11:36.894 full_node chia.full_node.full_node: WARNING  Wasn't able to add transaction with id XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, status 3 error: Err.UNKNOWN_UNSPENT
2021-05-04T01:22:35.726 full_node full_node_server        : ERROR    Exception: Failed to fetch block 226703 from {'host': '128.74.211.53', 'port': 8444}, timed out, {'host': '128.74.211.53', 'port': 8444}. Traceback (most recent call last):
  File "/INSTALL/chia-blockchain/chia/server/server.py", line 521, in wrapped_coroutine
    result = await coroutine
  File "/INSTALL/chia-blockchain/chia/full_node/full_node_api.py", line 104, in new_peak
    return await self.full_node.new_peak(request, peer)
  File "/INSTALL/chia-blockchain/chia/full_node/full_node.py", line 361, in new_peak
    peer, curr_peak_height, request.height, request.unfinished_reward_block_hash
  File "/INSTALL/chia-blockchain/chia/full_node/full_node.py", line 310, in short_sync_backtrack
    raise e
  File "/INSTALL/chia-blockchain/chia/full_node/full_node.py", line 295, in short_sync_backtrack
    raise ValueError(f"Failed to fetch block {curr_height} from {peer.get_peer_info()}, timed out")
ValueError: Failed to fetch block XXXXX from {'host': '128.74.211.53', 'port': 8444}, timed out

2021-05-04T01:22:35.730 full_node full_node_server        : ERROR    Exception: Failed to fetch block XXXXXX from {'host': '128.74.211.53', 'port': 8444}, timed out <class 'ValueError'>, closing connection {'host': '128.74.211.53', 'port': 8444}. Traceback (most recent call last):
  File "/INSTALL/chia-blockchain/chia/server/server.py", line 531, in api_call
    response: Optional[Message] = await asyncio.wait_for(wrapped_coroutine(), timeout=timeout)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 414, in wait_for
    return await fut
  File "/INSTALL/chia-blockchain/chia/server/server.py", line 528, in wrapped_coroutine
    raise e
  File "/INSTALL/chia-blockchain/chia/server/server.py", line 521, in wrapped_coroutine
    result = await coroutine
  File "/INSTALL/chia-blockchain/chia/full_node/full_node_api.py", line 104, in new_peak
    return await self.full_node.new_peak(request, peer)
  File "/INSTALL/chia-blockchain/chia/full_node/full_node.py", line 361, in new_peak
    peer, curr_peak_height, request.height, request.unfinished_reward_block_hash
  File "/INSTALL/chia-blockchain/chia/full_node/full_node.py", line 310, in short_sync_backtrack
    raise e
  File "/INSTALL/chia-blockchain/chia/full_node/full_node.py", line 295, in short_sync_backtrack
    raise ValueError(f"Failed to fetch block {curr_height} from {peer.get_peer_info()}, timed out")
ValueError: Failed to fetch block XXXXXX from {'host': '128.74.211.53', 'port': 8444}, timed out

2021-05-04T01:22:35.731 full_node full_node_server        : WARNING  Banning 128.74.211.53 for 10 seconds
2021-05-04T03:39:10.556 full_node chia.full_node.full_node: WARNING  Wasn't able to add transaction with id XXXXXXXXXXXXX, status 3 error: Err.UNKNOWN_UNSPENT

Based on the GUI everything is synced and working.

Does this BUG impact the block wins / chia wins?

Thanks.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 7
  • Comments: 28 (3 by maintainers)

Most upvoted comments

MEMPOOL_NOT_INITIALIZED happens when you are just starting up your node. If you are still seeing this, restart the node.

I will explain why DOUBLE_SPEND is printed. Let’s say you have transactions A, B and C in the mempool. The mempool is where you keep transactions that people send, but have not been included in a block yet.

Let’s say you then get a new block, which includes transactions B and C. What do we do with the mempool? We create a new mempool, and try to add all transactions to it. When we add tx A, it validates with no problem. However when we try to add transactions B and C, they are no longer valid because they are trying to spend coins which have already been spent. Those transactions are conflicting with the same transactions that just got included. So that is how we clear the mempool from old transactions.

There are some differences with chia and other coins, because any 2 transactions can be combined. It’s possible that the block did not include B and C, but it included another transaction X, which is a combination of multiple transactions (BCD) for example. So in this case, transaction B was never included on chain, but a conflicting transaction was. So B is now considered a “double spend” and is no longer valid. So this is how we filter out things from the mempool when we get a new block: we just try adding them all again one by one.

We can remove these warnings so there is less confusion

Thank you for clarifying. I think some of this might be specific to the error level evoked. If this is normal operation, then perhaps it is INFO, not WARNING. When I see a warning, I assume I need to do something about it. I suspect this is similar for other people

Hey @vicentemangas,

check this out: full_node.py

Log level has been changed to from warning to debug: self.log.debug( f"Wasn't able to add transaction with id {spend_name}, " f"status {status} error: {error}" )

So this should be fixed in the next version.

regards muffexx

Thank you for clarifying. I think some of this might be specific to the error level evoked. If this is normal operation, then perhaps it is INFO, not WARNING. When I see a warning, I assume I need to do something about it. I suspect this is similar for other people

Support the proposal. This message is a false positive, which confuses.