Skip to content

Conversation

BrendanChou
Copy link
Collaborator

Fixes #1148

@BrendanChou BrendanChou changed the title [Minimmit] Fix typos/misprints [pipeline/minimmit] Fix typos/misprints Jun 24, 2025
@dnkolegov-ar
Copy link
Collaborator

Added #1153

// Select the leader for view `v`
fn leader(v) -> L;
// Select the leader replica for view `v`
fn leader(v) -> r;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
fn leader(v) -> r;
fn leader(v) -> R;

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

upper-case R is not mentioned anywhere anymore, any reason this can't be any arbitrary variable? r seems most appropriate

Copy link
Collaborator

@dnkolegov-ar dnkolegov-ar Jun 26, 2025

Choose a reason for hiding this comment

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

It was in my PR - https://github.com/commonwarexyz/monorepo/pull/1153/files#diff-a6e0dc9f9fb285ab77cad5cacecb0427485dc55b7372dcb8927b59fa32476fbdR9

There is a set `R` of `n` replicas of which at most `f` are Byzantine, such that `n ≥ 5f + 1`

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah I ended up deleting that part since it was used ONLY here and I didn't feel it clarified for the cost of introducing another "variable"

Copy link
Collaborator

Choose a reason for hiding this comment

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

fn leader(v) -> r and, for example, fn select_parent(r, v) and many other statements with r as an element should not be used together, since then the meaning of -> and r is then misleading

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I understand the frustration with the inconsistency between using variable r as the return "value" and bool elsewhere as what appears to be the return "type". I think that we may choose to fix that later. I'm sure there are several places in the writeup where we are not using "proper" notation.

Despite that, I personally still feel that this is currently the clearest version that we can get to with reasonably minimal changes. I don't feel that this should confuse people

Choose a reason for hiding this comment

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

Ok

Comment on lines +70 to +71
if notarization(c', i) ∈ r.proofs[i] {
return (c', i); // If there are multiple, pick any
Copy link
Collaborator Author

@BrendanChou BrendanChou Jun 26, 2025

Choose a reason for hiding this comment

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

This whole function remains one of the most awkward... but I think something closer to the original version remains the clearest (and has parallel structure to the below line if nullification(i) ∈ r.proofs[i] {).

Lastly there was kind of a bug before where genesis had an unspecified view, then had a view of 0. Rather than changing the rest of the spec to start at view 1, I simply said above genesis has a view of ⊥ < 0

return (⊥, ⊥); // No proofs for view i, cannot proceed
}
return genesis;
return (genesis, ⊥);
Copy link
Contributor

Choose a reason for hiding this comment

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

In our code, we start at 1 to avoid this ⊥ notation for genesis (which we consider view 0). Wonder if it makes to do the same here?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this requires more debate and will leave as-is for now (for future consideration).

@patrick-ogrady
Copy link
Contributor

Will fix last round of nits and merge.

@patrick-ogrady patrick-ogrady merged commit 3a2774e into main Jun 26, 2025
16 checks passed
@patrick-ogrady patrick-ogrady deleted the bc/1148 branch June 26, 2025 21:06
Copy link

codecov bot commented Jun 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.02%. Comparing base (09e3d1b) to head (68fbe42).
Report is 1 commits behind head on main.

@@           Coverage Diff           @@
##             main    #1151   +/-   ##
=======================================
  Coverage   91.02%   91.02%           
=======================================
  Files         215      215           
  Lines       57457    57457           
=======================================
  Hits        52300    52300           
  Misses       5157     5157           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 09e3d1b...68fbe42. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

[pipeline/minimmit] Fix misprints

4 participants