Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running zkstack ecosystem init --dev failed with error about artifacts #3317

Open
mesozoic-technology opened this issue Nov 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mesozoic-technology
Copy link

🐛 Bug Report

📝 Description

I installed an ecosystem seemingly successfully, but when I tried to run zkstack ecosystem init --dev from its root directory, I received an error mentioned below in the log section.

🔄 Reproduction Steps

Install zkstackup, use it to install the zk stack, create an ecosystem, then cd into the ecosystem dir and try to initialize the chain with zkstack ecosystem init --dev

🤔 Expected Behavior

I wanted to initialize my zk chain

😯 Current Behavior

There was an error with the description being that it could not find a SystemContext artifact, and that it failed to run yarn preprocess:bootloader

🖥️ Environment

I previously tried installing the ecosystem two times, first accidentally selecting yes for evm emulator, the second time finding a port clash with a local postgres service. The third time, it succeeded.

📋 Additional Context

Add any other context about the problem here. If applicable, add screenshots to help explain.

📎 Log Output

➜  zksync_elastic_ecosystem zkstack ecosystem init --dev          

┌   ZK Stack CLI 
│
●  Initializing ecosystem
│  
●  Era observability already setup
│  
◒  Installing and building dependencies...                                                                                              │
■  Command failed to run
│  
■    Status:
│      exit status: 1
│    Stdout:
│      yarn run v1.22.21
│      $ rm -rf ./bootloader/build && yarn ts-node scripts/preprocess-bootloader.ts
│      $ /Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/.bin/ts-node scripts/preprocess-bootloader.ts
│      Using zksolc from
│      https://github.com/matter-labs/era-compiler-solidity/releases/download/prerelease-a167aa3-code4rena/zksolc-macosx-arm64-v1.5.0
│      info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
│      info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
│      
│  
│    Stderr:
│      /Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/hardhat/src/internal/artifacts.ts:721
│      throw new HardhatError(ERRORS.ARTIFACTS.NOT_FOUND, {
│      ^
│      HardhatError: HH700: Artifact for contract "SystemContext" not found.
│      at Artifacts._handleWrongArtifactForContractName
│      (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/hardhat/src/internal/artifacts.ts:721:11)
│      at Artifacts._getArtifactPathFromFiles
│      (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/hardhat/src/internal/artifacts.ts:852:19)
│      at Artifacts._getArtifactPathSync
│      (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/hardhat/src/internal/artifacts.ts:588:21)
│      at Artifacts.readArtifactSync
│      (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/hardhat/src/internal/artifacts.ts:76:31)
│      at getSystemContextCodeHash
│      (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/system-contracts/scripts/preprocess-bootloader.ts:58:30)
│      at Object.<anonymous>
│      (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/system-contracts/scripts/preprocess-bootloader.ts:109:38)
│      at Module._compile (node:internal/modules/cjs/loader:1256:14)
│      at Module.m._compile
│      (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/ts-node/src/index.ts:1618:23)
│      at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
│      at Object.require.extensions.<computed> [as .ts]
│      (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/ts-node/src/index.ts:1621:12) {
│      parent: undefined,
│      _stack: 'HardhatError: HH700: Artifact for contract "SystemContext" not found. \n' +
│      ' at Artifacts._handleWrongArtifactForContractName
│      (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/hardhat/src/internal/artifacts.ts:721:11)\n' +
│      ' at Artifacts._getArtifactPathFromFiles
│      (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/hardhat/src/internal/artifacts.ts:852:19)\n' +
│      ' at Artifacts._getArtifactPathSync
│      (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/hardhat/src/internal/artifacts.ts:588:21)\n' +
│      ' at Artifacts.readArtifactSync
│      (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/hardhat/src/internal/artifacts.ts:76:31)\n' +
│      ' at getSystemContextCodeHash
│      (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/system-contracts/scripts/preprocess-bootloader.ts:58:30)\n'
│      +
│      ' at Object.<anonymous>
│      (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/system-contracts/scripts/preprocess-bootloader.ts:109:38)\n'
│      +
│      ' at Module._compile (node:internal/modules/cjs/loader:1256:14)\n' +
│      ' at Module.m._compile
│      (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/ts-node/src/index.ts:1618:23)\n' +
│      ' at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)\n' +
│      ' at Object.require.extensions.<computed> [as .ts]
│      (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/ts-node/src/index.ts:1621:12)',
│      errorDescriptor: {
│      number: 700,
│      message: 'Artifact for contract "%contractName%" not found. %suggestion%',
│      title: 'Artifact not found',
│      description: 'Tried to import a nonexistent artifact.\n' +
│      '\n' +
│      "Please double check that your contracts have been compiled and double check your artifact's name.",
│      shouldBeReported: false
│      },
│      number: 700,
│      messageArguments: { contractName: 'SystemContext', suggestion: '' },
│      _isHardhatError: true
│      }
│      error Command failed with exit code 1.
│      error Command failed with exit code 1.
│      
│  
■  Command failed to run: yarn preprocess:bootloader
│  /Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/hardhat/src/internal/artifacts.ts:721
│      throw new HardhatError(ERRORS.ARTIFACTS.NOT_FOUND, {
│            ^
│  HardhatError: HH700: Artifact for contract "SystemContext" not found. 
│      at Artifacts._handleWrongArtifactForContractName (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/hardhat/src/internal/artifacts.ts:721:11)
│      at Artifacts._getArtifactPathFromFiles (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/hardhat/src/internal/artifacts.ts:852:19)
│      at Artifacts._getArtifactPathSync (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/hardhat/src/internal/artifacts.ts:588:21)
│      at Artifacts.readArtifactSync (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/hardhat/src/internal/artifacts.ts:76:31)
│      at getSystemContextCodeHash (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/system-contracts/scripts/preprocess-bootloader.ts:58:30)
│      at Object.<anonymous> (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/system-contracts/scripts/preprocess-bootloader.ts:109:38)
│      at Module._compile (node:internal/modules/cjs/loader:1256:14)
│      at Module.m._compile (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/ts-node/src/index.ts:1618:23)
│      at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
│      at Object.require.extensions.<computed> [as .ts] (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/ts-node/src/index.ts:1621:12) {
│    parent: undefined,
│    _stack: 'HardhatError: HH700: Artifact for contract "SystemContext" not found. \n' +
│      '    at Artifacts._handleWrongArtifactForContractName (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/hardhat/src/internal/artifacts.ts:721:11)\n' +
│      '    at Artifacts._getArtifactPathFromFiles (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/hardhat/src/internal/artifacts.ts:852:19)\n' +
│      '    at Artifacts._getArtifactPathSync (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/hardhat/src/internal/artifacts.ts:588:21)\n' +
│      '    at Artifacts.readArtifactSync (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/hardhat/src/internal/artifacts.ts:76:31)\n' +
│      '    at getSystemContextCodeHash (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/system-contracts/scripts/preprocess-bootloader.ts:58:30)\n' +
│      '    at Object.<anonymous> (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/system-contracts/scripts/preprocess-bootloader.ts:109:38)\n' +
│      '    at Module._compile (node:internal/modules/cjs/loader:1256:14)\n' +
│      '    at Module.m._compile (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/ts-node/src/index.ts:1618:23)\n' +
│      '    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)\n' +
│      '    at Object.require.extensions.<computed> [as .ts] (/Users/rotas/zksync_elastic_ecosystem/zksync-era/contracts/node_modules/ts-node/src/index.ts:1621:12)',
│    errorDescriptor: {
│      number: 700,
│      message: 'Artifact for contract "%contractName%" not found. %suggestion%',
│      title: 'Artifact not found',
│      description: 'Tried to import a nonexistent artifact.\n' +
│        '\n' +
│        "Please double check that your contracts have been compiled and double check your artifact's name.",
│      shouldBeReported: false
│    },
│    number: 700,
│    messageArguments: { contractName: 'SystemContext', suggestion: '' },
│    _isHardhatError: true
│  }
│  error Command failed with exit code 1.
│  error Command failed with exit code 1.
│  
│  
▲    0: Command failed to run: yarn preprocess:bootloader
│  
└  Failed to run command
@mesozoic-technology mesozoic-technology added the bug Something isn't working label Nov 22, 2024
@mesozoic-technology mesozoic-technology changed the title Running zk ecosystem init --dev failed with error about artifacts Running zkstack ecosystem init --dev failed with error about artifacts Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant