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 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 docs/samples/Cargo.lock

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

2 changes: 1 addition & 1 deletion docs/samples/parser/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ full = ["std"]
dash-primitives = { version = "0.0.0", path = "../../../pkgs/primitives", default-features = false, features = [
"serde",
] }
dash-types = { version = "0.1.0-beta", path = "../../../pkgs/types", default-features = false }
dash-types = { version = "0.2.0-beta", path = "../../../pkgs/types", default-features = false }
hex-conservative = { version = "1.3", default-features = false, features = [
"alloc",
] }
Expand Down
4 changes: 2 additions & 2 deletions docs/samples/solver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ full = ["std"]
bitcoin-consensus-encoding = { workspace = true, features = ["alloc"] }
bitcoin-primitives = { workspace = true, features = ["alloc"] }
bitcoin-units = { workspace = true, features = ["alloc"] }
dash-num = { version = "0.1.0-beta", path = "../../../pkgs/num", default-features = false }
dash-num = { version = "0.2.0-beta", path = "../../../pkgs/num", default-features = false }
dash-pow = { version = "0.0.0", path = "../../../pkgs/pow", default-features = false }
dash-primitives = { version = "0.0.0", path = "../../../pkgs/primitives", default-features = false }
dash-script = { version = "0.0.0", path = "../../../pkgs/script", default-features = false }
dash-types = { version = "0.1.0-beta", path = "../../../pkgs/types", default-features = false }
dash-types = { version = "0.2.0-beta", path = "../../../pkgs/types", default-features = false }
hex-conservative = { version = "1.3", default-features = false, features = [
"alloc",
] }
Expand Down
1 change: 1 addition & 0 deletions maint/codeql/rust/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
disable-default-queries: true
paths-ignore:
- public
- target
queries:
- uses: ./maint/codeql/rust
6 changes: 3 additions & 3 deletions pkgs/dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ bin = [

[build-dependencies]
built = { version = "0.7", features = ["dependency-tree", "git2"] }
dash-types = { version = "0.1.0-beta", path = "../types", default-features = false, features = [
dash-types = { version = "0.2.0-beta", path = "../types", default-features = false, features = [
"codec",
] }
proc-macro2 = "1"
Expand All @@ -60,13 +60,13 @@ xxhash-rust = { version = "0.8", features = ["xxh32"] }
[dependencies]
bitcoin-consensus-encoding = { workspace = true, features = ["alloc"] }
cfg-if = "1"
dash-num = { version = "0.1.0-beta", path = "../num", optional = true, features = [
dash-num = { version = "0.2.0-beta", path = "../num", optional = true, features = [
"codec",
] }
dash-params = { version = "0.0.0", path = "../params", optional = true }
dash-pow = { version = "0.0.0", path = "../pow", optional = true }
dash-primitives = { version = "0.0.0", path = "../primitives" }
dash-types = { version = "0.1.0-beta", path = "../types", default-features = false, features = [
dash-types = { version = "0.2.0-beta", path = "../types", default-features = false, features = [
"codec",
] }
hex-conservative = { workspace = true, features = [
Expand Down
20 changes: 10 additions & 10 deletions pkgs/num/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

## [Unreleased]

## [0.2.0-beta] - 2026-10-20

### Added

- `CompactTarget::block_proof`, the work contributed by a block with that target, zero for negative, overflowing or
Expand All @@ -21,26 +23,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
### Changed

- **The minimum supported Rust version is raised from 1.85 to 1.89.**
- `HashBlob`, `make_hash!` types and `Arith256` serialize as their little-endian storage bytes for machine-readable
formats, JSON retains hex encoded big-endian string encoding.
- `CompactTarget::from_str` requires exactly 8 hex digits, optionally `0x`/`0X`-prefixed. Shorter input is now
rejected with `ParseHexError::OddLength` or `ParseHexError::InvalidLength`.
- The `serde` feature no longer implies `codec`. `CompactTarget` implements `Serialize` and `Deserialize` without
- **`HashBlob`, `make_hash!` types and `Arith256` serialize as their little-endian storage bytes for machine-readable
formats.** JSON retains the hex-encoded big-endian string.
- **The `serde` feature no longer implies `codec`.** `CompactTarget` implements `Serialize` and `Deserialize` without
`codec`. Callers that relied on `serde` to enable `codec` must enable it explicitly.
- `CompactTarget::from_str` requires exactly 8 hex digits, optionally `0x`/`0X`-prefixed. Shorter input is rejected
with `ParseHexError::OddLength` or `ParseHexError::InvalidLength`.
- `Arith256::to_f64` rounds like the reference implementation, where it was one ULP off on roughly 1% of inputs.

### Removed

- `ParseHexError` has moved to `dash-types` as `dash_types::ParseHexError`.
- The `dash_types::Numeric` re-export in favour of a wholesale crate re-export. `dash_num::Numeric` imports must switch
to `dash_num::__deps::dash_types::Numeric` or depend on `dash-types` directly.

### Fixed

- `Arith256::to_f64` rounds like the reference implementation. It was one ULP off on roughly 1% of inputs.

## [0.1.0-beta] - 2026-09-14

- Initial release.

[unreleased]: https://github.com/dashpay/base-sdk/compare/dash-num-0.1.0-beta...HEAD
[unreleased]: https://github.com/dashpay/base-sdk/compare/dash-num-0.2.0-beta...HEAD
[0.2.0-beta]: https://github.com/dashpay/base-sdk/compare/dash-num-0.1.0-beta...dash-num-0.2.0-beta
[0.1.0-beta]: https://github.com/dashpay/base-sdk/releases/tag/dash-num-0.1.0-beta
4 changes: 2 additions & 2 deletions pkgs/num/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dash-num"
version = "0.1.0-beta"
version = "0.2.0-beta"
description = "Wide-integer blob and arithmetic types for the Dash Base SDK"
keywords = ["base-sdk", "dash", "dashcore", "dashpay"]
categories = [
Expand Down Expand Up @@ -52,7 +52,7 @@ serde = [
ambassador = { workspace = true }
bitcoin-consensus-encoding = { workspace = true, optional = true }
bitcoin-internals = { workspace = true }
dash-types = { version = "0.1.0-beta", path = "../types", default-features = false }
dash-types = { version = "0.2.0-beta", path = "../types", default-features = false }
delegate = { workspace = true }
hex-conservative = { workspace = true }
serde = { workspace = true, features = [
Expand Down
2 changes: 1 addition & 1 deletion pkgs/num/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This crate supplies the wide blob and arithmetic types used by the Dash Base SDK
To import `dash-num` to your project, add the following to the `[dependencies]` section in `Cargo.toml`

```toml
dash-num = "0.1.0-beta"
dash-num = "0.2.0-beta"
```

To use an unpublished revision of this crate, identify the commit hash to pin against and use the following replacing
Expand Down
6 changes: 3 additions & 3 deletions pkgs/p2p_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ portable = [
[dependencies]
bitcoin-consensus-encoding = { workspace = true, features = ["alloc"] }
cfg-if = "1"
dash-num = { version = "0.1.0-beta", path = "../num", features = ["codec"] }
dash-pkc = { version = "0.1.0-beta", path = "../pkc", features = ["codec"] }
dash-num = { version = "0.2.0-beta", path = "../num", features = ["codec"] }
dash-pkc = { version = "0.2.0-beta", path = "../pkc", features = ["codec"] }
dash-script = { version = "0.0.0", path = "../script" }
dash-params = { version = "0.0.0", path = "../params" }
dash-primitives = { version = "0.0.0", path = "../primitives" }
dash-types = { version = "0.1.0-beta", path = "../types", default-features = false, features = [
dash-types = { version = "0.2.0-beta", path = "../types", default-features = false, features = [
"codec",
] }
serde = { workspace = true, features = [
Expand Down
4 changes: 2 additions & 2 deletions pkgs/params/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ portable = ["dash-primitives/portable", "dash-script/portable"]
[dependencies]
bitcoin-primitives = { workspace = true, features = ["alloc"] }
bitcoin-units = { workspace = true, features = ["alloc"] }
dash-num = { version = "0.1.0-beta", path = "../num", features = ["codec"] }
dash-num = { version = "0.2.0-beta", path = "../num", features = ["codec"] }
dash-primitives = { version = "0.0.0", path = "../primitives" }
dash-script = { version = "0.0.0", path = "../script" }
dash-types = { version = "0.1.0-beta", path = "../types", default-features = false, features = [
dash-types = { version = "0.2.0-beta", path = "../types", default-features = false, features = [
"codec",
] }
hex-conservative = { workspace = true }
Expand Down
59 changes: 32 additions & 27 deletions pkgs/pkc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

## [Unreleased]

## [0.2.0-beta] - 2026-10-20

### Added

- `Bls{Public,Secret}Key::negate`, `BlsSecretKey::mul_tweak`, `EcdsaPublicKey::negate` and `EcdsaSecretKey::mul_tweak`.
Expand All @@ -26,43 +28,46 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

- **The minimum supported Rust version is raised from 1.85 to 1.89.**
- **`bls` requires ADX on x86_64 unless `portable` is enabled.**
- Decoding `BlsIesMultiBytes` rejects more than `MAX_IES_RECIPIENTS` ciphertexts, the most any operation accepts.
- `BlsSecretKey::sign`, `BlsSkShare::sign`, `BlsPublicKey::verify` and `BlsSignature::{fast,secure}_verify_aggregates`
gain a `_digest` suffix and take a 32-byte hashed message. `BlsSignature::verify_aggregates` is renamed to
`verify_aggregates_digests` and takes `&[[u8; 32]]`. `BlsScheme::msg_ref` is renamed to `digest_msg`, and
`BlsScheme::Msg` is passed by value as `Msg<'a>`.
- `EcdsaSecretKey::sign` and `EcdsaPublicKey::verify` are renamed to `sign_digest` and `verify_digest`.
`EddsaSecretKey::sign` and `EddsaPublicKey::verify` are renamed to `sign_message` and `verify_message`.
- `BlsScheme::sk_to_bytes` returns `Zeroizing<[u8; 32]>` instead of a bare array. Code that binds the result as
`[u8; 32]` must dereference it.
- `EcdsaSecretKey::negate` takes `&self` and returns the negated key as `Result<Self, EcdsaError>` instead of negating
in place and returning `()`, matching the other tweaks. A call that drops the return value still compiles, warned of
only by `unused_must_use`, but leaves the key as it was. Callers must bind the result, e.g. `sk = sk.negate()?`.
- The following types serialize as raw bytes for machine-readable formats, following changes to `dash-types` and
- **Signing and verification methods are renamed to name their input.**
- `BlsSecretKey::sign`, `BlsSkShare::sign`, `BlsPublicKey::verify` and
`BlsSignature::{fast,secure}_verify_aggregates` gain a `_digest` suffix and take a 32-byte hashed message.
- `BlsSignature::verify_aggregates` is renamed to `verify_aggregates_digests` and takes `&[[u8; 32]]`.
- `BlsScheme::msg_ref` is renamed to `digest_msg`, and `BlsScheme::Msg` is passed by value as `Msg<'a>`.
- `EcdsaSecretKey::sign` and `EcdsaPublicKey::verify` are renamed to `sign_digest` and `verify_digest`.
- `EddsaSecretKey::sign` and `EddsaPublicKey::verify` are renamed to `sign_message` and `verify_message`.
- **`EcdsaSecretKey::negate` takes `&self` and returns the negated key as `Result<Self, EcdsaError>`.** It previously
negated in place and returned `()`, and now matches the other tweaks. A call that drops the return value still
compiles, though warned if `unused_must_use` is enabled, but would otherwise leave the key as-is. Callers must bind
the result, e.g. `sk = sk.negate()?`.
- **`EcdsaPublicKey::verify_digest` normalizes S before verifying**, so a high-S signature verifies like its low-S
twin. Callers refusing malleable signatures should check with `EcdsaSignature::is_low_s`.
- **`BlsPkBytes`, `BlsSkBytes`, `BlsSigBytes`, `BlsPkHash`, `BlsDhBytes`, `BlsIesBlobBytes` and `BlsIesMultiBytes` drop
their scheme parameter.** Callers drop the type argument and define the scheme when they exercise the operational
type with `to::<S>()`.
- **The following types serialize as raw bytes for machine-readable formats**, following changes to `dash-types` and
`dash-num`. JSON and other human-readable formats are unaffected by this change.

`BlsPkBytes`, `BlsSigBytes`, `BlsPkHash`, `BlsShareId`, `BlsIes{Blob,Multi}Bytes`, `BlsPublicKey`, `BlsSignature`,
`Bls{Pk,Sig}Share`, `BlsIes{Blob,Multi}`, `EcdsaPkBytes`, `EcdsaSigBytes`, `EcdsaRecSigBytes`, `EcdsaPkHash`,
`EcdsaPublicKey`, `EcdsaSignature`, `EcdsaRecSignature`, `EddsaPkBytes`, `EddsaSigBytes`, `EddsaPkHash`,
`EddsaPublicKey`, `EddsaSignature`.
- The `serde` feature no longer implies `codec`. `BlsIes{Blob,Multi}` and `BlsIes{Blob,Multi}Bytes` serialize as
their wire image and implement `Serialize` and `Deserialize` only with both features. Callers that relied on `serde`
to enable `codec` must enable it explicitly.
- `BlsPkBytes`, `BlsSkBytes`, `BlsSigBytes`, `BlsPkHash`, `BlsDhBytes`, `BlsIesBlobBytes` and `BlsIesMultiBytes` drop
their scheme parameter. Callers remove the type argument and pick the scheme when they convert with `to::<S>()`.
- `EcdsaRecSigBytes::from_raw` is renamed to `from_bytes`, with unchanged behaviour.
- **The `serde` feature no longer implies `codec`.** `BlsIes{Blob,Multi}` and `BlsIes{Blob,Multi}Bytes` serialize as
their wire image and implement `Serialize` and `Deserialize` only with `serde` and `codec` enabled, serving as the exception.

### Fixed

- Decoding `BlsIes{Blob,Multi}Bytes`, and so `BlsIes{Blob,Multi}`, rejects a ciphertext length, blob count or blob
length above `MAX_SER_SIZE` even when enough bytes remain, and reports one past the remaining input as
`DecodeError::Eof`.
- `EcdsaPublicKey::verify_digest` normalizes S before verifying, so a high-S signature verifies like its low-S twin.
Callers refusing malleable signatures check `EcdsaSignature::is_low_s`.
- Callers that relied on `serde`
to enable `codec` must enable it explicitly.
- Decoding `BlsIes{Blob,Multi}Bytes` (and by extension `BlsIes{Blob,Multi}`), enforces limits on lengths and counts.
- A ciphertext length, blob count or blob length above `MAX_SER_SIZE` is rejected even when enough bytes remain.
- A value past the remaining input is reported as `DecodeError::Eof`.
- `BlsIesMultiBytes` rejects more than `MAX_IES_RECIPIENTS` ciphertexts.
- `BlsScheme::sk_to_bytes` returns `Zeroizing<[u8; 32]>` instead of a bare array. Code that binds the result as
`[u8; 32]` must dereference it.
- `EcdsaRecSigBytes::from_raw` is renamed to `from_bytes`.

## [0.1.0-beta] - 2026-09-15

- Initial release.

[unreleased]: https://github.com/dashpay/base-sdk/compare/dash-pkc-0.1.0-beta...HEAD
[unreleased]: https://github.com/dashpay/base-sdk/compare/dash-pkc-0.2.0-beta...HEAD
[0.2.0-beta]: https://github.com/dashpay/base-sdk/compare/dash-pkc-0.1.0-beta...dash-pkc-0.2.0-beta
[0.1.0-beta]: https://github.com/dashpay/base-sdk/releases/tag/dash-pkc-0.1.0-beta
6 changes: 3 additions & 3 deletions pkgs/pkc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dash-pkc"
version = "0.1.0-beta"
version = "0.2.0-beta"
description = "Cryptographic primitives for the Dash Base SDK"
keywords = ["base-sdk", "dash", "dashcore", "dashpay"]
categories = [
Expand Down Expand Up @@ -33,8 +33,8 @@ base58ck = { workspace = true, optional = true, features = ["alloc"] }
bitcoin_hashes = { workspace = true, features = ["alloc"] }
blst = { version = "0.3", default-features = false, optional = true }
cfg-if = "1"
dash-num = { version = "0.1.0-beta", path = "../num", default-features = false }
dash-types = { version = "0.1.0-beta", path = "../types", default-features = false }
dash-num = { version = "0.2.0-beta", path = "../num", default-features = false }
dash-types = { version = "0.2.0-beta", path = "../types", default-features = false }
ed25519-dalek = { version = "3", default-features = false, features = [
"fast",
"rand_core",
Expand Down
2 changes: 1 addition & 1 deletion pkgs/pkc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ consensus-stable types, including
To import `dash-pkc` to your project, add the following to the `[dependencies]` section in `Cargo.toml`

```toml
dash-pkc = "0.1.0-beta"
dash-pkc = "0.2.0-beta"
```

To use an unpublished revision of this crate, identify the commit hash to pin against and use the following replacing
Expand Down
6 changes: 3 additions & 3 deletions pkgs/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ bitcoin-consensus-encoding = { workspace = true, features = ["alloc"] }
bitcoin-primitives = { workspace = true, features = ["alloc"] }
bitcoin_hashes = { workspace = true, features = ["alloc"] }
bitcoin-units = { workspace = true, features = ["alloc"] }
dash-num = { version = "0.1.0-beta", path = "../num", features = ["codec"] }
dash-pkc = { version = "0.1.0-beta", path = "../pkc", default-features = false, features = [
dash-num = { version = "0.2.0-beta", path = "../num", features = ["codec"] }
dash-pkc = { version = "0.2.0-beta", path = "../pkc", default-features = false, features = [
"bls",
"codec",
"ecdsa",
] }
dash-pow = { version = "0.0.0", path = "../pow" }
dash-script = { version = "0.0.0", path = "../script" }
dash-types = { version = "0.1.0-beta", path = "../types", default-features = false, features = [
dash-types = { version = "0.2.0-beta", path = "../types", default-features = false, features = [
"bitcoin-primitives",
"codec",
] }
Expand Down
6 changes: 3 additions & 3 deletions pkgs/script/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ serde = ["dep:serde", "dash-pkc/serde", "dash-types/serde"]
[dependencies]
base58ck = { workspace = true, features = ["alloc"] }
bitcoin-consensus-encoding = { workspace = true, features = ["alloc"] }
dash-num = { version = "0.1.0-beta", path = "../num", default-features = false }
dash-pkc = { version = "0.1.0-beta", path = "../pkc", default-features = false, features = [
dash-num = { version = "0.2.0-beta", path = "../num", default-features = false }
dash-pkc = { version = "0.2.0-beta", path = "../pkc", default-features = false, features = [
"codec",
] }
dash-types = { version = "0.1.0-beta", path = "../types", default-features = false, features = [
dash-types = { version = "0.2.0-beta", path = "../types", default-features = false, features = [
"bitcoin-primitives",
"codec",
] }
Expand Down
Loading
Loading