Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
strategy:
matrix:
target:
- wasm32-wasi
- wasm32-wasip1
- thumbv7em-none-eabihf
steps:
- uses: actions/checkout@v4
Expand All @@ -70,9 +70,9 @@ jobs:
- name: Add lazy_static with the spin_no_std feature
working-directory: ./ci-build
run: cargo add lazy_static --no-default-features --features "spin_no_std"
- name: Add typenum with the no_std feature
- name: Add typenum with no default features
working-directory: ./ci-build
run: cargo add typenum --no-default-features --features "no_std"
run: cargo add typenum --no-default-features
- name: Show Cargo.toml for the synthetic crate
working-directory: ./ci-build
run: cat Cargo.toml
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lints-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
target:
- wasm32-wasi
- wasm32-wasip1
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -47,9 +47,9 @@ jobs:
- name: Add lazy_static with the spin_no_std feature
working-directory: ./ci-build
run: cargo add lazy_static --no-default-features --features "spin_no_std"
- name: Add typenum with the no_std feature
- name: Add typenum with no default features
working-directory: ./ci-build
run: cargo add typenum --no-default-features --features "no_std"
run: cargo add typenum --no-default-features
- name: Show Cargo.toml for the synthetic crate
working-directory: ./ci-build
run: cat Cargo.toml
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and this project adheres to Rust's notion of
## [Unreleased]

### Changed
- MSRV is now 1.85.1
- Migrated from yanked `core2` library to `corez`
- `orchard::pczt::Bundle::extract` now takes its `self` argument by
reference instead of by value.

Expand Down
11 changes: 4 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors = [
"Kris Nuttycombe <kris@electriccoin.co>",
]
edition = "2021"
rust-version = "1.70"
rust-version = "1.85.1"
description = "The Orchard shielded transaction protocol"
license = "MIT OR Apache-2.0"
repository = "https://github.com/zcash/orchard"
Expand Down Expand Up @@ -60,7 +60,7 @@ getset = "0.1"
tracing = { version = "0.1", default-features = false }

# No-std support
core2 = { version = "0.3", default-features = false, features = ["alloc"] }
corez = { version = "0.1.1", default-features = false, features = ["alloc"] }

# Developer tooling dependencies
image = { version = "0.24", optional = true }
Expand All @@ -84,7 +84,7 @@ bench = false

[features]
default = ["circuit", "multicore", "std"]
std = ["core2/std", "group/wnaf-memuse", "reddsa/std"]
std = ["corez/std", "group/wnaf-memuse", "reddsa/std"]
circuit = ["dep:halo2_gadgets", "dep:halo2_proofs", "std"]
unstable-frost = []
multicore = ["halo2_proofs?/multicore"]
Expand Down
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,9 @@ Requires Rust 1.70+.
## `no_std` compatibility

In order to take advantage of `no_std` builds, downstream users of this crate
must enable:

* the `spin_no_std` feature of the `lazy_static` crate; and
* the `no_std` feature of the `typenum` crate.

This is needed because the `--no-default-features` builds of these crates still
rely on `std`.
must enable the `spin_no_std` feature of the `lazy_static` crate. This is
needed because the `--no-default-features` build of `lazy_static` still relies
on `std`.

## License

Expand Down
File renamed without changes.
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.70.0"
channel = "1.85.1"
components = [ "clippy", "rustfmt" ]
6 changes: 2 additions & 4 deletions src/constants/fixed_bases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,10 @@ pub const FIXED_BASE_WINDOW_SIZE: usize = 3;
pub const H: usize = 1 << FIXED_BASE_WINDOW_SIZE;

/// Number of windows for a full-width scalar
pub const NUM_WINDOWS: usize =
(L_ORCHARD_SCALAR + FIXED_BASE_WINDOW_SIZE - 1) / FIXED_BASE_WINDOW_SIZE;
pub const NUM_WINDOWS: usize = L_ORCHARD_SCALAR.div_ceil(FIXED_BASE_WINDOW_SIZE);

/// Number of windows for a short signed scalar
pub const NUM_WINDOWS_SHORT: usize =
(L_VALUE + FIXED_BASE_WINDOW_SIZE - 1) / FIXED_BASE_WINDOW_SIZE;
pub const NUM_WINDOWS_SHORT: usize = L_VALUE.div_ceil(FIXED_BASE_WINDOW_SIZE);

#[derive(Copy, Clone, Debug, Eq, PartialEq)]
// A sum type for both full-width and short bases. This enables us to use the
Expand Down
12 changes: 6 additions & 6 deletions src/issuance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1534,14 +1534,14 @@ mod tests {
);
}

#[test]
fn issue_bundle_verify_fail_bad_signature() {
impl IssueBundle<Signed> {
pub fn set_authorization(&mut self, authorization: Signed) {
self.authorization = authorization;
}
impl IssueBundle<Signed> {
pub(crate) fn set_authorization(&mut self, authorization: Signed) {
self.authorization = authorization;
}
}

#[test]
fn issue_bundle_verify_fail_bad_signature() {
let params = setup_params();
let mut rng = OsRng;
let (mut signed, _) = new_signed_bundle(&params, b"bad sig", 5);
Expand Down
2 changes: 1 addition & 1 deletion src/keys.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Key structures for Orchard.

use alloc::vec::Vec;
use core2::io::{self, Read, Write};
use corez::io::{self, Read, Write};

use ::zip32::ChildIndex;
use aes::Aes256;
Expand Down
2 changes: 1 addition & 1 deletion src/note/asset_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ impl AssetBase {
impl Hash for AssetBase {
fn hash<H: Hasher>(&self, h: &mut H) {
h.write(&self.to_bytes());
h.finish();
let _ = h.finish();
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/zsa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ fn zsa_issue_and_transfer() {

let zsa_spend1_asset1 = TestSpendInfo {
note: zsa_note1_asset1,
merkle_path: merkle_paths.get(0).unwrap().clone(),
merkle_path: merkle_paths.first().unwrap().clone(),
};
let zsa_spend2_asset1 = TestSpendInfo {
note: zsa_note2_asset1,
Expand Down
Loading