55 Commits

Author SHA1 Message Date
Scott Sadler
adb579ac0a Revert "duplicate asset ID" and apply "get_txids_filtered" interface. 2017-01-26 13:52:09 +01:00
libscott
cd7d65b63e Merge pull request #1066 from bigchaindb/1021/http_outputs_endpoint
1021/http outputs endpoint
2017-01-25 13:24:10 +01:00
libscott
4802f0fabe Merge pull request #1080 from bigchaindb/no-dev-in-tx-version
short form 0.9, 0.10 etc tx version with no '.dev' suffix
2017-01-24 14:34:37 +01:00
Scott Sadler
bd048a3115 add flake8-quotes checker and cleanup double quotes 2017-01-23 17:30:37 +01:00
Scott Sadler
4bb64fa0b8 generalise get_owned_ids to get_outputs and get_owned_ids 2017-01-23 16:10:21 +01:00
Scott Sadler
ccdbb91c1c short form 0.9, 0.10 etc tx version with no '.dev' suffix 2017-01-23 15:16:15 +01:00
Scott Sadler
d7126169f4 duplicate asset id / fix flake8 errors 2017-01-16 15:41:26 +01:00
Scott Sadler
003519b0a8 duplicate tx.id into tx.asset.id in CREATE transactions 2017-01-16 15:03:54 +01:00
libscott
e08bf52fa7 Merge pull request #1018 from bigchaindb/change-tx-version
Change version in tx model to 0.9
2017-01-13 12:07:23 +01:00
Sylvain Bellemare
1cfd3de60e Fix flake8 errors in tests 2017-01-11 05:13:27 -05:00
libscott
0b0dadd6fa Update test_transaction.py 2017-01-09 17:44:02 +01:00
Scott Sadler
48b90407bd change version in tx model to 0.9. The idea is that we will go with the server version until we hit 1.0 where we should be stable, then re-evaluate. 2017-01-04 15:10:15 +01: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
92fee24395 fix forgotten test inputs-outputs 2016-12-19 13:44:20 +01:00
Scott Sadler
4e17fe5c3d change fulfills.idx to fulfills.output 2016-12-19 12:29:29 +01:00
Scott Sadler
b20a770b02 restore accidentally deleted tests 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
4b235f1f72 rename condition and fulfillment to output in test names where neccesary 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
tim
f78c90ada8 Add to_uri for TransactionLink 2016-12-15 17:17:18 +01:00
Scott Sadler
a635838c58 few style changes for vote-schema.py 2016-12-12 15:15:38 +01:00
Scott Sadler
4f83fce39d address some PR comments on coding style 2016-12-12 15:15:38 +01:00
Scott Sadler
94df6fc00a merge test_schema tests and tweak Data Models documentation index 2016-12-12 15:15:38 +01:00
Scott Sadler
d7e0009ce5 Drop definitions from schemas since they clutter log output 2016-12-12 15:15:38 +01:00
Scott Sadler
7453e57e7b remove descriptions from yaml schemas loaded for validating in order to reduce noise in error descriptions 2016-12-12 15:15:38 +01:00
Scott Sadler
f2e6e4d13d add tests to get coverage of consensus.py 2016-12-12 15:15:38 +01:00
Scott Sadler
f38028d727 basic tests for vote schema validator 2016-12-12 15:15:38 +01:00
Scott Sadler
bfb5be3ba4 refactor schema tests into separate modules 2016-12-12 15:15:38 +01:00
Scott Sadler
fc88c36ee5 Merge remote-tracking branch 'origin/master' into remove-cid-fid 2016-12-09 10:42:32 +01:00
Scott Sadler
8d4677f456 flatten transaction - code changes 2016-12-01 14:31:31 +01:00
Scott Sadler
18d018519f remove Condition.cid and Fulfillment.fid in favour of dereferencing conditions and fulfillments by their location in their respective arrays 2016-11-29 09:59:43 +01:00
Scott Sadler
a6eb52d76d disallow empty metadata dict in favour of null 2016-11-28 17:34:46 +01:00
Scott Sadler
71dcee019f Remove metadata uuid 2016-11-28 17:34:46 +01:00
Scott Sadler
7dc9f52fe0 remove transaction timestamp 2016-11-22 13:03:30 +01:00
libscott
8343bab89f Schema definition (#798)
Commit messages for posterity:

* wip transaction schema definition
* test for SchemaObject
* test SchemaObject definions meta property
* schema documentation updates
* test for basic validation
* commit before change to .json file definiton + rst generation
* move to straight .json schema, test for additionalProperties on each object
* add asset to transaction definiton
* remove outdated tx validation
* make all tests pass
* create own exception for validation error and start validating transactions
* more tx validation fixes
* move to yaml file for schema
* automatic schema documentation generator
* remove redundant section
* use YAML safe loading
* change current_owners to owners_before in tx schema
* re-run tests and make correct yaml schema
* fix some broken tests
* update Release_Process.md
* move tx validation into it's own method
* add jsonschema dependency
* perform schema validation after ID validation on Transaction
* Release_Process.md, markdown auto numbering
* remove old transaction.json
* resolve remaining TODOs in schema docuementation
* add `id` and `$schema` to transaction.yaml
* add transaction.yaml to setup.py so it gets copied
* address some concernes in PR for transaction.yaml
* address more PR concerns in transaction.yaml
* refactor validtion exceptions and move transaction schema validation into it's own function in bigchaindb.common.schema.__init__
* add note to generated schema.rst indicating when and how it's generated
* move tx schema validation back above ID validation in Transaction.validate_structure, test that structurally invalid transaction gets caught and 400 returned in TX POST handler
* remove timestamp from transaction schema index
* Add README.md to bigchaindb.common.schema for introduction to JSON Schema and reasons for YAML
* Use constant for schema definitions' base prefix
* Move import of ValidationError exception into only the tests that require it
* Move validate transaction test helper to tests/common/util.py
* move ordered transaction schema load to generate_schema_documentation.py where it's needed
* use double backticks to render terms in schema docs
* change more backticks and change transaction version description in transaction schema
* make details a mandatory property of condition
* Many more documentation fixes
* rename schema.rst to schema/transaction.rst
* Fix documentation for Metadata
* Add more links to documentation
* Various other documentation fixes
* Rename section titles in rendered documentation
* use  to manage file handle
* fix extrenuous comma in test_tx_serialization_with_incorrect_hash args
* 'a' * 64
* remove schema validation until we can analyze properly impact on downstream consumers
* fix flake8 error
* use `with` always
2016-11-22 11:17:06 +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
Brett Sun
eb362fd6e9 Fix equality check for AssetLinks (#825) 2016-11-16 11:21:25 +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
bca7939f6c Added an AssetLink class to link to a Asset from a TRANSFER transaction 2016-11-10 13:18:20 +01:00
Rodolphe Marques
a2e28ae806 addressed comments 2016-11-09 17:48:39 +01:00
Rodolphe Marques
efb5439044 updated docstrings
addressed added todos
2016-11-09 14:56:14 +01:00
Rodolphe Marques
dccbc3c1fe pep8 fixes 2016-11-09 14:25:42 +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
Rodolphe Marques
19cfe172ea Added support for multiple owners_before in CREATE transactions
Added some type checking
Remove code for hashlocks and timelocks. They were partially implemented
features that we need to revisit.
2016-11-08 17:41:53 +01:00
Rodolphe Marques
3ac530617c Fixed some tests 2016-11-06 22:35:39 +01:00
Rodolphe Marques
48084ec47a multiple outputs in create transaction 2016-11-04 15:34:39 +01:00