Bitcoin Forum
June 14, 2024, 01:40:43 AM *
News: Voting for pizza day contest
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Bitcoin Discussion / Re: Was scriptPubKey a mistake? on: April 29, 2024, 12:24:57 PM
Could you provide any Script, that cannot be converted into TapScript, and committed to some public key?
A Taproot output requires a witness program to unlock. If we're talking about serializing existing spent outputs (historical data), converting them into P2TR would make their spending transactions invalid, as most of them weren't (and couldn't be) unlocked using a TapScript witness. You can't change the scriptSigs on the inputs either (or convert them into witnesses), since you don't have the private keys used to sign them. So by doing that, you would make it impossible to verify the integrity of the blockchain.

I know that they were. But note that P2PKH could be wrapped into P2PK, if needed. And the same with every other Script. Your question was "if Bitcoin was invented today", and not "if Bitcoin was released with two standard address types". Because if I would want to release some new altcoin today, then I probably wouldn't add "pubkeys behind hashes", but everything would be committed to the public key instead, similar to how P2TR works (but probably with prefixes like 02 and 03 for all public keys, including signature R-values).
Oh, I see what you mean now. If P2PKH used Schnorr signatures to begin with, it would be possible to preserve the uniform output format and just add new types of scriptSig/witness later. Sure, this might be a better option. You would still have to discern between the different input types, same way Taproot uses different validation algorithms depending on witness length. This basically moves the enum into the input, so until an output is spent, an external observer wouldn't know what kind of transaction it is, or whether it is even spendable.

2. Changing fees does not require touching consensus rules, so it is possible to lower fees, without touching the block size limit.
The fees depend on how many transactions can fit inside the block. If we could make transactions smaller, it would automatically lower the fees (given constant demand). Same way SegWit did.
2  Bitcoin / Bitcoin Discussion / Re: Was scriptPubKey a mistake? on: April 28, 2024, 09:05:09 PM
Are you certain that the Segwit V0 and Segwit V1 will be working on them?

Sure, why not? Those would become another enum value each. E. g. output type 4 is for P2WPKH, the expected payload is a 20-byte key hash. Output type 5 is for P2WSH, the expected payload is a 32-byte witness script hash.

Not really, because you can locally store your data in whatever format you want. So, if you create a converter between the original format, and your own format, then it could be fine, without any hard-fork.

That wouldn't achieve much, though. I'm talking about the format that Bitcoin nodes use to exchange data. Also, not all transactions that exist on the current blockchain can be serialized that way. More explicit standardization would be one of the goals for this change; it can't be achieved by a client-side implementation.

Maybe, but not in the way you think. In general, if you read the whitepaper, then it describes only one address type: P2PK. And also note that you can get all address types behind nothing more than a public key, if you use the latest address type, which is P2TR.
Both P2PK and P2PKH were available in the first released version of Bitcoin, see this message.

Which means, that if we would have P2PK, and nothing else, then other address types could be added behind a regular signature. Which means, that the first version could allow only public keys and signatures, but some later upgrade could add Script into the whole equation, while keeping it committed to the public key, and while still requiring a valid signature (and also a valid script, just like P2SH was added, to require not only a valid stack push, but also executing it).

I'm not sure what you mean? Bitcoin script was available from the beginning. There was never a transaction type that wouldn't use script.

If your main goal is just data compression, and nothing else, then it would be a no-fork. Which means, that you don't even need a soft-fork to do that, but you can implement your own version, without asking anyone for permission. The only reason, why standardization would be a good idea, is to improve performance, and exchange data between new nodes in a new format, without the need of constantly converting it back and forth.

If it somehow became the standard way of storing transactions, block size and fees would be calculated based on transaction size serialized this way. Which means more transactions in a 1MB block and lower fees.
3  Bitcoin / Bitcoin Discussion / Was scriptPubKey a mistake? on: April 28, 2024, 08:04:47 AM
The original release of Bitcoin included the ability to use arbitrary lock scripts in scriptPubKey, but that ability was relatively quickly limited by introducing the standardness check. While arbitrary lock scripts are still valid from the consensus point of view, you would have to work with a miner to get them included into the blockchain, as only a few standard transaction types will be relayed by nodes in the default configuration.

It is still possible to use custom scripts through P2SH/P2WSH/P2TR. They have significant advantages over placing the unlock conditions in scriptPubKey. So there's no practical issue with the standardness check.

But it does mean that scriptPubKey has effectively become a weird binary format to define several standard transaction types in a very inefficient way. It requires each node to match the script against a few templates to determine what to do with the transaction. It is no longer generic, as some opcode combinations trigger special transaction processing, such as the extraction and additional evaluation of the redeemScript in P2SH.

The same could be achieved by replacing scriptPubKey with an enum field for output type and a payload field for details. It would slightly decrease transaction size and computation requirements to verify it. It would also make building applications that interact with the blockchain easier, since developers would no longer have to implement nonstandard transaction handling. One could be certain that if a transaction doesn't have a destination address, it's P2PK, bare multisig or OP_RETURN. No other options would be possible.

E. g. if output type is 1 (for P2PKH), the payload field contains a 20-byte key hash. Assuming that the output type field takes 1 byte, this saves 4 bytes per a P2PKH output. The opcodes OP_DUP OP_HASH160 OP_PUSHBYTES_20 OP_EQUALVERIFY OP_CHECKSIG are all replaced with output type.

If output type is 2 (for P2SH), the payload is a 20-byte redeemScript hash. We save 2 bytes per P2SH output. And so on.

I understand that such an upgrade would require a hard fork, and we don't do that in Bitcoin. However if that was somehow no longer a limitation, e. g. if Bitcoin was invented today, would removing scriptPubKey be the right thing to do? Are there any upsides to the current situation other than that it's what we have?

(I'm sure this question has been asked many times before, but I couldn't find much info by searching.)
4  Bitcoin / Development & Technical Discussion / Re: CoinShuffle++, a fast peer-to-peer coin mixing protocol on: April 24, 2024, 09:49:33 AM
I recently found out about CoinShuffle++, and it seems really interesting. However the only implementation I could find that is still active is the one by Decred. It makes a few modifications to the protocol. Namely they use DiceMix Light with a centralized server and ephemeral peer session keys (as stated on GitHub). Their docs state that it's okay, since "CSPP ensures anonymity even while trying to join a session hosted by a malicious server." Could you please clarify if that statement is still true given their modifications? I don't see how it could be.

If my understanding of the paper is correct, a malicious server could perform an active MITM attack on the key exchange between the peers and later learn the contents of all the messages they exchange. However to do so the server would have to impersonate each of the peers using a fake signing key. Since that key no longer corresponds to an actual UTXO on the blockchain, the peer that is being impersonated would be unable to produce a valid transaction signature using the signing key which the other peers expect. This leads to confirmation failing, so no anonymity is lost.

But if one used ephemeral keys, this is no longer a limitation. Am I missing something, or is there nothing stopping the server from performing this attack undetected?
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!