stratisproject / StratisBitcoinFullNode

Bitcoin full node in C#
https://stratisplatform.com
MIT License
788 stars 312 forks source link

Mempool Conflict With Multiple Txs in Same Block #4187

Open mrtpain opened 4 years ago

mrtpain commented 4 years ago

Calling multiple smart contracts in the same block from the same wallet often returns txn-mempool-conflict.

Running with Cirrus in Testnet using release/3.0.8.0 branch.

ERROR: Stratis.Bitcoin.Features.SmartContracts.Wallet.SmartContractWalletController.Call Exception occurred: txn-mempool-conflict

To Recreate: Just make 2 contract calls in the same block from the same wallet, more likely than not you'll receive the error. Calls can be creating a contract or calling methods on existing contracts.

Debugging in VS stack trace:

   at Stratis.Bitcoin.Features.MemoryPool.MempoolValidationState.Throw() in /Users/tylerpena/dev/Stratis/StratisBitcoinFullNode/src/Stratis.Bitcoin.Features.MemoryPool/MempoolValidationContext.cs:line 124
   at Stratis.Bitcoin.Features.MemoryPool.Rules.CheckConflictsMempoolRule.CheckTransaction(MempoolValidationContext context) in /Users/tylerpena/dev/Stratis/StratisBitcoinFullNode/src/Stratis.Bitcoin.Features.MemoryPool/Rules/CheckConflictsMempoolRule.cs:line 64
   at Stratis.Bitcoin.Features.MemoryPool.MempoolValidator.<>c__DisplayClass34_0.<AcceptToMemoryPoolWorkerAsync>b__0() in /Users/tylerpena/dev/Stratis/StratisBitcoinFullNode/src/Stratis.Bitcoin.Features.MemoryPool/MempoolValidator.cs:line 328
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)