Use upgraded ecash-coinselect to create slpv1 token send txs.
Details
- Reviewers
PiRK - Group Reviewers
Restricted Project - Commits
- rABC8cb8e1d99513: [Cashtab] Upgrade slpv1 send txs
npm test
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
cashtab/package-lock.json | ||
---|---|---|
19 ↗ | (On Diff #45499) | |
cashtab/src/transactions/fixtures/vectors.js | ||
715 ↗ | (On Diff #45499) | I reviewed the rawtxs here in Electrum. All looked good and were created at 1 sat/byte, implying expected behavior of ecash-coinselect upgrade. I broadcast this last one and it checks out. |
cashtab/src/components/Send/SendToken.js | ||
---|---|---|
186 ↗ | (On Diff #45527) | Does this remove all uses of that sendToken function? If so, should the function be removed? I don't see any other callsite in the repo. |
cashtab/src/components/Send/SendToken.js | ||
---|---|---|
186 ↗ | (On Diff #45527) | Yes -- however, there are so many sub functions and other dependencies in utils/transactions.js that I am going to remove them all at once -- after slpBurn is also implemented in this improved method. For example, some of the tx building helpers are used in both send and burn and the respective tests for those legacy functions...so I can't get rid of them yet. I could get rid of just sendToken, but doesn't really feel complete, I think easier to keep track of what is being used where if all the legacy functions go at once. I think it will be easier to review that way. |
Failed tests logs:
====== CashTab Unit Tests: Get slpv1 send token inputs and outputs from NNG chronik-client getSendTokenInputs: Legacy unit test of deprecated function generateSendOpReturn ====== Error: expect(received).toStrictEqual(expected) // deep equality - Expected - 1 + Received + 1 Array [ - "49995000", + "50000", "49945000", ] at Object.toStrictEqual (/work/cashtab/src/slpv1/__tests__/index.test.js:84:49) at Promise.then.completed (/work/cashtab/node_modules/jest-circus/build/utils.js:298:28) at new Promise (<anonymous>) at callAsyncCircusFn (/work/cashtab/node_modules/jest-circus/build/utils.js:231:10) at _callCircusTest (/work/cashtab/node_modules/jest-circus/build/run.js:316:40) at processTicksAndRejections (node:internal/process/task_queues:95:5) at _runTest (/work/cashtab/node_modules/jest-circus/build/run.js:252:3) at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:126:9) at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:121:9) at run (/work/cashtab/node_modules/jest-circus/build/run.js:71:3) at runAndTransformResultsToJestFormat (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21) at jestAdapter (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19) at runTestInternal (/work/cashtab/node_modules/jest-runner/build/runTest.js:367:16) at runTest (/work/cashtab/node_modules/jest-runner/build/runTest.js:444:34) at Object.worker (/work/cashtab/node_modules/jest-runner/build/testWorker.js:106:12) ====== CashTab Unit Tests: Get slpv1 send token inputs and outputs from NNG chronik-client getSendTokenInputs: Token send with change output ====== Error: expect(received).toStrictEqual(expected) // deep equality - Expected - 1 + Received + 1 Array [ - "9999999689", + "189", "9999999500", ] at Object.toStrictEqual (/work/cashtab/src/slpv1/__tests__/index.test.js:84:49) at Promise.then.completed (/work/cashtab/node_modules/jest-circus/build/utils.js:298:28) at new Promise (<anonymous>) at callAsyncCircusFn (/work/cashtab/node_modules/jest-circus/build/utils.js:231:10) at _callCircusTest (/work/cashtab/node_modules/jest-circus/build/run.js:316:40) at processTicksAndRejections (node:internal/process/task_queues:95:5) at _runTest (/work/cashtab/node_modules/jest-circus/build/run.js:252:3) at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:126:9) at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:121:9) at run (/work/cashtab/node_modules/jest-circus/build/run.js:71:3) at runAndTransformResultsToJestFormat (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21) at jestAdapter (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19) at runTestInternal (/work/cashtab/node_modules/jest-runner/build/runTest.js:367:16) at runTest (/work/cashtab/node_modules/jest-runner/build/runTest.js:444:34) at Object.worker (/work/cashtab/node_modules/jest-runner/build/testWorker.js:106:12) ====== CashTab Unit Tests: Get slpv1 send token inputs and outputs from NNG chronik-client getSendTokenInputs: We ignore un-needed utxos in a token send with change output ====== Error: expect(received).toStrictEqual(expected) // deep equality - Expected - 1 + Received + 1 Array [ - "9999999689", + "189", "9999999500", ] at Object.toStrictEqual (/work/cashtab/src/slpv1/__tests__/index.test.js:84:49) at Promise.then.completed (/work/cashtab/node_modules/jest-circus/build/utils.js:298:28) at new Promise (<anonymous>) at callAsyncCircusFn (/work/cashtab/node_modules/jest-circus/build/utils.js:231:10) at _callCircusTest (/work/cashtab/node_modules/jest-circus/build/run.js:316:40) at processTicksAndRejections (node:internal/process/task_queues:95:5) at _runTest (/work/cashtab/node_modules/jest-circus/build/run.js:252:3) at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:126:9) at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:121:9) at run (/work/cashtab/node_modules/jest-circus/build/run.js:71:3) at runAndTransformResultsToJestFormat (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21) at jestAdapter (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19) at runTestInternal (/work/cashtab/node_modules/jest-runner/build/runTest.js:367:16) at runTest (/work/cashtab/node_modules/jest-runner/build/runTest.js:444:34) at Object.worker (/work/cashtab/node_modules/jest-runner/build/testWorker.js:106:12) ====== CashTab Unit Tests: Get slpv1 send token inputs and outputs from NNG chronik-client getSendTokenInputs: Token send with change output and decimals ====== Error: expect(received).toStrictEqual(expected) // deep equality - Expected - 1 + Received + 1 Array [ - "212", + "210", "2", ] at Object.toStrictEqual (/work/cashtab/src/slpv1/__tests__/index.test.js:84:49) at Promise.then.completed (/work/cashtab/node_modules/jest-circus/build/utils.js:298:28) at new Promise (<anonymous>) at callAsyncCircusFn (/work/cashtab/node_modules/jest-circus/build/utils.js:231:10) at _callCircusTest (/work/cashtab/node_modules/jest-circus/build/run.js:316:40) at processTicksAndRejections (node:internal/process/task_queues:95:5) at _runTest (/work/cashtab/node_modules/jest-circus/build/run.js:252:3) at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:126:9) at _runTestsForDescribeBlock (/work/cashtab/node_modules/jest-circus/build/run.js:121:9) at run (/work/cashtab/node_modules/jest-circus/build/run.js:71:3) at runAndTransformResultsToJestFormat (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21) at jestAdapter (/work/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19) at runTestInternal (/work/cashtab/node_modules/jest-runner/build/runTest.js:367:16) at runTest (/work/cashtab/node_modules/jest-runner/build/runTest.js:444:34) at Object.worker (/work/cashtab/node_modules/jest-runner/build/testWorker.js:106:12)
Each failure log is accessible here:
CashTab Unit Tests: Get slpv1 send token inputs and outputs from NNG chronik-client getSendTokenInputs: Legacy unit test of deprecated function generateSendOpReturn
CashTab Unit Tests: Get slpv1 send token inputs and outputs from NNG chronik-client getSendTokenInputs: Token send with change output
CashTab Unit Tests: Get slpv1 send token inputs and outputs from NNG chronik-client getSendTokenInputs: We ignore un-needed utxos in a token send with change output
CashTab Unit Tests: Get slpv1 send token inputs and outputs from NNG chronik-client getSendTokenInputs: Token send with change output and decimals