Skip to content

Commit

Permalink
fix: fix relation skipping for sumcheck (#6092)
Browse files Browse the repository at this point in the history
Due to a bad merge (or something?), the relation skipping for Sumcheck
was not activated in the original PR. This fix corrects the syntax of
the skipping check which turns on the skipping for Sumcheck only (full
proof construction / decider).

Branch (ultra honk bench)
```
---------------------------------------------------------------------------------------
Benchmark                                             Time             CPU   Iterations
---------------------------------------------------------------------------------------
construct_proof_ultrahonk/sha256                    324 ms          270 ms            3
construct_proof_ultrahonk/keccak                   1235 ms         1023 ms            1
construct_proof_ultrahonk/ecdsa_verification       2402 ms         1996 ms            1
construct_proof_ultrahonk/merkle_membership         188 ms          156 ms            4
construct_proof_ultrahonk_power_of_2/15             200 ms          185 ms            4
construct_proof_ultrahonk_power_of_2/16             362 ms          335 ms            2
construct_proof_ultrahonk_power_of_2/17             684 ms          632 ms            1
construct_proof_ultrahonk_power_of_2/18            1350 ms         1248 ms            1
construct_proof_ultrahonk_power_of_2/19            2698 ms         2481 ms            1
construct_proof_ultrahonk_power_of_2/20            5176 ms         4784 ms            1
```

Master (ultra honk bench)
```
---------------------------------------------------------------------------------------
Benchmark                                             Time             CPU   Iterations
---------------------------------------------------------------------------------------
construct_proof_ultrahonk/sha256                    423 ms          395 ms            2
construct_proof_ultrahonk/keccak                   1628 ms         1515 ms            1
construct_proof_ultrahonk/ecdsa_verification       2971 ms         2764 ms            1
construct_proof_ultrahonk/merkle_membership         236 ms          218 ms            3
construct_proof_ultrahonk_power_of_2/15             248 ms          231 ms            3
construct_proof_ultrahonk_power_of_2/16             459 ms          430 ms            2
construct_proof_ultrahonk_power_of_2/17             872 ms          820 ms            1
construct_proof_ultrahonk_power_of_2/18            1773 ms         1656 ms            1
construct_proof_ultrahonk_power_of_2/19            3342 ms         3133 ms            1
construct_proof_ultrahonk_power_of_2/20            6694 ms         6289 ms            1

```

Branch (client IVC)
```
--------------------------------------------------------------------------------
Benchmark                      Time             CPU   Iterations UserCounters...
--------------------------------------------------------------------------------
ClientIVCBench/Full/6      21234 ms        16030 ms            1
function                                        ms     % sum
construct_circuits(t)                         4537    21.52%
ProverInstance(Circuit&)(t)                   1912     9.07%
ProtogalaxyProver::fold_instances(t)         11102    52.64%
Decider::construct_proof(t)                    577     2.73%
ECCVMProver(CircuitBuilder&)(t)                129     0.61%
ECCVMProver::construct_proof(t)               1765     8.37%
GoblinTranslatorProver::construct_proof(t)     930     4.41%
Goblin::merge(t)                               137     0.65%
```

Master (client IVC)
```
--------------------------------------------------------------------------------
Benchmark                      Time             CPU   Iterations UserCounters...
--------------------------------------------------------------------------------
ClientIVCBench/Full/6      21385 ms        16321 ms            1
function                                        ms     % sum
construct_circuits(t)                         4544    21.40%
ProverInstance(Circuit&)(t)                   1919     9.03%
ProtogalaxyProver::fold_instances(t)         11055    52.05%
Decider::construct_proof(t)                    728     3.43%
ECCVMProver(CircuitBuilder&)(t)                132     0.62%
ECCVMProver::construct_proof(t)               1757     8.27%
GoblinTranslatorProver::construct_proof(t)     965     4.55%
Goblin::merge(t)                               138     0.65%
```
  • Loading branch information
ledwards2225 authored Apr 29, 2024
1 parent 6065a6c commit 1449c33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ consteval std::array<size_t, NUM_SUBRELATIONS> compute_composed_subrelation_part
template <typename Relation, typename AllEntities>
concept isSkippable = requires(const AllEntities& input) {
{
Relation::is_active(input)
Relation::skip(input)
} -> std::same_as<bool>;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ template <typename Flavor> class SumcheckProverRound {
std::get<relation_idx>(univariate_accumulators), extended_edges, relation_parameters, scaling_factor);
} else {
// If so, only compute the contribution if the relation is active
if (!Relation::skip(extended_edges, relation_parameters)) {
if (!Relation::skip(extended_edges)) {
Relation::accumulate(std::get<relation_idx>(univariate_accumulators),
extended_edges,
relation_parameters,
Expand Down

0 comments on commit 1449c33

Please sign in to comment.