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: implement modulesToCount selection from module limits TOML config #1443

Open
wants to merge 6 commits into
base: arith-dev
Choose a base branch
from

Conversation

gauravahuja
Copy link
Contributor

@gauravahuja gauravahuja commented Oct 22, 2024

#1395

Copied over from Tsvetan's PR#1396

This PR enable the dynamic inclusion/exclusion of modules for the line count RPC response:

  • Introduces the plugin-linea-line-counts-modules-to-count-config-file-path plugin CLI parameter to set the path of a module limits TOML file from which in can read all the included module keys and calculate line counts only for those modules.
  • When plugin-linea-line-counts-modules-to-count-config-file-path is not provided it returns line counts for all modules that are intended for counting

@gauravahuja gauravahuja marked this pull request as ready for review October 22, 2024 07:35
standardModulesToTrace = initStandardModulesToTrace();
modulesToCountMap = initModulesToCountMap();

modules = Stream.concat(standardModules.stream(), precompileLimitModules.stream()).toList();
Copy link
Collaborator

Choose a reason for hiding this comment

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

is modules the modules triggered during execution of the evm? If yes, we don't need the precompileLimitModule in, they are now manually triggered by other modules when needed

l2L1Logs);
}

private List<Module> initStandardModulesToTrace() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe, the standardModuleToTrace (and to Count) could be initStandardModule + some few others (just take care if some order are needed, like for mum/mmio at tracing time)

@@ -905,7 +962,7 @@ public final MessageFrame messageFrame() {
private void handleStack(MessageFrame frame) {
this.currentFrame()
.stack()
.processInstruction(this, frame, MULTIPLIER___STACK_HEIGHT * (stamp() + 1));
.processInstruction(this, frame, MULTIPLIER___STACK_HEIGHT * stamp());
Copy link
Collaborator

Choose a reason for hiding this comment

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

?

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.

4 participants