Page MenuHomePhabricator

[Cashtab] Implement ecash-lib
DraftPublic

Authored by bytesofman on Fri, May 3, 13:38.
This is a draft revision that has not yet been submitted for review.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

Implement ecash-lib in Cashtab

Test Plan

TBD

Diff Detail

Repository
rABC Bitcoin ABC
Branch
cashtab-ecash-lib
Lint
Lint Errors
SeverityLocationCodeMessage
Errorcashtab/src/transactions/__tests__/index.test.js:83ESLINTjest/no-focused-tests
Errorcashtab/src/transactions/index.js:12ESLINTno-unused-vars
Errorcashtab/src/transactions/index.js:15ESLINTno-unused-vars
Unit
No Test Coverage
Build Status
Buildable 28877
Build 57292: Build Diffecash-lib-integration-tests · ecash-agora-integration-tests · ecash-lib-tests · cashtab-tests
Build 57291: arc lint + arc unit

Event Timeline

Tail of the build log:

   Compiling log v0.4.21
   Compiling once_cell v1.19.0
   Compiling cc v1.0.92
   Compiling wasm-bindgen v0.2.92
   Compiling cfg-if v1.0.0
   Compiling thiserror v1.0.58
   Compiling abc-rust-lint v0.1.0 (/work/chronik/abc-rust-lint)
   Compiling generic-array v0.14.7
   Compiling quote v1.0.36
   Compiling syn v2.0.58
   Compiling secp256k1-sys-abc v0.4.1 (https://github.com/raipay/secp256k1-abc?rev=b23e742#b23e7421)
   Compiling crypto-common v0.1.6
   Compiling block-buffer v0.10.4
   Compiling digest v0.10.7
   Compiling sha2 v0.10.8
   Compiling ripemd v0.1.3
   Compiling wasm-bindgen-backend v0.2.92
   Compiling secp256k1-abc v0.20.3 (https://github.com/raipay/secp256k1-abc?rev=b23e742#b23e7421)
   Compiling thiserror-impl v1.0.58
   Compiling wasm-bindgen-macro-support v0.2.92
   Compiling wasm-bindgen-macro v0.2.92
   Compiling ecash-lib-wasm v0.1.0 (/work/modules/ecash-lib-wasm)
    Finished release-wasm [optimized] target(s) in 7.28s
Test depends on chronik-client. Building TypeScript...
/work/modules/chronik-client /work/modules/ecash-lib-wasm /work/abc-ci-builds/ecash-lib-tests

> chronik-client@0.26.2 prepublish
> npm run build


> chronik-client@0.26.2 build
> tsc


added 270 packages, and audited 271 packages in 7s

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

1 moderate severity vulnerability

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
/work/modules/ecash-lib /work/modules/chronik-client /work/modules/ecash-lib-wasm /work/abc-ci-builds/ecash-lib-tests

added 362 packages, and audited 364 packages in 2s

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

found 0 vulnerabilities
CI configured to test build. Building...

> ecash-lib@0.1.0 build
> tsc && tsc -p ./tsconfig.build.json && cp -r ./src/ffi ./dist

src/init.ts(12,63): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.
Build ecash-lib-tests failed with exit code 2

Tail of the build log:

Installing mock-chronik-client dependencies...
/work/modules/mock-chronik-client /work/abc-ci-builds/cashtab-tests

added 236 packages, and audited 237 packages in 1s

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

found 0 vulnerabilities
/work/cashtab /work/modules/mock-chronik-client /work/abc-ci-builds/cashtab-tests

added 1663 packages, and audited 1665 packages in 28s

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

2 moderate severity vulnerabilities

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

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

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

Module not found: Error: Can't resolve 'ecash-lib' in '/work/cashtab/src/transactions'


Build cashtab-tests failed with exit code 1

Tail of the build log:

   Compiling bumpalo v3.16.0
   Compiling log v0.4.21
   Compiling once_cell v1.19.0
   Compiling thiserror v1.0.58
   Compiling cfg-if v1.0.0
   Compiling wasm-bindgen v0.2.92
   Compiling abc-rust-lint v0.1.0 (/work/chronik/abc-rust-lint)
   Compiling generic-array v0.14.7
   Compiling quote v1.0.36
   Compiling syn v2.0.58
   Compiling secp256k1-sys-abc v0.4.1 (https://github.com/raipay/secp256k1-abc?rev=b23e742#b23e7421)
   Compiling block-buffer v0.10.4
   Compiling crypto-common v0.1.6
   Compiling digest v0.10.7
   Compiling ripemd v0.1.3
   Compiling sha2 v0.10.8
   Compiling wasm-bindgen-backend v0.2.92
   Compiling secp256k1-abc v0.20.3 (https://github.com/raipay/secp256k1-abc?rev=b23e742#b23e7421)
   Compiling thiserror-impl v1.0.58
   Compiling wasm-bindgen-macro-support v0.2.92
   Compiling wasm-bindgen-macro v0.2.92
   Compiling ecash-lib-wasm v0.1.0 (/work/modules/ecash-lib-wasm)
    Finished release-wasm [optimized] target(s) in 4.51s
Test depends on chronik-client. Building TypeScript...
/work/modules/chronik-client /work/modules/ecash-lib-wasm /work/abc-ci-builds/ecash-agora-integration-tests

> chronik-client@0.26.2 prepublish
> npm run build


> chronik-client@0.26.2 build
> tsc


added 270 packages, and audited 271 packages in 6s

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

1 moderate severity vulnerability

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
Test depends on ecash-lib. Building TypeScript...
/work/modules/ecash-lib /work/modules/chronik-client /work/modules/ecash-lib-wasm /work/abc-ci-builds/ecash-agora-integration-tests

added 362 packages, and audited 364 packages in 2s

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

found 0 vulnerabilities

> ecash-lib@0.1.0 build
> tsc && tsc -p ./tsconfig.build.json && cp -r ./src/ffi ./dist

src/init.ts(12,63): error TS1343: The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.
Build ecash-agora-integration-tests failed with exit code 2

Tail of the build log:

Traceback (most recent call last):
  File "/work/abc-ci-builds/ecash-lib-integration-tests/test/functional/test_runner.py", line 1081, in <module>
    main()
  File "/work/abc-ci-builds/ecash-lib-integration-tests/test/functional/test_runner.py", line 361, in main
    os.makedirs(tmpdir)
  File "/usr/lib/python3.9/os.py", line 225, in makedirs
    mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/work/abc-ci-builds/ecash-lib-integration-tests/test/tmp/test_runner_₿₵_🏃_20240503_134726'
2024-05-03T13:47:26.956000Z TestFramework (INFO): Stopping nodes
Test runner completed with code 1
---------------------|---------|----------|---------|---------|-------------------
File                 | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
---------------------|---------|----------|---------|---------|-------------------
All files            |       0 |        0 |       0 |       0 |                   
 ecash-lib           |       0 |        0 |       0 |       0 |                   
  eslint.config.js   |       0 |        0 |       0 |       0 |                   
 ecash-lib/src       |       0 |        0 |       0 |       0 |                   
  ecc.ts             |       0 |      100 |       0 |       0 | 22-35             
  hash.ts            |       0 |      100 |     100 |       0 | 7-9               
  index.ts           |       0 |        0 |       0 |       0 |                   
  init.ts            |       0 |        0 |       0 |       0 | 9-16              
  op.ts              |       0 |        0 |       0 |       0 | 33-124            
  opcode.ts          |       0 |      100 |     100 |       0 | 10-154            
  script.ts          |       0 |        0 |       0 |       0 | 26-158            
  sigHashType.ts     |       0 |        0 |       0 |       0 | 19-166            
  tx.ts              |       0 |        0 |       0 |       0 | 20-166            
  txBuilder.ts       |       0 |        0 |       0 |       0 | 74-245            
  unsignedTx.ts      |       0 |        0 |       0 |       0 | 38-229            
 ecash-lib/src/ffi   |       0 |        0 |       0 |       0 |                   
  ecash_lib_wasm.js  |       0 |        0 |       0 |       0 | 3-336             
 ecash-lib/src/io    |       0 |        0 |       0 |       0 |                   
  bytes.ts           |       0 |        0 |       0 |       0 | 13-64             
  hex.ts             |       0 |        0 |       0 |       0 | 5-68              
  int.ts             |       0 |        0 |       0 |       0 |                   
  str.ts             |       0 |      100 |       0 |       0 | 5-9               
  varsize.ts         |       0 |        0 |       0 |       0 | 14-47             
  writer.ts          |       0 |        0 |       0 |       0 |                   
  writerbytes.ts     |       0 |        0 |       0 |       0 | 21-79             
  writerlength.ts    |       0 |      100 |       0 |       0 | 16-41             
 ecash-lib/src/test  |       0 |        0 |       0 |       0 |                   
  testRunner.ts      |       0 |        0 |       0 |       0 | 17-191            
 ecash-lib/src/token |       0 |        0 |       0 |       0 |                   
  alp.ts             |       0 |        0 |       0 |       0 | 13-145            
  common.ts          |       0 |      100 |     100 |       0 | 9-12              
  empp.ts            |       0 |        0 |       0 |       0 | 11-28             
  slp.ts             |       0 |        0 |       0 |       0 | 13-211            
---------------------|---------|----------|---------|---------|-------------------

##teamcity[blockOpened name='Code Coverage Summary']
##teamcity[buildStatisticValue key='CodeCoverageAbsBCovered' value='0']
##teamcity[buildStatisticValue key='CodeCoverageAbsBTotal' value='920']
##teamcity[buildStatisticValue key='CodeCoverageAbsRCovered' value='0']
##teamcity[buildStatisticValue key='CodeCoverageAbsRTotal' value='338']
##teamcity[buildStatisticValue key='CodeCoverageAbsMCovered' value='0']
##teamcity[buildStatisticValue key='CodeCoverageAbsMTotal' value='151']
##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='0']
##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='902']
##teamcity[blockClosed name='Code Coverage Summary']
mv: cannot stat 'test_results/ecash-lib-integration-tests-junit.xml': No such file or directory
Build ecash-lib-integration-tests failed with exit code 1