eyblockchain / nightfall Goto Github PK
View Code? Open in Web Editor NEWNightfall protocols for private transactions on the Ethereum blockchain using zk-snarks
License: Other
Nightfall protocols for private transactions on the Ethereum blockchain using zk-snarks
License: Other
Hi,
While launching the app and go for registration, it shows below error.
All containers are up and running .
Thanks,
Satyajit
Docker version: docker version
OS & Version: Windows/Linux/OSX
Commit hash : (if develop
)
[backtrace]
Can the 7GB of proofs be hosted on a remote system to allow for lighter clients and systems with less resources to use this system?
Basically a trusted setup but where the result is that the onchain transactions are still just as secure and obfuscated.
I am trying to run zkp-demo on my host following the README.md at version 1.0.2
(which is the newest tag for now). And I got api-gate-way started failed with errors (I have replaced docker-proxy
with dotdocker
):
> [email protected] start /app
> NODE_ENV=LOCAL nodemon --exec babel-node ./src/index.js
[nodemon] 1.19.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `babel-node ./src/index.js`
internal/modules/cjs/loader.js:670
throw err;
^
Error: Cannot find module '/app/src/index.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:668:15)
at Function.Module._load (internal/modules/cjs/loader.js:591:27)
at Function.Module.runMain (internal/modules/cjs/loader.js:877:12)
at Object.<anonymous> (/app/node_modules/@babel/node/lib/_babel-node.js:234:23)
at Module._compile (internal/modules/cjs/loader.js:816:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
at Module.load (internal/modules/cjs/loader.js:685:32)
at Function.Module._load (internal/modules/cjs/loader.js:620:12)
at Function.Module.runMain (internal/modules/cjs/loader.js:877:12)
at internal/main/run_main_module.js:21:11
[nodemon] app crashed - waiting for file changes before starting...
nightfall_truffle-offchain_1 exited with code 1
After have a deep look into the container, I found that the directory src
is empty. And I found that there is another api-gateway
directory besides API-Gateway
, which means that api-gateway
container mounts a wrong directory.
~/nightfall$ ls
accounts contributing.md docker-entrypoint-initdb.d node_modules README.md UI.md
api-gateway database license.md offchain SECURITY.md zkp
API-Gateway doc limitations.md package.json security-updates.md zkp-demo
config docker-compose.yml Makefile package-lock.json ui zkp-utils
And after I correctly copied API-Gateway/src
into api-gateway/src
, I got another error here:
> [email protected] start /app
> NODE_ENV=LOCAL nodemon --exec babel-node ./src/index.js
[nodemon] 1.19.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `babel-node ./src/index.js`
fs.js:119
throw err;
^
Error: EISDIR: illegal operation on a directory, read
at Object.readSync (fs.js:514:3)
at tryReadSync (fs.js:337:20)
at Object.readFileSync (fs.js:374:19)
at /app/node_modules/@babel/core/lib/config/files/utils.js:29:39
at cachedFunction (/app/node_modules/@babel/core/lib/config/caching.js:33:19)
at readConfig (/app/node_modules/@babel/core/lib/config/files/configuration.js:176:8)
at config.reduce (/app/node_modules/@babel/core/lib/config/files/configuration.js:105:24)
at Array.reduce (<anonymous>)
at findRelativeConfig (/app/node_modules/@babel/core/lib/config/files/configuration.js:102:56)
at buildRootChain (/app/node_modules/@babel/core/lib/config/config-chain.js:113:39)
[nodemon] app crashed - waiting for file changes before starting...
And I don't know how to solve this problem. Please give me some help. Thanks!
Docker version: 18.09.2
OS & Version: Linux (Ubuntu 16.04)
Commit hash : df0ff8b (v1.0.2)
Open browser, and successfully login to ZKP Demo
Tried to registe a new user and got:
http://api.nightfall.docker/createAccount
502 BAD GATEWAY
According to README.md until ./zkp-demo
step.
The trusted setup process takes an hour or so to run and each time you run it you get different results.
Currently, the trusted setup process will permanently overwrite any previous outputs. There are workarounds for this including documentation and the safe-dump folder.
This is unnecessary complexity. Instead, the trusted setup should simply refuse to run if files already exist in the output directory. It should be the responsibility of the end user to delete any files if that is their intent.
I’ve read in your security policy that you’d like to discuss potential vulnerabilities in issues, so I’m starting the discussion here.
In the burn function, there’s a proof that the caller is allowed to burn. Additionally, in the transaction submitted to the blockchain there’s a “payTo” address.
It seems that the “payTo” address is not bound to the proof in any way - e.g., by including it as a public input or signing it with a key bound to the proof.
Is there anything preventing a node or a miner from just copying the proof and submit a new transaction with another “payTo” address?
The README.md currently links to docker-proxy. According to its author, this package has been rewritten and rereleased as dotdocker at https://github.com/aj-may/dotdocker/blob/master/README.md.
The new version has an install path that is safer (does not require curl ... | bash
) and integrates with one of our existing tools (npm) so this may be preferred.
I notice the README now says to use dotdocker, so I ran all tests (./zkp-demo-test
) on the Master branch using dotdocker. The tests failed.
The tests passed with docker-proxy.
Docker version: docker version
OS & Version: OSX
Branch: Master
Tests should all pass
Tests failed with dotdocker
Run the tests with dotdocker
ZoKrates running with Nodejs environment test
zkp_test_1 | Running the container; mounted: nightfall_zkp_code_test:/home/zokrates/code/:cached
zkp_test_1 | { Error: (HTTP code 500) server error - OCI runtime create failed: container_linux.go:344: starting container process caused "process_linux.go:424: container init caused \"rootfs_linux.go:58: mounting \\\"/var/lib/docker/volumes/nightfall_zkp_code_test/_data\\\" to rootfs \\\"/var/lib/docker/overlay2/52ec64705012323d0fbfac60f0d8e14707a7390fdfdb856ce9987caf21d5af0f/merged\\\" at \\\"/var/lib/docker/overlay2/52ec64705012323d0fbfac60f0d8e14707a7390fdfdb856ce9987caf21d5af0f/merged/home/zokrates/code\\\" caused \\\"no such file or directory\\\"\"": unknown
zkp_test_1 | at /app/node_modules/docker-modem/lib/modem.js:239:17
zkp_test_1 | at getCause (/app/node_modules/docker-modem/lib/modem.js:269:7)
zkp_test_1 | at Modem.buildPayload (/app/node_modules/docker-modem/lib/modem.js:238:5)
zkp_test_1 | at IncomingMessage.<anonymous> (/app/node_modules/docker-modem/lib/modem.js:214:14)
zkp_test_1 | at IncomingMessage.emit (events.js:198:15)
zkp_test_1 | at endReadableNT (_stream_readable.js:1139:12)
zkp_test_1 | at processTicksAndRejections (internal/process/task_queues.js:81:17)
zkp_test_1 | reason: 'server error',
zkp_test_1 | statusCode: 500,
zkp_test_1 | json:
zkp_test_1 | { message:
zkp_test_1 | 'OCI runtime create failed: container_linux.go:344: starting container process caused "process_linux.go:424: container init caused \\"rootfs_linux.go:58: mounting \\\\\\"/var/lib/docker/volumes/nightfall_zkp_code_test/_data\\\\\\" to rootfs \\\\\\"/var/lib/docker/overlay2/52ec64705012323d0fbfac60f0d8e14707a7390fdfdb856ce9987caf21d5af0f/merged\\\\\\" at \\\\\\"/var/lib/docker/overlay2/52ec64705012323d0fbfac60f0d8e14707a7390fdfdb856ce9987caf21d5af0f/merged/home/zokrates/code\\\\\\" caused \\\\\\"no such file or directory\\\\\\"\\"": unknown' } }
api-gateway_test_1 | error: POST:/coin/mint
api-gateway_test_1 | {}
api-gateway_test_1 | {"body":{"A":"0x00000000000000000000000000000003","commitmentIndex":1,"commitment":"0x194fcfef7c5190cf740119cacaa572911621bd2d2f54a8e0ff7798"}}
api-gateway_test_1 | {"params":{}}
api-gateway_test_1 | {"query":{}}
api-gateway_test_1 |
mongo_test_1 | 2019-07-23T10:38:49.766+0000 I NETWORK [conn8] end connection 172.19.0.11:49308 (6 connections now open)
mongo_test_1 | 2019-07-23T10:38:49.784+0000 I NETWORK [conn4] end connection 172.19.0.11:49270 (5 connections now open)
mongo_test_1 | 2019-07-23T10:38:49.796+0000 I NETWORK [conn9] end connection 172.19.0.11:49328 (3 connections now open)
mongo_test_1 | 2019-07-23T10:38:49.805+0000 I NETWORK [conn1] end connection 172.19.0.11:49248 (4 connections now open)
mongo_test_1 | 2019-07-23T10:38:49.835+0000 I NETWORK [conn2] end connection 172.19.0.11:49266 (2 connections now open)
mongo_test_1 | 2019-07-23T10:38:49.874+0000 I NETWORK [conn5] end connection 172.19.0.11:49272 (1 connection now open)
mongo_test_1 | 2019-07-23T10:38:50.069+0000 I NETWORK [conn3] end connection 172.19.0.11:49268 (0 connections now open)
nightfall_api-gateway_test_1 exited with code 137
Hi,
Another issue reported by Slither is the shadowing of the _owner
variable in NFTokenShield
, leading to an incorrect ownership schema.
NFTokenShield._owner
shadows Ownable._owner
nightfall/zkp/contracts/NFTokenShield.sol
Line 53 in 9fbd1f4
nightfall/zkp/contracts/Ownable.sol
Line 17 in 9fbd1f4
As a result, NFTokenShield
will have two _owner
variables. The modifier onlyOwner
and the function transferOwnership
will be performed using Ownable._owner
, while close()
will be performed using NFTokenShield._owner
.
NFTokenShield._owner
, orNFTokenShield._owner
to avoid confusion (If the goal is to have two separate variables).Hello,
On the Readme.MD we may want to point to out that there is an alternative to docker-proxy for folks running in Linux. It's called Dory> https://github.com/FreedomBen/dory we use it in our Ubuntu VMs here in Costa Rica and it seems to be a good replacement.
Best,
Otto
Currently a new language, pcode, is created and then preprocessed into code, the input for ZoKrates.
This is handled in https://github.com/EYBlockchain/nightfall/blob/master/zkp/code/tools-code-preprop.js
To increase readability and assurance, this preprocessor could be factored out (with test cases!) into a separate library. Effort is already started at https://github.com/EYBlockchain/zokrates-preprocessor
Upstream may have an interest to incorporate it into ZoKrates or at least we could maintain it at zokrates/zokrates-preprocessor for wider adoption.
Currently several technologies are used for starting/stopping/testing the application:
I recommend to reduce this to two on the host machine:
The end result would be that it is possible to generate keys, install, run and test the application all using Docker Compose commands (which are initiated from the Makefile). This removes many steps from the install process and many prerequisites from all people using the software.
From INSIDE the docker container or on a development machine having all required prerequisites, the following technologies could be used:
npm test
and npm install
)npm install
from the host environment (i.e. only use npm inside Docker)I have been studying the key generation workflow for a while and am not sure yet if we can get good performance on that by running it entirely in Docker.
The adoption of Docker will also allow tighter prerequesites to be set. e.g. Node 12 can be specified for some modules and Node 10 for others. This should hopefully remove the need for Babel.
Some code in this repository is copy-pasted from ZoKrates. This is important code which affects the security of the system. The upstream code could be changed at any time (possibly in response to a known security issue) without notification to this project. This has happened once already at (#14). This issue increases the information security assurance of Nightfall by removing this lack of notification.
npm run setup-all
failed, I am sure my docker is already set memory to 8GB with 4GB of swap space, here are some logs:
Be warned, this could take up to an hour!
? Continue? y
Checking pwd...
pwd: /www/code/blockchain/EYBlockChain/nightfall/zkp
pwdName: zkp
dirs in /www/code/blockchain/EYBlockChain/nightfall/zkp/code/ :
[ '/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17',
'/www/code/blockchain/EYBlockChain/nightfall/zkp/code/safe-dump' ]
relevant dirs in /www/code/blockchain/EYBlockChain/nightfall/zkp/code/ :
[ '/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17' ]
dirs in /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17 :
[ '/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-burn',
'/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-mint',
'/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-transfer',
'/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-burn',
'/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-mint',
'/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-transfer' ]
Found existing files: [ 'ft-burn.code', 'ft-burn.pcode' ] in /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-burn
If you continue, these files will be deleted (except for the '.pcode' file and any '.code' dependencies).
? Continue with the trusted setup? y/n y
Files remaining: [ 'ft-burn.code', 'ft-burn.pcode' ] in /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-burn
Filing checks for codeFile: ft-burn.pcode
/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-burn/ft-burn.pcode was copied to safe-dump/ft-burn.pcode
Checking for 'import' files in the .code file ft-burn
codeFileName: ft-burn
codeFile: ft-burn.code
outputDirPath: /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-burn/
backend: gm17
a: null
ZoKrates running with Nodejs environment setup
Running the container; mounted: /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-burn/:/home/zokrates/code/:cached
Container running for ft-burn
Container id for ft-burn : cbc6e3c7ee7d7d478e033452d745e2c70f9cf9414b0e24fd47439153f73dcbfb
To connect to the ft-burn container manually: 'docker exec -ti cbc6e3c7ee7d7d478e033452d745e2c70f9cf9414b0e24fd47439153f73dcbfb bash'
Compile ft-burn ...
Compiling code in the container - this can take some minutes...
+Compiling /home/zokrates/code/ft-burn.code
ft-burn SETUP MESSAGE: COMPILATION COMPLETE
Setup ft-burn ...
Setup: computing (pk,vk) := G(C,toxic) - this can take many minutes...
Error: panicked at 'couldn't open out: No such file or directory (os error 2)', zokrates_cli/src/bin.rs:408:29
note: Run with `RUST_BACKTRACE=1` for a backtrace.
at IncomingMessage.stream.on (/www/code/blockchain/EYBlockChain/nightfall/zkp/src/zokrates.js:37:16)
at IncomingMessage.emit (events.js:194:15)
at endReadableNT (_stream_readable.js:1125:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
undefined
SETUP MESSAGE: SETUP COMPLETE
Export Verifier ft-burn ...
Error: panicked at 'couldn't open verification.key: No such file or directory (os error 2)', zokrates_cli/src/bin.rs:477:33
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Exporting verifier...
at IncomingMessage.stream.on (/www/code/blockchain/EYBlockChain/nightfall/zkp/src/zokrates.js:37:16)
at IncomingMessage.emit (events.js:194:15)
at endReadableNT (_stream_readable.js:1125:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
undefined
ft-burn SETUP MESSAGE: EXPORT-VERIFIER COMPLETE
�cp: cannot stat '/home/zokrates/out': No such file or directory
cp: cannot stat '/home/zokrates/out.code': No such file or directory
cp: cannot stat '/home/zokrates/proving.key': No such file or directory
cp: cannot stat '/home/zokrates/verification.key': No such file or directory
cp: cannot stat '/home/zokrates/variables.inf': No such file or directory
cp: cannot stat '/home/zokrates/verifier.sol': No such file or directory
ft-burn SETUP MESSAGE: FILES COPIED TO THE MOUNTED DIR WITHIN THE CONTAINER. THE FILES WILL NOW ALSO EXIST WITHIN YOUR LOCALHOST'S FOLDER: /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-burn/
Key extraction ft-burn ...
{ Error: ENOENT: no such file or directory, open '/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-burn/verifier.sol'
at Object.openSync (fs.js:438:3)
at Object.readFileSync (fs.js:343:35)
at Object.readFileSync (/www/code/blockchain/EYBlockChain/nightfall/zkp/code/tools-key-extractor.js:18:6)
at keyExtractor (/www/code/blockchain/EYBlockChain/nightfall/zkp/code/index.js:249:41)
at process._tickCallback (internal/process/next_tick.js:68:7)
errno: -2,
syscall: 'open',
code: 'ENOENT',
path:
'/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-burn/verifier.sol' }
******************************************************************************************************************
Trusted setup has failed for ft-burn.code. Please see above for additional information relating to this error.
The most common cause of errors when using this tool is insufficient allocation of resources to Docker.
You can go to Docker's settings and increase the RAM being allocated to Docker. See the README for more details.
******************************************************************************************************************
Found existing files: [ 'ft-mint.code', 'ft-mint.pcode' ] in /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-mint
If you continue, these files will be deleted (except for the '.pcode' file and any '.code' dependencies).
? Continue with the trusted setup? y/n y
Files remaining: [ 'ft-mint.code', 'ft-mint.pcode' ] in /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-mint
Filing checks for codeFile: ft-mint.pcode
/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-mint/ft-mint.pcode was copied to safe-dump/ft-mint.pcode
Checking for 'import' files in the .code file ft-mint
codeFileName: ft-mint
codeFile: ft-mint.code
outputDirPath: /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-mint/
backend: gm17
a: null
ZoKrates running with Nodejs environment setup
Running the container; mounted: /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-mint/:/home/zokrates/code/:cached
Container running for ft-mint
Container id for ft-mint : f90d67c4488585ec28a8fa77a573dda14816cf34c56d8570f80431d8f071107a
To connect to the ft-mint container manually: 'docker exec -ti f90d67c4488585ec28a8fa77a573dda14816cf34c56d8570f80431d8f071107a bash'
Compile ft-mint ...
Compiling code in the container - this can take some minutes...
+Compiling /home/zokrates/code/ft-mint.code
ft-mint SETUP MESSAGE: COMPILATION COMPLETE
Setup ft-mint ...
Setup: computing (pk,vk) := G(C,toxic) - this can take many minutes...
Error: panicked at 'couldn't open out: No such file or directory (os error 2)', zokrates_cli/src/bin.rs:408:29
note: Run with `RUST_BACKTRACE=1` for a backtrace.
at IncomingMessage.stream.on (/www/code/blockchain/EYBlockChain/nightfall/zkp/src/zokrates.js:37:16)
at IncomingMessage.emit (events.js:194:15)
at endReadableNT (_stream_readable.js:1125:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
undefined
SETUP MESSAGE: SETUP COMPLETE
Export Verifier ft-mint ...
Error: panicked at 'couldn't open verification.key: No such file or directory (os error 2)', zokrates_cli/src/bin.rs:477:33
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Exporting verifier...
at IncomingMessage.stream.on (/www/code/blockchain/EYBlockChain/nightfall/zkp/src/zokrates.js:37:16)
at IncomingMessage.emit (events.js:194:15)
at endReadableNT (_stream_readable.js:1125:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
undefined
ft-mint SETUP MESSAGE: EXPORT-VERIFIER COMPLETE
�cp: cannot stat '/home/zokrates/out': No such file or directory
cp: cannot stat '/home/zokrates/out.code': No such file or directory
'cp: cannot stat '/home/zokrates/proving.key': No such file or directory
cp: cannot stat '/home/zokrates/verification.key': No such file or directory
cp: cannot stat '/home/zokrates/variables.inf': No such file or directory
cp: cannot stat '/home/zokrates/verifier.sol': No such file or directory
ft-mint SETUP MESSAGE: FILES COPIED TO THE MOUNTED DIR WITHIN THE CONTAINER. THE FILES WILL NOW ALSO EXIST WITHIN YOUR LOCALHOST'S FOLDER: /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-mint/
Key extraction ft-mint ...
{ Error: ENOENT: no such file or directory, open '/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-mint/verifier.sol'
at Object.openSync (fs.js:438:3)
at Object.readFileSync (fs.js:343:35)
at Object.readFileSync (/www/code/blockchain/EYBlockChain/nightfall/zkp/code/tools-key-extractor.js:18:6)
at keyExtractor (/www/code/blockchain/EYBlockChain/nightfall/zkp/code/index.js:249:41)
at process._tickCallback (internal/process/next_tick.js:68:7)
errno: -2,
syscall: 'open',
code: 'ENOENT',
path:
'/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-mint/verifier.sol' }
******************************************************************************************************************
Trusted setup has failed for ft-mint.code. Please see above for additional information relating to this error.
The most common cause of errors when using this tool is insufficient allocation of resources to Docker.
You can go to Docker's settings and increase the RAM being allocated to Docker. See the README for more details.
******************************************************************************************************************
Found existing files: [ 'aux-adder.code',
'aux-adder.pcode',
'ft-transfer.code',
'ft-transfer.pcode' ] in /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-transfer
If you continue, these files will be deleted (except for the '.pcode' file and any '.code' dependencies).
? Continue with the trusted setup? y/n y
deleting ft-transfer.code
Files remaining: [ 'aux-adder.code',
'aux-adder.pcode',
'ft-transfer.code',
'ft-transfer.pcode' ] in /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-transfer
Filing checks for codeFile: ft-transfer.pcode
/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-transfer/ft-transfer.pcode was copied to safe-dump/ft-transfer.pcode
Checking for 'import' files in the .code file ft-transfer
codeFileName: ft-transfer
codeFile: ft-transfer.code
outputDirPath: /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-transfer/
backend: gm17
a: null
ZoKrates running with Nodejs environment setup
Running the container; mounted: /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-transfer/:/home/zokrates/code/:cached
Container running for ft-transfer
Container id for ft-transfer : e71b3ec3aaae022e80339640c8183d41044dc852b0b52a7651b2534b5604b91a
To connect to the ft-transfer container manually: 'docker exec -ti e71b3ec3aaae022e80339640c8183d41044dc852b0b52a7651b2534b5604b91a bash'
Compile ft-transfer ...
Compiling code in the container - this can take some minutes...
/Compiling /home/zokrates/code/ft-transfer.code
ft-transfer SETUP MESSAGE: COMPILATION COMPLETE
Setup ft-transfer ...
Setup: computing (pk,vk) := G(C,toxic) - this can take many minutes...
Error: panicked at 'couldn't open out: No such file or directory (os error 2)', zokrates_cli/src/bin.rs:408:29
note: Run with `RUST_BACKTRACE=1` for a backtrace.
at IncomingMessage.stream.on (/www/code/blockchain/EYBlockChain/nightfall/zkp/src/zokrates.js:37:16)
at IncomingMessage.emit (events.js:194:15)
at endReadableNT (_stream_readable.js:1125:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
undefined
SETUP MESSAGE: SETUP COMPLETE
Export Verifier ft-transfer ...
Error: panicked at 'Fcouldn't open verification.key: No such file or directory (os error 2)', zokrates_cli/src/bin.rs::477:33
note: Run with `RUST_BACKTRACE=1` for a backtrace.
at IncomingMessage.stream.on (/www/code/blockchain/EYBlockChain/nightfall/zkp/src/zokrates.js:37:16)
at IncomingMessage.emit (events.js:194:15)
at endReadableNT (_stream_readable.js:1125:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
undefined
ft-transfer SETUP MESSAGE: EXPORT-VERIFIER COMPLETE
�cp: cannot stat '/home/zokrates/out': No such file or directory
cp: cannot stat '/home/zokrates/out.code': No such file or directory
cp: cannot stat '/home/zokrates/proving.key': No such file or directory
cp: cannot stat '/home/zokrates/verification.key': No such file or directory
cp: cannot stat '/home/zokrates/variables.inf': No such file or directory
cp: cannot stat '/home/zokrates/verifier.sol': No such file or directory
ft-transfer SETUP MESSAGE: FILES COPIED TO THE MOUNTED DIR WITHIN THE CONTAINER. THE FILES WILL NOW ALSO EXIST WITHIN YOUR LOCALHOST'S FOLDER: /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-transfer/
Key extraction ft-transfer ...
{ Error: ENOENT: no such file or directory, open '/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-transfer/verifier.sol'
at Object.openSync (fs.js:438:3)
at Object.readFileSync (fs.js:343:35)
at Object.readFileSync (/www/code/blockchain/EYBlockChain/nightfall/zkp/code/tools-key-extractor.js:18:6)
at keyExtractor (/www/code/blockchain/EYBlockChain/nightfall/zkp/code/index.js:249:41)
at process._tickCallback (internal/process/next_tick.js:68:7)
errno: -2,
syscall: 'open',
code: 'ENOENT',
path:
'/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/ft-transfer/verifier.sol' }
******************************************************************************************************************
Trusted setup has failed for ft-transfer.code. Please see above for additional information relating to this error.
The most common cause of errors when using this tool is insufficient allocation of resources to Docker.
You can go to Docker's settings and increase the RAM being allocated to Docker. See the README for more details.
******************************************************************************************************************
Found existing files: [ 'nft-burn.code', 'nft-burn.pcode' ] in /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-burn
If you continue, these files will be deleted (except for the '.pcode' file and any '.code' dependencies).
? Continue with the trusted setup? y/n y
Files remaining: [ 'nft-burn.code', 'nft-burn.pcode' ] in /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-burn
Filing checks for codeFile: nft-burn.pcode
/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-burn/nft-burn.pcode was copied to safe-dump/nft-burn.pcode
Checking for 'import' files in the .code file nft-burn
codeFileName: nft-burn
codeFile: nft-burn.code
outputDirPath: /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-burn/
backend: gm17
a: null
ZoKrates running with Nodejs environment setup
Running the container; mounted: /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-burn/:/home/zokrates/code/:cached
Container running for nft-burn
Container id for nft-burn : 598336c6f3cb18c351a4466d40fd2d313c72b24d90d4c0ab8ceff0c36ad3fb82
To connect to the nft-burn container manually: 'docker exec -ti 598336c6f3cb18c351a4466d40fd2d313c72b24d90d4c0ab8ceff0c36ad3fb82 bash'
Compile nft-burn ...
Compiling code in the container - this can take some minutes...
,Compiling /home/zokrates/code/nft-burn.code
nft-burn SETUP MESSAGE: COMPILATION COMPLETE
Setup nft-burn ...
Setup: computing (pk,vk) := G(C,toxic) - this can take many minutes...
Error: panicked at 'couldn't open out: No such file or directory (os error 2)', zokrates_cli/src/bin.rs:408:29
note: Run with `RUST_BACKTRACE=1` for a backtrace.
at IncomingMessage.stream.on (/www/code/blockchain/EYBlockChain/nightfall/zkp/src/zokrates.js:37:16)
at IncomingMessage.emit (events.js:194:15)
at endReadableNT (_stream_readable.js:1125:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
undefined
SETUP MESSAGE: SETUP COMPLETE
Export Verifier nft-burn ...
Error: panicked at 'couldn't open verification.key: No such file or directory (os error 2)', zokrates_cli/src/bin.rs:477:33
note: Run with `RUST_BACKTRACE=1` for a backtrace.
at IncomingMessage.stream.on (/www/code/blockchain/EYBlockChain/nightfall/zkp/src/zokrates.js:37:16)
at IncomingMessage.emit (events.js:194:15)
at endReadableNT (_stream_readable.js:1125:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
undefined
nft-burn SETUP MESSAGE: EXPORT-VERIFIER COMPLETE
�cp: cannot stat '/home/zokrates/out': No such file or directory
cp: cannot stat '/home/zokrates/out.code': No such file or directory
cp: cannot stat '/home/zokrates/proving.key': No such file or directory
cp: cannot stat '/home/zokrates/verification.key': No such file or directory
cp: cannot stat '/home/zokrates/variables.inf': No such file or directory
cp: cannot stat '/home/zokrates/verifier.sol': No such file or directory
nft-burn SETUP MESSAGE: FILES COPIED TO THE MOUNTED DIR WITHIN THE CONTAINER. THE FILES WILL NOW ALSO EXIST WITHIN YOUR LOCALHOST'S FOLDER: /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-burn/
Key extraction nft-burn ...
{ Error: ENOENT: no such file or directory, open '/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-burn/verifier.sol'
at Object.openSync (fs.js:438:3)
at Object.readFileSync (fs.js:343:35)
at Object.readFileSync (/www/code/blockchain/EYBlockChain/nightfall/zkp/code/tools-key-extractor.js:18:6)
at keyExtractor (/www/code/blockchain/EYBlockChain/nightfall/zkp/code/index.js:249:41)
at process._tickCallback (internal/process/next_tick.js:68:7)
errno: -2,
syscall: 'open',
code: 'ENOENT',
path:
'/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-burn/verifier.sol' }
******************************************************************************************************************
Trusted setup has failed for nft-burn.code. Please see above for additional information relating to this error.
The most common cause of errors when using this tool is insufficient allocation of resources to Docker.
You can go to Docker's settings and increase the RAM being allocated to Docker. See the README for more details.
******************************************************************************************************************
Found existing files: [ 'nft-mint.code', 'nft-mint.pcode' ] in /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-mint
If you continue, these files will be deleted (except for the '.pcode' file and any '.code' dependencies).
? Continue with the trusted setup? y/n y
Files remaining: [ 'nft-mint.code', 'nft-mint.pcode' ] in /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-mint
Filing checks for codeFile: nft-mint.pcode
/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-mint/nft-mint.pcode was copied to safe-dump/nft-mint.pcode
Checking for 'import' files in the .code file nft-mint
codeFileName: nft-mint
codeFile: nft-mint.code
outputDirPath: /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-mint/
backend: gm17
a: null
ZoKrates running with Nodejs environment setup
Running the container; mounted: /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-mint/:/home/zokrates/code/:cached
Container running for nft-mint
Container id for nft-mint : 3cb47d37cfecb412b468634411484703a2d067b05c1eff21b36c98cd0a8ea498
To connect to the nft-mint container manually: 'docker exec -ti 3cb47d37cfecb412b468634411484703a2d067b05c1eff21b36c98cd0a8ea498 bash'
Compile nft-mint ...
Compiling code in the container - this can take some minutes...
,Compiling /home/zokrates/code/nft-mint.code
nft-mint SETUP MESSAGE: COMPILATION COMPLETE
Setup nft-mint ...
Setup: computing (pk,vk) := G(C,toxic) - this can take many minutes...
Error: panicked at 'couldn't open out: No such file or directory (os error 2)', zokrates_cli/src/bin.rs:408:29
note: Run with `RUST_BACKTRACE=1` for a backtrace.
at IncomingMessage.stream.on (/www/code/blockchain/EYBlockChain/nightfall/zkp/src/zokrates.js:37:16)
at IncomingMessage.emit (events.js:194:15)
at endReadableNT (_stream_readable.js:1125:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
undefined
SETUP MESSAGE: SETUP COMPLETE
Export Verifier nft-mint ...
Error: panicked at 'couldn't open verification.key: No such file or directory (os error 2)', zokrates_cli/src/bin.rs:477:33
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Exporting verifier...
at IncomingMessage.stream.on (/www/code/blockchain/EYBlockChain/nightfall/zkp/src/zokrates.js:37:16)
at IncomingMessage.emit (events.js:194:15)
at endReadableNT (_stream_readable.js:1125:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
undefined
nft-mint SETUP MESSAGE: EXPORT-VERIFIER COMPLETE
@cp: cannot stat '/home/zokrates/out': No such file or directory
�cp: cannot stat '/home/zokrates/out.code': No such file or directory
cp: cannot stat '/home/zokrates/proving.key': No such file or directory
�cp: cannot stat '/home/zokrates/verification.key': No such file or directory
cp: cannot stat '/home/zokrates/variables.inf': No such file or directory
cp: cannot stat '/home/zokrates/verifier.sol': No such file or directory
nft-mint SETUP MESSAGE: FILES COPIED TO THE MOUNTED DIR WITHIN THE CONTAINER. THE FILES WILL NOW ALSO EXIST WITHIN YOUR LOCALHOST'S FOLDER: /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-mint/
Key extraction nft-mint ...
{ Error: ENOENT: no such file or directory, open '/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-mint/verifier.sol'
at Object.openSync (fs.js:438:3)
at Object.readFileSync (fs.js:343:35)
at Object.readFileSync (/www/code/blockchain/EYBlockChain/nightfall/zkp/code/tools-key-extractor.js:18:6)
at keyExtractor (/www/code/blockchain/EYBlockChain/nightfall/zkp/code/index.js:249:41)
at process._tickCallback (internal/process/next_tick.js:68:7)
errno: -2,
syscall: 'open',
code: 'ENOENT',
path:
'/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-mint/verifier.sol' }
******************************************************************************************************************
Trusted setup has failed for nft-mint.code. Please see above for additional information relating to this error.
The most common cause of errors when using this tool is insufficient allocation of resources to Docker.
You can go to Docker's settings and increase the RAM being allocated to Docker. See the README for more details.
******************************************************************************************************************
Found existing files: [ 'nft-transfer.code', 'nft-transfer.pcode' ] in /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-transfer
If you continue, these files will be deleted (except for the '.pcode' file and any '.code' dependencies).
? Continue with the trusted setup? y/n y
Files remaining: [ 'nft-transfer.code', 'nft-transfer.pcode' ] in /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-transfer
Filing checks for codeFile: nft-transfer.pcode
/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-transfer/nft-transfer.pcode was copied to safe-dump/nft-transfer.pcode
Checking for 'import' files in the .code file nft-transfer
codeFileName: nft-transfer
codeFile: nft-transfer.code
outputDirPath: /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-transfer/
backend: gm17
a: null
ZoKrates running with Nodejs environment setup
Running the container; mounted: /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-transfer/:/home/zokrates/code/:cached
Container running for nft-transfer
Container id for nft-transfer : 75976dab145a11b08f845986595e4ba6afb9ed4975a6ec8b9d8599c6d887c350
To connect to the nft-transfer container manually: 'docker exec -ti 75976dab145a11b08f845986595e4ba6afb9ed4975a6ec8b9d8599c6d887c350 bash'
Compile nft-transfer ...
Compiling code in the container - this can take some minutes...
0Compiling /home/zokrates/code/nft-transfer.code
nft-transfer SETUP MESSAGE: COMPILATION COMPLETE
Setup nft-transfer ...
Setup: computing (pk,vk) := G(C,toxic) - this can take many minutes...
Error: panicked at 'couldn't open out: No such file or directory (os error 2)', zokrates_cli/src/bin.rs:408:29
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Performing setup...
at IncomingMessage.stream.on (/www/code/blockchain/EYBlockChain/nightfall/zkp/src/zokrates.js:37:16)
at IncomingMessage.emit (events.js:194:15)
at endReadableNT (_stream_readable.js:1125:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
undefined
SETUP MESSAGE: SETUP COMPLETE
Export Verifier nft-transfer ...
Error: panicked at 'couldn't open verification.key: No such file or directory (os error 2)', zokrates_cli/src/bin.rs:477:33
note: Run with `RUST_BACKTRACE=1` for a backtrace.
at IncomingMessage.stream.on (/www/code/blockchain/EYBlockChain/nightfall/zkp/src/zokrates.js:37:16)
at IncomingMessage.emit (events.js:194:15)
at endReadableNT (_stream_readable.js:1125:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
undefined
nft-transfer SETUP MESSAGE: EXPORT-VERIFIER COMPLETE
�cp: cannot stat '/home/zokrates/out': No such file or directory
cp: cannot stat '/home/zokrates/out.code': No such file or directory
cp: cannot stat '/home/zokrates/proving.key': No such file or directory
cp: cannot stat '/home/zokrates/verification.key': No such file or directory
cp: cannot stat '/home/zokrates/variables.inf': No such file or directory
cp: cannot stat '/home/zokrates/verifier.sol': No such file or directory
nft-transfer SETUP MESSAGE: FILES COPIED TO THE MOUNTED DIR WITHIN THE CONTAINER. THE FILES WILL NOW ALSO EXIST WITHIN YOUR LOCALHOST'S FOLDER: /www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-transfer/
Key extraction nft-transfer ...
{ Error: ENOENT: no such file or directory, open '/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-transfer/verifier.sol'
at Object.openSync (fs.js:438:3)
at Object.readFileSync (fs.js:343:35)
at Object.readFileSync (/www/code/blockchain/EYBlockChain/nightfall/zkp/code/tools-key-extractor.js:18:6)
at keyExtractor (/www/code/blockchain/EYBlockChain/nightfall/zkp/code/index.js:249:41)
at process._tickCallback (internal/process/next_tick.js:68:7)
errno: -2,
syscall: 'open',
code: 'ENOENT',
path:
'/www/code/blockchain/EYBlockChain/nightfall/zkp/code/gm17/nft-transfer/verifier.sol' }
******************************************************************************************************************
Trusted setup has failed for nft-transfer.code. Please see above for additional information relating to this error.
The most common cause of errors when using this tool is insufficient allocation of resources to Docker.
You can go to Docker's settings and increase the RAM being allocated to Docker. See the README for more details.
******************************************************************************************************************
To ignore the node_modules
from git repo for zkp-utils
.
When trying to mint an opscoin, I get the below stack trace:
ganache_1 | personal_unlockAccount
zkp_1 |
zkp_1 | IN MINT...
zkp_1 | Finding the relevant Shield and Verifier contracts
ganache_1 | eth_getBlockByNumber
ganache_1 | eth_getBlockByNumber
ganache_1 | eth_getBlockByNumber
zkp_1 | FTokenShield contract address: 0x2cd4946Fb86584966A811EE387fFdDfC404236f9
zkp_1 | Verifier contract address: 0x1A8555EFe8FaA218da938b69bFd3Fb4334bf9411
zkp_1 | VerifierRegistry contract address: 0xdF92f5b4d45D8fB20213e649bb95176328962686
zkp_1 | Reading vkIds from json file...
zkp_1 | Existing Proof Variables:
zkp_1 | A: 0x00000000000000000000000000000005 : [ '5' ]
zkp_1 | pkA: 0x0280a0d199e639cd82b91d862c225e1b6a6496646ceeb794f87304 : [ '3025281131444327764113693',
zkp_1 | '178345709554812776295359422658292249348' ]
zkp_1 | S_A: 0x4E5584DC572CAA68E644A93F7C5B31E11FB3017F653F7530F7A5B9 : [ '94700065928410846865015977',
zkp_1 | '84387058196034363361276432521729910201' ]
zkp_1 | New Proof Variables:
zkp_1 | zA: 0xbfde36c2f51b3f0d28e04af61e1acc32332156d033f3c6a7571c71 : [ '231954207077935784191909962',
zkp_1 | '327146399389576260563932470810041064561' ]
zkp_1 | inputs:
zkp_1 | [ '5',
zkp_1 | '231954207077935784191909962',
zkp_1 | '327146399389576260563932470810041064561' ]
zkp_1 | /app
zkp_1 | gm17/ft-mint/
zkp_1 | Computing proof with w=[pkA,S_A] x=[A,Z,1]
zkp_1 |
zkp_1 | Compute-witness: Executing the program C(w,x) with:
zkp_1 | (w,x)= [ '5',
zkp_1 | '3025281131444327764113693',
zkp_1 | '178345709554812776295359422658292249348',
zkp_1 | '94700065928410846865015977',
zkp_1 | '84387058196034363361276432521729910201',
zkp_1 | '231954207077935784191909962',
zkp_1 | '327146399389576260563932470810041064561' ] ...
zkp_1 | a 5 3025281131444327764113693 178345709554812776295359422658292249348 94700065928410846865015977 84387058196034363361276432521729910201 231954207077935784191909962 327146399389576260563932470810041064561
api-gateway_1 | error: POST:/coin/mint
api-gateway_1 | {}
api-gateway_1 | {"body":{"A":"0x00000000000000000000000000000005","pk_A":"0x0280a0d199e639cd82b91d862c225e1b6a6496646ceeb794f87304","S_A":"0x4E5584DC572CAA68E644A93F7C5B31E11FB3017F653F7530F7A5B9"}}
zkp_1 | Error: panicked at 'couldn't open /home/zokrates/code/gm17/ft-mint/out: No such file or directory (os error 2)', zokrates_cli/src/bin.rs:309:29
zkp_1 | note: Run with `RUST_BACKTRACE=1` for a backtrace.
zkp_1 |
zkp_1 | at IncomingMessage.stream.on (/app/src/zokrates.js:37:16)
zkp_1 | at IncomingMessage.emit (events.js:198:15)
zkp_1 | at endReadableNT (_stream_readable.js:1139:12)
zkp_1 | at processTicksAndRejections (internal/process/task_queues.js:81:17)
api-gateway_1 | {"params":{}}
api-gateway_1 | {"query":{}}
api-gateway_1 |
If I do:
docker exec -ti 215862c9b80e32e42fb2cb88692eef21670eebfbce50507bc8797bfa5b8c7c74 bash
and look for the directory in the error I get:
zokrates@215862c9b80e:~/code$ cd /home/zokrates/code
zokrates@215862c9b80e:~/code$ ls -ltr
total 0
Any ideas appreciated ;-). Thanks!
zkp-utils produces a warning during install
Docker version: 18.09.2
OS & Version: macOS
Commit hash : 82557c8
nom install
runs with no warnings
Warning is produced:
npm WARN [email protected] No repository field.
Run npm install
You said MAY, don't pull a bakkt please...
Hi,
I have installed nodejs with the version 10.15.3 as specified in the readme and I am running on Ubuntu 18.04.
When doing npm install it installs the packages correctly:
root@vultr:~/nightfall/zkp# npm install
But when I try to run:
root@vultr:~/nightfall/zkp# npm run setup
I get this error:
> [email protected] setup /root/nightfall/zkp
> NODE_ENV=setup npx babel-node code/index.js
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'big-integer'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.require (/root/nightfall/zkp-utils/index.js:10:12)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Module._compile (/root/nightfall/zkp/node_modules/pirates/lib/index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Object.newLoader [as .js] (/root/nightfall/zkp/node_modules/pirates/lib/index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:653:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] setup: `NODE_ENV=setup npx babel-node code/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] setup script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-06-01T14_51_31_569Z-debug.log
I have tried installing the module given but I keep getting the error.
Here is the full log:
0 info it worked if it ends with ok
1 verbose cli [ '/root/.nvm/versions/node/v10.16.0/bin/node',
1 verbose cli '/root/.nvm/versions/node/v10.16.0/bin/npm',
1 verbose cli 'run',
1 verbose cli 'setup' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'presetup', 'setup', 'postsetup' ]
5 info lifecycle [email protected]~presetup: [email protected]
6 info lifecycle [email protected]~setup: [email protected]
7 verbose lifecycle [email protected]~setup: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~setup: PATH: /root/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/root/nightfall/zkp/node_modules/.bin:/root/.nvm/versions/node/v10.16.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle [email protected]~setup: CWD: /root/nightfall/zkp
10 silly lifecycle [email protected]~setup: Args: [ '-c', 'NODE_ENV=setup npx babel-node code/index.js' ]
11 silly lifecycle [email protected]~setup: Returned: code: 1 signal: null
12 info lifecycle [email protected]~setup: Failed to exec setup script
13 verbose stack Error: [email protected] setup: `NODE_ENV=setup npx babel-node code/index.js`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/root/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (/root/.nvm/versions/node/v10.16.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid [email protected]
15 verbose cwd /root/nightfall/zkp
16 verbose Linux 4.15.0-50-generic
17 verbose argv "/root/.nvm/versions/node/v10.16.0/bin/node" "/root/.nvm/versions/node/v10.16.0/bin/npm" "run" "setup"
18 verbose node v10.16.0
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] setup: `NODE_ENV=setup npx babel-node code/index.js`
22 error Exit status 1
23 error Failed at the [email protected] setup script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
This repo is using an outdated version of the Solidity BN256G2 library which has insufficient checks to make sure that all input points are on the curve in ECTwistAdd (the second point isn't checked), in https://github.com/EYBlockchain/nightfall/blob/master/zkp/contracts/Pairing_v1.sol.
For security reasons the library should be updated to either the latest version in ZoKrates (https://github.com/Zokrates/ZoKrates/blob/develop/zokrates_core/src/proof_system/bn128/utils/solidity.rs) or https://github.com/musalbas/solidity-BN256G2/blob/master/BN256G2.sol (which has ~20,000 lower gas cost).
running nightfall and nightfall-test script is updating zkp-utils/package-lock.json file.
As, in the script its npm install intead of npm ci
Docker version: docker version
OS & Version: Windows/Linux/OSX
Commit hash : (if develop
)
RUN
./nightfall
or
./nightfall-test
When transferring ERC-721 token commitments, the first commitment does not show up as received for the recipient. Subsequent transferred commitments show up without issue, but there is no record in the recipient account of having received the first commitment.
Docker version: 2.0.0.3
OS & Version: OSX 10.14.5
Commit hash : e587d33
The first transferred ERC-721 token commitment shows up in the inventory of the recipient along with subsequent received commitments.
The first transferred ERC-721 token commitment does not show up in the inventory of the recipient, but subsequent transferred commitments do show up.
Steps to recreate the issue:
Note: Coins do not disappear after creating for the second time.
Did anyone face this issue? I haven't checked Mint EYToken. So, I am not sure if there is a simialr issue in there too.
Docker version: docker version
OS & Version: OSX
Commit hash : (if develop
)
[backtrace]
Hi,
I am trying to run the command:
npm run setup-all
But I keep getting the error that verifier.sol is not existent, here is the error:
Key extraction nft-transfer ...
{ Error: ENOENT: no such file or directory, open '/root/nightfall/zkp/code/gm1 7/nft-transfer/verifier.sol'
at Object.openSync (fs.js:438:3)
at Object.readFileSync (fs.js:343:35)
at Object.readFileSync (/root/nightfall/zkp/code/tools-key-extractor.js:18 :6)
at keyExtractor (/root/nightfall/zkp/code/index.js:249:41)
at process._tickCallback (internal/process/next_tick.js:68:7)
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/root/nightfall/zkp/code/gm17/nft-transfer/verifier.sol' }
****************************************************************************** ************************************
Trusted setup has failed for nft-transfer.code. Please see above for additiona l information relating to this error.
The most common cause of errors when using this tool is insufficient allocatio n of resources to Docker.
You can go to Docker's settings and increase the RAM being allocated to Docker . See the README for more details.
****************************************************************************** ************************************
I am running the docker in a 32 gb vps and as per my understanding the Docker is using the maximum amount of memory, I am running on Ubuntu 18.04.
I haven't changed nothing on docker so maybe that is the issue
GitHub has a specific section dedicated to security advisories.
Please copy the items from https://github.com/EYBlockchain/nightfall/blob/master/security-updates.md to https://github.com/EYBlockchain/nightfall/security/advisories
Currently, the benefit is that the Security page will have better information on it. In the future there may be additional benefits. For example, GitHub may ping people that subscribe to a repository when security updates are announced in that way.
function packedToBytes27(uint256 low, uint256 high) private pure returns (bytes27){
return bytes27(uint216(low)) | (bytes27(uint216(high))<<128);
}
Whether the 103 (216/2), not 128 should be left-shifted?
Currently when trying to run npm run setup-all
, I seem to consistently hit the following error during ft-transfer
setup:
Export Verifier ft-transfer ...
Error: panicked at '�couldn't open verification.key: No such file or directory (os error 2)', zokrates_cli/src/bin.rs:477:33
note: Run with `RUST_BACKTRACE=1` for a backtrace.
at IncomingMessage.stream.on (/Users/cruzmolina/Code/nightfall/zkp/src/zokrates.js:37:16)
at IncomingMessage.emit (events.js:194:15)
at endReadableNT (_stream_readable.js:1107:12)
at process.internalTickCallback (internal/process/next_tick.js:72:19)
undefined
ft-transfer SETUP MESSAGE: EXPORT-VERIFIER COMPLETE
�cp: cannot stat '/home/zokrates/proving.key': No such file or directory
cp: cannot stat '/home/zokrates/verification.key': No such file or directory
Icp: cannot stat '/home/zokrates/verifier.sol': No such file or directory
this then triggers the key extraction error for ft-transfer
.
Will try to up docker memory resources and see if that resolves the issue. 🤞
OS: macOS High Sierra 10.13.6
Hello, a fan of the work and have been following ZKPs for most of the decade, can you post example transactions onchain for easy inspection? with a way if possible to prove the balance to support the example or what a user can expect to get out of it?
Such quick inspection would allow many of us to decide if this is something worth compiling and playing around with, or easily seeing if this is a solution for something they have in mind, especially with the specific resource requirements needed.
User could burn off "ERC20/ERC721 token commitments" and transfer generated "ERC20/ERC721 tokens" to themselves. Would be nice if there is an option of transfer to other users too.
The docker image michaelconnor/zok:2Jan2019 is unavailable for inspection and so it cannot be evaluated. Please add that Dockerfile into this project or open source it as a separate project.
Description
Now that ERC-777 has been officially rolled into OpenZeppelin 2.3 it would be interesting to begin exploring support in Nightfall, given the likely uptick in usage of the standard.
While there is backwards compatibility with ERC-20 there are also differences (such as the new send(address recipient, uint256 amount, bytes data)
function) and some new additions such as transfer hooks and operators.
we still have eslint error in database microservice
Docker version: docker version
OS & Version: Windows/Linux/OSX
Commit hash : (if develop
)
zkp-demo
shell script should be called nightfall
Rename the script to nightfall such that the start up script is run by calling ./nightfall
[backtrace]
Hi,
We run our set of private Slither detectors on the codebase, and found that Ftoken.transfer
and approve
will always return false, leading to broken interactions with third-party contracts.
Both functions return a boolean, but have no return statement. As a result, False
will be returned
nightfall/zkp/contracts/FToken.sol
Lines 171 to 173 in 9fbd1f4
nightfall/zkp/contracts/FToken.sol
Lines 191 to 193 in 9fbd1f4
Any ERC20 interaction from an external contract is likely to be impossible, as the caller will check for the correct return (see the ERC20 documentation)
Return the value returned by _approve
and _transfer
I tried to run this on windows 10; I was having issues getting docker-proxy start to run. I know there is an open issue, and @aj-may needs Windows 10 to his docker-proxy code.
@mkinney
"The docker-proxy solution does not work on Ubuntu. @aj-may is trying to see if we can use something else. Tried using dotproxy, and it almost works. All builds, but the docker instances just do not see themselves. So, when you try to create a user thru the UI, the UI errors."
If anyone has any ideas or work arounds, I am up to try them.
semaphore-protocol/semaphore#16
It's better to add the check and ensure public inputs are less than the scalar field size.
I had some issues creating an account yesterday, which I documented as a comment on issue #13. Specifically, when I tried to create a new account I received an error with message "Command failed: mongo nightfall --host=mongo -u admin -p admin script_to_configure_roles.js\n"
I now think the errors received yesterday are due to capitalization in the accountName
field on signup. I haven't yet identified the code that would verify my suspicion, but I have been able to replicate the issue by repeatedly receiving the same error when creating an account with any capitalization in the accountName
and not receiving any errors when using no capitalization in the accountName
.
If anyone else is able to replicate the issue, I'd be happy to make a note in the README so that others don't get stuck as I did. Alternatively, I can dig into the code a bit to see I can find why it doesn't seem to like capitalization.
Docker version: 2.0.0.3
OS & Version: OSX 10.15.4
Commit hash : e587d33 (master)
I would expect a user to be able to enter their full name without character restrictions, except perhaps a character limit or special character restriction, which does not seem to be implemented either.
I discovered no additional restrictions on spaces or special characters, but capitalization (in any location in the accountName
string) triggers the error described above.
This should work successfully. To trigger the error, follow those four step again but replace the fields with the following:
Note, you should be able to use whatever email and password you want. I did this a number of times over and didn't' find any character restrictions for the email, password, or password confirmation fields.
Additionally, I found that in some cases, once this error was triggered, there was no way to create an account with a valid accountName. For example, if I tried to create another account with full name as 'c', email as 'c', password and password confirmation as 'password', I would sometimes get the same error as if I submitted the form with a capitalized name. I couldn't replicate this 100% of the time, but I'm suspicious it has something to do with dotdocker because it seemed that restarting dotdocker would sometimes stop this issue of the error carrying forward to later post requests.
It's long so I have attached it here: logfile.txt
Here are some of what I think are the most important lines:
Line 960: Completed compilation and deployment
Line 960: Start account creation process with name="a", email="a", password="password", password_confirmation="password". This was successful.
Line 1122: Error on signup due to capitalization of name. Used params, name="B", email="B", password="password", password_confirmation="password".
Line 1213: This is the start of the same error, despite now using an all lowecase name, "c". Note, I do not think this has anything to do with repeated attempts because I went through a few times testing 5+ accounts in a row with all lower case names and had no issues.
fix eslint error in API-gateway microservice
Currently dot docker is required for all users. This unnecessary requires an additional installation step for every user.
Docker version: 18.09.2
OS & Version: macOS
Commit hash : 82557c8
Users can install and run Nightfall without dot docker.
Every user is required to use dot docker.
As discussed in #28 docker-proxy does not work on Ubuntu (or other Linux distros) yet.
Docker version: 18.09.6
OS & Version: Ubuntu 18.04.2 LTS
I would expect ./zkp-demo
to run successfully.
Running ./zkp-demo
on Ubuntu machine produces a backtrace (see below).
Configure Nightfall as described in setup and try to run.
ERROR: for nightfall_ganache_1 Cannot start service ganache: driver failed programming external connectivity on endpoint nightfall_ganache_1 (cd14b6eb1415a5810e60d8ec360fb1743568bcfe09f129603551609f9ad3d026): Error starting userland proxy:
ERROR: for ganache Cannot start service ganache: driver failed programming external connectivity on endpoint nightfall_ganache_1 (cd14b6eb1415a5810e60d8ec360fb1743568bcfe09f129603551609f9ad3d026): Error starting userland proxy:
ERROR: Encountered errors while bringing up the project.
Currently the individual service README.md files are very limited.
These files can be improved to include:
This would be helpful to somebody that is studying the module and hoping to submit changes. For example, I am reviewing the zkp module and am having a difficult time understanding if src/index.js
is responsible for witness generation or if that is just a debugging side effect of its responsibility to do key generation.
Currently the module have interdependencies which are not defined in the docker-compose.yml.
For example, the API-gateway will communicate with the zkp module, this is defined at https://github.com/EYBlockchain/nightfall/blob/master/API-Gateway/src/config/config.js#L9-L11
But such a dependency is not defined as a depends_on
at https://github.com/EYBlockchain/nightfall/blob/master/docker-compose.yml#L18-L27
The depends_on
can be added here and any other such cases, if any, to improve clarity.
I am getting the following error when trying to run ./zkp-demo,
anyone else run into this issue?
*** Launching containerized ganache ***
Creating network "nightfall_default" with the default driver
Creating volume "nightfall_mongo-volume" with default driver
Creating volume "nightfall_zkp-code" with local driver
Creating nightfall_ganache_1 ... error
ERROR: for nightfall_ganache_1 Cannot start service ganache: driver failed programming external connectivity on endpoint nightfall_ganache_1 (fc67274f540400c7a2deca2785d5aeb0a963309da017a80bda9ebc2e38597401): Bind for 0.0.0.0:8545 failed: port is already allocated
Within the UI, when I try and create an account, I get an account error on the UI, and the below from the docker processes. If I try and log in with the account anyway I get an Account not found error.
Thanks,
Adam
api-gateway_1 | error: POST:/createAccount
api-gateway_1 | {"error":"Command failed: mongo nightfall --host=mongo -u admin -p admin script_to_configure_roles.js\n"}
api-gateway_1 | {"body":{"name":"a","email":"a","password":"a"}}
api-gateway_1 | {"params":{}}
api-gateway_1 | {"query":{}}
api-gateway_1 |
database_1 | error: POST:/createAccount
database_1 | {"error":"Command failed: mongo nightfall --host=mongo -u admin -p admin script_to_configure_roles.js\n"}
database_1 | {"body":{"name":"a","email":"a","password":"a","address":"0xA7A6cd069DEf441977a5943d417ad6Ee259De67d","shhIdentity":""}}
database_1 | {"params":{}}
database_1 | {"query":{}}
database_1 |
database_1 | Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
database_1 | at ServerResponse.setHeader (_http_outgoing.js:482:11)
database_1 | at ServerResponse.header (/app/node_modules/express/lib/response.js:775:10)
database_1 | at ServerResponse.send (/app/node_modules/express/lib/response.js:174:12)
database_1 | at ServerResponse.json (/app/node_modules/express/lib/response.js:271:15)
database_1 | at ServerResponse.send (/app/node_modules/express/lib/response.js:162:21)
database_1 | at send (/app/src/index.js:43:28)
database_1 | at Layer.handle_error (/app/node_modules/express/lib/router/layer.js:71:5)
database_1 | at trim_prefix (/app/node_modules/express/lib/router/index.js:315:13)
database_1 | at /app/node_modules/express/lib/router/index.js:284:7
database_1 | at Function.process_params (/app/node_modules/express/lib/router/index.js:335:12)
database_1 | at next (/app/node_modules/express/lib/router/index.js:275:10)
database_1 | at /app/node_modules/express/lib/router/index.js:635:15
database_1 | at next (/app/node_modules/express/lib/router/index.js:260:14)
database_1 | at next (/app/node_modules/express/lib/router/route.js:127:14)
database_1 | at next (/app/src/routes/accounts.routes.js:293:9)
database_1 | at processTicksAndRejections (internal/process/task_queues.js:86:5)
followed the initial steps. Everything ...OK
reached:
We're ready to go! Run the demo:
./zkp-demo
it gets stuck at
going to http://nightfall.docker give not found, and going to http://localhost:80 gives an empty apache page
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.