Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: 0xfff on February 10, 2017, 03:19:09 PM



Title: Bitcoin transaction larger than 1 MB?
Post by: 0xfff on February 10, 2017, 03:19:09 PM
What would happen if you tried to send a tx larger than 1 MB? It couldn't fit in a block so would it even be included in mem pool? How many inputs/outputs would you need for a 1 MB transaction?


Title: Re: Bitcoin transaction larger than 1 MB?
Post by: bg002h on February 10, 2017, 03:55:42 PM
Block size limit is one of many limits in the consensus rules. There are limits to the number of signature / hash operations as well as input and outputs. I'm not sure you could make a >1MB transaction that conformed to these ancillary rules, but if you did no one would add it to a block. It might make for a decent attack vector though…to clog up the relay function of the network.


Title: Re: Bitcoin transaction larger than 1 MB?
Post by: iGotSpots on February 10, 2017, 04:04:22 PM
What would happen if you tried to send a tx larger than 1 MB? It couldn't fit in a block so would it even be included in mem pool? How many inputs/outputs would you need for a 1 MB transaction?

It would just get rejected. Combining about 876 inputs should put you above


Title: Re: Bitcoin transaction larger than 1 MB?
Post by: greenlion on February 10, 2017, 06:36:32 PM
There are two separate aspects of the system that would stop such a thing --

1) Transactions > 100 kb are considered non-standard by nodes. This isn't a consensus rule, but it's local policy where nodes will refuse to relay the transaction. In general you would have to manually submit your raw tx to a miner to get anything nonstandard mined, because the network will not propagate it for you. This is why it wouldn't end up in the mempool.

2) The 1MB blocksize cap will stop a miner from including it in a block, because it would be impossible for a miner to construct a candidate block that would be valid and includes your >1MB transaction.

There isn't really a way to answer how many inputs and outputs you would need, because for normal p2pkh tx's outputs are smaller than inputs (because you have to include signature data in the tx), but ballpark based on how many typical transactions fit in a block, it would be somewhere in the neighborhood of a few thousand, depending on the exact inputs and outputs.