Skip to content

retrieve: u3r_met returns c3_d#1034

Open
matthew-levan wants to merge 7 commits into
pkova/bloqfrom
ml/bloq
Open

retrieve: u3r_met returns c3_d#1034
matthew-levan wants to merge 7 commits into
pkova/bloqfrom
ml/bloq

Conversation

@matthew-levan

@matthew-levan matthew-levan commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

promotes u3r_met to return c3_d so it no longer truncates the bit/byte length of big atoms.

sweeps every callsite: comparisons are left as-is, values feeding 64-bit consumers (u3i_slab_init, u3r_chop_words widths) are widened to c3_d, and values that need 32-bit width get a recoverable bail:fail guard before an explicit (c3_w) narrow, preserving the behavior u3r_met previously raised on overflow. rap/rep keep their 32-bit tot_w overflow guards. met/xeb now return via u3i_chub so counts past 2^31 produce a correct atom instead of a truncated one.

pkova and others added 4 commits June 15, 2026 14:30
We do this so we don't allocate the same peer multiple times if we process
multiple packets from them before the routes get returned from the arvo scry.
@matthew-levan matthew-levan requested a review from a team as a code owner June 15, 2026 16:36
@joemfb

joemfb commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

The assertion pattern used here replaces the recoverable bail: fail exceptions that would have been generated in u3r_met() with unrecoverable bail: oops exceptions that will take down the process.

promotes `u3r_met` to return `c3_d` so it no longer truncates the bit/byte
length of big atoms.

sweeps every callsite: comparisons are left as-is, values feeding 64-bit
consumers (`u3i_slab_init`, `u3r_chop_words` widths) are widened to `c3_d`,
and values that need 32-bit width get a recoverable `bail:fail` guard before
an explicit `(c3_w)` narrow, preserving the behavior u3r_met previously raised
on overflow. `rap`/`rep` keep their 32-bit `tot_w` overflow guards. `met`/`xeb`
now return via `u3i_chub` so counts past `2^31` produce a correct atom instead
of a truncated one.
@matthew-levan

Copy link
Copy Markdown
Contributor Author

@joemfb thank you, fixed.

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.

4 participants