You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: portal-wire-protocol.md
+33Lines changed: 33 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,39 @@ The transmission of data that is too large to fit a single packet is done using
68
68
69
69
> The Portal wire protocol currently implements uTP over the `TALKREQ/TALKRESP` messages. Future plans are to move to the [sub-protocol data transmission](https://github.com/ethereum/devp2p/issues/229) in order to use a protocol native mechanism for establishing packet streams between clients.
70
70
71
+
Currently, the standard is to switch to uTP when the payload exceeds 1165 bytes. This may change over time, because it depends on a number of other variables. See an example derivation in rust:
72
+
```rs
73
+
/// The maximum size of a Discv5 packet.
74
+
constMAX_DISCV5_PACKET_SIZE:usize=1280;
75
+
76
+
/// The maximum size of a Discv5 talk request payload.
77
+
///
78
+
/// Discv5 talk request overhead:
79
+
/// * masking IV length: 16
80
+
/// * static header (protocol ID || version || flag || nonce || authdata-size) length: 23
0 commit comments