Skip to content

How to spend Bitcoin by solving "x + 2 = 3"

This was a short presentation to introduce Script, the programming language of Bitcoin. Presentation was held at the Trondheim Open Blockchain Meetup, 19. November 2021.

Demo session

In the demo session of the presentation, I went through some simple locking script and the audience helped figure out the unlocking scripts.

To debug the programs, we used meep debugger. To view the transactions below in meep, run meep debug --tx=<transaction ID>.

Transactions from the demo session (published to the Bitcoin Cash chain):

  • b3cc66cfb29209eabe213991c9bff97b93dcb59beb3763c80b54244ded1a9eeb.
    Locking script: 2 OP_ADD 3 OP_EQUAL. This one has the solution to the title of the presentation.

  • 1b1e4d853c3da07406b3695dabbae69def4fd0fc1b7e9cf5642ddb4364283c16.
    Locking script: 3 OP_EQUAL

  • fb0b694b24431f0156b93b2197a0ea8dd435e8566cd8bb90542ef139311d682e.
    Locking script: OP_REVERSEBYTES <DIGGS> OP_EQUAL.

  • ee5994f6f03e0e6aea46d4491d74b8595b5ac950e3f20a870bdafe264d823b3a.
    Locking script: OP_DROP OP_DROP OP_NIP. If the audience figured out this one, the transaction would be a donation to EatBCH. The audience figured it out.