Skip to content

Commit b355740

Browse files
committed
chore: format and standardize all markdowns files
according to the github flavor (https://github.github.com/gfm/)
1 parent c4d017e commit b355740

File tree

10 files changed

+55
-45
lines changed

10 files changed

+55
-45
lines changed

base58/README.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Bitcoin base58 encoding
2-
=======================
1+
# Bitcoin base58 encoding
32

43
This crate provides encoding and decoding of base58 strings as defined by the Bitcoin ecosystem
54
including the checksum.
@@ -21,12 +20,10 @@ obviously named ones differ from this crate because:
2120
This crate uses [bitcoin_hashes](https://crates.io/crates/bitcoin_hashes) when hashing to calculate
2221
the checksum.
2322

24-
2523
## Minimum Supported Rust Version (MSRV)
2624

2725
This library should always compile with any combination of features on **Rust 1.56.1**.
2826

29-
3027
## Licensing
3128

3229
The code in this project is licensed under the [Creative Commons CC0 1.0 Universal license](LICENSE).

bitcoin/tests/data/README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
Test vector data
2-
================
1+
# Test vector data
32

43
This file contains data (hex strings) taken from BIP test vectors.

bitcoin/tests/data/serde/README.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
Serialization input/output
2-
==========================
1+
# Serialization input/output
32

43
Files here contain hex strings and binary data representing types used for
54
regression testing.
65

7-
- *_hex: consensus encoded types represented as hex strings
8-
- *_ser: consensus encoded types represented as binary data
9-
- *_bincode: types serialized with serde as bincode
6+
- `*_hex`: consensus encoded types represented as hex strings
7+
- `*_ser`: consensus encoded types represented as binary data
8+
- `*_bincode`: types serialized with `serde` as bincode
109

11-
We consensus deserialize, serde serialize, then check against the expected data
12-
to verify no serde regressions have been introduced.
10+
We consensus deserialize, `serde` serialize, then check against the expected data
11+
to verify no `serde` regressions have been introduced.

fuzz/README.md

+35-18
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ honggfuzz.
66
To run the fuzz-tests as in CI -- briefly fuzzing every target -- simply
77
run
88

9-
./fuzz.sh
9+
```bash
10+
./fuzz.sh
11+
```
1012

1113
in this directory.
1214

@@ -16,11 +18,13 @@ recently-released binutils 2.39 has changed their API in a breaking way.
1618

1719
On Nix, you can obtain these libraries by running
1820

19-
nix-shell -p libopcodes_2_38 -p libunwind
21+
```bash
22+
nix-shell -p libopcodes_2_38 -p libunwind
23+
```
2024

21-
and then run fuzz.sh as above.
25+
and then run `fuzz.sh` as above.
2226

23-
# Fuzzing with weak cryptography
27+
## Fuzzing with weak cryptography
2428

2529
You may wish to replace the hashing and signing code with broken crypto,
2630
which will be faster and enable the fuzzer to do otherwise impossible
@@ -35,35 +39,43 @@ Please let us know if you are interested in taking this on!
3539
Meanwhile, to use the broken crypto, simply compile (and run the fuzzing
3640
scripts) with
3741

38-
RUSTFLAGS="--cfg=hashes_fuzz --cfg=secp256k1_fuzz"
42+
```bash
43+
RUSTFLAGS="--cfg=hashes_fuzz --cfg=secp256k1_fuzz"
44+
```
3945

4046
which will replace the hashing library with broken hashes, and the
41-
secp256k1 library with broken cryptography.
47+
`secp256k1` library with broken cryptography.
4248

4349
Needless to say, NEVER COMPILE REAL CODE WITH THESE FLAGS because if a
4450
fuzzer can break your crypto, so can anybody.
4551

46-
# Long-term fuzzing
52+
## Long-term fuzzing
4753

4854
To see the full list of targets, the most straightforward way is to run
4955

50-
source ./fuzz-util.sh
51-
listTargetNames
56+
```bash
57+
source ./fuzz-util.sh
58+
listTargetNames
59+
```
5260

5361
To run each of them for an hour, run
5462

55-
./cycle.sh
63+
```bash
64+
./cycle.sh
65+
```
5666

5767
To run a single fuzztest indefinitely, run
5868

59-
HFUZZ_BUILD_ARGS='--features honggfuzz_fuzz' cargo hfuzz run <target>
69+
```bash
70+
HFUZZ_BUILD_ARGS='--features honggfuzz_fuzz' cargo hfuzz run <target>
71+
```
6072

6173
This script uses the `chrt` utility to try to reduce the priority of the
6274
jobs. If you would like to run for longer, the most straightforward way
6375
is to edit `cycle.sh` before starting. To run the fuzz-tests in parallel,
6476
you will need to implement a custom harness.
6577

66-
# Adding fuzz tests
78+
## Adding fuzz tests
6779

6880
All fuzz tests can be found in the `fuzz_target/` directory. Adding a new
6981
one is as simple as copying an existing one and editing the `do_test`
@@ -78,21 +90,25 @@ it to the generated `Cargo.toml`.
7890
Once you've added a fuzztest, regenerate the `Cargo.toml` and CI job by
7991
running
8092

81-
./generate-files.sh
93+
```bash
94+
./generate-files.sh
95+
```
8296

8397
Then to test your fuzztest, run
8498

85-
./fuzz.sh <target>
99+
```bash
100+
./fuzz.sh <target>
101+
```
86102

87103
If it is working, you will see a rapid stream of data for many seconds
88104
(you can hit Ctrl+C to stop it early). If not, you should quickly see
89105
an error.
90106

91-
# Reproducing Failures
107+
## Reproducing Failures
92108

93109
If a fuzztest fails, it will exit with a summary which looks something like
94110

95-
```
111+
```text
96112
...
97113
fuzzTarget : hfuzz_target/x86_64-unknown-linux-gnu/release/hashes_sha256
98114
CRASH:
@@ -108,8 +124,9 @@ The final line is a hex-encoded version of the input that caused the crash. You
108124
can test this directly by editing the `duplicate_crash` test to copy/paste the
109125
hex output into the call to `extend_vec_from_hex`. Then run the test with
110126

111-
cargo test
127+
```bash
128+
cargo test
129+
```
112130

113131
Note that if you set your `RUSTFLAGS` while fuzzing (see above) you must make
114132
sure they are set the same way when running `cargo test`.
115-

hashes/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ Contributions are welcome, including additional hash function implementations.
2020
To assist devs in catching errors _before_ running CI we provide some githooks. If you do not
2121
already have locally configured githooks you can use the ones in this repository by running, in the
2222
root directory of the repository:
23-
```
23+
24+
```bash
2425
git config --local core.hooksPath githooks/
2526
```
2627

hashes/extended_tests/schemars/README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Run as usual with `cargo test`.
66

77
To run the tests with the MSRV you will need to pin `serde`:
88

9-
- `cargo update -p serde --precise 1.0.156`
10-
- `cargo update -p regex --precise 1.7.3`
11-
- `cargo update -p chrono --precise 0.4.24`
9+
```bash
10+
cargo update -p serde --precise 1.0.156
11+
cargo update -p regex --precise 1.7.3
12+
cargo update -p chrono --precise 0.4.24
13+
```

internals/README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Rust Bitcoin Internals
2-
======================
1+
# Rust Bitcoin Internals
32

43
This crate is only meant to be used internally by crates in the
54
[rust-bitcoin](https://github.com/rust-bitcoin) ecosystem.

io/README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
Rust-Bitcoin IO Library
2-
=======================
1+
# Rust-Bitcoin IO Library
32

43
The `std::io` module is not exposed in `no-std` Rust so building `no-std` applications which require
54
reading and writing objects via standard traits is not generally possible. Thus, this library exists
6-
to export a minmal version of `std::io`'s traits which we use in `rust-bitcoin` so that we can
5+
to export a minimal version of `std::io`'s traits which we use in `rust-bitcoin` so that we can
76
support `no-std` applications.
87

98
These traits are not one-for-one drop-ins, but are as close as possible while still implementing

logo/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Rust Logo is licensed under CC-BY, which allows reuse and modifications for any
2323

2424
## Acknowledgements
2525

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

2828
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.
2929

units/README.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
Bitcoin Units
2-
=============
1+
# Bitcoin Units
32

43
This crate provides basic Bitcoin numeric units such as `Amount`.
54

6-
75
## Minimum Supported Rust Version (MSRV)
86

97
This library should always compile with any combination of features on **Rust 1.56.1**.
108

11-
129
## Licensing
1310

1411
The code in this project is licensed under the [Creative Commons CC0 1.0 Universal license](LICENSE).

0 commit comments

Comments
 (0)