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

[saffron] add commitment type shared between user and provider #3005

Merged
merged 6 commits into from
Feb 9, 2025

Conversation

martyall
Copy link
Contributor

@martyall martyall commented Feb 7, 2025

Summary

The user and storage provider need to communicate about a common commitment type. When working on #3004 I realized that the user will also need to persist these commitments in order to apply updates to them when updating their data. It makes #3004 cleaner if I do this first

Changes

@martyall martyall marked this pull request as ready for review February 7, 2025 07:23
Copy link

codecov bot commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 39.65517% with 35 lines in your changes missing coverage. Please review.

Project coverage is 76.80%. Comparing base (27404af) to head (505b3b7).
Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
saffron/src/main.rs 0.00% 34 Missing ⚠️
saffron/src/cli.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3005      +/-   ##
==========================================
- Coverage   76.80%   76.80%   -0.01%     
==========================================
  Files         261      261              
  Lines       61882    61888       +6     
==========================================
  Hits        47530    47530              
- Misses      14352    14358       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -11,6 +11,7 @@ SRS_ARG=""
if [ $# -eq 2 ]; then
SRS_ARG="--srs-filepath $2"
fi
COMMITMENT_FILE="${INPUT_FILE%.*}_commitment.bin"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment that here.

@@ -11,6 +11,7 @@ SRS_ARG=""
if [ $# -eq 2 ]; then
SRS_ARG="--srs-filepath $2"
fi
COMMITMENT_FILE="${INPUT_FILE%.*}_commitment.bin"
ENCODED_FILE="${INPUT_FILE%.*}.bin"
DECODED_FILE="${INPUT_FILE%.*}-decoded${INPUT_FILE##*.}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment than here.

COMMITMENT=$(cargo run --release --bin saffron compute-commitment -i "$INPUT_FILE" $SRS_ARG | tee /dev/stderr | tail -n 1)


COMMITMENT=$(cargo run --release --bin saffron compute-commitment -i "$INPUT_FILE" -o "$COMMITMENT_FILE" $SRS_ARG | tee /dev/stderr | tail -n 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why tee /dev/stderr?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so that we can capture the final output of the command in the COMMITMENT variable as well as display the logs that it generates in the console while it is running

Copy link
Member

@dannywillems dannywillems left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dannywillems dannywillems merged commit 3ae4516 into master Feb 9, 2025
12 of 13 checks passed
@dannywillems dannywillems deleted the martin/saffron-commitment-type branch February 9, 2025 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants