Skip to content

Commit

Permalink
fix: clarify endianness of outpointTransactionHash around library
Browse files Browse the repository at this point in the history
  • Loading branch information
bitjson committed May 14, 2022
1 parent eff0586 commit 04c8c52
Show file tree
Hide file tree
Showing 17 changed files with 2,329 additions and 2,310 deletions.
2 changes: 1 addition & 1 deletion src/lib/compiler/compiler-defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export enum CompilerDefaults {
/**
* The default `outpointTransactionHash` of inputs in scenarios.
*/
defaultScenarioInputOutpointTransactionHash = '0000000000000000000000000000000000000000000000000000000000000000',
defaultScenarioInputOutpointTransactionHash = '0000000000000000000000000000000000000000000000000000000000000001',
/**
* The default `sequenceNumber` of inputs in scenarios.
*/
Expand Down
24 changes: 12 additions & 12 deletions src/lib/compiler/scenarios.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -535,11 +535,11 @@ test(
{
outpointIndex: 0,
outpointTransactionHash: hexToBin(
'0000000000000000000000000000000000000000000000000000000000000000'
'0000000000000000000000000000000000000000000000000000000000000001'
),
sequenceNumber: 0,
unlockingBytecode: hexToBin(
'4130389ff5dbd624dae23cc61e74dbdf51ac34952a2ab1591fc1266e7bb0cc4d232c885b7b181cb9a2996e490895e0297e88c808c7bad8eb2c74bc4ba71f9f759b41'
'41d1851c0a464c5d6b5b15452327e187f5c19d0805a2ce821b00b239dcc2de2112335cf481bed0f69c780adf9eda30c3e0706b893b53e0a58fa9fad0628e30d0da41'
),
},
],
Expand Down Expand Up @@ -591,7 +591,7 @@ test(
'Cannot generate scenario "does_not_exist": a scenario definition with the identifier does_not_exist is not included in this compiler configuration.'
);

test.failing(
test(
'generateScenario: invalid bytecode value',
expectScenarioGenerationResult,
'a',
Expand All @@ -601,7 +601,7 @@ test.failing(
a: { data: { bytecode: { var1: 'invalid' } } },
},
},
'Cannot generate scenario "a": Compilation error while generating bytecode for "var1": [1, 1] Unknown identifier "invalid".'
'Cannot generate scenario "a". Compilation error while generating bytecode for "var1": [1, 1] Unknown identifier "invalid".'
);

test.failing(
Expand Down Expand Up @@ -703,7 +703,7 @@ test(
{
outpointIndex: 0,
outpointTransactionHash: hexToBin(
'0000000000000000000000000000000000000000000000000000000000000000'
'0000000000000000000000000000000000000000000000000000000000000001'
),
sequenceNumber: 0,
unlockingBytecode: hexToBin(''),
Expand All @@ -722,8 +722,8 @@ test(
}
);

test.failing(
'generateScenario: unknown locking bytecode script',
test(
'generateScenario: mismatched source outputs and transaction inputs',
expectScenarioGenerationResult,
'a',
'unlock',
Expand All @@ -732,10 +732,10 @@ test.failing(
a: { transaction: { inputs: [{}, {}] } },
},
},
'Cannot generate scenario "a": the specific input under test in this scenario is ambiguous – "transaction.inputs" must include exactly one input that has "unlockingBytecode" set to "null".'
'Cannot generate scenario "a": could not match source outputs with inputs – "sourceOutputs" must be the same length as "transaction.inputs".'
);

test.failing(
test(
'generateScenario: ambiguous input under test',
expectScenarioGenerationResult,
'a',
Expand All @@ -747,10 +747,10 @@ test.failing(
},
},
},
'Cannot generate scenario "a": Cannot generate locking bytecode for output 0: [0, 0] No script with an ID of "unknown" was provided in the compiler configuration.'
'Cannot generate scenario "a": Failed compilation of source output at index 0: Cannot resolve "var1" – the "bytecode" property was not provided in the compilation data. Failed compilation of transaction output at index 0: No script with an ID of "unknown" was provided in the compiler configuration.'
);

test.failing(
test(
'generateScenario: no locking script',
expectScenarioGenerationResult,
'a',
Expand All @@ -762,7 +762,7 @@ test.failing(
},
},
},
'Cannot generate scenario "a": Cannot generate locking bytecode for output 0: the locking script unlocked by "unlock" is not provided in this compiler configuration.',
'Cannot generate scenario "a" using unlocking script "unlock": the locking script unlocked by "unlock" is not provided in this compiler configuration.',
{
unlockingScripts: undefined,
}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/compiler/template-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ export interface AuthenticationTemplateScenarioInput {
* seen in block explorers and user interfaces (as opposed to little-endian
* byte order, which is used in standard P2P network messages).
*
* If undefined, this defaults to the "empty" hash:
* `0000000000000000000000000000000000000000000000000000000000000000`
* If undefined, this defaults to the value:
* `0000000000000000000000000000000000000000000000000000000000000001`
*
* A.K.A. Outpoint `Transaction ID`
*/
Expand Down
4 changes: 2 additions & 2 deletions src/lib/message/transaction-encoding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,8 @@ export const cloneTransactionCommon = <Transaction extends TransactionCommon>(
/**
* Compute a transaction hash (A.K.A. "transaction ID" or "TXID") from an
* encoded transaction in P2P network message order. This is the byte order
* produced by most sha256 libraries and used in most P2P network messages. It
* is also the byte order produced by `OP_SHA256` and `OP_HASH256` in the
* produced by most sha256 libraries and used by encoded P2P network messages.
* It is also the byte order produced by `OP_SHA256` and `OP_HASH256` in the
* virtual machine.
*
* @returns the transaction hash in P2P network message byte order
Expand Down
6 changes: 3 additions & 3 deletions src/lib/message/transaction-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export interface Input<Bytecode = Uint8Array, HashRepresentation = Uint8Array> {
outpointIndex: number;
/**
* The hash of the raw transaction from which this input is spent in
* big-endian byte order. This is the byte order typically seen in block
* explorers and user interfaces (as opposed to little-endian byte order,
* which is used in standard P2P network messages).
* user interface byte order ({@link hashTransactionUiOrder}). This is the
* byte order typically seen in wallets and block explorers (the reverse of
* that used by P2P network messages, the VM, and most SHA-256 libraries).
*
* A.K.A. `Transaction ID`
*
Expand Down
4 changes: 2 additions & 2 deletions src/lib/schema/ajv/validate-authentication-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ const schema22 = {
},
outpointTransactionHash: {
description:
'A 32-byte, hexadecimal-encoded hash of the transaction from which this input is spent in big-endian byte order. This is the byte order typically seen in block explorers and user interfaces (as opposed to little-endian byte order, which is used in standard P2P network messages).\n\nIf undefined, this defaults to the "empty" hash: `0000000000000000000000000000000000000000000000000000000000000000`\n\nA.K.A. Outpoint `Transaction ID`',
'A 32-byte, hexadecimal-encoded hash of the transaction from which this input is spent in big-endian byte order. This is the byte order typically seen in block explorers and user interfaces (as opposed to little-endian byte order, which is used in standard P2P network messages).\n\nIf undefined, this defaults to the value: `0000000000000000000000000000000000000000000000000000000000000001`\n\nA.K.A. Outpoint `Transaction ID`',
type: 'string',
},
sequenceNumber: {
Expand Down Expand Up @@ -3101,7 +3101,7 @@ const schema35 = {
},
outpointTransactionHash: {
description:
'A 32-byte, hexadecimal-encoded hash of the transaction from which this input is spent in big-endian byte order. This is the byte order typically seen in block explorers and user interfaces (as opposed to little-endian byte order, which is used in standard P2P network messages).\n\nIf undefined, this defaults to the "empty" hash: `0000000000000000000000000000000000000000000000000000000000000000`\n\nA.K.A. Outpoint `Transaction ID`',
'A 32-byte, hexadecimal-encoded hash of the transaction from which this input is spent in big-endian byte order. This is the byte order typically seen in block explorers and user interfaces (as opposed to little-endian byte order, which is used in standard P2P network messages).\n\nIf undefined, this defaults to the value: `0000000000000000000000000000000000000000000000000000000000000001`\n\nA.K.A. Outpoint `Transaction ID`',
type: 'string',
},
sequenceNumber: {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/schema/authentication-template.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@
"type": "number"
},
"outpointTransactionHash": {
"description": "A 32-byte, hexadecimal-encoded hash of the transaction from which this input is spent in big-endian byte order. This is the byte order typically seen in block explorers and user interfaces (as opposed to little-endian byte order, which is used in standard P2P network messages).\n\nIf undefined, this defaults to the \"empty\" hash: `0000000000000000000000000000000000000000000000000000000000000000`\n\nA.K.A. Outpoint `Transaction ID`",
"description": "A 32-byte, hexadecimal-encoded hash of the transaction from which this input is spent in big-endian byte order. This is the byte order typically seen in block explorers and user interfaces (as opposed to little-endian byte order, which is used in standard P2P network messages).\n\nIf undefined, this defaults to the value: `0000000000000000000000000000000000000000000000000000000000000001`\n\nA.K.A. Outpoint `Transaction ID`",
"type": "string"
},
"sequenceNumber": {
Expand Down
5 changes: 4 additions & 1 deletion src/lib/vm/instruction-sets/common/inspection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ export const opOutpointTxHash = <
state: State
) =>
useTransactionInput(state, (nextState, [input]) =>
pushToStackChecked(nextState, input.outpointTransactionHash.slice())
pushToStackChecked(
nextState,
input.outpointTransactionHash.slice().reverse()
)
);

export const opOutpointIndex = <State extends AuthenticationProgramStateCommon>(
Expand Down
38 changes: 19 additions & 19 deletions src/lib/vmb-tests/bch-vmb-test-utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { stringifyTestVector, vmbTestGroupToVmbTests } from '../lib.js';
/* spell-checker: disable */
test('vmbTestGroupToVmbTests', (t) => {
const result = vmbTestGroupToVmbTests([
'Basic push operations',
'Test set',
[
[
'OP_0',
Expand All @@ -31,65 +31,65 @@ test('vmbTestGroupToVmbTests', (t) => {
[
[
[
'606em',
'Basic push operations: OP_0 (A.K.A. OP_PUSHBYTES_0, OP_FALSE): zero is represented by an empty stack item (nonP2SH)',
'lqhcn',
'Test set: OP_0 (A.K.A. OP_PUSHBYTES_0, OP_FALSE): zero is represented by an empty stack item (nonP2SH)',
'OP_0',
'OP_SIZE <0> OP_EQUAL',
'02000000020000000000000000000000000000000000000000000000000000000000000000000000006441016bef010b024a4ac48b0d37b6d68866fd5d878cf85e6778e913a43cece4e0c4a176f874b8d092619d67857d189f4b9542576b010687310490c538985edbb94cc32103a524f43d6166ad3567f18b0a5c769c6ab4dc02149f4d5095ccf4e8ffa293e785000000000000000000000000000000000000000000000000000000000000000000000000010000000100000000000100000000000000000a6a08766d625f7465737400000000',
'020000000201000000000000000000000000000000000000000000000000000000000000000000000064417dfb529d352908ee0a88a0074c216b09793d6aa8c94c7640bb4ced51eaefc75d0aef61f7685d0307491e2628da3d4f91e86329265a4a58ca27a41ec0b8910779c32103a524f43d6166ad3567f18b0a5c769c6ab4dc02149f4d5095ccf4e8ffa293e785000000000100000000000000000000000000000000000000000000000000000000000000010000000100000000000100000000000000000a6a08766d625f7465737400000000',
'0210270000000000001976a91460011c6bf3f1dd98cff576437b9d85de780f497488ac102700000000000003820087',
['2021_valid', '2022_valid'],
1,
],
[
'm5vzq',
'Basic push operations: OP_0 (A.K.A. OP_PUSHBYTES_0, OP_FALSE): zero is represented by an empty stack item (P2SH20)',
'y0ql2',
'Test set: OP_0 (A.K.A. OP_PUSHBYTES_0, OP_FALSE): zero is represented by an empty stack item (P2SH20)',
'OP_0',
'OP_SIZE <0> OP_EQUAL',
'02000000020000000000000000000000000000000000000000000000000000000000000000000000006441016bef010b024a4ac48b0d37b6d68866fd5d878cf85e6778e913a43cece4e0c4a176f874b8d092619d67857d189f4b9542576b010687310490c538985edbb94cc32103a524f43d6166ad3567f18b0a5c769c6ab4dc02149f4d5095ccf4e8ffa293e78500000000000000000000000000000000000000000000000000000000000000000000000001000000050003820087000000000100000000000000000a6a08766d625f7465737400000000',
'020000000201000000000000000000000000000000000000000000000000000000000000000000000064417dfb529d352908ee0a88a0074c216b09793d6aa8c94c7640bb4ced51eaefc75d0aef61f7685d0307491e2628da3d4f91e86329265a4a58ca27a41ec0b8910779c32103a524f43d6166ad3567f18b0a5c769c6ab4dc02149f4d5095ccf4e8ffa293e78500000000010000000000000000000000000000000000000000000000000000000000000001000000050003820087000000000100000000000000000a6a08766d625f7465737400000000',
'0210270000000000001976a91460011c6bf3f1dd98cff576437b9d85de780f497488ac102700000000000017a9146b14122b4b3cb280c9ec66f8e2827cf3384010a387',
['2021_standard', '2022_standard'],
1,
],
],
[
[
'cjtdh',
'Basic push operations: OP_PUSHBYTES_1 with missing bytes (nonP2SH)',
'7j2u2',
'Test set: OP_PUSHBYTES_1 with missing bytes (nonP2SH)',
'OP_PUSHBYTES_1',
'OP_SIZE <1> OP_EQUAL',
'02000000020000000000000000000000000000000000000000000000000000000000000000000000006441016bef010b024a4ac48b0d37b6d68866fd5d878cf85e6778e913a43cece4e0c4a176f874b8d092619d67857d189f4b9542576b010687310490c538985edbb94cc32103a524f43d6166ad3567f18b0a5c769c6ab4dc02149f4d5095ccf4e8ffa293e785000000000000000000000000000000000000000000000000000000000000000000000000010000000101000000000100000000000000000a6a08766d625f7465737400000000',
'020000000201000000000000000000000000000000000000000000000000000000000000000000000064417dfb529d352908ee0a88a0074c216b09793d6aa8c94c7640bb4ced51eaefc75d0aef61f7685d0307491e2628da3d4f91e86329265a4a58ca27a41ec0b8910779c32103a524f43d6166ad3567f18b0a5c769c6ab4dc02149f4d5095ccf4e8ffa293e785000000000100000000000000000000000000000000000000000000000000000000000000010000000101000000000100000000000000000a6a08766d625f7465737400000000',
'0210270000000000001976a91460011c6bf3f1dd98cff576437b9d85de780f497488ac102700000000000003825187',
['2021_invalid', '2022_invalid'],
1,
],
[
'urv4v',
'Basic push operations: OP_PUSHBYTES_1 with missing bytes (P2SH20)',
'aqcq3',
'Test set: OP_PUSHBYTES_1 with missing bytes (P2SH20)',
'OP_PUSHBYTES_1',
'OP_SIZE <1> OP_EQUAL',
'02000000020000000000000000000000000000000000000000000000000000000000000000000000006441016bef010b024a4ac48b0d37b6d68866fd5d878cf85e6778e913a43cece4e0c4a176f874b8d092619d67857d189f4b9542576b010687310490c538985edbb94cc32103a524f43d6166ad3567f18b0a5c769c6ab4dc02149f4d5095ccf4e8ffa293e78500000000000000000000000000000000000000000000000000000000000000000000000001000000050103825187000000000100000000000000000a6a08766d625f7465737400000000',
'020000000201000000000000000000000000000000000000000000000000000000000000000000000064417dfb529d352908ee0a88a0074c216b09793d6aa8c94c7640bb4ced51eaefc75d0aef61f7685d0307491e2628da3d4f91e86329265a4a58ca27a41ec0b8910779c32103a524f43d6166ad3567f18b0a5c769c6ab4dc02149f4d5095ccf4e8ffa293e78500000000010000000000000000000000000000000000000000000000000000000000000001000000050103825187000000000100000000000000000a6a08766d625f7465737400000000',
'0210270000000000001976a91460011c6bf3f1dd98cff576437b9d85de780f497488ac102700000000000017a914348babd902f9237b6d28ad1ee00bf6941bc9bddc87',
['2021_invalid', '2022_invalid'],
1,
],
],
[
[
'30lcr',
'Basic push operations: OP_TXINPUTCOUNT operation exists (nonP2SH)',
'536z8',
'Test set: OP_TXINPUTCOUNT operation exists (nonP2SH)',
'<0>',
'OP_DROP OP_TXINPUTCOUNT <1> OP_EQUAL',
'02000000020000000000000000000000000000000000000000000000000000000000000000000000006441016bef010b024a4ac48b0d37b6d68866fd5d878cf85e6778e913a43cece4e0c4a176f874b8d092619d67857d189f4b9542576b010687310490c538985edbb94cc32103a524f43d6166ad3567f18b0a5c769c6ab4dc02149f4d5095ccf4e8ffa293e785000000000000000000000000000000000000000000000000000000000000000000000000010000000100000000000100000000000000000a6a08766d625f7465737400000000',
'020000000201000000000000000000000000000000000000000000000000000000000000000000000064417dfb529d352908ee0a88a0074c216b09793d6aa8c94c7640bb4ced51eaefc75d0aef61f7685d0307491e2628da3d4f91e86329265a4a58ca27a41ec0b8910779c32103a524f43d6166ad3567f18b0a5c769c6ab4dc02149f4d5095ccf4e8ffa293e785000000000100000000000000000000000000000000000000000000000000000000000000010000000100000000000100000000000000000a6a08766d625f7465737400000000',
'0210270000000000001976a91460011c6bf3f1dd98cff576437b9d85de780f497488ac10270000000000000475c35187',
['2021_invalid', '2022_valid'],
1,
],
[
'3gtat',
'Basic push operations: OP_TXINPUTCOUNT operation exists (P2SH20)',
'xw35p',
'Test set: OP_TXINPUTCOUNT operation exists (P2SH20)',
'<0>',
'OP_DROP OP_TXINPUTCOUNT <1> OP_EQUAL',
'02000000020000000000000000000000000000000000000000000000000000000000000000000000006441016bef010b024a4ac48b0d37b6d68866fd5d878cf85e6778e913a43cece4e0c4a176f874b8d092619d67857d189f4b9542576b010687310490c538985edbb94cc32103a524f43d6166ad3567f18b0a5c769c6ab4dc02149f4d5095ccf4e8ffa293e7850000000000000000000000000000000000000000000000000000000000000000000000000100000006000475c35187000000000100000000000000000a6a08766d625f7465737400000000',
'020000000201000000000000000000000000000000000000000000000000000000000000000000000064417dfb529d352908ee0a88a0074c216b09793d6aa8c94c7640bb4ced51eaefc75d0aef61f7685d0307491e2628da3d4f91e86329265a4a58ca27a41ec0b8910779c32103a524f43d6166ad3567f18b0a5c769c6ab4dc02149f4d5095ccf4e8ffa293e7850000000001000000000000000000000000000000000000000000000000000000000000000100000006000475c35187000000000100000000000000000a6a08766d625f7465737400000000',
'0210270000000000001976a91460011c6bf3f1dd98cff576437b9d85de780f497488ac102700000000000017a914e57b1d9d4512a857ac3c1623bceacfd2356463d187',
['2021_invalid', '2022_standard'],
1,
Expand Down
Loading

1 comment on commit 04c8c52

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Benchmark.js Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 04c8c52 Previous: eff0586 Ratio
hash.js 119865 ops/sec (±0.69%) 246369 ops/sec (±0.43%) 2.06
libauth 77032 ops/sec (±0.87%) 362332 ops/sec (±0.61%) 4.70
hash.js 15280 ops/sec (±0.69%) 246369 ops/sec (±0.43%) 16.12
asmcrypto.js 10992 ops/sec (±1.21%) 28452 ops/sec (±2.20%) 2.59
libauth 8742 ops/sec (±1.24%) 362332 ops/sec (±0.61%) 41.45
hash.js 1558 ops/sec (±1.61%) 246369 ops/sec (±0.43%) 158.13
asmcrypto.js 7.28 ops/sec (±0.83%) 28452 ops/sec (±2.20%) 3908.24
libauth 2.76 ops/sec (±1.18%) 362332 ops/sec (±0.61%) 131279.71
hash.js 0.37 ops/sec (±2.30%) 246369 ops/sec (±0.43%) 665862.16
hash.js 107040 ops/sec (±1.20%) 246369 ops/sec (±0.43%) 2.30
libauth 56394 ops/sec (±0.55%) 362332 ops/sec (±0.61%) 6.43
hash.js 14323 ops/sec (±0.87%) 246369 ops/sec (±0.43%) 17.20
crypto.subtle 10814 ops/sec (±2.83%) 21961 ops/sec (±1.91%) 2.03
libauth 6498 ops/sec (±1.30%) 362332 ops/sec (±0.61%) 55.76
asmcrypto.js 6483 ops/sec (±2.22%) 28452 ops/sec (±2.20%) 4.39
hash.js 1529 ops/sec (±0.73%) 246369 ops/sec (±0.43%) 161.13
asmcrypto.js 2.95 ops/sec (±1.02%) 28452 ops/sec (±2.20%) 9644.75
libauth 2.13 ops/sec (±1.87%) 362332 ops/sec (±0.61%) 170108.92
hash.js 0.38 ops/sec (±3.77%) 246369 ops/sec (±0.43%) 648339.47
hash.js 62199 ops/sec (±0.86%) 246369 ops/sec (±0.43%) 3.96
hash.js 57649 ops/sec (±0.95%) 246369 ops/sec (±0.43%) 4.27
libauth 85966 ops/sec (±1.14%) 362332 ops/sec (±0.61%) 4.21
asmcrypto.js 11981 ops/sec (±1.63%) 28452 ops/sec (±2.20%) 2.37
hash.js 3852 ops/sec (±0.90%) 246369 ops/sec (±0.43%) 63.96
libauth 10401 ops/sec (±1.07%) 362332 ops/sec (±0.61%) 34.84
asmcrypto.js 1312 ops/sec (±1.67%) 28452 ops/sec (±2.20%) 21.69
hash.js 463 ops/sec (±1.50%) 246369 ops/sec (±0.43%) 532.11
libauth 3.21 ops/sec (±1.69%) 362332 ops/sec (±0.61%) 112876.01
asmcrypto.js 0.61 ops/sec (±3.01%) 28452 ops/sec (±2.20%) 46642.62
hash.js 0.15 ops/sec (±0.97%) 246369 ops/sec (±0.43%) 1642460
hash.js 104717 ops/sec (±1.23%) 246369 ops/sec (±0.43%) 2.35
libauth 172468 ops/sec (±2.15%) 362332 ops/sec (±0.61%) 2.10
hash.js 13822 ops/sec (±0.68%) 246369 ops/sec (±0.43%) 17.82
libauth 22095 ops/sec (±1.12%) 362332 ops/sec (±0.61%) 16.40
hash.js 1429 ops/sec (±1.22%) 246369 ops/sec (±0.43%) 172.41
libauth 6.94 ops/sec (±0.83%) 362332 ops/sec (±0.61%) 52209.22
hash.js 0.35 ops/sec (±1.01%) 246369 ops/sec (±0.43%) 703911.43
bcoin 124447 ops/sec (±3.28%) 531808 ops/sec (±2.39%) 4.27
node.js native 118570 ops/sec (±1.85%) 303529 ops/sec (±7.01%) 2.56
hash.js 24451 ops/sec (±1.43%) 246369 ops/sec (±0.43%) 10.08
libauth 22684 ops/sec (±0.57%) 362332 ops/sec (±0.61%) 15.97
node.js native 17879 ops/sec (±0.70%) 303529 ops/sec (±7.01%) 16.98
bcoin 17199 ops/sec (±0.92%) 531808 ops/sec (±2.39%) 30.92
hash.js 2586 ops/sec (±0.81%) 246369 ops/sec (±0.43%) 95.27
libauth 7.07 ops/sec (±0.66%) 362332 ops/sec (±0.61%) 51249.22
node.js native 6.01 ops/sec (±1.28%) 303529 ops/sec (±7.01%) 50503.99
hash.js 0.51 ops/sec (±0.84%) 246369 ops/sec (±0.43%) 483076.47
libauth 3771 ops/sec (±0.98%) 362332 ops/sec (±0.61%) 96.08
libauth 3649 ops/sec (±0.76%) 362332 ops/sec (±0.61%) 99.30
libauth 11092 ops/sec (±0.74%) 362332 ops/sec (±0.61%) 32.67
libauth 5096 ops/sec (±1.57%) 362332 ops/sec (±0.61%) 71.10
bcoin 198144 ops/sec (±2.58%) 531808 ops/sec (±2.39%) 2.68
libauth 86011 ops/sec (±0.95%) 362332 ops/sec (±0.61%) 4.21
hash.js 25882 ops/sec (±1.42%) 246369 ops/sec (±0.43%) 9.52
node.js native 55783 ops/sec (±1.66%) 303529 ops/sec (±7.01%) 5.44
bcoin 30029 ops/sec (±1.54%) 531808 ops/sec (±2.39%) 17.71
asmcrypto.js 10441 ops/sec (±3.57%) 28452 ops/sec (±2.20%) 2.73
libauth 9526 ops/sec (±0.63%) 362332 ops/sec (±0.61%) 38.04
hash.js 2886 ops/sec (±0.80%) 246369 ops/sec (±0.43%) 85.37
node.js native 21.18 ops/sec (±1.05%) 303529 ops/sec (±7.01%) 14330.93
asmcrypto.js 7.3 ops/sec (±0.90%) 28452 ops/sec (±2.20%) 3897.53
libauth 2.98 ops/sec (±0.73%) 362332 ops/sec (±0.61%) 121587.92
hash.js 0.55 ops/sec (±2.97%) 246369 ops/sec (±0.43%) 447943.64
bcoin 109824 ops/sec (±1.60%) 531808 ops/sec (±2.39%) 4.84
libauth 62898 ops/sec (±0.61%) 362332 ops/sec (±0.61%) 5.76
hash.js 21521 ops/sec (±1.01%) 246369 ops/sec (±0.43%) 11.45
asmcrypto.js 13782 ops/sec (±4.21%) 28452 ops/sec (±2.20%) 2.06
node.js native 28538 ops/sec (±1.96%) 303529 ops/sec (±7.01%) 10.64
bcoin 13436 ops/sec (±1.94%) 531808 ops/sec (±2.39%) 39.58
libauth 6958 ops/sec (±0.81%) 362332 ops/sec (±0.61%) 52.07
asmcrypto.js 6113 ops/sec (±3.76%) 28452 ops/sec (±2.20%) 4.65
hash.js 2303 ops/sec (±0.79%) 246369 ops/sec (±0.43%) 106.98
node.js native 9.74 ops/sec (±1.11%) 303529 ops/sec (±7.01%) 31163.14
asmcrypto.js 3.02 ops/sec (±0.75%) 28452 ops/sec (±2.20%) 9421.19
libauth 2.17 ops/sec (±0.95%) 362332 ops/sec (±0.61%) 166973.27
hash.js 0.48 ops/sec (±3.17%) 246369 ops/sec (±0.43%) 513268.75
hash.js 102363 ops/sec (±0.82%) 246369 ops/sec (±0.43%) 2.41
asmcrypto.js 12006 ops/sec (±4.07%) 28452 ops/sec (±2.20%) 2.37
hash.js 97856 ops/sec (±1.03%) 246369 ops/sec (±0.43%) 2.52
bcoin 147413 ops/sec (±2.80%) 531808 ops/sec (±2.39%) 3.61
libauth 83507 ops/sec (±0.70%) 362332 ops/sec (±0.61%) 4.34
asmcrypto.js 10690 ops/sec (±1.26%) 28452 ops/sec (±2.20%) 2.66
hash.js 6254 ops/sec (±0.66%) 246369 ops/sec (±0.43%) 39.39
node.js native 39935 ops/sec (±1.07%) 303529 ops/sec (±7.01%) 7.60
bcoin 23232 ops/sec (±1.12%) 531808 ops/sec (±2.39%) 22.89
libauth 9708 ops/sec (±1.20%) 362332 ops/sec (±0.61%) 37.32
asmcrypto.js 1768 ops/sec (±1.49%) 28452 ops/sec (±2.20%) 16.09
hash.js 584 ops/sec (±0.58%) 246369 ops/sec (±0.43%) 421.86
node.js native 14.59 ops/sec (±0.72%) 303529 ops/sec (±7.01%) 20803.91
libauth 3.12 ops/sec (±2.98%) 362332 ops/sec (±0.61%) 116132.05
asmcrypto.js 0.6 ops/sec (±3.52%) 28452 ops/sec (±2.20%) 47420
hash.js 0.16 ops/sec (±1.01%) 246369 ops/sec (±0.43%) 1539806.25

This comment was automatically generated by workflow using github-action-benchmark.

CC: @bitjson

Please sign in to comment.