From 011d795eb00db3dff9f9cb7c7573d1028f367c20 Mon Sep 17 00:00:00 2001 From: Alexander Peters Date: Mon, 10 Mar 2025 17:39:23 +0100 Subject: [PATCH] fix(sims): Use liveness matrix for validator sign status in sims (21952) (#23952) Co-authored-by: Alex | Interchain Labs --- CHANGELOG.md | 1 + x/simulation/mock_cometbft.go | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cb29d234c..3a3a43f888 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (client) [#23860](https://github.com/cosmos/cosmos-sdk/pull/23860) Add missing `unordered` field for legacy amino signing of tx body. * (x/bank) [#23836](https://github.com/cosmos/cosmos-sdk/pull/23836) Fix `DenomMetadata` rpc allow value with slashes. * (query) [87d3a43](https://github.com/cosmos/cosmos-sdk/commit/87d3a432af95f4cf96aa02351ed5fcc51cca6e7b) Fix collection filtered pagination. +* (sims) [#23952](https://github.com/cosmos/cosmos-sdk/pull/23952) Use liveness matrix for validator sign status in sims ## [v0.50.12](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.12) - 2025-02-20 diff --git a/x/simulation/mock_cometbft.go b/x/simulation/mock_cometbft.go index 80ef32282c..b0c660ae81 100644 --- a/x/simulation/mock_cometbft.go +++ b/x/simulation/mock_cometbft.go @@ -149,10 +149,13 @@ func RandomRequestFinalizeBlock( signed = false } + var commitStatus cmtproto.BlockIDFlag if signed { event("begin_block", "signing", "signed") + commitStatus = cmtproto.BlockIDFlagCommit } else { event("begin_block", "signing", "missed") + commitStatus = cmtproto.BlockIDFlagAbsent } pubkey, err := cryptoenc.PubKeyFromProto(mVal.val.PubKey) @@ -165,7 +168,7 @@ func RandomRequestFinalizeBlock( Address: pubkey.Address(), Power: mVal.val.Power, }, - BlockIdFlag: cmtproto.BlockIDFlagCommit, + BlockIdFlag: commitStatus, } }