44 Commits

Author SHA1 Message Date
Sylvain Bellemare
c39fad3f2f Revert "Merge common lib" (#741) 2016-10-25 10:31:06 +02:00
Sylvain Bellemare
64cafc62ad Merge common lib (#739)
* Planning release

* Clean up after move

* Add exceptions.py

* Add crypto.py

* Adjust setup to package structure

* Fix tests

* Add test coverage

* Comply to flake8

* Add test coverage

* Transfer-tx fulfillments validation

* Remove condition and fulfillment ids

* Fix signing logic

Specifically for transfer-tx with multiple inputs
and outputs.

* Compliance to legacy BDB models

* Adjust fulfillment validation interface

* Add serialization validation for txids

* Use __eq__ to compare objects

* Heavy refactor to comply with current implementation

* Add Transaction.create

* Correct fulfillment validation logic

* Add Transaction.create for hashlock conditions

* Add hashlock condition serialization

* Transaction.transfer add single input and outputs

* Small adjustments to transfer-tx interface

* Create transfer-tx interface

* Increase test coverage

* Adjust fulfillment (de)serialization

* Catch CC Error for Fulfillment

* Allow custom thresholds

* PR feedback

* Fix tests

* Rename Data to Metadata

* Add Asset exceptions

* Add basic Asset model

* More renaming of payload => data

* Add Asset into work-flow-functions

* Add Asset amount to condition

* add fulfillment exception

* initial integration of asset

* Make transaction.py compy to 79 chars

* Make util.py comply to 79 chars

* Make exceptions.py comply to 80 chars

* Renaming inp to input_

* fix pep8 issues

* Correct raised error

* Remove resolved TODOs

* prevent adding None as fulfillment / condition to Transaction

* Small modifications to support new cryptoconditions

* Improve documentation (#42)

* Add doc strings for Fulfillment cls

* Add doc strings for TransactionLink cls

* Add doc strings for Condition cls

* Add doc strings for Data cls

* Add doc strings for Transaction cls

* Add doc strings for Asset cls

* Extract common implementation

* Tx model: Add test for empty inputs

* WIP: Implement sign tx

* Add tests for:
    - Conditions; and
    - Fulfillments

Mostly on the (de)serialization part.

* Finalize serialization logic for tx class

* Add Tests for tx serialization logic

* Add fulfillment validation

* Add ThresholdCondition support

* WIP transfer

* Clean up after move

* Adjust setup to package structure

* Fix tests

* Add test coverage

* Add test coverage

* Transfer-tx fulfillments validation

* Remove condition and fulfillment ids

* Fix signing logic

Specifically for transfer-tx with multiple inputs
and outputs.

* Fix test case

* Compliance to legacy BDB models

* Adjust fulfillment validation interface

* Add serialization validation for txids

* Use __eq__ to compare objects

* Heavy refactor to comply with current implementation

* Add Transaction.create

* Add validation tests

* Add Transaction.create for hashlock conditions

* Add hashlock condition serialization

* Transaction.transfer add single input and outputs

* Small adjustments to transfer-tx interface

* Create transfer-tx interface

* Increase test coverage

* Adjust fulfillment (de)serialization

* Catch CC Error for Fulfillment

* Allow custom thresholds

* Rename Data to Metadata

* Add basic Asset model

* Add Asset into work-flow-functions

* Add Asset amount to condition

* initial integration of asset

* Make tests comply to 79 chars per line

* Fixed tests

* fix pep8 issues

* Correct raised error

* Add test for asset initialization

* Remove resolved TODOs

* prevent adding None as fulfillment / condition to Transaction

* Small modifications to support new cryptoconditions

* Extract common tests

* Copy conftest from bigchaindb-common - by @timdaub

* Replace bigchaindb_common pkg by bigchaindb.common
2016-10-25 10:21:20 +02:00
Sylvain Bellemare
50b0b3cef2 Rebase/feat/586/integrate tx model (#641)
* Adjust imports to bigchaindb_common

* Adjust get_spent function signature

* Adjust block serialization

* Fix BigchainApi Test

* Fix TestTransactionValidation tests

* Fix TestBlockValidation tests

* WIP: TestMultipleInputs

* Adjust tests to tx-model interface changes

- Fix old tests
- Fix tests in TestMultipleInputs class

* Remove fulfillment message tests

* Fix TransactionMalleability tests

* Remove Cryptoconditions tests

* Remove create_transaction

* Remove signing logic

* Remove consensus plugin

* Fix block_creation pipeline

* Fix election pipeline

* Replace some util functions with bdb_common ones

- timestamp ==> gen_timestamp
- serialize.

* Implement Block model

* Simplify function signatures for vote functions

Change parameter interface for the following functions:

- has_previous_vote
- verify_vote_signature
- block_election_status

so that they take a block's id and voters instead of a fake block.

* Integrate Block and Transaction model

* Fix leftover tests and cleanup conftest

* Add bigchaindb-common to install_requires

* Delete transactions after block is written (#609)

* delete transactions after block is written

* cleanup transaction_exists

* check for duplicate transactions

* delete invalid tx from backlog

* test duplicate transaction

* Remove dead code

* Test processes.py

* Test invalid tx in on server

* Fix tests for core.py

* Fix models tests

* Test commands main fn

* Add final coverage to vote pipeline

* Add more tests to voting pipeline

* Remove consensus plugin docs and misc

* Post rebase fixes

* Fix rebase mess

* Remove extra blank line

* Improve docstring

* Remove comment

handled in bigchaindb/cryptoconditions#27;
see https://github.com/bigchaindb/cryptoconditions/issues/27

* Fix block serialization in block creation

* Add signed_ prefix to transfer_tx

* Improve docs

* Add library documentation page on pipelines

* PR feedback for models.py

* Impr. readability of get_last_voted_block

* Use dict comprehension

* Add docker-compose file to build and serve docs

locally for development purposes

* Change private_key for signing_key

* Improve docstrings

* Remove consensus docs

* Document new consensus module

* Create different transactions for the block

* Cleanup variable names in block.py

* Create different transactions for the block

* Cleanup variable names in block.py
2016-09-29 10:29:41 +02:00
vrde
27f585f39d
Improve test to check if original vals are kept 2016-09-21 15:09:54 +02:00
vrde
989a943fea
Move func definition after imports 2016-09-21 15:01:42 +02:00
vrde
dea2df9db0
Separate test for empty args 2016-09-21 15:00:13 +02:00
vrde
5f603f52ef
Add more test coverage for commands 2016-09-21 14:26:53 +02:00
vrde
9b709b7f98
Add tests for argparse 2016-09-21 00:46:48 +02:00
vrde
7944e0cd98
Allow temporary keypair if no conf file found
Closes #482, closes #559
2016-09-20 16:49:56 +02:00
vrde
121c729504
Merge remote-tracking branch 'origin/master' into make-db-connection-more-robust 2016-09-19 17:14:02 +02:00
vrde
b9fba73c14
Remove unused code 2016-09-07 17:32:34 +02:00
Ryan Henderson
92981e003d Core/198/handle stale transactions (#359)
* add timestamp to transaction assignment

* add reassignment delay to configuration

* refactor to multipipes

* # This is a combination of 7 commits.
# The first commit's message is:
stale transaction monitor and tests

# The 2nd commit message will be skipped:

#	simplify logic

# The 3rd commit message will be skipped:

#	node will assign to self

# The 4th commit message will be skipped:

#	block listens for insert and update

# The 5th commit message will be skipped:

#	more test coverage

# The 6th commit message will be skipped:

#	test coverage

# The 7th commit message will be skipped:

#	test coverage

* stale transaction monitor and tests

* update operation only returns new value
2016-09-07 16:26:41 +02:00
vrde
b8e6b0b830
Add code coverage for start_temp_rethinkdb 2016-09-07 02:06:52 +02:00
vrde
1d073ee706
Use new Connection class to run queries 2016-09-07 00:40:17 +02:00
vrde
702fbe693f
Merge branch 'master' into refactor-multiprocessing-for-vote 2016-08-15 16:25:06 +02:00
Rodolphe Marques
6208305ae4 added tests 2016-06-20 13:24:14 +02:00
Rodolphe Marques
8d204a50eb Catch rethinkdb exceptions when configuring shards and replicas 2016-06-17 15:51:45 +02:00
troymc
cc6129103f WIP: added bigchaindb set-replicas cmd w/ non-working test 2016-06-16 14:44:57 +02:00
troymc
e212828182 Updated awsdeploy, fabfile, docs, test for bigchaindb set-shards 2016-05-09 18:14:48 +02:00
Rodolphe Marques
f09dacdd11 renamed sharding to set-shards 2016-05-09 17:31:02 +02:00
Rodolphe Marques
9f959fc6ed Add command to configure number of shards.
Changed aws deployment script to automatically set the number of shards.
Created tests
2016-05-09 16:45:09 +02:00
vrde
66cd3bb77b
Fix exception in test 2016-04-27 17:17:11 +02:00
vrde
f9c609ff0d
Add env variables to default config 2016-04-26 03:24:56 +02:00
vrde
2d6c502ee3
Add exp command to start RethinkDB 2016-04-26 01:42:21 +02:00
troymc
0870985049 Nevermind checking err when export pubkey and pubkey set 2016-04-18 11:49:41 +02:00
troymc
5482934868 More tests for bigchain export-my-pubkey 2016-04-18 11:06:09 +02:00
troymc
53196c5b8c Renamed dict_config() to set_config() 2016-04-14 10:55:07 +02:00
vrde
22923ee9d3
Force a config reset before every test 2016-04-12 16:23:09 +02:00
vrde
c9cd842151
Avoid loading the config located in the home of the current user 2016-04-07 17:54:36 +02:00
vrde
ae641d6a96
Fix tests 2016-04-07 14:31:34 +02:00
vrde
959320cdb9
Remove CONFIGURED from tests as well 😓 2016-04-06 17:39:44 +02:00
vrde
804365db24 Improve config, tests and docs
Add better support to env variables.
2016-03-31 11:37:09 +02:00
vrde
e4d3915533 Add type conversion and docs 2016-03-24 01:41:00 +01:00
vrde
3a714a7f8e Add config to blueprint and fix tests madness
There was a problem related to the import of the module
`bigchaindb.web.views`.
The module, when imported, inizialises a new `Bigchain` instance, and
this is wrong for testing and because it's a bad practice.

I spent more or less 2h finding out the problem.
2016-03-03 01:40:40 +01:00
vrde
bd6e16b836 Fix bug related to config overwrite 2016-02-29 14:28:02 +01:00
ryan
63fb14dcc5 adjust tests accordingly 2016-02-22 14:16:02 +01:00
vrde
aea99f8ce0 Fix annoying fixture 2016-02-18 22:14:58 +01:00
vrde
c695f0950e Allow non interactive first start 2016-02-18 16:27:24 +01:00
Sylvain Bellemare
9919e275c2 Add test for run_configure to write config 2016-02-15 13:54:52 +01:00
Sylvain Bellemare
a766fc60b7 Add test for run_configure 2016-02-15 13:54:52 +01:00
Sylvain Bellemare
2b483767ea Add test for run_drop 2016-02-15 13:54:52 +01:00
Sylvain Bellemare
35344d87fa Handle case when db already exists 2016-02-15 13:54:52 +01:00
Sylvain Bellemare
61c9268294 Add test for show_config option 2016-02-15 13:54:52 +01:00
Sylvain Bellemare
d3a0b9515c Fix exception name 2016-02-15 13:54:52 +01:00