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

Decide on if #[global_allocator] should remain in evm_arithmetization #205

Closed
BGluth opened this issue May 1, 2024 · 4 comments
Closed
Labels
crate: evm_arithmetization Anything related to the evm_arithmetization crate.

Comments

@BGluth
Copy link
Contributor

BGluth commented May 1, 2024

Recently due to adding SMT support in #198, we need to link against two versions of evm_artithmetization in a single build. This works, except that evm_artithmetization defines a global allocator (jemalloc) with #[global_allocator]. #[global_allocator] can only appear once in any given build, so this ends up breaking compilation.

It seems that best practices are to avoid using #[global_allocator] in libraries and only use it in binaries (since it affects the entire binary, including deps). Currently if there is another binary (or library for that matter) that also defines it's own global allocator, it would not be able to use evm_artithmetization.

My thoughts are we should either do one of the following:

  • Remove jemalloc from evm_artithmetization and make this the responsibility of the binary to do this.
  • Only enable jemalloc with the presence/absence of a feature flag (this is what Added a feature flag to disable jemalloc #204 does).

Also note that @nbgl mentioned that she is not sure how much performance jemalloc is actually giving us at this point and it might be worth revisiting.

@BGluth BGluth added the crate: evm_arithmetization Anything related to the evm_arithmetization crate. label May 1, 2024
@BGluth BGluth added this to Zero EVM May 1, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Zero EVM May 1, 2024
@muursh
Copy link
Contributor

muursh commented May 22, 2024

Remove jemalloc from evm_artithmetization and make this the responsibility of the binary to do this.

I'm still a proponent of this

@BGluth
Copy link
Contributor Author

BGluth commented May 22, 2024

Also going to add that this issue is much less urgent at this point since we're now back to feature gating SMT support.

@Nashtare Nashtare moved this from Backlog to In Progress in Zero EVM May 24, 2024
@vgnom vgnom added this to the Type 2 - Q2 2024 milestone Jun 3, 2024
@0xaatif
Copy link
Contributor

0xaatif commented Jun 19, 2024

@0xaatif
Copy link
Contributor

0xaatif commented Jun 19, 2024

Closing as completed, with follow up in #302

@0xaatif 0xaatif closed this as completed Jun 19, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Zero EVM Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate: evm_arithmetization Anything related to the evm_arithmetization crate.
Projects
Status: Done
Development

No branches or pull requests

4 participants