Author

Topic: Can a transaction be bigger than a block. (Read 278 times)

legendary
Activity: 2702
Merit: 3045
Top Crypto Casino
September 03, 2021, 09:58:55 AM
#16
Hmm, that may be an unwanted transaction, but a better formulation would be: An acceptable one. The term “wanted” or “unwanted” brings confusion; it's ironic if we consider Bitcoin a censorship resistant currency.
I believe the accurate term is NONSTANDARD. Nonstandard transactions won't be relayed by most nodes (those with default configuration) but miners can include them in one of their blocks. Once included into a block and confirmed, all nodes will accept them and add them to their copy of the blockchain.
In contrast, an INVALID transaction (such as a double-spending transaction) won't be relayed and if a miner add it to his block, the whole block will be rejected.
hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
September 03, 2021, 06:54:29 AM
#15
I'm pretty sure that the resulting data size does though come very close to 4 million bytes.
How's that possible? 4 million bytes = 16 million weight units. Am I missing anything?
I'm pretty sure this StackExchange answer is correct: https://bitcoin.stackexchange.com/a/98813
Quote
Theoretically, the block could therefore be up to 4,000,000 bytes if it was composed of witness data exclusively
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
September 03, 2021, 06:47:09 AM
#14
But don't forget there's transaction which won't be relayed (such as tx fee lower than 1 sat/vbyte or OP_RETURN size bigger than 80 byte)
Hmm, that may be an unwanted transaction, but a better formulation would be: An acceptable one. The term “wanted” or “unwanted” brings confusion; it's ironic if we consider Bitcoin a censorship resistant currency.

I'm pretty sure that the resulting data size does though come very close to 4 million bytes.
How's that possible? 4 million bytes = 16 million weight units. Am I missing anything?
hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
September 03, 2021, 04:41:58 AM
#13
While i realize most people say "4 MB" for simplicity sake, the correct unit is 4 kWU (4 kilo weight unit / 4 million weight).
I'm pretty sure that the resulting data size does though come very close to 4 million bytes.
hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
September 02, 2021, 09:41:08 AM
#12
It is true that most blocks are ~1MB . However it's not really hard coded to have a max limit as far as I know.

There were blocks ~2.5MB

https://blockchair.com/bitcoin/block/000000000000000000019d9af7a88b98bf6ed0fcfd582e002637755ce29f331b

Size 2,424,027 bytes
Weight 3,999,525
Going over 1MB is possible since SegWit, but this block looks like it's really stretching the limits. However, there is definitely a hard coded limit. It's just not a fixed file size limit anymore, instead a weight limit.
The higher the SegWit adoption, the larger the blocks will be. But it's capped at 4MB.

As you can read in https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#block-size:
Quote
Block weight is defined as Base size * 3 + Total size.
The new rule is block weight ≤ 4,000,000
Total size is the block size in bytes with transactions serialized as described in BIP144, including base data and witness data.
Basically the base block size is still 1MB but it can weigh up to 4MB and including the witness data can also reach these 4MB.

Note: Getting close to 4MB is almost impossible since you'd need many transactions that have an exceptional amount of witness data, so it's quite rare to get over 2MB.

An example for a huge block due to high ratio of signature size to block size would be one with many transactions that have tons of (esp. multi-sig) inputs, since signature and redeem scripts both go into the witness.
full member
Activity: 305
Merit: 106
September 02, 2021, 07:47:19 AM
#11
It is true that most blocks are ~1MB . However it's not really hard coded to have a max limit as far as I know.

There were blocks ~2.5MB

https://blockchair.com/bitcoin/block/000000000000000000019d9af7a88b98bf6ed0fcfd582e002637755ce29f331b

Size 2,424,027 bytes
Weight 3,999,525
full member
Activity: 228
Merit: 156
September 02, 2021, 03:37:42 AM
#10
I'll leave oktana's wonderful reply asides and grab another strange duck:

Your transaction won't be confirmed by nodes. Generally transactions can be accepted after confirming more then 50% of nodes. When nodes see any unwanted transaction, it won't be confirmed.
First of all, there are no “unwanted” transactions, not even with the figurative meaning of the word. Transactions are always accepted by every node of the network if they've been confirmed into a block that complies with the consensus rules. It doesn't matter if half of the nodes agree upon that block. Secondly, a transaction isn't confirmed by a node; it is verified. Miners are those who validate the chain, who confirm the transactions. When you run a node, you verify this validity.



As for the question in the title:  No, it can't fit into a block. You'll have to split it into x others.
I think the writer of the original nrated quote meant the miners will not choose such a transaction from the mining pool and include it from the first place, unless a miner wrote it or there is a very large fee that worth it why would a miner risk his/her effort in mining for such a transaction
.
By the way, I just checked the counter example transaction, the size is in the range, it's the weight & honestly I don't know how or where exactly in each step the weight is checked, I know a block with more weight will be favored in a fork or simultaneous arrival of 2blocks:
Size 959 bytes
Weight 1,466
legendary
Activity: 3472
Merit: 10611
September 02, 2021, 02:28:36 AM
#9
First of all, there are no “unwanted” transactions, not even with the figurative meaning of the word. Transactions are always accepted by every node of the network if they've been confirmed into a block that complies with the consensus rules. It doesn't matter if half of the nodes agree upon that block. Secondly, a transaction isn't confirmed by a node; it is verified. Miners are those who validate the chain, who confirm the transactions. When you run a node, you verify this validity.
I think that user is confusing bitcoin and how it works with some shitcoin. I believe it was a PoS or some DAG coins where only 50% of the "nodes" (in that case the centralized authority known as "witness nodes") had to accept a transaction for it to be considered "confirmed". In these protocols the rest of the network aren't really "full nodes" they are just relayers.
In any case it has no place in a bitcoin focused board.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
September 02, 2021, 01:31:47 AM
#8
I'll leave oktana's wonderful reply asides and grab another strange duck:

Your transaction won't be confirmed by nodes. Generally transactions can be accepted after confirming more then 50% of nodes. When nodes see any unwanted transaction, it won't be confirmed.
First of all, there are no “unwanted” transactions, not even with the figurative meaning of the word. Transactions are always accepted by every node of the network if they've been confirmed into a block that complies with the consensus rules. It doesn't matter if half of the nodes agree upon that block. Secondly, a transaction isn't confirmed by a node; it is verified. Miners are those who validate the chain, who confirm the transactions. When you run a node, you verify this validity.



As for the question in the title:  No, it can't fit into a block. You'll have to split it into x others.
full member
Activity: 228
Merit: 156
September 02, 2021, 12:01:41 AM
#7
So, this post made me to go digging. Blockchain shows that a transaction of 146,500.99BTC that was made at once across wallets. I mean, that's a lot of money already Lips sealed So who's gonna have that much money in crypto? 146,500.99 is really a huge amount and it went through (probably like the average transaction)

I think probably either the miner him/herself created the transaction, or the creator paid a lot of fee (on-chain or off-chain) to the miner
legendary
Activity: 3472
Merit: 10611
September 01, 2021, 10:10:41 PM
#6
Even though there are some tx size/weight related checks in bitcoin consensus rules but the main limit is about block size. So your transaction could technically be a little less than 1 MB in size (or 4 MB in weight) and be included in a block. Or be slightly bigger than these values and not be able to be included in any blocks because if it did, that block would become invalid and rejected by every node.

You also don't have to do something weird by spending a lot of UTXOs you could easily create single output that has an arbitrary (invalid) script that is too big like ~1MB and have a tx with 1 input 1 output that is too big. Or construct a tx spending a P2WSH that has a massive script that makes the tx weight ~4 MB.
Obviously these things are non-standard (while valid) and majority of nodes won't relay them.
HCP
legendary
Activity: 2086
Merit: 4361
September 01, 2021, 07:56:35 PM
#5
I actually don't think there's a limit cause I'm not sure it's based on the amount of BTC. Your transaction should be confirmed just like the average one, I think
The OP was talking about the data size of the transaction... not the BTC value of the transaction.

In any case, the theoretical limit for BTC value would be capped by the total supply at any given point in time... although given how large the UTXO set is, any transaction that currently attempted to spend every UTXO would likely be well over the data size limit of a block. Tongue
hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
September 01, 2021, 07:55:06 PM
#4
So, this post made me to go digging. Blockchain shows that a transaction of 146,500.99BTC that was made at once across wallets. I mean, that's a lot of money already Lips sealed So who's gonna have that much money in crypto? 146,500.99 is really a huge amount and it went through (probably like the average transaction). I actually don't think there's a limit cause I'm not sure it's based on the amount of BTC. Your transaction should be confirmed just like the average one, I think
Not trying to be rude, but you're a senior member and don't know that transaction amount has no effect on the transaction's size? Like, the bit-size. How many bits it needs inside a block... A transaction size is totally independent on the amount of funds moved.
It mostly depends on how many inputs and outputs it includes and a regular 1 input, 2 output tx is roughly 250vB.

The question was if you create a transaction that is e.g. 2MB large, what happens. It won't be mined, that's the short answer.
sr. member
Activity: 1680
Merit: 379
Top Crypto Casino
September 01, 2021, 05:38:27 PM
#3
You could create a transaction that is bigger but it would be rejected by nodes and never even end up in the mempool. If somebody tried to mine it their block would be invalid and they would end up forking themselves off the network.
legendary
Activity: 2114
Merit: 2248
Playgram - The Telegram Casino
September 01, 2021, 05:19:10 PM
#2
It should theoretically be possible for a transaction size to exceed the block size. But the block size should be large enough to accommodate any regular transaction, so this situation hasn't been encountered (AFAIK).

If this were ever to happen, the transaction would be invalid as the blocksize can not adjust to accommodate it; The sender would have to make some changes to reduce the size.
newbie
Activity: 26
Merit: 30
September 01, 2021, 05:03:00 PM
#1
Hello Community,
I was just wondering if a transaction can be bigger than a actual block, and thus be impossible to confirm.

My guess is, it is possible if you have enough input transactions. But obviously you would be able to split the transaction into two, and avoid the issue.

Any other thoughts?
   
Jump to: