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

core/qbft: calculate q and f #503

Merged
merged 3 commits into from
May 10, 2022
Merged

core/qbft: calculate q and f #503

merged 3 commits into from
May 10, 2022

Conversation

corverroos
Copy link
Contributor

@corverroos corverroos commented May 9, 2022

Calculates Quorum and Faulty from Nodes as per Roberto suggestion. Also using his paper for the formulas.

Also rename justify to justification

category: refactor
ticket: #445
feature_set: alpha

@codecov
Copy link

codecov bot commented May 9, 2022

Codecov Report

Merging #503 (4e1bcc7) into main (1efbfb8) will increase coverage by 0.07%.
The diff coverage is 80.95%.

@@            Coverage Diff             @@
##             main     #503      +/-   ##
==========================================
+ Coverage   56.44%   56.52%   +0.07%     
==========================================
  Files          87       87              
  Lines        7979     7983       +4     
==========================================
+ Hits         4504     4512       +8     
+ Misses       2874     2871       -3     
+ Partials      601      600       -1     
Impacted Files Coverage Δ
core/qbft/qbft.go 70.05% <80.95%> (+0.30%) ⬆️
app/app.go 64.49% <0.00%> (+1.18%) ⬆️

Continue to review full report at Codecov.

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

@@ -39,7 +39,7 @@ type Value[V any] interface {
type Transport[I any, V Value[V]] struct {
// Broadcast sends a message with the provided fields to all other
// processes in the system (including this process).
Broadcast func(typ MsgType, instance I, source int64, round int64, value V, pr int64, pv V, justify []Msg[I, V])
Broadcast func(typ MsgType, instance I, source int64, round int64, value V, pr int64, pv V, justification []Msg[I, V])
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe

Suggested change
Broadcast func(typ MsgType, instance I, source int64, round int64, value V, pr int64, pv V, justification []Msg[I, V])
Broadcast func(typ MsgType, instance I, source int64, round int64, value V, pr int64, pv V, justifications []Msg[I, V])

Copy link
Contributor Author

Choose a reason for hiding this comment

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

technically it is a single justification containing multiple messages...

// Faulty is the maximum faulty process count for the system.
Faulty int
// Nodes is the total number of nodes/processes participating in consensus.
Nodes int
Copy link
Contributor

Choose a reason for hiding this comment

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

😏

@corverroos corverroos added the merge when ready Indicates bulldozer bot may merge when all checks pass label May 10, 2022
@obol-bulldozer obol-bulldozer bot merged commit 1921e77 into main May 10, 2022
@obol-bulldozer obol-bulldozer bot deleted the corver/qbftformula branch May 10, 2022 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge when ready Indicates bulldozer bot may merge when all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants