From 1b3db84297e6514114d8fd4048531d4ed1a48eab Mon Sep 17 00:00:00 2001 From: Chris Guimaraes Date: Fri, 5 Sep 2025 12:31:02 +0100 Subject: [PATCH 1/2] disabling cost-tracking on block replay --- stackslib/src/cli.rs | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/stackslib/src/cli.rs b/stackslib/src/cli.rs index 2d59f2d1dec..4ba0d4d444a 100644 --- a/stackslib/src/cli.rs +++ b/stackslib/src/cli.rs @@ -827,14 +827,14 @@ fn replay_block( block_am.weight(), true, ) { - Ok((receipt, _, _)) => { - if receipt.anchored_block_cost != cost { - println!("Failed processing block! block = {block_id}. Unexpected cost. expected = {cost}, evaluated = {}", - receipt.anchored_block_cost); - process::exit(1); - } - - info!("Block processed successfully! block = {block_id}"); + Ok((_, _, _)) => { + // if receipt.anchored_block_cost != cost { + // println!("Failed processing block! block = {block_id}. Unexpected cost. expected = {cost}, evaluated = {}", + // receipt.anchored_block_cost); + // process::exit(1); + // } + + info!("Cost check skipped. Block processed successfully! block = {block_id}"); } Err(e) => { println!("Failed processing block! block = {block_id}, error = {e:?}"); @@ -1143,14 +1143,14 @@ fn replay_block_nakamoto( Err(e) => (None, Some(e)), }; - if let Some(receipt) = ok_opt { - // check the cost - let evaluated_cost = receipt.anchored_block_cost.clone(); - if evaluated_cost != expected_cost { - println!("Failed processing block! block = {block_id}. Unexpected cost. expected = {expected_cost}, evaluated = {evaluated_cost}"); - process::exit(1); - } - } + // if let Some(receipt) = ok_opt { + // // check the cost + // let evaluated_cost = receipt.anchored_block_cost.clone(); + // if evaluated_cost != expected_cost { + // println!("Failed processing block! block = {block_id}. Unexpected cost. expected = {expected_cost}, evaluated = {evaluated_cost}"); + // process::exit(1); + // } + // } if let Some(e) = err_opt { // force rollback From 431ff457fc539dac97717908c5871e68d4c59168 Mon Sep 17 00:00:00 2001 From: Chris Guimaraes Date: Wed, 8 Oct 2025 08:46:02 +0100 Subject: [PATCH 2/2] whitespace issue --- clarity/src/vm/ast/parser/v2/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clarity/src/vm/ast/parser/v2/mod.rs b/clarity/src/vm/ast/parser/v2/mod.rs index ad0caf29d4b..9d9a587dc7c 100644 --- a/clarity/src/vm/ast/parser/v2/mod.rs +++ b/clarity/src/vm/ast/parser/v2/mod.rs @@ -65,6 +65,7 @@ enum ParserStackElement { impl<'a> Parser<'a> { pub fn new(input: &'a str, fail_fast: bool) -> Result { + let fail_fast = false; let lexer = match Lexer::new(input, fail_fast) { Ok(lexer) => lexer, Err(e) => return Err(ParseErrors::Lexer(e)), @@ -221,6 +222,7 @@ impl<'a> Parser<'a> { } => { if let Some(node) = node_opt { if !*whitespace && node.match_comment().is_none() { + dbg!(&node); self.add_diagnostic(ParseErrors::ExpectedWhitespace, node.span().clone())?; } nodes.push(node); @@ -1074,6 +1076,7 @@ impl<'a> Parser<'a> { } pub fn parse(input: &str) -> ParseResult> { + dbg!(input); let mut parser = match Parser::new(input, true) { Ok(parser) => parser, Err(e) => return Err(ParseError::new(e)), @@ -1093,6 +1096,7 @@ pub fn parse_collect_diagnostics( ) -> (Vec, Vec, bool) { // When not in fail_fast mode, Parser::new always returns Ok. let mut parser = Parser::new(input, false).unwrap(); + dbg!(input); // When not in fail_fast mode, Parser::parse always returns Ok. let stmts = parser.parse().unwrap();