Design & implement a framework of how to handle on-chain (un)jailing with placeholders for the triggers & events to be determined at a future point in time.
Morse (pocket-core) has some references to unjailing which can be found here
Goals
Jailing - a state that an on-chain actor can be in which prevents it from being able to participate in any on-chain operations
Unjailing - the process of re-enable a previously jailed actor in resuming normal on-chain operations
Slashing actors that have been jailed for a sufficiently long period of time
Evaluate options for how on-chain actor (un)jailing could be implemented
Design, document and implement (un)jailing of Applications, Suppliers & Gateways
Create a pattern for reusable entrypoints that’ll trigger actor jailing
If new functionality is added for an actor, it should be “easy” to make sure it is not available while the actor is jailed
Deliverables
IMPORTANT NOTE TO THE OWNER: The deliverables below are not a complete list of everything that needs to be done, but rather a starting point to help. The research, which is part of the deliverables, should drive most of the design decisions.
Research
[ ] Put together a reference doc with bullet points, links, highlights, learnings capturing the research below(< 1 page total)
Other Projects
[ ] Investigate how validator (un)jailing is designed and implemented in the Cosmos SDK
[ ] Investigate how at least one other project does (non-validator) actor jailing in the Cosmos ecosystem
Morse
[ ] Investigate how actor (un)jailing currently works in Morse
Before implementation
[ ] Prepare a 1-pager “mini spec” notion / docs / markdown and get feedback & review before kicking off the implementation
Implementation requirements
[ ] Time-based unjailing should follow the same pattern as in unbonding (#489)
[ ] Authority (governance address) should be able to jail / unjail any actor
[ ] [TBD] Unjailing should happen automatically N blocks since the moment the actor was jailed
[ ] N should have a unique governance parameter for every actor: Application, Supplier, Gateway
[ ] [TBD] If an actor is jailed for M blocks, it will get slashed by some amount Z
[ ] Create custom N , M , Z governance params unique to each actor
During implementation
[ ] Separate PRs per actor after the foundation business logic is in place
[ ] Add unit / integration tests
[ ] Add at least 1 E2E test
[ ] Make target to trigger the E2E test
[ ] Make targets to execute governance / auth trigger jailing / unjailing of a specific address
After implementation
[ ] Add a new page in docusurus that explains how the implemented mechanism works
[ ] Create a follow-up ticket to add the jailing / unjailing triggering business logic
Non-goals / Non-deliverables
Design or determine the automatic (on-chain, not manually triggered) events that cause jailing
General deliverables
[ ] Comments: Add/update TODOs and comments alongside the source code so it is easier to follow.
Objective
Design & implement a framework of how to handle on-chain (un)jailing with placeholders for the triggers & events to be determined at a future point in time.
Origin Documents
Goals
Jailing
- a state that an on-chain actor can be in which prevents it from being able to participate in any on-chain operationsUnjailing
- the process of re-enable a previously jailed actor in resuming normal on-chain operationsDeliverables
IMPORTANT NOTE TO THE OWNER: The deliverables below are not a complete list of everything that needs to be done, but rather a starting point to help. The research, which is part of the deliverables, should drive most of the design decisions.
Research
Other Projects
Morse
Before implementation
Implementation requirements
N
blocks since the moment the actor was jailedN
should have a unique governance parameter for every actor: Application, Supplier, GatewayM
blocks, it will get slashed by some amountZ
N
,M
,Z
governance params unique to each actorDuring implementation
After implementation
Non-goals / Non-deliverables
General deliverables
Creator: @olshansk Co-Owners: @moatus