Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

BABE should make secondary slot randomness available on-chain #7046

@rphmeier

Description

@rphmeier

In the initialization procedure for pallet-babe, we compute randomness using make_bytes for primary slots and assign an Initialized value based on that.

Secondary-VRF slot assignments also provide some randomness that we should assign to an ephemeral storage value that other modules can access. It shouldn't go in the Initialized value because that is used for the epoch randomness calculation, which shouldn't be polluted by secondary slots.

Implementation:

Add a separate storage var AuthorVrfRandomness which is filled either by Primary or SecondaryVRF slot claims. Add a getter author_vrf_randomness.

Metadata

Metadata

Assignees

Labels

Z1-easyCan be fixed primarily by duplicating and adapting code by an intermediate coderZ6-mentorAn easy task where a mentor is available. Please indicate in the issue who the mentor could be.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions