Commit Graph

10 Commits

Author SHA1 Message Date
Andrew Poelstra bc7077fac4 Encodable/Decodable improvements; add `user_enum` macro for string enums 2014-09-05 09:16:22 -05:00
Andrew Poelstra 20ce3721b7 Fix for upstream 2014-09-04 19:06:52 -05:00
Andrew Poelstra f66b4ff6b3 Fix for upstream, add some address generation benchmarks 2014-09-01 09:24:17 -07:00
Andrew Poelstra 340b569c73 Add much more agressive provably-false checker
Now unspendable outs are determined by attempting to create a minimal
satisfying input script. If this can't be done, the output is unspendable.
(Unfortunately this "minimal satisfying script" is not (yet) something
that can be shown to the user, since it is more a bundle of constraints
than actual data pushes.)

Current limitations:
  - OP_ADD and friends mean the checker gives the script a free pass.
    There is no fundamental reason for this, I just didn't get to it
    yet.

  - Pubkeys are checked for DER encoding but signatures aren't. This
    is because secp256k1 exposes a method for pubkeys, but not one
    for sigs :). Signatures are loosely length checked.
2014-08-31 16:01:24 -07:00
Andrew Poelstra 8f5c28a533 Fixes for rustc changes 2014-08-30 16:08:38 -07:00
Andrew Poelstra 6bf553c6fe Add BIP32 key support; unify array newtyping; improve base58 trait
Sorry for so many things in one commit ... it was an iterative
process depending as I worked on BIP32 to get the other stuff
working. (And I was too lazy to separate it out after the fact.)

A breaking change by the array newtyping is that Show for Sha256dHash
now outputs the slice Show. You have to use `{:x}` to get the old hex
output.
2014-08-28 09:49:03 -07: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 46969b3396 Replace PatriciaTree with HashMap for UTXO set
We get a speed up (~5%) and memory savings (~10%) on initial sync from
using a HashMap, though it's hard to tell precisely how much savings
because it's quite nonlinear.

I haven't tested de/serialization. Some work needs to be done there to
split up the UTXO set since it takes forever to saveload.
2014-07-20 16:52:00 -07:00
Andrew Poelstra 51038f5810 Add alternate network support to `Blockchain`, `UtxoSet`, `Socket`
Still need to do alternate diffchange rules..
2014-07-18 14:38:35 -07:00
Andrew Poelstra c9ad7c0b58 Initial commit, move into Cargo 2014-07-18 06:56:17 -07:00