Skip to content

mesa: handle over-mtu %peek#7360

Merged
pkova merged 6 commits into
developfrom
yu/handle-over-mtu-peek
Jun 12, 2026
Merged

mesa: handle over-mtu %peek#7360
pkova merged 6 commits into
developfrom
yu/handle-over-mtu-peek

Conversation

@yosoyubik

@yosoyubik yosoyubik commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

(note: %fine would crash for any path bigger than 384 bytes)

@yosoyubik yosoyubik changed the title mesa: handle on over-mtu %peek mesa: handle over-mtu %peek Jun 8, 2026
Comment thread pkg/arvo/sys/vane/ames.hoon Outdated
~ :: XX see https://github.com/urbit/urbit/pull/7358
:: for a solution that turns over-mtu %peeks into %pokes
::
`peek

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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

@yosoyubik yosoyubik marked this pull request as ready for review June 12, 2026 11:03
@pkova pkova merged commit 651ca0c into develop Jun 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants