diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 789774a203..0a3d205330 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -520,7 +520,7 @@ jobs: flag-name: run-${{ github.job }} parallel: true - test-2_4: + test-2_5: strategy: fail-fast: false matrix: @@ -528,16 +528,16 @@ jobs: [ block-zero-handling, faucet-stx, - pox-3-btc-address-formats, - pox-3-delegate-aggregation, - pox-3-delegate-stacking, - pox-3-delegate-revoked-stacking, - pox-3-stack-extend-increase, - pox-3-rosetta-btc-addr-types, - pox-3-rosetta-cycle-phases, - pox-3-rosetta-segwit, - pox-3-burnchain-stack-stx, - pox-3-burnchain-delegate-stx, + pox-4-btc-address-formats, + pox-4-delegate-aggregation, + pox-4-delegate-stacking, + pox-4-delegate-revoked-stacking, + pox-4-stack-extend-increase, + pox-4-rosetta-btc-addr-types, + pox-4-rosetta-cycle-phases, + pox-4-rosetta-segwit, + pox-4-burnchain-stack-stx, + pox-4-burnchain-delegate-stx, ] runs-on: ubuntu-latest steps: @@ -575,7 +575,7 @@ jobs: npm run devenv:logs-krypton -- --no-color &> docker-compose-logs.txt & - name: Run tests - run: npm run test:2.4 -- --testPathPattern "${{ matrix.suite }}" + run: npm run test:2.5 -- --testPathPattern "${{ matrix.suite }}" - name: Print integration environment logs run: cat docker-compose-logs.txt @@ -855,7 +855,7 @@ jobs: - lint - lint-docs - test - - test-2_4 + - test-2_5 - test-bns - test-rosetta - test-rosetta-cli-construction diff --git a/.vscode/launch.json b/.vscode/launch.json index 845f9a4802..42580ff805 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -316,14 +316,14 @@ { "type": "node", "request": "launch", - "name": "Jest: 2.4", + "name": "Jest: 2.5", "program": "${workspaceFolder}/node_modules/.bin/jest", "args": [ "--testTimeout=3600000", "--runInBand", "--no-cache", "--config", - "${workspaceRoot}/tests/jest.config.2.4.js" + "${workspaceRoot}/tests/jest.config.2.5.js", ], "outputCapture": "std", "console": "integratedTerminal", diff --git a/docker/docker-compose.dev.stacks-blockchain.yml b/docker/docker-compose.dev.stacks-blockchain.yml index fc79e5f246..23c338e983 100644 --- a/docker/docker-compose.dev.stacks-blockchain.yml +++ b/docker/docker-compose.dev.stacks-blockchain.yml @@ -1,7 +1,7 @@ version: '3.7' services: stacks-blockchain: - image: "hirosystems/stacks-api-e2e:stacks2.4-f930deb" + image: "hirosystems/stacks-api-e2e:stacks3.0-800259e" restart: on-failure environment: STACKS_EVENT_OBSERVER: host.docker.internal:3700 diff --git a/docker/docker-compose.dev.stacks-krypton.yml b/docker/docker-compose.dev.stacks-krypton.yml index 850950fdbf..58858240bf 100644 --- a/docker/docker-compose.dev.stacks-krypton.yml +++ b/docker/docker-compose.dev.stacks-krypton.yml @@ -1,7 +1,7 @@ version: '3.7' services: stacks-blockchain: - image: "hirosystems/stacks-api-e2e:stacks2.4-f930deb" + image: "hirosystems/stacks-api-e2e:stacks3.0-800259e" ports: - "18443:18443" # bitcoin regtest JSON-RPC interface - "18444:18444" # bitcoin regtest p2p diff --git a/package.json b/package.json index 5541d46493..da1ae344c2 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "dev:follower": "npm run devenv:build && concurrently npm:dev npm:devenv:follower", "test": "cross-env NODE_ENV=test jest --config ./tests/jest.config.js --coverage --runInBand", "test:subnets": "cross-env NODE_ENV=test jest --config ./tests/jest.config.subnets.js --coverage --runInBand", - "test:2.4": "cross-env NODE_ENV=test jest --config ./tests/jest.config.2.4.js --coverage --runInBand", + "test:2.5": "cross-env NODE_ENV=test jest --config ./tests/jest.config.2.5.js --coverage --runInBand", "test:rosetta": "cross-env NODE_ENV=test jest --config ./tests/jest.config.rosetta.js --coverage --runInBand", "test:rosetta-construction": "cross-env NODE_ENV=test jest --config ./tests/jest.config.rosetta-construction.js --coverage --runInBand", "test:rosetta-cli:data": "cross-env NODE_ENV=test STACKS_CHAIN_ID=0x80000000 jest --config ./tests/jest.config.rosetta-cli-data.js --coverage --runInBand", @@ -24,7 +24,7 @@ "test:watch": "cross-env NODE_ENV=test jest --config ./tests/jest.config.js --watch", "test:integration": "concurrently \"docker compose -f docker/docker-compose.dev.postgres.yml up --force-recreate -V\" \"cross-env NODE_ENV=test jest --config ./tests/jest.config.js --no-cache --runInBand; npm run devenv:stop:pg\"", "test:integration:subnets": "concurrently --hide \"devenv:deploy:subnets\" \"npm:devenv:deploy:subnets\" \"cross-env NODE_ENV=test jest --config ./tests/jest.config.subnets.js --no-cache --runInBand; npm run devenv:stop:subnets\"", - "test:integration:2.4": "concurrently --hide \"devenv:deploy-krypton\" \"npm:devenv:deploy-krypton\" \"cross-env NODE_ENV=test jest --config ./tests/jest.config.2.4.js --no-cache --runInBand; npm run devenv:stop-krypton\"", + "test:integration:2.5": "concurrently --hide \"devenv:deploy-krypton\" \"npm:devenv:deploy-krypton\" \"cross-env NODE_ENV=test jest --config ./tests/jest.config.2.5.js --no-cache --runInBand; npm run devenv:stop-krypton\"", "test:integration:rosetta": "concurrently \"npm:devenv:deploy-krypton\" \"cross-env NODE_ENV=test jest --config ./tests/jest.config.rosetta.js --no-cache --runInBand; npm run devenv:stop-krypton\"", "test:integration:rosetta-construction": "concurrently \"npm:devenv:deploy-krypton\" \"cross-env NODE_ENV=test jest --config ./tests/jest.config.rosetta-construction.js --no-cache --runInBand; npm run devenv:stop-krypton\"", "test:integration:rosetta-cli:data": "concurrently \"npm:devenv:deploy-krypton\" \"cross-env NODE_ENV=test STACKS_CHAIN_ID=0x80000000 jest --config ./tests/jest.config.rosetta-cli-data.js --no-cache --runInBand; npm run devenv:stop-krypton\"", diff --git a/src/api/init.ts b/src/api/init.ts index 774284803a..ab2acbc891 100644 --- a/src/api/init.ts +++ b/src/api/init.ts @@ -203,12 +203,13 @@ export async function startApiServer(opts: { const legacyPoxPathRouter: express.RequestHandler = (req, res) => { // Redirect old pox routes paths to new one above const newPath = req.path === '/' ? '/events' : req.path; - const baseUrl = req.baseUrl.replace(/(pox[23])_events/, '$1'); + const baseUrl = req.baseUrl.replace(/(pox[\d])_events/, '$1'); const redirectPath = `${baseUrl}${newPath}${getReqQuery(req)}`; return res.redirect(redirectPath); }; router.use('/pox2_events', legacyPoxPathRouter); router.use('/pox3_events', legacyPoxPathRouter); + router.use('/pox4_events', legacyPoxPathRouter); if (getChainIDNetwork(chainId) === 'testnet' && writeDatastore) { router.use('/faucets', createFaucetRouter(writeDatastore)); diff --git a/src/api/routes/faucets.ts b/src/api/routes/faucets.ts index c3656c670f..10f9124cab 100644 --- a/src/api/routes/faucets.ts +++ b/src/api/routes/faucets.ts @@ -226,7 +226,11 @@ export function createFaucetRouter(db: PgWriteStore): express.Router { try { return await makeSTXTokenTransfer(txOpts); } catch (error: any) { - if (fee === undefined && (error as Error).message?.includes('NoEstimateAvailable')) { + if ( + fee === undefined && + (error as Error).message && + /estimating transaction fee|NoEstimateAvailable/.test(error.message) + ) { const defaultFee = 200n; return await generateTx(network, nonce, defaultFee); } diff --git a/src/test-utils/shared-setup.ts b/src/test-utils/shared-setup.ts index b842d1276d..8b20d20601 100644 --- a/src/test-utils/shared-setup.ts +++ b/src/test-utils/shared-setup.ts @@ -22,12 +22,12 @@ async function standByForPoxToBeReady(client: StacksCoreRpcClient): Promise { +async function standByForPox4ToBeReady(client: StacksCoreRpcClient): Promise { let tries = 0; while (true) { try { tries++; const poxInfo = await client.getPox(); - if (poxInfo.contract_id.includes('pox-3')) { - console.log(`PoX-3 ready.`); + if (poxInfo.contract_id.includes('pox-4')) { + console.log(`PoX-4 ready.`); return; } - console.log(`Waiting on PoX-3 to be ready`); + console.log(`Waiting on PoX-4 to be ready`); await timeout(500); } catch (error) { - console.log(`Waiting on PoX-3 to be ready, retrying after ${error}`); + console.log(`Waiting on PoX-4 to be ready, retrying after ${error}`); await timeout(500); } } @@ -45,7 +45,7 @@ export default async (): Promise => { const eventServer = await startEventServer({ datastore: db, chainId: ChainID.Testnet }); const client = new StacksCoreRpcClient(); - await standByForPox3ToBeReady(client); + await standByForPox4ToBeReady(client); const testEnv: GlobalTestEnv = { db: db, diff --git a/src/tests-2.4/global-teardown.ts b/src/tests-2.5/global-teardown.ts similarity index 100% rename from src/tests-2.4/global-teardown.ts rename to src/tests-2.5/global-teardown.ts diff --git a/src/tests-2.4/pox-3-btc-address-formats.ts b/src/tests-2.5/pox-4-btc-address-formats.ts similarity index 98% rename from src/tests-2.4/pox-3-btc-address-formats.ts rename to src/tests-2.5/pox-4-btc-address-formats.ts index 1a80bf4592..07431ae8b6 100644 --- a/src/tests-2.4/pox-3-btc-address-formats.ts +++ b/src/tests-2.5/pox-4-btc-address-formats.ts @@ -21,13 +21,13 @@ import { } from '../test-utils/test-helpers'; import { hexToBuffer } from '@hirosystems/api-toolkit'; -describe('PoX-3 - Stack using supported bitcoin address formats', () => { +describe('PoX-4 - Stack using supported bitcoin address formats', () => { test('Standby for next cycle', async () => { const poxInfo = await testEnv.client.getPox(); await standByUntilBurnBlock(poxInfo.next_cycle.reward_phase_start_block_height); // a good time to stack }); - describe('PoX-3 - Stacking operations P2SH-P2WPKH', () => { + describe('PoX-4 - Stacking operations P2SH-P2WPKH', () => { const account = testnetKeys[1]; let btcAddr: string; let btcRegtestAccount: VerboseKeyOutput; @@ -84,7 +84,7 @@ describe('PoX-3 - Stack using supported bitcoin address formats', () => { cycleBlockLength = cycleCount * poxInfo.reward_cycle_length; [contractAddress, contractName] = poxInfo.contract_id.split('.'); - expect(contractName).toBe('pox-3'); + expect(contractName).toBe('pox-4'); }); test('stack-stx tx', async () => { @@ -276,7 +276,7 @@ describe('PoX-3 - Stack using supported bitcoin address formats', () => { }); }); - describe('PoX-3 - Stacking operations P2WPKH', () => { + describe('PoX-4 - Stacking operations P2WPKH', () => { const account = testnetKeys[1]; let btcAddr: string; let btcRegtestAddr: string; @@ -331,7 +331,7 @@ describe('PoX-3 - Stack using supported bitcoin address formats', () => { cycleBlockLength = cycleCount * poxInfo.reward_cycle_length; [contractAddress, contractName] = poxInfo.contract_id.split('.'); - expect(contractName).toBe('pox-3'); + expect(contractName).toBe('pox-4'); }); test('stack-stx tx', async () => { @@ -524,7 +524,7 @@ describe('PoX-3 - Stack using supported bitcoin address formats', () => { }); }); - describe('PoX-3 - Stacking operations P2WSH', () => { + describe('PoX-4 - Stacking operations P2WSH', () => { const account = testnetKeys[1]; let btcAddr: string; let btcRegtestAddr: string; @@ -584,7 +584,7 @@ describe('PoX-3 - Stack using supported bitcoin address formats', () => { cycleBlockLength = cycleCount * poxInfo.reward_cycle_length; [contractAddress, contractName] = poxInfo.contract_id.split('.'); - expect(contractName).toBe('pox-3'); + expect(contractName).toBe('pox-4'); }); test('stack-stx tx', async () => { @@ -776,7 +776,7 @@ describe('PoX-3 - Stack using supported bitcoin address formats', () => { }); }); - describe('PoX-3 - Stacking operations P2TR', () => { + describe('PoX-4 - Stacking operations P2TR', () => { const account = testnetKeys[2]; let btcAddr: string; let btcRegtestAddr: string; @@ -836,7 +836,7 @@ describe('PoX-3 - Stack using supported bitcoin address formats', () => { cycleBlockLength = cycleCount * poxInfo.reward_cycle_length; [contractAddress, contractName] = poxInfo.contract_id.split('.'); - expect(contractName).toBe('pox-3'); + expect(contractName).toBe('pox-4'); }); test('stack-stx tx', async () => { diff --git a/src/tests-2.4/pox-3-burnchain-delegate-stx.ts b/src/tests-2.5/pox-4-burnchain-delegate-stx.ts similarity index 98% rename from src/tests-2.4/pox-3-burnchain-delegate-stx.ts rename to src/tests-2.5/pox-4-burnchain-delegate-stx.ts index 11d27b945b..3992482548 100644 --- a/src/tests-2.4/pox-3-burnchain-delegate-stx.ts +++ b/src/tests-2.5/pox-4-burnchain-delegate-stx.ts @@ -172,7 +172,7 @@ async function createPox2DelegateStx(args: { }; } -describe('PoX-3 - Stack using Bitcoin-chain ops', () => { +describe('PoX-4 - Stack using Bitcoin-chain ops', () => { const seedAccount = testnetKeys[0]; let db: PgWriteStore; @@ -216,7 +216,7 @@ describe('PoX-3 - Stack using Bitcoin-chain ops', () => { const poxInfo = await client.getPox(); const [contractAddress, contractName] = poxInfo.contract_id.split('.'); - expect(contractName).toBe('pox-3'); + expect(contractName).toBe('pox-4'); }); test('Fund STX to new account for testing', async () => { @@ -332,7 +332,7 @@ describe('PoX-3 - Stack using Bitcoin-chain ops', () => { test('Ensure delegate-stx BitcoinOp parsed', async () => { const pox2Txs = await supertest(api.server) - .get(`/extended/v1/address/${BootContractAddress.testnet}.pox-3/transactions`) + .get(`/extended/v1/address/${BootContractAddress.testnet}.pox-4/transactions`) .expect(200); const delegateStxTxResp = await supertest(api.server) .get(`/extended/v1/tx/${pox2Txs.body.results[0].tx_id}`) @@ -351,7 +351,7 @@ describe('PoX-3 - Stack using Bitcoin-chain ops', () => { )})))`; expect(delegateStxTx.contract_call).toEqual({ - contract_id: 'ST000000000000000000002AMW42H.pox-3', + contract_id: 'ST000000000000000000002AMW42H.pox-4', function_name: 'delegate-stx', function_signature: '(define-public (delegate-stx (amount-ustx uint) (delegate-to principal) (until-burn-ht (optional uint)) (pox-addr (optional (tuple (hashbytes (buff 32)) (version (buff 1)))))))', @@ -418,7 +418,7 @@ describe('PoX-3 - Stack using Bitcoin-chain ops', () => { expect(coreBalanceInfo.unlock_height).toBeGreaterThan(0); // validate delegate-stack-stx pox2 event for this tx - const res: any = await fetchGet(`/extended/v1/pox3_events/tx/${delegateStackStxTxId}`); + const res: any = await fetchGet(`/extended/v1/pox4_events/tx/${delegateStackStxTxId}`); expect(res).toBeDefined(); expect(res.results).toHaveLength(1); expect(res.results[0]).toEqual( diff --git a/src/tests-2.4/pox-3-burnchain-stack-stx.ts b/src/tests-2.5/pox-4-burnchain-stack-stx.ts similarity index 99% rename from src/tests-2.4/pox-3-burnchain-stack-stx.ts rename to src/tests-2.5/pox-4-burnchain-stack-stx.ts index d129bdbc9c..1667d4a00a 100644 --- a/src/tests-2.4/pox-3-burnchain-stack-stx.ts +++ b/src/tests-2.5/pox-4-burnchain-stack-stx.ts @@ -134,7 +134,7 @@ async function createPox2StackStx(args: { }; } -describe('PoX-3 - Stack using Bitcoin-chain ops', () => { +describe('PoX-4 - Stack using Bitcoin-chain ops', () => { const seedAccount = testnetKeys[0]; let db: PgWriteStore; @@ -169,7 +169,7 @@ describe('PoX-3 - Stack using Bitcoin-chain ops', () => { const poxInfo = await client.getPox(); const [contractAddress, contractName] = poxInfo.contract_id.split('.'); - expect(contractName).toBe('pox-3'); + expect(contractName).toBe('pox-4'); }); test('Fund STX to new account for testing', async () => { @@ -299,7 +299,7 @@ describe('PoX-3 - Stack using Bitcoin-chain ops', () => { expect(txObj.tx_type).toBe('contract_call'); expect(txObj.tx_status).toBe('success'); expect(txObj.sender_address).toBe(account.stxAddr); - expect(txObj.contract_call.contract_id).toBe(`${BootContractAddress.testnet}.pox-3`); + expect(txObj.contract_call.contract_id).toBe(`${BootContractAddress.testnet}.pox-4`); expect(txObj.contract_call.function_name).toBe('stack-stx'); const callArg1 = txObj.contract_call.function_args![0]; diff --git a/src/tests-2.4/pox-3-delegate-aggregation.ts b/src/tests-2.5/pox-4-delegate-aggregation.ts similarity index 97% rename from src/tests-2.4/pox-3-delegate-aggregation.ts rename to src/tests-2.5/pox-4-delegate-aggregation.ts index 504914925c..4d48151086 100644 --- a/src/tests-2.4/pox-3-delegate-aggregation.ts +++ b/src/tests-2.5/pox-4-delegate-aggregation.ts @@ -32,7 +32,7 @@ import { } from 'stacks-encoding-native-js'; import { AddressStxBalanceResponse } from '@stacks/stacks-blockchain-api-types'; -describe('PoX-3 - Delegate aggregation increase operations', () => { +describe('PoX-4 - Delegate aggregation increase operations', () => { const seedKey = testnetKeys[4].secretKey; const delegatorKey = '04608922f3ce63971bb120fa9c9454c5bd06370f61414040a737a6ee8ef8a10f01'; const delegateeKey = 'b038e143cf4ee4c079b3c3605a8ed28732e5745c138b728408e80faf7a59b8c201'; @@ -118,7 +118,7 @@ describe('PoX-3 - Delegate aggregation increase operations', () => { // wait until the start of the next cycle so we have enough blocks within the cycle to perform the various txs poxInfo = await standByForNextPoxCycle(); [contractAddress, contractName] = poxInfo.contract_id.split('.'); - expect(contractName).toBe('pox-3'); + expect(contractName).toBe('pox-4'); }); test('Perform delegate-stx operation', async () => { @@ -153,7 +153,7 @@ describe('PoX-3 - Delegate aggregation increase operations', () => { // validate pool delegations const stackersRes: any = await fetchGet( - `/extended/beta/stacking/${delegatorAccount.stxAddr}/delegations` + `/extended/v1/pox4/${delegatorAccount.stxAddr}/delegations` ); expect(stackersRes).toBeDefined(); expect(stackersRes.total).toBe(1); @@ -220,7 +220,7 @@ describe('PoX-3 - Delegate aggregation increase operations', () => { expect(coreBalanceInfo.unlock_height).toBeGreaterThan(0); // validate delegate-stack-stx pox2 event for this tx - const res: any = await fetchGet(`/extended/v1/pox3_events/tx/${delegateStackStxTxId}`); + const res: any = await fetchGet(`/extended/v1/pox4_events/tx/${delegateStackStxTxId}`); expect(res).toBeDefined(); expect(res.results).toHaveLength(1); expect(res.results[0]).toEqual( @@ -280,7 +280,7 @@ describe('PoX-3 - Delegate aggregation increase operations', () => { expect(poxCycleAddressIndex).toEqual(0n); // validate stack-aggregation-commit pox2 event for this tx - const res: any = await fetchGet(`/extended/v1/pox3_events/tx/${stackAggrCommitTxId}`); + const res: any = await fetchGet(`/extended/v1/pox4_events/tx/${stackAggrCommitTxId}`); expect(res).toBeDefined(); expect(res.results).toHaveLength(1); expect(res.results[0]).toEqual( @@ -368,7 +368,7 @@ describe('PoX-3 - Delegate aggregation increase operations', () => { // validate delegate-stack-stx pox2 event for this tx const delegateStackIncreasePoxEvents: any = await fetchGet( - `/extended/v1/pox3_events/tx/${delegateStackIncreaseDbTx.tx_id}` + `/extended/v1/pox4_events/tx/${delegateStackIncreaseDbTx.tx_id}` ); expect(delegateStackIncreasePoxEvents).toBeDefined(); expect(delegateStackIncreasePoxEvents.results).toHaveLength(1); @@ -405,7 +405,7 @@ describe('PoX-3 - Delegate aggregation increase operations', () => { // validate stack-aggregation-commit pox2 event for this tx const stackAggreIncreasePoxEvents: any = await fetchGet( - `/extended/v1/pox3_events/tx/${stackAggrIncreaseTxId}` + `/extended/v1/pox4_events/tx/${stackAggrIncreaseTxId}` ); expect(stackAggreIncreasePoxEvents).toBeDefined(); expect(stackAggreIncreasePoxEvents.results).toHaveLength(1); diff --git a/src/tests-2.4/pox-3-delegate-revoked-stacking.ts b/src/tests-2.5/pox-4-delegate-revoked-stacking.ts similarity index 89% rename from src/tests-2.4/pox-3-delegate-revoked-stacking.ts rename to src/tests-2.5/pox-4-delegate-revoked-stacking.ts index 19951d762c..e2eeac0032 100644 --- a/src/tests-2.4/pox-3-delegate-revoked-stacking.ts +++ b/src/tests-2.5/pox-4-delegate-revoked-stacking.ts @@ -30,7 +30,7 @@ import { testEnv, } from '../test-utils/test-helpers'; -describe('PoX-3 - Delegate Revoked Stacking', () => { +describe('PoX-4 - Delegate Revoked Stacking', () => { const seedKey = testnetKeys[4].secretKey; const delegatorKey = '72e8e3725324514c38c2931ed337ab9ab8d8abaae83ed2275456790194b1fd3101'; const delegateeKey = '0d174cf0be276cedcf21727611ef2504aed093d8163f65985c07760fda12a7ea01'; @@ -74,6 +74,7 @@ describe('PoX-3 - Delegate Revoked Stacking', () => { amount: gasAmount, network: testEnv.stacksNetwork, anchorMode: AnchorMode.OnChainOnly, + fee: 10000n, }); const { txId: stxXferId1 } = await testEnv.client.sendTransaction( Buffer.from(stxXfer1.serialize()) @@ -88,6 +89,7 @@ describe('PoX-3 - Delegate Revoked Stacking', () => { network: testEnv.stacksNetwork, anchorMode: AnchorMode.OnChainOnly, nonce: stxXfer1.auth.spendingCondition.nonce + 1n, + fee: 10000n, }); const { txId: stxXferId2 } = await testEnv.client.sendTransaction( Buffer.from(stxXfer2.serialize()) @@ -113,7 +115,7 @@ describe('PoX-3 - Delegate Revoked Stacking', () => { poxInfo = await standByForPoxCycle(); [contractAddress, contractName] = poxInfo.contract_id.split('.'); - expect(contractName).toBe('pox-3'); + expect(contractName).toBe('pox-4'); const balanceInfo = await testEnv.client.getAccount(STACKER.stxAddr); expect(BigInt(balanceInfo.balance)).toBeGreaterThan(0n); @@ -138,6 +140,7 @@ describe('PoX-3 - Delegate Revoked Stacking', () => { ], network: testEnv.stacksNetwork, anchorMode: AnchorMode.OnChainOnly, + fee: 10000n, }); const delegateStackTxResult = await testEnv.client.sendTransaction( Buffer.from(delegateStackTx.serialize()) @@ -163,14 +166,15 @@ describe('PoX-3 - Delegate Revoked Stacking', () => { ], network: testEnv.stacksNetwork, anchorMode: AnchorMode.OnChainOnly, + fee: 10000n, }); const { txId: delegateStxTxId } = await testEnv.client.sendTransaction( Buffer.from(delegateStxTx.serialize()) ); const delegateStxDbTx = await standByForTxSuccess(delegateStxTxId); - // validate delegate-stx pox3 event for this tx - const res: any = await fetchGet(`/extended/v1/pox3_events/tx/${delegateStxDbTx.tx_id}`); + // validate delegate-stx pox4 event for this tx + const res: any = await fetchGet(`/extended/v1/pox4_events/tx/${delegateStxDbTx.tx_id}`); expect(res).toBeDefined(); expect(res.results).toHaveLength(1); expect(res.results[0]).toEqual( @@ -222,6 +226,7 @@ describe('PoX-3 - Delegate Revoked Stacking', () => { ], network: testEnv.stacksNetwork, anchorMode: AnchorMode.OnChainOnly, + fee: 10000n, }); const { txId: delegateStackStxTxId } = await testEnv.client.sendTransaction( Buffer.from(delegateStackStxTx.serialize()) @@ -234,7 +239,7 @@ describe('PoX-3 - Delegate Revoked Stacking', () => { expect(coreBalanceInfo.unlock_height).toBeGreaterThan(0); // validate delegate-stack-stx pox2 event for this tx - const res: any = await fetchGet(`/extended/v1/pox3_events/tx/${delegateStackStxTxId}`); + const res: any = await fetchGet(`/extended/v1/pox4_events/tx/${delegateStackStxTxId}`); expect(res).toBeDefined(); expect(res.results).toHaveLength(1); expect(res.results[0]).toEqual( @@ -271,9 +276,14 @@ describe('PoX-3 - Delegate Revoked Stacking', () => { functionArgs: [], network: testEnv.stacksNetwork, anchorMode: AnchorMode.OnChainOnly, + fee: 10000n, }); const revokeTxResult = await testEnv.client.sendTransaction(Buffer.from(revokeTx.serialize())); - await standByForTxSuccess(revokeTxResult.txId); + const revokeStackDbTx = await standByForTxSuccess(revokeTxResult.txId); + + const revokeStackResult = decodeClarityValue(revokeStackDbTx.raw_result); + expect(revokeStackResult.repr).toEqual('(ok true)'); // ERR_STACKING_PERMISSION_DENIED + expect(revokeStackDbTx.status).toBe(DbTxStatus.Success); // revocation doesn't change anything for the previous delegate-stack-stx state const coreBalanceInfo = await testEnv.client.getAccount(STACKER.stxAddr); @@ -299,6 +309,7 @@ describe('PoX-3 - Delegate Revoked Stacking', () => { ], network: testEnv.stacksNetwork, anchorMode: AnchorMode.OnChainOnly, + fee: 10000n, }); const delegateStackTxResult = await testEnv.client.sendTransaction( Buffer.from(delegateStackTx.serialize()) @@ -309,47 +320,6 @@ describe('PoX-3 - Delegate Revoked Stacking', () => { expect(delegateStackResult.repr).toEqual('(err 9)'); // ERR_STACKING_PERMISSION_DENIED }); - test('Try to perform delegate-stx - again', async () => { - // make sure stacker is not currently delegating - await expect( - readOnlyFnCall( - [contractAddress, contractName], - 'get-delegation-info', - [standardPrincipalCV(STACKER.stxAddr)], - STACKER.stxAddr - ) - ).rejects.toThrowError( - 'OptionNone result for call to ST000000000000000000002AMW42H,pox-3::get-delegation-info' - ); - - // but stacker is still locked - const coreBalanceInfo = await testEnv.client.getAccount(STACKER.stxAddr); - expect(BigInt(coreBalanceInfo.locked)).toBe(DELEGATE_HALF_AMOUNT); - - // delegate with the full amount - const delegateTx = await makeContractCall({ - senderKey: STACKER.secretKey, - contractAddress, - contractName, - functionName: 'delegate-stx', - functionArgs: [ - uintCV(DELEGATE_FULL_AMOUNT), - standardPrincipalCV(POOL.stxAddr), // delegate-to - noneCV(), // untilBurnBlockHeight - someCV(STACKER.poxAddrClar), // pox-addr - ], - network: testEnv.stacksNetwork, - anchorMode: AnchorMode.OnChainOnly, - }); - const delegateTxResult = await testEnv.client.sendTransaction( - Buffer.from(delegateTx.serialize()) - ); - const delegateDbTx = await standByForTx(delegateTxResult.txId); - expect(delegateDbTx.status).not.toBe(DbTxStatus.Success); - const delegateResult = decodeClarityValue(delegateDbTx.raw_result); - expect(delegateResult.repr).toEqual('(err 3)'); // ERR_STACKING_ALREADY_STACKED - }); - test('Try to perform delegate-stack-increase - without delegation', async () => { const delegateStackIncreaseTx = await makeContractCall({ senderKey: POOL.secretKey, @@ -363,16 +333,17 @@ describe('PoX-3 - Delegate Revoked Stacking', () => { ], network: testEnv.stacksNetwork, anchorMode: AnchorMode.OnChainOnly, + fee: 10000n, }); const { txId: delegateStackIncreaseTxId } = await testEnv.client.sendTransaction( Buffer.from(delegateStackIncreaseTx.serialize()) ); const delegateStackIncreaseTxResult = await standByForTx(delegateStackIncreaseTxId); - expect(delegateStackIncreaseTxResult.status).not.toBe(DbTxStatus.Success); const delegateStackIncreaseResult = decodeClarityValue( delegateStackIncreaseTxResult.raw_result ); expect(delegateStackIncreaseResult.repr).toEqual('(err 9)'); // ERR_STACKING_PERMISSION_DENIED + expect(delegateStackIncreaseTxResult.status).not.toBe(DbTxStatus.Success); }); test('Try to perform delegate-stack-extend - without delegation', async () => { @@ -388,14 +359,15 @@ describe('PoX-3 - Delegate Revoked Stacking', () => { ], network: testEnv.stacksNetwork, anchorMode: AnchorMode.OnChainOnly, + fee: 10000n, }); const { txId: delegateStackextendTxId } = await testEnv.client.sendTransaction( Buffer.from(delegateStackextendTx.serialize()) ); const delegateStackextendTxResult = await standByForTx(delegateStackextendTxId); - expect(delegateStackextendTxResult.status).not.toBe(DbTxStatus.Success); const delegateStackextendResult = decodeClarityValue(delegateStackextendTxResult.raw_result); expect(delegateStackextendResult.repr).toEqual('(err 9)'); // ERR_STACKING_PERMISSION_DENIED + expect(delegateStackextendTxResult.status).not.toBe(DbTxStatus.Success); }); test('Try to perform delegate-stack-stx - without delegation', async () => { @@ -416,6 +388,7 @@ describe('PoX-3 - Delegate Revoked Stacking', () => { ], network: testEnv.stacksNetwork, anchorMode: AnchorMode.OnChainOnly, + fee: 10000n, }); const { txId: delegateStackStxTxId } = await testEnv.client.sendTransaction( Buffer.from(delegateStackStxTx.serialize()) @@ -441,6 +414,7 @@ describe('PoX-3 - Delegate Revoked Stacking', () => { ], network: testEnv.stacksNetwork, anchorMode: AnchorMode.OnChainOnly, + fee: 10000n, }); const { txId: stackAggrCommitTxId } = await testEnv.client.sendTransaction( Buffer.from(stackAggrCommitTx.serialize()) @@ -448,7 +422,7 @@ describe('PoX-3 - Delegate Revoked Stacking', () => { await standByForTxSuccess(stackAggrCommitTxId); // validate stack-aggregation-commit pox2 event for this tx - const res: any = await fetchGet(`/extended/v1/pox3_events/tx/${stackAggrCommitTxId}`); + const res: any = await fetchGet(`/extended/v1/pox4_events/tx/${stackAggrCommitTxId}`); expect(res).toBeDefined(); expect(res.results).toHaveLength(1); expect(res.results[0]).toEqual( diff --git a/src/tests-2.4/pox-3-delegate-stacking.ts b/src/tests-2.5/pox-4-delegate-stacking.ts similarity index 96% rename from src/tests-2.4/pox-3-delegate-stacking.ts rename to src/tests-2.5/pox-4-delegate-stacking.ts index e5e64e0a5b..8274cd12d4 100644 --- a/src/tests-2.4/pox-3-delegate-stacking.ts +++ b/src/tests-2.5/pox-4-delegate-stacking.ts @@ -24,7 +24,7 @@ import { import { ClarityValueTuple, ClarityValueUInt } from 'stacks-encoding-native-js'; import { AddressStxBalanceResponse } from '@stacks/stacks-blockchain-api-types'; -describe('PoX-3 - Delegate Stacking operations', () => { +describe('PoX-4 - Delegate Stacking operations', () => { const seedKey = testnetKeys[4].secretKey; const delegatorKey = '72e8e3725324514c38c2931ed337ab9ab8d8abaae83ed2275456790194b1fd3101'; const delegateeKey = '0d174cf0be276cedcf21727611ef2504aed093d8163f65985c07760fda12a7ea01'; @@ -110,7 +110,7 @@ describe('PoX-3 - Delegate Stacking operations', () => { poxInfo = await standByForNextPoxCycle(); [contractAddress, contractName] = poxInfo.contract_id.split('.'); - expect(contractName).toBe('pox-3'); + expect(contractName).toBe('pox-4'); }); test('Perform delegate-stx operation', async () => { @@ -143,7 +143,7 @@ describe('PoX-3 - Delegate Stacking operations', () => { const delegateStxDbTx = await standByForTxSuccess(delegateStxTxId); // validate delegate-stx pox2 event for this tx - const res: any = await fetchGet(`/extended/v1/pox3_events/tx/${delegateStxDbTx.tx_id}`); + const res: any = await fetchGet(`/extended/v1/pox4_events/tx/${delegateStxDbTx.tx_id}`); expect(res).toBeDefined(); expect(res.results).toHaveLength(1); expect(res.results[0]).toEqual( @@ -162,7 +162,7 @@ describe('PoX-3 - Delegate Stacking operations', () => { // validate pool delegations const stackersRes: any = await fetchGet( - `/extended/beta/stacking/${delegatorAccount.stxAddr}/delegations` + `/extended/v1/pox4/${delegatorAccount.stxAddr}/delegations` ); expect(stackersRes).toBeDefined(); expect(stackersRes.total).toBe(1); @@ -177,7 +177,7 @@ describe('PoX-3 - Delegate Stacking operations', () => { // validate pool delegations respects `after_block` limitter const stackersRes2: any = await fetchGet( - `/extended/beta/stacking/${delegatorAccount.stxAddr}/delegations?after_block=${delegateStxDbTx.block_height}` + `/extended/v1/pox4/${delegatorAccount.stxAddr}/delegations?after_block=${delegateStxDbTx.block_height}` ); expect(stackersRes2).toBeDefined(); expect(stackersRes2.total).toBe(0); @@ -236,7 +236,7 @@ describe('PoX-3 - Delegate Stacking operations', () => { expect(coreBalanceInfo.unlock_height).toBeGreaterThan(0); // validate delegate-stack-stx pox2 event for this tx - const res: any = await fetchGet(`/extended/v1/pox3_events/tx/${delegateStackStxTxId}`); + const res: any = await fetchGet(`/extended/v1/pox4_events/tx/${delegateStackStxTxId}`); expect(res).toBeDefined(); expect(res.results).toHaveLength(1); expect(res.results[0]).toEqual( @@ -300,7 +300,7 @@ describe('PoX-3 - Delegate Stacking operations', () => { // validate delegate-stack-stx pox2 event for this tx const res: any = await fetchGet( - `/extended/v1/pox3_events/tx/${delegateStackIncreaseDbTx.tx_id}` + `/extended/v1/pox4_events/tx/${delegateStackIncreaseDbTx.tx_id}` ); expect(res).toBeDefined(); expect(res.results).toHaveLength(1); @@ -362,7 +362,7 @@ describe('PoX-3 - Delegate Stacking operations', () => { expect(coreBalanceInfo.unlock_height).toBeGreaterThan(coreBalanceInfoPreIncrease.unlock_height); // validate delegate-stack-extend pox2 event for this tx - const res: any = await fetchGet(`/extended/v1/pox3_events/tx/${delegateStackExtendTxId}`); + const res: any = await fetchGet(`/extended/v1/pox4_events/tx/${delegateStackExtendTxId}`); expect(res).toBeDefined(); expect(res.results).toHaveLength(1); expect(res.results[0]).toEqual( @@ -414,7 +414,7 @@ describe('PoX-3 - Delegate Stacking operations', () => { const stackAggrCommmitDbTx = await standByForTxSuccess(stackAggrCommitTxId); // validate stack-aggregation-commit pox2 event for this tx - const res: any = await fetchGet(`/extended/v1/pox3_events/tx/${stackAggrCommitTxId}`); + const res: any = await fetchGet(`/extended/v1/pox4_events/tx/${stackAggrCommitTxId}`); expect(res).toBeDefined(); expect(res.results).toHaveLength(1); expect(res.results[0]).toEqual( diff --git a/src/tests-2.4/pox-3-rosetta-btc-addr-types.ts b/src/tests-2.5/pox-4-rosetta-btc-addr-types.ts similarity index 97% rename from src/tests-2.4/pox-3-rosetta-btc-addr-types.ts rename to src/tests-2.5/pox-4-rosetta-btc-addr-types.ts index 1da11dddf6..ffa65abe7e 100644 --- a/src/tests-2.4/pox-3-rosetta-btc-addr-types.ts +++ b/src/tests-2.5/pox-4-rosetta-btc-addr-types.ts @@ -21,7 +21,7 @@ const BTC_ADDRESS_CASES = [ ] as const; describe.each(BTC_ADDRESS_CASES)( - 'PoX-3 - Rosetta - Stack with BTC address format $addressFormat', + 'PoX-4 - Rosetta - Stack with BTC address format $addressFormat', ({ addressFormat }) => { let poxInfo: CoreRpcPoxInfo; const account = testnetKeys[1]; @@ -57,7 +57,7 @@ describe.each(BTC_ADDRESS_CASES)( ustxAmount, }); expect(rosettaStackStx.tx.status).toBe(DbTxStatus.Success); - expect(rosettaStackStx.constructionMetadata.metadata.contract_name).toBe('pox-3'); + expect(rosettaStackStx.constructionMetadata.metadata.contract_name).toBe('pox-4'); }); test('Validate reward set received', async () => { diff --git a/src/tests-2.4/pox-3-rosetta-cycle-phases.ts b/src/tests-2.5/pox-4-rosetta-cycle-phases.ts similarity index 96% rename from src/tests-2.4/pox-3-rosetta-cycle-phases.ts rename to src/tests-2.5/pox-4-rosetta-cycle-phases.ts index 6305cc648f..c117f031f1 100644 --- a/src/tests-2.4/pox-3-rosetta-cycle-phases.ts +++ b/src/tests-2.5/pox-4-rosetta-cycle-phases.ts @@ -11,7 +11,7 @@ const account = testnetKeys[1]; const btcAddr = '2N74VLxyT79VGHiBK2zEg3a9HJG7rEc5F3o'; describe.each(BLOCK_SHIFT_COUNT)( - 'PoX-3 - Rosetta - Stack on any phase of cycle $shift', + 'PoX-4 - Rosetta - Stack on any phase of cycle $shift', ({ shift }) => { test('Standby for cycle phase', async () => { const poxInfo = await testEnv.client.getPox(); diff --git a/src/tests-2.4/pox-3-rosetta-segwit.ts b/src/tests-2.5/pox-4-rosetta-segwit.ts similarity index 98% rename from src/tests-2.4/pox-3-rosetta-segwit.ts rename to src/tests-2.5/pox-4-rosetta-segwit.ts index c878423635..c7f155cf5a 100644 --- a/src/tests-2.4/pox-3-rosetta-segwit.ts +++ b/src/tests-2.5/pox-4-rosetta-segwit.ts @@ -27,7 +27,7 @@ import { } from '../test-utils/test-helpers'; import { hexToBuffer } from '@hirosystems/api-toolkit'; -describe('PoX-3 - Rosetta - Stacking with segwit', () => { +describe('PoX-4 - Rosetta - Stacking with segwit', () => { let btcAddr: string; let btcAddrTestnet: string; const seedAccount = testnetKeys[0]; @@ -131,10 +131,10 @@ describe('PoX-3 - Rosetta - Stacking with segwit', () => { ustxAmount: ustxAmount, }); - expect(stackingResult.constructionMetadata.metadata.contract_name).toBe('pox-3'); + expect(stackingResult.constructionMetadata.metadata.contract_name).toBe('pox-4'); expect(stackingResult.constructionMetadata.metadata.burn_block_height as number).toBeTruthy(); expect(stackingResult.submitResult.transaction_identifier.hash).toBe(stackingResult.txId); - expect(stackingResult.tx.contract_call_contract_id).toBe('ST000000000000000000002AMW42H.pox-3'); + expect(stackingResult.tx.contract_call_contract_id).toBe('ST000000000000000000002AMW42H.pox-4'); }); test('Verify expected amount of STX are locked', async () => { @@ -249,11 +249,11 @@ describe('PoX-3 - Rosetta - Stacking with segwit', () => { ustxAmount, }); - expect(rosettaStackStx.constructionMetadata.metadata.contract_name).toBe('pox-3'); + expect(rosettaStackStx.constructionMetadata.metadata.contract_name).toBe('pox-4'); expect(rosettaStackStx.constructionMetadata.metadata.burn_block_height as number).toBeTruthy(); expect(rosettaStackStx.submitResult.transaction_identifier.hash).toBe(rosettaStackStx.txId); expect(rosettaStackStx.tx.contract_call_contract_id).toBe( - 'ST000000000000000000002AMW42H.pox-3' + 'ST000000000000000000002AMW42H.pox-4' ); // ensure locked reported by stacks-node account RPC balance diff --git a/src/tests-2.4/pox-3-stack-extend-increase.ts b/src/tests-2.5/pox-4-stack-extend-increase.ts similarity index 98% rename from src/tests-2.4/pox-3-stack-extend-increase.ts rename to src/tests-2.5/pox-4-stack-extend-increase.ts index ba18676e09..8fe0bf1ef7 100644 --- a/src/tests-2.4/pox-3-stack-extend-increase.ts +++ b/src/tests-2.5/pox-4-stack-extend-increase.ts @@ -21,7 +21,7 @@ import { import { decodeBtcAddress } from '@stacks/stacking'; import { hexToBuffer } from '@hirosystems/api-toolkit'; -describe('PoX-3 - Stack extend and increase operations', () => { +describe('PoX-4 - Stack extend and increase operations', () => { const account = testnetKeys[1]; let btcAddr: string; let btcRegtestAccount: VerboseKeyOutput; @@ -101,7 +101,7 @@ describe('PoX-3 - Stack extend and increase operations', () => { cycleBlockLength = lockPeriod * poxInfo.reward_cycle_length; [contractAddress, contractName] = poxInfo.contract_id.split('.'); - expect(contractName).toBe('pox-3'); + expect(contractName).toBe('pox-4'); }); test('stack-stx tx', async () => { @@ -173,7 +173,7 @@ describe('PoX-3 - Stack extend and increase operations', () => { expect(coreBalance.unlock_height).toBeGreaterThan(0); // validate the pox2 event for this tx - const res: any = await fetchGet(`/extended/v1/pox3_events/tx/${sendTxResult.txId}`); + const res: any = await fetchGet(`/extended/v1/pox4_events/tx/${sendTxResult.txId}`); expect(res).toBeDefined(); expect(res.results).toHaveLength(1); expect(res.results[0]).toEqual( @@ -268,7 +268,7 @@ describe('PoX-3 - Stack extend and increase operations', () => { expect(coreBalance.unlock_height).toBe(expectedUnlockHeight); // validate the pox2 event for this tx - const res: any = await fetchGet(`/extended/v1/pox3_events/tx/${sendTxResult.txId}`); + const res: any = await fetchGet(`/extended/v1/pox4_events/tx/${sendTxResult.txId}`); expect(res).toBeDefined(); expect(res.results).toHaveLength(1); expect(res.results[0]).toEqual( @@ -367,7 +367,7 @@ describe('PoX-3 - Stack extend and increase operations', () => { expect(coreBalance.unlock_height).toBeGreaterThan(coreBalancePreStackExtend.unlock_height); // validate the pox2 event for this tx - const res: any = await fetchGet(`/extended/v1/pox3_events/tx/${sendTxResult.txId}`); + const res: any = await fetchGet(`/extended/v1/pox4_events/tx/${sendTxResult.txId}`); expect(res).toBeDefined(); expect(res.results).toHaveLength(1); expect(res.results[0]).toEqual( diff --git a/src/tests-rosetta-construction/construction.ts b/src/tests-rosetta-construction/construction.ts index 3c40d9d4bd..274fbb8e11 100644 --- a/src/tests-rosetta-construction/construction.ts +++ b/src/tests-rosetta-construction/construction.ts @@ -956,7 +956,7 @@ describe('Rosetta Construction', () => { const sender = testnetKeys[0].stacksAddress; const fee = '270'; const contract_address = 'ST000000000000000000002AMW42H'; - const contract_name = 'pox-3'; + const contract_name = 'pox-4'; const stacking_amount = 5000; const burn_block_height = 200; const number_of_cycles = 5; @@ -1634,7 +1634,7 @@ describe('Rosetta Construction', () => { delegate_to: testnetKeys[1].stacksAddress, size: 260, contract_address: 'ST000000000000000000002AMW42H', - contract_name: 'pox-3', + contract_name: 'pox-4', account_sequence: nonce, recent_block_hash: '0x969e494d5aee0166016836f97bbeb3d9473bea8427e477e9de253f78d3212354', }, @@ -2220,7 +2220,7 @@ describe('Rosetta Construction', () => { // //metadata const contract_address = 'ST000000000000000000002AMW42H'; - const contract_name = 'pox-3'; + const contract_name = 'pox-4'; const metadataRequest: RosettaConstructionMetadataRequest = { network_identifier: { diff --git a/src/tests-rosetta/offline-api-tests.ts b/src/tests-rosetta/offline-api-tests.ts index 73577fa3b4..499e95e6a4 100644 --- a/src/tests-rosetta/offline-api-tests.ts +++ b/src/tests-rosetta/offline-api-tests.ts @@ -822,7 +822,7 @@ describe('Rosetta offline API', () => { const sender = testnetKeys[0].stacksAddress; const fee = '270'; const contract_address = 'ST000000000000000000002AMW42H'; - const contract_name = 'pox-3'; + const contract_name = 'pox-4'; const stacking_amount = 5000; const burn_block_height = 200; const number_of_cycles = 5; @@ -957,7 +957,7 @@ describe('Rosetta offline API', () => { const sender = testnetKeys[0].stacksAddress; const fee = '270'; const contract_address = 'ST000000000000000000002AMW42H'; - const contract_name = 'pox-3'; + const contract_name = 'pox-4'; const stacking_amount = 5000; const burn_block_height = 200; diff --git a/src/tests-rpc/core-rpc-tests.ts b/src/tests-rpc/core-rpc-tests.ts index 22c6009794..cf4c155dfc 100644 --- a/src/tests-rpc/core-rpc-tests.ts +++ b/src/tests-rpc/core-rpc-tests.ts @@ -15,7 +15,7 @@ describe('core RPC tests', () => { test('get pox info', async () => { const poxInfo = await client.getPox(); - expect(poxInfo.contract_id).toBe(`ST000000000000000000002AMW42H.pox-3`); + expect(poxInfo.contract_id).toBe(`ST000000000000000000002AMW42H.pox-4`); }); test('get account nonce', async () => { diff --git a/stacks-blockchain/docker/Dockerfile b/stacks-blockchain/docker/Dockerfile index e9484f5704..d962f5eb95 100644 --- a/stacks-blockchain/docker/Dockerfile +++ b/stacks-blockchain/docker/Dockerfile @@ -1,7 +1,7 @@ # Pointed to stacks-blockchain `2.1.0.0.0` git tag -FROM --platform=linux/amd64 hirosystems/stacks-api-e2e:stacks2.4-f930deb as build +FROM --platform=linux/amd64 hirosystems/stacks-api-e2e:stacks3.0-800259e as build -FROM --platform=linux/amd64 debian:bullseye +FROM --platform=linux/amd64 debian:bookworm COPY wait-for-it.sh /bin/wait-for-it.sh RUN chmod +x /bin/wait-for-it.sh diff --git a/tests/jest.config.2.4.js b/tests/jest.config.2.5.js similarity index 51% rename from tests/jest.config.2.4.js rename to tests/jest.config.2.5.js index 319503527d..65102bd234 100644 --- a/tests/jest.config.2.4.js +++ b/tests/jest.config.2.5.js @@ -3,19 +3,19 @@ const config = { preset: 'ts-jest', testEnvironment: 'node', rootDir: `${require('path').dirname(__dirname)}/src`, - testMatch: ['/tests-2.4/**/*.ts'], + testMatch: ['/tests-2.5/**/*.ts'], testPathIgnorePatterns: [ - '/tests-2.4/global-setup.ts', - '/tests-2.4/global-teardown.ts', - '/tests-2.4/env-setup.ts', - '/tests-2.4/test-helpers.ts', + '/tests-2.5/global-setup.ts', + '/tests-2.5/global-teardown.ts', + '/tests-2.5/env-setup.ts', + '/tests-2.5/test-helpers.ts', ], collectCoverageFrom: ['/**/*.ts'], coveragePathIgnorePatterns: ['/tests*'], coverageDirectory: '/../coverage', - globalSetup: '/tests-2.4/global-setup.ts', - globalTeardown: '/tests-2.4/global-teardown.ts', - setupFilesAfterEnv: ['/tests-2.4/env-setup.ts'], + globalSetup: '/tests-2.5/global-setup.ts', + globalTeardown: '/tests-2.5/global-teardown.ts', + setupFilesAfterEnv: ['/tests-2.5/env-setup.ts'], testTimeout: 60_000, verbose: true, bail: true,