IP Library Granted Patent US 12,373,593
Granted Patent B2
US 12,373,593 · App. 17/611,554 · Granted Jul 29, 2025

Using blockchain transactions to provide off-chain functionality

Inventors: Chloe Tartan (London, GB); Jack Davies (London, GB); Jad Wahab (London, GB); Wei Zhang (London, GB); Owen Vaughan (London, GB); Craig Wright (London, GB); Bassem Ammar (London, GB)
Assignee: nChain Licensing AG
G06F21/6227G06F9/4484G06F9/466G06F9/485H04L9/50
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,373,593
App. No.
17/611,554
Granted
Jul 29, 2025
Kind
B2
Abstract

A method of executing transactions of a blockchain network. A first transaction comprises at least a first output comprising a first locking script of a stack-based scripting language, the first locking script comprising a portion of the first locking script to be executed before a first instance of an opcode is executed. A second transaction comprises a first unlocking script that references the first output in the first transaction. Upon executing the first instance of the opcode, execution of the first locking script is terminated whilst not invalidating the first transaction. A first data element is read from at least one stack, wherein the first data element is generated during execution of the first unlocking script and the portion of the first locking script. The first data element as read from the at least one stack is supplied to an off-chain function, wherein the function is configured to generate a result based on at least said first data element.

Claims (40)

1. A computer-implemented method of executing transactions of a blockchain network, wherein a first transaction comprises at least a first output comprising a first locking script of a stack-based scripting language, wherein the first locking script comprises a portion of the first locking script to be executed before a first instance of an opcode is executed, wherein a second transaction comprises a first unlocking script that references the first output in the first transaction, and wherein the method comprises, upon executing the first instance of the opcode:

terminating execution of the first locking script whilst not invalidating the first transaction;

reading a first data element from at least one stack, wherein the first data element is generated during execution of the first unlocking script and the portion of the first locking script; and

supplying, to an off-chain function, said first data element as read from the at least one stack, wherein the function is configured to generate a result based on at least said first data element,

wherein the first transaction comprises a plurality of outputs each comprising a respective locking script, wherein each of the plurality of outputs is referenced by a respective output address, wherein said first data element is an output address referencing a second one of said outputs, and wherein the first output is referenced in the unlocking script of the second transaction; and

wherein the off-chain function is configured to, upon calling the first instance of the opcode, use the output address as read from the stack to reference a locking script of the second output.

2. The method of claim 1 , wherein said reading of the first data element comprises recording the first data element on an at least one off-chain stack, and wherein said supplying comprises supplying said first data element to the off-chain function as read from the at least one off-chain stack.

3. The method of claim 1 , wherein the result comprises a further transaction of the blockchain network.

4. The method of claim 3 , wherein said generating of the further transaction comprises generating an input of the further transaction, wherein the input is based on at least said first data element.

5. The method of claim 3 , comprising transmitting said further transaction to one or more nodes of the blockchain network.

6. The method of claim 3 , comprising executing a third transaction of the blockchain network, wherein the third transaction comprises at least a second output comprising a second locking script of the stack-based scripting language, wherein the second locking script comprises a portion of the second locking script to be executed before a second instance of the opcode is executed, wherein the further transaction comprises a second unlocking script that references the second output in the third transaction, and wherein the method comprises, upon executing the second instance of the opcode:

terminating execution of the second locking script of the third transaction whilst not invalidating the further transaction;

reading a second data element from the at least one stack, wherein the second data element is generated during execution of the second unlocking script and the portion of the second locking script; and

supplying, to the off-chain function, said second data element as read from the at least one stack, wherein the off-chain function is configured to generate a further result based on at least said second data element.

7. The method of claim 1 , comprising executing the unlocking script and the first locking script, said execution comprising pushing the output address of the second output to the stack.

8. The method of claim 7 , comprising, before said execution of the unlocking script and the first locking script, copying the unlocking script and the first locking script to a script template, wherein the script template comprises to-be-executed script.

9. The method of claim 8 , comprising, upon calling the first instance of the opcode, copying the locking script of the second output to a beginning of the script template.

10. The method of claim 1 , comprising executing the locking script of the second output.

11. The method of claim 1 , comprising performing operations of:

executing a locking script of a referenced output, and pushing an output address of the respective output to an off-chain stack; wherein the off-chain function is configured to, upon calling the respective instance of the opcode of the respective output, use the output address as read from the stack to reference a locking script of a next one of the outputs;

wherein the operations are repeated until each locking script of the plurality of outputs that is referenced by another locking script has been executed.

12. The method of claim 11 , comprising, each time one of the locking scripts is executed, copying that locking script to a beginning of a script template.

13. The method of claim 12 , comprising using the script template as a locking script for a further transaction, wherein the locking script for the further transaction contains no instances of the opcode.

14. The method of claim 1 , wherein one or more of the locking scripts comprises a respective function, wherein said execution of that respective locking scripts comprises executing the respective function, and wherein the respective function is configured to operate on data on the off-chain stack at a time the respective function is executed.

15. The method of claim 1 , wherein the first instance of the opcode is an OP_RETURN opcode.

16. The method of claim 2 , wherein the off-chain stack is a stack that is not used for a purpose of validating transactions.

17. A computer program embodied on non-transitory computer-readable storage and configured so as, when run on a node of a blockchain network, to perform a method of executing transactions of the blockchain network, wherein a first transaction comprises at least a first output comprising a first locking script of a stack-based scripting language, wherein the first locking script comprises a portion of the first locking script to be executed before a first instance of an opcode is executed, wherein a second transaction comprises a first unlocking script that references the first output in the first transaction, and wherein the method comprises, upon executing the first instance of the opcode:

terminating execution of the first locking script whilst not invalidating the first transaction;

reading a first data element from at least one stack, wherein the first data element is generated during execution of the first unlocking script and the portion of the first locking script; and

supplying, to an off-chain function, said first data element as read from the at least one stack, wherein the function is configured to generate a result based on at least said first data element,

wherein the first transaction comprises a plurality of outputs each comprising a respective locking script, wherein each of the plurality of outputs is referenced by a respective output address, wherein said first data element is an output address referencing a second one of said outputs, and wherein the first output is referenced in the unlocking script of the second transaction; and

wherein the off-chain function is configured to, upon calling the first instance of the opcode, use the output address as read from the stack to reference a locking script of the second output.

18. Computing equipment, comprising:

memory comprising one or more memory units; and

processing apparatus comprising one or more processing units, wherein the memory stores code arranged to run on the processing apparatus, the code being configured so as when run on the processing apparatus to carry out a method of executing transactions of a blockchain network, wherein a first transaction comprises at least a first output comprising a first locking script of a stack-based scripting language, wherein the first locking script comprises a portion of the first locking script to be executed before a first instance of an opcode is executed, wherein a second transaction comprises a first unlocking script that references the first output in the first transaction, and wherein the method comprises, upon executing the first instance of the opcode:

terminating execution of the first locking script whilst not invalidating the first transaction;

reading a first data element from at least one stack, wherein the first data element is generated during execution of the first unlocking script and the portion of the first locking script; and

supplying, to an off-chain function, said first data element as read from the at least one stack, wherein the function is configured to generate a result based on at least said first data element,

wherein the first transaction comprises a plurality of outputs each comprising a respective locking script, wherein each of the plurality of outputs is referenced by a respective output address, wherein said first data element is an output address referencing a second one of said outputs, and wherein the first output is referenced in the unlocking script of the second transaction; and

wherein the off-chain function is configured to, upon calling the first instance of the opcode, use the output address as read from the stack to reference a locking script of the second output.

Assignments (2)
CHANGE OF NAME Recorded Aug 8, 2022
From: NCHAIN HOLDINGS LIMITED
To: NCHAIN LICENSING AG
Reel/Frame 061118/0671 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 24, 2021
From: TARTAN, CHLOE; ZHANG, WEI; WRIGHT, CRAIG STEVEN; DAVIES, JACK OWEN; VAUGHAN, OWEN; WAHAB, JAD; AMMAR, BASSEM
To: NCHAIN HOLDINGS LIMITED
Reel/Frame 058949/0481 →
Priority Claims (1)
GB 1907346 · May 24, 2019 · national
Continuity (1)
Related Publication 20220269810A1 · Aug 25, 2022
References Cited (55)
US 6578192B1 · Boehme et al. · 2003 [cited by applicant]
US 10693637B2 · Ramesh · 2020 [cited by applicant]
US 20150264138A1 · Watts, Jr. · 2015 [cited by examiner]
US 20180053161A1 · Bordash et al. · 2018 [cited by applicant]
US 20190102758A1 · Wright et al. · 2019 [cited by applicant]
US 20190116024A1 · Wright et al. · 2019 [cited by applicant]
US 20190121988A1 · Van De Ruit et al. · 2019 [cited by applicant]
US 20190130394A1 · Stollman et al. · 2019 [cited by applicant]
US 20190156301A1 · Bentov et al. · 2019 [cited by applicant]
US 20210233074A1 · Kramer et al. · 2021 [cited by applicant]
CN 101470600A · 2009 [cited by examiner]
WO 2017145006 · 2017 [cited by applicant]
WO 2017187396A1 · 2017 [cited by applicant]
WO WO2017187399A1 · 2017 [cited by examiner]
WO WO2018020389A2 · 2018 [cited by examiner]
WO 2018116104A1 · 2018 [cited by applicant]
WO 2018116105A1 · 2018 [cited by applicant]
WO 2018215872A1 · 2018 [cited by applicant]
WO 2018215876A1 · 2018 [cited by applicant]
WO 2018215951A1 · 2018 [cited by applicant]
WO 2019034959A1 · 2019 [cited by applicant]
WO 2019043538A1 · 2019 [cited by applicant]
WO 2019072297A2 · 2019 [cited by applicant]
WO 2019092552A1 · 2019 [cited by applicant]
Amaclin et al. “What is the “1 Return” bug?”, bitcoin.stackexchange.com, pp. 1-2 (Year: 2015). [cited by examiner]
Smtp et al., Script, Bitcoin Wiki, pp. 1-9 (Year: 2013). [cited by examiner]
Ali N.A., et al., “Alneelain: A Formal Specification Language,” 2017 International Conference on Communication, Control, Computing and Electronics Engineering (ICCCCEE), 2017, pp. 1-9, Retrieved from the Internet: URL:h… [cited by applicant]
Jamthagen C., et al., “Blockchain-Based Publishing Layer for the Keyless Signing Infrastructure,” 2016, International IEEE Conferences on Ubiquitous Intelligence Computing, Advanced and Trusted Computing, Scalable Compu… [cited by applicant]
Bartoletti M., et al., “An Analysis of Bitcoin OP_RETURN Metadata,” 2017, Lecture Notes in Computer Science, pp. 218-230. [cited by applicant]
Covaci A., et al., “NECTAR: Non-Interactive Smart Contract Protocol Using Blockchain Technology,” IEEE/ACM 1st International Workshop on Emerging Trends in Software Engineering for Blockchain (WETSEB), 2018, pp. 17-24, … [cited by applicant]
“Interpreter,” Bitcoin, [Accessed on Apr. 24, 2019], 33 pages, Retrieved from the Internet: URL: https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp. [cited by applicant]
“Maguines,” Bitcoin-v0.1, [Accessed on Apr. 24, 2019], 8 pages, Retrieved from the Internet: URL: https://github.com/Maguines/Bitcoin-v0.1/blob/master/study/script.cpp. [cited by applicant]
Minsky M., “Computation: Finite and Infinite Machines,” 1967, pp. 354-355. [cited by applicant]
“Srcipt,” Bitcoin Wiki, [Accessed on Apr. 24, 2019], 13 pages, Retrieved from the Internet: URL: https://en.bitcoin.it/wiki/Script. [cited by applicant]
Shadders, “The Unfuckening of OP_RETURN,” Yours, [Accessed on Apr. 24, 2019], 5 pages, Retrieved from the Internet: URL: https://www.yours.org/content/the-unfuckening-of-op_return-b10d2c4b52da. [cited by applicant]
Anonymous, “Op_Checksig—Bitcoin Wiki,” Jan. 16, 2019 [Retrieved on Jan. 14, 2020], 6 pages, Retrieved from the Internet: URL: https://en.bitcoin.it/w/index.php?title=OP_CHECKSIG&oldid=66023. [cited by applicant]
Bitfury Group: “Smart Contracts on Bitcoin Blockchain”, Sep. 4, 2015, [retrieved on Jun. 9, 2017] 20 pages. Retrieved from the Internet: URL: http://bitfury.com/content/5-white-papers-research/contracts-1.1.1.pdf. [cited by applicant]
Combined Search and Examination Report under Sections 17 and 18(3) for Application No. GB1907345.1 mailed on Nov. 14, 2019, 7 pages. [cited by applicant]
Combined Search and Examination Report under Sections 17 and 18(3) for Application No. GB1907346.9 mailed on Feb. 20, 2020, 9 pages. [cited by applicant]
Combined Search and Examination Report under Sections 17 and 18(3) for Application No. GB1907347.7 mailed on Nov. 18, 2019, 7 pages. [cited by applicant]
International Search Report and Written Opinion for Application No. PCT/IB2020/053816 mailed on Jul. 17, 2020, 15 pages. [cited by applicant]
International Search Report and Written Opinion for Application No. PCT/IB2020/053817 mailed on Jun. 24, 2020, 12 pages. [cited by applicant]
International Search Report and Written Opinion for Application No. PCT/IB2020/053844 mailed on Jun. 24, 2020, 12 pages. [cited by applicant]
Sward A., et al., “Data Insertion in Bitcoin's Blockchain,” Published in Ledger 3, Script. 4. Transaction Malleability. OP return. 6. Coinbase. 7. Free speech, Jul. 2017, XP055464096, p. 5, paragraph 3, p. 6, p. 9, 19 p… [cited by applicant]
Andreas M. Antonopoulus: “Mastering Bitcoin—Unlocking Digital Cryptocurrencies” In: “Mastering bitcoin : (unlocking digital cryptocurrencies]”, Dec. 20, 2014, pp. 132-134, O'Reilly Media, Beijing Cambridge Farnham Koln … [cited by applicant]
EP23159633.9 Search Report dated Jun. 9, 2023, 5 pages. [cited by applicant]
Fuchita Y., “Special Feature: Innovation and Finance—Blockchain and Financial Transaction Innovation,” Nomura Capital Markets Quarterly, Japan, Nomura Institute of Capital Markets Research, Nov. 1, 2015, vol. 19, No. 2,… [cited by applicant]
Matsuura K., et al., “Introduction: Howto Make Cryptocurrencies,” 1st Printing, 1st Edition, Japan, Shuwa System Co., Ltd, Dec. 25, 2018, 11 Pages. [cited by applicant]
Narayanan A., et al., (Nagao, Takahiro), F, Nd Printing, St Edition, Japan, Nikkei Business Publications, Inc., Dec. 20, 2017, 17 Pages. [cited by applicant]
Stone System Corporation., “Illustrated Introduction: Up-to-date Easy-to-understand Guide to Blockchain,” 4th Printing, 1st Edition, Japan, Shuwa System Co., Ltd, Apr. 15, 2018, 18 Pages. [cited by applicant]
https://github.com/Maguines/Bitcoin-v0.1/blob/master/study/script.cpp [Accessed on Apr. 24, 2019]. [cited by applicant]
https://github.com/bitcoin/bitcoin/blob/master/src/script/interpreter.cpp [Accessed on Apr. 24, 2019]. [cited by applicant]
https://www.yours.org/content/the-unfuckening-of-op_return-b10d2c4b52da [Accessed on Apr. 24, 2019]. [cited by applicant]
Marvin Minsky (1967), Computation: Finite and Infinite Machines, Prentice-Hall, Inc. Englewood Cliffs, N.J. [cited by applicant]
https://en.bitcoin,it/wiki/Script [Accessed on Apr. 24, 2019]. [cited by applicant]