Replies: 2 comments 2 replies
-
cc @jeluard let's go through that together, and feel free to drop questions here. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What
We need to augment Amaru's ledger state to support Governance. This is a rather large chunk and roughly encompasses:
One particularly useful element at first is the tracking of deposits (DReps & proposals) as it directly impact the stake distribution (and thus the other stream of work we are currently pursuing w.r.t the leader schedule validation). While deposits are relatively easy to track, the refund demands a comprehension of the ratification process for proposals.
Caution
We currently limit the scope to merely tracking the state. We do not yet seek to implement all ledger rules and "input validations", only what's necessary to keep the state up-to-date. We'll eventually have to implement the full ledger rules, but this is consider out-of-scope of this particular task.
Functional Requirements
Block processing time <1s
As for other operations within Amaru's ledger, we must ensure their prompt execution. While in this initial phase, we are purposely not worrying too much about the time needed for operations at an epoch boundary, we still strive for avoiding doing too much work at an epoch boundary.
While we can relatively easily dodge the bullet for stake pool stake distribution since the result of the reward calculation is only needed in the next epoch, we need the DRep stake distribution at the end of the current epoch boundary. Doing this calculation right at the end may likely be too expensive; so it's likely something we need done incrementally (eventually).
On-disk persistence
As for other elements of the ledger state, the governance state shall be tracked and stored on-disk through a mix of the current RocksDB backend for the stable parts, and some in-memory representation regarding the volatile part (most recent
k = 2160
blocks).Given the constraints on block processing at the epoch boundary, it is probably a good idea to keep the persisted format somewhat optimized towards querying and processing for the end of the epoch (in opposition to keeping it optimized for writing block after block). Though as always, measuring and monitoring will tell us what to do and improve.
Useful links
UMap
)Beta Was this translation helpful? Give feedback.
All reactions