question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:7
  • Comments:28 (2 by maintainers)

github_iconTop GitHub Comments

23reactions
mariano54commented, May 6, 2021

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

11reactions
Cheshyrcommented, May 6, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Full Node WARNING: Wasn't able to add transaction id - Reddit
On farmer device in debug log we have following erros: Err. Mempool_NOT_INITIALIZED. Err. DOUBLE_SPEND. Err. MEMPOOL_CONFLICT. PLUS in log we ...
Read more >
Warning Wasn't able to add transaction with id in logs - Support
hi. i have been farming for a week and no luck on earning any chia yet. so i did some research and happen...
Read more >
1.1.3 Chia Blockchain 2021-05-01
We fixed an issue where the last block wasn't fetched by the GUI. There was an edge case with full node store that...
Read more >
How to harvest on other machines that are not your main ...
When creating plots on the other harvesters, usechia plots create -f ... The best way to see if it's working is shut down...
Read more >
chia-blockchain Changelog - pyup.io
Increased the priority of wallet transactions vs full node broadcasted ... Thanks dkackman for adding the ability to collect the IDs of plots...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found