# internal (/docs/errors/internal)

The chain hit an internal invariant it could not uphold: an arithmetic overflow, an unreachable branch, a storage inconsistency, or a failure in an underlying pallet.

There is usually nothing to fix client-side. retry once in case it was state-dependent; if it persists, report it upstream with the exact chain error name from the diagnostic.

## Remediation [#remediation]

A chain-side invariant failed; nothing to fix client-side — report it if it persists

## Chain errors [#chain-errors]

The exact chain error names (from the extrinsic receipt) that classify to `internal`; the description says what triggered the failure and where to check. Each name has its own page:

| Chain error                                                                                       | Description                                                                                                                                                                                                                                                                         |
| ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`AnnouncementDepositInvariantViolated`](/docs/errors/chain/AnnouncementDepositInvariantViolated) | Internal invariant failure in `announce`: recomputing the announcement deposit returned nothing after the pending announcements were updated. Inspect the caller's `Announcements` entry and the announcement deposit constants; this indicates a pallet bug rather than bad input. |
| [`ArithmeticOverflow`](/docs/errors/chain/ArithmeticOverflow)                                     | Converting a TAO amount to alpha during batched order execution overflowed the fixed-point range, typically when the pool price is tiny relative to the batch's total buy TAO. Check the subnet's current alpha price against the batch's aggregate buy amounts.                    |
| [`ContractReverted`](/docs/errors/chain/ContractReverted)                                         | The contract ran to completion but returned with the REVERT flag set, rolling back its state changes; only extrinsics surface this as an error. Dry-run the call via RPC and decode the returned output data for the contract's error value.                                        |
| [`ContractTrapped`](/docs/errors/chain/ContractTrapped)                                           | The contract aborted with a WASM trap, e.g. a panic, unreachable instruction, or memory violation, instead of returning normally. Dry-run the call with debug messages enabled and check the input data against the contract's expectations.                                        |
| [`CurrencyError`](/docs/errors/chain/CurrencyError)                                               | A balance hold, release, or burn inside pallet-safe-mode failed while managing an enter/extend deposit. Check the account's free balance and existing holds under the safe-mode `EnterOrExtend` hold reason.                                                                        |
| [`DrandConnectionFailure`](/docs/errors/chain/DrandConnectionFailure)                             | Declared for failures reaching the drand HTTP API, but pulse fetching happens in the offchain worker, which logs errors instead of raising this. Check the node's offchain worker logs and outbound connectivity to the drand endpoints.                                            |
| [`FailedToSchedule`](/docs/errors/chain/FailedToSchedule)                                         | The scheduler could not place the call into the agenda, typically because the target block's agenda is full or the schedule parameters are unusable. Check `Agenda` at the target block against `MaxScheduledPerBlock` and pick a different block if it is saturated.               |
| [`FeeOverflow`](/docs/errors/chain/FeeOverflow)                                                   | Fee arithmetic overflowed, either multiplying the fee per gas by `gas_limit` or converting the EVM fee into Substrate balance decimals. Check for absurdly large `gas_limit` or fee-per-gas values in the transaction.                                                              |
| [`Overflow`](/docs/errors/chain/Overflow)                                                         | A checked arithmetic operation overflowed, e.g. incrementing `NextSubnetLeaseId` when registering a leased network, or adding to a crowdloan's `raised` amount or contributor count. Internal guard; inspect the amounts involved as this should not occur with realistic values.   |
| [`PaymentOverflow`](/docs/errors/chain/PaymentOverflow)                                           | Arithmetic overflowed while computing the total payment or refund for an EVM transaction, such as refunding remaining gas at the effective gas price. Check for extreme gas price or gas limit values in the transaction.                                                           |
| [`Reentrancy`](/docs/errors/chain/Reentrancy)                                                     | EVM execution re-entered the pallet while another EVM execution was already in progress on the same thread, e.g. a precompile or runtime call dispatching back into the EVM. Inspect precompiles and runtime code that invoke the EVM from within an EVM call.                      |
| [`StorageOverflow`](/docs/errors/chain/StorageOverflow)                                           | Template leftover in the drand pallet for a counter increment overflowing `u32::MAX`; no current code path raises it. If seen, inspect the drand pallet's stored counters for values near the u32 limit.                                                                            |
| [`TerminatedInConstructor`](/docs/errors/chain/TerminatedInConstructor)                           | The contract called `seal_terminate` inside its constructor, self-destructing during instantiation, which is forbidden. Inspect the constructor logic; termination is only allowed in regular message calls.                                                                        |
| [`UidMapCouldNotBeCleared`](/docs/errors/chain/UidMapCouldNotBeCleared)                           | During a UID reshuffle or trim, clearing the subnet's `Uids` map left residual entries (the storage clear returned a cursor). Internal state inconsistency rather than a caller error; inspect the `Uids` storage for the netuid and report it.                                     |
| [`Undefined`](/docs/errors/chain/Undefined)                                                       | Catch-all EVM validation error for cases without a dedicated variant, such as a malformed EIP-7702 authorization list or an unknown validation failure. Inspect the raw transaction for unsupported fields and check the node logs.                                                 |
| [`Underflow`](/docs/errors/chain/Underflow)                                                       | A checked subtraction underflowed in crowdloan accounting, e.g. `raised` exceeding `cap` when computing remaining room, or a contributor count decrement, indicating inconsistent state. Inspect the `Crowdloans` and `Contributions` entries for the `crowdloan_id`.               |
| [`UnexpectedUnreserveLeftover`](/docs/errors/chain/UnexpectedUnreserveLeftover)                   | While lowering a commitment deposit, `Currency::unreserve` failed to return the full difference, leaving a leftover, which signals an internal inconsistency. Check the account's reserved balance against the deposit recorded in `CommitmentOf`.                                  |
| [`Unreachable`](/docs/errors/chain/Unreachable)                                                   | `announce_next_key` could not identify the current block author via the `FindAuthors` lookup, which should be impossible in a normally authored block. Check the block's author digest and the shield pallet's authorship wiring.                                                   |

The same explanation is available in the terminal: `btcli explain internal` (or `btcli explain <ChainErrorName>` for one exact chain error).
