{"action":"created","issue":{"url":"https://api.github.com/repos/iden3/snarkjs/issues/5","repository_url":"https://api.github.com/repos/iden3/snarkjs","labels_url":"https://api.github.com/repos/iden3/snarkjs/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/iden3/snarkjs/issues/5/comments","events_url":"https://api.github.com/repos/iden3/snarkjs/issues/5/events","html_url":"https://github.com/iden3/snarkjs/issues/5","id":374747096,"node_id":"MDU6SXNzdWUzNzQ3NDcwOTY=","number":5,"title":"Dead loop or taking too long to setup such circuit","user":{"login":"hellwolf","id":186660,"node_id":"MDQ6VXNlcjE4NjY2MA==","avatar_url":"https://avatars1.githubusercontent.com/u/186660?v=4","gravatar_id":"","url":"https://api.github.com/users/hellwolf","html_url":"https://github.com/hellwolf","followers_url":"https://api.github.com/users/hellwolf/followers","following_url":"https://api.github.com/users/hellwolf/following{/other_user}","gists_url":"https://api.github.com/users/hellwolf/gists{/gist_id}","starred_url":"https://api.github.com/users/hellwolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hellwolf/subscriptions","organizations_url":"https://api.github.com/users/hellwolf/orgs","repos_url":"https://api.github.com/users/hellwolf/repos","events_url":"https://api.github.com/users/hellwolf/events{/privacy}","received_events_url":"https://api.github.com/users/hellwolf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-28T12:10:37Z","updated_at":"2018-10-29T06:13:25Z","closed_at":null,"author_association":"NONE","body":"```\r\ninclude \"../../node_modules/circom/circuits/comparators.circom\";\r\ninclude \"../../node_modules/circom/circuits/sha256/sha256_2.circom\";\r\n \r\ntemplate Sha256() {\r\n    signal input value\r\n    signal output out;\r\n \r\n    component sha256_2 = Sha256_2();\r\n    sha256_2.a <-- 0;\r\n    sha256_2.b <-- value;\r\n \r\n    out <== sha256_2.out;\r\n}\r\n \r\ntemplate BankBalancesProover(nBanks) {\r\n    signal private input balances[nBanks];\r\n    signal input expectedBalanceHashes[nBanks];\r\n    signal input minimalBalanceRequirement;\r\n    signal output out;\r\n \r\n    var i;\r\n \r\n    component sha256[nBanks];\r\n    for (i = 0; i < nBanks; ++i) {\r\n        sha256[i] = Sha256();\r\n    }\r\n \r\n    component lessthan = LessThan(32);\r\n    var totalBalance = 0;\r\n    for (i = 0; i < nBanks; ++i) {\r\n        sha256[i].value <-- balances[i];\r\n        //expectedBalanceHashes[i] === sha256[i].out;\r\n        totalBalance += balances[i];\r\n    }\r\n    lessthan.in[0] <-- totalBalance;\r\n    lessthan.in[1] <-- minimalBalanceRequirement;\r\n \r\n    out <== lessthan.out;\r\n}\r\n \r\ncomponent main = BankBalancesProover(2);\r\n```\r\n\r\nCircom complication passed, but setup using snarkjs took hours and I suspect it was a deadloop..."},"comment":{"url":"https://api.github.com/repos/iden3/snarkjs/issues/comments/433798809","html_url":"https://github.com/iden3/snarkjs/issues/5#issuecomment-433798809","issue_url":"https://api.github.com/repos/iden3/snarkjs/issues/5","id":433798809,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzc5ODgwOQ==","user":{"login":"jbaylina","id":4180156,"node_id":"MDQ6VXNlcjQxODAxNTY=","avatar_url":"https://avatars0.githubusercontent.com/u/4180156?v=4","gravatar_id":"","url":"https://api.github.com/users/jbaylina","html_url":"https://github.com/jbaylina","followers_url":"https://api.github.com/users/jbaylina/followers","following_url":"https://api.github.com/users/jbaylina/following{/other_user}","gists_url":"https://api.github.com/users/jbaylina/gists{/gist_id}","starred_url":"https://api.github.com/users/jbaylina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbaylina/subscriptions","organizations_url":"https://api.github.com/users/jbaylina/orgs","repos_url":"https://api.github.com/users/jbaylina/repos","events_url":"https://api.github.com/users/jbaylina/events{/privacy}","received_events_url":"https://api.github.com/users/jbaylina/received_events","type":"User","site_admin":false},"created_at":"2018-10-29T06:13:25Z","updated_at":"2018-10-29T06:13:25Z","author_association":"MEMBER","body":"What version of Node are you using?\r\n\r\nI'm going to add a --verbose option that gives details of the progress of the calculus."}}
{"actor":{"display_login":"jbaylina"}}