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 replica update sector info to new method #1376

Merged
merged 3 commits into from
Aug 17, 2023

Conversation

anorth
Copy link
Member

@anorth anorth commented Aug 17, 2023

Intended as a pure refactor. This doesn't get all of the re-usable code out, but a big step.

@codecov-commenter
Copy link

Codecov Report

Merging #1376 (e723fa3) into master (698d2e3) will increase coverage by 0.19%.
The diff coverage is 85.23%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1376      +/-   ##
==========================================
+ Coverage   90.80%   91.00%   +0.19%     
==========================================
  Files         145      145              
  Lines       27402    27372      -30     
==========================================
+ Hits        24883    24909      +26     
+ Misses       2519     2463      -56     
Files Changed Coverage Δ
actors/miner/src/deadline_state.rs 84.67% <62.50%> (-0.06%) ⬇️
actors/miner/src/state.rs 81.02% <71.42%> (+0.04%) ⬆️
actors/miner/src/lib.rs 84.56% <86.53%> (+1.36%) ⬆️
actors/miner/src/deadlines.rs 100.00% <100.00%> (ø)
actors/miner/src/testing.rs 92.88% <100.00%> (+0.96%) ⬆️
integration_tests/src/util/mod.rs 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes

actors/miner/src/lib.rs Outdated Show resolved Hide resolved
actors/miner/src/lib.rs Show resolved Hide resolved
actors/miner/src/lib.rs Show resolved Hide resolved
actors/miner/src/lib.rs Show resolved Hide resolved
@anorth anorth requested a review from ZenGround0 August 17, 2023 19:17
continue;
}

if update.replica_proof.len() > 4096 {
Copy link
Contributor

Choose a reason for hiding this comment

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

This might be a good opportunity to make this magic number a constant somewhere

Copy link
Contributor

Choose a reason for hiding this comment

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

(not worth blocking Im planning to merge once tests pass)

.context_code(ExitCode::USR_ILLEGAL_STATE, "couldn't load update proof type")?;
if update.update_proof_type != expected_proof_type {
info!("unsupported update proof type {}", i64::from(update.update_proof_type));
continue;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: For a future where this is called by a snark pack aggregate super snap method -- Im suspicious we might want to just fail the whole thing early here. Don't think you need to do anything in this PR.

actors/miner/src/lib.rs Show resolved Hide resolved
@ZenGround0 ZenGround0 enabled auto-merge August 17, 2023 19:41
@ZenGround0 ZenGround0 added this pull request to the merge queue Aug 17, 2023
Merged via the queue into master with commit 9f56b09 Aug 17, 2023
@ZenGround0 ZenGround0 deleted the anorth/pru-refactor branch August 17, 2023 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

3 participants