mesa: handle over-mtu %peek#7360
Merged
Merged
Conversation
joemfb
reviewed
Jun 8, 2026
| ~ :: XX see https://github.com/urbit/urbit/pull/7358 | ||
| :: for a solution that turns over-mtu %peeks into %pokes | ||
| :: | ||
| `peek |
Collaborator
There was a problem hiding this comment.
A peek packet is very unlikely to exceed the MTU, since it's basically just a path. But the correlated %page response is at a much greater risk, since it includes that path and the response data fragment.
I think the best approach is to impose an upper bound on path length here (based on a full-size data fragment), and fallback to a content addressing layer (a poke requesting that the path be re-bound temporarily under a hash).
:: max data segment
> :(add 1 8 64 64 2 1.024)
1.163
:: remainder for encoded name
> (sub (sub 1.472 8) 1.163)
301
:: encoded-name overhead
> :(add 1 16 4 1 4 2)
28
:: max path
> (sub 301 28)
273
Collaborator
There was a problem hiding this comment.
It would probably be fine to punt on the content addressing fallback and just check the overall encoded name-length:
?. (lte 301 (rig (met:plot (en:name nam) 3))
:: slog peek path too long, give blocked response
:: issue %peek
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(note: %fine would crash for any path bigger than 384 bytes)