¿Cuál es la mejor manera de enviar múltiples transacciones sin quedarse sin gas para la siembra?

Tengo un problema en el que el envío de una sola transacción funciona pero el envío de varias no.

Estoy intentando sembrar mi contrato con datos usando web3.js y funciona bien.

mycontractinstance.foofunction(1,2,3)

Pero tan pronto como intento enviar varias transacciones seguidas, se queda sin gas en algún momento y todo se revierte.

mycontractinstance.foofunction(1,2,4)
mycontractinstance.foofunction(1,3,3)
mycontractinstance.foofunction(4,2,3)
mycontractinstance.foofunction(1,2,1)

¿Hay una manera adecuada de hacer esto? ¿Debo esperar la confirmación de la primera transacción para enviar la segunda? etc.

Ok, proporcionaré el registro de geth para ambos escenarios:

mycontractinstance.foofunction(1,2,3)

-

I0212 19:37:07.399271   67496 worker.go:349] 🔨  Mined block (#1018 / 4b46bd0b). Wait 5 blocks for confirmation
I0212 19:37:07.399730   67496 worker.go:570] commit new work on block 1019 with 0 txs & 0 uncles. Took 419.499µs
I0212 19:37:07.400184   67496 worker.go:570] commit new work on block 1019 with 0 txs & 0 uncles. Took 390.426µs
VM STAT 161 OPs
PC 00000000: PUSH1 GAS: 978149 COST: 3
STACK = 0
MEM = 0
STORAGE = 0

PC 00000002: PUSH1 GAS: 978146 COST: 3
STACK = 1
0000: 0000000000000000000000000000000000000000000000000000000000000060
MEM = 0
STORAGE = 0

PC 00000004: MSTORE GAS: 978134 COST: 12
STACK = 2
0000: 0000000000000000000000000000000000000000000000000000000000000040
0001: 0000000000000000000000000000000000000000000000000000000000000060
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
STORAGE = 0

PC 00000005: CALLDATASIZE GAS: 978132 COST: 2
STACK = 0
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60  ...............`
STORAGE = 0


PC 00001269: SWAP1 GAS: 917536 COST: 3
STACK = 7
0000: 0000000000000000000000000000000000000000000000000000000000000066
0001: b98b78633099fa36ed8b8680c4f8092689e1e04080eb9cbb077ca38a14d7e384
0002: 0000000000000000000000000000000000000000000000000000000000000006
0003: b98b78633099fa36ed8b8680c4f8092689e1e04080eb9cbb077ca38a14d7e387
0004: 0000000000000000000000000000000000000000000000000000000000000005
0005: 00000000000000000000000000000000000000000000000000000000000000b9
0006: 00000000000000000000000000000000000000000000000000000000a8d5eed5
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05  ...............?
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02  ...............?
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60  ...............`
STORAGE = 0

PC 00001270: SWAP3 GAS: 917533 COST: 3
STACK = 7
0000: b98b78633099fa36ed8b8680c4f8092689e1e04080eb9cbb077ca38a14d7e384
0001: 0000000000000000000000000000000000000000000000000000000000000066
0002: 0000000000000000000000000000000000000000000000000000000000000006
0003: b98b78633099fa36ed8b8680c4f8092689e1e04080eb9cbb077ca38a14d7e387
0004: 0000000000000000000000000000000000000000000000000000000000000005
0005: 00000000000000000000000000000000000000000000000000000000000000b9
0006: 00000000000000000000000000000000000000000000000000000000a8d5eed5
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05  ...............?
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02  ...............?
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60  ...............`
STORAGE = 0

PC 00001271: SSTORE GAS: 897533 COST: 20000
STACK = 7
0000: b98b78633099fa36ed8b8680c4f8092689e1e04080eb9cbb077ca38a14d7e387
0001: 0000000000000000000000000000000000000000000000000000000000000066
0002: 0000000000000000000000000000000000000000000000000000000000000006
0003: b98b78633099fa36ed8b8680c4f8092689e1e04080eb9cbb077ca38a14d7e384
0004: 0000000000000000000000000000000000000000000000000000000000000005
0005: 00000000000000000000000000000000000000000000000000000000000000b9
0006: 00000000000000000000000000000000000000000000000000000000a8d5eed5
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05  ...............?
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02  ...............?
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60  ...............`
STORAGE = 0

PC 00001272: PUSH1 GAS: 897530 COST: 3
STACK = 5
0000: 0000000000000000000000000000000000000000000000000000000000000006
0001: b98b78633099fa36ed8b8680c4f8092689e1e04080eb9cbb077ca38a14d7e384
0002: 0000000000000000000000000000000000000000000000000000000000000005
0003: 00000000000000000000000000000000000000000000000000000000000000b9
0004: 00000000000000000000000000000000000000000000000000000000a8d5eed5
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05  ...............?
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02  ...............?
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60  ...............`
STORAGE = 0

PC 00001274: SWAP2 GAS: 897527 COST: 3
STACK = 6
0000: 0000000000000000000000000000000000000000000000000000000000000004
0001: 0000000000000000000000000000000000000000000000000000000000000006
0002: b98b78633099fa36ed8b8680c4f8092689e1e04080eb9cbb077ca38a14d7e384
0003: 0000000000000000000000000000000000000000000000000000000000000005
0004: 00000000000000000000000000000000000000000000000000000000000000b9
0005: 00000000000000000000000000000000000000000000000000000000a8d5eed5
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05  ...............?
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02  ...............?
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60  ...............`
STORAGE = 0

PC 00001275: SWAP1 GAS: 897524 COST: 3
STACK = 6
0000: b98b78633099fa36ed8b8680c4f8092689e1e04080eb9cbb077ca38a14d7e384
0001: 0000000000000000000000000000000000000000000000000000000000000006
0002: 0000000000000000000000000000000000000000000000000000000000000004
0003: 0000000000000000000000000000000000000000000000000000000000000005
0004: 00000000000000000000000000000000000000000000000000000000000000b9
0005: 00000000000000000000000000000000000000000000000000000000a8d5eed5
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05  ...............?
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02  ...............?
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60  ...............`
STORAGE = 0

PC 00001276: SWAP2 GAS: 897521 COST: 3
STACK = 6
0000: 0000000000000000000000000000000000000000000000000000000000000006
0001: b98b78633099fa36ed8b8680c4f8092689e1e04080eb9cbb077ca38a14d7e384
0002: 0000000000000000000000000000000000000000000000000000000000000004
0003: 0000000000000000000000000000000000000000000000000000000000000005
0004: 00000000000000000000000000000000000000000000000000000000000000b9
0005: 00000000000000000000000000000000000000000000000000000000a8d5eed5
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05  ...............?
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02  ...............?
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60  ...............`
STORAGE = 0

PC 00001277: ADD GAS: 897518 COST: 3
STACK = 6
0000: 0000000000000000000000000000000000000000000000000000000000000004
0001: b98b78633099fa36ed8b8680c4f8092689e1e04080eb9cbb077ca38a14d7e384
0002: 0000000000000000000000000000000000000000000000000000000000000006
0003: 0000000000000000000000000000000000000000000000000000000000000005
0004: 00000000000000000000000000000000000000000000000000000000000000b9
0005: 00000000000000000000000000000000000000000000000000000000a8d5eed5
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05  ...............?
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02  ...............?
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60  ...............`
STORAGE = 0

PC 00001278: DUP1 GAS: 897515 COST: 3
STACK = 5
0000: b98b78633099fa36ed8b8680c4f8092689e1e04080eb9cbb077ca38a14d7e388
0001: 0000000000000000000000000000000000000000000000000000000000000006
0002: 0000000000000000000000000000000000000000000000000000000000000005
0003: 00000000000000000000000000000000000000000000000000000000000000b9
0004: 00000000000000000000000000000000000000000000000000000000a8d5eed5
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05  ...............?
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02  ...............?
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60  ...............`
STORAGE = 0

PC 00001279: SLOAD GAS: 897465 COST: 50
STACK = 6
0000: b98b78633099fa36ed8b8680c4f8092689e1e04080eb9cbb077ca38a14d7e388
0001: b98b78633099fa36ed8b8680c4f8092689e1e04080eb9cbb077ca38a14d7e388
0002: 0000000000000000000000000000000000000000000000000000000000000006
0003: 0000000000000000000000000000000000000000000000000000000000000005
0004: 00000000000000000000000000000000000000000000000000000000000000b9
0005: 00000000000000000000000000000000000000000000000000000000a8d5eed5
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05  ...............?
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02  ...............?
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60  ...............`
STORAGE = 0


PC 00001289: AND GAS: 25017 COST: 3
STACK = 7
0000: ffffffffffffffffffffffff0000000000000000000000000000000000000000
0001: 0000000000000000000000000000000000000000000000000000000000000000
0002: b98b78633099fa36ed8b8680c4f8092689e1e04080eb9cbb077ca38a14d7e388
0003: 0000000000000000000000000000000000000000000000000000000000000006
0004: 0000000000000000000000000000000000000000000000000000000000000005
0005: 00000000000000000000000000000000000000000000000000000000000000b9
0006: 00000000000000000000000000000000000000000000000000000000a8d5eed5
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05  ...............?
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02  ...............?
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60  ...............`
STORAGE = 0

PC 00001290: CALLER GAS: 25015 COST: 2
STACK = 6
0000: 0000000000000000000000000000000000000000000000000000000000000000
0001: b98b78633099fa36ed8b8680c4f8092689e1e04080eb9cbb077ca38a14d7e388
0002: 0000000000000000000000000000000000000000000000000000000000000006
0003: 0000000000000000000000000000000000000000000000000000000000000005
0004: 00000000000000000000000000000000000000000000000000000000000000b9
0005: 00000000000000000000000000000000000000000000000000000000a8d5eed5
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05  ...............?
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02  ...............?
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60  ...............`
STORAGE = 0

PC 00001291: OR GAS: 25012 COST: 3
STACK = 7
0000: 000000000000000000000000957a1a87d653ea2218742aeea5a05f637b6509c4
0001: 0000000000000000000000000000000000000000000000000000000000000000
0002: b98b78633099fa36ed8b8680c4f8092689e1e04080eb9cbb077ca38a14d7e388
0003: 0000000000000000000000000000000000000000000000000000000000000006
0004: 0000000000000000000000000000000000000000000000000000000000000005
0005: 00000000000000000000000000000000000000000000000000000000000000b9
0006: 00000000000000000000000000000000000000000000000000000000a8d5eed5
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05  ...............?
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02  ...............?
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60  ...............`
STORAGE = 0


PC 00001295: JUMP GAS: 1 COST: 8
STACK = 2
0000: 00000000000000000000000000000000000000000000000000000000000000b9
0001: 00000000000000000000000000000000000000000000000000000000a8d5eed5
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05  ...............?
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02  ...............?
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60  ...............`
STORAGE = 0

PC 00000185: JUMPDEST GAS: 0 COST: 1
STACK = 1
0000: 00000000000000000000000000000000000000000000000000000000a8d5eed5
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05  ...............?
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02  ...............?
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60  ...............`
STORAGE = 0

PC 00000186: STOP GAS: 0 COST: 0
STACK = 1
0000: 00000000000000000000000000000000000000000000000000000000a8d5eed5
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05  ...............?
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02  ...............?
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60  ...............`
STORAGE = 0

I0212 19:37:35.228514   67496 worker.go:570] commit new work on block 1020 with 1 txs & 0 uncles. Took 35.393252ms
I0212 19:37:39.911673   67496 worker.go:349] 🔨  Mined block (#1020 / 20866eb5). Wait 5 blocks for confirmation
I0212 19:37:39.913851   67496 worker.go:570] commit new work on block 1021 with 0 txs & 0 uncles. Took 2.123783ms
I0212 19:37:39.914405   67496 worker.go:570] commit new work on block 1021 with 0 txs & 0 uncles. Took 468.437µs

Luego, para múltiples transacciones (tenga en cuenta que en un intento de solucionar el problema, ahora estoy haciendo 2 lotes de 5 transacciones con un retraso en el medio, pero aún falla):

mycontractinstance.foofunction(1,2,4)
mycontractinstance.foofunction(1,3,3)
mycontractinstance.foofunction(4,2,3)
mycontractinstance.foofunction(1,2,1)

(aquí he eliminado 5k líneas para facilitar la lectura)

I0212 19:30:10.378653   67085 worker.go:570] commit new work on block 1005 with 0 txs & 0 uncles. Took 351.149µs
I0212 19:30:10.378958   67085 worker.go:570] commit new work on block 1005 with 0 txs & 0 uncles. Took 257.975µs
I0212 19:30:12.600042   67085 worker.go:349] 🔨  Mined block (#1005 / 3a254ec6). Wait 5 blocks for confirmation
I0212 19:30:12.600616   67085 worker.go:570] commit new work on block 1006 with 0 txs & 0 uncles. Took 505.262µs
I0212 19:30:12.601124   67085 worker.go:570] commit new work on block 1006 with 0 txs & 0 uncles. Took 406.985µs
I0212 19:30:23.393724   67085 xeth.go:1028] Tx(0x53f7bd7602527142ff3491e630c9f51ce0bb5ca09f067eaa94431372e25e4e40) to: 0xb910402db16bd488562ed5e40b781282b8db4e86
I0212 19:30:23.397823   67085 xeth.go:1028] Tx(0x294b9c651c258278ebb13e6d4f2d96e02a026019adb94f7f25b3114d919eb870) to: 0xb910402db16bd488562ed5e40b781282b8db4e86
I0212 19:30:23.400484   67085 xeth.go:1028] Tx(0x6af44846a0dadadfa58a68d878457a737c8e4dbae25dbd9587b30bfb814a3a50) to: 0xb910402db16bd488562ed5e40b781282b8db4e86
I0212 19:30:23.401611   67085 xeth.go:1028] Tx(0x7013b9272764a295ebce818741344bae96ad19b3922a4ed39b22807d2501d675) to: 0xb910402db16bd488562ed5e40b781282b8db4e86
I0212 19:30:23.416332   67085 xeth.go:1028] Tx(0x1d1086c3f0700a7a902772d2155c644a6ca7076d3bafc81f4ec4cddff3f54e56) to: 0xb910402db16bd488562ed5e40b781282b8db4e86
VM STAT 195 OPs
PC 00000000: PUSH1 GAS: 49978597 COST: 3
STACK = 0
MEM = 0
STORAGE = 0

PC 00000002: PUSH1 GAS: 49978594 COST: 3
STACK = 1
0000: 0000000000000000000000000000000000000000000000000000000000000060
MEM = 0
STORAGE = 0

PC 00000004: MSTORE GAS: 49978582 COST: 12
STACK = 2
0000: 0000000000000000000000000000000000000000000000000000000000000040
0001: 0000000000000000000000000000000000000000000000000000000000000060
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
STORAGE = 0

PC 00000005: CALLDATASIZE GAS: 49978580 COST: 2
STACK = 0
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60  ...............`
STORAGE = 0

PC 00000006: ISZERO GAS: 49978577 COST: 3
STACK = 1
0000: 0000000000000000000000000000000000000000000000000000000000000024
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60  ...............`
STORAGE = 0

PC 00000007: PUSH2 GAS: 49978574 COST: 3
STACK = 1
0000: 0000000000000000000000000000000000000000000000000000000000000000
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60  ...............`
STORAGE = 0

PC 00001292: SWAP1 GAS: 17483 COST: 3
STACK = 6
0000: 000000000000000000000000957a1a87d653ea2218742aeea5a05f637b6509c4
0001: ee60d0579bcffd98e668647d59fec1ff86a7fb340ce572e844f234ae73a69193
0002: 0000000000000000000000000000000000000000000000000000000000000006
0003: 0000000000000000000000000000000000000000000000000000000000000004
0004: 00000000000000000000000000000000000000000000000000000000000000b9
0005: 00000000000000000000000000000000000000000000000000000000a8d5eed5
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04  ...............?
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02  ...............?
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60  ...............`
STORAGE = 0

PC 00001293: SSTORE GAS: 17483 COST: 20000 ERROR: Out of gas
STACK = 6
0000: ee60d0579bcffd98e668647d59fec1ff86a7fb340ce572e844f234ae73a69193
0001: 000000000000000000000000957a1a87d653ea2218742aeea5a05f637b6509c4
0002: 0000000000000000000000000000000000000000000000000000000000000006
0003: 0000000000000000000000000000000000000000000000000000000000000004
0004: 00000000000000000000000000000000000000000000000000000000000000b9
0005: 00000000000000000000000000000000000000000000000000000000a8d5eed5
MEM = 96
0000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04  ...............?
0032: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0048: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02  ...............?
0064: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60  ...............`
STORAGE = 0

I0212 19:31:02.514098   67085 worker.go:570] commit new work on block 1009 with 7 txs & 0 uncles. Took 245.468809ms
I0212 19:31:14.965310   67085 worker.go:349] 🔨  Mined block (#1009 / b1aa94c8). Wait 5 blocks for confirmation
I0212 19:31:14.965771   67085 worker.go:570] commit new work on block 1010 with 0 txs & 0 uncles. Took 419.15µs
I0212 19:31:14.965810   67085 worker.go:448] 🔨 🔗  Mined 5 blocks back: block #1004
I0212 19:31:14.966183   67085 worker.go:570] commit new work on block 1010 with 0 txs & 0 uncles. Took 328.43µs
I0212 19:31:29.928411   67085 worker.go:349] 🔨  Mined block (#1010 / dd0c16f4). Wait 5 blocks for confirmation
I0212 19:31:29.928910   67085 worker.go:570] commit new work on block 1011 with 0 txs & 0 uncles. Took 463.605µs
I0212 19:31:29.928971   67085 worker.go:448] 🔨 🔗  Mined 5 blocks back: block #1005
I0212 19:31:29.929456   67085 worker.go:570] commit new work on block 1011 with 0 txs & 0 uncles. Took 431.551µs

Me pregunto qué estoy haciendo mal porque en la solidez del navegador en la misma aplicación exacta en el mismo contrato en la misma dirección puedo enviar 5 veces la misma transacción y funciona bien, pero al mirar a geth parece que él es la transacción en cola y la mía se envían todas a la vez.

Otra cosa para agregar es que estoy encadenando:

FooInstance.Foofunction.sendTransaction(50,201,1, function(err, address) {
  if (!err)
    console.log(address); //
});

Y obtengo la dirección de transacción para cada llamada. Es que nada termina funcionando. como si ninguna transacción funcionara.

¿Cuántas transacciones se necesitan? Hay dos límites: el gasSent con cada transacción y el blockGasLimit. blockGasLimit es el gas total permitido para todas las transacciones en un bloque, y si está enviando spam, es probable que todas las transacciones estén en un bloque. Verifique los archivos de registro de su minero. No he probado la ejecución de blockGasLimit, no estoy seguro de en qué está configurado. Y para ser honesto, me gustaría saber de un experto, porque no sé qué comportamiento tienen las transacciones múltiples en un contrato en un bloque. ¿Qué tipo de comportamiento de orden? Incluso permitido?
El orden de las transacciones en un bloque depende del minero. Suele ser por orden de recepción, priorizado por precio del gas. Los mineros no incluirán transacciones en las que se rompa el límite de gas del bloque, por lo que algunas de sus transacciones se convertirán en un bloque y otras se retendrán para el siguiente. Una vez que se extrae una transacción en un bloque, no se revertirá a menos que haya una bifurcación.
Aclare "se quedó sin gasolina en algún momento y todo se revirtió": si la transacción 1 funciona bien, la transacción 2 sin gasolina no hará que la transacción 1 se revierta. Como ha habido 3 comentarios aquí, probablemente necesite incluir más información, como el código de bucle y posiblemente foofunction.
Parece que su contrato requiere cantidades variables de gas según los argumentos pasados ​​a la función y que el OOG al enviar múltiples transacciones es una coincidencia.
Sí, parece estar relacionado con el gas proporcionado, ya que funciona con la solidez del navegador.

Respuestas (1)

Finalmente he encontrado lo que estaba haciendo mal. En realidad, debe proporcionar gasolina para cada transacción o no funcionará.

FooInstance.Foofunction.sendTransaction(var1,var2,varx,{from: web3.eth.accounts[0], gas:1000000});
FooInstance.Foofunction.sendTransaction(var3,var4,vary,{from: web3.eth.accounts[0], gas:1000000});