Skip to content

enable 0rtt in streamer #6377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
3 changes: 3 additions & 0 deletions streamer/src/quic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ pub(crate) fn configure_server(
tls_server_config_builder().with_single_cert(vec![cert], priv_key)?;
server_tls_config.alpn_protocols = vec![ALPN_TPU_PROTOCOL_ID.to_vec()];
server_tls_config.key_log = Arc::new(KeyLogFile::new());
// enable 0rtt on the server side
server_tls_config.max_early_data_size = u32::MAX;

Choose a reason for hiding this comment

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

You may also need to set initial_max_data to something along the lines of 100 MTUs for this to make a difference in practice (as we'd want to start sending TXs right away, and if we only allow 10 packets to be sent before getting a reply, it will make very little difference).


let quic_server_config = QuicServerConfig::try_from(server_tls_config)?;

let mut server_config = ServerConfig::with_crypto(Arc::new(quic_server_config));
Expand Down
Loading