wborgeaud
6f8053cc37
Forgot to exponentiate from bits in computation of subgroup_x. Saves 80 gates.
2021-07-23 08:53:00 +02:00
Daniel Lubarov
bcf524bed0
Have add_gate take a generic type instead of GateRef ( #125 )
...
* Have add_gate take a generic type instead of GateRef
There are a couple advantages
- Users writing their own gates won't need to know about the `GateRef` wrapper; it's more of an internal thing now.
- Easier access to gate methods requiring `self` -- for example, `split_le_base` can just call `gate_type.limbs()` now.
* Update comment
* Always insert
2021-07-22 23:48:03 -07:00
wborgeaud
a70e97befc
Fix merge issues
2021-07-23 08:21:55 +02:00
wborgeaud
9a1c289f8e
Merge branch 'main' into remove_acc_in_gmimc
...
# Conflicts:
# src/gadgets/arithmetic.rs
2021-07-23 08:16:23 +02:00
wborgeaud
47b9936487
PR feedback
2021-07-23 08:15:13 +02:00
wborgeaud
e87aa2c90b
Renaming
2021-07-22 16:25:47 +02:00
wborgeaud
0541956942
Remove useless clone
2021-07-22 16:22:23 +02:00
wborgeaud
1d92191227
Make exp_complement_bits take an iterator to avoid cloning.
2021-07-22 16:18:13 +02:00
wborgeaud
c729a3c235
Remove all non-bits indices in the FRI verifier
2021-07-22 16:07:07 +02:00
wborgeaud
22fcc3bc06
Pass bits around
2021-07-22 15:10:55 +02:00
wborgeaud
467485c3f0
Remove accumulator wires in GMiMCGate
2021-07-22 14:33:02 +02:00
wborgeaud
b65e792ff3
- Remove useless rotation gadgets
...
- rotate.rs -> select.rs
- Added `select()` and `select_ext`
- Optimize to use just one gate
2021-07-22 11:58:29 +02:00
wborgeaud
be2e870aee
PR feedback
2021-07-22 06:50:07 +02:00
wborgeaud
db0121d74a
Update comment
2021-07-21 20:38:23 +02:00
wborgeaud
a54a4e5830
Merge branch 'main' into avoid_rotating
2021-07-21 20:02:22 +02:00
wborgeaud
6cc871d30c
PR feedback
2021-07-21 19:23:26 +02:00
wborgeaud
59494ff8d1
Merge branch 'main' into optimize_mul_many
...
# Conflicts:
# src/gates/arithmetic.rs
2021-07-21 17:47:38 +02:00
wborgeaud
6e305f0a3e
Change {add|mul}_many and cube
2021-07-21 17:41:22 +02:00
wborgeaud
d870a36dee
{add|mul}_three_extension
2021-07-21 17:29:05 +02:00
Daniel Lubarov
eb18c7ea33
Faster witness generation ( #116 )
...
Saves ~300ms in the test. The main change is to have generators return fixed-size `Vec`s instead of `HashMap`s, which have more overhead.
2021-07-21 08:26:34 -07:00
wborgeaud
b59d497964
Modify ArithmeticExtensionGate to support 32 wires
2021-07-21 17:20:08 +02:00
wborgeaud
8642a10fde
Start of optimization
2021-07-21 15:58:15 +02:00
Daniel Lubarov
ac1872a8c8
FRI tweaks ( #111 )
...
- Call `exp_power_of_2` instead of manual squaring
- Replace `evaluations[i]` with `evals`
2021-07-20 12:49:02 -07:00
wborgeaud
925c0bcb5c
Replace rotation with exp in compute_evaluation
2021-07-20 15:25:03 +02:00
Nicholas Ward
4dc6a603a1
Merge pull request #90 from mir-protocol/insertion_gate
...
Insertion gate
2021-07-19 07:59:55 -07:00
Daniel Lubarov
35c8643681
Tiny cleanup
2021-07-18 23:31:21 -07:00
Daniel Lubarov
0a5d46bfa9
Have prove return Result ( #100 )
...
* Have `prove` return `Result`
To address that TODO.
* PR feedback
2021-07-18 23:14:48 -07:00
Daniel Lubarov
9c17a00c00
Division related changes ( #99 )
...
* Division related changes
- Simplify `div_unsafe_extension` using virtual targets
- Add methods for inversion and safe division
As a followup I'll switch some calls to safe division.
* Test safe division also
* add_virtual_extension_target
2021-07-18 23:05:57 -07:00
wborgeaud
097413479e
PR feedback
2021-07-18 10:35:42 +02:00
Nicholas Ward
6b214410f2
fixes
2021-07-15 13:57:50 -07:00
wborgeaud
fe05da6720
Clipp
2021-07-15 10:39:57 +02:00
wborgeaud
2e12ee8e82
Minor
2021-07-15 10:13:13 +02:00
wborgeaud
becd0c969e
Merge branch 'main' into more_recursive_verifier
...
# Conflicts:
# src/gadgets/insert.rs
# src/plonk_common.rs
# src/verifier.rs
2021-07-15 09:01:36 +02:00
Nicholas Ward
d3127c73d3
insertion gadget (test fails)
2021-07-14 23:54:22 -07:00
Nicholas Ward
82d08ff27c
Merge branch 'main' into insertion_gate
2021-07-14 17:31:27 -07:00
wborgeaud
c24fe65f44
Merge pull request #86 from mir-protocol/fix_z_check
...
Fix high degree `z` check by using partial products
2021-07-14 08:40:01 +02:00
wborgeaud
c3d53392c4
Problem in permutation argument
2021-07-14 08:14:00 +02:00
Nicholas Ward
0a32e0fdeb
cargo fmt
2021-07-13 16:54:04 -07:00
Nicholas Ward
2df81e15c8
switched to William's way, and len assert in test
2021-07-12 12:16:13 -07:00
Nicholas Ward
439303458d
fix
2021-07-12 11:56:53 -07:00
wborgeaud
ad24f5d4d1
Almost working recursive verifier
2021-07-12 14:25:28 +02:00
wborgeaud
805ebb1b0d
Working verifier
2021-07-08 15:13:29 +02:00
wborgeaud
1915ef9b27
Minor improvements
2021-07-02 10:58:59 +02:00
wborgeaud
525db6c461
Merge branch 'main' into fix_z_check
...
# Conflicts:
# src/circuit_builder.rs
2021-07-02 10:15:23 +02:00
Nicholas Ward
dcde599377
Merge pull request #85 from mir-protocol/efficient_insert
...
Efficient insert
2021-07-01 17:43:44 -07:00
Nicholas Ward
3d53201538
save a gate with arithmetic
2021-07-01 17:43:22 -07:00
Nicholas Ward
39b22a6cab
addressed nits
2021-07-01 12:00:56 -07:00
Nicholas Ward
efe39f2d63
fixed naming (zero --> nonzero), and other fixes
2021-07-01 11:21:33 -07:00
Daniel Lubarov
519533d4b7
Benchmark tweaks ( #83 )
...
- Configure FRI with a list of arities that's more appropriate for a 2^14 instance. The previous config resulted in a huge final polynomial.
- Log the blinding factors, and other logging tweaks.
2021-07-01 10:53:42 -07:00
Nicholas Ward
d84b9ec8cb
is_zero function
2021-07-01 10:47:13 -07:00