Actions

Node-stuck-on-nonce

From Chainlink Community Wiki

Revision as of 20:44, 6 January 2023 by Devtrace (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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