In my private testnet, I sent a transaction that runs out of gas before completion, which can be seen from gasUsed: 28666 = gas: 28666
and failure status: "0x0"
,. I thought it would not be incorporated into the blockchain. But it was (in blockNum #1456). It this expected? If yes, wouldn't a spammer keep sending transactions with low gas limit and fill in all blocks?
> eth.getTransaction("0xe97d2b5e6f109c7d299dcd8673474d9853363c611bf1d973062cfcbc26a7ede7")
{
blockHash: "0x907826c61038402c394d2e297b03643929cef97fb943574e8312a09fa84387c2",
blockNumber: 1456,
from: "0xf6de496ec5601d74937ddd77af09c8cd4ba41ab5",
gas: 28666,
gasPrice: 22000000000,
hash: "0xe97d2b5e6f109c7d299dcd8673474d9853363c611bf1d973062cfcbc26a7ede7",
input: "0xa9059cbb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000029a2241af62c0000",
nonce: 8,
r: "0xb9d8c5f664887c10070681f2c35d3baa8f1e4d57439f3e93bafc920b2a126f90",
s: "0x7e969e860765a7102c8bad833c672df08b5d760f1a2d2aac717857e401653ae8",
to: "0x091e99d1fbf1d18b7c42aeb6938dec588b2aae9c",
transactionIndex: 0,
v: "0x42",
value: 0
}
> eth.getTransactionReceipt("0xe97d2b5e6f109c7d299dcd8673474d9853363c611bf1d973062cfcbc26a7ede7")
{
blockHash: "0x907826c61038402c394d2e297b03643929cef97fb943574e8312a09fa84387c2",
blockNumber: 1456,
contractAddress: null,
cumulativeGasUsed: 28666,
from: "0xf6de496ec5601d74937ddd77af09c8cd4ba41ab5",
gasUsed: 28666,
logs: [],
logsBloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
status: "0x0",
to: "0x091e99d1fbf1d18b7c42aeb6938dec588b2aae9c",
transactionHash: "0xe97d2b5e6f109c7d299dcd8673474d9853363c611bf1d973062cfcbc26a7ede7",
transactionIndex: 0
}