#How to debug failing TX

9 messages · Page 1 of 1 (latest)

spark steeple
thorn thistle
#

I also faced this issue a lot initially. lot of time it was just berkeley network issue that didn't had anything to do with code.
Then I started using lightnet network for development phase. That proved really helpful.
Also If txn succeeds on lightnet network but fails on berkeley, then I'm pretty sure its some network issue.

cobalt dew
#

tx.prove is about creating a valid proof, but the transaction failing is about verifying the proof. Usually when debugging a tx, I find the error messages helpful, but in this case, "Canceled" is not that helpful. I thought maybe another transaction with the same nonce was accepted or something like that, but that doesn't seem to be the case.

potent topaz
#

@cobalt dew i think there are 4 AUs, 3x cancel and 1x fee excess. That means the amount of newly created accounts in the tx doesnt add up with the overall balance change - notice the one AU with -1 $MINA

cobalt dew
#

I am wondering if the fee excess is because the first account update (canceled) was supposed to decrement 1 Mina, then the 4th AU (invalid fee excess) i not valid because the other AU didn't complete. I usually follow order by index when debugging these. Do you know if order matters or not?

potent topaz
#

i believe the order of processing must match the proof commitment to the AU hashlist, so order matters

wispy robin
#

The "canceled" ones can be ignored - they are because of failures on other AUs

#

@spark steeple transaction failures where the proof succeeded means they are rejected by the node, because they're not following the protocol in some way. For example, sending more money than you have or missing a required fee (and countless others)

#

@spark steeple another tip for debugging - make your entire transaction flow work with LocalBlockchain first. If you debug by sending txs to the testnet you'll go crazy waiting