AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

fix(zcash): Fix regression in 3.2.2, improve performance by 15-18%, reduce firmware size by 4.4% (#2330)

Public commit record

What the developer wrote

Authored by Jack Grigg

100/100 · Strong
fix(zcash): Fix regression in 3.2.2, improve performance by 15-18%, reduce firmware size by 4.4% (#2330)

* Enable `pasta_curves/uninline-portable` feature flag

By default, `pasta_curves` marks its field arithmetic with `#[inline]`
or `#[inline(always)]`, which suggests to the compiler that the code
should be inlined which improves performance on most devices. However,
on embedded devices like Keystone, inlining can instead drastically
affect performance. `uninline-portable` turns off the annotations so
the compiler is less likely to inline the field arithmetic.

In past firmware releases, we've seen the Keystone firmware performance
be unaffected by inlining. However, firmware 3.2.2 saw a regression of
the size that we expect from inlining degradation, implying that other
changes to the surrounding code have altered the compiler's inlining
decisions. By enabling `uninline-portable` we should see the regression
disappear.

* Migrate to `pasta_curves 0.6.3` and enable assembly backend

This brings two sets of performance improvements:
- `pasta_curves 0.6.2` has general improvements which reduce the
overall signing time for Zcash transactions by around 0.7-1.6%.
- `pasta_curves 0.6.3` has dedicated field arithmetic assembly for
the Keystone target (`thumbv7em-none-eabihf`) which reduces the
overall signing time by around 15-18%.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit updates a Zcash cryptography dependency and changes compiler hints to fix a firmware performance regression and reduce firmware size. There is no security-relevant change visible in the diff.

Recommended action

No security action required. Treat as a routine dependency/performance optimization. If desired, verify the pasta_curves 0.6.2 and 0.6.3 changelogs for any security advisories, though none are referenced in the commit.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.