Skip to content

Conversation

@fmoletta
Copy link
Contributor

@fmoletta fmoletta commented Nov 13, 2025

Motivation
Periodically checking and informing the user if there is a newer version of ethrex available

Description

  • Periodically query the latest relese of ethrex on GitHub and check against current running version, inform the user via log if there is a newer version available.

@github-actions github-actions bot added the L1 Ethereum client label Nov 13, 2025
@github-actions
Copy link

github-actions bot commented Nov 13, 2025

Lines of code report

Total lines added: 65
Total lines removed: 0
Total lines changed: 65

Detailed view
+-----------------------------+-------+------+
| File                        | Lines | Diff |
+-----------------------------+-------+------+
| ethrex/cmd/ethrex/ethrex.rs | 131   | +65  |
+-----------------------------+-------+------+

@fmoletta fmoletta marked this pull request as ready for review November 13, 2025 17:35
@fmoletta fmoletta requested a review from a team as a code owner November 13, 2025 17:35
@ethrex-project-sync ethrex-project-sync bot moved this to In Review in ethrex_l1 Nov 13, 2025
thiserror.workspace = true
itertools = "0.14.0"
url.workspace = true
semver = "1.0.27"
Copy link
Contributor

Choose a reason for hiding this comment

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

We're not following semver right now, so this is probably not the right tool to use.
I would just use a simple inequality check against latest.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But wouldn't that be bothersome if the user is running a newer version instead of the latest? Like a release candidate on in-development version?

Copy link
Contributor

Choose a reason for hiding this comment

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

In that case, I would still not use a crate that assumes semver in a package that explicitly opts out of semver. A simple function that splits and parses integers and checks whether any is less than the latest version's one should suffice.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I wanted to avoid implementing a manual comparison as we already have semver as a dependency on most of our lock files that provides it, but we can add it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added manual version comparison: f637f4e

}
let client = reqwest::Client::new();
let response = client
.get("https://api.github.com/repos/lambdaclass/ethrex/releases/latest")
Copy link
Contributor

Choose a reason for hiding this comment

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

I would put the URL in a constant in a common place

@ilitteri ilitteri added this pull request to the merge queue Dec 4, 2025
Merged via the queue into main with commit 6be9a43 Dec 4, 2025
43 checks passed
@ilitteri ilitteri deleted the check-potential-update branch December 4, 2025 18:06
@github-project-automation github-project-automation bot moved this from In Review to Done in ethrex_l1 Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L1 Ethereum client

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants