Skip to content

fix(l1,l2): extract Rust version from rust-toolchain.toml for all CI runs#3318

Closed
klaus993 wants to merge 6 commits into
mainfrom
remove-rust-version-var-from-ci
Closed

fix(l1,l2): extract Rust version from rust-toolchain.toml for all CI runs#3318
klaus993 wants to merge 6 commits into
mainfrom
remove-rust-version-var-from-ci

Conversation

@klaus993

@klaus993 klaus993 commented Jun 25, 2025

Copy link
Copy Markdown
Contributor

Motivation

GitHub Variables are excluded from workflow runs triggered by PRs from forks, so we need to remove this variable dependency in order for external collaborators to send PRs and run the CI properly

Description

  • The Extract Rust version from rust-toolchain.toml step (id: rustver) uses grep and sed to extract the rust version from the rust-toolchain.toml file that is in the root of the repository.
  • The Install Rust step utilizes the output of the previous step to send the version to the toolchain parameter
  • Note that in some cases, I had to move the Checkout step further up (it's also good practice to put it as high up as possible) so the rust-toolchain.toml file is available to be read.

To remove the usage of the RUST_VERSION GitHub Variable.
GitHub Variables are excluded from workflow runs triggered by PRs from forks,
so we need to remove this variable dependency in order for external
collaborators to send PRs and run the CI
@klaus993 klaus993 changed the title Extract Rust version from rust-toolchain.toml for all CI runs fix(l1,l2): extract Rust version from rust-toolchain.toml for all CI runs Jun 25, 2025
So the rust-toolchain.toml file is present
@github-actions

github-actions Bot commented Jun 25, 2025

Copy link
Copy Markdown

Benchmark Results Comparison

PR Results

Benchmark Results: Factorial

Command Mean [ms] Min [ms] Max [ms] Relative
revm_Factorial 229.7 ± 1.5 227.0 232.0 1.00
levm_Factorial 463.1 ± 5.7 458.9 478.4 2.02 ± 0.03

Benchmark Results: Factorial - Recursive

Command Mean [s] Min [s] Max [s] Relative
revm_FactorialRecursive 1.562 ± 0.018 1.534 1.594 1.00
levm_FactorialRecursive 2.780 ± 0.031 2.743 2.848 1.78 ± 0.03

Benchmark Results: Fibonacci

Command Mean [ms] Min [ms] Max [ms] Relative
revm_Fibonacci 206.8 ± 0.8 206.0 208.3 1.00
levm_Fibonacci 463.3 ± 6.1 457.5 477.8 2.24 ± 0.03

Benchmark Results: ManyHashes

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ManyHashes 8.6 ± 0.1 8.5 8.7 1.00
levm_ManyHashes 13.6 ± 0.1 13.5 13.8 1.58 ± 0.02

Benchmark Results: BubbleSort

Command Mean [s] Min [s] Max [s] Relative
revm_BubbleSort 3.208 ± 0.013 3.188 3.229 1.00
levm_BubbleSort 4.569 ± 0.166 4.497 5.038 1.42 ± 0.05

Benchmark Results: ERC20 - Transfer

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ERC20Transfer 244.0 ± 6.9 239.9 261.6 1.00
levm_ERC20Transfer 418.8 ± 2.7 417.4 426.4 1.72 ± 0.05

Benchmark Results: ERC20 - Mint

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ERC20Mint 137.3 ± 1.4 136.0 140.9 1.00
levm_ERC20Mint 265.1 ± 0.7 264.3 266.3 1.93 ± 0.02

Benchmark Results: ERC20 - Approval

Command Mean [s] Min [s] Max [s] Relative
revm_ERC20Approval 1.032 ± 0.005 1.027 1.038 1.00
levm_ERC20Approval 1.616 ± 0.037 1.598 1.720 1.57 ± 0.04

Main Results

Benchmark Results: Factorial

Command Mean [ms] Min [ms] Max [ms] Relative
revm_Factorial 230.3 ± 0.8 228.8 231.3 1.00
levm_Factorial 461.6 ± 2.1 459.6 466.9 2.00 ± 0.01

Benchmark Results: Factorial - Recursive

Command Mean [s] Min [s] Max [s] Relative
revm_FactorialRecursive 1.593 ± 0.028 1.565 1.658 1.00
levm_FactorialRecursive 2.748 ± 0.026 2.718 2.800 1.72 ± 0.03

Benchmark Results: Fibonacci

Command Mean [ms] Min [ms] Max [ms] Relative
revm_Fibonacci 207.1 ± 0.4 206.5 208.0 1.00
levm_Fibonacci 485.1 ± 55.7 455.7 625.8 2.34 ± 0.27

Benchmark Results: ManyHashes

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ManyHashes 8.6 ± 0.2 8.5 9.2 1.00
levm_ManyHashes 13.5 ± 0.2 13.3 13.9 1.57 ± 0.04

Benchmark Results: BubbleSort

Command Mean [s] Min [s] Max [s] Relative
revm_BubbleSort 3.195 ± 0.020 3.170 3.229 1.00
levm_BubbleSort 4.493 ± 0.012 4.481 4.523 1.41 ± 0.01

Benchmark Results: ERC20 - Transfer

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ERC20Transfer 238.5 ± 0.7 237.3 239.4 1.00
levm_ERC20Transfer 414.1 ± 1.8 412.7 417.2 1.74 ± 0.01

Benchmark Results: ERC20 - Mint

Command Mean [ms] Min [ms] Max [ms] Relative
revm_ERC20Mint 136.3 ± 0.9 135.3 137.7 1.00
levm_ERC20Mint 263.8 ± 1.7 261.5 267.2 1.94 ± 0.02

Benchmark Results: ERC20 - Approval

Command Mean [s] Min [s] Max [s] Relative
revm_ERC20Approval 1.026 ± 0.006 1.020 1.040 1.00
levm_ERC20Approval 1.603 ± 0.011 1.592 1.629 1.56 ± 0.01

@klaus993 klaus993 marked this pull request as ready for review June 25, 2025 18:46
@klaus993 klaus993 requested a review from a team as a code owner June 25, 2025 18:46
@klaus993 klaus993 changed the title fix(l1,l2): extract Rust version from rust-toolchain.toml for all CI runs fix(l1,l2): extract Rust version from rust-toolchain.toml for all CI runs. "performance" Jun 25, 2025
@klaus993 klaus993 changed the title fix(l1,l2): extract Rust version from rust-toolchain.toml for all CI runs. "performance" fix(l1,l2): extract Rust version from rust-toolchain.toml for all CI runs Jun 25, 2025
@klaus993 klaus993 added the performance Block execution throughput and performance in general label Jun 25, 2025
@github-actions

Copy link
Copy Markdown

Benchmark for a387196

Click to view benchmark
Test Base PR %
block payload building bench 0.2±0.00ns 0.2±0.00ns 0.00%

@github-actions

github-actions Bot commented Jun 25, 2025

Copy link
Copy Markdown

Benchmark Block Execution Results Comparison Against Main

Command Mean [s] Min [s] Max [s] Relative
base 212.182 ± 1.193 210.682 214.753 1.00 ± 0.01
head 211.691 ± 0.738 210.499 213.121 1.00

uses: actions/checkout@v4

- name: Rustup toolchain install
- name: Extract Rust version from rust-toolchain.toml

@mpaulucci mpaulucci Jun 26, 2025

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't you make a reusable job so we don't have to copy paste this everywhere? Like a reusable Install Rust job that takes the value from the rust-roolchain.

@github-actions

Copy link
Copy Markdown

Benchmark for 20b4c8b

Click to view benchmark
Test Base PR %
block payload building bench 0.2±0.00ns 0.2±0.00ns 0.00%

@mpaulucci

Copy link
Copy Markdown
Collaborator

I have this one to reemplace #3591 with a more DRY approach

@mpaulucci mpaulucci closed this Jul 10, 2025
@github-project-automation github-project-automation Bot moved this from Todo to Done in ethrex_performance Jul 10, 2025
@github-project-automation github-project-automation Bot moved this from In Review to Done in ethrex_l2 Jul 10, 2025
github-merge-queue Bot pushed a commit that referenced this pull request Jul 11, 2025
Continuation of #3318

**Motivation**

GitHub Variables are excluded from workflow runs triggered by PRs from
forks, so we need to remove this variable dependency in order for
external collaborators to send PRs and run the CI properly

**Description**

* The `Extract Rust version from rust-toolchain.toml` step (`id:
rustver`) uses `grep` and `sed` to extract the rust version from the
`rust-toolchain.toml` file that is in the root of the repository.
* The `Install Rust` step utilizes the output of the previous step to
send the version to the `toolchain` parameter
* Note that in some cases, I had to move the `Checkout` step further up
(it's also good practice to put it as high up as possible) so the
`rust-toolchain.toml` file is available to be read.

---------

Co-authored-by: Klaus Lungwitz <klaus.lungwitz@lambdaclass.com>
Co-authored-by: Javier Rodríguez Chatruc <49622509+jrchatruc@users.noreply.github.com>
d-roak pushed a commit to 1sixtech/ethrex that referenced this pull request Jul 17, 2025
Continuation of lambdaclass#3318

**Motivation**

GitHub Variables are excluded from workflow runs triggered by PRs from
forks, so we need to remove this variable dependency in order for
external collaborators to send PRs and run the CI properly

**Description**

* The `Extract Rust version from rust-toolchain.toml` step (`id:
rustver`) uses `grep` and `sed` to extract the rust version from the
`rust-toolchain.toml` file that is in the root of the repository.
* The `Install Rust` step utilizes the output of the previous step to
send the version to the `toolchain` parameter
* Note that in some cases, I had to move the `Checkout` step further up
(it's also good practice to put it as high up as possible) so the
`rust-toolchain.toml` file is available to be read.

---------

Co-authored-by: Klaus Lungwitz <klaus.lungwitz@lambdaclass.com>
Co-authored-by: Javier Rodríguez Chatruc <49622509+jrchatruc@users.noreply.github.com>
pedrobergamini pushed a commit to pedrobergamini/ethrex that referenced this pull request Aug 24, 2025
Continuation of lambdaclass#3318

**Motivation**

GitHub Variables are excluded from workflow runs triggered by PRs from
forks, so we need to remove this variable dependency in order for
external collaborators to send PRs and run the CI properly

**Description**

* The `Extract Rust version from rust-toolchain.toml` step (`id:
rustver`) uses `grep` and `sed` to extract the rust version from the
`rust-toolchain.toml` file that is in the root of the repository.
* The `Install Rust` step utilizes the output of the previous step to
send the version to the `toolchain` parameter
* Note that in some cases, I had to move the `Checkout` step further up
(it's also good practice to put it as high up as possible) so the
`rust-toolchain.toml` file is available to be read.

---------

Co-authored-by: Klaus Lungwitz <klaus.lungwitz@lambdaclass.com>
Co-authored-by: Javier Rodríguez Chatruc <49622509+jrchatruc@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L2 Rollup client performance Block execution throughput and performance in general

Projects

Status: Done
Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants