Skip to content

Conversation

@letypequividelespoubelles
Copy link
Collaborator

No description provided.

@letypequividelespoubelles letypequividelespoubelles linked an issue Aug 1, 2025 that may be closed by this pull request
@letypequividelespoubelles letypequividelespoubelles enabled auto-merge (squash) August 1, 2025 11:01
(begin (eq! (prc---ram-success)
(* (prc-blake-params---sufficient-gas) (prc-blake-params---f-is-a-bit)))
(if-not-zero (prc---ram-success)
(eq! (prc---return-gas) (- (prc---callee-gas) (prc-blake-params---blake-r)))
Copy link

Choose a reason for hiding this comment

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

Bug: BLAKE2F Precompile Gas Calculation Error

The BLAKE2F precompile's return gas calculation incorrectly subtracts only the number of rounds (blake-r) from callee-gas. It should instead subtract the total cost (GAS_CONST_BLAKE2_PER_ROUND * blake-r), as correctly used in the gas sufficiency check. This inconsistency leads to an overestimation of returned gas.

Locations (1)
Fix in Cursor Fix in Web

(defun (rdc---rdc-soob) (shift OUTGOING_RES_LO 2))

(defconstraint rdc---check-offset-is-zero (:guard (* (assumption---fresh-new-stamp) (rdc---standard-precondition)))
(call-to-ISZERO 0 (rdc---offset-hi) (rdc---size-hi)))
Copy link

Choose a reason for hiding this comment

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

Bug: Incorrect Offset Check in Constraint

The rdc---check-offset-is-zero constraint incorrectly calls call-to-ISZERO with (rdc---offset-hi) and (rdc---size-hi). To properly check if the offset is zero, it should use (rdc---offset-hi) and (rdc---offset-lo).

Locations (1)
Fix in Cursor Fix in Web

@letypequividelespoubelles letypequividelespoubelles merged commit 8482bc4 into master Aug 1, 2025
4 checks passed
@letypequividelespoubelles letypequividelespoubelles deleted the 716-prepare-for-oob-cancun branch August 1, 2025 14:44
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.

prepare for oob cancun

3 participants