Skip to content

Feat/impl precompiles#4

Merged
10d9e merged 19 commits intomainfrom
feat/impl-precompiles
Dec 2, 2025
Merged

Feat/impl precompiles#4
10d9e merged 19 commits intomainfrom
feat/impl-precompiles

Conversation

@10d9e
Copy link
Copy Markdown
Owner

@10d9e 10d9e commented Dec 2, 2025

No description provided.

10d9e added 19 commits December 1, 2025 21:41
…upport

- Added options to enable or disable the `blst` and `mcl` libraries in the build configuration, allowing for more flexible dependency management.
- Implemented platform-specific default include paths for `blst` and `mcl`, improving compatibility across Windows and Unix systems.
- Refactored the build process to utilize a helper function for linking crypto libraries, streamlining the addition of dependencies across various executables.
- Updated README.md to reflect the new requirements for `blst` and `mcl` libraries.
- Enhanced BLS12-381 precompile implementations to utilize the `blst` wrapper for efficient elliptic curve operations, including multi-scalar multiplication and pairing checks.
- Improved error handling and gas cost calculations in precompile tests, ensuring comprehensive coverage and validation of functionalities.
…nstructions

- Introduced a Makefile to automate the build process, including OS detection, dependency installation, and project compilation.
- Updated README.md with a quick start guide for building the project using the Makefile, improving user experience.
- Enhanced platform-specific include paths in build.zig for better compatibility across macOS and Unix systems.
- Improved error handling in precompile functions to ensure robust validation of elliptic curve points.
…esses

- Replaced direct build and test commands with Makefile targets for consistency and ease of use.
- Added dependency installation step using Makefile to streamline setup across different environments.
- Improved overall structure of CI workflow for better readability and maintainability.
… files

- Removed unnecessary blank lines and adjusted spacing in `build.zig`, `ci.yml`, and various precompile files to enhance code readability.
- Updated formatting in test files to maintain consistency and adhere to project style guidelines.
- Ensured comments and code structure are clear, contributing to better maintainability.
…file and CI workflow

- Adjusted header path checks for the blst library in the Makefile to ensure correct detection of installed headers.
- Enhanced installation logic to verify the presence of blst headers after building, providing clearer feedback on installation success.
- Added a CI step to verify the existence of blst headers in expected locations on macOS, improving build reliability.
…build.zig and Makefile

- Updated comments in build.zig to clarify handling of absolute paths for blst headers.
- Adjusted Makefile to streamline checks for existing blst installations and ensure correct header paths are used.
- Enhanced installation feedback to provide clearer messages regarding the success or failure of blst library installation.
- Removed outdated comments regarding installation paths for the blst library.
- Streamlined the installation process by clarifying the conditions for copying files to Homebrew directories.
- Improved feedback messages to enhance user understanding during the installation process.
- Added a parameter to the `addCryptoLibraries` function to handle macOS-specific linking requirements.
- Updated the Makefile to set the `DYLD_LIBRARY_PATH` for macOS during test execution.
- Adjusted CI workflow to ensure the correct environment variable is set for macOS builds, improving compatibility and reliability.
- Enhanced the CI workflow to build the project before running precompile unit tests, ensuring all necessary modules and libraries are linked correctly.
- Updated comments in build.zig to clarify the execution of precompile unit tests and the required command structure for CI.
- Improved the test command to include all necessary modules and libraries, enhancing the reliability of the testing process.
- Streamlined the command for running precompile unit tests by consolidating the options file retrieval into a single line.
- Removed redundant fallback logic for generating the options file, enhancing clarity and efficiency in the CI process.
- Eliminated the step for running precompile unit tests in the CI workflow to streamline the process.
- This change simplifies the CI configuration and focuses on essential testing tasks.
- Updated the memory copy logic for padding in the ripemd160 implementation to ensure proper handling of buffer lengths.
- This change enhances the correctness of the padding process during hashing operations.
- Updated `build.zig` to ensure proper linking of the mcl C++ library, including necessary standard library dependencies.
- Improved the mcl wrapper in `mcl_wrapper.zig` to include comprehensive initialization and error handling for BN254 operations.
- Added detailed comments and implemented real test vectors for addition, multiplication, and pairing checks in the precompile tests, ensuring correctness and reliability of cryptographic operations.
- Removed unnecessary blank lines throughout `mcl_wrapper.zig` and `tests.zig` to improve code readability and maintain consistency.
- Enhanced overall formatting without altering functionality, contributing to better maintainability of the codebase.
- Updated `build.zig` to attempt linking static libraries for `blst` and `mcl` on macOS before falling back to system libraries, improving build efficiency and flexibility.
- Added checks for the existence of static library files, enhancing the robustness of the linking process.
- Improved comments for clarity on the linking strategy and paths used for static libraries.
- Added logic to link the C++ standard library early when mcl is enabled, ensuring C++ symbols are available for static library linking.
- Improved comments for clarity regarding the linking process and conditions for mcl integration.
- Updated the linking logic to ensure the C++ standard library is linked after the static mcl library on Linux, addressing undefined symbol resolution issues.
- Improved comments to clarify the linking process for macOS and Linux, enhancing code readability and maintainability.
- Enhanced comments to specify the linking requirements for libstdc++ on Linux, particularly regarding the use of std::__cxx11 symbols from libmcl.a.
- Ensured that the linking logic explicitly avoids using libc++ on Linux, improving clarity and correctness in the build process.
- Added a cross-platform Makefile for automated builds and dependency management.
- Introduced static linking support for `blst` and `mcl` libraries, ensuring self-contained binaries.
- Enhanced the build system and CI workflow for consistency across platforms.
- Updated documentation to reflect new build instructions and features.
- Fixed various issues related to C++ standard library linking on Linux and macOS.
- Improved security posture with self-contained binaries that do not rely on system libraries.
@10d9e 10d9e merged commit 0c6e212 into main Dec 2, 2025
5 checks passed
garyschulte added a commit to garyschulte/zevm that referenced this pull request Mar 10, 2026
Signed-off-by: garyschulte <garyschulte@gmail.com>
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.

1 participant