When interacting with the Filecoin Calibration network using ipc-cli, transactions often fail with the error: message: minimum expected nonce is 63, got 62. This typically occurs when sending two consecutive transactions.
Cause:
The error is caused by Filecoin changing the behavior of the eth_getTransactionCount endpoint. To get the correct latest nonce, the "pending" block parameter must now be specified: Relevant Lotus PR.
Solution:
ethers-rs currently does not provide a built-in way to set the "pending" parameter for nonce fetching. The recommended workaround is to implement a custom middleware that explicitly sets the "pending" parameter when fetching the nonce.
Issue:
When interacting with the Filecoin Calibration network using ipc-cli, transactions often fail with the error: message: minimum expected nonce is 63, got 62. This typically occurs when sending two consecutive transactions.
Cause:
The error is caused by Filecoin changing the behavior of the eth_getTransactionCount endpoint. To get the correct latest nonce, the "pending" block parameter must now be specified: Relevant Lotus PR.
Solution:
ethers-rs currently does not provide a built-in way to set the "pending" parameter for nonce fetching. The recommended workaround is to implement a custom middleware that explicitly sets the "pending" parameter when fetching the nonce.