November 2018
Intermediate to advanced
528 pages
13h 21m
English
In order to store our message into a blockchain, we will set up two bitcoin clients (a receiver and a sender). Then we will build a raw transaction, sending one bitcoin along with our message.
Technically speaking, one of the best-known practices for storing data in the bitcoin blockchain is to create a zero-value OP_RETURN output. As defined in bitcoin's protocol, the OP_RETURN script opcode enables us to store up to 80 bytes. You can check it out in bitcoin's code base—script/standard.h (see https://github.com/bitcoin/bitcoin/blob/0.15/src/script/standard.h):
static const unsigned int MAX_OP_RETURN_RELAY = 83;
As mentioned in the standard.h header file, the three additional bytes are for the necessary opcodes, and the remainder ...
Read now
Unlock full access