If I send two transactions simultaneously, then one ends up being 'left behind'
./parity/target/release/parity --chain ./chain2.json --author 0x0f966e0a25b2f4288a9037584e9fa6f0921461e6 --unlock 0x0f966e0a25b2f4288a9037584e9fa6f0921461e6 --password ./password --reseal-on-txs all --usd-per-tx 0.000001 -ltxqueue=trace,miner=trace,own_tx=trace,rpc=trace --tx-gas-limit 0x47e7c4 --no-network --gas-floor-target 0x47e7c4 --force-sealing
2016-10-12 13:31:33 main INFO parity::run Starting Parity/v1.4.0-unstable-eb40750-20161012/x86_64-macos/rustc1.12.0
2016-10-12 13:31:33 main INFO parity::run State DB configuation: fast
2016-10-12 13:31:33 main INFO ethcore::service Configured for Morden using BasicAuthority engine
2016-10-12 13:32:05 IO Worker #2 INFO import 0/ 0/25 peers 148 KiB db 8 KiB chain 2 KiB queue 4 KiB sync
2016-10-12 13:32:36 IO Worker #3 INFO import 0/ 0/25 peers 148 KiB db 8 KiB chain 2 KiB queue 4 KiB sync
2016-10-12 13:33:02 TRACE rpc Request: {"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{"from": "0x0f966e0a25b2f4288a9037584e9fa6f0921461e6","to": "0x692a70d2e424a56d2c6c27aa97d1a86395877b3a","gas": "0x76c0", "value": "0x1", "gasPrice": "0x174876e800"}],"id":1}
2016-10-12 13:33:02 TRACE miner send_transaction: dispatching tx: f8678310006885174876e8008276c094692a70d2e424a56d2c6c27aa97d1a86395877b3a01801ca05bfa48eb59aba12ce44ba544e7bb8a931183563624d65b108186253c7ec53b25a07db0c6322dc1e5f179869547ee221525f0a6e85212d83dd68d5c0f789055560a
2016-10-12 13:33:02 TRACE own_tx Importing transaction: SignedTransaction { unsigned: Transaction { nonce: 1048680, gas_price: 100000000000, gas: 30400, action: Call(692a70d2e424a56d2c6c27aa97d1a86395877b3a), value: 1, data: [] }, v: 28, r: 41602684258039671402503832370989336814300462939737334622423505447948952877861, s: 56851439054902110302383359198734766190340887100816840594436766939176620086794, hash: Cell { value: Some(bdbacda6009b248a6787024e6733cffe75c2c253ffe1dbec9ead92f2f9ceef89) }, sender: Cell { value: None } }
2016-10-12 13:33:02 DEBUG txqueue Imported transaction to current: bdbacda6009b248a6787024e6733cffe75c2c253ffe1dbec9ead92f2f9ceef89
2016-10-12 13:33:02 DEBUG txqueue status: TransactionQueueStatus { pending: 1, future: 0 }
2016-10-12 13:33:02 TRACE own_tx Imported transaction to Current (hash: bdbacda6009b248a6787024e6733cffe75c2c253ffe1dbec9ead92f2f9ceef89)
2016-10-12 13:33:02 TRACE own_tx Status: TransactionQueueStatus { pending: 1, future: 0 }
2016-10-12 13:33:02 TRACE miner update_sealing
2016-10-12 13:33:02 TRACE miner requires_reseal: sealing enabled
2016-10-12 13:33:02 TRACE miner requires_reseal: should_disable_sealing=false; best_block=60, last_request=0
2016-10-12 13:33:02 TRACE miner update_sealing: preparing a block
2016-10-12 13:33:02 TRACE miner prepare_block: recalibrating...
2016-10-12 13:33:02 TRACE miner Recalibrating Instant { t: 248912671349878 } versus Instant { t: 248824134075249 }
2016-10-12 13:33:02 TRACE miner Getting price info
2016-10-12 13:33:02 TRACE miner prepare_block: done recalibration.
2016-10-12 13:33:02 TRACE miner prepare_block: No existing work - making new block
2016-10-12 13:33:02 TRACE miner update_sealing: engine indicates internal sealing
2016-10-12 13:33:02 TRACE miner seal_block_internally: block has transaction - attempting internal seal.
2016-10-12 13:33:02 TRACE miner seal_block_internally: managed internal seal. importing...
2016-10-12 13:33:02 TRACE rpc AsyncResponse: Some(AsyncStringResponse { response: Single(Sync(Success(Success { jsonrpc: V2, result: "0xbdbacda6009b248a6787024e6733cffe75c2c253ffe1dbec9ead92f2f9ceef89", id: Num(1) }))) })
2016-10-12 13:33:02 DEBUG rpc Response: "{\"jsonrpc\":\"2.0\",\"result\":\"0xbdbacda6009b248a6787024e6733cffe75c2c253ffe1dbec9ead92f2f9ceef89\",\"id\":1}"
2016-10-12 13:33:02 IO Worker #2 TRACE miner chain_new_blocks
2016-10-12 13:33:02 IO Worker #2 TRACE txqueue Removing old transaction: bdbacda6009b248a6787024e6733cffe75c2c253ffe1dbec9ead92f2f9ceef89 (nonce: 1048680 < 1048681)
2016-10-12 13:33:02 IO Worker #2 TRACE miner update_sealing
2016-10-12 13:33:02 IO Worker #2 TRACE miner requires_reseal: sealing enabled
2016-10-12 13:33:02 IO Worker #2 TRACE miner requires_reseal: should_disable_sealing=false; best_block=61, last_request=0
2016-10-12 13:33:02 IO Worker #2 TRACE miner update_sealing: preparing a block
2016-10-12 13:33:02 IO Worker #2 TRACE miner prepare_block: recalibrating...
2016-10-12 13:33:02 IO Worker #2 TRACE miner Recalibrating Instant { t: 248912706576032 } versus Instant { t: 252512675385400 }
2016-10-12 13:33:02 IO Worker #2 TRACE miner prepare_block: done recalibration.
2016-10-12 13:33:02 IO Worker #2 TRACE miner prepare_block: No existing work - making new block
2016-10-12 13:33:02 IO Worker #2 TRACE miner update_sealing: engine indicates internal sealing
2016-10-12 13:33:02 IO Worker #2 INFO import Imported #61 521f…47ce (1 txs, 0.02 Mgas, 0.58 ms, 0.65 KiB)
2016-10-12 13:33:02 TRACE rpc Request: {"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{"from": "0x0f966e0a25b2f4288a9037584e9fa6f0921461e6","to": "0x692a70d2e424a56d2c6c27aa97d1a86395877b3a","gas": "0x76c0", "value": "0x1", "gasPrice": "0x174876e800"}],"id":1}
2016-10-12 13:33:02 TRACE miner send_transaction: dispatching tx: f8678310006985174876e8008276c094692a70d2e424a56d2c6c27aa97d1a86395877b3a01801ba03de209d72b8fafea870a3881544f347ba23992c45835e8d78d8c685ba6485e39a03d614679bc3afc4020d01f7784457d9d65f8fa7f8909f74ce8712733477eaecf
2016-10-12 13:33:02 TRACE own_tx Importing transaction: SignedTransaction { unsigned: Transaction { nonce: 1048681, gas_price: 100000000000, gas: 30400, action: Call(692a70d2e424a56d2c6c27aa97d1a86395877b3a), value: 1, data: [] }, v: 27, r: 27990459116912357117703154639865219911434140647521039331989128201061609791033, s: 27762954333083551036131034066014922104793355100521074160885450857915957030607, hash: Cell { value: Some(1d11adc04ae4e875532d788c6d3ebffa2f6000e23fdb38483d950b03b9374548) }, sender: Cell { value: None } }
2016-10-12 13:33:02 DEBUG txqueue Imported transaction to current: 1d11adc04ae4e875532d788c6d3ebffa2f6000e23fdb38483d950b03b9374548
2016-10-12 13:33:02 DEBUG txqueue status: TransactionQueueStatus { pending: 1, future: 0 }
2016-10-12 13:33:02 TRACE own_tx Imported transaction to Current (hash: 1d11adc04ae4e875532d788c6d3ebffa2f6000e23fdb38483d950b03b9374548)
2016-10-12 13:33:02 TRACE own_tx Status: TransactionQueueStatus { pending: 1, future: 0 }
2016-10-12 13:33:02 TRACE rpc AsyncResponse: Some(AsyncStringResponse { response: Single(Sync(Success(Success { jsonrpc: V2, result: "0x1d11adc04ae4e875532d788c6d3ebffa2f6000e23fdb38483d950b03b9374548", id: Num(1) }))) })
2016-10-12 13:33:02 DEBUG rpc Response: "{\"jsonrpc\":\"2.0\",\"result\":\"0x1d11adc04ae4e875532d788c6d3ebffa2f6000e23fdb38483d950b03b9374548\",\"id\":1}"
2016-10-12 13:33:02 hyper-client TRACE miner Price info arrived: PriceInfo { ethusd: 11.92 }
2016-10-12 13:33:02 hyper-client INFO miner Updated conversion rate to Ξ1 = US$11.92 (3994886.5 wei/gas)
2016-10-12 13:33:02 hyper-client TRACE miner prepare_block: Got gas price! 3994886
2016-10-12 13:33:07 IO Worker #0 INFO import 0/ 0/25 peers 150 KiB db 23 KiB chain 2 KiB queue 4 KiB sync
If I send another transaction, then both the one 'left behind' and the new transaction get sealed into a block together
2016-10-12 13:33:17 TRACE rpc Request: {"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{"from": "0x0f966e0a25b2f4288a9037584e9fa6f0921461e6","to": "0x692a70d2e424a56d2c6c27aa97d1a86395877b3a","gas": "0x76c0", "value": "0x1", "gasPrice": "0x174876e800"}],"id":1}
2016-10-12 13:33:17 TRACE miner send_transaction: dispatching tx: f8678310006a85174876e8008276c094692a70d2e424a56d2c6c27aa97d1a86395877b3a01801ca0915b7e8a018d6d45a577432b2a0b03d944803c00aee572d62fbb0c082adb0d86a068c1375eb530eac80aa948b2d262a4617cec5d9d890db23382312a9192022d03
2016-10-12 13:33:17 TRACE own_tx Importing transaction: SignedTransaction { unsigned: Transaction { nonce: 1048682, gas_price: 100000000000, gas: 30400, action: Call(692a70d2e424a56d2c6c27aa97d1a86395877b3a), value: 1, data: [] }, v: 28, r: 65747019468144286886687776708968171071445622232725926403223246941637893098886, s: 47381919885527640885484561104019838233411182313603244826851038794359282740483, hash: Cell { value: Some(3793e1cfeab6904c4f787e77322e31865bc1d4fa2bd9b876121a33e1dc924884) }, sender: Cell { value: None } }
2016-10-12 13:33:17 DEBUG txqueue Imported transaction to current: 3793e1cfeab6904c4f787e77322e31865bc1d4fa2bd9b876121a33e1dc924884
2016-10-12 13:33:17 DEBUG txqueue status: TransactionQueueStatus { pending: 2, future: 0 }
2016-10-12 13:33:17 TRACE own_tx Imported transaction to Current (hash: 3793e1cfeab6904c4f787e77322e31865bc1d4fa2bd9b876121a33e1dc924884)
2016-10-12 13:33:17 TRACE own_tx Status: TransactionQueueStatus { pending: 2, future: 0 }
2016-10-12 13:33:17 TRACE miner update_sealing
2016-10-12 13:33:17 TRACE miner requires_reseal: sealing enabled
2016-10-12 13:33:17 TRACE miner requires_reseal: should_disable_sealing=false; best_block=61, last_request=0
2016-10-12 13:33:17 TRACE miner update_sealing: preparing a block
2016-10-12 13:33:17 TRACE miner prepare_block: recalibrating...
2016-10-12 13:33:17 TRACE miner Recalibrating Instant { t: 248927918350568 } versus Instant { t: 252512675385400 }
2016-10-12 13:33:17 TRACE miner prepare_block: done recalibration.
2016-10-12 13:33:17 TRACE miner prepare_block: No existing work - making new block
2016-10-12 13:33:17 TRACE miner update_sealing: engine indicates internal sealing
2016-10-12 13:33:17 TRACE miner seal_block_internally: block has transaction - attempting internal seal.
2016-10-12 13:33:17 TRACE miner seal_block_internally: managed internal seal. importing...
2016-10-12 13:33:17 TRACE rpc AsyncResponse: Some(AsyncStringResponse { response: Single(Sync(Success(Success { jsonrpc: V2, result: "0x3793e1cfeab6904c4f787e77322e31865bc1d4fa2bd9b876121a33e1dc924884", id: Num(1) }))) })
2016-10-12 13:33:17 DEBUG rpc Response: "{\"jsonrpc\":\"2.0\",\"result\":\"0x3793e1cfeab6904c4f787e77322e31865bc1d4fa2bd9b876121a33e1dc924884\",\"id\":1}"
2016-10-12 13:33:17 IO Worker #3 TRACE miner chain_new_blocks
2016-10-12 13:33:17 IO Worker #3 TRACE txqueue Removing old transaction: 3793e1cfeab6904c4f787e77322e31865bc1d4fa2bd9b876121a33e1dc924884 (nonce: 1048682 < 1048683)
2016-10-12 13:33:17 IO Worker #3 TRACE txqueue Removing old transaction: 1d11adc04ae4e875532d788c6d3ebffa2f6000e23fdb38483d950b03b9374548 (nonce: 1048681 < 1048683)
2016-10-12 13:33:17 IO Worker #3 TRACE miner update_sealing
2016-10-12 13:33:17 IO Worker #3 TRACE miner requires_reseal: sealing enabled
2016-10-12 13:33:17 IO Worker #3 TRACE miner requires_reseal: should_disable_sealing=false; best_block=62, last_request=0
2016-10-12 13:33:17 IO Worker #3 TRACE miner update_sealing: preparing a block
2016-10-12 13:33:17 IO Worker #3 TRACE miner prepare_block: recalibrating...
2016-10-12 13:33:17 IO Worker #3 TRACE miner Recalibrating Instant { t: 248927947177236 } versus Instant { t: 252512675385400 }
2016-10-12 13:33:17 IO Worker #3 TRACE miner prepare_block: done recalibration.
2016-10-12 13:33:17 IO Worker #3 TRACE miner prepare_block: No existing work - making new block
2016-10-12 13:33:17 IO Worker #3 TRACE miner update_sealing: engine indicates internal sealing
2016-10-12 13:33:17 IO Worker #3 INFO import Imported #62 c53d…de59 (2 txs, 0.04 Mgas, 0.55 ms, 0.75 KiB)
2016-10-12 13:33:38 IO Worker #1 INFO import 0/ 0/25 peers 151 KiB db 24 KiB chain 2 KiB queue 4 KiB sync
2016-10-12 13:34:09 IO Worker #0 INFO import 0/ 0/25 peers 151 KiB db 24 KiB chain 2 KiB queue 4 KiB sync
2016-10-12 13:34:40 IO Worker #2 INFO import 0/ 0/25 peers 151 KiB db 24 KiB chain 2 KiB queue 4 KiB sync
I am sending the transactions via a two simple curl commands joined with:
curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{"from": "0x0f966e0a25b2f4288a9037584e9fa6f0921461e6","to": "0x692a70d2e424a56d2c6c27aa97d1a86395877b3a","gas": "0x76c0", "value": "0x1", "gasPrice": "0x174876e800"}],"id":1}' 127.0.0.1:8545 && curl -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{"from": "0x0f966e0a25b2f4288a9037584e9fa6f0921461e6","to": "0x692a70d2e424a56d2c6c27aa97d1a86395877b3a","gas": "0x76c0", "value": "0x1", "gasPrice": "0x174876e800"}],"id":1}' 127.0.0.1:8545
Or in the case of sending a single transaction, just the first of these two commands &&'d together.
I actually see this behaviour with the InstantSeal engine as well.
It is an issue that will be resolved once new engines are introduced. These two can only trigger resealing when new transaction arrives and can not start sealing if sealing is ongoing.
For now the workaround is to introduce a small delay between submissions.
Closed via #3426 (parity --chain dev should now seal all)
Most helpful comment
I actually see this behaviour with the
InstantSealengine as well.