Skip to content

Commit

Permalink
Merge commit '0227c272b2c4dc890b4f668fdf568d69bc457c14' into catchup/…
Browse files Browse the repository at this point in the history
…long_lived_initial_datalayer_from_main_0227c272b2c4dc890b4f668fdf568d69bc457c14
  • Loading branch information
altendky committed Jan 9, 2025
2 parents 00acff9 + 0227c27 commit 358a1e4
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 19 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,18 @@ jobs:
python -m pip install pytest pytest-xdist
python -m pip install mypy
python -m pip install black
python -m pip install clvm_tools colorama blspy chia-blockchain==2.1.2 clvm==0.9.8
- name: Build
- name: Build (windows)
if: matrix.os.matrix == 'windows'
run: |
python -m pip install clvm_tools colorama blspy chia-blockchain==2.1.2 clvm==0.9.8
maturin develop --release -m wheel/Cargo.toml
- name: Build (non-windows)
if: matrix.os.matrix != 'windows'
run: |
maturin develop --release -m wheel/Cargo.toml --features=openssl
- name: python mypy
run: |
mypy tests
Expand Down Expand Up @@ -131,7 +137,7 @@ jobs:
- name: Build
run: |
maturin develop --release -m wheel/Cargo.toml
maturin develop --release -m wheel/Cargo.toml --features=openssl
- name: test generators
run: |
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
run: |
python${{ matrix.python.major-dot-minor }} -m venv venv
. venv/bin/activate
maturin build -i python --release -m wheel/Cargo.toml
maturin build -i python --release -m wheel/Cargo.toml --features=openssl,pyo3/extension-module
- name: Build Linux with maturin on Python ${{ matrix.python }}
if: matrix.os.matrix == 'ubuntu'
Expand All @@ -150,13 +150,14 @@ jobs:
${{ matrix.python.by-arch[matrix.arch.matrix].docker-url }} \
bash -exc '\
yum -y install openssl-devel && \
yum -y install perl-IPC-Cmd && \
source $HOME/.cargo/env && \
rustup target add ${{ matrix.python.by-arch[matrix.arch.matrix].rustup-target }} && \
python${{ matrix.python.major-dot-minor }} -m venv /venv && \
. /venv/bin/activate && \
pip install --upgrade pip && \
pip install maturin && \
CC=gcc maturin build --release --manylinux ${{ matrix.python.by-arch[matrix.arch.matrix].manylinux-version }} -m wheel/Cargo.toml \
CC=gcc maturin build --release --manylinux ${{ matrix.python.by-arch[matrix.arch.matrix].manylinux-version }} -m wheel/Cargo.toml --features=openssl,pyo3/extension-module \
'
- name: Build Windows with maturin on Python ${{ matrix.python }}
Expand Down
21 changes: 10 additions & 11 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2780,9 +2780,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"

[[package]]
name = "wasm-bindgen"
version = "0.2.95"
version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e"
checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396"
dependencies = [
"cfg-if",
"once_cell",
Expand All @@ -2791,13 +2791,12 @@ dependencies = [

[[package]]
name = "wasm-bindgen-backend"
version = "0.2.95"
version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358"
checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79"
dependencies = [
"bumpalo",
"log",
"once_cell",
"proc-macro2",
"quote",
"syn",
Expand All @@ -2806,19 +2805,19 @@ dependencies = [

[[package]]
name = "wasm-bindgen-macro"
version = "0.2.95"
version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56"
checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
]

[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.95"
version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68"
checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2"
dependencies = [
"proc-macro2",
"quote",
Expand All @@ -2829,9 +2828,9 @@ dependencies = [

[[package]]
name = "wasm-bindgen-shared"
version = "0.2.95"
version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d"
checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6"

[[package]]
name = "web-sys"
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ clap = "4.5.23"
zstd = "0.13.2"
blocking-threadpool = "1.0.1"
libfuzzer-sys = "0.4"
wasm-bindgen = "0.2.95"
wasm-bindgen = "0.2.99"
openssl = "0.10.68"
k256 = "0.13.4"
p256 = "0.13.2"
Expand Down
1 change: 1 addition & 0 deletions crates/chia-consensus/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::large_stack_arrays)]
#![doc = include_str!("../README.md")]

pub mod allocator;
Expand Down
3 changes: 3 additions & 0 deletions crates/chia-protocol/src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ impl Program {
args: &Bound<'_, PyAny>,
) -> PyResult<(u64, Bound<'a, PyAny>)> {
use clvmr::MEMPOOL_MODE;
#[allow(clippy::used_underscore_items)]
self._run(py, max_cost, MEMPOOL_MODE, args)
}

Expand All @@ -360,9 +361,11 @@ impl Program {
max_cost: u64,
args: &Bound<'_, PyAny>,
) -> PyResult<(u64, Bound<'a, PyAny>)> {
#[allow(clippy::used_underscore_items)]
self._run(py, max_cost, 0, args)
}

// exposed to python so allowing use of the python private indicator leading underscore
fn _run<'a>(
&self,
py: Python<'a>,
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.79.0"
channel = "1.84.0"
components = ["rustfmt", "clippy"]
3 changes: 3 additions & 0 deletions wheel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ python-source = "python"
[package.metadata.cargo-machete]
ignored = ["chia-client", "chia-ssl"]

[features]
openssl = ["clvmr/openssl"]

[dependencies]
clvmr = { workspace = true }
hex = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion wheel/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ pub fn get_puzzle_and_solution_for_coin<'a>(
find_amount: u64,
find_ph: Bytes32,
flags: u32,
) -> PyResult<(Bound<'_, PyBytes>, Bound<'_, PyBytes>)> {
) -> PyResult<(Bound<'a, PyBytes>, Bound<'a, PyBytes>)> {
let mut allocator = make_allocator(LIMIT_HEAP);

let program = py_to_slice::<'a>(program);
Expand Down

0 comments on commit 358a1e4

Please sign in to comment.