Skip to content

Commit 21d9066

Browse files
authored
Merge pull request #15 from xdecentralix/merge/upstream-main-2025-08-28
Merge/upstream main 2025 08 28
2 parents a45800d + 8484dc6 commit 21d9066

File tree

26 files changed

+481
-404
lines changed

26 files changed

+481
-404
lines changed

.github/workflows/codeql.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "CodeQL Advanced"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: '35 21 * * 4'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze (${{ matrix.language }})
14+
runs-on: ubuntu-latest
15+
permissions:
16+
security-events: write
17+
packages: read
18+
actions: read
19+
contents: read
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
include:
25+
- language: rust
26+
build-mode: none
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30+
31+
- name: Initialize CodeQL
32+
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
33+
with:
34+
languages: ${{ matrix.language }}
35+
build-mode: ${{ matrix.build-mode }}
36+
37+
- name: Perform CodeQL Analysis
38+
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
39+
with:
40+
category: "/language:${{matrix.language}}"

.github/workflows/pull-request.yaml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
# We require PRs to be up to date before merging so technically it is not needed run the rust job
55
# on main. However for the cache to be usable in PRs we do need the job on main.
66
push:
7-
branches: [main]
7+
branches: [ main ]
88
jobs:
99
lint:
1010
timeout-minutes: 60
@@ -28,6 +28,25 @@ jobs:
2828
cargo clippy --version
2929
- run: cargo +nightly fmt --all -- --check
3030
- run: cargo clippy --locked --workspace --all-features --all-targets -- -D warnings
31+
32+
trivy:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
36+
with:
37+
persist-credentials: false
38+
39+
- name: Run Trivy
40+
uses: aquasecurity/trivy-action@dc5a429b52fcf669ce959baa2c2dd26090d2a6c4 # v0.32.0
41+
with:
42+
scan-type: 'fs'
43+
format: 'sarif'
44+
output: 'trivy-results.sarif'
45+
46+
- name: Upload Trivy scan results to GitHub Security
47+
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
48+
with:
49+
sarif_file: 'trivy-results.sarif'
3150

3251
nitpicker:
3352
runs-on: ubuntu-latest
@@ -182,10 +201,6 @@ jobs:
182201
persist-credentials: false
183202
- run: rustup toolchain install stable --profile minimal
184203
- uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de # v1.4.0
185-
with:
186-
# the latest version introduced a bug caused driver tests to fail
187-
# only switch back to latest stable version after it was fixed in anvil
188-
version: v1.2.3
189204
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
190205
- uses: taiki-e/install-action@e4767ccc6762bc4347ef2275c75ea77f5f36e27f # nextest
191206
# Build the driver's tests.

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
fetch-depth: 0 # Fetch all history for all branches and tags
1717
# Requires "Read and Write access to code" permission
1818
token: ${{ secrets.RELEASE_ACTION_ACCESS_TOKEN }}
19-
persist-credentials: false
2019

2120
- name: Fetch latest release version tag
2221
id: fetch_tag

crates/autopilot/src/run.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ async fn unbuffered_ethrpc(url: &Url) -> infra::blockchain::Rpc {
114114
.await
115115
}
116116

117-
#[instrument(skip_all, fields(chain = ?chain))]
117+
#[instrument(skip_all)]
118118
async fn ethereum(
119119
web3: DynWeb3,
120120
unbuffered_web3: DynWeb3,
@@ -158,8 +158,8 @@ pub async fn start(args: impl Iterator<Item = String>) {
158158
pub async fn run(args: Arguments) {
159159
assert!(args.shadow.is_none(), "cannot run in shadow mode");
160160
// Start a new span that measures the initialization phase of the autopilot
161-
let startup_span = info_span!("autopilot_startup", ?args.shared.node_url);
162-
let startup_span = startup_span.enter();
161+
let startup_span = info_span!("autopilot_startup");
162+
let startup_span_guard = startup_span.enter();
163163

164164
let db = Postgres::new(args.db_url.as_str(), args.insert_batch_size)
165165
.await
@@ -272,8 +272,6 @@ pub async fn run(args: Arguments) {
272272
&http_factory,
273273
&web3,
274274
args.shared.gas_estimators.as_slice(),
275-
args.shared.blocknative_api_key.clone(),
276-
args.shared.gas_estimation_driver_url.clone(),
277275
)
278276
.await
279277
.expect("failed to create gas price estimator"),
@@ -668,7 +666,7 @@ pub async fn run(args: Arguments) {
668666
Arc::new(maintenance),
669667
competition_updates_sender,
670668
);
671-
drop(startup_span);
669+
drop(startup_span_guard);
672670
run.run_forever().await;
673671
}
674672

0 commit comments

Comments
 (0)