From 3cd524ca6dd931c31979473e96d1a187d9f50916 Mon Sep 17 00:00:00 2001 From: Gianbelinche <39842759+gianbelinche@users.noreply.github.com> Date: Tue, 22 Jul 2025 11:00:21 -0300 Subject: [PATCH 01/18] fix loc ci --- .github/workflows/pr_loc.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_loc.yaml b/.github/workflows/pr_loc.yaml index 1a38400c74..f2b3216366 100644 --- a/.github/workflows/pr_loc.yaml +++ b/.github/workflows/pr_loc.yaml @@ -14,10 +14,17 @@ jobs: # Skip the job if the PR is from a fork since it doesn't have permissions to post comments if: github.event.pull_request.head.repo.fork == false steps: - - name: Checkout Base + - name: Find merge base + id: find_merge_base + run: | + MERGE_BASE=$(git merge-base HEAD origin/${{ github.event.pull_request.base.ref }}) + echo "merge_base=$MERGE_BASE" >> $GITHUB_OUTPUT + + - name: Checkout merge base commit uses: actions/checkout@v4 with: - ref: ${{ github.event.pull_request.base.sha }} + fetch-depth: 0 + ref: ${{ steps.find_merge_base.outputs.merge_base }} - name: Setup Rust Environment uses: ./.github/actions/setup-rust From 7f96a8b10912ca3b07a41fd811b228d10d27bfa1 Mon Sep 17 00:00:00 2001 From: Gianbelinche <39842759+gianbelinche@users.noreply.github.com> Date: Tue, 22 Jul 2025 11:05:47 -0300 Subject: [PATCH 02/18] Add checkout --- .github/workflows/pr_loc.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/pr_loc.yaml b/.github/workflows/pr_loc.yaml index f2b3216366..7bddb6152b 100644 --- a/.github/workflows/pr_loc.yaml +++ b/.github/workflows/pr_loc.yaml @@ -14,6 +14,14 @@ jobs: # Skip the job if the PR is from a fork since it doesn't have permissions to post comments if: github.event.pull_request.head.repo.fork == false steps: + - name: Checkout PR Code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Fetch base branch + run: git fetch origin main + - name: Find merge base id: find_merge_base run: | From a8046b3d28d502b991937a523c885f79461495bf Mon Sep 17 00:00:00 2001 From: Gianbelinche <39842759+gianbelinche@users.noreply.github.com> Date: Tue, 22 Jul 2025 11:15:42 -0300 Subject: [PATCH 03/18] check merge base --- .github/workflows/pr_loc.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_loc.yaml b/.github/workflows/pr_loc.yaml index 7bddb6152b..0cb0424296 100644 --- a/.github/workflows/pr_loc.yaml +++ b/.github/workflows/pr_loc.yaml @@ -20,13 +20,12 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} - name: Fetch base branch - run: git fetch origin main + run: git fetch origin ${{ github.event.pull_request.base.ref }} - name: Find merge base id: find_merge_base run: | - MERGE_BASE=$(git merge-base HEAD origin/${{ github.event.pull_request.base.ref }}) - echo "merge_base=$MERGE_BASE" >> $GITHUB_OUTPUT + git merge-base HEAD origin/${{ github.event.pull_request.base.ref }} - name: Checkout merge base commit uses: actions/checkout@v4 From a985dd9a57316bea8a1bd8c8ac380604d1b7e7f0 Mon Sep 17 00:00:00 2001 From: Gianbelinche <39842759+gianbelinche@users.noreply.github.com> Date: Tue, 22 Jul 2025 11:19:19 -0300 Subject: [PATCH 04/18] unify fetch and merge --- .github/workflows/pr_loc.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/pr_loc.yaml b/.github/workflows/pr_loc.yaml index 0cb0424296..444ad47d3d 100644 --- a/.github/workflows/pr_loc.yaml +++ b/.github/workflows/pr_loc.yaml @@ -18,13 +18,11 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} - - - name: Fetch base branch - run: git fetch origin ${{ github.event.pull_request.base.ref }} - name: Find merge base id: find_merge_base run: | + git fetch origin ${{ github.event.pull_request.base.ref }} git merge-base HEAD origin/${{ github.event.pull_request.base.ref }} - name: Checkout merge base commit From e6c2abef37009af3e15a87c2a62c39d0881fdeaf Mon Sep 17 00:00:00 2001 From: Gianbelinche <39842759+gianbelinche@users.noreply.github.com> Date: Tue, 22 Jul 2025 11:21:44 -0300 Subject: [PATCH 05/18] add fetch current branch --- .github/workflows/pr_loc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr_loc.yaml b/.github/workflows/pr_loc.yaml index 444ad47d3d..da3c4e40c4 100644 --- a/.github/workflows/pr_loc.yaml +++ b/.github/workflows/pr_loc.yaml @@ -22,6 +22,7 @@ jobs: - name: Find merge base id: find_merge_base run: | + git fetch origin ${{ github.event.pull_request.head.ref }} git fetch origin ${{ github.event.pull_request.base.ref }} git merge-base HEAD origin/${{ github.event.pull_request.base.ref }} From d784aa2f78ffc51a14d1958614e1b1dfde499103 Mon Sep 17 00:00:00 2001 From: Gianbelinche <39842759+gianbelinche@users.noreply.github.com> Date: Tue, 22 Jul 2025 11:24:15 -0300 Subject: [PATCH 06/18] use head ref --- .github/workflows/pr_loc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_loc.yaml b/.github/workflows/pr_loc.yaml index da3c4e40c4..1c43a53c96 100644 --- a/.github/workflows/pr_loc.yaml +++ b/.github/workflows/pr_loc.yaml @@ -24,7 +24,7 @@ jobs: run: | git fetch origin ${{ github.event.pull_request.head.ref }} git fetch origin ${{ github.event.pull_request.base.ref }} - git merge-base HEAD origin/${{ github.event.pull_request.base.ref }} + git merge-base origin/${{ github.event.pull_request.head.ref }} origin/${{ github.event.pull_request.base.ref }} - name: Checkout merge base commit uses: actions/checkout@v4 From 5297c83599f1c5a9f34cd615d80b040e43d7816c Mon Sep 17 00:00:00 2001 From: Gianbelinche <39842759+gianbelinche@users.noreply.github.com> Date: Tue, 22 Jul 2025 12:12:31 -0300 Subject: [PATCH 07/18] add depth --- .github/workflows/pr_loc.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_loc.yaml b/.github/workflows/pr_loc.yaml index 1c43a53c96..cef1e48182 100644 --- a/.github/workflows/pr_loc.yaml +++ b/.github/workflows/pr_loc.yaml @@ -22,8 +22,8 @@ jobs: - name: Find merge base id: find_merge_base run: | - git fetch origin ${{ github.event.pull_request.head.ref }} - git fetch origin ${{ github.event.pull_request.base.ref }} + git fetch --depth=100000 origin ${{ github.event.pull_request.head.ref }} + git fetch --depth=100000 origin ${{ github.event.pull_request.base.ref }} git merge-base origin/${{ github.event.pull_request.head.ref }} origin/${{ github.event.pull_request.base.ref }} - name: Checkout merge base commit From 7b27129adf195c7a68d0cdec0a8183e6f51ae5db Mon Sep 17 00:00:00 2001 From: Gianbelinche <39842759+gianbelinche@users.noreply.github.com> Date: Tue, 22 Jul 2025 12:16:08 -0300 Subject: [PATCH 08/18] add merge base var --- .github/workflows/pr_loc.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr_loc.yaml b/.github/workflows/pr_loc.yaml index cef1e48182..b4bd6b5b0a 100644 --- a/.github/workflows/pr_loc.yaml +++ b/.github/workflows/pr_loc.yaml @@ -24,7 +24,8 @@ jobs: run: | git fetch --depth=100000 origin ${{ github.event.pull_request.head.ref }} git fetch --depth=100000 origin ${{ github.event.pull_request.base.ref }} - git merge-base origin/${{ github.event.pull_request.head.ref }} origin/${{ github.event.pull_request.base.ref }} + MERGE_BASE=$(git merge-base origin/${{ github.event.pull_request.head.ref }} origin/${{ github.event.pull_request.base.ref }}) + echo "merge_base=$MERGE_BASE" >> $GITHUB_OUTPUT - name: Checkout merge base commit uses: actions/checkout@v4 From 602a030115d98676da5218541677bbdca764cbb9 Mon Sep 17 00:00:00 2001 From: Gianbelinche <39842759+gianbelinche@users.noreply.github.com> Date: Tue, 22 Jul 2025 12:58:42 -0300 Subject: [PATCH 09/18] Put ref on env var --- .github/workflows/pr_loc.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr_loc.yaml b/.github/workflows/pr_loc.yaml index b4bd6b5b0a..c5f5bcd190 100644 --- a/.github/workflows/pr_loc.yaml +++ b/.github/workflows/pr_loc.yaml @@ -21,10 +21,13 @@ jobs: - name: Find merge base id: find_merge_base + env: + HEAD_REF: ${{ github.event.pull_request.head.ref }} + BASE_REF: ${{ github.event.pull_request.base.ref }} run: | - git fetch --depth=100000 origin ${{ github.event.pull_request.head.ref }} - git fetch --depth=100000 origin ${{ github.event.pull_request.base.ref }} - MERGE_BASE=$(git merge-base origin/${{ github.event.pull_request.head.ref }} origin/${{ github.event.pull_request.base.ref }}) + git fetch --depth=100000 origin $HEAD_REF + git fetch --depth=100000 origin $BASE_REF + MERGE_BASE=$(git merge-base origin/$HEAD_REF origin/$BASE_REF) echo "merge_base=$MERGE_BASE" >> $GITHUB_OUTPUT - name: Checkout merge base commit From 3f520128a38dc52c904c92eb1748efcbeb460437 Mon Sep 17 00:00:00 2001 From: Gianbelinche <39842759+gianbelinche@users.noreply.github.com> Date: Tue, 22 Jul 2025 13:11:58 -0300 Subject: [PATCH 10/18] add echo --- .github/workflows/pr_loc.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pr_loc.yaml b/.github/workflows/pr_loc.yaml index c5f5bcd190..316803c62a 100644 --- a/.github/workflows/pr_loc.yaml +++ b/.github/workflows/pr_loc.yaml @@ -77,6 +77,10 @@ jobs: echo "report_exists=false" >> $GITHUB_OUTPUT fi + - name: Report exists + run: + echo "Report exists: ${{ steps.check_report.outputs.report_exists }}" + - name: Find comment if: steps.check_report.outputs.report_exists == 'true' continue-on-error: true From 806f09750e4d5607940333f44c393bb204d2fd61 Mon Sep 17 00:00:00 2001 From: Gianbelinche <39842759+gianbelinche@users.noreply.github.com> Date: Tue, 22 Jul 2025 13:14:48 -0300 Subject: [PATCH 11/18] fix lint --- .github/workflows/pr_loc.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pr_loc.yaml b/.github/workflows/pr_loc.yaml index 316803c62a..7185f90018 100644 --- a/.github/workflows/pr_loc.yaml +++ b/.github/workflows/pr_loc.yaml @@ -78,8 +78,7 @@ jobs: fi - name: Report exists - run: - echo "Report exists: ${{ steps.check_report.outputs.report_exists }}" + run: echo "Report exists ${{ steps.check_report.outputs.report_exists }}" - name: Find comment if: steps.check_report.outputs.report_exists == 'true' From 2c31708a86cad9ab71b57add72e6358ae1a60f28 Mon Sep 17 00:00:00 2001 From: Gianbelinche <39842759+gianbelinche@users.noreply.github.com> Date: Tue, 22 Jul 2025 13:20:35 -0300 Subject: [PATCH 12/18] Add a fake change --- crates/l2/sequencer/errors.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/l2/sequencer/errors.rs b/crates/l2/sequencer/errors.rs index 309c439db6..13a0ea56ea 100644 --- a/crates/l2/sequencer/errors.rs +++ b/crates/l2/sequencer/errors.rs @@ -173,7 +173,7 @@ pub enum BlockProducerError { InvalidForkChoice(#[from] InvalidForkChoice), #[error("Block Producer failed to produce block: {0}")] FailedToProduceBlock(String), - #[error("Block Producer failed to prepare PayloadAttributes timestamp: {0}")] + #[error("Block Producer failed to prepare fake change PayloadAttributes timestamp: {0}")] FailedToGetSystemTime(#[from] std::time::SystemTimeError), #[error("Block Producer failed because of a store error: {0}")] StoreError(#[from] StoreError), From d04a5491b676be11b5c3c6902905ee9a104c730a Mon Sep 17 00:00:00 2001 From: Gianbelinche <39842759+gianbelinche@users.noreply.github.com> Date: Tue, 22 Jul 2025 13:24:15 -0300 Subject: [PATCH 13/18] Revert "Add a fake change" This reverts commit 2c31708a86cad9ab71b57add72e6358ae1a60f28. --- crates/l2/sequencer/errors.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/l2/sequencer/errors.rs b/crates/l2/sequencer/errors.rs index 13a0ea56ea..309c439db6 100644 --- a/crates/l2/sequencer/errors.rs +++ b/crates/l2/sequencer/errors.rs @@ -173,7 +173,7 @@ pub enum BlockProducerError { InvalidForkChoice(#[from] InvalidForkChoice), #[error("Block Producer failed to produce block: {0}")] FailedToProduceBlock(String), - #[error("Block Producer failed to prepare fake change PayloadAttributes timestamp: {0}")] + #[error("Block Producer failed to prepare PayloadAttributes timestamp: {0}")] FailedToGetSystemTime(#[from] std::time::SystemTimeError), #[error("Block Producer failed because of a store error: {0}")] StoreError(#[from] StoreError), From be6104100f81cc8da9432248bad815dfec2118aa Mon Sep 17 00:00:00 2001 From: Gianbelinche <39842759+gianbelinche@users.noreply.github.com> Date: Tue, 22 Jul 2025 13:24:33 -0300 Subject: [PATCH 14/18] Add fake change --- crates/l2/sequencer/l1_proof_verifier.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/l2/sequencer/l1_proof_verifier.rs b/crates/l2/sequencer/l1_proof_verifier.rs index 9bbe51a184..f695ce6a54 100644 --- a/crates/l2/sequencer/l1_proof_verifier.rs +++ b/crates/l2/sequencer/l1_proof_verifier.rs @@ -271,6 +271,7 @@ impl L1ProofVerifier { &self, verification_data: &AggregationModeVerificationData, ) -> Result { + let fake_var = 1; for rpc_url in &self.eth_client.urls { for beacon_url in &self.beacon_urls { match aligned_check_proof_verification( From 09f87c223947a6ce0b79effafcedcd6f9a2bee43 Mon Sep 17 00:00:00 2001 From: Gianbelinche <39842759+gianbelinche@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:34:49 -0300 Subject: [PATCH 15/18] Add unshallow --- .github/workflows/pr_loc.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_loc.yaml b/.github/workflows/pr_loc.yaml index 7185f90018..7b414bd4dd 100644 --- a/.github/workflows/pr_loc.yaml +++ b/.github/workflows/pr_loc.yaml @@ -25,8 +25,8 @@ jobs: HEAD_REF: ${{ github.event.pull_request.head.ref }} BASE_REF: ${{ github.event.pull_request.base.ref }} run: | - git fetch --depth=100000 origin $HEAD_REF - git fetch --depth=100000 origin $BASE_REF + git fetch --unshallow origin $HEAD_REF + git fetch --unshallow origin $BASE_REF MERGE_BASE=$(git merge-base origin/$HEAD_REF origin/$BASE_REF) echo "merge_base=$MERGE_BASE" >> $GITHUB_OUTPUT From 60e0372c909ef8d87ce7101e193daeaf90a08d92 Mon Sep 17 00:00:00 2001 From: Gianbelinche <39842759+gianbelinche@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:36:00 -0300 Subject: [PATCH 16/18] Revert "Add unshallow" This reverts commit 09f87c223947a6ce0b79effafcedcd6f9a2bee43. --- .github/workflows/pr_loc.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr_loc.yaml b/.github/workflows/pr_loc.yaml index 7b414bd4dd..7185f90018 100644 --- a/.github/workflows/pr_loc.yaml +++ b/.github/workflows/pr_loc.yaml @@ -25,8 +25,8 @@ jobs: HEAD_REF: ${{ github.event.pull_request.head.ref }} BASE_REF: ${{ github.event.pull_request.base.ref }} run: | - git fetch --unshallow origin $HEAD_REF - git fetch --unshallow origin $BASE_REF + git fetch --depth=100000 origin $HEAD_REF + git fetch --depth=100000 origin $BASE_REF MERGE_BASE=$(git merge-base origin/$HEAD_REF origin/$BASE_REF) echo "merge_base=$MERGE_BASE" >> $GITHUB_OUTPUT From c5d28df27c86ce41ee3f47e29ee3a6ced7a16850 Mon Sep 17 00:00:00 2001 From: Gianbelinche <39842759+gianbelinche@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:36:03 -0300 Subject: [PATCH 17/18] Revert "Add fake change" This reverts commit be6104100f81cc8da9432248bad815dfec2118aa. --- crates/l2/sequencer/l1_proof_verifier.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/l2/sequencer/l1_proof_verifier.rs b/crates/l2/sequencer/l1_proof_verifier.rs index f695ce6a54..9bbe51a184 100644 --- a/crates/l2/sequencer/l1_proof_verifier.rs +++ b/crates/l2/sequencer/l1_proof_verifier.rs @@ -271,7 +271,6 @@ impl L1ProofVerifier { &self, verification_data: &AggregationModeVerificationData, ) -> Result { - let fake_var = 1; for rpc_url in &self.eth_client.urls { for beacon_url in &self.beacon_urls { match aligned_check_proof_verification( From 3d05a0d82b0d04ce4bc1f37fedc4d79f3596157b Mon Sep 17 00:00:00 2001 From: Gianbelinche <39842759+gianbelinche@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:38:02 -0300 Subject: [PATCH 18/18] Remove extra step --- .github/workflows/pr_loc.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/pr_loc.yaml b/.github/workflows/pr_loc.yaml index 7185f90018..c5f5bcd190 100644 --- a/.github/workflows/pr_loc.yaml +++ b/.github/workflows/pr_loc.yaml @@ -77,9 +77,6 @@ jobs: echo "report_exists=false" >> $GITHUB_OUTPUT fi - - name: Report exists - run: echo "Report exists ${{ steps.check_report.outputs.report_exists }}" - - name: Find comment if: steps.check_report.outputs.report_exists == 'true' continue-on-error: true