Commit Graph

192 Commits

Author SHA1 Message Date
Andrew Poelstra 16f5878a03 Add a bunch of Ord/PartialOrd impls for stuff 2015-12-20 15:38:02 -06:00
Andrew Poelstra e05e6d2215 [BREAKING CHANGE] Drop UtxoSet
This code was unmaintained, is unlikely to work on the majority of systems
(since it holds the whole utxoset in RAM, and not in a terribly efficient
manner), and has a dependency on `eventual` which has been broken for a
long time.

The library no longer compiles on nightly because of this, and without any
known usecases for `UtxoSet`, nor good ability to test it, I'm simply
removing the code.

I recommend anyone who cares about this extracts the code from the previous
commit and creates a new crate. It should be more featureful anyway, e.g.
support a backing store.
2015-12-19 20:13:59 -06:00
Andrew Poelstra 8a79710be5 Bump version to 0.4.5 for recent changes 2015-12-03 07:14:22 -06:00
Andrew Poelstra a8ffce4904 Fix Script de/serialization (version -> 0.4.4) 2015-11-30 07:11:24 -06:00
Julius Naperkowski 51f389e0b2 Bump minor version to 0.4.3 2015-11-23 18:31:50 +01:00
Andrew Poelstra e58f536c31 Add `Decimal` type for de/serializing values 2015-11-22 10:51:19 -06:00
Andrew Poelstra c3c6983789 Replace serde_json with strason in tests 2015-11-22 09:46:05 -06:00
Andrew Poelstra fa59c35e9a Upgrade libsecp 2015-11-15 17:14:36 -06:00
Andrew Poelstra 66eb08aab5 [BREAKING CHANGE] Make `script::Builder` implement the actual Builder pattern
Rather than having methods taking &mut self, have them consume self
and return another Builder, so that methods can be chained.

Bump major version number.
2015-11-04 11:04:54 -06:00
Andrew Poelstra 8daf06cc1d Update for latest libsecp: normalize signatures and use "lax DER" parsing 2015-10-26 14:39:25 -05:00
Andrew Poelstra 67c0b8fba7 More Error implementations 2015-10-25 12:55:48 -05:00
Andrew Poelstra a69ae2c7ad Bump minor version no 2015-10-25 10:17:23 -05:00
Andrew Poelstra 3491c5057e Make contracthashtool check that the number of keys matches the template's requirement
This is easy to satisfy given that the template-to-script code takes a
slice of keys. Just do &keys[..n_keys] if you have too many keys. (If
you have too few you're SOL no matter what.) This way we can catch
likely configuration errors without putting much of a burden on users
who legitimately have more keys than the template requires.

Also add a method required_keys() to Template so that users can check
how many keys they ought to have.
2015-10-25 08:37:32 -05:00
Andrew Poelstra 8defba2fb3 Expose ability to tweak secret keys for contract hash 2015-10-14 22:50:06 -05:00
Andrew Poelstra fdc854edd9 Remove Script() from LowerHex impl of Script
This is easy for downstream to add, not easy for them to remove. Plus scripts
have a pretty recognizable form and are usually obvious from context anyway.
2015-10-14 22:31:12 -05:00
Andrew Poelstra 38d2ef5d73 Add `from_script` method to Address for generating P2SH addresses 2015-10-14 22:24:09 -05:00
Andrew Poelstra ed34bb30f1 Add support for deserializing a script into a contracthash template
This is something Matt's contracthashtool does, so to copy its functionality
I need to support it. And it also seems generally useful.
2015-10-14 22:01:26 -05:00
Andrew Poelstra c1f81ea3c3 Add support for WIF private keys as well as addresses 2015-10-14 19:25:43 -05:00
Andrew Poelstra 16e2a3519b Implement basic contract-hash support
Does not do stuff like validating the form of contracts, since this seems like
more of an application thing. Does not even distinguish a "nonce", just assumes
the contract has whatever uniqueness is needed baked in.
2015-10-14 15:29:19 -05:00
Andrew Poelstra dba71d9253 [BREAKING CHANGE] Minor library updates
Breaking changes are:
    opcode::All::from_u8 is now From<u8>
    script::Builder::from_vec is now From<Vec<u8>>
    script::Script::from_vec is now From<Vec<u8>>
2015-10-14 09:14:09 -05:00
Andrew Poelstra eeb4655886 More updates for RFC 1214 2015-09-20 16:44:05 -05:00
Andrew Poelstra edb6d7b17b Bump version to 0.2 for all the changes of the last two days 2015-09-20 16:40:46 -05:00
Andrew Poelstra 00421970a1 Fix for serde changes 2015-09-20 13:10:20 -05:00
Andrew Poelstra 835c8befae Fix versions in Cargo.toml to try and fix Travis builds 2015-09-20 12:37:47 -05:00
Andrew Poelstra 2320f099c1 Remove broken wallet components
This was a fairly small change and gets all unit tests to pass.
2015-09-19 13:39:39 -05:00
Andrew Poelstra 0389eb1c52 Move secp256k1 lib from sipa's (long expired) repo to the bitcoin one 2015-05-20 13:14:21 -05:00
Andrew Poelstra b21acd440e Get compiling for secp256k1 changes 2015-04-13 22:40:32 -05:00
Andrew Poelstra 17e27ec09f *** IT COMPILES ON RUSTC NIGHTLY ***
Many unit test failures, but this is progress.
2015-04-10 20:55:59 -05:00
Andrew Poelstra 5350207ff3 Remove hamcrest; add rust-serde (not compiling right now) 2015-04-09 23:23:53 -05:00
Andrew Poelstra e5a3e84c41 Checkpoint commit (nope, not yet to small commit sizes :))
This is mostly fixing compile errors in `cargo test`. We are down
to 3 in `cargo build` and 14 in `cargo test`, at least for this
round.
2015-04-08 17:23:45 -05:00
Andrew Poelstra 08a20f8764 Checkpoint commit
Work is stalled on some other library work (to give better lifetime
requirements on `eventual::Future` and avoid some unsafety), so
committing here.

There are only three errors left in this round :)

Also all the indenting is done, so there should be no more massive
rewrite commits. Depending how invasive the lifetime-error fixes
are, I may even be able to do sanely sized commits from here on.
2015-04-07 17:52:58 -05:00
Andrew Poelstra 160f2f9ea6 Drop ThinVec, many other changes toward updating for librustc 2015-04-04 22:13:19 -05:00
Andrew Poelstra a62a7d736c Several more changes for librustc changes 2015-04-04 13:08:49 -05:00
Andrew Poelstra f1aed644c6 More misc cleanup for rustc changes 2015-03-26 14:21:48 -05:00
Andrew Poelstra 0bf5809674 Add time crate 2015-03-26 11:53:49 -05:00
Andrew Poelstra 719f616218 Some more renames for librustc changes 2015-03-26 10:44:49 -05:00
Andrew Poelstra 2101e4a56d Rename bitcoin-secp256k1-rs to secp256k1 2015-03-26 10:08:36 -05:00
Andrew Poelstra e29fdb90c8 fix for upstream 2014-08-18 18:04:32 -07:00
Jerzy Kozera 3d940a85fe Use apoelstra's secp256k1
dpc's version doesn't contain secp256k1:🔑:PublicKey which is used in blockdata/script.rs
2014-08-12 04:52:33 +02:00
Andrew Poelstra e01e9ad3be Implement CHECKSIG and CHECKSIGVERIFY
Still need the multisig ops, and p2sh
2014-08-10 13:51:05 -07:00
Andrew Poelstra 426e1fc556 Change name to `bitcoin` in Cargo.toml (copying convention from toml-rs and color-rs) 2014-07-18 12:07:10 -07:00
Andrew Poelstra c9ad7c0b58 Initial commit, move into Cargo 2014-07-18 06:56:17 -07:00