Latest news about Bitcoin and all cryptocurrencies. Your daily crypto news habit.

Since the recent Bitcoin Cash (BCH) upgrade, the protocol now has some newly added features like the re-enabled opcode OP_Checkdatasig. After the implementation, a few developers have been experimenting with the opcode and have developed concepts such as âspending constraints.â Moreover, in another instance, a programmer recently used the opcode to create an onchain chess game on the BCH blockchain.
Also Read:Â BCH Upgrades: Whatâs New and Whatâs Next
Spending Constraints
Over the last week, BCH supporters have been slowly trying to move away from the recent blockchain split and concentrate on building. One example of this is a recent proof-of-concept written by a BCH developer called Pein Sama, which uses the opcode OP_Checkdatasig to explore new capabilities. Sama details that before the Bitcoin Cash upgrade, the BCH script was limited to someone specifying that one could spend a coin but at the time there was no way of adding constraints on how it could be spent. The developer then demonstrates how it is now possible to create spending constraints with the new BCH coding language called Spedn.
Spending constraints using OP_Checkdatasig as described by the developer Pein_Sama.Â
After Sama published his idea, the BCH community discussed the concept of spending constraints and other ideas like covenants as well. A few people specifically discussed the end of Samaâs documentation, which says the concept could produce things like OP_Return based tokens that are âminer enforceable.â The programmer explained that it could be argued that OP_Group is a cleaner way of adding native tokens, but he didnât have a strong opinion on the matter. âMy article is just exploring the new land,â the developer noted on the Reddit forum r/btc.
A Game of Chess
Not long after the published post about spending constraints with the opcode OP_Checkdatasig, a developer named Tobias Ruck was inspired by the opcode exploration and designed a chess game with the new feature. Because chess rules are deterministic, they can use a third party to help enforce the rules of the game and thatâs where OP_Checkdatasig comes into play. By utilizing the ânifty spending constraintsâ originally published by Sama, Ruck shows how the concept can be applied to a game of chess.
âThe good thing about chess is that its rules are deterministic, so no need to throw dice or do some cryptographically secure pseudo-random number generator magic,â Ruck explained in his recent blog post. The developer continued by describing the benefits of using OP_Checkdatasig as trusted oracle within a game of chess by stating: Â Â Â
If Kasparov were to challenge Anand for a round of chess, they might trust some third party (referee) or even each other to enforce/follow the rules, but if they are anonymous people on the internet playing for not insignificant amounts of money, it would be good if the rules of the games didnât require a trusted third party. Â Â
In his blog post, Ruck further elaborated how chess can be played with the new opcode and implemented the concept into a Python environment. This is where Ruck adds the âjuicy partsâ of the code, like operations such as âapply_move,â âwhite_has_won,â âblack_has_wonâ and âis_stalemate.â After messing around with the program some more, Ruck eventually runs into the situation where a stalemate occurs and the game ends as a draw. Ruck explains that if the game was being played for a 1,000 satoshi incentive âneither white nor black can get any of the 1,000 satoshis, except if they agree to a draw and split the money.â
A look at the chess game code developed by Tobias Ruck.
The chess game creator also explains there are a few issues that could arise, like someone not making a move and the 1,000 satoshis getting locked into the blockchain forever. But Ruck says that a lock time could be added and the game will end after a certain amount of time has passed. Overall, Ruckâs chess concept is extremely raw and basic but shows how the opcode could be applied to all types of decision-based games. In conclusion, the developerâs blog post states that he hopes he was able to convey the idea of a chess game using OP_Checkdatasig as trusted and autonomous referee.
Building a Turing Machine on Top of the Bitcoin Protocol
After publishing the onchain chess game and while experimenting with the new opcode, Ruck realized that it is possible to build a Turing machine on top of the Bitcoin protocol. The researcher published a followup post, which shows how he simulated an old programming language using the BCH script.
âA simple way to show Turing completeness is by simulating a Turing machine,â Ruck details in his second blog post. âFor that, weâll pick a derivative of Smallfuck, an esoteric programming language, which has been shown to be Turing complete â If we can simulate that on Bitcoin, we know itâs Turing complete,â the programmer adds.
After showing how it can be done using the new opcode OP_Checkdatasig, Ruck emphasized that the Bitcoin protocol is Turing complete giving the technology a myriad of use cases. Ruck further adds that if developers optimized the code a âfully fledged and operational Bitcoin virtual machine (VM)â could be built. Ruck also adds that people who claim Craig Wrightâs propositions âwere right about OP_Checkdatasig introducing loops in the Bitcoin script are just wrongâ and this is âfalseâ information. âThe idea that you could call another transaction by checking a signature is just ludicrous,â Ruckâs blog post states. In order to keep loops spinning, Ruckâs details that the program has to be fed with more satoshis per loop in a similar fashion to the Ethereum networkâs gas limit. Â Â Â
What do you think about the chess game that uses the BCH opcode OP_Checkdatasig as an autonomous referee? Let us know what you think about this subject in the comments section below.
Images via Shutterstock, Honest.cash, Pein Sama, Pixabay, and Tobias Ruck.Â
Express yourself freely at Bitcoin.comâs user forums. We donât censor on political grounds. Check forum.Bitcoin.com.
Disclaimer
The views and opinions expressed in this article are solely those of the authors and do not reflect the views of Bitcoin Insider. Every investment and trading move involves risk - this is especially true for cryptocurrencies given their volatility. We strongly advise our readers to conduct their own research when making a decision.