forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add BLS libraries, wrappers, helpers and benchmarks #2296
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
47a1622
Add ctpl header only library
codablock b0d0093
Add helper to rename all threads of a ctpl::thread_pool
codablock 057d744
Add libgmp to depends
codablock f3dcb69
Add cmake to ci/Dockerfile.builder
codablock 3039d44
Add Chia bls-signatures library to depends
codablock 9ccf6f5
Implement wrappers around Chia BLS lib
codablock aa3b0aa
Add simple helpers/wrappers for BLS+AES based integrated encryption s…
codablock 3ee27c1
Add highly parallelized worker/helper for BLS/DKG calculations
codablock 78675d9
Add BLS and DKG benchmarks
codablock 80fd096
Add ECDSA benchmarks
codablock 9c8e4ac
Move bls stuff from crypto/ to bls/
codablock 4641916
Review fixes
codablock File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| package=chia_bls | ||
| $(package)_version=b24c15cef6567a855e901b4774d1d22efb063ea9 | ||
| # It's actually from https://github.com/Chia-Network/bls-signatures, but we have so many patches atm that it's forked | ||
| $(package)_download_path=https://github.com/codablock/bls-signatures/archive | ||
| $(package)_file_name=$($(package)_version).tar.gz | ||
| $(package)_sha256_hash=96b5f9b70179e2e76123fb19b7a00dec9188b571757db15949bf9f1d8dee864f | ||
| $(package)_dependencies=gmp | ||
| #$(package)_patches=...TODO (when we switch back to https://github.com/Chia-Network/bls-signatures) | ||
|
|
||
| #define $(package)_preprocess_cmds | ||
| # for i in $($(package)_patches); do patch -N -p1 < $($(package)_patch_dir)/$$$$i; done | ||
| #endef | ||
|
|
||
| define $(package)_set_vars | ||
| $(package)_config_opts=-DCMAKE_INSTALL_PREFIX=$($(package)_staging_dir)/$(host_prefix) | ||
| $(package)_config_opts+= -DCMAKE_PREFIX_PATH=$(host_prefix) | ||
| $(package)_config_opts+= -DSTLIB=ON -DSHLIB=OFF -DSTBIN=ON | ||
| $(package)_config_opts_linux=-DOPSYS=LINUX -DCMAKE_SYSTEM_NAME=Linux | ||
| $(package)_config_opts_darwin=-DOPSYS=MACOSX -DCMAKE_SYSTEM_NAME=Darwin | ||
| $(package)_config_opts_mingw32=-DOPSYS=WINDOWS -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SHARED_LIBRARY_LINK_C_FLAGS="" -DCMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS="" | ||
| $(package)_config_opts_i686+= -DWSIZE=32 | ||
| $(package)_config_opts_x86_64+= -DWSIZE=64 | ||
| $(package)_config_opts_arm+= -DWSIZE=32 | ||
| $(package)_config_opts_debug=-DDEBUG=ON -DCMAKE_BUILD_TYPE=Debug | ||
|
|
||
| ifneq ($(darwin_native_toolchain),) | ||
| $(package)_config_opts_darwin+= -DCMAKE_AR="$(host_prefix)/native/bin/$($(package)_ar)" | ||
| $(package)_config_opts_darwin+= -DCMAKE_RANLIB="$(host_prefix)/native/bin/$($(package)_ranlib)" | ||
| endif | ||
| endef | ||
|
|
||
| define $(package)_config_cmds | ||
| export CC="$($(package)_cc)" && \ | ||
| export CXX="$($(package)_cxx)" && \ | ||
| export CFLAGS="$($(package)_cflags) $($(package)_cppflags)" && \ | ||
| export CXXFLAGS="$($(package)_cxxflags) $($(package)_cppflags)" && \ | ||
| export LDFLAGS="$($(package)_ldflags)" && \ | ||
| mkdir build && cd build && \ | ||
| cmake ../ $($(package)_config_opts) | ||
| endef | ||
|
|
||
| define $(package)_build_cmds | ||
| cd build && \ | ||
| $(MAKE) $($(package)_build_opts) | ||
| endef | ||
|
|
||
| define $(package)_stage_cmds | ||
| cd build && \ | ||
| $(MAKE) install | ||
| endef | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| package=gmp | ||
| $(package)_version=6.1.2 | ||
| $(package)_download_path=https://gmplib.org/download/gmp | ||
| $(package)_file_name=gmp-$($(package)_version).tar.bz2 | ||
| $(package)_sha256_hash=5275bb04f4863a13516b2f39392ac5e272f5e1bb8057b18aec1c9b79d73d8fb2 | ||
|
|
||
| define $(package)_set_vars | ||
| $(package)_config_opts+=--enable-cxx --enable-fat --with-pic --disable-shared | ||
| endef | ||
|
|
||
| define $(package)_config_cmds | ||
| $($(package)_autoconf) | ||
| endef | ||
|
|
||
| define $(package)_build_cmds | ||
| $(MAKE) | ||
| endef | ||
|
|
||
| define $(package)_stage_cmds | ||
| $(MAKE) DESTDIR=$($(package)_staging_dir) install | ||
| endef | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.