1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00
Commit graph

684 commits

Author SHA1 Message Date
schaeff
f596e7c4d8 unify embeds 2019-07-03 14:47:43 +02:00
Stefan
89d74f085d
Merge pull request #404 from Zokrates/optimize-zero-quadratic-comb
Optimize zero quadratic combinations
2019-07-03 10:20:12 +02:00
schaeff
97b4b5bb13 introduce FlatEmbed, remove flat_resolver, make sure calls to FlatEmbed are resolved in flattening, make flattening inlining stricter 2019-07-03 00:19:06 +02:00
schaeff
a1564d05bd remove corelib 2019-07-01 21:04:43 +02:00
schaeff
003bc5ef7a remove core lib, reimplement if_else manually in flattening 2019-07-01 20:25:13 +02:00
schaeff
9e14f28ff4 add flat resolving 2019-07-01 19:17:54 +02:00
Paul E
e0510d0518 moved contract nesting to another folder due to test error and changed build step 2019-06-29 16:25:47 +02:00
Paul E
ae7ee29a5b added contract tests to integration_test circleci job 2019-06-29 15:22:21 +02:00
Paul E
a12201060e testing integration test integration 2019-06-29 14:44:05 +02:00
Paul E
fc60aa97e8 Implements abiv2 into cli and core 2019-06-28 14:04:52 +02:00
schaeff
b20174b78b implement double and add, or square-and-multiply 2019-06-26 00:03:19 +02:00
schaeff
3c093fbcad Merge branch 'duplicate-optimizer' of github.com:Zokrates/ZoKrates into generalize-arrays 2019-06-25 18:53:38 +02:00
schaeff
011ae45367 Merge branch 'develop' of github.com:Zokrates/ZoKrates into duplicate-optimizer 2019-06-25 18:50:28 +02:00
schaeff
ecac773432 implement deduplication 2019-06-25 18:23:07 +02:00
schaeff
3ba608ccce create optimizer structure 2019-06-25 15:39:00 +02:00
schaeff
efc46e7cea make tests pass 2019-06-25 15:15:05 +02:00
schaeff
25d2dffbec bump versions 2019-06-23 12:09:15 +02:00
schaeff
64dc3d0db1 only show identifier name, show variable name in undefined message 2019-06-22 22:05:39 +02:00
schaeff
c7c20c4342 Merge branch 'optimize-zero-quadratic-comb' into generalize-arrays 2019-06-22 19:23:05 +02:00
schaeff
c6ba6e7bb5 zero is a lincomb 2019-06-22 17:33:57 +02:00
schaeff
17f9473c51 make arrays generic over types. wip 2019-06-22 17:24:18 +02:00
schaeff
dfabfa06ef Merge branch 'add-boolean-propagation' of github.com:Zokrates/ZoKrates into generalize-arrays 2019-06-22 14:20:28 +02:00
schaeff
8b431f0b23 Merge branch 'add-boolean-constants' of github.com:Zokrates/ZoKrates into generalize-arrays 2019-06-22 14:20:18 +02:00
schaeff
c4b6bd2b8b test boolean constant 2019-06-22 14:14:32 +02:00
schaeff
9fcaaadc66 fix comment 2019-06-22 14:11:43 +02:00
schaeff
1a1005cf94 add tests 2019-06-22 13:09:29 +02:00
schaeff
afc1d85247 add boolean propagation 2019-06-22 11:31:49 +02:00
schaeff
513d4276cf add boolean constraints true and false to grammar, pest ast, and untyped ast 2019-06-22 01:00:16 +02:00
schaeff
be375073d1 generalize arrays. wip, basic boolean array mvp 2019-06-22 00:30:33 +02:00
Mustafa Al-Bassam
4a802a8d40 remove pure from G2 addition function header 2019-06-19 18:16:47 +01:00
Mustafa Al-Bassam
0461635ced Update G2 Solidity library to 42230d81dc401911c3e152d432c27f51a514098f 2019-06-19 17:43:45 +01:00
schaeff
30d9efd793 remove print 2019-06-16 23:17:25 +02:00
schaeff
d7a37b6b5f bump versions 2019-06-16 23:15:42 +02:00
schaeff
0c24dff9cd merge spread 2019-06-16 21:17:29 +02:00
schaeff
e7142cfb90 merge dev 2019-06-16 21:00:47 +02:00
schaeff
3d06ee1d5c implement read-only array slices 2019-06-16 09:45:53 +02:00
schaeff
22fd4f8b5c implement spread operator inside inline arrays 2019-06-15 00:42:14 +02:00
schaeff
ec4d3a4a87 change unimplemented to unreachable 2019-06-14 18:28:37 +02:00
schaeff
31b4196d61 add array initializer sugar 2019-06-14 18:25:14 +02:00
schaeff
fb3b4eb369 bump versions 2019-06-13 18:18:05 +02:00
Thibaut Schaeffer
9fb6d3fef6
Merge pull request #378 from Zokrates/merge-046-back
Merge 0.4.6 back
2019-06-12 22:44:57 +02:00
schaeff
0f40498ba9 reset cargo.lock 2019-06-12 20:08:32 +02:00
schaeff
2c8370138e clean 2019-06-12 20:03:11 +02:00
schaeff
3b740baee6 remove logs 2019-06-12 17:49:22 +02:00
schaeff
bbfc9ccb26 remove from_flat assert, cache flat_fun in flatten 2019-06-12 17:38:47 +02:00
schaeff
e655b99dcc remove linear check 2019-06-12 16:03:28 +02:00
schaeff
934bf0905c solve inliner conflicts, fix tests 2019-06-12 13:58:12 +02:00
schaeff
9144bc2574 enable imports with arena 2019-06-11 18:55:07 +02:00
schaeff
cdf394c7e1 solve conflicts except compile loop 2019-06-11 11:12:37 +02:00
schaeff
0a15168b01 remove println 2019-06-07 15:55:24 +02:00
schaeff
3bfc547f32 revert change 2019-06-07 14:45:55 +02:00
schaeff
3e410f84ee add use_parameter for functions in flattening to add boolean constraints 2019-06-07 14:30:23 +02:00
schaeff
ba9d59d18d clean 2019-06-06 19:38:26 +02:00
schaeff
addf79f20e adapt inliner, remove String from function name, add stack to typed identifier 2019-06-06 19:06:16 +02:00
schaeff
2a7b33f8c1 fix tests 2019-06-06 17:25:06 +02:00
schaeff
ed29fad8da add corelib, update use_sym to not register to the memory layout 2019-06-06 14:31:54 +02:00
schaeff
c4dec182d0 implement array flattening, remove bimap 2019-06-06 14:12:56 +02:00
schaeff
8ba7611aa0 make typed ast string free. wip 2019-06-05 21:38:16 +02:00
schaeff
9340825c17 remove from impl for assignee 2019-06-04 15:44:42 +02:00
schaeff
6877f1a589 remove strings from absy and replace with references to the input source 2019-06-04 15:42:17 +02:00
schaeff
5f040f484e improve error messages in from_ast 2019-06-03 17:55:54 +02:00
schaeff
bf79194888 improve ast conversion error messages 2019-06-03 17:42:34 +02:00
schaeff
1bd3658372 pass span, information to ast 2019-06-03 17:16:19 +02:00
schaeff
361f9cbc63 merge dev 2019-06-03 16:21:13 +02:00
schaeff
2da3878093 fix imports 2019-06-03 15:57:16 +02:00
schaeff
28787cc42d fix warnings 2019-06-03 10:43:16 +02:00
schaeff
365d03be65 bring pest parser and AST into tree as crates, adjust testing 2019-06-03 10:22:59 +02:00
schaeff
20e12c10ea merge dev 2019-05-30 10:02:32 +02:00
schaeff
c06ca06cb7 register functionsymbol sourcemap 2019-05-29 19:37:58 +02:00
schaeff
a946299c71 adapt flatten tests 2019-05-28 14:51:50 +02:00
schaeff
39685271d9 improve inliner 2019-05-28 11:55:39 +02:00
schaeff
41a1b4d675 remove print 2019-05-27 11:19:19 +02:00
schaeff
645ea26dc2 use flattener technique for inliner 2019-05-24 13:19:08 +02:00
schaeff
7ebd8b9aad implement inliner.wip 2019-05-23 19:32:34 +02:00
schaeff
4c5b9d5376 implement inliner.wip 2019-05-23 19:32:28 +02:00
Paul E
2f37ee62bf fixes issue #347 2019-05-22 11:14:22 +02:00
schaeff
25bdb65d20 inliner wip 2019-05-21 21:50:43 +02:00
schaeff
b795feb7aa fix positions in imports, fix flatten test 2019-05-21 15:57:46 +02:00
schaeff
68dcaa1b15 remove imported functions, remove functions_flattened from flattening, move corelib to static analyser step, clean 2019-05-21 15:30:44 +02:00
schaeff
50befe7804 remove diplay from typedfunctionsymbol, implement on module directly 2019-05-21 12:45:08 +02:00
schaeff
a7995b26dc use FunctionKey for flattening 2019-05-21 12:26:21 +02:00
schaeff
04b95e6b36 define FunctionImport as ast node, remove FunctionSymbol node 2019-05-21 11:55:21 +02:00
schaeff
5fa5bd7b78 introduce FunctionDeclaration to help with function symbol checking 2019-05-20 18:17:57 +02:00
schaeff
48b0a0f4cf implement display for FunctionSymbol 2019-05-20 16:25:50 +02:00
schaeff
fe54a62d27 remove dead code optimizer and inliner as they explore the call graph not the dependency graph, implement display for typed prog 2019-05-20 16:18:21 +02:00
schaeff
f663ddfb8e adapt semantics tests 2019-05-20 15:49:37 +02:00
schaeff
624b113352 implement module map instead of rc 2019-05-17 20:57:33 +02:00
schaeff
e978cf07f7 implement external functions in typed absy 2019-05-15 15:04:52 +02:00
schaeff
a5df1febff change compile to not flatten, update semantic checker 2019-05-15 11:12:11 +02:00
schaeff
e50364063a complete switch to hashmap 2019-05-14 13:41:33 +02:00
schaeff
ba0a740b73 use hashmap for typed ast functions. WIP 2019-05-13 23:09:02 +02:00
schaeff
c6219be41d process external functions in semantics 2019-05-13 20:59:54 +02:00
schaeff
801c63384d fix typo in proof serialization... 🤦 2019-05-10 16:04:25 +02:00
schaeff
372c48a57d bump version 2019-05-10 11:23:15 +02:00
schaeff
1c550c7c80 revert regex version change 2019-05-09 17:46:49 +02:00
schaeff
20790b72ff switch to regex for parsing 2019-05-09 17:45:41 +02:00
schaeff
5f83bc86e7 introduce FunctionSymbol and adapt local functions 2019-05-08 17:42:32 +02:00
schaeff
da3ef6ae63 merge dev 2019-05-07 14:53:13 +02:00
schaeff
3335ad599a use canonical representation in backend 2019-05-07 12:20:31 +02:00
schaeff
f8d63e3a38 rename prog to module in absy 2019-04-23 17:56:19 +02:00
schaeff
04873068af Merge branch 'develop' of github.com:ZoKrates/ZoKrates into rc/0.4.5 2019-04-18 18:30:31 +02:00
schaeff
fd73d5f572 use extend instead of chain 2019-04-18 17:54:08 +02:00
schaeff
f7385fd4e7 bump versions 2019-04-18 15:59:50 +02:00
schaeff
fbabd00b12 fix borken wraning link 2019-04-18 15:55:13 +02:00
Thibaut Schaeffer
726c4994a8
Merge pull request #322 from eupn/cs-variables-vec
Replace BTree with Vec in LinComb
2019-04-18 14:32:45 +02:00
schaeff
b87e6966d5 change try_summand to cover non-canonical representations 2019-04-18 12:24:35 +02:00
schaeff
30c2447cfa revert optimizer change and instead redefine equality of lincomb 2019-04-18 10:44:57 +02:00
Eugene P
8723d750f4 Remove unnecessary .map 2019-04-16 21:35:23 +03:00
Eugene P
3c37f7befe Fix redefinition optimizer by forcing to operate on canonical LinComb 2019-04-16 21:33:49 +03:00
Eugene P
01c4d1816a rustfmt 2019-04-16 12:24:07 +03:00
Eugene P
e3f5cf047d Implement Add/Sub and CanonicalLinComb 2019-04-16 12:12:51 +03:00
schaeff
d06f03d5f0 upgrade core to 2018 2019-04-16 10:11:19 +02:00
Eugene P
dacf63c1e9 Simplify lincomb addition as concatenation 2019-04-15 12:02:29 +03:00
Eugene P
2e8aaa6993 Change return type from (&_, &_) to &(_, _) for lincomb try_summand 2019-04-15 11:52:05 +03:00
Eugene P
7103cd51f9 Replace BTree with Vec in LinComb 2019-04-15 00:03:37 +03:00
schaeff
84c28c421b bump versions 2019-04-11 23:33:52 +02:00
schaeff
ed252ad5f0 clean, change signature to take arrays and return array 2019-04-10 15:51:05 +02:00
schaeff
0aad524ab2 Merge branch 'develop' of github.com:JacobEberhardt/ZoKrates into bellman-sha256 2019-04-09 15:53:39 +02:00
schaeff
b2c2d013cc make wasm and libsnark deps optional 2019-04-09 15:24:38 +02:00
schaeff
157651d864 Merge branch 'develop' of github.com:JacobEberhardt/ZoKrates into bellman-sha256 2019-04-09 14:50:32 +02:00
schaeff
d8284dac19 solve conflict 2019-04-09 14:33:04 +02:00
schaeff
fa3f72f6b7 merge develop 2019-04-08 22:37:18 +02:00
schaeff
1c4881e947 remove should_panic 2019-04-08 16:37:42 +02:00
schaeff
bd057ed68a fix libsnark test 2019-04-08 16:31:09 +02:00
schaeff
82b8c6191f fix g16 test 2019-04-08 16:25:58 +02:00
schaeff
0107ba1c8e fix standard 2019-04-08 15:56:42 +02:00
schaeff
0be493fdd1 fix following review: extract witness with write read, rename scheme to proving scheme, typos 2019-04-08 14:56:07 +02:00
schaeff
5728ecdb25 clean 2019-04-03 12:52:35 +02:00
schaeff
848ec1d5e5 fix merge conflicts 2019-04-03 12:19:05 +02:00
schaeff
5b4da4c91c remove xor, remove field dep, clean 2019-04-02 14:24:33 +02:00
schaeff
9ad0040dec finish removing libsnark 2019-04-01 20:10:41 +02:00
schaeff
f8fa3efccf implement sha256 on bellman, remove libsnark version 2019-04-01 19:59:43 +02:00
schaeff
88c755ff79 fix signature and visibility 2019-03-21 22:58:22 +01:00
schaeff
2980d8da02 implement unary operators, currently only '!' 2019-03-21 21:38:58 +01:00
schaeff
e999ba6a3f add imports 2019-03-21 01:00:40 +01:00
schaeff
f1b0461f1c use gh pest-ast 2019-03-21 00:09:48 +01:00
schaeff
19c8a5101c remove print 2019-03-21 00:06:49 +01:00
schaeff
3f71b24172 add all translation cases, remove old parser 2019-03-21 00:02:18 +01:00
schaeff
aab1ab80e9 integrate with pest parser. WIP 2019-03-19 12:11:19 +01:00
schaeff
333adeb3ed merge develop 2019-03-18 12:20:41 +01:00
schaeff
156fd917e0 fix conflict 2019-03-15 17:33:23 +01:00
schaeff
66209ccc26 fix conflict 2019-03-15 17:09:49 +01:00
schaeff
e3c64d004c fix conflict 2019-03-15 16:54:42 +01:00
schaeff
ec1fdbb6e7 fix conflict 2019-03-15 16:41:27 +01:00
schaeff
3cbf59d3d1 fix conflict 2019-03-15 16:38:25 +01:00
schaeff
5654fc61a3 replace with no loop solution 2019-03-15 16:35:04 +01:00
schaeff
ff7f479bc0 replace with no loop solution 2019-03-15 16:34:51 +01:00
schaeff
eed27dd1ec remove arguments_flattened where possible 2019-03-15 16:03:54 +01:00
schaeff
bbb709c166 stop exposing flattening functions 2019-03-15 15:38:24 +01:00
schaeff
afeeafbaee use static method call to flattener to avoid reuse 2019-03-15 15:31:01 +01:00
schaeff
951bff8fc5 remove bits from flattener struct 2019-03-15 15:25:36 +01:00
schaeff
4a68e45733 simplify substitutions 2019-03-15 14:58:30 +01:00
schaeff
19c8b1c183 remove substitution too 2019-03-15 12:50:18 +01:00
schaeff
f2a89f9d41 remove variable map 2019-03-14 18:53:01 +01:00
schaeff
39db4fdfa7 fix breaking bellman deps by providing explicit version numbers 2019-03-06 12:48:51 +01:00
schaeff
e727c712cc Merge branch 'develop' of github.com:JacobEberhardt/ZoKrates into bellman-backend-v2 2019-03-06 10:17:46 +01:00
schaeff
5fee2779a5 solidity uint256 cast 2019-03-06 10:17:39 +01:00
schaeff
922946bdb3 add preprocessing to cast hex values to uint256, always produce 64 bytes from setup 2019-03-05 19:51:23 +01:00
Thibaut Schaeffer
d118a935fb
Merge branch 'develop' into ir-optimiser 2019-03-04 16:53:45 +01:00
schaeff
4400e2b876 fix suggestions 2019-03-04 13:28:11 +01:00
sdeml
10a2b59f9d add tests for split 2019-03-03 08:14:36 +01:00
schaeff
db9ce5ab9c avoid cloning 2019-02-28 18:44:32 +01:00
schaeff
9e1416e97c Merge branch 'develop' of github.com:JacobEberhardt/ZoKrates into ir-optimiser 2019-02-28 18:18:38 +01:00
schaeff
c77a4acddd make generic over T 2019-02-28 17:32:11 +01:00
schaeff
550b078656 remove unpack, only split to the field size, move 128 pack and unpack to stdlib 2019-02-28 17:27:20 +01:00
schaeff
799f528481 make contracts solidity 0.5 compatible 2019-02-28 16:10:27 +01:00
schaeff
c5c9ed0662 update contracts to 0.5, add solcjs test on verifier in integration 2019-02-28 13:25:51 +01:00
schaeff
e07442d26b add groth16 warning to docs 2019-02-27 21:38:06 +01:00
schaeff
31afcae565 fix vk serialization 2019-02-27 21:23:19 +01:00
schaeff
6b33260d73 clean 2019-02-21 19:49:29 +01:00
schaeff
ba51910b7a fix cli and cli tests 2019-02-21 19:37:27 +01:00
schaeff
8429c1a565 fix tests 2019-02-21 18:45:12 +01:00
schaeff
d374d2843f move r1cs_program to libsnark module, fix order of public inputs bug for verification, automate bellman variable assignement 2019-02-21 17:00:17 +01:00
schaeff
172e1be1d2 use csv for witness serialization, clean libsnark, rename backends to schemes 2019-02-21 10:28:23 +01:00
schaeff
ef53c57769 add verification contract for g16, reorganise backend utils, add warning 2019-02-19 14:58:19 +01:00
schaeff
f2d958c701 clean, return hex in JSON 2019-02-19 13:11:48 +01:00
schaeff
37e2efe01c Merge branch 'develop' of github.com:JacobEberhardt/ZoKrates into ir-optimiser 2019-02-15 12:01:15 +01:00
schaeff
a856e138af serialize proof to JSON. hacky. 2019-02-15 11:59:07 +01:00
schaeff
b0e8b9d042 integrate with backend api, activate with --backend g16 2019-02-15 11:41:35 +01:00
schaeff
9ad9e52de1 fix integration tests 2019-02-14 21:56:24 +01:00
schaeff
4cf22faef3 move metadata to struct, move r1cs_program inside backend, simplify API 2019-02-13 18:21:01 +01:00
JacobEberhardt
1d766ad52b
Merge pull request #255 from Zokrates/return-variables-in-ir
Return variables in ZIR functions
2019-02-12 13:46:26 +01:00
Thibaut Schaeffer
f2a7101500
Merge pull request #270 from Zokrates/master
Merge back master after patch
2019-02-11 18:23:58 +01:00
schaeff
f998a087ce merge develop 2019-02-11 17:22:29 +01:00
schaeff
a04440495d remove print 2019-02-11 16:33:14 +01:00
schaeff
8e64cc68b1 remove call to unimplemented cast 2019-02-11 16:20:47 +01:00
schaeff
6ecc2c9885 patch unconstrained cast 2019-02-11 16:15:43 +01:00
schaeff
678c046ad0 Merge branch 'develop' of github.com:JacobEberhardt/ZoKrates into ir-optimiser 2019-02-11 10:53:56 +01:00
schaeff
b00fc6365a Merge branch 'develop' of github.com:JacobEberhardt/ZoKrates into return-variables-in-ir 2019-02-08 18:16:59 +01:00
schaeff
781b7c3a0d Merge branch 'develop' of github.com:JacobEberhardt/ZoKrates into move-libsnark-fetch-to-build 2019-02-08 18:15:38 +01:00
Guillaume Ballet
6cb407837d fix loop counter persistence bug in identity WASM 2019-02-08 16:04:56 +01:00
schaeff
31149cdff0 remove tempdir 2019-02-07 18:25:20 +01:00
schaeff
50ae73aeb2 remove tempdir 2019-02-07 17:46:30 +01:00
schaeff
826168240b move libsnark fetch to build 2019-02-07 17:22:28 +01:00
schaeff
2134873031 fix from_flat to accept functions which return quadratic combs 2019-02-06 17:32:28 +01:00
schaeff
6597ec511f fix wrong try_linear, fix comment 2019-02-06 17:16:04 +01:00
schaeff
87ddcdcc55 use variable as function output, avoid substituting outputs 2019-02-06 14:51:13 +01:00
schaeff
57192ea98a change to always return variables 2019-02-06 12:25:41 +01:00
schaeff
8bf0d72725 bump versions 2019-02-06 11:24:03 +01:00
schaeff
803c4c8906 remove counter, fix test 2019-02-05 16:32:03 +01:00