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

[abigen] solc downloads #3366

Open
trajan0x opened this issue Nov 2, 2024 · 0 comments
Open

[abigen] solc downloads #3366

trajan0x opened this issue Nov 2, 2024 · 0 comments

Comments

@trajan0x
Copy link
Contributor

trajan0x commented Nov 2, 2024

Problem

Users on Apple Silicon Macs (M1/M2/M3) currently face issues with our Docker-based abigen tool due to AMD64 architecture incompatibility. While Rosetta 2 provides a workaround, it's not ideal and can cause performance overhead and occasional stability issues.

Proposed Solution

Implement a fallback mechanism that downloads solc binaries directly instead of relying on Docker containers:

  1. First attempt to use Docker-based solution
  2. If Docker fails or we detect Apple Silicon architecture:
    • Download appropriate solc binary from ethereum/solc-bin repository
    • Store in local cache (e.g., ~/.cache/solc/)
    • Use binary directly for compilation

Benefits

  • Eliminates Rosetta dependency on Apple Silicon
  • Potentially faster compilation (no Docker overhead)
  • More reliable cross-platform support
  • Simpler setup for new developers

Implementation Notes

  • Use solc-bin as source for binaries
  • Cache downloaded versions to avoid repeated downloads
  • Verify checksums for security
  • Support version selection similar to current Docker implementation

Related

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

No branches or pull requests

1 participant