5

The full text of the message is :

{code: 1012, message: "Transaction is temporarily banned"}

This would indicate that the transaction is held somewhere in Substrate Runtime mempool or something of that nature, but it is not entirely clear what possible causes can trigger this, and what the eventual outcome might be.

For example,

1) is it that too many transactions have been sent from a given account, IP address or other? Has some threshold been reached?

2) is the transaction actually invalid, or not?

3) The use of the word "temporary" suggests a delay in processing, not an outright rejection of the transaction. Therefore does this suggest that the transaction is valid, but delayed? If so, for how long?

The comments in the substrate runtime core/rpc/src/author/errors.rs and core/transaction-pool/graph/src/errors.rs is no clearer about what is the outcome.

T9b
  • 3,312
  • 5
  • 31
  • 50
  • 1
    I don't know the exact answer but [this](https://github.com/paritytech/substrate/blob/2b43a43dd0dca9a4bb2e3b3253af0e44f71a56ba/core/transaction-pool/graph/src/pool.rs#L128) is where you can start investigating. Stepping back to see what triggers `self.rotator.is_banned(&hash)` to be true should help. – kianenigma Aug 01 '19 at 11:59

1 Answers1

5

In front of the mempool, exists a transaction blacklist, which can trigger this error. Specifically, this error means that a transaction with the same hash was either:

  1. Part of recently mined block
  2. Detected as invalid during block production and removed from the pool.

Additionally, this error can occur when:

  1. The transaction reaches it's longevity, i.e. is not mined for TransactionValidation::longevity blocks after being imported to the pool.

    By default longevity is set to u64::max so this normally should not be the problem.

In any case -ltxpool=log should reveal more details around this error.

A transaction is only temporarily banned because it will be removed from the blacklist when either:

  1. 30 minutes pass
  2. There are more than 4,000 transactions on the blacklist

Check out core/transaction-pool/graph/src/rotator.rs.

Community
  • 1
  • 1
Shawn Tabrizi
  • 12,206
  • 1
  • 38
  • 69
  • how can I use `-ltxpool=log` ? in the command that launches my parachain? – Russo Jul 25 '22 at 04:29
  • Shawn. could you have a look: https://substrate.stackexchange.com/questions/3908/submit-transaction-to-pool-failed-pooltemporarilybanned ? – Russo Jul 25 '22 at 04:41