Skip to content

[abigen] solc downloads #3366

@trajan0x

Description

@trajan0x

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions