Using BCH's New Multiple OP_RETURN Feature for Censor-Free Chat
On May 15th, 2021, Bitcoin Cash experienced a upgrade adding 2 new prominent features to the network; namely ***Removal of the unconfirmed transaction chain limit*** and ***Allowance of transactions with multiple OP_RETURN outputs.*** The feature we are interested in using here is the multiple OP_RETURN feature. By sending more than 1 OP_RETURN, its possible to manipulate it in such a way that it creates a blockchain-saved group chat that can be accessed and added to by using the same first OP_RETURN value followed by the information you wish to add. Utilizing this method saves your messages on the blockchain in a similar way as Memo.cash or Member.cash does, however, all of the messages are kept on 1 address in the Bitcoin Cash Explorer. Unlike Memo, Members, or other BCH social media services, posting to the blockchain using this method does not submit through open internet protocols that could be intercepted and processed in countries prone to internet surveillance and censorship. What Does This Look Like?
What Do I Need To Do This? A wallet that supports adding custom OP_RETURNs, such as Electron Cash 4.2.4 (Github) https://github.com/Electron-Cash/Electron-Cash ASCII Text to Hex Code Converter; I used this one: Text to Hex Converter https://www.rapidtables.com/convert/number/ascii-to-hex.html String length & byte counter: Link https://mothereff.in/byte-counter BCH Blockchain Explorer that can read OP_RETURN data: BlockChair https://blockchair.com/bitcoin-cash/ How Do I Do It? Open up your wallet that supports adding custom OP_RETURNs, the one I'll be using in this tutorial is Electron Cash 4.2.4 (Github) https://github.com/Electron-Cash/Electron-Cash Once you have your wallet opened, go to the Send tab and type `OP_RETURN , 0` `OP_RETURN , 0` This will be the basis of our transaction format, the first line is where the group name will go and the second line is where the message will go.
Go to https://www.rapidtables.com/convert/number/ascii-to-hex.html The first step here is to click the drop-down box that says "Spaces" and change it to "None"
Now type the name of your "Group" in the top box and click convert; in my case it's BCHGroup1:
Copy the output from the bottom box and put it in after the first "OP_RETURN" like this:
Now go back to the Text to Hex editor and write your message in the top box and convert it, then put it back in after the "OP_RETURN" the same way you did the group name. ***Make sure the name of your group and your message together are equal to or less than*** *****218 bytes********. You can check this here:*** ***https://mothereff.in/byte-counter***
Your message is ready to send! Either click Preview or Send and your transaction will be sent off. Copy your transaction ID and view it on the blockchain explorer. https://blockchair.com/bitcoin-cash/ Go to the transaction page and click on the Top Most OP_RETURN that says the group name to get to the page that will show all the messages
Here was mine: BCHGroup1 - BlockChair Explorer https://blockchair.com/bitcoin-cash/address/d-b73919fa410321c5aa1fd41ef0f2339d To read the OP_RETURN text of any message, click on "Bin" in between OP and HEX next to the box that says "Script" Now you can view everyone's messages there!
Who Can Benefit From Using This? - Conclusion There seems to be potential in using this feature as a public messaging system for groups, specific usernames, and other cases. In the past, some non-blockchain "secure" messaging services have cut off communication between people and groups in times of uprisings. Currently, some governments monitor all traffic and data with certain phrases, words, and web-links being red flags to be watched, arrested, or worse. By using this multiple OP_RETURN feature, people can submit messages in a semi-encrypted manner (by use of Hex Encoding vs plain-text) without the fear of triggering certain words or phrases in oppressive governments, without possibility of removal or censorship. I'm sure people will find more uses for Bitcoin Cash's new multiple OP_RETURN feature in the future and I look forward to seeing what's possible! Thanks for your time reading! The End.
4 comments
I also wrote a similar article to yours but in my case to upload files using BFP. What this will do is that let say I am here at read cash and one day read cash decides to censor most users people could know my bitcoin cash address and now that any OP_return transaction from that address maybe a article that is in .txt format. Your case is for short messages using your wallet my case will be for full articles as long as file is no bigger than 10 kB. I find your article very impressive and I will share it too in noise cash. In case you want to read mine. https://read.cash/@francis105d1/today-is-a-good-day-to-fight-censorship-around-the-world-139c5243 And I will try your findings in the future and write an article too.
Thank you! Nice article man, I just read it; I think upload to BFP might be what this site offers https://notary.bitcoin.com/ but having it in electron cash is cool!
read cash can delete your articles and it is not censorship resistance, but with that work around you could publish your articles but in a file.txt format to save on data space so that you can put as much text as possible to maximize the 10 kB allowance.
And I just visited the website you could also use that for publishing your articles why not it can be any file as long as it is not so big.