From 3075c467f1e04e4d10d7dbe50eff8736bc60fda5 Mon Sep 17 00:00:00 2001 From: Jason Dreyzehner Date: Thu, 12 Dec 2024 19:24:39 -0500 Subject: [PATCH] Fix build issues --- .pnp.cjs | 2 +- .yarn | 2 +- .yarnrc.yml | 2 +- package.json | 4 ++-- src/lib/schema/ajv/validate-wallet-template.js | 4 ++-- src/lib/schema/wallet-template.schema.json | 2 +- src/lib/vmb-tests/bchn/bchn-error-map.spec.helper.ts | 4 ++++ wasm/bitcoin-cash-node | 2 +- 8 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.pnp.cjs b/.pnp.cjs index a1106c43..d59c7002 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -14369,7 +14369,7 @@ class MountFS extends BasePortableFakeFS { if (this.notMount.has(filePath)) continue; try { - if (this.typeCheck !== null && (this.baseFs.lstatSync(filePath).mode & fs.constants.S_IFMT) !== this.typeCheck) { + if (this.typeCheck !== null && (this.baseFs.statSync(filePath).mode & fs.constants.S_IFMT) !== this.typeCheck) { this.notMount.add(filePath); continue; } diff --git a/.yarn b/.yarn index dd139f15..72ec472b 160000 --- a/.yarn +++ b/.yarn @@ -1 +1 @@ -Subproject commit dd139f1543626bd036a1c10134dc8d4a968cadce +Subproject commit 72ec472bf2d3dd51b107e507f6dbd56860586e5f diff --git a/.yarnrc.yml b/.yarnrc.yml index 9565906c..caa64782 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -18,4 +18,4 @@ supportedArchitectures: - linux - win32 -yarnPath: .yarn/releases/yarn-4.5.0.cjs +yarnPath: .yarn/releases/yarn-4.5.3.cjs diff --git a/package.json b/package.json index b55c6691..c6492011 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "gen:graph": "mkdir -p temp && madge --image temp/deps-$(date +\"%FT%H%M\").svg build/index.js", "test": "yarn build && yarn test:policies && yarn test:unit", "test:policies": "yarn test:deps && yarn test:schemas && yarn test:lint && yarn test:cycles", - "test:deps": "node -e \"import('./package.json', { assert: { type: 'json' } }).then(p => typeof p.dependencies === 'undefined' ? console.log('No dependencies found.') : (console.error('Dependencies are not allowed.') && process.exit(1)));\"", + "test:deps": "node -e \"import('./package.json', { with: { type: 'json' } }).then(p => typeof p.dependencies === 'undefined' ? console.log('No dependencies found.') : (console.error('Dependencies are not allowed.') && process.exit(1)));\"", "test:schemas:unchanged": "yarn gen:schema && node -e \"child_process.exec('git status src/lib/schema --porcelain | head -c1 | wc -c', (err, stdout) => stdout.trim() === '0' ? process.exit(0) : process.exit(1) )\"", "test:schemas": "yarn test:schemas:unchanged && echo \"Schemas are up to date.\" || echo \"Error: one or more schemas are outdated. Please review and commit the changes in src/lib/schema.\"", "test:lint": "yarn test:prettier && yarn test:eslint && yarn test:spelling", @@ -204,7 +204,7 @@ ] }, "sideEffects": false, - "packageManager": "yarn@4.5.0", + "packageManager": "yarn@4.5.3", "resolutions": { "eslint-config-bitauth": "portal:./config/eslint-config-bitauth" } diff --git a/src/lib/schema/ajv/validate-wallet-template.js b/src/lib/schema/ajv/validate-wallet-template.js index 1e03c5ee..0f9723a4 100644 --- a/src/lib/schema/ajv/validate-wallet-template.js +++ b/src/lib/schema/ajv/validate-wallet-template.js @@ -556,7 +556,7 @@ const schema22 = { properties: { lockingType: { description: - 'Indicates if P2SH20 infrastructure should be used when producing bytecode related to this script. For more information on P2SH20, see BIP16.\n\nWhen compiling locking scripts of type `p2sh20`, the result will be placed in a P2SH20 "redeem script" format: `OP_HASH160 <$( OP_HASH160)> OP_EQUAL`\n\nWhen compiling unlocking scripts that unlock locking scripts of type `p2sh20`, the result will be transformed into the P2SH20 unlocking format: `unlockingBytecode ` (where `lockingBytecode` is the compiled bytecode of the locking script, without the "redeem script" transformation.)\n\nThe presence of the `lockingType` property indicates that this script is a locking script. It must be present on any script referenced by the `unlocks` property of another script.', + 'Indicates if P2SH20 infrastructure should be used when producing bytecode related to this script. For more information on P2SH20, see BIP16.\n\nWhen compiling locking scripts of type `p2sh20`, the result will be placed in a P2SH20 "redeem script" format: `OP_HASH160 <$( OP_HASH160)> OP_EQUAL`\n\nWhen compiling unlocking scripts that unlock locking scripts of type `p2sh20`, the result will be transformed into the P2SH20 unlocking format: `unlockingBytecode ` (where `lockingBytecode` is the compiled bytecode of the locking script, without the "redeem script" transformation.)\n\nThe presence of the `lockingType` property indicates that this script is a locking script. It must be present on any script referenced by the `unlocks` property of another script.\n\nTODO: migrate `standard` -> `p2s`', enum: ['p2sh20', 'p2sh32', 'standard'], type: 'string', }, @@ -810,7 +810,7 @@ const schema38 = { properties: { lockingType: { description: - 'Indicates if P2SH20 infrastructure should be used when producing bytecode related to this script. For more information on P2SH20, see BIP16.\n\nWhen compiling locking scripts of type `p2sh20`, the result will be placed in a P2SH20 "redeem script" format: `OP_HASH160 <$( OP_HASH160)> OP_EQUAL`\n\nWhen compiling unlocking scripts that unlock locking scripts of type `p2sh20`, the result will be transformed into the P2SH20 unlocking format: `unlockingBytecode ` (where `lockingBytecode` is the compiled bytecode of the locking script, without the "redeem script" transformation.)\n\nThe presence of the `lockingType` property indicates that this script is a locking script. It must be present on any script referenced by the `unlocks` property of another script.', + 'Indicates if P2SH20 infrastructure should be used when producing bytecode related to this script. For more information on P2SH20, see BIP16.\n\nWhen compiling locking scripts of type `p2sh20`, the result will be placed in a P2SH20 "redeem script" format: `OP_HASH160 <$( OP_HASH160)> OP_EQUAL`\n\nWhen compiling unlocking scripts that unlock locking scripts of type `p2sh20`, the result will be transformed into the P2SH20 unlocking format: `unlockingBytecode ` (where `lockingBytecode` is the compiled bytecode of the locking script, without the "redeem script" transformation.)\n\nThe presence of the `lockingType` property indicates that this script is a locking script. It must be present on any script referenced by the `unlocks` property of another script.\n\nTODO: migrate `standard` -> `p2s`', enum: ['p2sh20', 'p2sh32', 'standard'], type: 'string', }, diff --git a/src/lib/schema/wallet-template.schema.json b/src/lib/schema/wallet-template.schema.json index 8171dc70..5fde87ff 100644 --- a/src/lib/schema/wallet-template.schema.json +++ b/src/lib/schema/wallet-template.schema.json @@ -527,7 +527,7 @@ "additionalProperties": false, "properties": { "lockingType": { - "description": "Indicates if P2SH20 infrastructure should be used when producing bytecode related to this script. For more information on P2SH20, see BIP16.\n\nWhen compiling locking scripts of type `p2sh20`, the result will be placed in a P2SH20 \"redeem script\" format: `OP_HASH160 <$( OP_HASH160)> OP_EQUAL`\n\nWhen compiling unlocking scripts that unlock locking scripts of type `p2sh20`, the result will be transformed into the P2SH20 unlocking format: `unlockingBytecode ` (where `lockingBytecode` is the compiled bytecode of the locking script, without the \"redeem script\" transformation.)\n\nThe presence of the `lockingType` property indicates that this script is a locking script. It must be present on any script referenced by the `unlocks` property of another script.", + "description": "Indicates if P2SH20 infrastructure should be used when producing bytecode related to this script. For more information on P2SH20, see BIP16.\n\nWhen compiling locking scripts of type `p2sh20`, the result will be placed in a P2SH20 \"redeem script\" format: `OP_HASH160 <$( OP_HASH160)> OP_EQUAL`\n\nWhen compiling unlocking scripts that unlock locking scripts of type `p2sh20`, the result will be transformed into the P2SH20 unlocking format: `unlockingBytecode ` (where `lockingBytecode` is the compiled bytecode of the locking script, without the \"redeem script\" transformation.)\n\nThe presence of the `lockingType` property indicates that this script is a locking script. It must be present on any script referenced by the `unlocks` property of another script.\n\nTODO: migrate `standard` -> `p2s`", "enum": ["p2sh20", "p2sh32", "standard"], "type": "string" }, diff --git a/src/lib/vmb-tests/bchn/bchn-error-map.spec.helper.ts b/src/lib/vmb-tests/bchn/bchn-error-map.spec.helper.ts index 97232077..3c169a4b 100644 --- a/src/lib/vmb-tests/bchn/bchn-error-map.spec.helper.ts +++ b/src/lib/vmb-tests/bchn/bchn-error-map.spec.helper.ts @@ -37,6 +37,8 @@ export const libauthErrorPrefixToBchnErrorStandard: { excessiveLooping: '', excessiveOperationCost: 'mandatory-script-verify-flag-failed (VM cost limit exceeded)', + excessiveOperationCostOpPow: + 'mandatory-script-verify-flag-failed (VM cost limit exceeded)', failedVerify: 'mandatory-script-verify-flag-failed (Script failed an OP_EQUALVERIFY operation)', incompatibleLocktimeType: '', @@ -159,6 +161,8 @@ export const libauthErrorPrefixToBchnErrorNonstandard: { excessiveLooping: '', excessiveOperationCost: 'mandatory-script-verify-flag-failed (VM cost limit exceeded)', + excessiveOperationCostOpPow: + 'mandatory-script-verify-flag-failed (VM cost limit exceeded)', failedVerify: 'mandatory-script-verify-flag-failed (Script failed an OP_EQUALVERIFY operation)', incompatibleLocktimeType: '', diff --git a/wasm/bitcoin-cash-node b/wasm/bitcoin-cash-node index 01beca01..4b729ce7 160000 --- a/wasm/bitcoin-cash-node +++ b/wasm/bitcoin-cash-node @@ -1 +1 @@ -Subproject commit 01beca01e0c3b50b1a50eb21bb3ad115064cda3b +Subproject commit 4b729ce7791430d80d14e2f360ee16db879a6ba5