script – Q’s about P2WPKH

on

|

views

and

comments


I received some btc in testnet, listed here are the outputs.

that is the UTXO that i get my btc

{
  "worth": 17.24756333,
  "n": 1,
  "scriptPubKey": {
    "asm": "OP_HASH160 71c5584f02c8ccc97e0ef9fa13aa67d989b29c98 OP_EQUAL",
    "hex": "a91471c5584f02c8ccc97e0ef9fa13aa67d989b29c9887",
    "handle": "2N3cnkjDZd1HyGEy2D8oh8957Wcc1Cjzxza",
    "kind": "scripthash"
  }
}

that is the tx enter utilizing above UTXO.

{
  "txid": "a40d14b993b0ec1b3e9f952b1faa746e7abe837619da25f4d3b88d4a063884ed",
  "vout": 1,
  "scriptSig": {
    "asm": "001460491e34d09f5621867187d04473aa5013907f79",
    "hex": "16001460491e34d09f5621867187d04473aa5013907f79"
  },
  "txinwitness": [
    "304402202c740976d5a6c419c7deb205c19e8767a40a0505c2904a2f7f6bc20cb99248a6022046d73a42eb84277cdd5e201ccef5a518d619bfbb2b3f0d634ca043bb18c9bd2601",
    "02085f6490ed441f222a38ddb21277ad5e0f05a7f0e7c76e097e0a9a79ac9c74eb"
  ],
  "sequence": 4294967294
}

i feel they need to comply with that format(P2WPKH)

witness:      <signature> <pubkey>
scriptSig:    <0 <20-byte-key-hash>>
              (0x160014{20-byte-key-hash})
scriptPubKey: HASH160 <20-byte-script-hash> EQUAL
              (0xA914{20-byte-script-hash}87)

however when i do hash160( 0014{20-byte-key-hash} ) in right here, hash outcome shouldn’t be equal to <20-byte-script-hash> within the scriptPubKey. it needs to be equal ,proper ? what’s the downside?

Share this
Tags

Must-read

Waymo raises $16bn to gas international robotaxi enlargement | Know-how

Self-driving automobile firm Waymo on Monday stated it raised $16bn in a funding spherical that valued the Alphabet subsidiary at $126bn.Waymo co-chief executives...

Self-driving taxis are coming to London – ought to we be anxious? | Jack Stilgoe

At the top of the nineteenth century, the world’s main cities had an issue. The streets had been flooded with manure, the unintended...

US regulators open inquiry into Waymo self-driving automobile that struck youngster in California | Expertise

The US’s federal transportation regulator stated Thursday it had opened an investigation after a Waymo self-driving car struck a toddler close to an...

Recent articles

More like this

LEAVE A REPLY

Please enter your comment!
Please enter your name here