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

4540 commits

Author SHA1 Message Date
schaeff
ab52551a5b merge dev, fix conflicts 2023-04-14 11:27:55 +02:00
Thibaut Schaeffer
8c08164038
Build with stable rust (#1288)
make zokrates build on stable rust
2023-04-13 17:26:01 +02:00
Thibaut Schaeffer
52e45a396c
Add sourcemaps (#1285)
add sourcemaps
2023-04-13 15:33:37 +02:00
Thibaut Schaeffer
10ebd604f3
Merge pull request #1289 from Zokrates/backend-opt
Optimize backend integrations
2023-04-11 22:58:55 +02:00
dark64
36d00668e4 refactor 2023-04-11 15:05:17 +02:00
Thibaut Schaeffer
a8955092ee
Merge pull request #1287 from Turupawn/patch-2
Sudoku example fix
2023-04-11 11:05:59 +02:00
Ahmed Castro
2ba870a975
Create 1287-Turupawn 2023-04-10 20:09:01 -06:00
dark64
405b24da81 change help message 2023-04-04 19:16:10 +02:00
dark64
83835a7249 add changelog 2023-04-04 18:53:46 +02:00
dark64
2e9c66a5c1 fix integration test, update book 2023-04-04 18:46:08 +02:00
dark64
5257d309c5 Merge branch 'develop' into backend-opt 2023-03-31 12:41:44 +02:00
dark64
33466b2c89 remove csv dependency 2023-03-29 20:40:26 +02:00
dark64
3ba789e7f3 use binary format for witness 2023-03-29 20:36:34 +02:00
Thibaut Schaeffer
13d41b08a9
Merge pull request #1291 from Zokrates/deploy
Merge back 0.8.5
2023-03-29 15:16:11 +02:00
Thibaut Schaeffer
5d67cdb1d9
Merge pull request #1290 from Zokrates/rc/0.8.5
Release 0.8.5
2023-03-28 17:43:14 +02:00
Thibaut Schaeffer
3ffd642054
Merge pull request #1268 from Zokrates/optimize-zir-solver
Optimize assembly solvers
2023-03-28 15:57:26 +02:00
dark64
bd873daf1a remove into_canonical call 2023-03-28 14:49:01 +02:00
dark64
f83c26cd45 fix test 2023-03-28 14:31:10 +02:00
schaeff
16ef50fa9c bump versions, generate changelog 2023-03-28 10:45:53 +02:00
dark64
aea19eb417 parallelize witness deserialization 2023-03-27 21:18:54 +02:00
Ahmed Castro
48885d64a4
Update sudoku_checker.zok 2023-03-24 16:37:58 -06:00
Ahmed Castro
30c9d8b8b1
Update sudoku_checker.zok 2023-03-24 16:36:49 -06:00
dark64
e0b029959d rename substitutor to canonicalizer, add tests 2023-03-24 14:39:08 +01:00
dark64
e210f469ca change into_bellman impl on field, use lincomb in bellman circuit construction instead of canonical 2023-03-24 14:13:23 +01:00
Ahmed Castro
2e551b3d16
Update sudoku_checker.zok 2023-03-21 11:53:10 -06:00
dark64
95bec7be64 fix zir substitutor 2023-03-21 13:16:07 +01:00
dark64
87f356a7c6 add test 2023-03-21 00:09:37 +01:00
dark64
475744bf6e refactor 2023-03-20 20:21:23 +01:00
Ahmed Castro
f84faaae83
Sudoku example fix
**Problem**

the logic behind `countDuplicates` is invalid because it's doing this:
(incorrect)
```
if(duplicates + e11 == e21)
  duplicates = 1;
else
  duplicates = 0;
```

Instead of this:
(correct)
```
if(e11 == e21)
  duplicates = duplicates + 1;
else
  duplicates = duplicates;
```

**Solution**

I'm using an auxiliary variable to fix this

**Alternative solution**

We can also fix it with an array and a loop. But I went for the auxiliary variable for no particular reason.

```
def countDuplicates(field e11, field e12, field e21, field e22) -> u32 {
    u32[6] mut duplicates = [0,0,0,0,0,0];
    duplicates[0] = e11 == e12 ? 1 : 0;
    duplicates[1] = e11 == e21 ? 1 : 0;
    duplicates[2] = e11 == e22 ? 1 : 0;
    duplicates[3] = e12 == e21 ? 1 : 0;
    duplicates[4] = e12 == e22 ? 1 : 0;
    duplicates[5] = e21 == e22 ? 1 : 0;

    u32 mut count = 0;
    for u32 i in 0..5 {
        count = count + duplicates[i];
    }

    return count;
}
```

And btw, I also added an assert to make sure we check for this validation. I've tested this on the playground and on chain on goerli and with this changes it works correctly.
2023-03-18 20:09:28 -06:00
Thibaut Schaeffer
7f698545f6
Merge pull request #1286 from Turupawn/patch-1
Fixed small typo
2023-03-17 10:00:17 +00:00
Ahmed Castro
60ee62d309
Fixed small typo
Found a small typo while testing this.
Cheers!
2023-03-16 19:01:46 -06:00
dark64
0f31a1b42e apply suggestions (part 1) 2023-03-14 19:24:09 +01:00
dark64
cfe43e672d revert is_assignee 2023-03-06 13:53:03 +04:00
dark64
e8abfb51ea clippy 2023-03-06 13:37:12 +04:00
dark64
3ce57d93a4 optimize evaluation of lincomb 2023-03-03 18:19:24 +01:00
Thibaut Schaeffer
8ca79372df
Merge pull request #1283 from Zokrates/greedy-reducer
Refactor reducer to reduce memory usage and runtime
2023-02-28 12:02:17 +01:00
Thibaut Schaeffer
1c137ea9fc
Merge pull request #1280 from Zokrates/fix-mpc-init
Fix `radix-path` help message on `mpc init` subcommand
2023-02-28 11:43:52 +01:00
dark64
2a2370efba add changelog 2023-02-28 10:56:18 +01:00
dark64
a4fcdee481 Merge branch 'develop' into fix-mpc-init 2023-02-28 10:55:39 +01:00
dark64
779bb2bc20 add changelog 2023-02-28 02:06:01 +01:00
dark64
1ef8649150 refactor, fix tests 2023-02-28 02:04:02 +01:00
Thibaut Schaeffer
a4972670da
Merge pull request #1284 from Zokrates/fix-prettier-action
Fix prettier github action
2023-02-27 23:50:16 +01:00
schaeff
8ccf681f19 upgrade prettier action to 4.3 2023-02-27 13:47:06 +01:00
schaeff
c81cc66fd3 simplify inliner 2023-02-27 13:35:50 +01:00
schaeff
35c1a9686b error out if loops are too large 2023-02-23 11:26:57 +01:00
schaeff
ea74d512bf Merge branch 'develop' of github.com:Zokrates/ZoKrates into greedy-reducer 2023-02-22 21:54:37 +01:00
schaeff
ba7aa6044c clean 2023-02-22 21:51:58 +01:00
schaeff
156ff24306 clean inliner 2023-02-22 21:43:56 +01:00
schaeff
c01cc25c51 changelog, prettier 2023-02-22 21:35:35 +01:00
schaeff
30801c86fa make all tests pass, clean 2023-02-22 21:30:11 +01:00