zksync
zksync copied to clipboard
zk init: genesis setup failed
runing zk init in macos 13.2.1
build/index.js → dist/main.js... created dist/main.js in 2.8s ✨ Done in 8.74s. yarn run v1.22.19 $ yarn reading-tool build $ yarn workspace reading-tool build $ tsc ✨ Done in 3.45s. ✔ Compiling JS packages done (26372ms)
Checking PLONK setup ✔ Checking PLONK setup done (0ms)
Unpacking verification keys Keys unpacked ✔ Unpacking verification keys done (14ms) Using localhost database: DATABASE_URL = postgres://postgres@localhost/plasma
Setting up database Compiling zksync_storage v1.0.0 (/Users/mac/devel/github.com/matter-labs/zksync/core/lib/storage) Finished dev [unoptimized + debuginfo] target(s) in 17.74s ✔ Setting up database done (30094ms)
Building contracts yarn run v1.22.19 $ yarn workspace franklin-contracts build $ hardhat compile Nothing to compile Creating Typechain artifacts in directory typechain for target ethers-v5 Successfully generated Typechain artifacts! ✨ Done in 8.87s. ✔ Building contracts done (9088ms)
Deploying localhost ERC20 tokens Restarting zksync_dev-liquidity-token-watcher_1 ... done Restarting zksync_dev-ticker_1 ... done ✔ Deploying localhost ERC20 tokens done (12262ms)
Deploying localhost EIP1271 contract yarn run v1.22.19 $ yarn workspace franklin-contracts deploy-eip1271 $ ts-node scripts/deploy-eip1271.ts ✨ Done in 7.63s. ✔ Deploying localhost EIP1271 contract done (7838ms)
Deploying withdrawal helpers contracts yarn run v1.22.19 $ yarn workspace franklin-contracts deploy-withdrawal-helpers-contracts $ ts-node scripts/deploy-withdrawal-helpers.ts ✨ Done in 7.33s. ✔ Deploying withdrawal helpers contracts done (7515ms)
Running server genesis setup Dropping DB... Using localhost database: DATABASE_URL = postgres://postgres@localhost/plasma Error: Command failed: diesel database setup Failed to run migrations: Cannot perform this operation outside of a transaction
I got the same issue when Running server genesis setup
but the terminal showed another error:
> Running server genesis setup
Dropping DB...
Password for user postgres:
Password for user postgres:
Password for user postgres:
Using localhost database:
DATABASE_URL = postgres://postgres@localhost/plasma
Compiling zksync_storage v1.0.0 (/home/niet/zk/zksync/core/lib/storage)
Finished dev [unoptimized + debuginfo] target(s) in 30.70s
Password for user postgres:
Error: Command failed: psql "postgres://postgres@localhost/plasma" -c "INSERT INTO server_config (contract_addr, gov_contract_addr, nft_factory_addr) VALUES ('0x70a0F165d6f8054d0d0CF8dFd4DD2005f0AF6B55', '0x5E6D086F5eC079ADFF4FB3774CDf3e8D6a34F7E9', '') ON CONFLICT (id) DO UPDATE SET (contract_addr, gov_contract_addr, nft_factory_addr) = ('0x70a0F165d6f8054d0d0CF8dFd4DD2005f0AF6B55', '0x5E6D086F5eC079ADFF4FB3774CDf3e8D6a34F7E9', '')"
ERROR: relation "server_config" does not exist
LINE 1: INSERT INTO server_config (contract_addr, gov_contract_addr,...
i got the same problem, and the error message as follow:
> Running server genesis setup
Dropping DB...
Using localhost database:
DATABASE_URL = postgres://postgres@localhost/plasma
Error: Command failed: diesel database setup
Failed to run migrations: Cannot perform this operation outside of a transaction
i got same, and at the first, i get the :
Error: Command failed: diesel database setup.
so, i use the command: "createdb plasma"create the db manually,the i get the same error like yous:
Error: Command failed: psql "postgres://postgres@localhost/plasma" -c "INSERT INTO server_config (contract_addr, gov_contract_addr, nft_factory_addr) VALUES ('0x70a0F165d6f8054d0d0CF8dFd4DD2005f0AF6B55', '0x5E6D086F5eC079ADFF4FB3774CDf3e8D6a34F7E9', '') ON CONFLICT (id) DO UPDATE SET (contract_addr, gov_contract_addr, nft_factory_addr) = ('0x70a0F165d6f8054d0d0CF8dFd4DD2005f0AF6B55', '0x5E6D086F5eC079ADFF4FB3774CDf3e8D6a34F7E9', '')"
ERROR: relation "server_config" does not exist
does anyone deal with it ? maybe my diesel version is wrong?but i have try v1.14.0 and it do not works also.
...It's diesel's bug.i chose use low version of it and it'sOk: cargo install diesel_cli --version=1.4.0