IP Library Granted Patent US 12699547
Granted Patent B2
US 12699547 · App. 18/266,247 · Granted Aug 4, 2026

Generating and validating blockchain transactions

Inventors: Wei Zhang (London, GB); Bassem Ammar (London, GB); Steven Patrick Coughlan (London, GB)
Assignee: nChain Licensing AG
G06F8/311H04L9/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 12699547
App. No.
18/266,247
Granted
Aug 4, 2026
Kind
B2
Abstract

A computer-implemented method of generating blockchain transactions, wherein the method is performed by a first party and comprises: generating a first blockchain transaction, wherein the first blockchain transaction comprises a first compact script (CS), wherein the first CS is at least partly written in a high-level (HL) scripting language and comprises one or more HL functions, wherein when executed, each HL function is configured to perform an operation equivalent to a respective operation performed by one or more low-level (LL) functions of a LL scripting language, wherein the first CS is configured to perform an operation equivalent to a first expanded script (ES) written in the LL scripting language and comprising a plurality of LL functions, and wherein the first CS is smaller in storage size than the first ES; and making the first blockchain transaction available to one or more nodes of a blockchain network and/or a second party.

Claims (39)

1 . A computer-implemented method of validating blockchain transactions, wherein the method is performed by a node of a blockchain network, wherein the node is configured to execute script written in a high-level (HL) scripting language, wherein the blockchain comprises a first blockchain transaction, wherein the first blockchain transaction comprises a first output comprising a first compact locking script (CLS), wherein the first CLS is at least partly written in the HL scripting language and comprises one or more HL functions, wherein when executed, each HL function is configured to perform an operation equivalent to a respective operation performed by one or more low-level (LL) functions of a native, LL scripting language of the blockchain, wherein the first CLS is configured to perform an operation equivalent to a first expanded locking script (ELS) written in the LL scripting language and comprising a plurality of LL functions, and wherein the first CLS is smaller in storage size than the first ELS, and wherein the method is performed by a blockchain node and comprises:

obtaining a second blockchain transaction, wherein the second blockchain transaction comprises a first input comprising a first unlocking script; and

validating the second blockchain transaction, wherein said validating of the second blockchain transaction comprises:

obtaining the first blockchain transaction, and

a) replacing the first CLS with the first ELS, and then executing the first unlocking script together with the first ELS, wherein a condition of the second transaction being valid is that said execution is successful, or

b) executing the first unlocking script together with the first CLS, wherein a condition of the second transaction being valid is that said execution is successful.

2 . The method of claim 1 , wherein the second blockchain transaction comprises a second output comprising a second CLS, wherein the second CLS is written in the HL scripting language, wherein the second CLS is configured to perform an operation equivalent to a second ELS written in the LL scripting language, and wherein the second CLS is smaller in storage size than the second ELS, and wherein validating the second blockchain transaction comprises:

obtaining a second candidate transaction identifier;

generating a modified version of the second blockchain transaction, wherein in this modified version of the second blockchain transaction, the second output comprises the second ELS instead of the second CLS;

generating a second transaction identifier, wherein the second transaction identifier is generated based on the modified version of the second blockchain transaction; and

comparing the second candidate transaction identifier with the second transaction identifier, wherein a condition of the second blockchain transaction being valid is that the second candidate transaction identifier matches the second transaction identifier.

3 . The method of claim 2 , comprising performing said comparison of the second candidate transaction identifier with the second transaction identifier prior to said executing of the first unlocking script together with the first CLS or the first ELS.

4 . The method of claim 1 , comprising:

on condition that the second blockchain transaction is valid, sending the second blockchain transaction to one or more other nodes of the blockchain network and/or storing the first blockchain transaction in memory of the node.

5 . The method of claim 1 , wherein the second blockchain transaction is generated by a second party, and wherein said obtaining of the second blockchain transaction comprises receiving the second blockchain transaction from the second party.

6 . The method of claim 1 , comprising obtaining the first blockchain transaction from memory of the node.

7 . The method of claim 1 , wherein the HL scripting language is an intermediate-level (IL) scripting language between a user-facing (UF) scripting language and the LL scripting language, wherein the HL functions are IL functions, wherein a function table comprises a list of function mappings, wherein each function mapping comprises a respective IL function mapped to a set of one or more other IL functions and/or one or more LL functions, and wherein:

a) said replacing of the first CLS with the first ELS is based on the function mappings listed in the function table, or

b) said executing of the first unlocking script together with the first CLS is based on the function mappings listed in the function table.

8 . The method of claim 7 , wherein the function table comprises one or more function identifiers that each identify a respective IL function, wherein the first CLS comprises one or more first data pairs, each first data pair comprises a respective IL function identifier and a call function, and wherein when executed, the call function is configured to execute the set of one or more other IL functions and/or one or more LL functions mapped to the IL function identified by the respective IL function identifier.

9 . The method of claim 7 , wherein at least part of the function table is created by a first party, and wherein the method comprises receiving the at least part of the function table from the first party.

10 . The method of claim 7 , comprising receiving different parts of the function table from different parties.

11 . The method of claim 7 , comprising creating at least part of the function table.

12 . The method of claim 1 , wherein a variable table comprises one or more variable identifiers and is configured to store a variable in association with each variable identifier, wherein the first CS comprises one or more second data pairs, each second data pair comprises a respective variable identifier and either a read function or a write function, and wherein when executed, the read function is configured to read a variable from the variable table stored in associated with the respective variable identifier, and wherein executed, the write function is configured to write a variable generated during executed of the first CLS to the variable table to be stored in associated with the respective variable identifier.

13 . A computer-implemented method of validating blockchain transactions, wherein the method is performed by a node of a blockchain network, wherein the node is configured to execute script written in a high-level (HL) scripting language, wherein the blockchain comprises a first blockchain transaction, wherein the first blockchain transaction comprises a first output, and wherein the method comprises:

obtaining a second blockchain transaction, wherein the second blockchain transaction comprises a first input comprising a first compact unlocking script (CUS), wherein the first CUS is at least partly written in the HL scripting language and comprises one or more HL functions, wherein when executed, each HL function is configured to perform an operation equivalent to a respective operation performed by one or more low-level (LL) functions of a native, LL scripting language of the blockchain, wherein the first CUS is configured to perform an operation equivalent to a first expanded unlocking script (EUS) written in the LL scripting language and comprising a plurality of LL functions, and wherein the first CUS is smaller in storage size than the first EUS; and

validating the second blockchain transaction, wherein said validating of the second blockchain transaction comprises:

obtaining the first blockchain transaction, and

a) replacing the first CUS with the first EUS, and then executing the first EUS together with the first output, wherein a condition of the second transaction being valid is that said execution is successful, or

b) executing the first CUS together with the first output, wherein a condition of the second transaction being valid is that said execution is successful.

14 . The method of claim 13 , wherein the HL scripting language is an intermediate-level (IL) scripting language between a user-facing (UF) scripting language and the LL scripting language, wherein the HL functions are IL functions, wherein a function table comprises a list of function mappings, wherein each function mapping comprises a respective IL function mapped to a set of one or more other IL functions and/or one or more LL functions, and wherein:

a) said replacing of the first CUS with the first EUS is based on the function mappings listed in the function table, or

b) said executing of the first CUS together with the first output is based on the function mappings listed in the function table.

15 . A computer program embodied on non-transitory computer-readable storage media and configured so as, when run on one or more processors, the one or more processors perform a method of validating blockchain transactions, wherein the method is performed by a node of a blockchain network, wherein the node is configured to execute script written in a high-level (HL) scripting language, wherein the blockchain comprises a first blockchain transaction, wherein the first blockchain transaction comprises a first output comprising a first compact locking script (CLS), wherein the first CLS is at least partly written in the HL scripting language and comprises one or more HL functions, wherein when executed, each HL function is configured to perform an operation equivalent to a respective operation performed by one or more low-level (LL) functions of a native, LL scripting language of the blockchain, wherein the first CLS is configured to perform an operation equivalent to a first expanded locking script (ELS) written in the LL scripting language and comprising a plurality of LL functions, and wherein the first CLS is smaller in storage size than the first ELS, and wherein the method is performed by a blockchain node and comprises:

obtaining a second blockchain transaction, wherein the second blockchain transaction comprises a first input comprising a first unlocking script; and

validating the second blockchain transaction, wherein said validating of the second blockchain transaction comprises:

obtaining the first blockchain transaction, and

a) replacing the first CLS with the first ELS, and then executing the first unlocking script together with the first ELS, wherein a condition of the second transaction being valid is that said execution is successful, or

b) executing the first unlocking script together with the first CLS, wherein a condition of the second transaction being valid is that said execution is successful.