Bitcoin Forum
October 01, 2025, 12:56:23 PM *
News: Latest Bitcoin Core release: 29.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / Re: Questions about version number in block header on: January 27, 2020, 10:09:56 PM
1) I noticed that the version number could be different for blocks. How could we introduce a new version number by soft forking?
A soft fork isn't required to use a different version number. Some numbers cannot be used, but, for the most part, miners can set whatever block version number they want. This is what allows them to use the version number to signal soft fork readiness and also allows them (unfortunately) to use asicboost.


Does this mean that version number actually is not part of the consensus rule, since miners could set whatever version number they want?
2  Bitcoin / Development & Technical Discussion / Questions about version number in block header on: January 27, 2020, 05:45:36 PM
I got these questions while reading the protocol doc.

1) I noticed that the version number could be different for blocks. How could we introduce a new version number by soft forking?

2) Why doesn't it use compact Int to save bytes?
3  Bitcoin / Development & Technical Discussion / Re: Is witness script itself malleable? on: January 27, 2020, 04:56:44 PM
Yes, the scriptWitness is malleable.

While you could malleate a transaction to be larger, I'm not sure why you would. You can't change the fee that is paid by that transaction, so your malleated one would have a lower fee rate than the original, so it would most likely be rejected in favor of the original. That also means that the malleated transaction is less likely to show up in a block than the original transaction. Additionally, such malleation would make the transaction non-standard, so most nodes would discard it regardless of whether they had seen the original.

Since the original transaction and the malleated transaction have the same transaction id, the mempool will accept the first it receives, right? Will mempool compare the fee rate for transactions with the same id?

Users do not have any motivation to malleate the transaction. Just some malicious relaying node could do that. I admit that it's not a big issue in practice.
4  Bitcoin / Development & Technical Discussion / Is witness script itself malleable? on: January 27, 2020, 04:00:30 PM
With segwit, now the transaction id is not malleable. However, I could still modify the witness part during relaying and make the modified transaction still valid. Am I missing something here?

A potential attack is to make the block size larger by making the witness script larger?
5  Bitcoin / Development & Technical Discussion / Re: Can I/Miners spend an output with anyone-can-spend public script? on: January 12, 2020, 10:37:34 PM
Does this mean that by default anyone-can-spend scripts are disabled and cannot be used?

AFAIK it's the opposite.

Since segwit is a soft fork, what would happen if a miner treats some of the segwit outputs as anyone-can-spend scripts (as pre-seg scripts) and spend them in a new block?

Most Bitcoin full nodes (whether it's run by miner, exchange or regular user) would reject such block because there's no valid redeem script or the UTXO is invalid.

Then I don't quite get the point of "Wallets should be wary of any-one-can-spend scripts"
6  Bitcoin / Development & Technical Discussion / Can I/Miners spend an output with anyone-can-spend public script? on: January 12, 2020, 08:03:33 PM
As I am reading BIP 141, there is a sentence saying "Wallets should always be wary of anyone-can-spend scripts and treat them with suspicion."

Does this mean that by default anyone-can-spend scripts are disabled and cannot be used?

Since segwit is a soft fork, what would happen if a miner treats some of the segwit outputs as anyone-can-spend scripts (as pre-seg scripts) and spend them in a new block?
7  Bitcoin / Development & Technical Discussion / Re: Is there any limitation of P2SH? on: January 11, 2020, 11:42:06 AM
Let's start with something obvious,
1. Maximum Bitcoin script is 40000 weight (or 10000 bytes before SegWit activiation)
2. Non-turing complete Opcode

I meant to compare P2SH with all other possible Bitcoin scripts. My bad, I did not express it clear enough.

The first point about script size still stands. Is there any good&useful example on-chain that uses many bytes close to the limits?

Thanks!
8  Bitcoin / Development & Technical Discussion / Is there any limitation of P2SH? on: January 11, 2020, 08:26:06 AM
I just got this thought experiment in my head: can we live only with P2SH?

I like the succinct P2SH approach. It sounds perfect if all the scripts could be done in this way.

Let's ignore segwit for this experiment Smiley
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!