Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,502 changes: 759 additions & 743 deletions Cargo.lock

Large diffs are not rendered by default.

66 changes: 34 additions & 32 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,17 @@ anyhow = "1.0.102"
ark-ff = "0.5.0"
assert_matches = "1.5.0"
async-trait = "0.1.89"
axum = "0.8.8"
axum = "0.8.9"
base64 = "0.22.1"
bincode = "2.0.1"
# TODO: bincode development stopped, we should probably replace it. 3.0.0 is just a compile_error! in lib.rs
bincode = "=2.0.1"
bitvec = "1.0.1"
blockifier = { version = "0.18.0-rc.1", features = [
"node_api",
"reexecution",
] }
bytes = "1.11.1"
cached = "0.44.0"
cached = "0.59.0"
# This one needs to match the version used by blockifier
cairo-lang-starknet-classes = "=2.17.0-rc.4"
# This one needs to match the version used by blockifier
Expand All @@ -67,12 +68,13 @@ casm-compiler-v1_0_0-alpha6 = { package = "cairo-lang-starknet", git = "https://
casm-compiler-v1_0_0-rc0 = { package = "cairo-lang-starknet", git = "https://github.com/starkware-libs/cairo", tag = "v1.0.0-rc0" }
casm-compiler-v1_1_1 = { package = "cairo-lang-starknet", version = "=1.1.1" }
casm-compiler-v2 = { package = "cairo-lang-starknet", version = "=2.17.0-rc.4" }
clap = "4.6.0"
clap = "4.6.1"
console-subscriber = "0.5"
const-decoder = "0.4.0"
const_format = "0.2.35"
criterion = "0.5.1"
const_format = "0.2.36"
criterion = "0.8.2"
dashmap = "6.1"
# upgrade once `rand` is upgraded
fake = "2.10.0"
ff = "0.13"
flate2 = "1.1.9"
Expand All @@ -82,75 +84,75 @@ governor = "0.10.4"
hex = "0.4.3"
http = "1.4.0"
http-body = "1.0.1"
hyper = "1.8.1"
hyper = "1.9.0"
ipnet = "2.12.0"
jemallocator = "0.5.4"
libc = "0.2.183"
libc = "0.2.185"
libp2p = { version = "0.56.0", default-features = false }
libp2p-identity = "0.2.13"
libp2p-plaintext = "0.43.0"
libp2p-swarm-test = "0.6.0"
metrics = "0.24.3"
metrics-exporter-prometheus = { version = "0.18.1", default-features = false }
mime = "0.3"
mockall = "0.11.4"
mockall = "0.14.0"
num-bigint = "0.4.6"
num-traits = "0.2.19"
paste = "1.0.15"
pretty_assertions_sorted = "1.2.3"
primitive-types = "0.12.2"
primitive-types = "0.14.0"
proc-macro2 = "1.0.106"
proptest = "1.11.0"
prost = "0.13.5"
prost-build = "0.13.5"
prost-types = "0.13.5"
prost = "0.14.3"
prost-build = "0.14.3"
prost-types = "0.14.3"
quote = "1.0"
r2d2 = "0.8.10"
r2d2_sqlite = "0.31.0"
r2d2_sqlite = "0.33.0"
# upgrade once supported by `primitive-types`
rand = "0.8.5"
rand_chacha = "0.3.1"
rayon = "1.11.0"
reqwest = { version = "0.12.28", default-features = false, features = [
rayon = "1.12.0"
reqwest = { version = "0.13.2", default-features = false, features = [
"http2",
"rustls-tls-native-roots",
"charset",
"gzip",
"deflate",
] }
rstest = "0.18.2"
rusqlite = "0.37.0"
rustls = "0.23.37"
semver = "1.0.27"
rstest = "0.26.1"
rusqlite = "0.39.0"
rustls = "0.23.38"
semver = "1.0.28"
serde = "1.0.228"
serde_json = "1.0.149"
serde_with = "3.18.0"
sha2 = "0.10.9"
sha3 = "0.10"
sha2 = "0.11.0"
sha3 = "0.11"
siphasher = "1.0.2"
smallvec = "1.15.1"
# This one needs to match the version used by blockifier
starknet-types-core = "=0.2.4"
# This one needs to match the version used by blockifier
starknet_api = { version = "0.18.0-rc.1" }
syn = "1.0"
syn = "2.0"
tempfile = "3.27"
test-log = { version = "0.2.19", features = ["trace"] }
test-log = { version = "0.2.20", features = ["trace"] }
thiserror = "2.0.18"
time = "0.3.47"
tokio = "1.50"
tokio-retry = "0.3.0"
tokio = "1.52"
tokio-retry = "0.3.1"
tokio-stream = "0.1.18"
tokio-tungstenite = "0.27"
tokio-tungstenite = "0.29"
tokio-util = { version = "0.7.18", features = ["rt"] }
tower = { version = "0.4.13", default-features = false }
tower-http = { version = "0.5.2", default-features = false }
tower = { version = "0.5.3", default-features = false }
tower-http = { version = "0.6.8", default-features = false }
tracing = "0.1.44"
tracing-subscriber = { version = "0.3.23", features = ["json"] }
unsigned-varint = "0.8.0"
url = "2.5.8"
vergen = { version = "8", default-features = false }
vergen-gitcl = { version = "9", default-features = false }
void = "1.0.2"
warp = "0.3.7"
warp = { version = "0.4.2", features = ["server"] }
wiremock = "0.6.5"
zeroize = "1.8.2"
zstd = "0.13.3"
Expand Down
3 changes: 0 additions & 3 deletions crates/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,5 @@ serde_with = { workspace = true }
sha3 = { workspace = true }
thiserror = { workspace = true }

[build-dependencies]
vergen = { workspace = true, features = ["git", "gitcl"] }

[dev-dependencies]
rstest = { workspace = true }
3 changes: 1 addition & 2 deletions crates/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ impl StorageAddress {
.unwrap();

let value = value.rem(max_address);
let mut b = [0u8; 32];
value.to_big_endian(&mut b);
let b = value.to_big_endian();
Self(Felt::from_be_slice(&b).expect("Truncated value should fit into a felt"))
}
}
Expand Down
1 change: 0 additions & 1 deletion crates/common/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,6 @@ mod tests {
});

#[rstest::rstest]
#[test]
#[case::declare_v0(declare_v0(), GOERLI_TESTNET)]
#[case::declare_v1(declare_v1(), ChainId::SEPOLIA_TESTNET)]
#[case::declare_v2(declare_v2(), ChainId::SEPOLIA_TESTNET)]
Expand Down
4 changes: 3 additions & 1 deletion crates/crypto/benches/bench.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#![allow(unexpected_cfgs)]

use std::hint::black_box;

use ::pathfinder_crypto::hash::poseidon::poseidon_hash;
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use criterion::{criterion_group, criterion_main, Criterion};
use pathfinder_crypto::algebra::curve::{ProjectivePoint, CURVE_G};
use pathfinder_crypto::algebra::field::{CurveOrderMontFelt, Felt, MontFelt};
use pathfinder_crypto::hash::pedersen::pedersen_hash;
Expand Down
2 changes: 1 addition & 1 deletion crates/ethereum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = { workspace = true }
rust-version = { workspace = true }

[dependencies]
alloy = { version = "1.8", default-features = false, features = ["contract", "eips", "rpc-types", "provider-ws", "reqwest-rustls-tls"] }
alloy = { version = "2.0", default-features = false, features = ["contract", "eips", "rpc-types", "provider-ws", "reqwest-rustls-tls"] }
anyhow = { workspace = true }
async-trait = { workspace = true }
const-decoder = { workspace = true }
Expand Down
6 changes: 4 additions & 2 deletions crates/feeder-gateway/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use std::collections::HashMap;
use std::convert::Infallible;
use std::future::Future;
use std::net::SocketAddr;
use std::num::NonZeroU32;
use std::path::PathBuf;
use std::sync::atomic::{AtomicBool, Ordering};
Expand Down Expand Up @@ -572,7 +573,8 @@ async fn serve(cli: Cli, storage_rx: Receiver<Option<(Storage, Chain)>>) -> anyh
)
.with(warp::filters::trace::request());

let (socket_addr, server_fut) = warp::serve(handler).bind_ephemeral(([127, 0, 0, 1], cli.port));
let socket_addr = SocketAddr::from(([127, 0, 0, 1], cli.port));
let server = warp::serve(handler).bind(socket_addr).await;
let span = tracing::info_span!("Server::run", ?socket_addr);
tracing::info!(parent: &span, "listening on http://{}", socket_addr);

Expand All @@ -583,7 +585,7 @@ async fn serve(cli: Cli, storage_rx: Receiver<Option<(Storage, Chain)>>) -> anyh

debug_create_port_marker_file("feeder_gateway", socket_addr.port(), data_directory);

server_fut.instrument(span).await;
server.run().instrument(span).await;

Ok(())
}
Expand Down
31 changes: 18 additions & 13 deletions crates/gateway-client/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,9 +555,10 @@ mod tests {
use warp::Filter;

use crate::builder::{retry0, retry_condition};
use crate::tests::bind_ephemeral;

// A test helper
fn status_queue_server(
async fn status_queue_server(
statuses: VecDeque<(StatusCode, &'static str)>,
) -> (JoinHandle<()>, SocketAddr) {
use std::cell::RefCell;
Expand All @@ -572,19 +573,21 @@ mod tests {
}
});

let (addr, run_srv) = warp::serve(any).bind_ephemeral(([127, 0, 0, 1], 0));
let server_handle = tokio::spawn(run_srv);
let (addr, listener) = bind_ephemeral().await;
let server = warp::serve(any).incoming(listener);
let server_handle = tokio::spawn(server.run());
(server_handle, addr)
}

// A test helper
fn slow_server() -> (tokio::task::JoinHandle<()>, std::net::SocketAddr) {
async fn slow_server() -> (tokio::task::JoinHandle<()>, std::net::SocketAddr) {
let any = warp::any().then(|| async {
tokio::time::sleep(Duration::from_secs(1)).await;
Result::<_, Infallible>::Ok(Builder::new().status(200).body(""))
});
let (addr, run_srv) = warp::serve(any).bind_ephemeral(([127, 0, 0, 1], 0));
let server_handle = tokio::spawn(run_srv);
let (addr, listener) = bind_ephemeral().await;
let server = warp::serve(any).incoming(listener);
let server_handle = tokio::spawn(server.run());
(server_handle, addr)
}

Expand All @@ -605,7 +608,7 @@ mod tests {
(StatusCode::SERVICE_UNAVAILABLE, ""),
]);

let (_jh, addr) = status_queue_server(statuses);
let (_jh, addr) = status_queue_server(statuses).await;
let result = retry0(
|| async {
let mut url = reqwest::Url::parse("http://localhost/").unwrap();
Expand Down Expand Up @@ -642,7 +645,7 @@ mod tests {
(StatusCode::SERVICE_UNAVAILABLE, ""),
]);

let (_jh, addr) = status_queue_server(statuses);
let (_jh, addr) = status_queue_server(statuses).await;
let error = retry0(
|| async {
let mut url = reqwest::Url::parse("http://localhost/").unwrap();
Expand All @@ -668,7 +671,7 @@ mod tests {

tokio::time::pause();

let (_jh, addr) = slow_server();
let (_jh, addr) = slow_server().await;
static CNT: AtomicUsize = AtomicUsize::new(0);

let fut = retry0(
Expand Down Expand Up @@ -707,18 +710,20 @@ mod tests {
use warp::http::response::Builder;
use warp::Filter;

use crate::tests::bind_ephemeral;
use crate::{BlockId, Client, GatewayApi};

fn server() -> (tokio::task::JoinHandle<()>, std::net::SocketAddr) {
async fn server() -> (tokio::task::JoinHandle<()>, std::net::SocketAddr) {
let any = warp::any().then(|| async { Builder::new().status(500).body("whatever") });
let (addr, run_srv) = warp::serve(any).bind_ephemeral(([127, 0, 0, 1], 0));
let server_handle = tokio::spawn(run_srv);
let (addr, listener) = bind_ephemeral().await;
let server = warp::serve(any).incoming(listener);
let server_handle = tokio::spawn(server.run());
(server_handle, addr)
}

#[tokio::test]
async fn causes_short_reply() {
let (_jh, addr) = server();
let (_jh, addr) = server().await;
let mut url = reqwest::Url::parse("http://localhost/").unwrap();
url.set_port(Some(addr.port())).unwrap();
let client = Client::for_test(url).unwrap().disable_retry_for_tests();
Expand Down
Loading
Loading