T3441
Support and tests for the validate-tx enpdoint
Differential D15631
[chronik-client] Add support for validate-tx endpoint to ChronikClientNode bytesofman on Mar 4 2024, 22:40. Authored by
Details
T3441 Support and tests for the validate-tx enpdoint CI
Diff Detail
Event TimelineComment Actions Build Bitcoin ABC Diffs / Diff Testing (chronik-client-tests) failed.
Tail of the build log: /work/modules/chronik-client /work/abc-ci-builds/chronik-client-tests > chronik-client@0.24.0 prepublish > npm run build > chronik-client@0.24.0 build > tsc src/ChronikClientNode.ts(85,57): error TS2345: Argument of type '{ rawTx: Uint8Array; }' is not assignable to parameter of type 'BroadcastTxRequest'. Property 'skipTokenChecks' is missing in type '{ rawTx: Uint8Array; }' but required in type 'BroadcastTxRequest'. src/ChronikClientNode.ts(90,9): error TS2740: Type '{ txid: string; }' is missing the following properties from type 'Tx_InNode': version, inputs, outputs, lockTime, and 7 more. npm ERR! code 2 npm ERR! path /work/modules/chronik-client npm ERR! command failed npm ERR! command sh -c npm run build npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-03-04T22_41_04_925Z-debug-0.log Build chronik-client-tests failed with exit code 2 Comment Actions Tail of the build log: [515/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/utilitydialog.cpp.o [516/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/addressbookpage.cpp.o [517/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/trafficgraphwidget.cpp.o [518/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/splashscreen.cpp.o [519/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/coincontroltreewidget.cpp.o [520/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/rpcconsole.cpp.o [521/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/createwalletdialog.cpp.o [522/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/addresstablemodel.cpp.o [523/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/askpassphrasedialog.cpp.o [524/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/editaddressdialog.cpp.o [525/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/openuridialog.cpp.o [526/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/qrimagewidget.cpp.o [527/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/coincontroldialog.cpp.o [528/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/overviewpage.cpp.o [529/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/receivecoinsdialog.cpp.o [530/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/receiverequestdialog.cpp.o [531/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/recentrequeststablemodel.cpp.o [532/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/paymentserver.cpp.o [533/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/sendcoinsentry.cpp.o [534/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/signverifymessagedialog.cpp.o [535/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactiondescdialog.cpp.o [536/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactionfilterproxy.cpp.o [537/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/sendcoinsdialog.cpp.o [538/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactiondesc.cpp.o [539/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactionrecord.cpp.o [540/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactiontablemodel.cpp.o [541/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactionview.cpp.o [542/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/walletframe.cpp.o [543/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/walletmodeltransaction.cpp.o [544/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/paymentrequestplus.cpp.o [545/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/walletcontroller.cpp.o [546/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/walletmodel.cpp.o [547/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/walletview.cpp.o [548/555] Linking CXX executable src/bitcoind [549/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/qrc_bitcoin.cpp.o [550/555] Linking CXX executable src/bench/bitcoin-bench [551/555] Linking CXX static library src/qt/libbitcoin-qt-base.a [552/555] Automatic MOC for target bitcoin-qt [553/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt.dir/bitcoin-qt_autogen/mocs_compilation.cpp.o [554/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt.dir/main.cpp.o [555/555] Linking CXX executable src/qt/bitcoin-qt /work/modules/chronik-client /work/abc-ci-builds/chronik-client-integration-tests > chronik-client@0.24.0 prepublish > npm run build > chronik-client@0.24.0 build > tsc src/ChronikClientNode.ts(85,57): error TS2345: Argument of type '{ rawTx: Uint8Array; }' is not assignable to parameter of type 'BroadcastTxRequest'. Property 'skipTokenChecks' is missing in type '{ rawTx: Uint8Array; }' but required in type 'BroadcastTxRequest'. src/ChronikClientNode.ts(90,9): error TS2740: Type '{ txid: string; }' is missing the following properties from type 'Tx_InNode': version, inputs, outputs, lockTime, and 7 more. npm ERR! code 2 npm ERR! path /work/modules/chronik-client npm ERR! command failed npm ERR! command sh -c npm run build npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-03-04T22_43_47_824Z-debug-0.log Build chronik-client-integration-tests failed with exit code 2
Comment Actions Build Bitcoin ABC Diffs / Diff Testing (chronik-client-tests) failed.
Tail of the build log: /work/modules/chronik-client /work/abc-ci-builds/chronik-client-tests > chronik-client@0.25.0 prepublish > npm run build > chronik-client@0.25.0 build > tsc test/validateTx.ts(27,17): error TS2741: Property 'outputScript' is missing in type '{ prevOut: { txid: string; outIdx: number; }; inputScript: string; value: number; sequenceNo: number; token: { tokenId: string; tokenType: { protocol: "SLP"; type: "SLP_TOKEN_TYPE_FUNGIBLE"; number: number; }; amount: string; isMintBaton: false; entryIdx: number; }; }' but required in type 'TxInput_InNode'. test/validateTx.ts(49,17): error TS2741: Property 'outputScript' is missing in type '{ prevOut: { txid: string; outIdx: number; }; inputScript: string; value: number; sequenceNo: number; }' but required in type 'TxInput_InNode'. test/validateTx.ts(61,17): error TS2741: Property 'spentBy' is missing in type '{ value: number; outputScript: string; }' but required in type 'TxOutput_InNode'. test/validateTx.ts(66,17): error TS2741: Property 'spentBy' is missing in type '{ value: number; outputScript: string; token: { tokenId: string; tokenType: { protocol: "SLP"; type: "SLP_TOKEN_TYPE_FUNGIBLE"; number: number; }; amount: string; isMintBaton: false; entryIdx: number; }; }' but required in type 'TxOutput_InNode'. test/validateTx.ts(83,17): error TS2741: Property 'spentBy' is missing in type '{ value: number; outputScript: string; token: { tokenId: string; tokenType: { protocol: "SLP"; type: "SLP_TOKEN_TYPE_FUNGIBLE"; number: number; }; amount: string; isMintBaton: false; entryIdx: number; }; }' but required in type 'TxOutput_InNode'. test/validateTx.ts(100,17): error TS2741: Property 'spentBy' is missing in type '{ value: number; outputScript: string; }' but required in type 'TxOutput_InNode'. test/validateTx.ts(138,15): error TS1155: 'const' declarations must be initialized. test/validateTx.ts(138,15): error TS7005: Variable 'nod' implicitly has an 'any' type. test/validateTx.ts(141,20): error TS2304: Cannot find name 'isValidWsSubscription'. npm ERR! code 2 npm ERR! path /work/modules/chronik-client npm ERR! command failed npm ERR! command sh -c npm run build npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-03-05T00_01_58_905Z-debug-0.log Build chronik-client-tests failed with exit code 2 Comment Actions Tail of the build log: [521/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/splashscreen.cpp.o [522/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/createwalletdialog.cpp.o [523/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/rpcconsole.cpp.o [524/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/editaddressdialog.cpp.o [525/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/addresstablemodel.cpp.o [526/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/openuridialog.cpp.o [527/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/qrimagewidget.cpp.o [528/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/coincontroldialog.cpp.o [529/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/overviewpage.cpp.o [530/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/receiverequestdialog.cpp.o [531/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/receivecoinsdialog.cpp.o [532/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/recentrequeststablemodel.cpp.o [533/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/sendcoinsentry.cpp.o [534/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactiondescdialog.cpp.o [535/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactionfilterproxy.cpp.o [536/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/paymentserver.cpp.o [537/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/signverifymessagedialog.cpp.o [538/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactiondesc.cpp.o [539/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/sendcoinsdialog.cpp.o [540/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactionrecord.cpp.o [541/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/walletmodeltransaction.cpp.o [542/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactiontablemodel.cpp.o [543/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/transactionview.cpp.o [544/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/walletframe.cpp.o [545/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/walletcontroller.cpp.o [546/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/paymentrequestplus.cpp.o [547/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/walletmodel.cpp.o [548/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/walletview.cpp.o [549/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/qrc_bitcoin.cpp.o [550/555] Linking CXX executable src/bench/bitcoin-bench [551/555] Linking CXX static library src/qt/libbitcoin-qt-base.a [552/555] Automatic MOC for target bitcoin-qt [553/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt.dir/bitcoin-qt_autogen/mocs_compilation.cpp.o [554/555] Building CXX object src/qt/CMakeFiles/bitcoin-qt.dir/main.cpp.o [555/555] Linking CXX executable src/qt/bitcoin-qt /work/modules/chronik-client /work/abc-ci-builds/chronik-client-integration-tests > chronik-client@0.25.0 prepublish > npm run build > chronik-client@0.25.0 build > tsc test/validateTx.ts(27,17): error TS2741: Property 'outputScript' is missing in type '{ prevOut: { txid: string; outIdx: number; }; inputScript: string; value: number; sequenceNo: number; token: { tokenId: string; tokenType: { protocol: "SLP"; type: "SLP_TOKEN_TYPE_FUNGIBLE"; number: number; }; amount: string; isMintBaton: false; entryIdx: number; }; }' but required in type 'TxInput_InNode'. test/validateTx.ts(49,17): error TS2741: Property 'outputScript' is missing in type '{ prevOut: { txid: string; outIdx: number; }; inputScript: string; value: number; sequenceNo: number; }' but required in type 'TxInput_InNode'. test/validateTx.ts(61,17): error TS2741: Property 'spentBy' is missing in type '{ value: number; outputScript: string; }' but required in type 'TxOutput_InNode'. test/validateTx.ts(66,17): error TS2741: Property 'spentBy' is missing in type '{ value: number; outputScript: string; token: { tokenId: string; tokenType: { protocol: "SLP"; type: "SLP_TOKEN_TYPE_FUNGIBLE"; number: number; }; amount: string; isMintBaton: false; entryIdx: number; }; }' but required in type 'TxOutput_InNode'. test/validateTx.ts(83,17): error TS2741: Property 'spentBy' is missing in type '{ value: number; outputScript: string; token: { tokenId: string; tokenType: { protocol: "SLP"; type: "SLP_TOKEN_TYPE_FUNGIBLE"; number: number; }; amount: string; isMintBaton: false; entryIdx: number; }; }' but required in type 'TxOutput_InNode'. test/validateTx.ts(100,17): error TS2741: Property 'spentBy' is missing in type '{ value: number; outputScript: string; }' but required in type 'TxOutput_InNode'. test/validateTx.ts(138,15): error TS1155: 'const' declarations must be initialized. test/validateTx.ts(138,15): error TS7005: Variable 'nod' implicitly has an 'any' type. test/validateTx.ts(141,20): error TS2304: Cannot find name 'isValidWsSubscription'. npm ERR! code 2 npm ERR! path /work/modules/chronik-client npm ERR! command failed npm ERR! command sh -c npm run build npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-03-05T00_04_22_522Z-debug-0.log Build chronik-client-integration-tests failed with exit code 2 Comment Actions The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience. Comment Actions Failed tests logs: ====== Test broadcastTx and broadcastTxs methods from ChronikClient: New regtest chain. Behavior of broadcastTx and validateRawTx..Test broadcastTx and broadcastTxs methods from ChronikClient New regtest chain. Behavior of broadcastTx and validateRawTx. ====== AssertionError: expected promise to be rejected with an error including 'Failed getting /broadcast-tx (): 400:…' but got 'Failed getting /broadcast-tx: 400: Br…' + expected - actual -Failed getting /broadcast-tx: 400: Broadcast failed: Transaction rejected by mempool: bad-txns-in-belowout, value in (25000000.00) < value out (49999999600.00) +Failed getting /broadcast-tx (): 400: Broadcast failed: Transaction rejected by mempool: bad-txns-in-belowout, value in (25000000.00) < value out (49999999600.00) ====== Test broadcastTx and broadcastTxs methods from ChronikClient: After broadcastTxs are mined.Test broadcastTx and broadcastTxs methods from ChronikClient After broadcastTxs are mined ====== AssertionError: expected promise to be rejected with 'Error' but it was fulfilled with { Object (txid) } + expected - actual: failed to generate Mocha diff Each failure log is accessible here:
|