31 Commits

Author SHA1 Message Date
Katha
e377fb57af
Pre commit styling (#1914)
* run pre-commit and fix errors

* mention pre-commit in our guides
2017-11-30 15:04:14 +01:00
Krish
e8411fc99e Do not allow duplicate GENESIS block creation - #1556 (#1612)
* Add a check for GENESIS transaction

* Add test and fixture

* Removed database query for GENESIS block

* Undo log level change
2017-07-03 17:21:15 +02:00
Scott Sadler
53dff83ed4 Merge remote-tracking branch 'origin/master' into validationerror-refactor 2017-03-08 13:07:51 +01:00
Scott Sadler
5584de59b0 Make ValidationError a superclass of all validation errors and use it 2017-03-03 11:36:50 +01:00
Scott Sadler
a71dc66e97 extra test for tx_collector and docs fix 2017-03-02 18:48:03 +01:00
Scott Sadler
1d935b9ae6 dedupe tx in block, reject duplicate tx in block 2017-03-02 14:35:20 +01:00
Rodolphe Marques
c174271ae6 Make sure BlockPipeline.validate_tx handles all exceptions 2017-02-03 13:05:04 +01:00
Sylvain Bellemare
fa79fe6783 Add session scope test setup for config and db
resolves #966
2016-12-20 20:37:28 +01:00
libscott
7e33f2bd52 Tx ID as Asset ID (#926)
* Allow AssetLinks to be used in place of Assets in the Transaction Model and enforce `Transaction.transfer()` to only take an AssetLink

* Remove AssetLink's inheritance from Asset

* Remove id from the Asset model

* Fix get_txids_by_asset_id query for rethinkdb after removing asset's uuid

Because `CREATE` transactions don't have an asset that contains an id
anymore, one way to find all the transactions related to an asset is to
query the database twice: once for the `CREATE` transaction and another
for the `TRANSFER` transactions.

* Add TODO notice for vote test utils to be fixtures

* Update asset model documentation to reflect usage of transaction id

* Fix outdated asset description in transaction schema
2016-12-20 17:28:15 +01:00
Sylvain Bellemare
56feefe3f4 Re-work test fixtures - iteration one 2016-12-15 15:54:15 +01:00
Rodolphe Marques
976a3e8254 Merge remote-tracking branch 'origin/master' into feat/905/abstract-db-changefeed 2016-12-14 12:43:47 +01:00
Ryan Henderson
f725279a51 remove old tx recovery on block process start (#903) 2016-12-14 12:33:47 +01:00
Rodolphe Marques
530681c905 Re-added the get_changefeed methos in the pipelines.
Fixed tests.
Fixed typos.
2016-12-13 15:11:25 +01:00
Rodolphe Marques
f09285d32f Fixed some code typos
Changed election pipeline to use the new changefeed abstraction
2016-12-13 11:16:29 +01:00
Rodolphe Marques
8266dfadb0 Fixed typos
Fixed failing test
2016-12-13 11:15:49 +01:00
Brett Sun
9a7e695e18 Fix tests still relying on being able to access removed attribute of the Bigchain class 2016-12-12 15:48:48 +01:00
ryan
9ab0294bc9 partial removal of rethinkdb calls from tests 2016-11-22 14:47:11 +01:00
Rodolphe Marques
eead7dbdda Merge remote-tracking branch 'origin/master' into feat/746/new-naming-convention-for-keys 2016-11-17 11:41:23 +01:00
Rodolphe Marques
3909538c62 Replace all occurrences where vk is used as a shortcut
for public key and replaced it with `pk`
2016-11-10 17:20:27 +01:00
Rodolphe Marques
de23053ebc Merge remote-tracking branch 'origin/master' into divisible-assets 2016-11-09 13:36:56 +01:00
Rodolphe Marques
e35d2899b5 Removed support for custom threshold
Removed support for hashlocks
Unskipped tests that were skipped waiting for divisible assets
Fixed remaining tests
2016-11-09 13:32:18 +01:00
vrde
815b4318ba
Move calls to DB to specific backend module 2016-10-26 17:48:53 +02:00
vrde
15fb27f327
Remove conn property from core API 2016-10-18 17:32:32 +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
Ryan Henderson
404f3a1c45 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
2016-09-08 11:45:48 +02:00
Ryan Henderson
9426c7f866 fix assignment timestamp in block (#627) 2016-09-08 11:26:25 +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
tim
dda16059ee Fix tests 2016-08-29 17:44:58 +02:00
vrde
40966816c9
Fix tests 2016-07-27 15:24:38 +02:00
vrde
715763757c
Change name to pipes 2016-07-25 17:02:08 +02:00
vrde
ecf67d1e28
Add block pipeline 2016-07-25 13:30:31 +02:00