I tried asking the question in this post on bitcoin.stackexchange.com but got no answer. The question is this:
I am trying to understand the output from bitcoin-cli
. The sample transaction’s txid is 061959f1a3360d3781a870b2d43f73f7105b194b22f3765fcb9b8f545f9c8317
, from block 222,222.
The asm
section of scriptPubKey
(i.e., OP_DUP OP_HASH160 28dce60cf7ba4d749afce5fd9781a403d293b74a OP_EQUALVERIFY OP_CHECKSIG
) is more understandable, it decodes hex
and shows the assembly in a (sort of) human-readable format:
0"vout": [
1 {
2 "value": 0.63918136,
3 "n": 0,
4 "scriptPubKey": {
5 "asm": "OP_DUP OP_HASH160 28dce60cf7ba4d749afce5fd9781a403d293b74a OP_EQUALVERIFY OP_CHECKSIG",
6 "hex": "76a91428dce60cf7ba4d749afce5fd9781a403d293b74a88ac",
7 "address": "14j4eyoxaAwA4SHj9YcEyVJ7FsqyWvUh9B",
8 "type": "pubkeyhash"
9 }
10 },
11...
12]
The question arises when it comes to the asm
section of scriptSig
:
0{
1 "txid": "b66e78c919e36a6c563ceb1b29cfec26f7dec3c3fc1b3631c84056f3ae147f2f",
2 "vout": 1,
3 "scriptSig": {
4 "asm": "3045022100dceb566dec99cf195aba5d6313f1e95eb7bfc74c93a794c4bfd6dd9f4082d8a002203b495b70b917b3dffdcbe70fc6ff7de910d1697efccc14f3eea6944bda87d21c[ALL] 0445554717c4d3240d818f400ab66fd4de438f2fd9174641ea76480b95cd6e883ec274a10b0691d85ac2cb87dcb9eef58b3abb8ee4bd277c8d6fea09eace2bc24a",
5 "hex": "483045022100dceb566dec99cf195aba5d6313f1e95eb7bfc74c93a794c4bfd6dd9f4082d8a002203b495b70b917b3dffdcbe70fc6ff7de910d1697efccc14f3eea6944bda87d21c01410445554717c4d3240d818f400ab66fd4de438f2fd9174641ea76480b95cd6e883ec274a10b0691d85ac2cb87dcb9eef58b3abb8ee4bd277c8d6fea09eace2bc24a"
6}
As you can see, it is 304502206ee08c76923816e4ba287142e9f147fe9cd0f26e6bd58b9a43f2283b1c614f46022100d5de298b627407bc7d5ac0a40259cafb865c30c6a67db926c7284da96ff71abd[ALL] 040841958a405ca1c05de4dcf04dfdfd6e7de5e7cb106744977e3d99eab3e59a2b5bc2441e0ad179055c14200745feb2da2d1b4485087e3a9a2a88a6531a6d6b02
, which isn’t really decoded.
I checked the same transaction from blockstream.info. It’s result is: OP_PUSHBYTES_72 304502206ee08c76923816e4ba287142e9f147fe9cd0f26e6bd58b9a43f2283b1c614f46022100d5de298b627407bc7d5ac0a40259cafb865c30c6a67db926c7284da96ff71abd01 OP_PUSHBYTES_65 040841958a405ca1c05de4dcf04dfdfd6e7de5e7cb106744977e3d99eab3e59a2b5bc2441e0ad179055c14200745feb2da2d1b4485087e3a9a2a88a6531a6d6b02
which looks more readable and I can understand that this scriptSig
pushes two byte arrays into the Bitcoin VM’s stack.
So the questions are:
- Why
bitcoin-cli
’s output is like this? - How to interpret it? Especially, how to understand the
[ALL]
part in itsasm
? (Perhaps you can just give me a RTFM link?)