What is an "empty vector" in Bitcoin?

Probably the lowest-IQ question ever, but what does empty vector represent in Bitcoin? Is it a single byte 0x00 (value 0) or is it literally nothing ("air") or maybe both depending on the situation?

In BIP342, the following is written for OP_IF and OF_NOTIF :

Consensus-enforced MINIMALIF The MINIMALIF rules, which are only a standardness rule in P2WSH, are consensus enforced in tapscript. This means that the input argument to the OP_IF and OP_NOTIF opcodes must be either exactly 0 (the empty vector) or exactly 1 (the one-byte vector with value 1).

I assume that here empty vector represents literally byte 0x00 (value 0) on the stack, thus it is not an "air" (nothing). I have that assumption because if the empty vector here represents an "air" (nothing) then it would require totally empty stack to perform these opcodes.

In the same BIP, for signature opcodes (OP_CHECKSIGADD, OP_CHECKSIGVERIFY and OP_CHECKSIG) and signature check it says that if the signature is an empty vector then different behaviors are performed than in pre-Taproot. I assume that here empty vector literally represents an "air", i.e. the witness item with length 0.

At the end, in the BIP342, it writes that if the signature is an empty vector ("air"; witness item with the length 0), then OP_CHECKSIG will push an empty vector onto the stack and execution continues with the next opcode. I assume that the empty vector in the case of opcodes (OP_CHECKSIG in this case) also represent byte 0x00 (value 0), since there is no point to push literally nothing ("air") onto the stack.

  1. Am I right or wrong? Does empty vector actually represents the (3) option from the first paragraph, thus in case of stack it represents 0x00 and in case of witness stack it represents item with the length of 0? If not, can you tell me what the empty vector represents.
  2. Would a witness item of length 1 and value 0x00 also be considered an empty vector so that the signature check also would not be performed in the case of Tapscript?


from Recent Questions - Bitcoin Stack Exchange https://ift.tt/UjcLWVb
via IFTTT

Comments

Popular posts from this blog

Do Kwon’s Detention Prolonged Until 2024 As Montenegro Responds To Extradition Requests

Sam Bankman-Fried Trial Begins Tomorrow: 3 Reasons Ex-SEC Official Foresees Conviction

Ethereum Price Plummets 9% As Fed Chair Passes Hawkish Remarks