25

Here are some calculations based on the Protocol Documentation. A Bitcoin Transaction is composed of the following: Version (4 Bytes) TxIn Count (1 ~ 9B) For each TxIn: Outpoint (36B) Script Length (1 ~ 9B) ScriptSig(?) Sequence (4B) TxOut Count (1 ~ 9B) For each TxOut: Value (8B) Script Length(1 ~ 9B)* Script (?)* LockTime (4B) Assuming a standard ...


14

Yes, they are referring to two different metrics: size and virtual size (vsize). The size in [bytes] of a transaction refers to the raw byte length of its serialized format. It is used to measure the data footprint of transactions when relayed on the network or stored on disk. The vsize in [vbytes] refers to a transaction's weighted size under segwit's ...


14

Let's compare a 2 input and 2 output transaction for variants of pay-to-pubkeyhash. (Full data below.) P2PKH has no witness, so raw size is equal to stripped size is equal to virtual size. A P2PKH transaction with two inputs and two outputs has 374 bytes (= 374 vBytes). P2SH-P2WPKH (wrapped segwit) locks funds to a P2SH output in which it redirects to a ...


13

There are a number of different address formats and other standard transaction types: Pay to Public Key (P2PK) outputs tie payments directly to the public key of the recipient instead of the derived address. These have been almost completely replaced by P2PKH, although sometimes mining rewards are still paid out to P2PK. Input: 114 B Output: 44 B (...


12

Since the activation of Segwit, transaction size is expressed in Weight Units (WU). Weight Units can be converted to a "virtual size" or virtual bytes (vB) by dividing by 4 and rounding up. The virtual size dictates how large your transaction is when paying fees. Non-Segwit Transactions For now, let's focus on Non-Segwit transactions. Each Non-Segwit byte ...


9

The first number does not include the prevout, sequence number, or the length byte for the scriptSig. It also uses 65 bytes for the public key (which is correct if it is uncompressed, but compressed keys of 33 bytes are more common now). Correcting it gives 139 + 36 + 4 + 1 + (33 or 65) = 148 or 180. The developer in the third case forgot to include the ...


8

There is no minimum size restraint on blocks and transactions. However, due to the nature of blocks and transactions, there is a practical minimum. The smallest transaction I can think of is 61 bytes. It is a transaction that spends an OP_TRUE anyonecanspend output and creates 1 OP_TRUE anyonecanspend output. The smallest block I can think of is 146 bytes. ...


7

Taproot generally has two ways of spending. The default way is to spend the output using the key path: pay-to-taproot then behaves like a p2pk output except that it is using a schnorr signature and the corresponding address being encoded using bech32. The alternative is to reveal that the inner key was tweaked with the root of a Merkle tree, the Merkle path ...


6

For non-segwit transactions, vbytes = bytes. With the implementation of SegWit, we now see the weight of the block/transactions rather than seeing the absolute size on the wire. While calculating the weight of a transaction, we use a weight of four for the normal transaction components (ex signature) and weight of one for the witness components. Now vbyte ...


5

TL;DR: A P2WPKH input should be conservatively estimated with 68.0 vbytes. Standard P2WPKH inputs generally weigh 67.75 or 68.0 vbytes, depending on whether the r-value in the signature is low or high. A wallet using signature grinding (which is highly recommended) will always produce 67.75 vbyte inputs. 68.0 vbytes is the conservative estimate allowing for ...


4

Let's re-write and calculate from scratch as the calculations that you have posted might not be self-explanatory in itself and some of them are not entirely accurate. From the question, I presume you are trying to find the size of transaction for spending bitcoins from a multi-sig address. Redeem Script Size I think there is an error in the size of redeem ...


4

does my wallet remember that these 2 btc came from separate UTXO's? Or does it "get melted" as someone alluded to in my first link. More precisely, if I send these 2 btc to Gerald, will it show 1 input or 2? (1) Your have a single 2 BTC UTXO, created by Alice's transaction. That transaction spent two UTXOs, but melded them into a single one. Your ...


3

No. There is no unit price discount for making larger transactions. Such transactions consume similar resources to multiple transactions which sum to the same size. They consume the same amount of block space, so they will cost the same in transaction fees.


3

In general, Segwit v1 is cheaper than segwit v0 to spend but slightly more expensive to create. Segwit v1 output scripts as defined by the proposed taproot BIP will always be 35 bytes in length. However Segwit v0 output scripts are either 22 bytes (for the single key case) or 34 bytes (script hash case). This means that the person sending to segwit v1 will ...


3

what happens if size of a transaction is larger than maximum block size? Then the transaction can never be included in a block. There is no mechanism for dividing it up into multiple blocks, or anything like that. Any block that includes it would be invalid, since the block would become too large for the network's rules. This may be of interest: Block ...


3

Nick Odell answers the original question: The maximum transaction size is the size of the block. Source. and Transactions larger than 100 kilobytes (including witness at a 75% discount rate) are non-standard. Source 1. Source 2. so the case that you are describing will not occur as transactions lager than the blocksize will be sorted out.


2

The standardness limit in all recent Bitcoin Core versions with SegWit support is 400000 weight.


2

Depends on the number of inputs, the types of scripts the inputs are redeeming, the number of outputs, and the type of scripts that the ouputs are paying to. The absolute minimum for a transaction that might appear on chain is 60 bytes : 02000000 01 0000000000000000000000000000000000000000000000000000000000000000 00000000 00 fdffffff 01 ...


2

I compared to the following 9 types of transaction's weight. And then I found that No9 (P2WPKH => P2WPKH) was the lightest. Transaction patterns // 1 transaction consists of 1 txin and 1 txout 1. (in)P2PKH => (out)P2PKH [weight = 764] 2. (in)P2PKH => (out)P2SH-P2WPKH [weight = 756] 3. (in)P2PKH => (out)P2WPKH [weight = 752] 4. (in)P2SH-P2WPKH =&...


2

What about the second one ? That can be 61 bytes long ? Yes. Also, does each transaction carry a counter ? No. There is a global counter in the block that is right after the block header. That counter is the number of transactions included in the block. It is not part of any transaction and its size does not affect the size of any transaction in the ...


2

The fee rate is pulled here: export function fetchFeeEstimate(network, client) { if (client.type === BLOCK_EXPLORER) { return blockExplorerGetFeeEstimate(network); } return bitcoindEstimateSmartFee({ ...bitcoindParams(client), ...{ numBlocks: 1 }, }); } (https://github.com/unchained-capital/caravan/blob/...


2

does my wallet remember that these 2 btc came from separate UTXO's? Or does it "get melted" as someone alluded to in my first link. More precisely, if I send these 2 btc to Gerald, will it show 1 input or 2? It shows as 1 UTXO that you can spend. Your wallet does not care about the UTXOs that were spent to create the UTXOs that you can spend. ...


2

Once this transaction is processed, does my wallet remember that these 2 btc came from separate UTXO's? Or does it "get melted" as someone alluded to in my first link. More precisely, if I send these 2 btc to Gerald, will it show 1 input or 2? Your wallet may or may not keep track of the history of the funds you received. But all that really ...


2

Is this the highest number of transactions in a block until now? The highest number of transactions in a block is 12239 in block 00000000000000001080e6de32add416cd6cda29f35ec9bce694fea4b964c7be at height 367853. What are the things that affect the number of transactions possible in a block? Besides the block size/weight limit, the primary thing that ...


2

The size of a transaction depends on the numbers of inputs and outputs it contains. Although many transactions might have one input and two outputs, some transactions can have hundreds of inputs and/or hundreds of outputs. It is also affected by the type of each output (P2PKH, Segwit, etc). Block sizes at blockchair.com Transaction sizes at blockchair.com


1

Also, my blockchain wallet says that my bitcoincore wallet receiving qr code is an "Invalid Bitcoin address: " Why? It might be that your Blockchain.com wallet doesn't yet support the Bech32 address format (addresses starting bc1...) introduced four years ago.


1

Generally, the vsize and weight of transactions is determined by counting the byte length of the serialized transaction, and by weighting the different parts of the transactions according to the rules of segwit. As most transactions use standard scripts, the input and output sizes are known in advance and the transaction size can be easily estimated from the ...


1

The Bitcoin scripting language allows for a decent variety of transaction constructions, but only a subset of those are considered "standard". In particular, Bitcoin Core will only relay transactions by default that pass the isStandard() check. However, miners are still free to include (valid!) non-standard transactions in their blocks. Transactions larger ...


1

What is a "maximum standard weight"? It is a property that nodes follow to prevent processing large transactions with number of rules and signatures. It is standardness not consensus. If a node receives a transaction greater than 400,000 WU, it will discard the transaction and not relay it further. I can however, definitely create a transaction greater than ...


1

In Bitcoin Optech Newsletter #46, the costs are compared as follows: Overall, this makes the cost to create and spend a Taproot single-sig output about 5% more expensive than P2WPKH. Vbytes P2PKH P2WPKH Taproot scriptPubKey 25 22 35 scriptSig 107 0 0 witness 0 26.75 16.25 ...


Only top voted, non community-wiki answers of a minimum length are eligible