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

State machine #3

Merged
merged 12 commits into from
May 5, 2023
Merged

State machine #3

merged 12 commits into from
May 5, 2023

Conversation

philipp-zahn
Copy link
Member

Completes the integration of the payout pool functionality (focused on reporter) with the existing reporting game

}

-- Rage quits a reporter; if non-existing does nothing
rageQuitReporter :: ReporterAddr -> State -> State

Choose a reason for hiding this comment

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

As things are defined atm, if I rageQuit I will never be able to join the payout pool again. This is because rageQuitReporter just sets a parameter to false, whereas registerReporter checks that a state has an entry for that address. Is this intended behavior?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch; the registerReporter functionality was incomplete. I added the case where a reporter is registered but not active.

-- Can we do this in an aggregate state machine fashion?
-- Checks that the relevant pre-conditions are fulfilled for a report to be field
-- NOTE Conditions are not complete wrt to builder and proposer
preconditions :: ReporterAddr -> Report -> State -> Bool

Choose a reason for hiding this comment

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

Do we still need the old support functions in SupportFunctions.hs now that we have this? I may be interpreting this wrong but here we seem to be checking a subset of the things we were already checking in SupportFunctions.hs in a better way, since here we have a 'cleaner' model of the PoN state. Am I mistaken?

Copy link
Member Author

Choose a reason for hiding this comment

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

We still need this as it concerns the internal logic of the reporter decision-making. I think it is a good idea to keep things separate for now as that part of the reporter might still change; have access to different information etc. Once everything is settled, this decision can be revisited.

@philipp-zahn philipp-zahn merged commit 8a02374 into philipp May 5, 2023
@philipp-zahn philipp-zahn deleted the state-machine branch May 5, 2023 10:01
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.

2 participants