Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Config into ProofConfig and InitConfig #145

Merged
merged 2 commits into from
Nov 3, 2023
Merged

Conversation

poszu
Copy link
Collaborator

@poszu poszu commented Nov 3, 2023

Split the Config struct into:

  • ProofConfig that contains the configuration of POST proving,
  • InitConfig that contains the configuration of POST initializing.
    It contains new fields for min and max num_units and labels_per_unit. These are now checked when the proof is verified (required for implement certifier web service #146).

The proving process requires only ProofConfig, while verification - both.

⚠️ this is a breaking change in the C FFI.

Copy link

codecov bot commented Nov 3, 2023

Codecov Report

Merging #145 (f4026b9) into main (3cf5917) will increase coverage by 0.06%.
Report is 1 commits behind head on main.
The diff coverage is 98.73%.

@@            Coverage Diff             @@
##             main     #145      +/-   ##
==========================================
+ Coverage   94.19%   94.25%   +0.06%     
==========================================
  Files          22       22              
  Lines        2944     2978      +34     
==========================================
+ Hits         2773     2807      +34     
  Misses        171      171              
Files Coverage Δ
ffi/src/initialization.rs 90.76% <100.00%> (-0.21%) ⬇️
ffi/src/post_impl.rs 92.79% <100.00%> (+0.45%) ⬆️
service/src/service.rs 92.30% <100.00%> (+0.20%) ⬆️
src/difficulty.rs 100.00% <100.00%> (ø)
src/prove.rs 98.20% <100.00%> (-0.02%) ⬇️
src/config.rs 82.35% <0.00%> (-5.15%) ⬇️
src/verification.rs 96.86% <98.78%> (+0.14%) ⬆️

@poszu poszu force-pushed the refactor-post-config branch from 0ec52c1 to f4026b9 Compare November 3, 2023 13:44
@poszu poszu merged commit 7d5b235 into main Nov 3, 2023
18 checks passed
@poszu poszu deleted the refactor-post-config branch November 3, 2023 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants