Skip to content

Commit

Permalink
Merge pull request #755 from chainbound/dependabot/cargo/bolt-sidecar…
Browse files Browse the repository at this point in the history
…/sidecar-minor-29a5219b07

chore(deps): bump the sidecar-minor group across 1 directory with 8 updates
  • Loading branch information
merklefruit authored Feb 2, 2025
2 parents cd68336 + afdfe90 commit 74df293
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 52 deletions.
109 changes: 73 additions & 36 deletions bolt-sidecar/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions bolt-sidecar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@ clap = { version = "4.5.27", features = ["derive", "env"] }
# web
axum = { version = "0.8.2", features = ["macros", "ws"] }
axum-extra = { version = "0.10.0", features = ["typed-header"] }
tower-http = { version = "0.5.2", features = ["timeout"] }
tower-http = { version = "0.6.2", features = ["timeout"] }
http-body-util = "0.1.2"
reqwest = "0.12"
tower = "0.5.1"

# tokio
tokio = { version = "1", features = ["full"] }
tokio-tungstenite = "0.24.0"
tokio-tungstenite = "0.26.1"
tokio-retry = "0.3.0"
futures = "0.3"

# crypto
blst = "0.3.12"
tree_hash = "0.9"
tree_hash_derive = "0.8"
secp256k1 = { version = "0.29.0", features = ["rand"] }
tree_hash_derive = "0.9"
secp256k1 = { version = "0.30.0", features = ["rand"] }

# alloy
alloy = { version = "0.9.2", features = ["full", "provider-trace-api", "rpc-types-beacon"] }
Expand All @@ -55,7 +55,7 @@ lighthouse_eth2_keystore = { package = "eth2_keystore", git = "https://github.co
lighthouse_bls = { package = "bls", git = "https://github.com/sigp/lighthouse", version = "0.2.0" }

# types
uuid = { version = "1.11.0", features = ["v7", "serde"] }
uuid = { version = "1.12.1", features = ["v7", "serde"] }
serde = { version = "1.0.217", features = ["derive"] }
serde_json = "1.0.137"
parking_lot = "0.12.1"
Expand All @@ -78,8 +78,8 @@ tracing-subscriber = { version = "0.3.18", features = ["env-filter", "fmt"] }
tracing = "0.1.40"

# telemetry
metrics-exporter-prometheus = { version = "0.15.3", features = ["http-listener"] }
metrics = "0.23"
metrics-exporter-prometheus = { version = "0.16.1", features = ["http-listener"] }
metrics = "0.24"

[dev-dependencies]
alloy-node-bindings = "0.9.2" # must match alloy version
Expand Down
21 changes: 14 additions & 7 deletions bolt-sidecar/src/api/commitments/firewall/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ use futures::{
};
use serde::Serialize;
use serde_json::{json, Value};
use std::{collections::HashSet, sync::Arc, time::Duration};
use std::{collections::VecDeque, future::Future, pin::Pin, task::Poll};
use std::{
collections::{HashSet, VecDeque},
future::Future,
pin::Pin,
sync::Arc,
task::Poll,
time::Duration,
};
use tokio::{
net::TcpStream,
sync::{
Expand All @@ -18,7 +24,7 @@ use tokio::{
time::Interval,
};
use tokio_tungstenite::{
tungstenite::{self, Message},
tungstenite::{self, Message, Utf8Bytes},
MaybeTlsStream, WebSocketStream,
};
use tracing::{debug, error, info, instrument, trace, warn};
Expand Down Expand Up @@ -235,7 +241,7 @@ impl Future for CommitmentRequestProcessor {

match res_message {
Ok(Message::Text(text)) => {
this.handle_text_message(text);
this.handle_text_message(text.to_string());
}
Ok(Message::Close(_)) => {
warn!("websocket connection closed by server");
Expand Down Expand Up @@ -265,7 +271,7 @@ impl Future for CommitmentRequestProcessor {
progress = true;

trace!("sending ping message to websocket connection");
this.outgoing_messages.push_back(Message::Ping(vec![8, 0, 1, 7]));
this.outgoing_messages.push_back(Message::Ping(vec![8, 0, 1, 7].into()));
}
Poll::Pending => { /* fallthrough */ }
}
Expand Down Expand Up @@ -295,8 +301,9 @@ impl CommitmentRequestProcessor {
}
};

let message =
Message::Text(serde_json::to_string(&response).expect("to stringify response"));
let message = Message::Text(Utf8Bytes::from(
serde_json::to_string(&response).expect("to stringify response"),
));

// Add the message to the outgoing messages queue
self.outgoing_messages.push_back(message);
Expand Down
3 changes: 1 addition & 2 deletions bolt-sidecar/src/api/commitments/firewall/receiver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ async fn handle_connection(
api_events_tx: mpsc::Sender<CommitmentEvent>,
shutdown_rx: watch::Receiver<()>,
) -> Result<(), ConnectionHandlerError> {
let ws_config =
WebSocketConfig { max_message_size: Some(MAX_MESSAGE_SIZE), ..Default::default() };
let ws_config = WebSocketConfig::default().max_message_size(Some(MAX_MESSAGE_SIZE));

let mut request = url.clone().into_client_request()?;
request
Expand Down

0 comments on commit 74df293

Please sign in to comment.