chia: 2.1.1

This commit is contained in:
Louis Bettens 2023-12-02 17:22:48 +01:00
parent d98fa9f79b
commit ad7111dfd9
No known key found for this signature in database
15 changed files with 883 additions and 852 deletions

View File

@ -1,101 +0,0 @@
{
lib,
cacert,
fetchFromGitHub,
python3Packages,
}: let
chia = python3Packages.buildPythonApplication rec {
pname = "chia";
version = "2.0.0-b1";
src = fetchFromGitHub {
owner = "Chia-Network";
repo = "chia-blockchain";
rev = version;
fetchSubmodules = true;
hash = "sha256-gJE8qXfkyMrPFHaqQ69we6dTpDbpgjAr/CCqtmKJbpI=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "==" ">="
cp ${cacert}/etc/ssl/certs/ca-bundle.crt mozilla-ca/cacert.pem
'';
nativeBuildInputs = [
python3Packages.setuptools-scm
];
# give a hint to setuptools-scm on package version
SETUPTOOLS_SCM_PRETEND_VERSION = "v${version}";
propagatedBuildInputs = with python3Packages; [
aiofiles
aiohttp
aiosqlite
anyio
bitstring
boto3
blspy
chiapos
chiavdf
chiabip158
chia-rs
click
clvm
clvm-rs
clvm-tools
clvm-tools-rs
colorama
colorlog
concurrent-log-handler
cryptography
dnslib
dnspython
fasteners
filelock
keyrings-cryptfile
psutil
pyyaml
setproctitle
setuptools # needs pkg_resources at runtime
sortedcontainers
watchdog
websockets
zstd
];
checkInputs = with python3Packages; [
pytestCheckHook
];
# Testsuite is expensive and non-deterministic, so it is available in
# passthru.tests instead.
doCheck = false;
disabledTests = [
"test_spend_through_n"
"test_spend_zero_coin"
"test_default_cached_master_passphrase"
"test_using_legacy_keyring"
];
preCheck = ''
export HOME=`mktemp -d`
'';
passthru.tests = {
chiaWithTests = chia.overrideAttrs (_: {doCheck = true;});
};
meta = with lib; {
homepage = "https://www.chia.net/";
description = "Chia is a modern cryptocurrency built from scratch, designed to be efficient, decentralized, and secure.";
license = with licenses; [asl20];
maintainers = [];
platforms = platforms.all;
};
};
in
chia

View File

@ -1,101 +0,0 @@
{
lib,
cacert,
fetchFromGitHub,
python3Packages,
}: let
chia = python3Packages.buildPythonApplication rec {
pname = "chia";
version = "1.8.3-rc1";
src = fetchFromGitHub {
owner = "Chia-Network";
repo = "chia-blockchain";
rev = version;
fetchSubmodules = true;
hash = "sha256-FwXho+2TOoNadwxCxs57W4GPUa9kfz885tGuhqIXWF4=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "==" ">="
cp ${cacert}/etc/ssl/certs/ca-bundle.crt mozilla-ca/cacert.pem
'';
nativeBuildInputs = [
python3Packages.setuptools-scm
];
# give a hint to setuptools-scm on package version
SETUPTOOLS_SCM_PRETEND_VERSION = "v${version}";
propagatedBuildInputs = with python3Packages; [
aiofiles
aiohttp
aiosqlite
anyio
bitstring
boto3
blspy
chiapos
chiavdf
chiabip158
chia-rs
click
clvm
clvm-rs
clvm-tools
clvm-tools-rs
colorama
colorlog
concurrent-log-handler
cryptography
dnslib
dnspython
fasteners
filelock
keyrings-cryptfile
psutil
pyyaml
setproctitle
setuptools # needs pkg_resources at runtime
sortedcontainers
watchdog
websockets
zstd
];
checkInputs = with python3Packages; [
pytestCheckHook
];
# Testsuite is expensive and non-deterministic, so it is available in
# passthru.tests instead.
doCheck = false;
disabledTests = [
"test_spend_through_n"
"test_spend_zero_coin"
"test_default_cached_master_passphrase"
"test_using_legacy_keyring"
];
preCheck = ''
export HOME=`mktemp -d`
'';
passthru.tests = {
chiaWithTests = chia.overrideAttrs (_: {doCheck = true;});
};
meta = with lib; {
homepage = "https://www.chia.net/";
description = "Chia is a modern cryptocurrency built from scratch, designed to be efficient, decentralized, and secure.";
license = with licenses; [asl20];
maintainers = [];
platforms = platforms.all;
};
};
in
chia

View File

@ -3,99 +3,78 @@
cacert,
fetchFromGitHub,
python3Packages,
}: let
chia = python3Packages.buildPythonApplication rec {
pname = "chia";
version = "1.8.2";
}:
python3Packages.buildPythonApplication rec {
pname = "chia";
version = "2.1.1";
src = fetchFromGitHub {
owner = "Chia-Network";
repo = "chia-blockchain";
rev = version;
fetchSubmodules = true;
hash = "sha256-pKpI/JNqAo5Mr/POo06MZgR5LCSwnsPYhzzMGO/lEXw=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "==" ">="
cp ${cacert}/etc/ssl/certs/ca-bundle.crt mozilla-ca/cacert.pem
'';
nativeBuildInputs = [
python3Packages.setuptools-scm
];
# give a hint to setuptools-scm on package version
SETUPTOOLS_SCM_PRETEND_VERSION = "v${version}";
propagatedBuildInputs = with python3Packages; [
aiofiles
aiohttp
aiosqlite
anyio
bitstring
boto3
blspy
chiapos
chiavdf
chiabip158
chia-rs
click
clvm
clvm-rs
clvm-tools
clvm-tools-rs
colorama
colorlog
concurrent-log-handler
cryptography
dnslib
dnspython
fasteners
filelock
keyrings-cryptfile
psutil
pyyaml
setproctitle
setuptools # needs pkg_resources at runtime
sortedcontainers
watchdog
websockets
zstd
];
checkInputs = with python3Packages; [
pytestCheckHook
];
# Testsuite is expensive and non-deterministic, so it is available in
# passthru.tests instead.
doCheck = false;
disabledTests = [
"test_spend_through_n"
"test_spend_zero_coin"
"test_default_cached_master_passphrase"
"test_using_legacy_keyring"
];
preCheck = ''
export HOME=`mktemp -d`
'';
passthru.tests = {
chiaWithTests = chia.overrideAttrs (_: {doCheck = true;});
};
meta = with lib; {
homepage = "https://www.chia.net/";
description = "Chia is a modern cryptocurrency built from scratch, designed to be efficient, decentralized, and secure.";
license = with licenses; [asl20];
maintainers = [];
platforms = platforms.all;
};
src = fetchFromGitHub {
owner = "Chia-Network";
repo = "chia-blockchain";
rev = version;
fetchSubmodules = true;
hash = "sha256-ttwNWsSkuMpT2GRQCMDIVq9CfTsQiiQBmOOBqaQRVBA=";
};
in
chia
postPatch = ''
substituteInPlace setup.py \
--replace "==" ">="
cp ${cacert}/etc/ssl/certs/ca-bundle.crt mozilla-ca/cacert.pem
'';
nativeBuildInputs = [
python3Packages.setuptools-scm
];
# give a hint to setuptools-scm on package version
SETUPTOOLS_SCM_PRETEND_VERSION = "v${version}";
propagatedBuildInputs = with python3Packages; [
aiofiles
aiohttp
aiosqlite
anyio
bitstring
boto3
blspy
chiapos
chiavdf
chiabip158
chia-rs
click
clvm
clvm-rs
clvm-tools
clvm-tools-rs
colorama
colorlog
concurrent-log-handler
cryptography
dnslib
dnspython
fasteners
filelock
keyrings-cryptfile
psutil
pyyaml
setproctitle
setuptools # needs pkg_resources at runtime
sortedcontainers
watchdog
websockets
zstd
];
checkInputs = with python3Packages; [
pythonImportsCheckHook
];
meta = with lib; {
homepage = "https://www.chia.net/";
description = "Chia is a modern cryptocurrency built from scratch, designed to be efficient, decentralized, and secure.";
license = with licenses; [asl20];
maintainers = [];
platforms = platforms.all;
};
}

View File

@ -1,24 +1,24 @@
{
lib,
buildPythonPackage,
fetchPypi,
fetchFromGitHub,
setuptools-scm,
substituteAll,
cmake,
boost,
gmp,
pybind11,
pythonOlder,
{ lib
, buildPythonPackage
, fetchPypi
, fetchFromGitHub
, setuptools-scm
, substituteAll
, cmake
, boost
, gmp
, pybind11
, pythonOlder
}:
buildPythonPackage rec {
pname = "blspy";
version = "1.0.16";
version = "2.0.2";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-XABdS6CCUJpZ9N1Vra078V0HoDU32u1l3yz96ZKHwFc=";
hash = "sha256-mxLWhfPBBNP+D682GPa4JCctExuOo4QxkK1nBhhzZ3U=";
};
patches = [
@ -26,11 +26,11 @@ buildPythonPackage rec {
(substituteAll {
src = ./dont_fetch_dependencies.patch;
pybind11_src = pybind11.src;
relic_src = fetchFromGitHub {
owner = "Chia-Network";
repo = "relic";
rev = "215c69966cb78b255995f0ee9c86bbbb41c3c42b"; # pinned by blspy
hash = "sha256-wivK18Cp7BMZJvrYxJgSHInRZgFgsgSzd0YIy5IWoYA=";
blst_src = fetchFromGitHub {
owner = "supranational";
repo = "blst";
rev = "6b837a0921cf41e501faaee1976a4035ae29d893"; # pinned by blspy
hash = "sha256-6iNpxaMRy438XoC0wk/c/tInNg1I0VuyGFV9sUFk5sc=";
};
sodium_src = fetchFromGitHub {
owner = "AmineKhaldi";
@ -42,8 +42,8 @@ buildPythonPackage rec {
catch2_src = fetchFromGitHub {
owner = "catchorg";
repo = "Catch2";
rev = "v3.0.0-preview5"; # pinned by blspy
hash = "sha256-IQ1yGZo3nKHTqScUoq3i3Njxqvk7uW8hQ3GT0/SxGaw=";
rev = "v3.3.2"; # pinned by blspy
hash = "sha256-t/4iCrzPeDZNNlgibVqx5rhe+d3lXwm1GmBMDDId0VQ=";
};
})
];
@ -55,9 +55,9 @@ buildPythonPackage rec {
--replace "from setuptools import Extension, setup, setuptools" "from setuptools import Extension, setup"
'';
nativeBuildInputs = [cmake setuptools-scm];
nativeBuildInputs = [ cmake setuptools-scm ];
buildInputs = [boost gmp.static pybind11];
buildInputs = [ boost gmp.static pybind11 ];
pythonImportsCheck = [
"blspy"

View File

@ -1,41 +1,43 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7922652..d85b058 100644
index cda04d1..9d42fc9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,29 +31,18 @@ set(CMAKE_MODULE_PATH
@@ -38,31 +38,16 @@ set(CMAKE_MODULE_PATH
include(FetchContent)
FetchContent_Declare(Sodium
- GIT_REPOSITORY https://github.com/AmineKhaldi/libsodium-cmake.git
-
- # Latest commit at the moment this was added here
- # Anchored to libsodium v1.0.18
- GIT_TAG f73a3fe1afdc4e37ac5fe0ddd401bf521f6bba65
+ URL /nix/store/2nj48a8vb7rzxhwaigdcpa0yyax7yrv7-source
+ URL @sodium_src@
)
set(SODIUM_PCH "on" CACHE STRING "")
set(SODIUM_DISABLE_TESTS "on" CACHE STRING "")
set(SODIUM_CHIA_MINIMAL "on" CACHE STRING "")
FetchContent_MakeAvailable(Sodium)
-if (DEFINED ENV{RELIC_MAIN})
- set(RELIC_GIT_TAG "origin/main")
-if (DEFINED ENV{BLST_MAIN})
- set(BLST_GIT_TAG "origin/master")
-else ()
- # This is currently anchored to upstream aecdcae7956f542fbee2392c1f0feb0a8ac41dc5
- set(RELIC_GIT_TAG "215c69966cb78b255995f0ee9c86bbbb41c3c42b")
- # This is currently anchored to upstream 6b837a0921cf41e501faaee1976a4035ae29d893 dated 2023-06-16
- set(BLST_GIT_TAG "6b837a0921cf41e501faaee1976a4035ae29d893")
-endif ()
-set(BLST_REPOSITORY "https://github.com/supranational/blst.git")
-
-message(STATUS "blst will be built from: ${BLST_GIT_TAG} and repository ${BLST_REPOSITORY}")
-
message(STATUS "Relic will be built from: ${RELIC_GIT_TAG}")
FetchContent_Declare(
relic
- GIT_REPOSITORY https://github.com/Chia-Network/relic.git
- GIT_TAG ${RELIC_GIT_TAG}
+ SOURCE_DIR /nix/store/6r9v1cmmy535q2y0pk0bkjh3ppyzb2ch-source
blst
- GIT_REPOSITORY ${BLST_REPOSITORY}
- GIT_TAG ${BLST_GIT_TAG}
+ URL @blst_src@
)
FetchContent_MakeAvailable(blst)
# Relic related options
diff --git a/python-bindings/CMakeLists.txt b/python-bindings/CMakeLists.txt
index 2e331c3..d9aa940 100644
index 0e77050..3cb6187 100644
--- a/python-bindings/CMakeLists.txt
+++ b/python-bindings/CMakeLists.txt
@@ -1,8 +1,7 @@
@ -43,22 +45,22 @@ index 2e331c3..d9aa940 100644
FetchContent_Declare(
pybind11
- GIT_REPOSITORY https://github.com/pybind/pybind11.git
- GIT_TAG v2.10.0
+ SOURCE_DIR @pybind11_src@
- GIT_TAG v2.10.0
+ URL @pybind11_src@
)
FetchContent_MakeAvailable(pybind11 relic)
FetchContent_MakeAvailable(pybind11)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3164f7f..15a955e 100644
index 5d35c78..34192d5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -37,8 +37,7 @@ install(FILES $<TARGET_FILE:bls> DESTINATION lib)
@@ -60,8 +60,7 @@ install(FILES $<TARGET_FILE:bls> DESTINATION lib)
if(BUILD_BLS_TESTS)
FetchContent_Declare(
Catch2
- GIT_REPOSITORY https://github.com/catchorg/Catch2.git
- GIT_TAG v3.0.0-preview5
- GIT_TAG v3.3.2
+ URL @catch2_src@
)
FetchContent_MakeAvailable(Catch2)
add_executable(runtest test.cpp)
find_package(Threads REQUIRED)

File diff suppressed because it is too large Load Diff

View File

@ -8,13 +8,13 @@
}:
buildPythonPackage rec {
pname = "chia-rs";
version = "0.2.7";
version = "0.2.11";
src = fetchFromGitHub {
owner = "chia-network";
repo = "chia_rs";
rev = version;
hash = "sha256-9GrthOqUAv1R4nJ6mIuWJoMU2YZcqTu7pGYe/Y9gEtk=";
hash = "sha256-tZP6ylMMuIra1W8wu6r/zF/tdgssaQjBVozhLIy7gfg=";
};
patches = [

View File

@ -4,9 +4,9 @@
-# the "wheel" crate is excluded from the workspace because pyo3 has problems with
-# "cargo test" and "cargo bench"
[workspace]
-members = ["wasm", "chia_streamable_macro", "chia-bls", "clvm-utils", "chia-protocol", "chia_py_streamable_macro", "chia-tools"]
-members = ["wasm", "chia_streamable_macro", "chia-bls", "clvm-utils", "chia-protocol", "chia_py_streamable_macro", "chia-tools", "fuzz", "clvm-utils/fuzz"]
-exclude = ["wheel"]
+members = ["wasm", "wheel", "chia_streamable_macro", "chia-bls", "clvm-utils", "chia-protocol", "chia_py_streamable_macro", "chia-tools"]
+members = ["wasm", "wheel", "chia_streamable_macro", "chia-bls", "clvm-utils", "chia-protocol", "chia_py_streamable_macro", "chia-tools", "fuzz", "clvm-utils/fuzz"]
[package]
name = "chia"

View File

@ -2,9 +2,10 @@
stdenv,
lib,
substituteAll,
fetchpatch,
buildPythonPackage,
fetchPypi,
fetchFromGitHub,
bladebit,
catch2,
cmake,
cxxopts,
@ -17,12 +18,12 @@
}:
buildPythonPackage rec {
pname = "chiapos";
version = "1.0.11";
version = "2.0.3";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-TMRf9549z3IQzGt5c53Rk1Vq3tdrpZ3Pqc8jhj4AKzo=";
hash = "sha256-2bP1xwSWXqEVAKs033GmgddicfbIx9xK65JfqY24JJ4=";
};
patches = [
@ -30,13 +31,14 @@ buildPythonPackage rec {
(substituteAll {
src = ./dont_fetch_dependencies.patch;
inherit cxxopts ghc_filesystem;
catch2_src = catch2.src;
bladebit = bladebit.src;
pybind11_src = pybind11.src;
})
# adjust use of setuptools to support version 68.2
(fetchpatch {
url = "https://github.com/Chia-Network/chiapos/commit/7f1f011788742c5e59d3b18fc007265bd8787dea.patch";
hash = "sha256-L6k+jJv+4p3TlDMyzFr042bejw/C7pqcEwM+/+p1B+c=";
catch2_src = fetchFromGitHub {
owner = "catchorg";
repo = "Catch2";
rev = "v3.3.2"; # pinned by src
hash = "sha256-t/4iCrzPeDZNNlgibVqx5rhe+d3lXwm1GmBMDDId0VQ=";
};
})
];

View File

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d1dd25d..96abc65 100644
index 207aacc..e6a6f5a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,23 +21,20 @@ include(${CMAKE_INSTALL_PREFIX}/share/cmake/pybind11/pybind11Config.cmake)
@@ -21,16 +21,14 @@ include(${CMAKE_INSTALL_PREFIX}/share/cmake/pybind11/pybind11Config.cmake)
else()
FetchContent_Declare(
pybind11-src
@ -21,6 +21,18 @@ index d1dd25d..96abc65 100644
)
FetchContent_MakeAvailable(cxxopts)
@@ -45,8 +43,7 @@ endif()
if (${CP_BUILD_BLADEBIT_HARVESTER})
FetchContent_Declare(
bladebit
- GIT_REPOSITORY https://github.com/Chia-Network/bladebit.git
- GIT_TAG cuda-compression
+ SOURCE_DIR @bladebit_src@
)
set(BB_HARVESTER_ONLY ON)
@@ -56,8 +53,7 @@ endif()
FetchContent_Declare(
gulrak
- GIT_REPOSITORY https://github.com/gulrak/filesystem.git
@ -29,12 +41,12 @@ index d1dd25d..96abc65 100644
)
FetchContent_MakeAvailable(gulrak)
@@ -150,8 +147,7 @@ ENDIF()
@@ -174,8 +170,7 @@ ENDIF()
FetchContent_Declare(
Catch2
- GIT_REPOSITORY https://github.com/catchorg/Catch2.git
- GIT_TAG v2.13.7
- GIT_TAG v3.3.2
+ SOURCE_DIR @catch2_src@
)
FetchContent_MakeAvailable(Catch2)

View File

@ -15,12 +15,12 @@
}:
buildPythonPackage rec {
pname = "chiavdf";
version = "1.0.9";
version = "1.1.1";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-G4npp0G8TNk2y/T6myNr8NCfkBdcknsWds+XBZiNnQY=";
hash = "sha256-X68i5hfWEe/7dHOKluebGnqxzrjUbYxIEvkIqFZL0Eg=";
};
patches = [
@ -29,11 +29,6 @@ buildPythonPackage rec {
src = ./dont_fetch_dependencies.patch;
pybind11_src = pybind11.src;
})
# adjust use of setuptools to support version 68.2
(fetchpatch {
url = "https://github.com/Chia-Network/chiavdf/commit/7c6a7680dc8ce4386a60058e61fa7cb3526595e1.patch";
hash = "sha256-80w3MDLdcjHKNFCp9vJ4SCFVjlPKZzQgXrDLB8OHdJE=";
})
];
# x86 instructions are needed for this component

View File

@ -7,7 +7,7 @@ index fb92c4d..9fa52ef 100644
FetchContent_Declare(
pybind11-src
- GIT_REPOSITORY https://github.com/pybind/pybind11.git
- GIT_TAG v2.10.0
- GIT_TAG v2.11.1
+ SOURCE_DIR @pybind11_src@
)
FetchContent_MakeAvailable(pybind11-src)

View File

@ -1,13 +1,13 @@
{
lib,
fetchFromGitHub,
buildPythonPackage,
rustPlatform,
pythonOlder,
{ lib
, fetchFromGitHub
, buildPythonPackage
, rustPlatform
, pythonOlder
}:
buildPythonPackage rec {
pname = "clvm-tools-rs";
version = "0.1.30";
version = "0.1.39";
disabled = pythonOlder "3.7";
format = "pyproject";
@ -15,13 +15,13 @@ buildPythonPackage rec {
owner = "Chia-Network";
repo = "clvm_tools_rs";
rev = version;
hash = "sha256-7eGOJgcZcSGmvLJc5BVfWarcu9kQb/uEcnG70JWXDSw=";
hash = "sha256-TtUeS74ru/V6HTUNVk2vh347zrqCyx27oE1YZWje5PU=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-46WEmp1FT6biM9A2M7z5onb45XhWjePKb6NSwLjuemc=";
hash = "sha256-dhQSb2DiiNtA6ZGgLU9dawC3/VKtqQLVOlLNFIA2uPw=";
};
nativeBuildInputs = with rustPlatform; [
@ -29,7 +29,7 @@ buildPythonPackage rec {
maturinBuildHook
];
pythonImportsCheck = ["clvm_tools_rs"];
pythonImportsCheck = [ "clvm_tools_rs" ];
meta = with lib; {
homepage = "https://chialisp.com/";

View File

@ -10,14 +10,14 @@
}:
buildPythonPackage rec {
pname = "clvm_tools";
version = "0.4.6";
version = "0.4.7";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "Chia-Network";
repo = "clvm_tools";
rev = version;
hash = "sha256-MAtVTSv1RR2/7QEKCOEQ+QH5vK4aE0Us2TXyRRAMl8U=";
hash = "sha256-+1D2GDlboAtkormlJ5owdxZVk+9ABaaS3UKPYgkCUc0=";
};
nativeBuildInputs = [

View File

@ -9,14 +9,14 @@
}:
buildPythonPackage rec {
pname = "clvm";
version = "0.9.7";
version = "0.9.8";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "Chia-Network";
repo = "clvm";
rev = version;
hash = "sha256-kTmuiy0IbTGjDokZjxp3p8lr/0uVxG/0pRN2hETLBtA=";
hash = "sha256-js4dBw0PNPhJIlFNARtmc4mz7zBTcpIme5DL468J7m4=";
};
nativeBuildInputs = [