CPC H04L 9/32 (2013.01) [G06Q 20/0658 (2013.01); G06Q 20/3678 (2013.01); H04L 9/0637 (2013.01); G06Q 2220/00 (2013.01); H04L 9/50 (2022.05); H04L 2209/56 (2013.01)] | 13 Claims |
1. A computer-implemented method to validate a block within a network of nodes implementing a blockchain conforming to a blockchain protocol, the block containing a plurality of transactions, the method comprising:
determining that the block complies with block-level validation criteria;
determining, serially, that each unspent transaction output referenced as an input in each of the plurality of transactions is unique and, based on that determination:
allocating each transaction in the plurality of transactions to one of two or more parallel processors, wherein allocating each transaction in the plurality of transactions to one of two or more parallel processors comprises:
for each transaction in the plurality of transactions, determining a processing cost for verifying that the transaction complies with transaction-level validation criteria, wherein:
the processing cost for the transaction is based on a weighted sum of script operations; and
each script operation has an associated weight based on a computational complexity of the script operation as appropriate for the blockchain protocol; and
load-balancing the processing cost among the two or more parallel processors; and
verifying, in parallel, by the two or more parallel processors, that each transaction in the plurality of transactions complies with the transaction-level validation criteria; and
as a result of each transaction complying with the transaction-level validation criteria and the block complying with the block-level validation criteria, forwarding the block to one or more peer nodes in the network.
|