Skip to content

Backport slicing improvements 0.26.x#281

Merged
apoelstra merged 7 commits into
ElementsProject:0.26.xfrom
philipr-za:backport-slicing-improvements-0.26.x
Jun 16, 2026
Merged

Backport slicing improvements 0.26.x#281
apoelstra merged 7 commits into
ElementsProject:0.26.xfrom
philipr-za:backport-slicing-improvements-0.26.x

Conversation

@philipr-za

Copy link
Copy Markdown

There are a number of useful improvements from #279 we would like to include in 0.26.x.

@philipr-za philipr-za force-pushed the backport-slicing-improvements-0.26.x branch from 75753a0 to c96fb88 Compare June 15, 2026 22:20
apoelstra and others added 5 commits June 15, 2026 23:32
These unwraps and indexing (which hide more panic paths) irritated me, and also
would need to be tweaked once we get rid of the Hash::from_slice methods. I
figured I'd preemptively get rid of them.
I don't *think* it's possible to create a rangeproof with a sidechannel smaller
than 64 bytes (if you create a 0-sized "proof of exact value" then unwinding
will fail entirely, and anything larger I think has at least one ring, so 128
bytes or more). Unsure.

But better not to assume this by indexing recklessly into the sidechannel
message.
We should redo the error types here as well at some point.
Currently we allow decoding segwit v0 programs which have uncompressed/hybrid
keys (not allowed) and I suspect that if you provide a too-short address then
you'll get a panic here.
Lol, this code was so close and yet so far.

pset
@philipr-za philipr-za force-pushed the backport-slicing-improvements-0.26.x branch from c96fb88 to 4428361 Compare June 15, 2026 22:35
@philipr-za philipr-za force-pushed the backport-slicing-improvements-0.26.x branch from 89c2da8 to 6fee387 Compare June 15, 2026 23:15

@apoelstra apoelstra left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ACK 6fee387; successfully ran local tests

@apoelstra apoelstra merged commit cb56c8f into ElementsProject:0.26.x Jun 16, 2026
8 checks passed
@apoelstra

Copy link
Copy Markdown
Member

Tagged and published.

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.

2 participants