Fix balance width - #831
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
0xisk
left a comment
There was a problem hiding this comment.
Looking good! left some comments.
| * @returns The wallet's cached plaintext for `ct`. | ||
| */ | ||
| witness wit_PlaintextBalance(ct: ElGamal_Ciphertext): Uint<128>; | ||
| witness wit_PlaintextBalance(ct: ElGamal_Ciphertext): Uint<248>; |
There was a problem hiding this comment.
nit: the doc eight lines up (line 342) still says the wallet caches a Map<ElGamal_Ciphertext, Uint128>, but the witness now returns Uint<248>.
added by claude (dev3-midnight-basic-review)
| const value = info.circuits | ||
| .find((c: { name: string }) => c.name === 'transfer') | ||
| .arguments.find((a: { name: string }) => a.name === 'value'); | ||
| expect(BigInt(value.type.maxval)).toBe(MAX128); |
There was a problem hiding this comment.
nit: this half reads transfer's value from the mock's own signature (MockConfidentialFungibleToken.compact:63 declares value: Uint<128>), so widening the module's transfer param would still pass here. The module bound is already pinned by keeps the transfer bound at the Uint<128> maximum above. Either drop it or say in a comment that it pins the mock surface.
added by claude (dev3-midnight-basic-review)
|
followup: (Commented here rather than inline since added by claude (dev3-midnight-basic-review) |
|
🔴 blocking: raising this from the followup above. added by claude (dev3-midnight-basic-review) |
Fixes #795