When a transaction that executes a smart contract fails (maybe for an exception or require rule), is the transaction propagated to the network and included in the blockchain? If yes, what would be the reason for that?
Blockchain Transactions – Are Failed Transactions Included?
transactions
Related Solutions
Although your calculation is mostly correct, it did not take into consideration the network's capability to slowly increase the block gas limit. If a block becomes full with transactions, miners are allowed to bump the limit of the next block by a certain amount (for details please see Yellow paper, page 6, equations 40-42 + surrounding context).
Based on the above rationale, there is no theoretical limit to the number of transactions that can be squished into a block, just needs a bit of time to adjust. Practically you need to get those transactions to the miners, they have to process it, distribute the results etc, so based on how optimal the implementations are, there's an upper limit. What that is with the current network, nobody can really say. We did extensive spam tests on the Olympic test network where we actually rewarded people to keep pushing junk into the network, and reached a transaction throughput of about 25 tx/sec. Since then a huge amount of work went into the implementations, so they would probably be able to handle even more. However, calculating with this 3/4 year old experimental results, you would get about 2.16M votes per day.
That number is probably higher now, but you get the order of magnitude that the network seems to be able to handle. To push this number further up, there's extensive research being done in scalability and proof of stake, which would enable orders of magnitude larger transaction counts, but that's a long term goal.
It is included in the blockchain. The user still has to pay for the gas used to process the transaction, even if the transaction reverted. The exception to this, of course, is if the account sending the transaction doesn't have enough ETH to cover the tx fee and the ETH sent. In this case, the transaction can't be included in the blockchain at all because it can't cover the fee.
The transactions are included in the block, so you can check the transaction as you would any other. Use
eth.getTransaction()
with the transaction hash to check it. Alternatively you can use Etherscan to visually check it (see here for an example in a recent block. If you are using Rinkeby, you'll want to use https://rinkeby.etherscan.io/You should be getting a response whether it failed or not (unless, of course, you didn't have ETH to send the transaction in the first place). Your transaction may be waiting to be mined.
Best Answer
It is included in the blockchain. The user still has to pay for the gas used to process the transaction, even if the transaction reverted. The exception to this, of course, is if the account sending the transaction doesn't have enough ETH to cover the tx fee and the ETH sent. In this case, the transaction can't be included in the blockchain at all because it can't cover the fee.