-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
} | ||
|
||
-- Rage quits a reporter; if non-existing does nothing | ||
rageQuitReporter :: ReporterAddr -> State -> State |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Completes the integration of the payout pool functionality (focused on reporter) with the existing reporting game