bitcoin-code
bitcoin-code copied to clipboard
Why "1976a914" in txnUtils.py?
bitcoin-code/txnUtils.py has the following function defined:
# Substitutes the scriptPubKey into the transaction, appends SIGN_ALL to make the version
# of the transaction that can be signed
def getSignableTxn(parsed):
first, sig, pub, rest = parsed
inputAddr = utils.base58CheckDecode(keyUtils.pubKeyToAddr(pub))
return first + "1976a914" + inputAddr.encode('hex') + "88ac" + rest + "01000000"
What is this magic number? -> "1976a914"
What is this magic number? ->
"1976a914"
I suspect that this is a snippet of bitcoin script. If that is the case, these bytes, would mean:
- 0x19 = decimal 25: rpush25 to push 25 bytes onto the stack
- 0x76 = decimal 118: op_dup to duplicate the top item on the stack and push it on top.
- 0xa9 = decimal 169: op_hash160 to calculate the ripemd160(sha256(x)) where x is the top item on the stack and to push the result on top
- 0x14 = decimal 20: rpush20 to push 20 bytes onto the stack.
Later on the same line, "88ac" would be:
- 0x88 = decimal 136: op_equalVerify to compare the 1st and 2nd items at the top of stack and to fail immediately if they're not equal.
- 0xac = decimal 172: op_checksig to check a signature, pushing 1 onto stack if valid and 0 onto stack if invalid.
I use https://en.bitcoin.it/wiki/Script as a reference.
But that's not why I'm here.
I'm here to ask if you'd consider giving Polish translations another attempt, like you did in pr206, over at krux. I believe that krux has made progress with a few missing diacritic-symbols that were needed in the font set (to be merged once there are translations which use them). As well, I will go out of my way to help you, if you need it, so that you're using the very latest translatable message-ids. Tracking krux has just gotten easier because v23.09.0 was released just last week, so if you were to do what you did over the summer, everything would work now that selfcustody's repo is up-to-date.
I hope to hear from you soon. If not, have a great week.