-
Notifications
You must be signed in to change notification settings - Fork 6
Description
List of required changes (update this description with more sections if you notice something)
Coinbase customization in the context of assethub AURA compatibility
-
current implementation will always provide slot 0 as digest for
FindAuthorimplementation used in the substrate-runtime from anvil-polkadot. This will not work for assethub runtimes because of this check, called here (when applying the timestamp inherent). We must use the existing AuraConsensusDataProvider that's also used withpolkadot-omni-node, and compute the slot digest based on the current timestamp (as configured in time manager) and pallet_aura configured slot duration. It means that we might go backwards in terms of slot, which means when setting timestamp, we should also update AURA current slot, to succeed with this check and this check. -
assethub runtimes can be configured with multiple authorities (block authors), and aura can pick any of them based on the given slot. Anvil-polkadot coinbase assumes though that we have a single block author address. Forking must configure the authorities set to a set made up from a single authority/coinbase address. This single authority should be picked like anvil does when forking (TO investigate how coinbase address is picked by anvil as block author when forking).
-
We can use the
pallet_aura::FindAccountFromAuthorIndextype for theFindAuthoron thepallet_aura::Config(orpallet-session::FindAccountFromAuthorIndex, viapallet-authorship), for thesubstrate-runtime, instead of the customBlockAuthorstruct and itsFindAuthorimpl. This should be done if we don't replace the runtime with an assethub runtime by then. -
parachain validation inherent data provider must be built similarly to polkadot-omni-node so that we don't panic here. In the same place we build the timestamp inherent data provider too, but doing it like so should be also backed by 1).
Chain ID customization
Currently we made chain id a storage item in the anvil-polkadot substrate-runtime. This is not the case for assethub runtimes, so we should find a workaround.