feat: add pallet-consensus-engine to support AURA to BABE migration#1892
Open
LGLO wants to merge 4 commits into
Open
feat: add pallet-consensus-engine to support AURA to BABE migration#1892LGLO wants to merge 4 commits into
LGLO wants to merge 4 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
LGLO
force-pushed
the
feat-pallet-consensus-engine
branch
from
July 17, 2026 06:57
d2dddf5 to
8843e02
Compare
Signed-off-by: Lech Głowiak <lech.glowiak@shielded.io>
LGLO
force-pushed
the
feat-pallet-consensus-engine
branch
from
July 17, 2026 11:54
8843e02 to
e9ba324
Compare
Klapeyron
reviewed
Jul 20, 2026
Comment on lines
+235
to
+241
| fn current_slot_from_aura_digest() -> Option<Slot> { | ||
| frame_system::Pallet::<T>::digest().logs.iter().find_map(|log| { | ||
| log.as_pre_runtime().and_then(|(id, mut data)| { | ||
| (id == AURA_ENGINE_ID).then(|| Slot::decode(&mut data).ok()).flatten() | ||
| }) | ||
| }) | ||
| } |
Contributor
There was a problem hiding this comment.
there exists https://paritytech.github.io/polkadot-sdk/master/pallet_aura/pallet/type.CurrentSlot.html which we can use
Contributor
Author
There was a problem hiding this comment.
For this one I prefer to read pre-digest and not depend on pallets ordering in runtime.
Contributor
There was a problem hiding this comment.
But it is not making it dependent on the ordering of pallets in runtime, actually the right source of truth in particular belongs to pallet_sidechain, which we should also adjust to be generic here
Signed-off-by: Lech Głowiak <lech.glowiak@shielded.io>
Klapeyron
reviewed
Jul 20, 2026
Klapeyron
reviewed
Jul 20, 2026
…tely when looking into pre-digest items Signed-off-by: Lech Głowiak <lech.glowiak@shielded.io>
Signed-off-by: Lech Głowiak <lech.glowiak@shielded.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
State machine for AURA to BABE migration.
Issue: #1740
🗹 TODO before merging
📌 Submission Checklist
git commit -s) for the DCO🧪 Testing Evidence
Please describe any additional testing aside from CI:
🔱 Fork Strategy
Links