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

QSC initial implementation #14

Merged
merged 14 commits into from
Mar 19, 2020
Merged

QSC initial implementation #14

merged 14 commits into from
Mar 19, 2020

Conversation

Gilthoniel
Copy link
Contributor

This includes an initial implementation of the QSC algorithm. It does not support Byzantine behavior.

@Gilthoniel Gilthoniel added the R4M 🚀 The PR is ready to be reviewed and merged label Mar 17, 2020
@Gilthoniel Gilthoniel requested a review from nkcr March 17, 2020 16:24
@Gilthoniel Gilthoniel self-assigned this Mar 17, 2020
@Gilthoniel
Copy link
Contributor Author

@nkcr I had to change the address iterator thing as we need the length of the set in the Call functions. Let me know what you think about the Take function.

@Gilthoniel Gilthoniel added R4M 🚀 The PR is ready to be reviewed and merged and removed R4M 🚀 The PR is ready to be reviewed and merged labels Mar 17, 2020
mino/option.go Show resolved Hide resolved
mino/option.go Outdated
}

// ParseFilters applies the filters and return the result.
func ParseFilters(filters []Filter) *Filters {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
func ParseFilters(filters []Filter) *Filters {
func ApplyFilters(filters []Filter) *Filters {

mino/option.go Outdated
)

// Filters is a set of parameters for the Players.Take function.
type Filters struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

Wondering if we should not call it "Filter" in singular. At the end this structure is providing one description of the elements we keep. We can see it as a single filter that is built with multiple updaters. Then the actual type Filter func(*Filters) could be renamed to "FilterUpdater"

mino/option.go Show resolved Hide resolved
consensus/qsc/mod.go Show resolved Hide resolved
consensus/qsc/broadcast.go Outdated Show resolved Hide resolved
consensus/qsc/broadcast.go Outdated Show resolved Hide resolved
consensus/qsc/broadcast.go Outdated Show resolved Hide resolved
consensus/qsc/broadcast.go Outdated Show resolved Hide resolved

ms, ok := resp.(*MessageSet)
if !ok {
return nil, xerrors.Errorf("invalid message type: %T", resp)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return nil, xerrors.Errorf("invalid message type: %T", resp)
return nil, xerrors.Errorf("invalid message type: Got '%T' but "+
"expected '*MessageSet'", resp)

@Gilthoniel
Copy link
Contributor Author

@nkcr comments fixed.

@nkcr nkcr merged commit 4f69de4 into master Mar 19, 2020
@nkcr nkcr deleted the qsc branch March 19, 2020 08:06
bbjubjub2494 pushed a commit to bbjubjub2494/dela that referenced this pull request Aug 3, 2024
QSC initial implementation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R4M 🚀 The PR is ready to be reviewed and merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants