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

First quint draft that is somewhat complete with consensus, executor, voteKeeper #40

Merged
merged 83 commits into from
Nov 15, 2023

Conversation

josef-widder
Copy link
Member

@josef-widder josef-widder commented Oct 31, 2023

I would in particular welcome feedback on the executor and what tests to add.

@romac
Copy link
Member

romac commented Nov 10, 2023

Looks like there are some conflicts in the vote keeper spec

@josef-widder
Copy link
Member Author

Looks like there are some conflicts in the vote keeper spec

I fixed it. Also I needed to move out the votekeeper state machine into another file for modularity (we have the bookkeeper spec stored differently in the asynchonous state machine.)

@@ -116,13 +116,17 @@ module voteBookkeeper {
else if (voteType == "Prevote" and threshold.name == "Any") {round: round, name: "PolkaAny", value: "null"}
else if (voteType == "Precommit" and threshold.name == "Value") {round: round, name: "PrecommitValue", value: threshold.value}
else if (voteType == "Precommit" and threshold.name == "Any") {round: round, name: "PrecommitAny", value: "null"}
// Josef's addition
// else if (voteType == "Precommit" and threshold.name == "Nil") {round: round, name: "PrecommitAny", value: "null"}
Copy link
Member Author

Choose a reason for hiding this comment

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

@angbrav, I added this line at some point, because this case wasn't caught back then. With the line, one of your tests are failing. I wonder whether we need it, or whether the logic ensures that Nil precommits are counted under the Any thresholds.
If you don't know the answer, perhaps it makes sense to discuss on a call ;-)

Copy link
Member

Choose a reason for hiding this comment

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

Look like there is another failure in statemachine.qnt:

/home/runner/work/malachite/malachite/Specs/Quint/statemachine.qnt:216:9 - error: [QNT508] Assertion failed
216:         assert(system.get("v4").es.cs.round == 1),
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for pointing this out. I tried it locally: @angbrav 's tests work with line 120 commented out, my tests fail with the line commented out (and vice versa). We need to figure out what behavior we want.

Copy link
Member Author

Choose a reason for hiding this comment

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

I just had a call with @angbrav and we fixed it and commited. line 120 is now part of the spec, and we fixed the test to the expected behavior.

with:
node-version: "18"
- run: npm install -g @informalsystems/quint
- run: bash Scripts/quint-forall.sh test Specs/Quint/*.qnt
Copy link
Member Author

Choose a reason for hiding this comment

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

@romac , CI is complaining about failed tests: I guess we shouldn't run "quint test" on statemachineAsync.qnt as it has some const, and quint complains about "Uninitialized const validator". Indeed, AsyncModels.qnt imports statemachineAsync.qnt and gives values to these consts. Not sure what is the best way to set it up here so that ignores statemachineAsync.qnt.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have change the line to only run test on *Test.qnt and renamed the files that contain tests.

josef-widder and others added 2 commits November 14, 2023 08:54
Signed-off-by: Josef Widder <josef@informal.systems>

Co-authored-by: Hernán Vanzetto <15466498+hvanz@users.noreply.github.com>
@hvanz hvanz mentioned this pull request Nov 14, 2023
@josef-widder josef-widder merged commit c4f9bfd into main Nov 15, 2023
2 checks passed
@josef-widder josef-widder deleted the josef/executor branch November 15, 2023 14:10
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.

3 participants