Commit Graph

45 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
Svyatoslav Nikolsky 961993e0a8 minimize hashing #2 2019-03-25 14:41:44 +03:00
Svyatoslav Nikolsky eb43e22cd3 explicint Indexed*::from_raw calls 2019-03-20 12:29:04 +03:00
Dimitris Apostolou cbf4c99d8b
Fix typos 2019-02-03 00:35:00 +02:00
Svyatoslav Nikolsky 34d921fbb0 proper calculation of miner fee in memory pool 2019-01-16 14:14:48 +03:00
Aleksey Sidorov f120076cab Make parity-bitcoin usable for spv validation
- In this PR I extract from the crate `db` to the new `storage` crate all traits that is not specifically related to the concrete implementation of database. So I now can use `verification` crate without `rocksdb` dependency.

- Also I modify the `HeaderAcceptor` so that can be constructed without the private `BlockDeployments`.
2018-03-09 15:45:07 +03:00
Svyatoslav Nikolsky 47bb353a05 fixed new compiler version warnings 2017-11-06 18:06:12 +03:00
Svyatoslav Nikolsky 11c6411a41 Merge pull request #394 from paritytech/consolidate
Consolidate database traits
2017-04-10 08:03:28 +03:00
debris 0155c6e4ef revert is_double_spent -> is_spent 2017-04-09 14:10:40 +08:00
debris 21fdfabb0e consolidated TransactionOutputProvider and TransactionOutputObserver 2017-04-07 12:54:40 +07:00
debris 16fc1c01af test-data is only a dev-dependency, closes #390 2017-04-06 01:19:19 +07:00
Marek Kotewicz 77cfd9e8f7 db refactor (#385)
* db refactor in progress, refactored kvdb

* kvdb refactor

* removed unused RwLock

* removed unused RwLock

* BlockChainDatabase

* db refactor in progress

* implemented BlockProvider for newdb

* fixed compiling

* newdb TransactionMeta

* newdb tests

* reopen tests for newdb

* replaced old db with new db

* chain_verifier uses new db

* sync module uses refactored db

* check double spends in verification layer

* added Forkable trait to satisfy resolving recursive types by compiler

* new db regtests in progress

* fixed verification and sync unit tests

* fixed miner and rpc unit tests

* implemented fmt::Debug for few structs

* removed commented out code

* fixed bencher target

* removing commented out code, polishing db_refactor pr
2017-04-05 16:37:58 +07:00
Svyatoslav Nikolsky 9dad2a3eec Merge branch 'master' into sync_v2 2016-12-23 16:19:07 +03:00
Svyatoslav Nikolsky d696dcfdaf sync_v2 2016-12-23 16:13:18 +03:00
NikVolf 0a7f30d6b9 memory pool expect explanation 2016-12-15 14:48:41 +01:00
Svyatoslav Nikolsky be53bbdc3e added some more tests 2016-12-14 14:22:02 +03:00
Svyatoslav Nikolsky 945c19a8eb replace non-final transactions in mempool 2016-12-14 00:14:07 +03:00
debris f669a27d06 PreviousTransactionOutputProvider refactor in progress 2016-12-10 19:47:02 +01:00
debris f5b1d95d2d block assembler in progress 2016-12-08 16:45:37 +01:00
debris 986baa8685 MemoryPoolIterator 2016-12-08 11:47:38 +01:00
Svyatoslav Nikolsky 14cde7adf9 removed diagnostic println 2016-12-02 14:51:32 +03:00
Svyatoslav Nikolsky 83939e1380 removed debugging comment 2016-12-02 14:49:50 +03:00
Svyatoslav Nikolsky 563997e935 no double-spend transactions in mempool 2016-12-02 14:45:14 +03:00
NikVolf d79b2835aa fix warnings 2016-11-30 19:21:21 +03:00
NikVolf 51fe9b6e01 output proxy 2016-11-30 17:19:23 +03:00
debris 440dae5a8e use Vec::get instead if iter().nth 2016-11-29 16:19:54 +01:00
debris 65664556b6 initial work on b82, abstraction for verify_transaction, use PreviousTransactionOutputProvider 2016-11-29 14:40:55 +01:00
Svyatoslav Nikolsky 08330f635e serve transactions requests 2016-11-28 18:33:24 +03:00
Svyatoslav Nikolsky e3f0878283 transaction_fee_rate now takes &TransactionProvider 2016-11-25 10:39:56 +03:00
Marek Kotewicz 1f4cf7e443 fixed clippy lints for miner, sync, test-data and verification (#103)
* fixed clippy lints for miner, sync, test-data and verification

* make verification check_nbtis more idiomatic
2016-11-09 11:36:52 +01:00
debris f7a73f6520 fixed clippy lints for db, keys, miner, and script 2016-11-08 21:01:36 +01:00
Svyatoslav Nikolsky 3319e5e1f5 serving mempool request 2016-11-02 15:18:52 +03:00
Svyatoslav Nikolsky 403971b314 renamed as_input to to_input 2016-10-20 18:12:32 +03:00
Svyatoslav Nikolsky e03cf06a16 test_data::ChainBuilder for generating transactions for tests 2016-10-20 17:21:28 +03:00
Svyatoslav Nikolsky 8c71468ab9 Merge branch 'master' into mempool 2016-10-19 17:15:34 +03:00
Svyatoslav Nikolsky 535dca320a get rid of macros in MemoryPool 2016-10-19 15:02:13 +03:00
Svyatoslav Nikolsky efdd30da17 implemented HeapSizeOf for MemoryPool 2016-10-19 13:07:11 +03:00
Svyatoslav Nikolsky bb4f771905 removed redundant type specifier 2016-10-18 15:34:39 +03:00
Svyatoslav Nikolsky c18e3b70c4 fixed merge conflicts 2016-10-18 13:40:31 +03:00
Svyatoslav Nikolsky d8d9c33e76 Merge remote-tracking branch 'origin/master' into mempool 2016-10-18 13:38:09 +03:00
Svyatoslav Nikolsky fc3a496d9b MemoryPool:
* support ByPackageScore ordering strategy
* support complex chains
* new tests
* renamed timestamp to storage_index
2016-10-18 13:36:13 +03:00
debris d87626884d Serializable trair extended with serialized_size function 2016-10-17 11:17:00 +02:00
Svyatoslav Nikolsky e247ab23b4 new tests for MemoryPool 2016-10-17 10:08:49 +03:00
Svyatoslav Nikolsky 40b1241ccf initial commit for MemoryPool 2016-10-16 21:32:11 +03:00