1
0
Fork 0
mirror of synced 2025-09-23 04:08:33 +00:00
Commit graph

984 commits

Author SHA1 Message Date
schaeff
210285a07d bump versions, generate changelog 2023-04-13 17:37:10 +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
dark64
405b24da81 change help message 2023-04-04 19:16:10 +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
3ba789e7f3 use binary format for witness 2023-03-29 20:36:34 +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
Ahmed Castro
2e551b3d16
Update sudoku_checker.zok 2023-03-21 11:53:10 -06: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
Ahmed Castro
60ee62d309
Fixed small typo
Found a small typo while testing this.
Cheers!
2023-03-16 19:01:46 -06:00
dark64
99f145566f fix mpc init message 2023-02-20 19:24:16 +01:00
dark64
aca048eda5 fmt 2023-02-06 20:07:58 +01:00
dark64
c77e7ae5c3 show help when running "zokrates mpc" 2023-02-06 20:06:35 +01:00
schaeff
9e56e912bd bump versions, update changelog 2023-01-31 12:43:19 +01:00
dark64
37694af016 fix conflicts 2023-01-30 18:54:10 +01:00
Thibaut Schaeffer
3e40945778
Use foundry for integration tests (#1266)
* remove zokrates_solidity_test, use foundry for integration tests

* fix foundry install

* fix foundry install

* use full path for forge

* wip

* wip

* wip

* test

* test

* test

* test

* test

* add message if foundry is missing, add changelog

* move install script to ci config

* Apply suggestions from code review

---------

Co-authored-by: Thibaut <thibaut@Thibauts-MacBook-Pro.local>
2023-01-30 17:50:20 +01:00
dark64
a76e14c00b Merge branch 'develop' into ark-parallel 2023-01-30 16:09:25 +01:00
dark64
d273bb5958 update book, merge develop and merge conflicts 2023-01-30 15:27:17 +01:00
dark64
86164bd190 update features on dependencies 2023-01-23 19:53:18 +01:00
Dimitris Apostolou
28ac40923c
Fix typos 2023-01-11 03:14:28 +02:00
dark64
8d9e8899c1 merge develop, fix conflicts 2023-01-02 14:26:22 +01:00
dark64
43cb632c4a move rng function to proof systems crate 2022-12-27 19:11:44 +01:00
dark64
ed9a0b5440 clippy 2022-12-13 14:42:55 +01:00
dark64
4ac95c7559 add changelog, update zokrates-js 2022-12-13 14:41:56 +01:00
dark64
655a54cf37 fix tests 2022-12-12 18:28:46 +01:00
dark64
0cdcedd9de allow user-provided randomness in setup 2022-12-12 16:28:16 +01:00
dark64
e95cef8e90 validate expressions, add more tests 2022-12-01 21:07:42 +01:00
dark64
fbfc20c4e6 improvements 2 2022-11-28 20:25:05 +01:00
dark64
8d7e5804df improvements 2022-11-25 17:54:21 +01:00
dark64
dc68ac40b6 merge develop, fix conflicts 2022-11-22 20:34:44 +01:00
dark64
fd361d68f3 more tests 2022-11-22 20:32:49 +01:00
dark64
c61a481e0b merge develop 2022-11-17 14:38:12 +01:00
dark64
113ada3638 bitwise op on field 2022-10-31 20:55:31 +01:00
dark64
608a7c41d2 fix tests 2022-10-18 13:43:29 +02:00
schaeff
485be58a78 wip 2022-10-11 09:24:28 -05:00
dark64
9ca495eb71 update changelog, bump versions 2022-10-10 18:00:35 +02:00
dark64
c869649745 wip 2022-10-05 15:27:45 +02:00
Thibaut Schaeffer
9e7f01ca2c
Merge pull request #1224 from Zokrates/private-parameter-check
Disallow the use of the private keyword on non-entrypoint functions
2022-09-22 12:20:14 +02:00
dark64
e48afb678c add test for public, update changelog 2022-09-21 14:54:37 +02:00
dark64
4d09fe1c19 disallow the use of the private keyword on non-entry point functions 2022-09-06 12:55:40 +02:00
schaeff
3e6c0146fa bump versions, generate changelog 2022-09-05 14:14:28 +02:00
Thibaut Schaeffer
f86172f6a6
Merge pull request #1206 from Zokrates/dead-code-elimination
Introduce dead code elimination
2022-09-01 15:59:38 +02:00
schaeff
40f6fe277f merge dev 2022-08-30 18:07:13 +02:00