Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 34 additions & 63 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ members = [
"partner-chains/demo/node",
"partner-chains/toolkit/committee-selection/selection-simulator",
"partner-chains/toolkit/data-sources/cli",
"partner-chains/toolkit/consensus",
]
[workspace.package]
license-file = "LICENSE"
Expand Down Expand Up @@ -159,8 +160,7 @@ sp-session-validator-management = { default-features = false, path = "partner-ch
sp-session-validator-management-query = { default-features = false, path = "partner-chains/toolkit/committee-selection/query" }
time-source = { default-features = false, path = "partner-chains/toolkit/utils/time-source" }
pallet-partner-chains-session = { default-features = false, path = "partner-chains/substrate-extensions/partner-chains-session", features = ["pallet-session-compat"] }
sp-partner-chains-consensus-aura = { default-features = false, path = "partner-chains/substrate-extensions/aura/primitives" }
sc-partner-chains-consensus-aura = { default-features = false, path = "partner-chains/substrate-extensions/aura/consensus" }
sp-partner-chains-consensus = { path = "partner-chains/toolkit/consensus" }
# Substrate dependencies

binary-merkle-tree = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk.git", tag = "polkadot-stable2603" }
Expand Down
14 changes: 14 additions & 0 deletions changes/node/changed/remove-aura-fork.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#node #partner-chains
# Replace the forked consensus crates with consensus-agnostic wrappers

Remove `sc-partner-chains-consensus-aura` and `sp-partner-chains-consensus-aura`.
Add consensus-agnostic `sp-partner-chains-consensus`, which runs the full Partner Chains
inherent check at whichever point the consensus gadget checks inherents:
`PartnerChainsBlockImport` (with `PartnerChainsBodyRestore`) wraps a consensus block import
for stacks that check inherents at import (e.g. `BabeBlockImport`), and
`PartnerChainsVerifier` wraps the import-queue verifier for stacks that check inherents
there instead (e.g. Aura). `PartnerChainsProposerFactory` injects the `mcsh` digest at
proposal time.

PR: https://github.com/midnightntwrk/midnight-node/pull/1700
Issue:
3 changes: 1 addition & 2 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ pallet-sidechain-rpc.workspace = true
sidechain-slots.workspace = true
sidechain-domain = { workspace = true, features = ["serde"] }
sidechain-mc-hash = { workspace = true, features = ["mock"] }
sp-partner-chains-consensus-aura.workspace = true
sc-partner-chains-consensus-aura.workspace = true
sp-partner-chains-consensus.workspace = true
sp-session-validator-management-query.workspace = true
partner-chains-node-commands.workspace = true
partner-chains-cli.workspace = true
Expand Down
7 changes: 0 additions & 7 deletions node/src/inherent_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ use sp_inherents::CreateInherentDataProviders;
use sp_partner_chains_bridge::{
TokenBridgeDataSource, TokenBridgeIDPRuntimeApi, TokenBridgeInherentDataProvider,
};
use sp_partner_chains_consensus_aura::CurrentSlotProvider;
use sp_runtime::traits::{Block as BlockT, Header, Zero};
use sp_session_validator_management::SessionValidatorManagementApi;
use sp_timestamp::Timestamp;
Expand Down Expand Up @@ -212,12 +211,6 @@ pub struct VerifierCIDP<T> {
bridge_data_source: Arc<dyn TokenBridgeDataSource<BridgeRecipient> + Send + Sync>,
}

impl<T: Send + Sync> CurrentSlotProvider for VerifierCIDP<T> {
fn slot(&self) -> Slot {
*timestamp_and_slot_cidp(self.config.slot_duration(), self.config.time_source.clone()).0
}
}

#[async_trait]
impl<T> CreateInherentDataProviders<Block, (Slot, McBlockHash)> for VerifierCIDP<T>
where
Expand Down
Loading
Loading