Skip to content

Commit 54893ee

Browse files
committed
use new ticket
1 parent ca00288 commit 54893ee

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/app/blog/0rtt-api/page.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,17 +247,17 @@ Running the accept side prints a ticket that we need to connect. We want this to
247247
```
248248
Listening on: NodeAddr { node_id: PublicKey(e7c3b8c21ad4393c1d21c2ca05c5e9fdb6492aa2f077ae776a6fe6d0c5ff3dd7), relay_url: None, direct_addresses: {5.223.43.41:34981, [2a01:4ff:2f0:14d4::1]:34982} }
249249
Node ID: PublicKey(e7c3b8c21ad4393c1d21c2ca05c5e9fdb6492aa2f077ae776a6fe6d0c5ff3dd7)
250-
Ticket: nodeadt4hogcdlkdspa5ehbmubof5h63msjkulyhpltxnjx6nugf7465oaacaac56kzjuwiqeajkaecp6axqctkaaaaaaaaaaaabu2iqe
250+
Ticket: nodeadt4hogcdlkdspa5ehbmubof5h63msjkulyhpltxnjx6nugf7465oaacaac56kzjrtxaeajkaecp6axqctkaaaaaaaaaaaabrxxae
251251
```
252252

253253
## Connect side
254254

255255
On the connect side, we just need to specify the node ticket to connect to and optionally the number of rounds.
256256

257257
```
258-
❯ RUST_LOG=0rtt=trace cargo run --release --features examples --example 0rtt nodeadt4hogcdlkdspa5ehbmubof5h63msjkulyhpltxnjx6nugf7465oaacaac56kzjuwiqeajkaecp6axqctkaaaaaaaaaaaabu2iqe
258+
❯ RUST_LOG=0rtt=trace cargo run --release --features examples --example 0rtt nodeadt4hogcdlkdspa5ehbmubof5h63msjkulyhpltxnjx6nugf7465oaacaac56kzjrtxaeajkaecp6axqctkaaaaaaaaaaaabrxxae
259259
Finished `release` profile [optimized + debuginfo] target(s) in 0.17s
260-
Running `target/release/examples/0rtt nodeadt4hogcdlkdspa5ehbmubof5h63msjkulyhpltxnjx6nugf7465oaacaac56kzjuwiqeajkaecp6axqctkaaaaaaaaaaaabu2iqe`
260+
Running `target/release/examples/0rtt nodeadt4hogcdlkdspa5ehbmubof5h63msjkulyhpltxnjx6nugf7465oaacaac56kzjrtxaeajkaecp6axqctkaaaaaaaaaaaabrxxae`
261261
2025-05-27T11:13:09.846859Z TRACE 0rtt: 0-RTT not possible from our side
262262
round 0: 537464 us
263263
2025-05-27T11:13:10.384057Z TRACE 0rtt: 0-RTT possible from our side
@@ -334,10 +334,10 @@ So you would use 0-RTT if communication is in small bursts spaced many minutes t
334334
So this is the option we ended up implementing. Here is the output after this modification. We now get a 0-rtt connection every time.
335335

336336
```
337-
❯ RUST_LOG=0rtt=trace cargo run --release --features examples --example 0rtt nodeadt4hogcdlkdspa5ehbmubof5h63msjkulyhpltxnjx6nugf7465oaacaac56kzjuwiqeajkaecp6axqctkaaaaaaaaaaaabu2iqe
337+
❯ RUST_LOG=0rtt=trace cargo run --release --features examples --example 0rtt nodeadt4hogcdlkdspa5ehbmubof5h63msjkulyhpltxnjx6nugf7465oaacaac56kzjrtxaeajkaecp6axqctkaaaaaaaaaaaabrxxae
338338
Compiling iroh v0.35.0 (/Users/rklaehn/projects_git/iroh/iroh)
339339
Finished `release` profile [optimized + debuginfo] target(s) in 16.63s
340-
Running `target/release/examples/0rtt nodeadt4hogcdlkdspa5ehbmubof5h63msjkulyhpltxnjx6nugf7465oaacaac56kzjuwiqeajkaecp6axqctkaaaaaaaaaaaabu2iqe`
340+
Running `target/release/examples/0rtt nodeadt4hogcdlkdspa5ehbmubof5h63msjkulyhpltxnjx6nugf7465oaacaac56kzjrtxaeajkaecp6axqctkaaaaaaaaaaaabrxxae`
341341
2025-05-27T11:17:11.384959Z TRACE 0rtt: 0-RTT not possible from our side
342342
round 0: 556011 us
343343
2025-05-27T11:17:11.941692Z TRACE 0rtt: 0-RTT possible from our side
@@ -440,7 +440,7 @@ cargo run --release --features=examples --example 0rtt <ticket>
440440
You can also connect to our test node that should be far away from most readers of this blog post:
441441

442442
```
443-
cargo run --release --features examples --example 0rtt nodeadt4hogcdlkdspa5ehbmubof5h63msjkulyhpltxnjx6nugf7465oaacaac56kzjuwiqeajkaecp6axqctkaaaaaaaaaaaabu2iqe
443+
cargo run --release --features examples --example 0rtt nodeadt4hogcdlkdspa5ehbmubof5h63msjkulyhpltxnjx6nugf7465oaacaac56kzjrtxaeajkaecp6axqctkaaaaaaaaaaaabrxxae
444444
```
445445

446446
You can disable 0-rtt using the `--disable-0rtt` arg. Since the node above is far away, you should see a noticeable difference.

0 commit comments

Comments
 (0)