PlantUML diagrams (#8712)

* Overview of keepers in object capability model (OCM)

* Updates to the spec, making clarifications

* Create a sequence diagram of a (fresh) delegation

* Misc notes, not yet decided where to put them

* Description of the shares abstraction in validators

* Model all keeper dependencies and move the UML file to docs

* Move and rename delegation sequence diagram

* Move shares description

* Remove TODO

* Diagram touch-ups

* Add how consensus power is calculated

* remove temp file

* Diagram improvements

* Describe slashing in more detail

* Describe redelegation

* Describe unbonding

* Delegation updates

* Delegation updates

* Make a diagram describing overall transaction flow

* Add delegation flows for the events of tokens being bonded/unbonding/etc.

* Grammar fix

* Diagram updates: distinguish alts, remove numbering.

* Use groups instead of "func:" participants

* Remove unused keepers from dependency diagram

* Add title to unbonding diagram

* Move keeper dependencies

* small doc updates

* remove numbers on sequence diagram

* !!!WIP EndBlock

* Explain "Last"-prefix in storage

* Remove `panic` step (they are supposed to never happen)

* EndBlock sequence diagram (with TODOs)

* Add TODO

* More visible TODOs

* Remove numbering

* Complete EndBlock

* Remove numbering

* Remove TODOs and update title

* add title back

* remove endblock seq-diagram

* Make power index update conditional on not being jailed

* update title

* Move files to /docs

* Install PlantUML and compile images to png and txt

* Use transaction flow in documentation

* Use staking UML in staking docs

* Clarify uml with inline doc

* Add keeper deps diagram to docs

* Only produce SVG images

Co-authored-by: hjort <>
Co-authored-by: Marko <marbar3778@yahoo.com>
This commit is contained in:
Rikard Hjort
2021-04-06 09:50:56 +00:00
committed by GitHub
co-authored by hjort Marko
parent ed7bca8984
commit c41baa9bc8
10 changed files with 270 additions and 2 deletions
+6
View File
@@ -80,6 +80,8 @@ tracked in validator object in the `Validators` index.
It is possible to delegate to a jailed validator, the only difference being it
will not be added to the power index until it is unjailed.
![](docs/uml/delegation_sequence.svg)
## Msg/Undelegate
The `Msg/Undelegate` service message allows delegators to undelegate their tokens from
@@ -112,6 +114,8 @@ When this service message is processed the following actions occur:
- if there are no more `Shares` in the delegation, then the delegation object is removed from the store
- under this situation if the delegation is the validator's self-delegation then also jail the validator.
![](docs/uml/unbond_sequence.svg)
## Msg/BeginRedelegate
The redelegation command allows delegators to instantly switch validators. Once
@@ -146,3 +150,5 @@ When this service message is processed the following actions occur:
- Delegate the token worth to the destination validator, possibly moving tokens back to the bonded state.
- if there are no more `Shares` in the source delegation, then the source delegation object is removed from the store
- under this situation if the delegation is the validator's self-delegation then also jail the validator.
![](docs/uml/begin_redelegation_sequence.svg)