Skip to content
Open
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
29 changes: 29 additions & 0 deletions Cargo.lock

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

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ members = [
"node",
"pallets/midnight",
"pallets/c2m-bridge",
"pallets/consensus-engine",
"pallets/cnight-observation",
"pallets/cnight-observation/mock",
"pallets/midnight-system",
Expand All @@ -20,6 +21,7 @@ members = [
"primitives/midnight",
"primitives/ledger",
"primitives/session-info",
"primitives/consensus-engine",
"primitives/system-parameters",
"res",
"runtime",
Expand Down Expand Up @@ -122,6 +124,7 @@ pallet-cnight-observation-mock = { path = "pallets/cnight-observation/mock", def
pallet-version = { path = "pallets/version", default-features = false }
pallet-system-parameters = { path = "pallets/system-parameters", default-features = false }
pallet-throttle = { path = "pallets/throttle", default-features = false }
pallet-consensus-engine = { path = "pallets/consensus-engine", default-features = false }
pallet-system-parameters-rpc = { path = "pallets/system-parameters/rpc", default-features = true }
pallet-federated-authority = { path = "pallets/federated-authority", default-features = false }
pallet-federated-authority-observation = { path = "pallets/federated-authority-observation", default-features = false }
Expand All @@ -136,6 +139,7 @@ midnight-primitives-cnight-observation = { path = "primitives/cnight-observation
midnight-primitives-ics-observation = { path = "primitives/ics-observation", default-features = false }
midnight-primitives-reserve-observation = { path = "primitives/reserve-observation", default-features = false }
midnight-primitives-session-info = { path = "primitives/session-info", default-features = false }
midnight-primitives-consensus-engine = { path = "primitives/consensus-engine", default-features = false }
midnight-primitives-federated-authority-observation = { path = "primitives/federated-authority-observation", default-features = false }
midnight-primitives-system-parameters = { path = "primitives/system-parameters", default-features = false }

Expand Down
11 changes: 11 additions & 0 deletions changes/runtime/added/consensus-engine-pallet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#runtime

# Pallet Consensus Engine

The pallet that will drive consensus engine change.
State machine is implemented in the pallet.
There is number of other tickets to complete the epic,
therefore migration is not finished yet.

Issue: https://github.com/midnightntwrk/midnight-node/issues/1740
PR: https://github.com/midnightntwrk/midnight-node/pull/1892
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ All are setup as validators and are expect to produce blocks. In other words the
see [midnight-setup](../../../../../res/local/permissioned-candidates-config.json) related file,
this node should fall back to its AURA keys, keys of this node match `//Bob` SURI
- `midnight-node-3` does have BABE configured on Cardano (BABE equals AURA),
this node is using seeds files that are used to insert keys to keystore on the node startup,
this node is using seeds files (env variables `<key_type>_SEED_FILE` are used to set their paths) that are used to insert keys to keystore on the node startup,
there is no BABE seed file (so it should fallback to AURA)
- `midnight-node-4` does not have BABE configured on Cardano, but it has BABE key in the keystore (which equals AURA key)
- `midnight-node-5` is a node that has both keys configured,
Expand Down
Binary file modified metadata/static/midnight_metadata.scale
Binary file not shown.
Binary file modified metadata/static/midnight_metadata_2.1.0.scale
Binary file not shown.
46 changes: 46 additions & 0 deletions pallets/consensus-engine/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[package]
name = "pallet-consensus-engine"
version = "0.1.0"
edition = "2024"
description = "Pallet tracking the consensus-engine transition state machine"
license-file.workspace = true
publish = false

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
parity-scale-codec = { workspace = true, features = ["derive", "max-encoded-len"] }
scale-info = { workspace = true, features = ["derive"] }
frame-support.workspace = true
frame-system.workspace = true
log.workspace = true
sp-consensus-aura.workspace = true
sp-consensus-babe.workspace = true
sp-consensus-slots.workspace = true
midnight-primitives-consensus-engine.workspace = true

[dev-dependencies]
sp-core.workspace = true
sp-io.workspace = true
sp-runtime.workspace = true

[features]
default = ["std"]
std = [
"parity-scale-codec/std",
"frame-support/std",
"frame-system/std",
"scale-info/std",
"sp-consensus-aura/std",
"sp-consensus-babe/std",
"sp-consensus-slots/std",
"midnight-primitives-consensus-engine/std",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
]

[package.metadata.cargo-shear]
ignored = ["scale-info"]
Loading
Loading