diff --git a/Cargo.lock b/Cargo.lock index ff2e21e3e4..4604afaa0e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10990,6 +10990,7 @@ dependencies = [ "frame-support", "futures", "hash-db 0.16.0", + "log", "pallet-balances", "parity-scale-codec", "sc-cli", diff --git a/crates/sp-domains-fraud-proof/Cargo.toml b/crates/sp-domains-fraud-proof/Cargo.toml index fd5b69cec0..da5e0ad63b 100644 --- a/crates/sp-domains-fraud-proof/Cargo.toml +++ b/crates/sp-domains-fraud-proof/Cargo.toml @@ -16,6 +16,7 @@ domain-block-preprocessor = { version = "0.1.0", default-features = false, path domain-runtime-primitives = { version = "0.1.0", default-features = false, path = "../../domains/primitives/runtime" } frame-support = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c" } hash-db = { version = "0.16.0", default-features = false } +log = { version = "0.4.20", default-features = false } scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", optional = true } sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", default-features = false, optional = true } @@ -60,6 +61,7 @@ std = [ "domain-runtime-primitives/std", "frame-support/std", "hash-db/std", + "log/std", "scale-info/std", "domain-block-preprocessor", "sc-client-api", diff --git a/crates/sp-domains-fraud-proof/src/bundle_equivocation.rs b/crates/sp-domains-fraud-proof/src/bundle_equivocation.rs index 3d398de7c6..6639b174a1 100644 --- a/crates/sp-domains-fraud-proof/src/bundle_equivocation.rs +++ b/crates/sp-domains-fraud-proof/src/bundle_equivocation.rs @@ -95,6 +95,14 @@ where if operator_set_1 == operator_set_2 { // 2) with different hash return if bundle_header.hash() != previous_bundle_header.hash() { + log::warn!( + "Bundle equivocation occurred: Operator{}; Slot{}; DomainId{}; First Bundle{}; Second Bundle{}", + operator_set_1.0, + slot, + operator_set_1.1, + previous_bundle_header.hash(), + bundle_header.hash(), + ); Ok(Some(FraudProof::BundleEquivocation( BundleEquivocationProof { domain_id: bundle_header.header.proof_of_election.domain_id,