Page MenuHomePhabricator

[Cashtab] [p8 local msg verify] Deprecate legacy verification function
ClosedPublic

Authored by bytesofman on Nov 10 2022, 12:34.

Details

Summary

T2730

Depends on D12464

Remove the legacy approach at signature verification

There is an unrelated bug where the message signing function is using BCH instead of bchObj. This would be fixed in another diff, except that we would have a build error in this diff if we left bchObj unused. So, I've patched it here.

Test Plan

npm start
Sign and verify a message in Cashtab
Confirm cashtab.com also verifies the signature

Sign a message in ElectrumABC using an ecash signature
Verify locally with this diff
Verify that cashtab.com calls it false

Diff Detail

Repository
rABC Bitcoin ABC
Branch
local-msg-signing
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 20874
Build 41405: Build Diffcashtab-tests
Build 41404: arc lint + arc unit

Event Timeline

Tail of the build log:

npm WARN EBADENGINE   current: { node: 'v15.14.0', npm: '7.7.6' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'postcss-preset-env@7.8.2',
npm WARN EBADENGINE   required: { node: '^12 || ^14 || >=16' },
npm WARN EBADENGINE   current: { node: 'v15.14.0', npm: '7.7.6' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'postcss-pseudo-class-any-link@7.1.6',
npm WARN EBADENGINE   required: { node: '^12 || ^14 || >=16' },
npm WARN EBADENGINE   current: { node: 'v15.14.0', npm: '7.7.6' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'postcss-selector-not@6.0.1',
npm WARN EBADENGINE   required: { node: '^12 || ^14 || >=16' },
npm WARN EBADENGINE   current: { node: 'v15.14.0', npm: '7.7.6' }
npm WARN EBADENGINE }
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated text-encoding@0.6.4: no longer maintained
npm WARN deprecated ts-custom-error@2.2.2: npm package tarball contains useless codeclimate-reporter binary, please update to version 3.1.1. See https://github.com/adriengibrat/ts-custom-error/issues/32

> cashtab@1.0.0 prepare
> cd ../.. && husky install web/cashtab/.husky

husky - Git hooks installed

added 1808 packages, and audited 1812 packages in 28s

232 packages are looking for funding
  run `npm fund` for details

8 vulnerabilities (5 moderate, 2 high, 1 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
npm notice 
npm notice New major version of npm available! 7.7.6 -> 9.1.1
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.1.1>
npm notice Run `npm install -g npm@9.1.1` to update!
npm notice 

> cashtab@1.0.0 build
> node scripts/build.js

Creating an optimized production build...
Failed to compile.

[eslint] 
src/components/SignVerifyMsg/SignVerifyMsg.js
  Line 28:5:  'toLegacyCash' is defined but never used  no-unused-vars

Search for the keywords to learn more about each error.


Build cashtab-tests failed with exit code 1
This revision is now accepted and ready to land.Nov 14 2022, 11:28