From 8c0e9b9a165ac67ec4aaa5e5cd16e4db9f6fe69a Mon Sep 17 00:00:00 2001 From: Simonas Kazlauskas Date: Tue, 14 Jan 2025 15:39:58 +0200 Subject: [PATCH] chain: require that new_transactions are empty (#12630) Based on top of https://github.com/near/nearcore/pull/12627. --- chain/chain/src/stateless_validation/chunk_validation.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chain/chain/src/stateless_validation/chunk_validation.rs b/chain/chain/src/stateless_validation/chunk_validation.rs index e908747986e..f4623d484ba 100644 --- a/chain/chain/src/stateless_validation/chunk_validation.rs +++ b/chain/chain/src/stateless_validation/chunk_validation.rs @@ -381,6 +381,11 @@ 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 {