From e2833fb6c19a8b83f8947c8def2bc730df7fd19c Mon Sep 17 00:00:00 2001 From: Simonas Kazlauskas Date: Mon, 16 Dec 2024 17:34:47 +0200 Subject: [PATCH] state_witness: require that new_transactions are empty --- chain/chain/src/stateless_validation/chunk_validation.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chain/chain/src/stateless_validation/chunk_validation.rs b/chain/chain/src/stateless_validation/chunk_validation.rs index e908747986e..21f8b359fe3 100644 --- a/chain/chain/src/stateless_validation/chunk_validation.rs +++ b/chain/chain/src/stateless_validation/chunk_validation.rs @@ -381,6 +381,12 @@ pub fn pre_validate_chunk_state_witness( RelaxedChunkValidation, current_protocol_version ) { + + if !state_witness.new_transactions.is_empty() { + return Err(Error::InvalidChunkStateWitness(format!( + "Witness new_transactions must be empty", + ))); + } if last_chunk_block.header().is_genesis() { vec![true; state_witness.transactions.len()] } else {