Skip to main content
Emphasize input and output count to make it easier to find
Source Link
Murch
  • 77.8k
  • 35
  • 190
  • 641

These numbers are slightly different today after the segwit and taproot softforks got activated.

A standard transaction is limited to 400 000 weight units (WU). The smallest standard (single-sig payment¹) input is a P2TR keypath input with 230 WU. The smallest standard (payment²) output is P2WPKH with 124 WU.

The header of a segwit transaction takes at least 42 WU. For transactions with large input or output counts, the counter will increase from 1 byte to 3 bytes when we have more than 252 inputs or outputs. This means that for the below transactions the header bytes will weigh 50 WU, leaving 399 950 WU for inputs and outputs.

Therefore, a standard transaction with one P2TR input (230 WU) could have 3223 P2WPKH outputs3223 P2WPKH outputs (3223 × 124 WU = 399 652 WU) (and could optionally add one OP_RETURN output (40 WU+) for a total of 3224 outputs).

A standard transaction with one P2WPKH output (124 WU) can have 1738 P2TR keypath inputs1738 P2TR keypath inputs (1738 × 230 WU = 399 740 WU).


¹ A P2WSH input with an OP_TRUE witness script would be smaller and considered standard (H/T @instagibbs), but I’m sticking to commonly used script types based on a single signature for this answer.
² OP_RETURN outputs can be smaller (H/T Pieter Wuille), but you are only permitted a single OP_RETURN output in a standard transaction.

These numbers are slightly different today after the segwit and taproot softforks got activated.

A standard transaction is limited to 400 000 weight units (WU). The smallest standard (single-sig payment¹) input is a P2TR keypath input with 230 WU. The smallest standard (payment²) output is P2WPKH with 124 WU.

The header of a segwit transaction takes at least 42 WU. For transactions with large input or output counts, the counter will increase from 1 byte to 3 bytes when we have more than 252 inputs or outputs. This means that for the below transactions the header bytes will weigh 50 WU, leaving 399 950 WU for inputs and outputs.

Therefore, a standard transaction with one P2TR input (230 WU) could have 3223 P2WPKH outputs (3223 × 124 WU = 399 652 WU) (and could optionally add one OP_RETURN output (40 WU+) for a total of 3224 outputs).

A standard transaction with one P2WPKH output (124 WU) can have 1738 P2TR keypath inputs (1738 × 230 WU = 399 740 WU).


¹ A P2WSH input with an OP_TRUE witness script would be smaller and considered standard (H/T @instagibbs), but I’m sticking to commonly used script types based on a single signature for this answer.
² OP_RETURN outputs can be smaller (H/T Pieter Wuille), but you are only permitted a single OP_RETURN output in a standard transaction.

These numbers are slightly different today after the segwit and taproot softforks got activated.

A standard transaction is limited to 400 000 weight units (WU). The smallest standard (single-sig payment¹) input is a P2TR keypath input with 230 WU. The smallest standard (payment²) output is P2WPKH with 124 WU.

The header of a segwit transaction takes at least 42 WU. For transactions with large input or output counts, the counter will increase from 1 byte to 3 bytes when we have more than 252 inputs or outputs. This means that for the below transactions the header bytes will weigh 50 WU, leaving 399 950 WU for inputs and outputs.

Therefore, a standard transaction with one P2TR input (230 WU) could have 3223 P2WPKH outputs (3223 × 124 WU = 399 652 WU) (and could optionally add one OP_RETURN output (40 WU+) for a total of 3224 outputs).

A standard transaction with one P2WPKH output (124 WU) can have 1738 P2TR keypath inputs (1738 × 230 WU = 399 740 WU).


¹ A P2WSH input with an OP_TRUE witness script would be smaller and considered standard (H/T @instagibbs), but I’m sticking to commonly used script types based on a single signature for this answer.
² OP_RETURN outputs can be smaller (H/T Pieter Wuille), but you are only permitted a single OP_RETURN output in a standard transaction.

added 38 characters in body
Source Link
Murch
  • 77.8k
  • 35
  • 190
  • 641

These numbers are slightly different today after the segwit and taproot softforks got activated.

A standard transaction is limited to 400 000 weight units (WU). The smallest standard (single-sig payment¹) input is a P2TR keypath input with 230 WU. The smallest standard (payment²) output is P2WPKH with 124 WU.

The header of a segwit transaction takes at least 42 WU. For transactions with large input or output counts, the counter will increase from 1 byte to 3 bytes when we have more than 252 inputs or outputs. This means that for the below transactions the header bytes will weigh 50 WU, leaving 399 950 WU for inputs and outputs.

Therefore, a standard transaction with one P2TR input (230 WU) could have 3223 P2WPKH outputs (3223 × 124 WU = 399 652 WU) (and could optionally add one OP_RETURN output (40 WU+) for a total of 3224 outputs).

A standard transaction with one P2WPKH output (124 WU) can have 1738 P2TR keypath inputs (1738 × 230 WU = 399 740 WU).


¹ A P2WSH input with an OP_TRUE witness script would be smaller and considered standard (H/T @instagibbs), but I’m sticking to commonly used script types based on a single signature for this answer.
² OP_RETURN outputs can be smaller (H/T Pieter Wuille), but you are only permitted a single OP_RETURN output in a standard transaction.

These numbers are slightly different today after the segwit and taproot softforks got activated.

A standard transaction is limited to 400 000 weight units (WU). The smallest standard (single-sig payment¹) input is a P2TR keypath input with 230 WU. The smallest standard (payment²) output is P2WPKH with 124 WU.

The header of a segwit transaction takes at least 42 WU. For transactions with large input or output counts, the counter will increase from 1 byte to 3 bytes when we have more than 252 inputs or outputs. This means that for the below transactions the header bytes will weigh 50 WU, leaving 399 950 WU for inputs and outputs.

Therefore, a standard transaction with one P2TR input (230 WU) could have 3223 P2WPKH outputs (3223 × 124 WU = 399 652 WU) (and could optionally add one OP_RETURN output (40 WU+) for a total of 3224 outputs).

A standard transaction with one P2WPKH output (124 WU) can have 1738 P2TR keypath inputs (1738 × 230 WU = 399 740 WU).


¹ A P2WSH input with an OP_TRUE witness script would be smaller and considered standard, but I’m sticking to commonly used script types based on a single signature for this answer.
² OP_RETURN outputs can be smaller, but you are only permitted a single OP_RETURN output in a standard transaction.

These numbers are slightly different today after the segwit and taproot softforks got activated.

A standard transaction is limited to 400 000 weight units (WU). The smallest standard (single-sig payment¹) input is a P2TR keypath input with 230 WU. The smallest standard (payment²) output is P2WPKH with 124 WU.

The header of a segwit transaction takes at least 42 WU. For transactions with large input or output counts, the counter will increase from 1 byte to 3 bytes when we have more than 252 inputs or outputs. This means that for the below transactions the header bytes will weigh 50 WU, leaving 399 950 WU for inputs and outputs.

Therefore, a standard transaction with one P2TR input (230 WU) could have 3223 P2WPKH outputs (3223 × 124 WU = 399 652 WU) (and could optionally add one OP_RETURN output (40 WU+) for a total of 3224 outputs).

A standard transaction with one P2WPKH output (124 WU) can have 1738 P2TR keypath inputs (1738 × 230 WU = 399 740 WU).


¹ A P2WSH input with an OP_TRUE witness script would be smaller and considered standard (H/T @instagibbs), but I’m sticking to commonly used script types based on a single signature for this answer.
² OP_RETURN outputs can be smaller (H/T Pieter Wuille), but you are only permitted a single OP_RETURN output in a standard transaction.

Fix off by one in conjunction with greater than, instead of greater or equal
Source Link
Murch
  • 77.8k
  • 35
  • 190
  • 641

These numbers are slightly different today after the segwit and taproot softforks got activated.

A standard transaction is limited to 400 000 weight units (WU). The smallest standard (single-sig payment¹) input is a P2TR keypath input with 230 WU. The smallest standard (payment²) output is P2WPKH with 124 WU.

The header of a segwit transaction takes at least 42 WU. For transactions with large input or output counts, the counter will increase from 1 byte to 3 bytes when we have more than 253252 inputs or outputs. This means that for the below transactions the header bytes will weigh 50 WU, leaving 399 950 WU for inputs and outputs.

Therefore, a standard transaction with one P2TR input (230 WU) could have 3223 P2WPKH outputs (3223 × 124 WU = 399 652 WU) (and could optionally add one OP_RETURN output (40 WU+) for a total of 3224 outputs).

A standard transaction with one P2WPKH output (124 WU) can have 1738 P2TR keypath inputs (1738 × 230 WU = 399 740 WU).


¹ A P2WSH input with an OP_TRUE witness script would be smaller and considered standard, but I’m sticking to commonly used script types based on a single signature for this answer.
² OP_RETURN outputs can be smaller, but you are only permitted a single OP_RETURN output in a standard transaction.

These numbers are slightly different today after the segwit and taproot softforks got activated.

A standard transaction is limited to 400 000 weight units (WU). The smallest standard (single-sig payment¹) input is a P2TR keypath input with 230 WU. The smallest standard (payment²) output is P2WPKH with 124 WU.

The header of a segwit transaction takes at least 42 WU. For transactions with large input or output counts, the counter will increase from 1 byte to 3 bytes when we have more than 253 inputs or outputs. This means that for the below transactions the header bytes will weigh 50 WU, leaving 399 950 WU for inputs and outputs.

Therefore, a standard transaction with one P2TR input (230 WU) could have 3223 P2WPKH outputs (3223 × 124 WU = 399 652 WU) (and could optionally add one OP_RETURN output (40 WU+) for a total of 3224 outputs).

A standard transaction with one P2WPKH output (124 WU) can have 1738 P2TR keypath inputs (1738 × 230 WU = 399 740 WU).


¹ A P2WSH input with an OP_TRUE witness script would be smaller and considered standard, but I’m sticking to commonly used script types based on a single signature for this answer.
² OP_RETURN outputs can be smaller, but you are only permitted a single OP_RETURN output in a standard transaction.

These numbers are slightly different today after the segwit and taproot softforks got activated.

A standard transaction is limited to 400 000 weight units (WU). The smallest standard (single-sig payment¹) input is a P2TR keypath input with 230 WU. The smallest standard (payment²) output is P2WPKH with 124 WU.

The header of a segwit transaction takes at least 42 WU. For transactions with large input or output counts, the counter will increase from 1 byte to 3 bytes when we have more than 252 inputs or outputs. This means that for the below transactions the header bytes will weigh 50 WU, leaving 399 950 WU for inputs and outputs.

Therefore, a standard transaction with one P2TR input (230 WU) could have 3223 P2WPKH outputs (3223 × 124 WU = 399 652 WU) (and could optionally add one OP_RETURN output (40 WU+) for a total of 3224 outputs).

A standard transaction with one P2WPKH output (124 WU) can have 1738 P2TR keypath inputs (1738 × 230 WU = 399 740 WU).


¹ A P2WSH input with an OP_TRUE witness script would be smaller and considered standard, but I’m sticking to commonly used script types based on a single signature for this answer.
² OP_RETURN outputs can be smaller, but you are only permitted a single OP_RETURN output in a standard transaction.

Add more links, incorporate comment from Greg (comment edited May 27, 2023 at 14:13)
Source Link
Murch
  • 77.8k
  • 35
  • 190
  • 641
Loading
edited body
Source Link
Murch
  • 77.8k
  • 35
  • 190
  • 641
Loading
added 145 characters in body
Source Link
Murch
  • 77.8k
  • 35
  • 190
  • 641
Loading
added 145 characters in body
Source Link
Murch
  • 77.8k
  • 35
  • 190
  • 641
Loading
Source Link
Murch
  • 77.8k
  • 35
  • 190
  • 641
Loading