Commit Graph

1120 Commits

Author SHA1 Message Date
Carl Dong 8e0e4eb55a Move serialize::BitcoinHash to util:#️⃣:BitcoinHash
- Use Sha256dEncoder for calculating merkle root
- Remove BitcoinHash implementation for Vec<u8>
2018-09-25 21:19:10 +08:00
Carl Dong 97937b1b5f Move network::consensus_params to consensus::params 2018-09-25 21:13:34 +08:00
Carl Dong 7e9d393d03 Remove low-level networking support
- Modify VersionMessage constructor to take in parameters directly that
  would have otherwise been extracted from a Socket (now removed)
2018-09-25 21:13:34 +08:00
Carl Dong 7f11766c65 Remove nu_select macro 2018-09-25 21:13:34 +08:00
Andrew Poelstra 0da693f9a5
Merge pull request #168 from thomaseizinger/from-str-transaction-id
Add FromStr for Sha256dHash
2018-09-20 21:01:52 +00:00
Thomas Eizinger 50e3a4abf2 Add FromStr for Sha256dHash
The FromStr implementation just delegates to the `from_hex` method for
the actual parsing.
2018-09-20 12:18:45 +10:00
Andrew Poelstra 5adf985eae
Merge pull request #167 from rust-bitcoin/branch-0.14.2
bump version to 0.14.2
2018-09-11 18:44:59 +00:00
Andrew Poelstra 625eac636b bump version to 0.14.2 2018-09-11 18:04:02 +00:00
Andrew Poelstra 2c8a6f5eb3
Merge pull request #159 from stevenroose/address-serde
Implement serde serialiation for Address
2018-09-11 18:03:15 +00:00
Steven Roose 8edfbec1cb Implement serde serialiation for Address 2018-09-11 18:37:36 +01:00
Andrew Poelstra 84ccf0b55a
Merge pull request #166 from TheBlueMatt/master
Update fuzz harness stuff
2018-09-07 18:59:27 +00:00
Matt Corallo ac11191f71 Upgrade AFL to 0.4 with persistent mode fuzzing 2018-09-06 16:58:38 -04:00
Matt Corallo 12d9e9803c Update fuzz seeds 2018-09-06 16:58:37 -04:00
Andrew Poelstra cadbe032ea
Merge pull request #158 from rust-bitcoin/2018-08-14.1
increase version to 0.14.1
2018-08-29 00:03:29 +00:00
Andrew Poelstra b7c84a6571 increase version to 0.14.1 2018-08-28 17:15:37 +00:00
Andrew Poelstra 849674651f
Merge pull request #157 from rust-bitcoin/2018-08-pub-use
`pub use` a ton of stuff at the top level
2018-08-28 17:13:40 +00:00
Andrew Poelstra 97c1773ec9 `pub use` a ton of stuff at the top level 2018-08-28 15:57:46 +00:00
Andrew Poelstra fe99a88acf
Merge pull request #152 from rust-bitcoin/2018-08-script-ord
impl PartialOrd, Ord for Script
2018-08-26 15:38:43 +00:00
Andrew Poelstra b33aa6fa6c add unit test for script ordering 2018-08-25 22:09:22 +00:00
Andrew Poelstra 592935b2da
Merge pull request #151 from rust-bitcoin/2018-08-serialization-fixes
Various serialization fixes
2018-08-24 21:17:44 +00:00
Andrew Poelstra cef78d81af fuzz: check that script deserialization roundtrips 2018-08-24 20:31:50 +00:00
Andrew Poelstra ef642295c5 encodable: reject non-compact VarInts on Vec and Box<[T]> lengths 2018-08-24 20:31:46 +00:00
Andrew Poelstra f0221fb79b transaction: reject transactions with Segwit byte set but no witnesses 2018-08-24 19:57:58 +00:00
Andrew Poelstra 68413d306d impl PartialOrd, Ord for Script 2018-08-24 02:20:37 +00:00
Andrew Poelstra d1d3b3fb02
Merge pull request #148 from rust-bitcoin/hex-dep
pin hex to 0.3.2 rather than a git commit
2018-08-22 22:53:50 +00:00
Andrew Poelstra 6d7a5f02c1 pin hex to 0.3.2 rather than a git commit 2018-08-22 22:11:46 +00:00
Andrew Poelstra d792c98df6
Merge pull request #147 from rust-bitcoin/version-0.14
bump version to 0.14.0
2018-08-22 21:54:00 +00:00
Andrew Poelstra 598afd94ca bump version to 0.14.0 2018-08-22 21:18:39 +00:00
Andrew Poelstra 3f9b003348
Merge pull request #136 from rust-bitcoin/2018-08-minimal-push
script: make Instructions iterator enforce minimal pushes
2018-08-22 21:17:10 +00:00
Andrew Poelstra c89a4f5ada
Merge pull request #146 from rust-bitcoin/2018-08-secp-0.11
update rust-secp dependency to 0.11
2018-08-22 20:42:19 +00:00
Andrew Poelstra fc0fec7e19 fuzz: add Script::iter tests to script deserialization test 2018-08-22 20:40:44 +00:00
Andrew Poelstra 08db6fe29f script: let Instructions iterator enforce minimal pushes; remove `IntoIter` impl to force users to choose 2018-08-22 19:55:31 +00:00
Andrew Poelstra 41ebf5468c update rust-secp dependency to 0.11 2018-08-22 19:37:32 +00:00
Andrew Poelstra dbefaef25c
Merge pull request #142 from jeandudey/2018-08-decimal-fromstr
Implement `FromStr` for `UDecimal`/`Decimal`.
2018-08-22 19:00:02 +00:00
Jean Pierre Dudey 9cdc75a930 Forbid exponents larger than 18.
Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-08-22 14:00:30 -04:00
Jean Pierre Dudey 6902bf826c Fix negative symbol bug in `FromStr` display implementation.
The negative symbol wasn't there when `int_part` was equal to zero.

Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-08-22 11:26:05 -04:00
Jean Pierre Dudey a915bc194d Fix multiplication logic in decimal parsing functions.
Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-08-22 07:22:47 -04:00
Jean Pierre Dudey e48e559740 Fix `UDecimal::parse_udecimal` identation.
Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-08-21 21:31:02 -04:00
Jean Pierre Dudey 455bc66d3c Fix parsing for numbers that are too big to fit in a `Decimal`/`UDecimal`.
Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-08-21 21:29:07 -04:00
Andrew Poelstra a61ad5d382
Merge pull request #137 from dongcarl/2018-8-better-errors
Fix Error type for SimpleDecoder and SimpleEncoder
2018-08-22 00:55:54 +00:00
Jean Pierre Dudey be0d54738b Add fuzz tests for `Decimal`/`UDecimal` parsing.
Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-08-21 16:21:29 -04:00
Jean Pierre Dudey 07838568f9 Implement `FromStr` for `Decimal`/`UDecimal`.
Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-08-21 16:13:58 -04:00
Andrew Poelstra d16fdd63d3
Merge pull request #141 from jeandudey/2018-08-display
Implement `Display` instead of `ToString` for `Address` and `PrivKey`.
2018-08-21 16:41:58 +00:00
Carl Dong bccdd06794 Replace catch-all match arms with specific ones 2018-08-21 01:58:40 -07:00
Carl Dong 0c172941af Replace serialize::Error::Detail with variants
- Add serialize::Error::ParseFailed(&'static str) variant for
  serialization errors without context
- Add appropriate variants to replace network::Error::Detail for
  serialization error with context
- Remove error method from SimpleDecoders
2018-08-21 01:58:40 -07:00
Carl Dong d12a861f85 Remove unnecessary network::Error::Detail variant 2018-08-21 01:58:40 -07:00
Carl Dong 95303a1d28 Use full path in macros to to eliminate uses 2018-08-21 01:58:40 -07:00
Carl Dong e5b5cbfadb Fix Error type for SimpleDecoder and SimpleEncoder
- Separate serialize::Error and network::Error from util::Error
- Remove unneeded propagate_err and consume_err
- Change fuzzing code to ignore Err type
2018-08-21 01:58:40 -07:00
Jean Pierre Dudey df7f084e96 Implement `Display` instead of `ToString` for `Address` and `PrivKey`.
Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2018-08-20 19:46:56 -04:00
Andrew Poelstra 77e2fe3dda
Merge pull request #144 from jeandudey/2018-08-address-starts-with
trivial: Use `str::starts_with` method to check bech32 address prefixes.
2018-08-20 23:12:03 +00:00