Skip to content

Commit

Permalink
Merge pull request #858 from Chia-Network/bump-clvm-0.12.0
Browse files Browse the repository at this point in the history
clvmr to 0.12.0
  • Loading branch information
arvidn authored Jan 9, 2025
2 parents 0227c27 + 3c8ff84 commit 4444a22
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 52 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ jobs:
python -m pip install clvm_tools colorama blspy chia-blockchain==2.1.2 clvm==0.9.8
- name: Build (windows)
if: matrix.os.matrix == 'windows'
if: matrix.os == 'windows-latest'
run: |
maturin develop --release -m wheel/Cargo.toml
- name: Build (non-windows)
if: matrix.os.matrix != 'windows'
if: matrix.os != 'windows-latest'
run: |
maturin develop --release -m wheel/Cargo.toml --features=openssl
Expand Down
24 changes: 15 additions & 9 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -319,24 +319,30 @@ jobs:
echo "RUSTFLAGS=-Cinstrument-coverage" >> "$GITHUB_ENV"
echo "LLVM_PROFILE_FILE=$(pwd)/target/chia_rs-%p-%m.profraw" >> "$GITHUB_ENV"
echo "CARGO_TARGET_DIR=$(pwd)/target" >> "$GITHUB_ENV"
- name: cargo test
- name: cargo test (not windows)
if: matrix.os != 'windows-latest'
run: cargo test --workspace --all-features
- name: cargo test (release)
- name: cargo test (release) (not windows)
if: matrix.os != 'windows-latest'
run: cargo test --workspace --all-features --release
- name: Continue with coverage
- name: cargo test (windows)
if: matrix.os == 'windows-latest'
run: cargo test --workspace
- name: cargo test (release) (windows)
if: matrix.os == 'windows-latest'
run: cargo test --workspace --release
- name: test coverage
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install lcov -y
rustup component add llvm-tools-preview
python -m venv venv
source venv/bin/activate
git clone https://github.com/Chia-Network/clvm_tools.git --branch=main --single-branch
pip install ./clvm_tools
. venv/bin/activate
pip install colorama maturin pytest pytest-xdist chia-blockchain==2.1.2 clvm==0.9.8
maturin develop --release -m wheel/Cargo.toml
# run pytest in a single process to avoid a race writing the coverage report
pytest -n 0 tests
sudo apt-get update
sudo apt-get install lcov -y
rustup component add llvm-tools-preview
grcov . --binary-path target -s . --branch --ignore-not-existing --ignore='*/.cargo/*' --ignore='tests/*' --ignore='venv/*' -o rust_cov.info
python -c 'with open("rust_cov.info") as f: lines = [l for l in f if not (l.startswith("DA:") and int(l.split(",")[1].strip()) >= 2**63)]; open("lcov.info", "w").writelines(lines)'
- name: Upload to Coveralls
Expand Down
110 changes: 75 additions & 35 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,18 @@ version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"

[[package]]
name = "bitvec"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c"
dependencies = [
"funty",
"radium",
"tap",
"wyz",
]

[[package]]
name = "block-buffer"
version = "0.10.4"
Expand Down Expand Up @@ -279,7 +291,7 @@ dependencies = [
"chia-protocol",
"chia-puzzles",
"chia-secp",
"chia-sha2",
"chia-sha2 0.17.0",
"chia-ssl",
"chia-traits 0.17.0",
"clvm-traits",
Expand All @@ -289,13 +301,13 @@ dependencies = [

[[package]]
name = "chia-bls"
version = "0.10.0"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "725b43b268cb81f014559eed11a74d0e5b9dd55282cae272ff509796099ab0b9"
checksum = "53dea95bd7dac1e69c59ef6839ecf30ff3fe29170c16c4aa00093be21e0d789e"
dependencies = [
"anyhow",
"blst",
"chia-traits 0.10.0",
"chia-sha2 0.15.0",
"chia-traits 0.15.0",
"hex",
"hkdf",
"lru",
Expand All @@ -309,7 +321,7 @@ version = "0.17.0"
dependencies = [
"arbitrary",
"blst",
"chia-sha2",
"chia-sha2 0.17.0",
"chia-traits 0.17.0",
"chia_py_streamable_macro",
"criterion",
Expand Down Expand Up @@ -352,7 +364,7 @@ dependencies = [
"chia-bls 0.17.0",
"chia-protocol",
"chia-puzzles",
"chia-sha2",
"chia-sha2 0.17.0",
"chia-traits 0.17.0",
"chia_py_streamable_macro",
"chia_streamable_macro 0.17.0",
Expand All @@ -377,7 +389,7 @@ dependencies = [
"chia-bls 0.17.0",
"chia-consensus",
"chia-protocol",
"chia-sha2",
"chia-sha2 0.17.0",
"chia-traits 0.17.0",
"clvm-traits",
"clvm-utils",
Expand All @@ -392,7 +404,7 @@ version = "0.17.0"
dependencies = [
"arbitrary",
"chia-bls 0.17.0",
"chia-sha2",
"chia-sha2 0.17.0",
"chia-traits 0.17.0",
"chia_py_streamable_macro",
"chia_streamable_macro 0.17.0",
Expand All @@ -410,7 +422,7 @@ version = "0.16.0"
dependencies = [
"arbitrary",
"chia-protocol",
"chia-sha2",
"chia-sha2 0.17.0",
"chia-traits 0.17.0",
"clvm-traits",
"clvmr",
Expand All @@ -426,7 +438,7 @@ dependencies = [
"arbitrary",
"chia-bls 0.17.0",
"chia-protocol",
"chia-sha2",
"chia-sha2 0.17.0",
"clvm-traits",
"clvm-utils",
"clvmr",
Expand All @@ -451,14 +463,24 @@ version = "0.17.0"
dependencies = [
"anyhow",
"arbitrary",
"chia-sha2",
"chia-sha2 0.17.0",
"hex",
"k256",
"p256",
"rand",
"rand_chacha",
]

[[package]]
name = "chia-sha2"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7020f53eeae8b4c24c5666165738173a167c6478e0c0a9e1c428a491a2e1383d"
dependencies = [
"openssl",
"sha2",
]

[[package]]
name = "chia-sha2"
version = "0.17.0"
Expand Down Expand Up @@ -501,20 +523,20 @@ dependencies = [

[[package]]
name = "chia-traits"
version = "0.10.0"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fb786114e5c748fe0af3ba1e95840fa1910b28f7300c05184506045aff60bb6"
checksum = "e57bbde886b38a9a5df185e751d90e295d14e99659bf43df7fa701d52d4da1ea"
dependencies = [
"chia_streamable_macro 0.10.0",
"sha2",
"chia-sha2 0.15.0",
"chia_streamable_macro 0.15.0",
"thiserror",
]

[[package]]
name = "chia-traits"
version = "0.17.0"
dependencies = [
"chia-sha2",
"chia-sha2 0.17.0",
"chia_streamable_macro 0.17.0",
"pyo3",
"thiserror",
Expand Down Expand Up @@ -548,9 +570,9 @@ dependencies = [

[[package]]
name = "chia_streamable_macro"
version = "0.10.0"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43975e01fb4293021af4950366a6f80c45d7301d499622359c7533bd7af19592"
checksum = "00e78b5981952d2383b08344fdc6e6f843e72cc9d502d46d1d2824c485b34694"
dependencies = [
"proc-macro-crate 1.3.1",
"proc-macro2",
Expand Down Expand Up @@ -679,7 +701,7 @@ dependencies = [
name = "clvm-utils"
version = "0.17.0"
dependencies = [
"chia-sha2",
"chia-sha2 0.17.0",
"clvm-traits",
"clvmr",
"hex",
Expand All @@ -699,20 +721,21 @@ dependencies = [

[[package]]
name = "clvmr"
version = "0.10.0"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2a0a3193c4f868919b940fa188f4251ed0c24e39d425ded397945bef1b08f7d9"
checksum = "1485694ccaae3198b921ce3dac1954235acadd971289bae970c030f0a4f66174"
dependencies = [
"chia-bls 0.10.0",
"bitvec",
"chia-bls 0.15.0",
"chia-sha2 0.15.0",
"hex-literal",
"k256",
"lazy_static",
"num-bigint",
"num-integer",
"num-traits",
"openssl",
"p256",
"sha2",
"rand",
"sha3",
]

Expand Down Expand Up @@ -1004,6 +1027,12 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"

[[package]]
name = "funty"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c"

[[package]]
name = "futures"
version = "0.3.30"
Expand Down Expand Up @@ -1601,15 +1630,6 @@ dependencies = [
"syn",
]

[[package]]
name = "openssl-src"
version = "300.3.2+3.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a211a18d945ef7e648cc6e0058f4c548ee46aab922ea203e0d30e966ea23647b"
dependencies = [
"cc",
]

[[package]]
name = "openssl-sys"
version = "0.9.104"
Expand All @@ -1618,7 +1638,6 @@ checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741"
dependencies = [
"cc",
"libc",
"openssl-src",
"pkg-config",
"vcpkg",
]
Expand Down Expand Up @@ -1854,6 +1873,12 @@ dependencies = [
"proc-macro2",
]

[[package]]
name = "radium"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09"

[[package]]
name = "rand"
version = "0.8.5"
Expand Down Expand Up @@ -2256,6 +2281,12 @@ dependencies = [
"syn",
]

[[package]]
name = "tap"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"

[[package]]
name = "target-lexicon"
version = "0.12.15"
Expand Down Expand Up @@ -2671,6 +2702,15 @@ dependencies = [
"memchr",
]

[[package]]
name = "wyz"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed"
dependencies = [
"tap",
]

[[package]]
name = "x509-parser"
version = "0.16.0"
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ chia-puzzles-fuzz = { path = "./crates/chia-puzzles/fuzz", version = "0.16.0" }
clvm-traits-fuzz = { path = "./crates/clvm-traits/fuzz", version = "0.16.0" }
clvm-utils-fuzz = { path = "./crates/clvm-utils/fuzz", version = "0.16.0" }
blst = { version = "0.3.12", features = ["portable"] }
clvmr = "0.10.0"
clvmr = "0.12.0"
syn = "2.0.95"
quote = "1.0.38"
proc-macro2 = "1.0.92"
Expand Down
9 changes: 4 additions & 5 deletions crates/chia-consensus/src/gen/solution_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,28 +418,27 @@ mod tests {
b78080
fe81f6
ff0180
ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff
06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff
8080808080ffff01ff0bffff0101
fe6f
ff0580
80ff0180
fe3e
ff0180
80ffff04ffff01b08cf5533a94afae0f4613d3ea565e47abc5373415967ef582
4fd009c602cb629e259908ce533c21de7fd7a68eb96c52d0
fe7f
ff0180
80ff8601977420dc00ffff80ffff01ffff3dffa080115c1c71035a2cd60a4949
9fb9e5cb55be8d6e25e8680bfc0409b7acaeffd48080ff8080808080"
)
);

let generator_output = run_generator(&result);
assert_eq!(generator_output, EXPECTED_GENERATOR_OUTPUT);
}
Expand Down

0 comments on commit 4444a22

Please sign in to comment.