foundry: bug(`anvil`): block mining misses ready transactions

Component

Anvil

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

1.0.0-stable, also reproducible in master:HEAD

What version of Foundryup are you on?

1.0.0-stable, also reproducible in master:HEAD

What command(s) is the bug in?

anvil

Operating System

macOS (Apple Silicon)

Describe the bug

We are hitting a bug with anvil in our Test suite (https://github.com/xmtp/xmtpd/issues/643).

The test creates 30 concurrent transactions from the same private wallet. We use a SQL-based nonce-manager that guarantees the issuance of unique nonces. Anvil won’t necessarily see all transactions sorted by their nonce. The private key is the first anvil funded wallet.

In this environment, there are no other transactions and no other wallets.

In some cases, the test will block because anvil never puts some of the transactions into a block.

Using tx_pool_inspect, we see that some of the transactions are stuck in the pending state, which in anvil internals corresponds to self.pool.ready_transactions().

We can work around this blockage, by either switching to mixed-mining or interval mining. It is only reproducible in the auto mode.

It is also reproducible in the Rust debugger in master:HEAD.

There are no useful anvil logs I could share even with RUST_LOG trace for node and txpool. The following log is from our test suite:

    blockchainPublisher_test.go:215: Errors encountered:
        timed out waiting for transaction 0xfa727b95a33a21ebb6ff05252ba86c5e0b6c78220d50ae319b6466f1458fad77
        timed out waiting for transaction 0x9d73840377b26ec22d2c0f7aaed14b56b40eed15e2afdd044ae260ed22887431
        timed out waiting for transaction 0xbb64d042ba58447a775b6e44a658fffac769a3770ffd0c32e86213a0c75887de
        timed out waiting for transaction 0xb0ebcca5ba3295e3145fa7facfa3f91def535b295f222eecec4bc95a3c029d59
        timed out waiting for transaction 0x55544793964b6c181177414d733cd9960b184ddf3b0de323f7abd5f54616f4a6
        timed out waiting for transaction 0x7959fdf9e94de0898404f9f042cb7a65bdc28eca52421aba7a8f3bf04a768777
        timed out waiting for transaction 0x82e44db65a7cab2c4589649efb69e3e870b5db2e9ac731569d3b3fd99550e260
        timed out waiting for transaction 0xc499f55d062a48a9462f10f78e5d8ff5ddfdd8e419ecff1fdc638abd8acc7694
        timed out waiting for transaction 0x770dd28167c278abf6478ab25df760db629cecbd6d5e3a459cfae506a100b72a
        timed out waiting for transaction 0x92dd75c6758c759328f1ced8d41894b2563e2265c7337e13c45760e07d5ef5cc
        timed out waiting for transaction 0x46998d0a570ac2d8f62fa2934596f3693e569d9f89feab04655a6588cb07a5c3
        timed out waiting for transaction 0xcbf01dfed1bbe6a9320a7f2a72072908b056ecb42e9b417408596b8b9e7b9b7c
        timed out waiting for transaction 0xcebbb501f51319756501ffc6f56413d43d770879793b390b93bc2a7504463e2a
        timed out waiting for transaction 0xb5c951e85374ef8d42fdda525a33ce007c9680b54f7c6eecff3d05b3ffcb50c4
        timed out waiting for transaction 0xe8c91c527030d10fb8565a6f09fbb4e07424cc4c4d648da91ca6d4aa3f8509bd
        timed out waiting for transaction 0x7697ebeed5cba0f1858b1922ebcadd9923e1410d6809e9f4a8010b9e5c39ea24
    blockchain.go:25: Failed test. Logging transactions...
    blockchain.go:106: πŸ”Ή Fetching transactions from block 0 to 7...
        πŸ“Œ Block 0 (Hash: 0x3f83e3f04c5969984283a3f4451c2764c9c3137ad4781f4edf2b54f0a3a8ef9b) - Transactions: 0
        πŸ“Œ Block 1 (Hash: 0x705379186cf2f346761c80441cdc8aa14ffe2fb624d4bc7323a0e43d6ee1d449) - Transactions: 1
          Tx 0xd9107dfe761ea9f267ddc229cfe280c2720ddd384cc48167e5e1fbeefdc0cb3c: Mined in Block 1 (Status: Success, Nonce: 0)
        πŸ“Œ Block 2 (Hash: 0x630122c94e9b285670259f5eac710116a84c3beec5a9c15afd0dee35797242a7) - Transactions: 1
          Tx 0x6792b87f2a26bc7b66b5f74da46b0d556cb963ce860c664fa842cb94fe43a913: Mined in Block 2 (Status: Success, Nonce: 1)
        πŸ“Œ Block 3 (Hash: 0x6628860c0783f4282ddac22a0b1a1558793cc8e683849eeaa2d27c0c8a5cc9dc) - Transactions: 1
          Tx 0x07cc0cf101b5ea47790ab408dbf1ba78c874ad4123fa91b0043578cbc747a2af: Mined in Block 3 (Status: Success, Nonce: 2)
        πŸ“Œ Block 4 (Hash: 0x1d8205e5bd8252266eb47216216c60b28abc5bb4ee4d1309f7f4e7ab1107fe33) - Transactions: 1
          Tx 0x0ca3db4b53c9488677f0e6a1e1021daf0fe374b8ee4022ddec8d6e0d6c3eec97: Mined in Block 4 (Status: Success, Nonce: 3)
        πŸ“Œ Block 5 (Hash: 0xca2d4566200ee7efa600fe2da2242e61ea57188ed38a0ae670d0afdbf9ddf1d8) - Transactions: 1
          Tx 0x0da6aef3226aa8b8cb806a59c4690ad3d77ce6f0668fd14d7e5af76fbf845d51: Mined in Block 5 (Status: Success, Nonce: 4)
        πŸ“Œ Block 6 (Hash: 0xb60d9d4f3a261194b7821d100fb03cf97870c8ae06fe51d35acfe6ab96a8b35a) - Transactions: 5
          Tx 0xce5543045b09ba3c4ac550c087fa59b421dfb2438805ae60bc38b2e92920602d: Mined in Block 6 (Status: Success, Nonce: 5)
          Tx 0x4b59154be11ee87db4f6407aa01bad676faca115522b4df9d9de2842ae56ab35: Mined in Block 6 (Status: Success, Nonce: 6)
          Tx 0xa8fca24cbee990ea22ab2645fec5c7d0e5d0c407662256d25f558c798abbf9ef: Mined in Block 6 (Status: Success, Nonce: 7)
          Tx 0x92ab1d23c79b25ddd0518a9d81e68e8bb03bcbff56070c09e1c3f770330e1528: Mined in Block 6 (Status: Success, Nonce: 8)
          Tx 0xe359698d2114757968ce66297f77c0f2c7be7fe07822bf3e3114322bd73c3692: Mined in Block 6 (Status: Success, Nonce: 9)
        πŸ“Œ Block 7 (Hash: 0xd0ceac63a41850026110147d909f25e10c7f1ae9016c1abe8399b9ebb039fadf) - Transactions: 9
          Tx 0x505d423117b77a359b191676b289b310a7443aa2917c170ec373f44f61ae8b4b: Mined in Block 7 (Status: Success, Nonce: 10)
          Tx 0xa41d444227659d0cf0380c77fd9c44595c34b4c6d2ad12351761a25cc1b80c61: Mined in Block 7 (Status: Success, Nonce: 11)
          Tx 0xab6cd8e86dbedb06d972fdc6c500f075e7d5093eac3bafecf620a099d7f7e043: Mined in Block 7 (Status: Success, Nonce: 12)
          Tx 0xb72ceac0e55d813760c059a286faa0d64da551739ee0bbd5ca9850a202e8e77a: Mined in Block 7 (Status: Success, Nonce: 13)
          Tx 0xe478821a1a4ec6db41a1a3680aa12c15fa37c717a599d9e701dacfe933648770: Mined in Block 7 (Status: Success, Nonce: 14)
          Tx 0xfb7445c1f7b2552c899a894740dfa711c5758416b8cdff2de4d1ff50fb4ec5f1: Mined in Block 7 (Status: Success, Nonce: 15)
          Tx 0x194fdc34242693e80f83a5eb272e92e727a6f7f9bcd48b2a4403a6a6c5560f47: Mined in Block 7 (Status: Success, Nonce: 16)
          Tx 0xbcd9910f616a5ba8ffc87683bbe650a895fb7f85b0d812d3295946621fac8e3e: Mined in Block 7 (Status: Success, Nonce: 17)
          Tx 0x434b623496690547c04e40db0f55dd5ed79975f9e332c9478b9b6a4384f7491e: Mined in Block 7 (Status: Success, Nonce: 18)
        πŸ”Ή Fetching pending transactions...
        No transactions pending.
    blockchain.go:243: 
        πŸ”Ή Mempool Status: Pending: 0x0 | Queued: 0x10
        
        πŸ”Ή Mempool Inspection:From: pending
          Nonce: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 -> map[19:0xe7f1725e7734ce288f8367e1bb143e90bb3f0512: 0 wei + 55681 gas Γ— 2252253562 wei 20:0xe7f1725e7734ce288f8367e1bb143e90bb3f0512: 0 wei + 38557 gas Γ— 2252253562 wei 21:0xe7f1725e7734ce288f8367e1bb143e90bb3f0512: 0 wei + 38569 gas Γ— 2252253562 wei 22:0xe7f1725e7734ce288f8367e1bb143e90bb3f0512: 0 wei + 55669 gas Γ— 2252253562 wei 23:0xe7f1725e7734ce288f8367e1bb143e90bb3f0512: 0 wei + 55681 gas Γ— 2252253562 wei 24:0xe7f1725e7734ce288f8367e1bb143e90bb3f0512: 0 wei + 55681 gas Γ— 2252253562 wei 25:0xe7f1725e7734ce288f8367e1bb143e90bb3f0512: 0 wei + 55681 gas Γ— 2252253562 wei 26:0xe7f1725e7734ce288f8367e1bb143e90bb3f0512: 0 wei + 55657 gas Γ— 2252253562 wei 27:0xe7f1725e7734ce288f8367e1bb143e90bb3f0512: 0 wei + 38569 gas Γ— 2252253562 wei 28:0xe7f1725e7734ce288f8367e1bb143e90bb3f0512: 0 wei + 55645 gas Γ— 2252253562 wei 29:0xe7f1725e7734ce288f8367e1bb143e90bb3f0512: 0 wei + 55681 gas Γ— 2252253562 wei 30:0xe7f1725e7734ce288f8367e1bb143e90bb3f0512: 0 wei + 55681 gas Γ— 2252253562 wei 31:0xe7f1725e7734ce288f8367e1bb143e90bb3f0512: 0 wei + 38581 gas Γ— 2252253562 wei 32:0xe7f1725e7734ce288f8367e1bb143e90bb3f0512: 0 wei + 55681 gas Γ— 2252253562 wei 33:0xe7f1725e7734ce288f8367e1bb143e90bb3f0512: 0 wei + 55681 gas Γ— 2252253562 wei 34:0xe7f1725e7734ce288f8367e1bb143e90bb3f0512: 0 wei + 55681 gas Γ— 2252253562 wei]
        From: queued
        
        πŸ”Ή Detailed Mempool Transactions:
        πŸ“Œ Pending Transactions:
        From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
          Nonce: 23
          {
            "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
            "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
            "gas": "0xd981",
            "gasPrice": "0x863ea97a",
            "value": "0x0",
            "nonce": "0x17",
            "input": "0x4dff26b55132637b7ab49fd00ffa78aaf9a906192cc0a6f1c74a5fe1f1169c7543930d8000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000064ce8849a56d7ac9717f68c1c0e821c716b68c58750e8b6e690f8ecbe7eb1813a61f71cd34fb41e8c87c23fba422f409fa2c35dd6878a7eb79ea670657a1ffcc763422b7a103cbb4622035cf465b3159e6fbaff03bc0674dd7f7262963a366673bb57d2d1500000000000000000000000000000000000000000000000000000000"
          }
          Nonce: 30
          {
            "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
            "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
            "gas": "0xd981",
            "gasPrice": "0x863ea97a",
            "value": "0x0",
            "nonce": "0x1e",
            "input": "0x4dff26b5e647b086e8901bf45b2595d101b5c0b1beca5a0eaf731fedc9bcc55045595d8f0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006462937a5286f6ad098d900a930274b8f1a23589a5cd79014775c1ad1602da175c0c7ee3ed4daf705ba4f95f35744c2caf2d5e0ddd53a52357dcdf3add1a0f818ad21180dbf9696b5902ac472acbf964a5cb07c5a67e3212f3d45ebb8bcab0c81f1de3852c00000000000000000000000000000000000000000000000000000000"
          }
          Nonce: 32
          {
            "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
            "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
            "gas": "0xd981",
            "gasPrice": "0x863ea97a",
            "value": "0x0",
            "nonce": "0x20",
            "input": "0x4dff26b519a20f23dfd2bb6dcfaa0e7835660c082be252815adada6aac8f952d74bebeeb00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000064a4efeb075d0f452317049ade1ef4629b9c6a6b8266ed92c4e529a6ed6b02c3c085a10dbb2915d67afbc1adfcebf03710c2afec030bb034dedd61827ab514f0ecf362d241e37f539459474ac5f1f05681758dcbce8f044017e527b88caddfc361d4bbd8c900000000000000000000000000000000000000000000000000000000"
          }
          Nonce: 34
          {
            "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
            "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
            "gas": "0xd981",
            "gasPrice": "0x863ea97a",
            "value": "0x0",
            "nonce": "0x22",
            "input": "0x4dff26b54d97dfed1ac74511459c0c954dce6d4430285eb80cbac3ba889cabe6daa3f17f00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000064e9467519fecf815e37f536f0c082d54a994da82b35d418c946566d471790834039caaf4f370c7ec09c51125a3a4628ed709153d167f751ab6039c3967578717a9ecbc616b7d3cf398f6d2999500ba9a718703135dd31ad84808c65e2c2169c580d070ea300000000000000000000000000000000000000000000000000000000"
          }
          Nonce: 25
          {
            "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
            "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
            "gas": "0xd981",
            "gasPrice": "0x863ea97a",
            "value": "0x0",
            "nonce": "0x19",
            "input": "0x4dff26b576af3b1e5154889c5006375376fa627682df455181248ab07de68c3cfa910fe500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000064c075f50e6643f3621dff2072d258f3db2cb37cbebc5beb3438437f13fcb83ae2b440018fdb646e1390fa85831226d0abe5ad180224b363326f887e65a5f8c7cf6b7135be744fc7b63c22b7f14e4b0b1a4f86fb4c0a3e2189581556e29e99aac43c952a3c00000000000000000000000000000000000000000000000000000000"
          }
          Nonce: 20
          {
            "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
            "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
            "gas": "0x969d",
            "gasPrice": "0x863ea97a",
            "value": "0x0",
            "nonce": "0x14",
            "input": "0x4dff26b5726bd29315d35d91b7c47b62364600d21d618b124608336f96fbf168b93808cc00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000064b063762c80fdc58aac3245ed07d91e3f1f94b5f4bf5281ec928d17c7d6ef78212c5921c90ca8069670506c9dd4af0c42ed48a6ffa808bb2f0b0004d530b70c30b5574a69ba89403556073004b5f1637f665fe2073976ed1a544821515ffef8fb6f52814c00000000000000000000000000000000000000000000000000000000"
          }
          Nonce: 22
          {
            "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
            "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
            "gas": "0xd975",
            "gasPrice": "0x863ea97a",
            "value": "0x0",
            "nonce": "0x16",
            "input": "0x4dff26b5d6c0235cbeadc585769905acce67e7baf3820b520d5b415499c14748cfafea6b0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006487b34efd5ffb7a2363dd82608bc334832c9bf620ce2de50d0a8cf5a508e0942044acb700eec27d6c6f57df10893e1d4dafda78ba210c2edb0f316912e5047692a9f1122556499d6e3db864a924dac665ce273bf3b7157f2740abb54a9008bd087bc3492100000000000000000000000000000000000000000000000000000000"
          }
          Nonce: 24
          {
            "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
            "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
            "gas": "0xd981",
            "gasPrice": "0x863ea97a",
            "value": "0x0",
            "nonce": "0x18",
            "input": "0x4dff26b5b652950876be55868c4017b1e0cb5ac4d7ffed2516a55e7cbbf0da958a822c4700000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000064013fb3872c68e3bad5f17f17f15c2c6709bcf6c4334c048235479ac76badcbc8c35c522d6a222214faa7526f56e89faba6a85b6ca3b62ddbb158535e1535947055bf63f455c40b59352b7e35c275335c14a291eeeb96fbea4832c2f4aefdc37ce657b36300000000000000000000000000000000000000000000000000000000"
          }
          Nonce: 27
          {
            "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
            "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
            "gas": "0x96a9",
            "gasPrice": "0x863ea97a",
            "value": "0x0",
            "nonce": "0x1b",
            "input": "0x4dff26b5e2cbd6fb5f28f198bcbef80669ba0033c5c654498ee2950610f714c352eb16b900000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000064e8b772b2d663144665ed7a5a48a5f641c79e4f095959c72311641fa21f95807c30be13e98422d6a2e3aedceb1dc60d121d83a9f5bc952762c6ce402ab5495c65b0e7f2be16e08876270c893da5b108b4b8604db77e07e1c468b04318744ed1abbbb57da300000000000000000000000000000000000000000000000000000000"
          }
          Nonce: 28
          {
            "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
            "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
            "gas": "0xd95d",
            "gasPrice": "0x863ea97a",
            "value": "0x0",
            "nonce": "0x1c",
            "input": "0x4dff26b590589d1c49210ae750abc467a1e532b8d0f00066772972720abf0de69f888e870000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006498663381088d23b76b10304ea26ca5f22e341925687c9636688e94478fec38beea0cabfd95e6d492bae3c2a00458231d77e7d6b037323e624b1e95003f75cd0072293ff146f5a2f55edf1039a0194ef86916648a4dd3e17a6b181525b27443abf072a84c00000000000000000000000000000000000000000000000000000000"
          }
          Nonce: 29
          {
            "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
            "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
            "gas": "0xd981",
            "gasPrice": "0x863ea97a",
            "value": "0x0",
            "nonce": "0x1d",
            "input": "0x4dff26b55e7a1bbd0a209b9196e461727e46e3455bb1b85f954516aed491a23f4d41c68a00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000064a985144a6b50ab32dfc59acfce23c016ceeefe52151efe27aabf5783c085d3d98c62be05593032e58a8be9530ed439dc1f5f9fbaac2faac3d21ac383cbd28e6055be7cdd4306e8bdf242d921de65a1eb468d2849d8e8b7bb834a05177ad7bea3cdf25d3400000000000000000000000000000000000000000000000000000000"
          }
          Nonce: 26
          {
            "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
            "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
            "gas": "0xd969",
            "gasPrice": "0x863ea97a",
            "value": "0x0",
            "nonce": "0x1a",
            "input": "0x4dff26b59a92b61ea76b3be7518656d5bc266400175939861503af807b44f35707f7ae3c0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006407afcd8541d643ff577da10248aefe91868598aca2c622361d52b6b66872649a8b6b6aa4b1a3d5212e247e489a46f8199bedf5ee85a7e7e598967384e3054df23365590108f2639dfb258851ae11739067046700222f332780df36b7de3052b2495dfca300000000000000000000000000000000000000000000000000000000"
          }
          Nonce: 31
          {
            "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
            "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
            "gas": "0x96b5",
            "gasPrice": "0x863ea97a",
            "value": "0x0",
            "nonce": "0x1f",
            "input": "0x4dff26b566e6c44839586ad4f47d3db74c421b671c5d452514541aaf92250cd27ddfe04d00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000064ba12efc09d66e93c908f866bdc0a980b808d55a34cc41ea9436f02f3f8038888110def7f3d5d08886c0983c62a074bfc0964487e82475355cfbbed60ffede9d6facb3f217fb6bb3079bdf31c8e2c10d0fd3690bf9ac89bb02aa7c65e7e6db5ad4817921000000000000000000000000000000000000000000000000000000000"
          }
          Nonce: 33
          {
            "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
            "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
            "gas": "0xd981",
            "gasPrice": "0x863ea97a",
            "value": "0x0",
            "nonce": "0x21",
            "input": "0x4dff26b5fe45caec3c3331e96beab4a718b015c6846e185616a10693e05a8087d51452d300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000064b4dd729a97845819bcb8c3c09efd02a91b8ca368f72b6c84f0fe90707216916050bc438b5c3e3f9c87f1b1140832fc9610e47565772b76f2a84d8f7aefb1652a41c2408f04eae6d693540d4d1744153bc3e50be6ff25ea8838332a9d2dae66389d286f8900000000000000000000000000000000000000000000000000000000"
          }
          Nonce: 19
          {
            "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
            "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
            "gas": "0xd981",
            "gasPrice": "0x863ea97a",
            "value": "0x0",
            "nonce": "0x13",
            "input": "0x4dff26b5b480c34c7a03ec6f8c325ec533258f745e8767370a31fb1c609f285d1c97804000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000064ca13e7ed0b10d6f0c6b20a97b7e11d05bdd15a97a262b2164a0a5616d70741b8851be6be495d4b1a84b76a3f2fbd6236810f5464221570cdb93c1ba143c70a6598a91bcec1608b68d5871fece359fad702acbab0f8cc1cb6a90c2934d1abb48868185e0d00000000000000000000000000000000000000000000000000000000"
          }
          Nonce: 21
          {
            "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
            "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
            "gas": "0x96a9",
            "gasPrice": "0x863ea97a",
            "value": "0x0",
            "nonce": "0x15",
            "input": "0x4dff26b52dae84303c27703afba7266843c82796a0efb07eeb4dfe74ccca9f0576fbf7f20000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006440735a2b291244ceb4bf8cb2d74e3440bad2bfad7f8a23cd1d2687a9175848e9dc66d2cdd7f4f4facdca0f24198813494bfb03242100c37179f01e06c854ca51513f8e1cd85902fcadcbb530fbdba9b0e545125f7489fda15318652741b4b3e10f46bfeb00000000000000000000000000000000000000000000000000000000"
          }
        
        πŸ“Œ Queued Transactions:

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (1 by maintainers)

Most upvoted comments

I built anvil locally with extra logs

when I was digging into it, the hash that it waits for, is one of the transactions that is stuck in the mempool. I have not seen a scenario in which the hash would be garbled, wrong or unknown.

I see what you are saying. I have not seen that locally. Geth uses fixed size byte arrays and the hashes are only used on the Golang thread stack, so I can’t really imagine how they could append somehow.

I am not saying it is not possible.

awesome, was able to hit this

2025-04-08T18:43:13.422+0300	ERROR	GroupBlockchainPublisher	blockchain/client.go:90	waiting for transaction	{"contractAddress": "0x04A7ea513f69c3E556d8F1ABe00E349ed53C9593", "hash": "0xef8025a98b293151f2a8bc6bcd1f21741f0ab8e9b617935ff35366a628c80888"}

going to debug what happens, thank you

git clone git@github.com:xmtp/xmtpd.git
cd xmtpd
git checkout anvil-repro-branch

# start anvil with default 8545 port

# run repro test in a loop until it crashes
# it might take a few iterations to hit
while go test -run=TestPublishGroupMessageConcurrent -count=30 -failfast ./pkg/blockchain/; do date; done

# eventually you should see ERROR   GroupBlockchainPublisher        blockchain/client.go:90 waiting for transaction