1

The following 2 extrinsics :

were included in the blockchain, that shows that a transaction with exact same input parameters including the signature was executed twice. Why did this happened ?

1 Answer 1

1

This is the typical case of replaying an immortal transaction since both mentioned extrinsics have an immortal lifetime.

immortal lifetime

Here are the steps that allowed this to happen :

The first extrinsic 10995944-2 was executed and it resulted in :

  • Transferring successfully 4.98 DOT from the Sender to the Destination account as expected
  • However, the amount that was withdrawn from the Sender account caused the balance of the account to drop below the existential deposit
  • This resulted in the Sender account being reaped ( wiki-existential deposit & ED - reaping)
  • Which implied that the nonce of the account was restarted to 0

If an account drops below the ED, it will be reaped, i.e. completely removed from storage and the nonce reset.

What happened in the meantime (before we see the second extrinsic executed hence the same transaction executed again) is extrinsic 10996030-3 during which :

  • The reaped account was funded again with 999.78 DOT
  • So it became again active with nonce equals 0.

Hence the second extrinsic 10996284-2 could be validly submitted to the blockchain again.

This is an expected behavior since the nonce set in the extrinsic is again valid respect to the state of the blockchain. However this can be mitigated by submitting mortal transactions as it is recommended in the wiki-transaction mortality :

NOTE: If an account is reaped and a user re-funds the account, then they could replay an immortal transaction. Always default to using a mortal extrinsic.

Credits to the team that reported the case & Joe & Iker that provided extensive explanations to the team.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.