Fr is the 255-bit scalar with a fixed modulus (equal to the subgroup order r) and all its operations are modulo arithmetics. Exposing it as separate type (zero-sized wrapping of an U256) is better signaling that the two have different semantics and avoids potential footgun.
What
Resolves https://github.com/stellar/rs-soroban-sdk/issues/1352
Why
Fr
is the 255-bit scalar with a fixed modulus (equal to the subgroup orderr
) and all its operations are modulo arithmetics. Exposing it as separate type (zero-sized wrapping of anU256
) is better signaling that the two have different semantics and avoids potential footgun.Known limitations
[TODO or N/A]