Author

Topic: Are blockchain opcode scripts as low-level as it goes? (Read 750 times)

sr. member
Activity: 318
Merit: 260

You really need to explain what you're trying to figure out or what you're trying to do, because the question doesn't really make much sense.

I was asking if there is anything lower-level

Lower level?

Sure.  There's hex codes.  And even lower than that there are binary digits.  Below that there is polarity in the magnetic domains on magnetic storage media, or charge states in capacitor-transistor pairs in DRAM.

The blockchain itself is made up of block headers and transaction lists.  The block header has no OP_CODES in it at all.  Just 80 bytes of hashes, timestamp, version number, difficulty, and nonce.

The transaction list is made up of transactions, which in turn have version, input counts, inputs, output counts, outputs, and a locktime.

Inputs consist of hashes, length, indexes, a sequence number, and a Txin-script (also known as a scriptSig).

Outputs consist of a value, length, and Txout-script (also known as a scriptPubKey).

The two scripts (Txout and Txin) consist of  0 or more OP_CODES and data elements.

All of these values are represented as binary numbers:
  • hashes
  • versions
  • timestamps
  • difficulties
  • nonces
  • counts
  • locktimes
  • indices
  • sequence numbers
  • lengths
  • values
  • OP_CODES
  • data elements

and if they have a place with partial clients like Electrum.

Yes.  Every piece of client software needs to be able to interpret the blocks and transactions that it receives to be able to determine what it should do with that data.

In addition there are communications protocols implemented for peer nodes to be able to communicate all the necessary information between each other.


Yes I was asking if it was some form of intermediate language and if there was another instruction set maybe with more features. I already know how data is stored..

I was under the impression that Electrum only allowed console scripts without modifying client defaults in source code where they may be filtered by the servers.
legendary
Activity: 3472
Merit: 4801
I knew that much.

You really need to explain what you're trying to figure out or what you're trying to do, because the question doesn't really make much sense.

I was asking if there is anything lower-level

Lower level?

Sure.  There's hex codes.  And even lower than that there are binary digits.  Below that there is polarity in the magnetic domains on magnetic storage media, or charge states in capacitor-transistor pairs in DRAM.

The blockchain itself is made up of block headers and transaction lists.  The block header has no OP_CODES in it at all.  Just 80 bytes of hashes, timestamp, version number, difficulty, and nonce.

The transaction list is made up of transactions, which in turn have version, input counts, inputs, output counts, outputs, and a locktime.

Inputs consist of hashes, length, indexes, a sequence number, and a Txin-script (also known as a scriptSig).

Outputs consist of a value, length, and Txout-script (also known as a scriptPubKey).

The two scripts (Txout and Txin) consist of  0 or more OP_CODES and data elements.

All of these values are represented as binary numbers:
  • hashes
  • versions
  • timestamps
  • difficulties
  • nonces
  • counts
  • locktimes
  • indices
  • sequence numbers
  • lengths
  • values
  • OP_CODES
  • data elements

and if they have a place with partial clients like Electrum.

Yes.  Every piece of client software needs to be able to interpret the blocks and transactions that it receives to be able to determine what it should do with that data.

In addition there are communications protocols implemented for peer nodes to be able to communicate all the necessary information between each other.
sr. member
Activity: 318
Merit: 260
Op codes are part of the scripting in Bitcoin transactions. The blockchain doesn't run those scripts, clients do. The blockchain is essentially just data storage. They way that those scripts work is by putting them in the input and output script of a transaction. All they do is run commands which manipulate the data in the script to result in a true or false. True meaning that the transaction is valid, and false not. Those scripts must be run by any Bitcoin client to verify transactions.

If you want to learn more about the technical and low level stuff with Bitcoin, I suggest that you read the documentation at https://bitcoin.org/en/developer-documentation specifically the reference and the guide.

I knew that much. I was asking if there is anything lower-level and if they have a place with SPV clients like Electrum.

Here goes the full spec on a single page: https://en.bitcoin.it/wiki/Script

Thanks for the response
staff
Activity: 3458
Merit: 6793
Just writing some code
Op codes are part of the scripting in Bitcoin transactions. The blockchain doesn't run those scripts, clients do. The blockchain is essentially just data storage. They way that those scripts work is by putting them in the input and output script of a transaction. All they do is run commands which manipulate the data in the script to result in a true or false. True meaning that the transaction is valid, and false not. Those scripts must be run by any Bitcoin client to verify transactions.

If you want to learn more about the technical and low level stuff with Bitcoin, I suggest that you read the documentation at https://bitcoin.org/en/developer-documentation specifically the reference and the guide.
sr. member
Activity: 318
Merit: 260
I've yet to have time to look through the reference client GIT so I still don't know a lot. Are the opcode scripts as low-level as it gets when interacting with the blockchain? Besides modifying the client of course. If I have the reference client running can I just stream scripts to the JSON server or how does it work?

Side question:Do opcodes have a place with hosted blockchains? Like can I run them as an electrum user?

One thing I do have time for is making a quick IDE with a run feature and syntax highlighting. I don't actually need to run them I'm just interested in more low-level aspects of the blockchain.
Jump to: