Actions

Node-stuck-on-nonce: Difference between revisions

From Chainlink Community Wiki

No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 16: Line 16:
** You can view the account address of your node in an explorer and see which nonce was used for the most recent successful transaction.  You'll increment this by one for the desired value.
** You can view the account address of your node in an explorer and see which nonce was used for the most recent successful transaction.  You'll increment this by one for the desired value.
* Stop your Chainlink node
* Stop your Chainlink node
* Backup your database
* Backup your database
** <code>pg_dump --user $USERNAME --host $HOSTNAME.OR.IP $DB_NAME > postgres_backup.sql</code>
** <code>pg_dump --user $USERNAME --host $HOSTNAME.OR.IP $DB_NAME > postgres_backup.sql</code>
* Connect to your database
* Connect to your database
** <code>psql --user $USERNAME --host $HOSTNAME.OR.IP</code>
** <code>psql --user $USERNAME --host $HOSTNAME.OR.IP</code>
* Connect to the relevant database
* Connect to the relevant database
** <code>/c $DATBASE_NAME<code>
** <code>\c $DATBASE_NAME</code>
 
* Set the correct nonce
* Set the correct nonce
** <code>UPDATE evm_key_states SET next_nonce='$THE_CORRECT_NEXT_NONCE' WHERE disabled='f';</code>
** <code>UPDATE evm_key_states SET next_nonce='$THE_CORRECT_NEXT_NONCE' WHERE disabled='f';</code>
* Add the following to your chainlink nodes environment variables: <code>ETH_NONCE_AUTO_SYNC=false</code>
* Add the following to your chainlink nodes environment variables: <code>ETH_NONCE_AUTO_SYNC=false</code>
* Redeploy your Chainlink node
* Redeploy your Chainlink node

Latest revision as of 20:44, 6 January 2023

If your node is stuck attempting to submit transactions for a nonce that has already been used, this page will walk you through resolving this issue.


Using the Chainlink Web UI

  • Navigate to the Key Management page under the gear icon
  • Click on 'Admin' next to the relevant Chain Account
    • make sure that 'Enabled' is checked
    • In the empty field next to, "Next nonce manual override (optional) enter the desired nonce
      • If in doubt, view the address on an explorer and see what the nonce is for the most recent transcation. Increment this by one and this is the value to enter.
    • If you'd like, and if you're confident, you can check the box for 'Abandon all current transactions'

Edit the Database Directly

If you're having issues with the Web UI, or prefer this route, please see steps below.

  • Find the nonce your node should be submitting on
    • You can view the account address of your node in an explorer and see which nonce was used for the most recent successful transaction. You'll increment this by one for the desired value.
  • Stop your Chainlink node
  • Backup your database
    • pg_dump --user $USERNAME --host $HOSTNAME.OR.IP $DB_NAME > postgres_backup.sql
  • Connect to your database
    • psql --user $USERNAME --host $HOSTNAME.OR.IP
  • Connect to the relevant database
    • \c $DATBASE_NAME
  • Set the correct nonce
    • UPDATE evm_key_states SET next_nonce='$THE_CORRECT_NEXT_NONCE' WHERE disabled='f';
  • Add the following to your chainlink nodes environment variables: ETH_NONCE_AUTO_SYNC=false
  • Redeploy your Chainlink node