Skip to content

Debug.log file Flooding (low impact) #71

@MarcelusCH

Description

@MarcelusCH

By the node version 2.0.7-10 we added the possibility to add an OP code with an Hex encoded string in the transactions that also give an unexpected output format if it is used. This unexpected output format is OP_RETURN _<HEX-STRING>_ .

This was added in the Raw Transaction class:

if (name_ == "data") {

An example of the Raw DATA can be found in this transaction :
https://explorer.btcz.app/tx/b8b29ff7f76e40d01990fad1a8d51d830a66c9f533c3b1768f78fcaf26888ef4

Now, when the Insight option is activated, the node try to find the spent index information about this OP_RETURN code that are not existing as the spent amount is zero (0). And this trigger an error in the debug.log file for each Raw DATA.

Error in the log file for Insight : ERROR: Unable to get spent index information
Triggered here:

return error("Unable to get spent index information");

Also a similar error happen in the wallet functions.
Error for the Wallet functions : CWalletTx::GetAmounts: Unknown transaction type found, txid <The_TX_ID>
Triggered here:

LogPrintf("CWalletTx::GetAmounts: Unknown transaction type found, txid %s\n",

After some time, the log is flooded by this badly returned error information's !

The solution is to check if the output is encoded as usually, with an OP_DUP OP_HASH160 scriptPubKey, or with an Raw DATA field with OP_RETURN . This should be done before calling the function that trigger the error. A check could also be done just before the error is triggered but I guess this will probably have an affect on the performance.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions