-
Notifications
You must be signed in to change notification settings - Fork 155
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
Make updating the delegation state part of the chain tick function #1046
Comments
Closed
#1052 made the leftover ticket Byron-only. |
the chain tick functionality is now exposed in |
Development of Byron code has been frozen and only potential security fixes will be applied in the future |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The ledger specs provide the facility for validating a block extending a chain. However, as a leader we have to consider how to validate a block that we are producing. We should have an additional invariant here:
A block is validated according to the "current" chain state, which is the chain state of the last block to be applied. However, during block validation we first process the header of that block, which includes making updates which are driven only by time. So if time has moved on, it's possible that payload contents which looked valid are no longer so, violating our invariant.
To get around this, we should require of the ledger that it exposes a "chain tick" transition, driven only by slot number, that covers all time/slot based updates to the chain state.
For Byron, this involves splitting the DELEG transitions to move ADELEGS (delegation activation) and EPOCH into a new TICK rule which takes only slot as signal, updating both delegation state and update state.
For Shelley, this involves modifying the BHEAD rule to either (a) move the header checks up to CHAIN, and rename as TICK, or (b) add a new rule TICK below BHEAD which applies the slot-driven transitions.
The text was updated successfully, but these errors were encountered: