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

Make updating the delegation state part of the chain tick function #1046

Closed
edsko opened this issue Nov 25, 2019 · 4 comments
Closed

Make updating the delegation state part of the chain tick function #1046

edsko opened this issue Nov 25, 2019 · 4 comments
Assignees
Labels
byron wontfix This will not be worked on

Comments

@edsko
Copy link
Contributor

edsko commented Nov 25, 2019

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:

  • If we produce a block with valid contents, and that block is a valid extension of the chain according to the protocol, then that block should itself be valid.
    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.

@mgajda
Copy link
Contributor

mgajda commented Dec 19, 2019

#1052 made the leftover ticket Byron-only.

@mgajda
Copy link
Contributor

mgajda commented Jan 13, 2020

So Byron part is supposed to remove dotted links here, and add dashed links, and new STS TICK.
Also it TICK will call TRC, not just initial IRC transitions for ADELEGS.
sts-hierarchy-jan-13-byron-and-shelley

Or should we also call update STS?

Will submit it this week.

@JaredCorduan
Copy link
Contributor

the chain tick functionality is now exposed in cardano-ledger. but the rules are not adapted. I am going to de-prioritize this issue for now.

@JaredCorduan
Copy link
Contributor

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
Labels
byron wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

6 participants