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

feat: add gate count profiling for transactions #9632

Merged
merged 13 commits into from
Nov 4, 2024
Merged

Conversation

saleel
Copy link
Contributor

@saleel saleel commented Oct 31, 2024

Part of #9299

  • Added computeGateCountForCircuit to bb/execute.s and use it in kernal_prover to calculate gate-count per function (under a flag).
  • Add dryRun to kernal_prover to skip ClientIVC proof generation (useful for getting gate count without proof generation)
  • Add --profile flag to cli-wallet simulate command to prints the gate count per circuit, Example:
Screenshot 2024-10-31 at 9 46 10 PM

  • Not reusing ContractFunctionInteraction.simulate as it is difficult to change its return type as its widely used.
  • Can also add gas estimation to simulate command (instead of send) so simulate does actual simulation of a transaction and display the full data.

@saleel saleel marked this pull request as ready for review November 1, 2024 08:39
Copy link
Contributor

@Thunkar Thunkar left a comment

Choose a reason for hiding this comment

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

Great job, barring a minor typo LGTM!

It would be great to also tackle a bigger refactor of this code basically renaming some methods and avoiding the overuse of the word "simulate". Just saying this since you've become familiar with this part, but definitely a different task!

@saleel
Copy link
Contributor Author

saleel commented Nov 4, 2024

It would be great to also tackle a bigger refactor of this code basically renaming some methods and avoiding the overuse of the word "simulate".

Yea, can also move simulation things like fee estimation from send to simulate in cli-wallet. Will do a different PR on this.

@saleel saleel enabled auto-merge (squash) November 4, 2024 11:52
@saleel saleel merged commit 582398f into master Nov 4, 2024
62 checks passed
@saleel saleel deleted the saleel/tx-profile branch November 4, 2024 12:18
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