Skip to content
This repository has been archived by the owner on Nov 11, 2022. It is now read-only.

Allow pluggable BEEFY payload constructors #409

Closed
Tracked by #1632
acatangiu opened this issue Apr 7, 2022 · 2 comments · Fixed by paritytech/substrate#12428
Closed
Tracked by #1632

Allow pluggable BEEFY payload constructors #409

acatangiu opened this issue Apr 7, 2022 · 2 comments · Fixed by paritytech/substrate#12428
Assignees
Labels
enhancement New feature or request M-gadget The client code of the gadget. R-substrate The issue has to be implemented in the Substrate repo

Comments

@acatangiu
Copy link
Collaborator

Now with #198 implemented it should also be possible to customize the payload construction in the gadget code instead of having it hardcoded.

@acatangiu
Copy link
Collaborator Author

The BEEFY worker (located here) could vote on generic payloads that can hold anything encodable as [u8].

This issue tracks enabling the worker/voter to use pluggable payload constructor. So for example BeefyWorker::do_vote() will no longer explicitly encode MMR_ROOT in the vote payload, but will use the externally provided payload constructor, thus being agnostic to the actual payload contents.

The "pluggable payload constructor" can, for example, be a trait object that builds Payload given a block header.

For example, a custom/pluggable runtime api provider object was added to beefy-gadget by this commit. Something similar is required in this issue.

A simple test for this would be to verify generated SignedCommitments (see for example this function in tests).

@acatangiu acatangiu added this to BEEFY Jun 28, 2022
@acatangiu acatangiu moved this to Backlog 🗒 in BEEFY Jun 28, 2022
@acatangiu acatangiu moved this from Backlog 🗒 to Need for Kusama in BEEFY Jul 6, 2022
@seunlanlege seunlanlege moved this to In Progress in Bridging team board Jul 7, 2022
@acatangiu acatangiu moved this to Draft in Parity Roadmap Sep 12, 2022
@acatangiu acatangiu moved this from Draft to Open in Parity Roadmap Sep 12, 2022
@acatangiu acatangiu self-assigned this Oct 5, 2022
@acatangiu acatangiu added enhancement New feature or request R-substrate The issue has to be implemented in the Substrate repo M-gadget The client code of the gadget. labels Oct 5, 2022
@acatangiu
Copy link
Collaborator Author

Fixed in paritytech/substrate#12428

Repository owner moved this from Need for Kusama 🗒 to Done ✅ in BEEFY Oct 6, 2022
Repository owner moved this from Open to Closed in Parity Roadmap Oct 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request M-gadget The client code of the gadget. R-substrate The issue has to be implemented in the Substrate repo
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant