Commit Graph

117 Commits

Author SHA1 Message Date
Henry de Valence 22c3bdeb61 Prefix workspace crates with zebra- (#70)
* Update license and author metadata in workspace crates.

- ensure that the license field is set to GPL-3 for all GPL-3 licensed crates;
- ensure that the author field is set to "Zcash Foundation", responsible for maintenance;
- preserve the original authorship info in AUTHORS.md for human-readable history.

Updating the author field ensures that all of the machine systems that read
crate metadata list the ZF organization, not any single individual, as the
maintainer of the crate.

* Prefix all internal crate names with zebra-.

This does not move the directories containing these crates to also have zebra-
prefixes (for instance, zebra-chain instead of chain).  I think that this would
be preferable, but because it's a `git mv`, it will be simple to do later and
leaving it out of this change makes it easier to see the renaming of all of the
internal modules.

* Remove git dependency from eth-secp256k1

* Avoid an error seemingly related to Deref coercions.

This code caused an overflow while evaluating type constraints.  As best as I
can determine, the cause of the problem was something like so: the Rust
implementation of the Bitcoin-specific hash function used in the Bloom filter
doesn't operate on byte slices, but only on a `&mut R where R: Read`, so to
hash a byte slice, you need to create a mutable copy of the input slice which
can be consumed as a `Read` implementation by the hash function; the previous
version of this code created a slice copy using a `Deref` coercion instead of
`.clone()`, and when a tokio update added new trait impls, the type inference
for the `Deref` coercion exploded (somehow -- I'm not sure about the last
part?).

This commit avoids the problem by manually cloning the input slice.
2019-07-02 15:07:06 -04:00
Henry de Valence 891226069a Run cargo fmt 2019-06-28 15:26:18 -07:00
NikVolf cb73ab9142 fix sighash 2019-05-16 14:03:59 +03:00
Svyatoslav Nikolsky a5dbbb9d7e use empty values as false in comparison ops 2019-04-25 11:46:02 +03:00
Svyatoslav Nikolsky 2bb21e6370 Option<SighashCache> -> SighashCache { Option<> } 2019-04-16 10:20:52 +03:00
Svyatoslav Nikolsky f148c234de fixed sapling sighash cache usage (hash_sapling_outputs) 2019-04-12 14:15:40 +03:00
Svyatoslav Nikolsky 095e8ec21a removed bitcoin-cash specific opcodes 2019-03-12 13:35:10 +03:00
Dimitris Apostolou cbf4c99d8b
Fix typos 2019-02-03 00:35:00 +02:00
NikVolf c35738daae tabify some more 2019-01-09 12:04:58 +03:00
Svyatoslav Nikolsky 9de3272781 new transparent address format 2018-12-25 10:38:07 +03:00
Svyatoslav Nikolsky 8d22f66393 precompute sighash for joinsplit/sapling validation 2018-12-12 15:13:35 +03:00
Svyatoslav Nikolsky 578d942c2d rename test 2018-12-07 12:37:11 +03:00
Svyatoslav Nikolsky 9742b113df cache signature portions 2018-12-07 12:33:57 +03:00
Svyatoslav Nikolsky 6eae4aa75d sighash update 2018-12-07 12:10:57 +03:00
NikVolf b16c60be48 remove flawed iterator 2018-11-21 15:10:01 +03:00
NikVolf f111948c97 fix warning and add refs 2018-11-21 13:31:07 +03:00
NikVolf 7c92d247cf fixes for 396 2018-11-21 13:19:23 +03:00
NikVolf a992d84bb2 serialization of joinsplit 2018-11-20 19:54:06 +03:00
NikVolf 534d09457b remove test with incorrent opcode 2018-11-20 19:23:15 +03:00
NikVolf da02015342 remove find&delete, split opcode 2018-11-20 19:22:51 +03:00
Svyatoslav Nikolsky afb52268bb overwinter + sapling transactions (start) 2018-11-19 09:59:17 +03:00
Svyatoslav Nikolsky c19bf38801 cleaning up 2018-11-14 11:46:02 +03:00
Svyatoslav Nikolsky aa692d8a90 cleaning up 2018-11-14 11:37:28 +03:00
Svyatoslav Nikolsky 3a1e6c9aa6 cleaning up 2018-11-13 14:20:25 +03:00
Svyatoslav Nikolsky c9132eb99d Merge branch 'master' into zcash_init 2018-11-12 12:31:14 +03:00
Svyatoslav Nikolsky 5606bb486b
Merge pull request #529 from paritytech/bch_nov2018_cleanstack
BCH Nov2018 HF: enforce clean-stack restriction for scripts
2018-11-12 09:42:15 +03:00
Svyatoslav Nikolsky 1a377c26ca
Merge pull request #528 from paritytech/bch_nov2018_pushonly
BCH Nov2018 HF: enforce push-only restriction for scriptsig
2018-11-12 09:42:04 +03:00
Svyatoslav Nikolsky cc823839a6 OP_CHECKDATASIG* accepts raw message instead of hash + does a sha256 2018-11-07 13:24:44 +03:00
Svyatoslav Nikolsky d96be02e56 BCH Nov2018 HF: enforce verify_cleanstack 2018-10-17 09:47:34 +03:00
Svyatoslav Nikolsky edfb92cde3 CH Nov2018 HF: enforce verify_sigpushonly 2018-10-17 09:20:43 +03:00
Svyatoslav Nikolsky ad4f51ac07 BCH Nov2018 HF: OP_CHECKDATASIG + OP_CHECKDATASIGVERIFY 2018-10-16 15:45:27 +03:00
Svyatoslav Nikolsky 787a36549c fixed equihash 2018-05-21 14:16:27 +03:00
Svyatoslav Nikolsky da0c55db7a zcash serialization 2018-05-17 15:09:03 +03:00
Svyatoslav Nikolsky a32a223395 initial commit for Zcash support 2018-05-16 12:13:04 +03:00
Svyatoslav Nikolsky 150300d06d fix witness commitment size check 2018-05-09 18:34:06 +03:00
Svyatoslav Nikolsky 1ebe3375f4 added tests for reverse ops 2018-04-12 10:47:35 +03:00
Svyatoslav Nikolsky 72832bc675 OP_NUM2BIN implementation 2018-04-11 17:38:59 +03:00
Svyatoslav Nikolsky b52a05e124 renamed back to bin2num where appropriate 2018-04-11 11:18:29 +03:00
Wei Tang dba73290e6 test_bin2num -> test_right 2018-04-09 20:37:18 +08:00
Wei Tang 5760756b3d Keep the original naming of OP_LEFT and OP_RIGHT 2018-04-09 20:35:32 +08:00
Wei Tang 3da891b59a map(|x| *x) -> cloned() 2018-04-09 20:29:04 +08:00
Wei Tang 7145a67eab // -> /// 2018-04-09 20:28:14 +08:00
Wei Tang eb548831ab Use expect/match instead of unwrap 2018-04-09 20:27:53 +08:00
Wei Tang 6ad1ef5d9e Fix/typo: mut is not needed 2018-04-09 20:09:43 +08:00
Wei Tang 849e4ca546 OP_BIN2NUM implementation and basic testing
Ref 451aab026d/may-2018-reenabled-opcodes.md
2018-04-03 13:20:57 +08:00
Wei Tang 64caac30c0 Rename OP_LEFT/OP_RIGHT to OP_NUM2BIN/OP_BIN2NUM
The later is used in a future hard fork for Bitcoin Cash. Because the former is disabled in Bitcoin, this change shouldn't do any harm.
2018-04-02 23:46:34 +08:00
Svyatoslav Nikolsky 06a4ef8dbc OP_DIV and OP_MOD implementations 2018-03-02 14:09:31 +03:00
Svyatoslav Nikolsky aca8deeeba bitwise ops (OP_AND, OP_OR, OP_XOR) implementation 2018-03-02 12:48:27 +03:00
Svyatoslav Nikolsky 05f885bfd9 OP_SPLIT implementation 2018-03-02 12:22:38 +03:00
Svyatoslav Nikolsky 7beffdfdc9 fixed typo 2018-03-02 12:07:45 +03:00