<p>They're the same thing. The <code>scriptPubKey</code> is the script in the transaction output.</p>

CC BY-SA 4.0
2019-06-04T18:47:41.437Z
2019-06-04T18:47:41.437Z
Pieter Wuille
<p>The scriptPubKey does not just contain public keys. It is specifically a script. The scrtipPubKey of an output is just the output script, so any arbitrary script in an output will be called the scriptPubKey. They are treated exactly the same as those scripts for pubkeys; there is no special distinction. Such outputs are stored in the chainstate database in the same way.</p>

CC BY-SA 4.0
2019-06-07T07:58:28.693Z
2019-06-07T07:58:28.693Z
Ava Chow
<p>I read 
<a href="https://bitcoindev.network/understanding-the-data/" rel="nofollow noreferrer">https://bitcoindev.network/understanding-the-data/</a>
and it explain that the leveldb of the chainstate contain transaction with at least one unspent output.</p>

<p>And it has "The scriptPubKey and amount for those unspent outputs."</p>

<p>But I read somewhere any OPCODE script is possible for an output.
Where are the non-scriptPubKey outputs?</p>

CC BY-SA 4.0
2019-06-04T18:44:44.207Z
A `scriptPubkey` is an "OPCODE script". See https://en.bitcoin.it/wiki/Transaction#Output
JBaczuk
<transactions><script><output>
Where are the non-scriptPubKey outputs in the chainstate leveldb?
user95951
# Where are the non-scriptPubKey outputs in the chainstate leveldb?

(Asked by: username_0 on 2019-06-04)

I read
<https://bitcoindev.network/understanding-the-data/>
and it explain that the leveldb of the chainstate contain transaction with at least one unspent output.

And it has "The scriptPubKey and amount for those unspent outputs."

But I read somewhere any OPCODE script is possible for an output.
Where are the non-scriptPubKey outputs?

**Tags:** transactions, script, output

> **Comments:**
> **username_1**: A `scriptPubkey` is an "OPCODE script". See https://en.bitcoin.it/wiki/Transaction#Output  

---

## 2 answers

### Answer by username_2 on 2019-06-04. Score: 1

They're the same thing. The `scriptPubKey` is the script in the transaction output.


---

### Answer by username_3 on 2019-06-07. Score: 0

The scriptPubKey does not just contain public keys. It is specifically a script. The scrtipPubKey of an output is just the output script, so any arbitrary script in an output will be called the scriptPubKey. They are treated exactly the same as those scripts for pubkeys; there is no special distinction. Such outputs are stored in the chainstate database in the same way.


---

