mosaic-contracts
mosaic-contracts copied to clipboard
Meta-block proposal should validate kernel
User Story
As a core contract I want to validate the kernel of a block proposal Because I want to reject proposals for invalid kernels.
Scenario
Given that I have a valid kernel When I propose the meta-block Then the core contract should accept it.
Given that I have an invalid kernel When I propose the meta-block Then the core contract should reject it And revert the transaction.
Info
Validation should be added to check for the validity of a kernel when a new meta-block is proposed. The wrong kernel is also an invalid kernel. Proposals must be made for the currently open kernel.
The transition object has a kernel hash. That one must be the hash of the currently open kernel.
⚠️ The method MetaBlock.hashKernel() is just a placeholder and not yet implemented!
Contracts:
- OriginCore
Baby mosaic has a static set of validators. In worst case, use a zero validator delta in the kernel object.