Understanding Bitcoin Script and Transactions

6 replies 486 views
Posts: 252 · Reputation: 12
#1Jan 4, 2019, 09:45 AM
Bitcoin script is super powerful, like a programming language for the Bitcoin network. It's mainly used for transactions, where every output has a locking script and an unlocking script. You know, the ScriptPubKey and the ScriptSig. Basically, scripts have two main elements: Opcodes and Data. Opcodes let you perform different actions on the data, which includes public keys and signatures.
6 Reply Quote Share
0xChadNewbie
Posts: 513 · Reputation: 3
#2Jan 4, 2019, 03:05 PM
True that! But when you're giving examples, don’t throw in a specific address. Like with P2PK, P2MS can't be shown as an address because it ain't wrapped in P2SH or P2WSH. People call P2MS "Bare MultiSig," while the wrapped ones are referred to as "MultiSig." So let’s be clear: they should be called "P2SH-MultiSig" and "P2WSH-MultiSig." Your example is related to P2SH. Try this one instead: 949591ad468cef5c41656c0a502d9500671ee421fadb590fbc6373000039b693.
4 Reply Quote Share
Ba5edGuruFull Member
Posts: 92 · Reputation: 349
#3Jan 6, 2019, 06:20 AM
Yeah, and besides P2WSH... low fees come from block size increases. Plus, the signatures get separated from the transaction hash. That’s known as witness data or witness, so yeah, you nailed it about Segwit vs Legacy.
2 Reply Quote Share
Posts: 252 · Reputation: 12
#4Jan 6, 2019, 07:28 AM
Good catch! The transaction you referenced is indeed a Bare MultiSig. I’ve made the changes needed. Thanks for the heads up!
3 Reply Quote Share
tom2014Legendary
Posts: 79 · Reputation: 4721
#5Jan 6, 2019, 11:59 AM
You might wanna add some resources to your list. Like: address prefixes, Bitcoin Script reading list, and wallets that support output descriptors. Some might need the scripts and descriptors.
0 Reply Quote Share
0xNodeMember
Posts: 671 · Reputation: 80
#6Jan 8, 2019, 08:25 PM
Don’t forget about P2WPKH-P2SH, aka the nested segwit script. It's a P2WPKH wrapped in a P2SH, which means it looks just like any other P2SH for older software.
4 Reply Quote Share
Posts: 252 · Reputation: 12
#7Jan 9, 2019, 12:50 AM
I see your point. I was planning to stick to what I mentioned in my last thread, but since this is a compilation, it makes sense to include both nested segwits. Gonna start on that right away!
1 Reply Quote Share

Related topics