From e36bf3057c4a06a72240f9287f8258166f246209 Mon Sep 17 00:00:00 2001 From: Franco Giachetta Date: Mon, 28 Oct 2024 13:17:55 +0000 Subject: [PATCH 1/2] Fix block workflow (#882) * fix * fix * fix * fix path --- .github/workflows/starknet-blocks.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/starknet-blocks.yml b/.github/workflows/starknet-blocks.yml index 492c621a3..99dcf3160 100644 --- a/.github/workflows/starknet-blocks.yml +++ b/.github/workflows/starknet-blocks.yml @@ -1,9 +1,8 @@ name: Execute blocks on: - push: - branches: [main] pull_request: + branches: [main] merge_group: types: [checks_requested] @@ -85,7 +84,7 @@ jobs: if: ${{ matrix.runner == 'native' }} run: | cd replay - sed -r -i 's/cairo_native.*rev.*[0-9a-z]+./cairo_native.git", rev = "${{ github.event.pull_request.head.sha }}"/' Cargo.toml + sed -r -i 's/cairo-native.*/cairo-native = { path = ".." }/' Cargo.toml - name: Run Blocks Native if: ${{ matrix.runner == 'native' }} From a628b247232296ca7058026881efb0ed43c83879 Mon Sep 17 00:00:00 2001 From: Edgar Date: Mon, 28 Oct 2024 15:40:18 +0100 Subject: [PATCH 2/2] move circuit allocas to init block (#872) Co-authored-by: Julian Gonzalez Calderon --- src/libfuncs/circuit.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libfuncs/circuit.rs b/src/libfuncs/circuit.rs index 0b09d02de..c04e73640 100644 --- a/src/libfuncs/circuit.rs +++ b/src/libfuncs/circuit.rs @@ -218,7 +218,7 @@ fn build_add_input<'ctx, 'this>( middle_insert_block.insert_value(context, location, accumulator, next_length, 0)?; // Get pointer to accumulator with alloc and store - let accumulator_ptr = middle_insert_block.alloca1( + let accumulator_ptr = helper.init_block().alloca1( context, location, accumulator.r#type(), @@ -261,10 +261,12 @@ fn build_add_input<'ctx, 'this>( // Alloc return data let data_ptr = - last_insert_block.alloca1(context, location, data_type, data_layout.align())?; + helper + .init_block() + .alloca1(context, location, data_type, data_layout.align())?; // Get pointer to accumulator with alloc and store - let accumulator_ptr = last_insert_block.alloca1( + let accumulator_ptr = helper.init_block().alloca1( context, location, accumulator.r#type(),