Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
e391ce9
test: Add a test for incorrect message signature
Shatnerz Feb 9, 2022
51fef76
feat: Add Address.is_related_to_pubkey()
Shatnerz Feb 20, 2022
7638d59
Improve rusntdocs for *_hash_ty methods
tcharding Feb 28, 2022
3786680
Use correct script name
tcharding Mar 8, 2022
8163497
Use correct indentation
tcharding Mar 8, 2022
0d36455
Build the docs with test.sh
tcharding Mar 8, 2022
ac10590
Flatten the policy module
tcharding Mar 8, 2022
ee3b8c2
Order impl_hashencode lines
tcharding Mar 8, 2022
8a1cc2c
Improve docs on ClassifyContext
tcharding Mar 9, 2022
f01f047
Remove unnecessary newlines
tcharding Mar 9, 2022
f4886af
Add full stops to docs
tcharding Mar 9, 2022
337caad
Merge rust-bitcoin/rust-bitcoin#852: Improve rustdocs for *_hash_ty m…
apoelstra Mar 9, 2022
5464848
Refactor check_witness_commitment
tcharding Mar 9, 2022
f03092c
Fix erroneous function rustdoc
tcharding Mar 9, 2022
146d5e8
Improve docs for blockdata::block
tcharding Mar 9, 2022
aaf587d
Use correct opcode count
tcharding Mar 9, 2022
3bcc146
Improve docs: encode_signing_data_to/signature_hash
tcharding Mar 9, 2022
6a0ec1a
Remove redundant _eq
tcharding Mar 9, 2022
f02b3a8
Add code comment for emtpy input
tcharding Mar 9, 2022
e503f14
Improve docs: blockdata::transaction
tcharding Mar 9, 2022
4dcbef6
Improve docs: script module
tcharding Mar 9, 2022
7f33fe6
Delete contract hash module
tcharding Mar 9, 2022
e8cd3a0
Merge rust-bitcoin/rust-bitcoin#868: Use correct opcode count
apoelstra Mar 10, 2022
d68531d
Update secp256k1 dependency
tcharding Mar 10, 2022
7f0d172
Merge rust-bitcoin/rust-bitcoin#875: Update secp256k1 dependency
dr-orlovsky Mar 12, 2022
64164db
Merge rust-bitcoin/rust-bitcoin#869: Improve docs: script module
dr-orlovsky Mar 12, 2022
501cf63
Merge rust-bitcoin/rust-bitcoin#865: Cleanup transaction docs
dr-orlovsky Mar 12, 2022
7e755d3
Merge rust-bitcoin/rust-bitcoin#864: Cleanup block module
dr-orlovsky Mar 12, 2022
a8c9ea6
Merge rust-bitcoin/rust-bitcoin#858: Build the docs with test.sh
dr-orlovsky Mar 12, 2022
40e6f13
Merge rust-bitcoin/rust-bitcoin#867: Cleanup opcodes module
dr-orlovsky Mar 12, 2022
7760611
Merge rust-bitcoin/rust-bitcoin#863: Trivial: Order impl_hashencode l…
dr-orlovsky Mar 12, 2022
377f4ad
Merge rust-bitcoin/rust-bitcoin#862: Flatten the policy module
dr-orlovsky Mar 12, 2022
60d9416
Merge rust-bitcoin/rust-bitcoin#825: test: Add a test for incorrect m…
dr-orlovsky Mar 12, 2022
93daed9
Merge rust-bitcoin/rust-bitcoin#871: Delete contract hash module
apoelstra Mar 12, 2022
7554d76
Make Script::witness_version public
dr-orlovsky Mar 13, 2022
efa9555
Merge rust-bitcoin/rust-bitcoin#876: Make Script::witness_version public
sanket1729 Mar 13, 2022
3e21295
Remove unnecessary whitespace character
tcharding Mar 8, 2022
3831816
Move test helper function
tcharding Mar 8, 2022
82f29b4
Use 1 signature hash for invalid SIGHASH_SINGLE
tcharding Mar 8, 2022
d1abfd9
Add unit test for sighash single bug
tcharding Mar 8, 2022
1c50239
Remove trailing whitespace
tcharding Jan 24, 2022
bf4f563
Refactor whitespace
tcharding Jan 24, 2022
5d68ad8
Remove unneeded return statement
tcharding Jan 24, 2022
b9b6e7e
Remove unneeded braces
tcharding Jan 24, 2022
39ec596
Fix unusual indentation
tcharding Jan 24, 2022
6d84998
Improve braces usage
tcharding Jan 24, 2022
a8ed95e
Refactor where statements
tcharding Jan 24, 2022
702e8bf
Refactor consensus_encode
tcharding Jan 24, 2022
d6462ba
Refactor usage of +
tcharding Jan 24, 2022
b021415
Use block stlye function call
tcharding Jan 24, 2022
aabf2d1
Use brace not parenth fo macro arm
tcharding Jan 24, 2022
a5c06e0
Refactor vector initialisation
tcharding Jan 24, 2022
71cf00a
Use less vertical lines
tcharding Jan 24, 2022
a77907d
Remove unnecessary explicit type annotation
tcharding Mar 14, 2022
51a51cd
Improve ClassifyContext rustdocs
tcharding Mar 15, 2022
63e36fe
Remove impl_index_newtype macro
tcharding Jan 21, 2022
7e6f514
Merge rust-bitcoin/rust-bitcoin#806: Use rustfmt to hint at clean ups…
apoelstra Mar 17, 2022
1629348
Use conventional spacing for default type parameters
tcharding Mar 16, 2022
ebf9162
Merge rust-bitcoin/rust-bitcoin#860: Fix signature hash returned for …
dr-orlovsky Mar 18, 2022
3bde1a2
Remove get_ prefix
tcharding Mar 9, 2022
443a385
Merge rust-bitcoin/rust-bitcoin#877: Improve ClassifyContext rustdocs
dr-orlovsky Mar 20, 2022
1cde71e
Merge rust-bitcoin/rust-bitcoin#880: Use conventional spacing for def…
apoelstra Mar 21, 2022
1295008
Merge rust-bitcoin/rust-bitcoin#861: Remove get_ prefix
apoelstra Mar 21, 2022
3d3993a
Add Rust-Bitcoin logo and project header.
cryptoquick Mar 19, 2022
6ad2902
Remove feature gated enum variants
tcharding Mar 10, 2022
db23006
Merge rust-bitcoin/rust-bitcoin#891: Rust-Bitcoin Logo
sanket1729 Mar 23, 2022
e27f8ff
TapTree iterator implementation
dr-orlovsky Mar 23, 2022
c009210
Use full path for String in macro
tcharding Feb 22, 2022
83dda74
Check for SIGHASH_SINGLE bug in writer fn
tcharding Mar 24, 2022
46c4164
Improve SigHashTypeParseError field
tcharding Feb 22, 2022
35b682d
Implement Display/FromStr for SchnorrSigHashType
tcharding Feb 22, 2022
ea80e65
Merge rust-bitcoin/rust-bitcoin#805: Remove impl_index_newtype macro
sanket1729 Mar 24, 2022
86c6ab7
Merge rust-bitcoin/rust-bitcoin#903: Improve `SchnorrSigHashType`
dr-orlovsky Mar 24, 2022
d263c0c
Merge rust-bitcoin/rust-bitcoin#881: Remove feature gated enum variants
dr-orlovsky Mar 24, 2022
204f477
Add serde to TweakedPublicKey
JeremyRubin Mar 24, 2022
2b942cf
Add Serialize/Deserialize for TaprootSpendInfo
JeremyRubin Mar 24, 2022
ec17ec3
Move with_huffman_tree logic to TaprootBuilder
JeremyRubin Mar 24, 2022
734b1de
Merge rust-bitcoin/rust-bitcoin#897: Check for SIGHASH_SINGLE bug in …
apoelstra Mar 26, 2022
8884a61
Merge rust-bitcoin/rust-bitcoin#908: Add serde to TweakedPublicKey
dr-orlovsky Mar 27, 2022
b7adaf6
Merge rust-bitcoin/rust-bitcoin#907: Add Serialize/Deserialize for Ta…
dr-orlovsky Mar 27, 2022
2bd71c3
Remove From<EcdsaSigHashType> for u32
tcharding Feb 22, 2022
d1753d7
Rename as_u32 -> to_u32
tcharding Feb 22, 2022
5646826
Remove deprecated conversion method
tcharding Feb 25, 2022
ac46289
Remove hungarian-ish notation
tcharding Feb 25, 2022
e05776f
Improve PsbtSigHashType conversion methods
tcharding Feb 22, 2022
8e2422f
Add unit test for deserialize non-standard sighash
tcharding Feb 25, 2022
208eb65
Make NodeInfo API public
sanket1729 Mar 27, 2022
6417c37
Merge rust-bitcoin/rust-bitcoin#796: Re-work sighash type conversion …
dr-orlovsky Mar 28, 2022
c3d30d5
Remove deprecated method use for sighash conversion
dr-orlovsky Mar 28, 2022
e2cae76
Merge rust-bitcoin/rust-bitcoin#913: Remove deprecated method use for…
apoelstra Mar 28, 2022
388897b
Merge rust-bitcoin/rust-bitcoin#901: TapTree iterator
apoelstra Mar 28, 2022
10949b7
Merge rust-bitcoin/rust-bitcoin#910: Make NodeInfo API public
apoelstra Mar 28, 2022
7cdcdaa
Support SIGHASH_RESERVED in SchnorrSigHashType::from_u8
dr-orlovsky Mar 27, 2022
5be1cdb
PsbtSigHashType Display and FromStr implementation
dr-orlovsky Mar 24, 2022
992857a
PsbtSighashType unit tests
dr-orlovsky Mar 26, 2022
7f53c2c
Merge rust-bitcoin/rust-bitcoin#909: Make TaprootBuilder able to gene…
apoelstra Mar 28, 2022
8dabe3e
Taproot Huffman tree builder u64->u32 fixes
dr-orlovsky Mar 28, 2022
1c923c1
Merge rust-bitcoin/rust-bitcoin#914: Taproot Huffman tree builder u64…
apoelstra Mar 28, 2022
0d5565e
Merge rust-bitcoin/rust-bitcoin#839: feat: Add Address.is_related_to_…
apoelstra Mar 28, 2022
b32d403
Merge rust-bitcoin/rust-bitcoin#898: Make PsbtSigHashType use the sam…
apoelstra Mar 28, 2022
b3e612a
Remove misc whitespace
sanket1729 Mar 28, 2022
0d29c83
rust-bitcoin 0.28.0-rc.2
sanket1729 Mar 28, 2022
df3297c
Implement derives for TweakedKeyPair
dr-orlovsky Mar 28, 2022
174a99c
Implement serde for TweakedKeyPair
dr-orlovsky Mar 28, 2022
709a4c2
Merge rust-bitcoin/rust-bitcoin#916: Adds derives to TweakedKeyPair
dr-orlovsky Mar 28, 2022
730d355
Merge rust-bitcoin/rust-bitcoin#915: Release 0.28.0-rc.2
apoelstra Mar 28, 2022
8631474
Improve docs in taproot module
tcharding Mar 28, 2022
c25eddd
Remove unnecessary documentation
tcharding Mar 28, 2022
8d602b8
Fix deprecated since version
tcharding Mar 28, 2022
0a2d45d
Merge rust-bitcoin/rust-bitcoin#918: Fix deprecated since version
dr-orlovsky Mar 29, 2022
58a958e
Merge rust-bitcoin/rust-bitcoin#912: Improve docs in taproot module
dr-orlovsky Mar 30, 2022
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
15 changes: 1 addition & 14 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
DO_BENCH: true
AS_DEPENDENCY: true
DO_NO_STD: true
DO_DOCS: true
- rust: 1.29.0
env:
AS_DEPENDENCY: true
Expand Down Expand Up @@ -82,20 +83,6 @@ jobs:
- name: run cross test
run: cross test --target s390x-unknown-linux-gnu

Docs:
name: Docs
runs-on: ubuntu-latest
steps:
- name: Checkout Crate
uses: actions/checkout@v2
- name: Checkout Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Create Doc
run: cargo doc
Embedded:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

The previous release changed the behavior of `Display` for `ChildNumber`, assuming that any correct usage would not be
affected. [Issue 608](https://github.com/rust-bitcoin/rust-bitcoin/issues/608) goes into the details of why this isn't
the case and how we broke both `rust-miniscript` and BDK.
the case and how we broke both `rust-miniscript` and BDK.

# 0.26.1 - 2021-06-06 (yanked, see explanation above)

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ PR authors may also find it useful to run the following script locally in order
to check that each of the commits within the PR satisfies the requirements
above, before submitting the PR to review:
```shell script
BITCOIN_MSRV=1.29.0 ./contrib/ci.sh
BITCOIN_MSRV=1.29.0 ./contrib/test.sh
```
Please replace the value in `BITCOIN_MSRV=1.29.0` with the current MSRV from
[README.md].
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bitcoin"
version = "0.28.0-rc.1"
version = "0.28.0-rc.2"
authors = ["Andrew Poelstra <[email protected]>"]
license = "CC0-1.0"
homepage = "https://github.com/rust-bitcoin/rust-bitcoin/"
Expand Down Expand Up @@ -36,7 +36,7 @@ rustdoc-args = ["--cfg", "docsrs"]
[dependencies]
bech32 = { version = "0.8.1", default-features = false }
bitcoin_hashes = { version = "0.10.0", default-features = false }
secp256k1 = { version = "0.21.2", default-features = false }
secp256k1 = { version = "0.22.0", default-features = false }
core2 = { version = "0.3.0", optional = true, default-features = false }

base64-compat = { version = "1.0.0", optional = true }
Expand All @@ -47,7 +47,7 @@ hashbrown = { version = "0.8", optional = true }
[dev-dependencies]
serde_json = "<1.0.45"
serde_test = "1"
secp256k1 = { version = "0.21.2", features = [ "recovery", "rand-std" ] }
secp256k1 = { version = "0.22.0", features = [ "recovery", "rand-std" ] }
bincode = "1.3.1"
# We need to pin ryu (transitive dep from serde_json) to stay compatible with Rust 1.22.0
ryu = "<1.0.5"
Expand Down
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
![Continuous integration](https://github.com/rust-bitcoin/rust-bitcoin/workflows/Continuous%20integration/badge.svg)
[![Safety Dance](https://img.shields.io/badge/unsafe-forbidden-success.svg)](https://github.com/rust-secure-code/safety-dance/)
<div align="center">
<h1>Rust Bitcoin</h1>

# Rust Bitcoin Library
<img alt="Rust Bitcoin logo by Hunter Trujillo, see license and source files under /logo" src="./logo/rust-bitcoin.png" width="300" />

<p>Library with support for de/serialization, parsing and executing on data-structures
and network messages related to Bitcoin.
</p>

<p>
<a href="https://crates.io/crates/bitcoin"><img alt="Crate Info" src="https://img.shields.io/crates/v/bitcoin.svg"/></a>
<a href="https://github.com/rust-bitcoin/rust-bitcoin/blob/master/LICENSE"><img alt="MIT or Apache-2.0 Licensed" src="https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg"/></a>
<a href="https://github.com/rust-bitcoin/rust-bitcoin/actions?query=workflow%3AContinuous%20integration"><img alt="CI Status" src="https://github.com/rust-bitcoin/rust-bitcoin/workflows/Continuous%20integration/badge.svg"></a>
<a href="https://docs.rs/bitcoin"><img alt="API Docs" src="https://img.shields.io/badge/docs.rs-bitcoin-green"/></a>
<a href="https://blog.rust-lang.org/2018/09/13/Rust-1.29.html"><img alt="Rustc Version 1.29+" src="https://img.shields.io/badge/rustc-1.29%2B-lightgrey.svg"/></a>
<a href="https://gnusha.org/bitcoin-rust/"><img alt="Chat on IRC" src="https://img.shields.io/badge/irc-%23bitcoin--rust%20on%20libera.chat-blue"></a>
<img alt="Lines of code" src="https://img.shields.io/tokei/lines/github/rust-bitcoin/rust-bitcoin">
</p>
</div>

Library with support for de/serialization, parsing and executing on data
structures and network messages related to Bitcoin.

[Documentation](https://docs.rs/bitcoin/)

Expand Down Expand Up @@ -104,7 +117,7 @@ You can run tests with:
cargo test
```

Please refer to the [`cargo` documentation](https://doc.rust-lang.org/stable/cargo/) for more detailed instructions.
Please refer to the [`cargo` documentation](https://doc.rust-lang.org/stable/cargo/) for more detailed instructions.

## Pull Requests

Expand Down
37 changes: 21 additions & 16 deletions contrib/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,27 @@ cargo test --verbose

if [ "$DO_NO_STD" = true ]
then
echo "********* Testing no-std build *************"
# Build no_std, to make sure that cfg(test) doesn't hide any issues
cargo build --verbose --features="no-std" --no-default-features
echo "********* Testing no-std build *************"
# Build no_std, to make sure that cfg(test) doesn't hide any issues
cargo build --verbose --features="no-std" --no-default-features

# Build std + no_std, to make sure they are not incompatible
cargo build --verbose --features="no-std"
# Build std + no_std, to make sure they are not incompatible
cargo build --verbose --features="no-std"

# Test no_std
cargo test --verbose --features="no-std" --no-default-features
# Test no_std
cargo test --verbose --features="no-std" --no-default-features

# Build all features
cargo build --verbose --features="no-std $FEATURES" --no-default-features
# Build all features
cargo build --verbose --features="no-std $FEATURES" --no-default-features

# Build specific features
for feature in ${FEATURES}
do
cargo build --verbose --features="no-std $feature"
done
# Build specific features
for feature in ${FEATURES}
do
cargo build --verbose --features="no-std $feature"
done

cargo run --example bip32 7934c09359b234e076b9fa5a1abfd38e3dc2a9939745b7cc3c22a48d831d14bd
cargo run --no-default-features --features no-std --example bip32 7934c09359b234e076b9fa5a1abfd38e3dc2a9939745b7cc3c22a48d831d14bd
cargo run --example bip32 7934c09359b234e076b9fa5a1abfd38e3dc2a9939745b7cc3c22a48d831d14bd
cargo run --no-default-features --features no-std --example bip32 7934c09359b234e076b9fa5a1abfd38e3dc2a9939745b7cc3c22a48d831d14bd
fi

# Test each feature
Expand All @@ -67,6 +67,11 @@ do
cargo test --verbose --features="$feature"
done

# Build the docs if told to (this only works with the nightly toolchain)
if [ "$DO_DOCS" = true ]; then
RUSTDOCFLAGS="--cfg docsrs" cargo doc --all --features="$FEATURES"
fi

# Fuzz if told to
if [ "$DO_FUZZ" = true ]
then
Expand Down
32 changes: 32 additions & 0 deletions logo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Rust Bitcoin Logo

## Files

Included are:

- [rust-bitcoin-inkscape.svg](./rust-bitcoin-inkscape.svg) - The Inkscape source file with the things used to make the logo in case adjustments are desired
- [rust-bitcoin-optimized.svg](./rust-bitcoin-optimized.svg) - An optimized SVG for embedding or rendering at any size desired
- [rust-bitcoin.png](./rust-bitcoin.png) - The PNG logo rendered at 300px used by this project
- [rust-bitcoin-large.png](./rust-bitcoin-large.png) - A larger size 1024px x 1024px for convenience for embedding in presentations

## Author

Hunter Trujillo, @cryptoquick on [Twitter](https://twitter.com/cryptoquick), [GitHub](https://github.com/cryptoquick), and Telegram.

## License

Licensed in the public domain under [CC0 1.0 Universal Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/), and the author of this work rescinds all claims to copyright or coercion or acts of force from any nation state over this work for any purpose

Bitcoin Logo is licensed under the CC Public Domain Dedication: <https://bitcoin.stackexchange.com/a/53422> and <https://bitcointalk.org/index.php?topic=1631.0>

Rust Logo is licensed under CC-BY, which allows reuse and modifications for any purpose, as long as distributors give appropriate credit and indicate changes have been made. See here: <https://www.rust-lang.org/policies/media-guide>

## Acknowledgements

Acknowledgement for the runners up in this PR: https://github.com/rust-bitcoin/rust-bitcoin/pull/891#issuecomment-1074476858

In particular, the Rust Bitcoin Wizard gear was an incredibly inspired piece of art. Also, the meshed gears design was beloved by some but not all.

Thank you to the Rust Bitcoin maintainers and community, your timely responses and guidance was appreciated.

Also, thank you to the voters on the Rust in Bitcoin Telegram group: <https://t.me/rust_in_bitcoin/321>.
244 changes: 244 additions & 0 deletions logo/rust-bitcoin-inkscape.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added logo/rust-bitcoin-large.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions logo/rust-bitcoin-optimized.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added logo/rust-bitcoin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading