mosaic-contracts icon indicating copy to clipboard operation
mosaic-contracts copied to clipboard

Meta-block proposal should validate kernel

Open 0xsarvesh opened this issue 7 years ago • 1 comments
trafficstars

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

0xsarvesh avatar Oct 18 '18 07:10 0xsarvesh

Baby mosaic has a static set of validators. In worst case, use a zero validator delta in the kernel object.

schemar avatar Oct 22 '18 13:10 schemar