Page MenuHomePhabricator

[examples and e.cash] Deprecate examples
ClosedPublic

Authored by bytesofman on Aug 12 2024, 21:32.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC6d4774b6d0bc: [examples and e.cash] Deprecate examples
Summary

The examples repo showcased some simple scripts for basic chronik methods. It also highlighted tx construction using utxo-lib and ecash-coinselect.

It is now obsolete for a handful of reasons:

  • in-node chronik-client instead of NNG
  • ecash-lib instead of utxo-lib
  • schnorr signed txs of ecash-lib obsoleting ecash-coinselect

I do not think it is worth updating this repo to use the latest libraries, because

  • the chronik-client integration tests are more exhaustive, always up to date, and more detailed than these exmaples
  • utxo-lib and ecash-coinselect are obsolete now, but we still have some more work to do in getting utxo selection sorted out in ecash-lib
Test Plan

CI test, preview e.cash and confirm the examples repo is no longer linked by the build page

Diff Detail

Repository
rABC Bitcoin ABC
Branch
deprecate-examples
Lint
Lint Errors
SeverityLocationCodeMessage
Errorcontrib/teamcity/build-configurations.yml:891trailing-spacesyamllint found an issue:
Unit
No Test Coverage
Build Status
Buildable 29950
Build 59435: Build Diffapp-dev-examples
Build 59434: arc lint + arc unit

Event Timeline

remove app-dev-examples from CI tests

Tail of the build log:

  modules by path ./node_modules/bs58check/*.js 1.5 KiB
    ./node_modules/bs58check/index.js 233 bytes [built] [code generated]
    ./node_modules/bs58check/base.js 1.27 KiB [built] [code generated]
  + 6 modules
modules by path ./src/*.js 21.7 KiB
  ./src/cashaddr.js 15.8 KiB [built] [code generated]
  ./src/base32.js 2.03 KiB [built] [code generated]
  ./src/validation.js 1.16 KiB [built] [code generated]
  ./src/convertBits.js 2.71 KiB [built] [code generated]
webpack 5.76.2 compiled successfully in 1644 ms
Test depends on mock-chronik-client. Installing mock-chronik-client dependencies...
/work/modules/mock-chronik-client /work/modules/ecashaddrjs /work/abc-ci-builds/app-dev-examples

added 231 packages, and audited 233 packages in 1s

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

found 0 vulnerabilities
Test does not depend on ecash-lib-wasm, skipping
Test depends on chronik-client. Building TypeScript...
/work/modules/chronik-client /work/modules/mock-chronik-client /work/modules/ecashaddrjs /work/abc-ci-builds/app-dev-examples

> chronik-client@0.29.0 prepublish
> npm run build


> chronik-client@0.29.0 build
> tsc


added 265 packages, and audited 267 packages in 6s

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

1 high severity vulnerability

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

Run `npm audit` for details.
Test does not depend on ecash-lib
Test does not depend on ecash-script, skipping ecash-script dependencies...
Test depends on ecash-coinselect. Installing ecash-coinselect dependencies...
/work/modules/ecash-coinselect /work/modules/chronik-client /work/modules/mock-chronik-client /work/modules/ecashaddrjs /work/abc-ci-builds/app-dev-examples

added 293 packages, and audited 294 packages in 1s

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

1 high severity vulnerability

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
/work/abc-ci-builds/app-dev-examples/script.sh: line 78: pushd: /work/apps/examples: No such file or directory
Build app-dev-examples failed with exit code 1
The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience.
The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience.
The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience.

test failure related to tests no longer existing. this is removed in the yml but not picked up by existing CI

The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience.

test failure related to tests no longer existing. this is removed in the yml but not picked up by existing CI

Yes the CI is failing to find the build which is expected since you're removing it

I think some of these examples can still be useful to maintain but not as part of the functional tests nor independently, but as part of chronik-docs (like a minimal wallet).

In any case it's probably easier to revive the needed ones instead of moving them in another diff.

This revision is now accepted and ready to land.Aug 13 2024, 07:12
This revision was landed with ongoing or failed builds.Aug 13 2024, 16:48
This revision was automatically updated to reflect the committed changes.