Bitcoin Forum
May 24, 2024, 10:29:56 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: 5 Bitcoin Script quirks that every Blockchain developer should know  (Read 97 times)
gjgd (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
November 07, 2021, 07:55:53 PM
 #1

Hi! I wrote an article about Bitcoin Script and thought I'd share: https://gjgd.medium.com/5-bitcoin-script-quirks-that-every-blockchain-developer-should-know-2b4bf05a9aae

First time poster, please let me know if this board is not the appropriate place to post it
titular
Sr. Member
****
Offline Offline

Activity: 287
Merit: 363


"Stop using proprietary software."


View Profile
November 08, 2021, 02:38:42 AM
 #2

Hi! I wrote an article about Bitcoin Script and thought I'd share: https://gjgd.medium.com/5-bitcoin-script-quirks-that-every-blockchain-developer-should-know-2b4bf05a9aae

First time poster, please let me know if this board is not the appropriate place to post it

A lot of people here a pretty hesitant to click random links. You should just paste the write up directly on here!

▄▄███████████████████▄▄
▄██████████████████████▄
███████████▀▌▄▀██████████
███████▄▄███████▄▄███████
██████▄███▀▀██▀██████████
█████████▌█████████▌█████
█████████▌█████████▌█████
██████████▄███▄███▀██████
████████████████▀▀███████
███████████▀▀▀███████████
█████████████████████████
▀█████▀▀████████████████▀
▀▀███████████████████▀▀
Peach
BTC bitcoin
Buy and Sell
Bitcoin P2P
.
.
▄▄███████▄▄
▄████████
██████▄
▄██
█████████████████▄
▄███████
██████████████▄
███████████████████████
█████████████████████████
████████████████████████
█████████████████████████
▀███████████████████████▀
▀█████████████████████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀

▀▀▀▀███▀▀▀▀
Available in
EUROPE | AFRICA
LATIN AMERICA
▄▀▀▀











▀▄▄▄


███████▄█
███████▀
██▄▄▄▄▄░▄▄▄▄▄
████████████▀
▐███████████▌
▐███████████▌
████████████▄
██████████████
███▀███▀▀███▀
.
Download on the
App Store
▀▀▀▄











▄▄▄▀
▄▀▀▀











▀▄▄▄


▄██▄
██████▄
█████████▄
████████████▄
███████████████
████████████▀
█████████▀
██████▀
▀██▀
.
GET IT ON
Google Play
▀▀▀▄











▄▄▄▀
pooya87
Legendary
*
Offline Offline

Activity: 3458
Merit: 10588



View Profile
November 08, 2021, 04:08:47 AM
Merited by Lucius (1)
 #3

Quote
and contains a scriptSig field (the unlocking script) which contains data necessary to spend the transaction
After August 2017 when we got SegWit, another field in each transaction was added called "witness" where we store stack items used in "unlocking" the output. In fact every tx spending a SegWit output has an empty signature script.

Quote
To verify the validity of a transaction, scriptSig data is appended to scriptPubKey data
Wrong.
Each script is evaluated/executed separately. Appending the data is a source for a bug which was fixed in early days.

Quote
It consists of a small set of 255 “asymetric cryptography specific” op codes
OP codes can be from 0 to 255 but there are actually a lot less OP codes defined than 255 (8-bit) since many values are not yet defined and a handful of old ones were disabled.

Quote
a bug in the OP_CHECKMULTISIG implementation
Although commonly referred to as a bug, I don't think this was actually a bug.
I believe that it was a "feature" meant for scalability. Imagine if you wanted to introduce a soft fork where you changed how OP_CHECKMULTISIG works and add additional steps to it. You could technically introduce the new rules for that extra item and the new nodes would pop it, evaluate it as a script and return true/false while old nodes simply ignore it (ie. a soft fork).
Keep in mind that prior to SegWit, BIP-147 (mandating the dummy item to be OP_0) was not enforced.

Quote
Since Segwit, OP_RETURN is also used to store the merkle root of the witness data in Segwit transactions.
Clarification: only used in coinbase transaction and is mandatory only if the block contained any SegWit transactions.

Quote
Because of the need for backward compatible changes in Bitcoin
It is not a "need" but a "preference".

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
gjgd (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
November 08, 2021, 04:42:12 AM
 #4

Thanks pooya, appreciate the clarifications. I updated the post
franky1
Legendary
*
Offline Offline

Activity: 4228
Merit: 4500



View Profile
November 08, 2021, 05:32:13 AM
 #5

blockchains are just about header data.
blockchains can still function without any transactions (research empty blocks)
 
any blockchain developer can put in any 'user data' below the header data. it does not have to be transactional, nor need to be using any of the bitcoin tx format rules. so not all blockchain developers need to know.
 
unless you mean bitcoin forkers.. .. but um.. they are not really blockchain developers. they are just copy/paster script kiddies

unless you mean crapcoin makers using bitcoin 2009-201X source code..

either way. topic title needs an edit

I DO NOT TRADE OR ACT AS ESCROW ON THIS FORUM EVER.
Please do your own research & respect what is written here as both opinion & information gleaned from experience. many people replying with insults but no on-topic content substance, automatically are 'facepalmed' and yawned at
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!