Skip to content
Open
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
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,15 @@ batcher_start: ./batcher/aligned-batcher/.env user_fund_payment_service
@echo "Starting Batcher..."
@cargo run --manifest-path ./batcher/aligned-batcher/Cargo.toml --release -- --config ./config-files/config-batcher.yaml --env-file ./batcher/aligned-batcher/.env

batcher_start_local: user_fund_payment_service
batcher_create_self_signed_cert:
@echo "Creating TLS certificate for localhost"
@mkcert -install -cert-file rootCA.crt -key-file rootCA.key localhost
@echo "TLS certificate created"

batcher_start_local: user_fund_payment_service batcher_create_self_signed_cert
@echo "Starting Batcher..."
@$(MAKE) run_storage &
@cargo run --manifest-path ./batcher/aligned-batcher/Cargo.toml --release -- --config ./config-files/config-batcher.yaml --env-file ./batcher/aligned-batcher/.env.dev
@cargo run --manifest-path ./batcher/aligned-batcher/Cargo.toml --release -- --config ./config-files/config-batcher.yaml --env-file ./batcher/aligned-batcher/.env.dev --cert ./rootCA.crt --key ./rootCA.key

batcher_start_local_no_fund:
@echo "Starting Batcher..."
Expand Down
158 changes: 140 additions & 18 deletions batcher/Cargo.lock

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

5 changes: 4 additions & 1 deletion batcher/aligned-batcher/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ bincode = "1.3.3"
aligned-sdk = { path = "../aligned-sdk" }
ciborium = "=0.2.2"
priority-queue = "2.1.0"
reqwest = { version = "0.12", features = ["json"] }
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls-native-roots"] }

once_cell = "1.20.2"
warp = "0.3.7"
prometheus = { version = "0.13.4", features = ["process"] }
backon = "1.2.0"
rustls = "0.23.19"
tokio-rustls = "0.26.1"

4 changes: 3 additions & 1 deletion batcher/aligned-batcher/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ use lambdaworks_crypto::merkle_tree::merkle::MerkleTree;
use log::{debug, error};
use serde::Serialize;
use tokio::{net::TcpStream, sync::RwLock};
use tokio_rustls::server::TlsStream;
use tokio_tungstenite::{
tungstenite::{Error, Message},
WebSocketStream,
};

pub(crate) type WsMessageSink = Arc<RwLock<SplitSink<WebSocketStream<TcpStream>, Message>>>;
pub(crate) type WsMessageSink =
Arc<RwLock<SplitSink<WebSocketStream<TlsStream<TcpStream>>, Message>>>;

pub(crate) async fn send_batch_inclusion_data_responses(
finalized_batch: Vec<BatchQueueEntry>,
Expand Down
Loading
Loading