BSV
$53.29
Vol 32.1m
-1.77%
BTC
$95676
Vol 38627.73m
-1.66%
BCH
$444.88
Vol 334.99m
-1.58%
LTC
$99.82
Vol 793.67m
-0.82%
DOGE
$0.31
Vol 4989.09m
-4.1%
Getting your Trinity Audio player ready...

Steve Shadders, chief technology officer at nChain, has put out a call to action. If you’re a Bitcoin SV (BSV) app developer, his new article, “The return of OP_RETURN – roadmap to Genesis part 4” gets into the history of OP_RETURN, and a specific but simple thing you’ll need to do before the Genesis upgrade hits in February 2020.

OP_RETURN was part of the original Bitcoin code, but as Shadders explained, due to a critical problem with the way transactions were handled at the time, Satoshi Nakamoto had to implement a change to it to avoid potential disaster. If OP_RETURN was used in a specific way, “The signature check is never performed and the script is considered valid because the top stack item is a Boolean ‘true,’” he writes. “In fact it doesn’t matter what the locking script is. This behavior could be exploited to spend any bitcoin at all.”

Satoshi’s fix was “to make OP_RETURN always exit and FAIL the script.” Shadders guesses that Satoshi used this as his method of fixing the code because it was simple and it would work, and he was pressed by the potential that someone would exploit the code before he could fix it. Improving OP_RETURN would have been much more complicated and time consuming, so he went for the simplest solution at the time.

Shadders notes though that as BSV adopts the Genesis upgrade, this is all going to change. “The way we are all using OP_RETURN right now is going to get broken if we fix OP_RETURN,” he says. “But don’t worry too much, it’s an easy fix and we can start right now.”

So, as an app developer, what do you need to do? “There is something very simple you can do right now that will ensure your app will maintain consistent behavior both now and after the Genesis upgrade. Instead of starting your script with OP_RETURN, start it with OP_FALSE OP_RETURN,” Shadders writes. It would effectively make your code look like this:

OP_TRUE | OP_FALSE OP_RETURN

He notes that as of version 0.2.1, this code will work, so it can be implemented right away. He also clarifies that old OP_RETURN outputs will not suffer as a result of the change. But the change needs to be made. He concludes by explaining the call to action:

The above section was titled ‘call to action’ and that’s exactly what this article is. You can change your code right now because OP_FALSE OP_RETURN behaves functionally identical to a simple OP_RETURN on its own right now. The sooner your app supports this the sooner you can forget about it. The behavior of this script type won’t change after the upgrade. So please update your software ASAP. We are now 7 month out from the return to Genesis. There is a lot of work to do both in the Bitcoin SV as well as in the wallet and app ecosystem. We can knock this one off now so we can focus on the other stuff later.

https://www.youtube.com/watch?v=gBb9FSxfyVs

Recommended for you

Google unveils ‘Willow’; Bernstein downplays quantum threat to Bitcoin
Google claims that Willow can eliminate common errors associated with quantum computing, while Bernstein analysts noted that Willow’s 105 qubits...
December 18, 2024
WhatsOnChain adds support for 1Sat Ordinals with new API set
WhatsOnChain now supports the 1Sat Ordinals with a set of APIs in beta testing; with this new development, developers can...
December 13, 2024
Advertisement
Advertisement
Advertisement