Truffle tests running on ganache often issue an evm_revert to roll back to an earlier clean state. This causes issues with nonce management on the relayer, which tracks its own nonce, and falls out of sync with that of ganache.
relayTransaction: the tx doesn't have the correct nonce.
account has nonce of: 7 tx has nonce of: 9
We could add a flag -SkipNonceCaching to disable this behaviour on the relayer, so it plays nicely with testing environments. It would change the following logic, to always use the nonce obtained from the node, instead of the cached one if it is larger.
Truffle tests running on ganache often issue an
evm_revert
to roll back to an earlier clean state. This causes issues with nonce management on the relayer, which tracks its own nonce, and falls out of sync with that of ganache.We could add a flag
-SkipNonceCaching
to disable this behaviour on the relayer, so it plays nicely with testing environments. It would change the following logic, to always use the nonce obtained from the node, instead of the cached one if it is larger.https://github.com/tabookey/tabookey-gasless/blob/198c76f16a06dd06219ca55481ee77cfd551377c/server/src/librelay/relay_server.go#L720-L724