Bitcoin Forum
May 02, 2024, 06:12:05 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Are blockchain opcode scripts as low-level as it goes?  (Read 729 times)
DuddlyDoRight (OP)
Sr. Member
****
Offline Offline

Activity: 318
Merit: 258



View Profile WWW
March 11, 2016, 05:52:55 PM
Merited by ABCbits (1)
 #1

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.

I have faith that one day this forum will get threads where people won't just repeat their previous posts or what others have already stated in the same thread. Also that people will stop acting like BTC is toy-money and start holding vendors accountable. Naive? Maybe.
"Bitcoin: mining our own business since 2009" -- Pieter Wuille
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714630325
Hero Member
*
Offline Offline

Posts: 1714630325

View Profile Personal Message (Offline)

Ignore
1714630325
Reply with quote  #2

1714630325
Report to moderator
1714630325
Hero Member
*
Offline Offline

Posts: 1714630325

View Profile Personal Message (Offline)

Ignore
1714630325
Reply with quote  #2

1714630325
Report to moderator
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3388
Merit: 6571


Just writing some code


View Profile WWW
March 11, 2016, 06:02:18 PM
Merited by ABCbits (3)
 #2

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.

DuddlyDoRight (OP)
Sr. Member
****
Offline Offline

Activity: 318
Merit: 258



View Profile WWW
March 11, 2016, 06:12:53 PM
 #3

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

I have faith that one day this forum will get threads where people won't just repeat their previous posts or what others have already stated in the same thread. Also that people will stop acting like BTC is toy-money and start holding vendors accountable. Naive? Maybe.
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4613



View Profile
March 11, 2016, 06:30:31 PM
Merited by ABCbits (3)
 #4

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.
DuddlyDoRight (OP)
Sr. Member
****
Offline Offline

Activity: 318
Merit: 258



View Profile WWW
March 11, 2016, 10:03:41 PM
 #5


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.

I have faith that one day this forum will get threads where people won't just repeat their previous posts or what others have already stated in the same thread. Also that people will stop acting like BTC is toy-money and start holding vendors accountable. Naive? Maybe.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!