{"id":19291834,"url":"https://github.com/hirosystems/stacks-e2e-testing","last_synced_at":"2025-04-22T06:31:47.893Z","repository":{"id":64269488,"uuid":"569371606","full_name":"hirosystems/stacks-e2e-testing","owner":"hirosystems","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-05T23:36:03.000Z","size":949,"stargazers_count":7,"open_issues_count":4,"forks_count":4,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-15T21:43:55.217Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hirosystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-22T17:14:53.000Z","updated_at":"2024-03-25T14:19:32.000Z","dependencies_parsed_at":"2024-11-09T22:38:41.001Z","dependency_job_id":null,"html_url":"https://github.com/hirosystems/stacks-e2e-testing","commit_stats":null,"previous_names":["hirosystems/stacks-e2e-testing"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fstacks-e2e-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fstacks-e2e-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fstacks-e2e-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fstacks-e2e-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hirosystems","download_url":"https://codeload.github.com/hirosystems/stacks-e2e-testing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250183245,"owners_count":21388682,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T22:28:04.370Z","updated_at":"2025-04-22T06:31:47.585Z","avatar_url":"https://github.com/hirosystems.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stacks-devnet-js\n\nPublic repository of tests focused on checking the new features coming with the Stacks 2.1 network upgrade.\n\n### How to run\n\n```bash\nyarn install\nyarn test:dev\n```\n\nTo run tests from one file, use:\n\n```\nyarn vitest --run direct-stacking-with-bug\n```\n\nOr to run a specific test, use the `-t` flag to specify the complete name:\n\n```\nyarn test:dev run -t \"using stacks-increase in the same cycle should result in increased rewards\"\n```\n\nWhen running multiple tests, you'll want to limit it to one test at a time because multiple tests in parallel will sometimes cross contaminate. To avoid this, you can use the `--threads false` flag, for example, the following will run all of the tests in the _pox/stacking/_ directory, one at a time:\n\n```sh\nyarn vitest --run tests/integration/pox/stacking/ --threads false\n```\n\n#### Using 2.4 `stacks-node`\n\nTo run tests using the 2.2 node (the tests in the _pox-disabled/_ directory), you'll need to use a currently unpublished version of the `stacks-devnet-js` package which has support for the new settings. To build this locally:\n\n```\ngit clone https://github.com/hirosystems/clarinet.git\ncd clarinet\ngit checkout feat/devnet-epoch-2.2\ncd components/stacks-devnet-js\nnpm install\n```\n\nThen you'll want to run one of the following commands, depending on your platform:\n\n```\nnpm run build-linux-x64-glibc\nnpm run build-linux-x64-musl\nnpm run build-windows-x64\nnpm run build-darwin-x64   # Mac with Intel\nnpm run build-darwin-arm64 # Mac with Apple Silicon\n```\n\nFinally, you'll use `npm link` to utilize this version in this testing repo. First, in the `stacks-devnet-js` directory, run:\n\n```\nnpm link\n```\n\nThis will create a symbolic link from the local package directory to the global node_modules directory.\n\nThen back in this testing directory, run:\n\n```\nnpm link @hirosystems/stacks-devnet-js\n```\n\nNow, you can run the tests expecting this 2.2 node, i.e. those in the _pox-disabled/_ directory.\n\nTo switch back to the default version, run:\n\n```\nnpm unlink @hirosystems/stacks-devnet-js --no-save\nyarn install\n```\n\n#### 2.4 `stacks-node` Image\n\nTo run with the latest node, you'll need to specify the docker image URL to use via an environment variable:\n\n```sh\nexport CUSTOM_STACKS_NODE=\"blockstack/stacks-blockchain:devnet-2.4.0.0.0\"\n```\n\nOn a Mac with Apple Silicon, the published stacks-node image, `blockstack/stacks-blockchain:devnet-2.4.0.0.0` does not seem to work correctly. You will know you have run into this problem if your tests fail with:\n\n```\nUnknown Error: waitForNextStacksBlock maxErrors reached\n```\n\nand in the stacks-node logs, you see this error repeated:\n\n```\nApr 26 15:56:09.987721 INFO Anchor block selected for cycle 1: 58cae3b5f5ae5c0cd5b459795805118d16979da8/64563a5269476a9c5ade56b42af3eb3921dd18396692d12e3079e6888ba63a3e (txid 775781e42691dfa2c52d5e8175f48831ae49fd993beae35499d3f223b563577a)\nApr 26 15:56:09.991729 ERRO Relayer: Failure fetching recipient set: ChainstateError(ClarityError(Interpreter(Unchecked(NoSuchContract(\"ST000000000000000000002AMW42H.pox-2\")))))\n```\n\nAs an alternative, you can build this image locally, or update the image URL in the environment variable to use:\n\n```sh\nexport CUSTOM_STACKS_NODE=\"stacksbrice/stacks-node:devnet-2.4.0.0.0\"\n```\n\nIf this environment variable is not defined, `stacks-devnet-js` will default to an older version of the `stacks-node`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirosystems%2Fstacks-e2e-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhirosystems%2Fstacks-e2e-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirosystems%2Fstacks-e2e-testing/lists"}