-
Notifications
You must be signed in to change notification settings - Fork 115
Description
Requirements
We would like to prototype an application on top of Malachite that uses a staking module. By building this prototype we expect to gain clarity on a few areas of unknowns and give us confidence to build a production-ready -- i.e., and MVP v0 -- version later on.
Acceptance criteria
Writing this prototype should help us answer a few specific questions that are within scope, in rough order of priority:
- What is the right level of abstraction for a staking module MVP? As an actor? As a module assuming a specific architecture, eg channel-based?
- Which of Malachite crates would the staking module depend on, and does it introduce new requirements on existing Malachite crates?
- What is the minimal set of methods that an MVP should include?
Nice to have:
- How do we test the new module?
- Are there specific applications (actor-based, channel-based, core libs, Madara, Pathfinder) that are more amenable than others to integration with Malachite with a staking module? (related to question (1) above).
Additionally, we'd like to confirm whether:
- Are there any modifications needed to the core libraries of Malachite to support a staking module?
Constraints
The prototype itself has no constraints, feel free to make any assumption!
The prototype should inform an MVP and it should provide more clarity on production-ready specifications for staking, however. For the specs, see #784. The constraints of the MVP we'd like to build after this prototype is that it should be:
- reusable across different Malachite-based applications
- flexible
- easily tested
- minimal in functionality to reduce maintenance burden
Possible assumptions to constrain the scope of the prototype
- We may use one of the test apps in Malachite repo
- Focus on the mapping of stake <> voting power and validator updates with every block
- No need to focus on the "forced staking update" in the initial prototype
- May build the prototype in the context of an existing Starknet full node, eg Madara or Pathfinder
Estimate & timeboxing
Since this is a prototype and we are free to make many assumptions, we should constrain the work to 5-10 days.
Related material
- spec: Staking module #784
- Other staking implementations:
- Starknet staking contracts
- x/staking of Cosmos SDK
- Omni EVM interface to staking contracts/core/src/octane/Staking.sol