Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Summary fidUpdate function with 4 parameters #40

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

Robertorosmaninho
Copy link
Contributor

This PR adds two new summarized rules regarding program execution. The rule presented in this PR summarizes the function fidUpdate(uint balance0, uint balance1, uint112 vidReserve0, uint112 vidReserve1) private {...}.

By summarizing this function, we save 2109 steps.
(Without it, the program took 30874 steps, and after implementing it, the program took 28765 steps)

Copy link
Contributor

@mariaKt mariaKt left a comment

Choose a reason for hiding this comment

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

I am OK with this, with one question-comment. Should we use the short-circuiting andThenBool, orElseBool, for the requirements related to the if condition, to emulate the fact that they computed in only certain cases and a specific order? @dwightguth

Copy link
Contributor

@mariaKt mariaKt left a comment

Choose a reason for hiding this comment

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

Since andBool, orBool behave like the short circuiting operators (per @dwightguth) , there is no need to change anything. Approved.

@Robertorosmaninho Robertorosmaninho merged commit 5885979 into main Sep 24, 2024
1 check passed
@Robertorosmaninho Robertorosmaninho deleted the fidUpdate-summary branch September 24, 2024 19:07
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