Search code examples
hyperledger-sawtooth

Why is the log >>WARNING core] Invalid Transaction Verb is "set", but already exists << keeps getting printed AGAIN and AGAIN, infinitely?


Running multi-node (5 nodes) Sawtooth network using Docker (Mac OS).

Initially set value for a key named MyKey using command intkey set.

Re-attempted issuing command 'intkey set' for the SAME key name 'MyKey':

myMac:~ admin$ docker exec -it sawtooth-shell-default bash
root@82dd3a1a90b2:/# 
root@82dd3a1a90b2:/# 
root@82dd3a1a90b2:/# intkey show --url http://sawtooth-rest-api-default-0:8008 MyKey
MyKey: 999
root@82dd3a1a90b2:/# 
root@82dd3a1a90b2:/# 
root@82dd3a1a90b2:/# intkey set --url http://sawtooth-rest-api-default-0:8008 MyKey 900
{
  "link": "http://sawtooth-rest-api-default-0:8008/batch_statuses?id=9d18d1e1ca1b320457fb7b326adb6aa590a5d3af8f3f45c825151a58458f1b4e49b9f1f8898ad07a59478365ac97f5fbe59522d2794f83ab36aa6fdd622dd3c3"
}
root@82dd3a1a90b2:/# 

As a result, the BELOW WARNING keeps pouring in the terminal-console, forever, until I pressed Ctrl+C.

sawtooth-intkey-tp-python-default-1 | [2019-07-09 05:45:33.323 WARNING  core] Invalid Transaction Verb is "set", but already exists: Name: MyKey, Value 999
...
...
...
Transaction Verb is "set", but already exists: Name: MyKey, Value 999
sawtooth-intkey-tp-python-default-3 | [2019-07-09 05:51:24.439 WARNING  core] Invalid Transaction Verb is "set", but already exists: Name: MyKey, Value 999
sawtooth-intkey-tp-python-default-1 | [2019-07-09 05:51:24.805 WARNING  core] Invalid Transaction Verb is "set", but already exists: Name: MyKey, Value 999
...
...about 1700+ entries in total...until I pressed Ctrl+C.

Solution

  • Re-attempting to "set" value for the same key makes it an invalid transaction based on the IntKey transaction family logic.

    Ideally, it should show the Invalid Transaction error only once and continue accepting new transactions. The reason that the invalid transaction error is showing more than once is (probably) because of a bug in the latest 1.1 version of Sawtooth, where Invalid Transactions are not taken out of the queue (or pool) and reattempted to be run again (like an Internal Error), causing it to keep on failing and showing you that error.

    There was a fix done for this problem. So this would be resolved soon in newer versions.