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

Customize payload extraction #42

Closed
tomusdrw opened this issue Jan 7, 2021 · 5 comments · Fixed by paritytech/substrate#11183
Closed

Customize payload extraction #42

tomusdrw opened this issue Jan 7, 2021 · 5 comments · Fixed by paritytech/substrate#11183
Assignees
Labels
enhancement New feature or request M-gadget The client code of the gadget.

Comments

@tomusdrw
Copy link
Contributor

tomusdrw commented Jan 7, 2021

Currently we extract the MMR root hash from the header digest, but long term it would be better to read the storage directly.
We need to do it right away, to prevent the state from being pruned by when GRANDPA finalises the block.

@tomusdrw tomusdrw added enhancement New feature or request M-gadget The client code of the gadget. labels Jan 7, 2021
@seunlanlege
Copy link

This is the MMR root hash that we want to vote on?

@tomusdrw
Copy link
Contributor Author

I think it would be best to start querying the MMR root hash (or payload in general) from the state as soon as possible and only add the digest item for Mandatory Blocks (see #320; i.e. the ones that contain the validator set change as as well) for potential future BEEFY header-aware light clients.

@tomusdrw tomusdrw changed the title Extract payload to sign from the state Customize payload extraction Jan 27, 2022
@tomusdrw
Copy link
Contributor Author

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

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

Split this to its own issue: #409

@acatangiu
Copy link
Collaborator

fixed in paritytech/substrate#11183

MMR root is available both in header and state, currently worker tries from header, on failure falls back to state. In the future we can easily remove header digests and use state exclusively.

@acatangiu acatangiu self-assigned this Apr 13, 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.
Projects
None yet
3 participants