[ANN] peercoin-OP_RETURN

I ported the python-OP_RETURN commandline tools and lib to work on the peercoin chain.
[size=14pt]https://github.com/PeerAssets/peercoin-OP_RETURN[/size]

Now you guys can all follow my lead and put some graffiti on the chain!

If you like it, please donate on my ppc address in signature :wink:

txid:d0c97d4373d24e6581286ebd149b7c5da13e887b9a17584813dd4f4b72eeecc4
https://chainz.cryptoid.info/ppc/tx.dws?d0c97d4373d24e6581286ebd149b7c5da13e887b9a17584813dd4f4b72eeecc4.htm

;D

[member=31975]saeveritt[/member] asked in the chat why his OP_RETURN message has an L in front of his text: https://chainz.cryptoid.info/ppc/tx.dws?1026201.htm

The short answer is: It’s a bug on the cryptoid website.

The long answer:

Let’s have a look at the json version of the txn output:

{
         "value": 0,
         "n": 2,
         "scriptPubKey": {
            "asm": "OP_RETURN 5468616e6b20796f7520666f7220796f757220776f726b20616e642064656469636174696f6e2c20706565726368656d6973742e20596f757220667269656e642c207361657665726974742e",
            "hex": "6a4c4c5468616e6b20796f7520666f7220796f757220776f726b20616e642064656469636174696f6e2c20706565726368656d6973742e20596f757220667269656e642c207361657665726974742e",
            "type": "nulldata"
         }
      }

scriptPubKey holds the full script of the transaction output, this is the smart contract code and an OP_RETURN output is a specific form of smart contract. (Read more here: https://en.bitcoin.it/wiki/Script)
You see both the asm and hex representation. If you decode the hex data in the asm representation (everyting coming after “OP_RETURN”), you get:

5468616e6b20796f7520666f7220796f757220776f726b20616e642064656469636174696f6e2c20706565726368656d6973742e20596f757220667269656e642c207361657665726974742e
->
Thank you for your work and dedication, peerchemist. Your friend, saeveritt.

You get exactly what [member=31975]saeveritt[/member] has posted.

However, if you decode the hex representation, you get:

6a4c4c5468616e6b20796f7520666f7220796f757220776f726b20616e642064656469636174696f6e2c20706565726368656d6973742e20596f757220667269656e642c207361657665726974742e
->
jLLThank you for your work and dedication, peerchemist. Your friend, saeveritt.

You can see three bytes added to the front: “6a 4c 4c”

The hex represention contains the full script and these three bytes are:

6a: OP_RETURN
4c: OP_PUSHDATA1
4c: 76 -> the length of the OP_RETURN message: you can PUSH up to 75 bytes with a single OP code, and pushing 76-78 bytes requires OP_PUSHDATA1 <len> <data>

4c is also the utf-8 code for “L” and the cryptoid page fails to identify the third byte as not being part of the message data and therefore adds it to the front of the message.

[member=32827]hrobeers[/member], Thank you for the thorough breakdown. It is clear to me now how cryptoid is improperly identifying the third byte.
I found this useful for identifying the script opcode and hex identifiers https://en.bitcoin.it/wiki/Script if anyone is interested.

The first +80 byte OP_RETURN has made it into the chain! Thanks to the PARS (https://www.peercointalk.org/index.php?topic=4684.0)

txnid: 3eace20c260a93865146f5d0761350e01079d9d933bbbbd0ed9dc52241ce261e
data:
Ezekiel 25:17 The path of the righteous man is beset on all sides by the iniquities of the selfish and the tyranny of evil men.
Blessed is he who in the name of charity and good will shepherds the weak through the valley of darkness,
for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger
those who attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee.

Brought to you by:
 _               _
| |             | |
| |__  _ __ ___ | |__   ___  ___ _ __ ___
| '_ \| '__/ _ \| '_ \ / _ \/ _ \ '__/ __|
| | | | | | (_) | |_) |  __/  __/ |  \__ \
|_| |_|_|  \___/|_.__/ \___|\___|_|  |___/

https://twitter.com/hrobeers
https://github.com/hrobeers

I scanned through peercoin’s blockchain. So far I’ve found 43 transactions wit a OP_RETURN.

of which 4 of them are books, :stuck_out_tongue:

For those interested, here’s the list:

2d101a202de7b468a43649bd6eda9dcd6372ba368e829c1e0e5f62640c0bee04
b667c4e688fd58524d04579c41422e1399bc0419c51a859816c182da4db2eac4
1be889aa7dcfe6f16e87d7cdcf50d63881d4e9ece0540df0d54957d0da8f7e3e
74c2bdc85633b2df3a8ce824d18d4bf24bdf3d053a5cdc13928170318bdfe311
d6abd64079a71cfafc21c97a826fd4150c483be6f9f9aa8ce7d5ea4c40d5f544
e3eb21a723322276955723eb07dd846604ea1fd6b64dcb2c3bbc6d793d6f8ed1
ea94489d351047acc6e219ebe9aa6e2c6379290128c9a55ac5a2edd9ab12b696
162611abae24e0240f27b071f95dbebacab10dedbdb10cf6708dd633d85d8762
5d2c6d1c8c8ffad50e2fa5292e93a723e6c8caef044558c0ad5539ad7a5fdeab
d0c97d4373d24e6581286ebd149b7c5da13e887b9a17584813dd4f4b72eeecc4
8baddc69aff7873b3ca0bf5fb94a8487611c9aacb7a0f3bcaf90d501f955ad77
676e6399a825463b6178d4e7aebdd2388d203fee5c9bd4f603a14b1798b3dd23
3eace20c260a93865146f5d0761350e01079d9d933bbbbd0ed9dc52241ce261e
904735eee7022391dff3bac4b7247fa75781a78fd6b28664b9478adefbb4b42d
86ac25ea3d4d7130e367637c38b4401e9c8d47621d537340c86b90c3aa375b99
3154d03bcc1f8fbfd89f2c3672567791187c95ba97d55ca05eca2ab4f40c3430
4f93e7897365b7c8baae5701a4e0df6d9ee9bf91b5f5873cacc81eb6206875c1
024376b4de6773f5ce10bd21962ba2585a0508684f9d74d5abd517ced0163e0d
53b79dff9c592d8377773c88eb46a1c692aad362db5985d49b30ea4bed0a0c9a
f40b4c7e97f2e83d1923481c19aed2f6ccaee470c636f7857dc4c970113df204
0a440999bafedbdf0e3bdc52f6bdb8caf9634cb38cfef84c8fc2a8ad3f853059
7c126ee20c5cdc4c8717fe00aa953c402c19b0e3b8a4adac5b848723960a2e4e
7fb10faa0d3bdea0a829a9ae62e22b1804db1be2fc5c1ec077bd4bbedea38792
fcd39b0d90c45afdc7c36e7470d9ed58f88b59c770a42ef0708dc150548cca37
5a95c29d65f336841758918b3ce280bb00a99afe4150ddb876a37179b2dd6849
9c74d612127f46d3142783b433ebb5c1ca8cb832722f52d015c944b3aaede2db
7af6178839f7638b0d0ea12af27bef1336f44e1b9da201ceb9f294504fa084e6
ea01f06b6a43489c1a5c855691b6e4385b115280fbc618acca4b792d270f890e
c99dc1cbe4e6e58ce29fa3d7983f6e9b556155a0c1f40ac0d9d34f1d393ce5d7
c371fe113d1347210605b2460696a560dc3285a5d964d4ca7b5c37b91e6b582f
1191dfbb7f853a7771e8a546618bef6224d92b265121dce9f0eadc4e7f6531e5
b63c605cc736abff22e60fc2bdf777ff26cf013285672a9202ee64ded3560f03
1553e29d2978a954bbfcac54bea7ad7834c91a68525fa50f595c7ab6c40338e4
33cc49d4662a942713017e91b313c44d778d56453be018a30ad02e2a50788826
decd9fb6039d46ff456a9273b4b43b42cae33d50aa6ed12eedc02e3265ca2cc3
6eb6cf11bb7fc38e8b2acbfbb20c86ab1502f969c3c6ca5f34dc71751c30eabf
a5e04dbaf2bfadf5654c19dc643b187b2cfa23b82024c0f9a17972328c70cf39
34899441d5bd69cc1224987458072188468a8a6ab8e4cf18c6e2687c5ad90465
3139f6a1e6f0c5704ad371dd3e3934b1c820c119f6f540b9dd4fe67bc1503621
41f9d808ea0a2ab5864eef897268908f78b5506d6b83330c4f6f6b50a011ccd7
8340df3fc5e6d40278c3f50b7a379e3aeb775c2fa1e11cbbedfcf4fc10ae0635
3b77a1de88c4e0f5c50ec5c65d79fa427a58c6e712cd7d2793eaa8ca48c04181
56a32bcc632653cce4c67b78aae9a481562d2db6868fff5813777e1d918e3c1e

1 Like