New answers tagged

1

To ensure that the transaction is not tampered with, the owner will SIGN the transaction and then broadcast to the network. Changing any part of the transaction WILL change the transaction's signature and other nodes will DROP that corrupted transactions as message(transaction) has changed. But still the possibility of tampering exists, Because the ...


1

In the context of multsig scripts, the sender should be the one actually including the M of N multsig script in the transaction. But because many senders willing to send to a multsig script would bear the high transaction costs due to increase in transaction size, we use P2SH of a script. So, what the network doing is that it is shifting the cost from the ...


1

When person A "Sends" their transaction, they must first sign it, and then broadcast it to the mempool. The signing ensures that the transaction is not valid if any of the signed portions are changed. Thus, if you change a scriptPubKey, the signature they added to the transaction will be rendered invalid, and when you attempt to broadcast your ...


0

I found where I went wrong. When creating the hashpreimage for the input, I was substituting in the scriptPubKey of the input instead of the redeemScript into the scriptSig.


4

Because Base58 initial 1s carry 8 bits of data, but P2SH addresses cannot be represented with a string with initial 1s so it starts with 3 which, like all other cases & characters, encodes 5.86 bits of data. Since the same number of digits encodes fewer bytes, more digits is needed for P2SH. The P2PKH network byte is 0x00 and the rest is the hash and the ...


Top 50 recent answers are included