IP Library Granted Patent US 12,328,382
Granted Patent B2
US 12,328,382 · App. 18/421,885 · Granted Jun 10, 2025

Method for controlling the flow execution of a generated script of a blockchain transaction

Inventors: Craig Steven Wright (London, GB); Stephane Savanah (London, GB)
Assignee: NCHAIN LICENSING AG
H04L9/0618G06F8/31G06F8/41G06F8/433G06F8/443G06F8/452G06F8/51H04L9/0637H04L9/0643H04L9/3247H04L9/3297H04L9/50H04L2209/56
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,328,382
App. No.
18/421,885
Granted
Jun 10, 2025
Kind
B2
Abstract

A method and system for controlling a flow execution of a generated script transaction according to a blockchain protocol are disclosed. The method comprises using a software resource to determine how a logic is to be controlled and stored as a portion of code, generate an input by a computing resource as a result of a computation, retrieve the stored portion of code, and insert, based on the input, the stored portion of code into a transaction script associated with a blockchain transaction such that, upon execution of the transaction script. Embodiments allow the generation of a more complex blockchain script, control how the script will execute when implemented on the blockchain, and control how or when an output of the transaction is unlocked.

Claims (27)

1. A method to implement control flow activities on a blockchain network, comprising:

determining how a logic is to be controlled and stored as a portion of code;

generating an input by a computing resource as a result of a computation;

retrieving the stored portion of code;

inserting, based on the input, the stored portion of code into a blockchain transaction script associated with a blockchain transaction on the blockchain network; and

executing the blockchain transaction script, wherein executing the blockchain transaction script provides a functionality of a control flow mechanism to implement the control flow activities on the blockchain network, and wherein a behavior of the functionality of the control flow mechanism is controlled or influenced by the input.

2. The method according to claim 1 , wherein the blockchain transaction script is associated with an input of the blockchain transaction or an output of the blockchain transaction.

3. The method according to claim 1 , wherein the blockchain transaction is generated in accordance with a block chain protocol.

4. The method according to claim 3 , wherein the blockchain protocol is a Bitcoin protocol or a variant of the Bitcoin protocol.

5. The method according to claim 1 , further comprising inserting the stored portion of code into the blockchain transaction script more than once.

6. The method according to claim 1 , further comprising using the input to determine how many times at least one portion of code is inserted into the blockchain transaction script.

7. The method according to claim 1 , wherein the control flow mechanism is a loop, and wherein the logic comprises a statement that is executed per iteration of the loop.

8. The method according to claim 1 , wherein the input is derived from a compiler arranged to translate code from a High Level Language (HLL) into the blockchain transaction script.

9. The method according to claim 1 , wherein the stored portion of code includes a counter or index that is incremented at least once upon execution of the blockchain transaction script, and wherein the counter or index is used to control or influence the execution of the blockchain transaction script.

10. The method according to claim 9 , wherein the counter or index is incremented or otherwise manipulated using values stored in two stack-based data structures.

11. A computer-implemented system comprising:

an electronic device;

one or more processors coupled to the electronic device; and

a memory coupled to the one or more processors, the memory having stored thereon computer executable instructions that, when executed by the one or more processors, cause the one or more processors to implement the method of claim 1 .

12. A non-transitory computer-readable storage medium storing computer-executable instructions which, when executed by a processor, configure the processor to perform the method of claim 1 .

13. An electronic device comprising:

an interface device;

a processor coupled to the interface device; and

a memory coupled to the processor, the memory having stored thereon computer executable instructions which, when executed by the processor, configure the processor to perform the method of claim 1 .

14. The method according to claim 1 , wherein:

the control flow mechanism is a selection control mechanism comprising a switch statement; and

the logic comprises a plurality of statements to be executed for each option of the switch statement.

Assignments (4)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 24, 2024
From: WRIGHT, CRAIG STEVEN; SAVANAH, STEPHANE
To: NCHAIN HOLDINGS LTD
Reel/Frame 066235/0537 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 24, 2024
From: WRIGHT, CRAIG; SAVANAH, STEPHANE
To: NCHAIN HOLDINGS LTD
Reel/Frame 066235/0618 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 24, 2024
From: WRIGHT, CRAIG; SAVANAH, STEPHANE
To: NCHAIN HOLDINGS LTD
Reel/Frame 066368/0312 →
CHANGE OF NAME Recorded Jan 24, 2024
From: NCHAIN HOLDINGS LTD
To: NCHAIN LICENSING AG
Reel/Frame 066368/0443 →
Priority Claims (6)
GB 1710967 · Jul 7, 2017 · national
GB 1710971 · Jul 7, 2017 · national
GB 1710974 · Jul 7, 2017 · national
WO PCT/IB2017/054110 · Jul 7, 2017 · international
WO PCT/IB2017/054113 · Jul 7, 2017 · international
WO PCT/IB2017/054114 · Jul 7, 2017 · international
Continuity (3)
Continuation 17723381 · Apr 18, 2022
Continuation 16629291
Related Publication 20240231777A1 · Jul 11, 2024
References Cited (86)
US 5761652A · Wu et al. · 1998 [cited by applicant]
US 6760905B1 · Hostetter et al. · 2004 [cited by applicant]
US 9569206B1 · Dawson et al. · 2017 [cited by applicant]
US 10050779B2 · Alness et al. · 2018 [cited by applicant]
US 10871948B1 · Dowling · 2020 [cited by applicant]
US 11307835B2 · Wright et al. · 2022 [cited by applicant]
US 20030005404A1 · Bowyer et al. · 2003 [cited by applicant]
US 20040015916A1 · Click et al. · 2004 [cited by applicant]
US 20140068576A1 · Pendap et al. · 2014 [cited by applicant]
US 20150007167A1 · Mody et al. · 2015 [cited by applicant]
US 20150074655A1 · de Lima Ottoni et al. · 2015 [cited by applicant]
US 20150149978A1 · Kim · 2015 [cited by applicant]
US 20160274998A1 · Coyle et al. · 2016 [cited by applicant]
US 20160330034A1 · Back et al. · 2016 [cited by applicant]
US 20170287090A1 · Hunn et al. · 2017 [cited by applicant]
US 20170300403A1 · Ramraz · 2017 [cited by applicant]
US 20170300627A1 · Giordano et al. · 2017 [cited by applicant]
US 20180293157A1 · Dougherty et al. · 2018 [cited by applicant]
US 20180314938A1 · Andoni et al. · 2018 [cited by applicant]
US 20190116024A1 · Wright et al. · 2019 [cited by applicant]
CN 106598549A · 2017 [cited by applicant]
CN 106598579A · 2017 [cited by applicant]
JP S61182138A · 1986 [cited by applicant]
JP 2006107339A · 2006 [cited by applicant]
WO 2017024071A1 · 2017 [cited by applicant]
WO 2017027407A1 · 2017 [cited by applicant]
WO 2017145006A1 · 2017 [cited by applicant]
WO 2017187398A1 · 2017 [cited by applicant]
Wikipedia, “Proof of space,” Wikipedia the Free Encyclopedia, Jul. 11, 2017, https://en.wikipedia.org/w/index.php?title=Proof-of-space&oldid=790069182, 5 pages. [cited by applicant]
Willis et al., “TX Script—Documentation,” GitHub, Jun. 27, 2016, https://github.com/Kefkius/txsc/blob/master/doc/txscript.asciidoc, 8 pages. [cited by applicant]
Willis et al., “TX Script—History,” GitHub, Jun. 27, 2016, https://github.com/Kefkius/txsc/commits/master/doc/txscript.asciidoc, 2 pages. [cited by applicant]
Willis et al., “TX Script,” GitHub, Jun. 27, 2016, https://github.com/Kefkius/txsc, 3 pages. [cited by applicant]
Zyskind, “Efficient secure computation enabled by blockchain technology,” Doctoral dissertation, Massachusetts Institute of Technology, Jun. 2016, https://pdfs.semanticscholar.org/5b54/7a7f2e47af79429d9467701538434d8e6b… [cited by applicant]
Allison, “Jeff Garzik's Bloq runs smart contracts like an ‘Ethereum plug-in for Bitcoin,’” International Business Times, May 25, 2016, https://www.ibtimes.co.uk/jeff-garziks-bloq-runs-smart-contracts-like-ethereum-plug-… [cited by applicant]
Anonymous: “Announcing Ivy Playground—Chain”, May 18, 2017, 15 pages. [cited by applicant]
Anonymous: “Part 1: Transaction Basics Crypto Tokens”, Jun. 6, 2017, https:/web.archive.org/web/2017060202729/https://klmoney.wordspress.com/bitcoin-dissecting-transactions-part1, 16 pages. [cited by applicant]
Anonymous: “Part 2: Building a Transaction By Hand, Crypto Tokens”, Jun. 7, 2017, 18 pages. [cited by applicant]
Antonopoulos, “Mastering Bitcoin—Unlocking Digital Cryptocurrencies,” O'Reilly Media, Inc., Dec. 20, 2014, 282 pages. [cited by applicant]
Bedford, “How to code with Google Blockly,” Tech Advisor, Jun. 12, 2014, https://web.archive.org/web/20170626164055/https://www.techadvisor.co.uk/how-to/software/how-code-with-google-blockly-3524675, 6 pages. [cited by applicant]
Bhargavan et al., “Formal Verification of Smart Contracts,” Proceedings of the 2016 ACM Workshop on Programming Languages and Analysis for Security, Oct. 24, 2016, https://antoine.delignat-lavaud.fr/doc/plas16.pdf, 6 pa… [cited by applicant]
Bitcoininvestor.com, “All-Star Panel: Ed Moy, Joseph VaughnPerling, Trace Mayer, Nick Szabo, Dr. Craig Wright,” YouTube, https://youtu.be/LdvQTwjVmrE, Bitcoin Investor Conference, Oct. 29, 2015 [retrieved Dec. 12, 2018]… [cited by applicant]
Ceejep et al., “Rfp-8: Higher Level Language Compiling To Transaction Script,” Dec. 14, 2015, https://forum.decred.org/threads/rfp-8-higher-level-language-compiling-totransaction-script.3665/, 7 pages. [cited by applicant]
Chain, “Announcing Ivy Playground,” Medium, May 17, 2017, https://web.archive.org/web/20170518000630/https://blog.chain.com/announcing-ivy-playground-395364675d0a, 12 pages. [cited by applicant]
Chen et al., “Under-Optimized Smart Contracts Devour Your Money,” IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER), Feburary 20, 2017, https://arxiv.org/pdf/1703.03994.pdf, 5 … [cited by applicant]
Costill, “Bitcoin Scripting and How It Can Be Improved,” Due, https://due.com/blog/bitcoin-scripting-and-how-it-can-be-improved/, Mar. 25, 2016, 16 pages. [cited by applicant]
Curiosity Driven, “Bitcoin contracts compiler,” Sep. 6, 2014, https://github.com/curiosity-driven/bitcoin-contracts-compiler, 2 pages. [cited by applicant]
Curiosity Driven, “Bitcoin contracts,” Apr. 8, 2016, https://curiosity-driven.org/bitcoin-contracts, 10 pages. [cited by applicant]
Curiosity Driven, “Superscript compiler,” Sep. 6, 2014, https://github.com/curiosity-driven/bitcoin-contracts-compiler/commits/master, 1 page. [cited by applicant]
De Rosa, “A developer-oriented series about Bitcoin—Section 10: The Bitcoin Script language (pt. 1) and Section 11: The Bitcoin Script language (pt. 2),” May 25, 2015, https://davidederosa.com/basic-blockchain-programmi… [cited by applicant]
Etherscan, “ByteCode to Opcode Disassembler,” Etherscan, the Ethereum Block Explorer, Aug. 2015, https://etherscan.io/address/0xafdacfee6395bc1e480a900943f1803f854bc20e, 3 pages. [cited by applicant]
Etherscan, “Contract Address—Transaction Example,” Etherscan, the Etheruem Block Explorer, Oct. 20, 2016, 3 pages. [cited by applicant]
Etherscan, “Contract Address,” Etherscan, the Etheruem Block Explorer, copyright 2017, https://etherscan.io/address/0x5a4964bb5fdd3ce646bb6aa020704f7d4db79302, 4 pages. [cited by applicant]
Exab et al., “Understanding the risk of BU (bitcoin unlimited),” Reddit, Febraury 22, 20217, https://www.reddit.com/r/Bitcoin/comments/5vo5wi/understanding_the_risk_of_bu_bitcoin_unlimited/, 27 pages. [cited by applicant]
FMLFPL111 et al., “It's there a solution to the scaling problem?,” Reddit, Jan. 25, 2017, https://www.reddit.com/r/Monero/comments/5q3fcf/its_there_a_solution_to_the_scaling_problem/, 14 pages. [cited by applicant]
Frontier, “State Machine,” Gitbooks, Mar. 15, 2017, https://ethereum.gitbooks.io/frontierguide/content/opcodes,_costs,_and_gas.html, 1 page. [cited by applicant]
Gitbook, “Ethereum Frontier Guide,” Gitbook (Legacy), Feb. 4, 2016, 293 pages. [cited by applicant]
Github.com, “EVM OPCODE Gas Costs”, https://github.com/djrtwo/evm-opcode-gas-costs, Apr. 12, 2017, 2 pages. [cited by applicant]
International Search Report and Written Opinion mailed Aug. 30, 2018, Patent Application No. PCT/IB2018/054970, 13 pages. [cited by applicant]
International Search Report and Written Opinion mailed Aug. 30, 2018, Patent Application No. PCT/IB2018/054971, 12 pages. [cited by applicant]
International Search Report and Written Opinion mailed Mar. 23, 2018, Patent Application No. PCT/IB2017/054110, 13 pages. [cited by applicant]
International Search Report and Written Opinion mailed Mar. 23, 2018, Patent Application No. PCT/IB2017/054113, 13 pages. [cited by applicant]
International Search Report and Written Opinion mailed Mar. 23, 2018, Patent Application No. PCT/IB2017/054114, 14 pages. [cited by applicant]
International Search Report and Written Opinion mailed Sep. 3, 2018, Patent Application No. PCT/IB2018/054969, 13 pages. [cited by applicant]
Klmoney, “Part 1: Transaction Basics,” Jun. 6, 2017, Wordpress, https://web.archive.org/web/20170606202729/https://klmoney.wordpress.com/bitcoin-dissecting-transactions-part-1/, 9 pages. [cited by applicant]
Klmoney, “Part 2: Building a Transaction By Hand,” Wordpress, Jun. 7, 2017, https://web.archive.org/web/20170607015517/https://klmoney.wordpress.com/bitcoin-dissecting-transactions-part-2-building-a-transaction-by-hand/… [cited by applicant]
Kosba et al., “Hawk: The Blockchain Model of Cryptography and Privacy-Preserving Smart Contracts,” IEEE Symposium on Security and Privacy, May 22, 2016, 31 pages. [cited by applicant]
Le Calvez, “A look at Bitcoin non-standard outputs,” Medium, Nov. 8, 2015 [retrieved Feb. 28, 2017], https://medium.com/@alcio/a-look-at-bitcoin-non-standard-outputs-c97f65cccbb6#.3fw5ur52k, 6 pages. [cited by applicant]
Lerner, “RSK Rootstock Platform Bitcoin powered Smart Contracts White Paper version 9,” Nov. 19, 2015, https://uploads.strikinglycdn.com/files/90847694-70f0-4668-ba7fdd0c6b0b00a1/RootstockWhitePaperv9-Overview.pdf, 24 p… [cited by applicant]
Morgenstern, “Forth's Stacks,” Forth.org, Nov. 14, 2016, https://web.archive.org/web/20161114030625/http://www.forth.org/svfig/Len/softstak.htm, 3 pages. [cited by applicant]
Nakamoto, “Bitcoin: A Peer-to-Peer Electronic Cash System,” Bitcoin, Oct. 31, 2008, https://bitcoin. org/bitcoin.pdf, 9 pages. [cited by applicant]
Rensylvain et al., “Any truth to haveing turing complete programming worked into bitcoin via an OP code?,” Reddit, Dec. 13, 2015, https://www.reddit.com/r/Bitcoin/comments/3wpkd0/any_truth_to_haveing_turing_complete_pro… [cited by applicant]
Rios et al., “Derivative-free optimization: a review of algorithms and comparison of software implementations,” Journal of Global Optimization 56(3):1247-93, Jul. 12, 2012. [cited by applicant]
Robinson, “Ivy: A Declarative Predicate Language for Smart Contracts,” Chain, https://cyber.stanford.edu/sites/default/files/danrobinson.pdf, Jan. 2017, 30 pages. [cited by applicant]
Robinson, Dan, “Ivy: A Declarative Predicate Language for Smart Contracts” BPASE 2017, Stanford University, Jan. 26, 2017, 6 pages. [cited by applicant]
Sarchar et al., “[ANNOUNCE] Whitepaper for Bitstorage—a peer to peer, cloud storage network,” Bitcoin Forum, Nov. 27, 2013, https://bitcointalk.org/index.php?topic=348868.0, 10 pages. [cited by applicant]
Satoshi et al., “Connection Limits,” Bitcoin Forum, Aug. 9, 2010, https://bitcointalk.org/index.php?topic=741.0;prev_next=prev, 2 pages. [cited by applicant]
Solidity in Depth, “Expressions and Control Structures” Input Parameters and Output Parameters, Jul. 3, 2017, https://docs.huihoo.com/ethereum/solidity/control-structures.html, 10 pages. [cited by applicant]
Stevenroose et al., “IRC Chat Log Feb. 9, 2016,” Bitcoin Wizards, Feb. 9, 2016, https://irclog.whitequark.org/bitcoin-wizards/2016-02-09, pages. [cited by applicant]
Tekknolagi et al., “How to implement LOOP in a FORTH-like language interpreter written in C,” Stack Overflow, Aug. 4, 2011, https://web.archive.org/web/20150531001644/https://stackoverflow.com/questions/6949434/how-to-i… [cited by applicant]
UK Commercial Search Report mailed Nov. 17, 2017, Patent Application No. GB1710974.5, 9 pages. [cited by applicant]
UK IPO Search Report mailed Dec. 21, 2017, Patent Application No. GB1710967.9, 9 pages. [cited by applicant]
UK IPO Search Report mailed Dec. 21, 2017, Patent Application No. GB1710971.1, 9 pages. [cited by applicant]
UK IPO Search Report mailed Dec. 21, 2017, Patent Application No. GB1710974.5, 9 pages. [cited by applicant]
Robinson Dan: “Ivy: A Declarative Predicate Language for Smart Contracts”, Jan. 26, 2017 (Jan. 26, 2017), pp. 1-6, XP093030515, Retrieved from the Internet: URL:https://diyhpLus/wiki/transcripts/blockchain-protocol-anal… [cited by applicant]
Robinson Dan: “Ivy: a declarative predicate language for smart contracts”, Jan. 1, 2017 (Jan. 1, 2017), pp. 1-30, XP055458543, Retrieved from the Internet: URL:https://cyber.stanford.edu/sites/default/files/danrobinson.… [cited by applicant]
Robinson Dan: “Ivy: A Declarative Predicate Language for Smart Contracts—BPASE '17”, Feb. 3, 2017 (Feb. 3, 2017), XP093030535, Retrieved from the Internet: URL:https://www.youtube.com/watch?v=xdxs7VJTqns. [cited by applicant]