From 2f4b6d8d4431f1e43a29e7d5109d1897c6f5fc19 Mon Sep 17 00:00:00 2001 From: Federico Franzoni <8609060+fed-franz@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:20:52 +0100 Subject: [PATCH] stake-contract: relax hard-slash to soft-slash --- rusk/src/lib/node/rusk.rs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/rusk/src/lib/node/rusk.rs b/rusk/src/lib/node/rusk.rs index b76223657..0b8da4b1f 100644 --- a/rusk/src/lib/node/rusk.rs +++ b/rusk/src/lib/node/rusk.rs @@ -930,19 +930,23 @@ fn slash(session: &mut Session, slash: Vec) -> Result> { &(provisioner, None::), u64::MAX, ), + // INFO: Hard Slashing is currently "relaxed" to Soft Slashing as a + // safety measure for the initial period after mainnet launch. + // Proper behavior should be restored in the future node_data::ledger::SlashType::Hard => session.call::<_, ()>( STAKE_CONTRACT, - "hard_slash", - &(provisioner, None::, None::), + "slash", + &(provisioner, None::), u64::MAX, ), - node_data::ledger::SlashType::HardWithSeverity(severity) => session - .call::<_, ()>( + node_data::ledger::SlashType::HardWithSeverity(_severity) => { + session.call::<_, ()>( STAKE_CONTRACT, - "hard_slash", - &(provisioner, None::, Some(severity)), + "slash", + &(provisioner, None::), u64::MAX, - ), + ) + } }?; events.extend(r.events); }