Commit Graph

94 Commits

Author SHA1 Message Date
Scott Sadler 53dff83ed4 Merge remote-tracking branch 'origin/master' into validationerror-refactor 2017-03-08 13:07:51 +01:00
Scott Sadler d10772e4bf Merge remote-tracking branch 'origin/master' into voting-class-integration 2017-03-08 12:56:58 +01:00
Scott Sadler e5dd5c665b address vrde's comments, reshuffle some exceptions around 2017-03-07 13:15:31 +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
Scott Sadler c993f954e0 wip 2017-02-27 20:56:01 +01:00
Rodolphe Marques e7d729a40d Improved docstrings 2017-02-03 10:56:51 +01:00
Rodolphe Marques 153b3dd8d4 Merge remote-tracking branch 'origin' into bug/1132/vote-pipeline-validates-transactions-twice 2017-02-02 13:38:34 +01:00
Rodolphe Marques 6b073f0898 Removed duplicated transaction validation in votes pipeline.
Separated block validation from transaction validation.
Refactored block signature validation.
2017-02-02 13:35:20 +01:00
Rodolphe Marques b7f70befe6 fix wrong logic in validate_block 2017-02-01 15:10:17 +01:00
Scott Sadler 9762b4b968 fix spend input twice bug (https://github.com/bigchaindb/bigchaindb/issues/1099) 2017-01-26 13:39:06 +01:00
Sylvain Bellemare c1b6f60f70 Add an exception message 2017-01-17 07:50:00 -05:00
Brett Sun 8fa3245309 Rename any *util.py to *utils.py (#991) 2016-12-22 17:39:39 +01:00
Scott Sadler 04a78aacec Merge remote-tracking branch 'origin/master' into inputs-outputs 2016-12-22 13:45:02 +01:00
Brett Sun 9319583ab4 Remove Asset and AssetLink (#982)
* Remove asset.validate_asset and move its validation checks to other areas

* Move Asset.get_asset_id to Transaction

* Remove Asset and AssetLink models

* Add test against creating TRANSFER transactions with bad asset
2016-12-22 10:19:21 +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
Scott Sadler f4257030fc dont override input builtin in models.py 2016-12-19 12:29:29 +01:00
Scott Sadler 4e17fe5c3d change fulfills.idx to fulfills.output 2016-12-19 12:29:29 +01:00
Brett Sun 2f4da6a32f Extra renames and small fixes for inputs-outputs (#952)
* Fix typos pointed out in review by @ttmc

* Reword description of an input in the transaction schema

* Re-add removed comment in transaction model

* Fix small typos in some comments in the transaction model

* Add trailling commas to a multiline dict in the transaction model tests

* Fix small things with server docs changes

* Add description of public keys' association with conditions in transaction concept docs

* Reword description of Transaction.create's  and  args

* Rename output_uri to output_condition_uri

* Fix hardcoded class name vs. self.__class__

* Rename instances of 'out' with 'output'

* Rename instances of  and  with  to avoid name clash with built-in

* Remove unnecessary renaming of cryptoconditions.Fulfillment import in transaction model

* Remove instances of  in transaction model

* Remove usages of fulfillment in cases where input makes more sense

* Reword docstrings for init methods in transaction models

* Rename usages of condition where output is now a better fit

* Add descriptions to TransactionLink's txid and idx in schema

* Minor correction to output idx description in transaction yaml
2016-12-19 12:29:29 +01:00
Scott Sadler ed55b3984e s/fulfillments/inputs/g && s/conditions/outputs/g (code changes) 2016-12-19 12:29:29 +01:00
Scott Sadler d2827dfae8 remove asset keywords 2016-12-16 13:50:23 +01:00
Sylvain Bellemare 602dfbea06 Add transaction schema validation to the server
by overriding Transaction.from_dict() in models.py
2016-12-02 14:32:18 +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
troymc 54f0d85cda Merged master branch and fixed some merge conflicts 2016-11-14 18:35:46 +01:00
Sylvain Bellemare 9f471ef4b3 Merge branch 'master' into divisible-assets 2016-11-14 16:39:02 +01:00
tim 74e1f9c303 Fix tense in docs 2016-11-14 14:59:09 +01:00
tim 37cf057b99 PR Feedback for docs 2016-11-14 13:56:05 +01:00
tim b42eec93c7 Fix indentation for model docs 2016-11-14 13:53:49 +01:00
tim f69ccc93df Add doc strings for Block cls 2016-11-14 13:51:02 +01:00
Rodolphe Marques 6d7392d98d Handle the case where there are negative amounts.
Created tests
2016-11-11 11:34:20 +01:00
Rodolphe Marques c068f04a82 Replaced VerifyingKey with PublicKey
Replaced SigningKey with PrivateKey
Replaced all occurences of signing key with private key
Replaced all occurences of verifying key with public key
2016-11-10 17:01:06 +01:00
Rodolphe Marques d8be9ac3ec Fixed typo
Renamed some variables to make the code more readable
2016-11-10 11:59:22 +01:00
Rodolphe Marques a2e28ae806 addressed comments 2016-11-09 17:48:39 +01:00
Rodolphe Marques a212aba35b Added validation for amounts
Added a new db call to return an asset instance given the id

Created tests
2016-11-06 20:00:47 +01:00
Rodolphe Marques 63f5879cb2 consolidate Asset model in common 2016-11-04 11:31:07 +01:00
Christian Gärtner 078d018395 Fixed pep8 violations in bigchaindb source code 2016-11-02 09:26:05 +01:00
troymc 2d6dfaa6f4 Rename FulfillmentNotInValidBlock to TransactionNotInValidBlock 2016-10-29 16:35:15 +02:00
Sylvain Bellemare ea9dfaf1e5 Replace bigchaindb_common pkg by bigchaindb.common 2016-10-24 17:01:43 +02:00
Rodolphe Marques 7275e6f44b Added support for cryptoconditions 0.5.0
Fixed tests.
2016-10-14 17:48:45 +02:00
Rodolphe Marques abf1c98d7c Merge remote-tracking branch 'origin/master' into rebase/feat/564/implement-digital-asset-template 2016-10-12 16:56:49 +02:00
Rodolphe Marques 80c9cdcb09 Finished integration of digital asset.
Fixed tests
2016-10-12 10:29:25 +02:00
Ryan Henderson 81e70951d4 check if fulfillments are in a valid block (#629)
* check if fulfillments are in a valid block

* documentation

* fix almost all tests where tx validity is checked before writing to block

* move import
2016-10-10 09:41:49 +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