Skip to content

Commit b03c2cc

Browse files
committed
Merge #180: checksum: introduce PrintImpl object that can compute various code properties
caefc44 checksum: add unit test to print parameters of the descriptor checksum (Andrew Poelstra) b44431f checksum: introduce `PrintImpl` object to print `impl Checksum` blocks (Andrew Poelstra) 65aefd2 gf_ext: add cubic extension field of GF32, GF32768 (Andrew Poelstra) 4c06f72 PackedFe32: introduce ability to re-pack elements (Andrew Poelstra) a24825d primitives: introduce `Polynomial` type, generator polynomial analysis (Andrew Poelstra) cf545e4 primitives: add extension field module, define GF1024 (Andrew Poelstra) 8b08535 primitives: introduce Field trait (Andrew Poelstra) bd6f2f6 bump MSRV to 1.56.1. (Andrew Poelstra) Pull request description: This PR does a couple things: * Bumps the MSRV to 1.56.1 to match rust-bitcoin (and get us const generics which are useful for defining extension fields) as well as cleaning up a couple warnings. * Introduces the GF1024 field, a simple polynomial type, the Chein root-finding algorithm, and a couple other misc algorithms that will be useful for error correction. (All this is internal and not reflected in the public API.) * Introduces the GF32768 field which will be needed for error correction of the descriptor checksum. * To demonstrate this new functionality, adds an object to the API which can produce the `impl Checksum` block for codes which can be corrected using a quadratic or cubic field extension. This will hopefully provide some context for people not super familiar with BCH code about where these magic numbers come from. We also add unit tests that produce the parameters for codex32 and the descriptor checksum. A later PR will introduce more parameters which will be needed for error correction. ACKs for top commit: clarkmoody: ACK caefc44 Tree-SHA512: a2408123e61b029f61e51cc9678e8c285c989316eb3e629b522f5d0724f29b727dd76054d3e1545504619711f8b0d086c0bafb4da287b55223f40e8798b04b23
2 parents 8529aff + caefc44 commit b03c2cc

File tree

13 files changed

+1987
-83
lines changed

13 files changed

+1987
-83
lines changed

.github/workflows/rust.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ jobs:
5454
run: ./contrib/test.sh
5555

5656
MSRV:
57-
name: Test - 1.48.0 toolchain
57+
name: Test - 1.56.1 toolchain
5858
runs-on: ubuntu-latest
5959
strategy:
6060
fail-fast: false
6161
steps:
6262
- name: Checkout Crate
6363
uses: actions/checkout@v3
6464
- name: Checkout Toolchain
65-
uses: dtolnay/rust-toolchain@1.48.0
65+
uses: dtolnay/rust-toolchain@1.56.1
6666
- name: Running test script
6767
env:
6868
DO_FEATURE_MATRIX: true

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Bitcoin-specific address encoding is handled by the `bitcoin-bech32` crate.
1414

1515
## MSRV
1616

17-
This library should always compile with any combination of features on **Rust 1.48.0**.
17+
This library should always compile with any combination of features on **Rust 1.56.1**.
1818

1919

2020
## Githooks

api/all-features.txt

+198
Large diffs are not rendered by default.

api/alloc-only.txt

+198
Large diffs are not rendered by default.

api/no-features.txt

+186
Large diffs are not rendered by default.

clippy.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
msrv = "1.48.0"
1+
msrv = "1.56.1"

src/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,13 @@ use crate::primitives::decode::{ChecksumError, UncheckedHrpstring, UncheckedHrps
161161
pub use {
162162
crate::primitives::checksum::Checksum,
163163
crate::primitives::gf32::Fe32,
164+
crate::primitives::gf32_ext::{Fe1024, Fe32768},
164165
crate::primitives::hrp::Hrp,
165166
crate::primitives::iter::{ByteIterExt, Fe32IterExt},
166167
crate::primitives::{Bech32, Bech32m, NoChecksum},
167168
};
169+
#[cfg(feature = "alloc")]
170+
pub use crate::primitives::checksum::PrintImpl;
168171

169172
// Write to fmt buffer, small during testing to exercise full code path.
170173
#[cfg(not(test))]

0 commit comments

Comments
 (0)