88 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
Troy McConaghy
e86fa1f1bb Removed drop_schema_description() & its test 2017-11-14 14:05:53 +01:00
Sylvain Bellemare
4d61c5e8ca Refine the condition uri regex for validation
closes #1516
2017-07-03 15:08:47 +02:00
libscott
5e9b7f4ffe Remove condition details signature, rename subfulfillments to subconditions (#1589)
* implement output.condition.details marshalling and remove signature field

* rename outputs[].condition.details.subfulfillments to subconditions

* simpler threshold depth overlow handling

* pass public_key as kwarg

* change ccv1 condition uri in docs

* import base58 at top in test_transaction
2017-06-30 09:44:22 +02:00
libscott
b1ad6045b6 Rename "output" to "output_index" in /api/v1/outputs (#1596)
* rename output to output_index in /api/v1/outputs

* rename transaction.input.fulfills.output to output_index

* fix rethinkdb queries for output_index
2017-06-30 09:40:50 +02:00
Sylvain Bellemare
02fe712c34 Integrate cryptoconditions version 02 2017-06-22 14:56:22 +02:00
Rodolphe Marques
3ecb05a62d Renamed txid to transaction_id in data models
- Updated schema validation
- Updated database schema
- Updated database queries
- Fixed tests
2017-06-13 11:36:58 +02:00
Scott Sadler
211bdeffb1 dont raise Exception if there's an inconsistency in schema validation failures 2017-05-31 11:33:57 +02:00
Scott Sadler
6fbefd5230 Merge remote-tracking branch 'origin/master' into federation-tests 2017-04-24 15:16:48 +02:00
libscott
4b057ad948 Merge pull request #1286 from bigchaindb/tx-amount-string
transaction.outputs.amount as string
2017-04-24 14:28:06 +02:00
Scott Sadler
1e866a1207 signature payload is serialized transaction 2017-04-24 13:37:50 +02:00
Scott Sadler
2c6370f42e Merge branch 'master' into sign-tx-body 2017-04-24 13:28:02 +02:00
Scott Sadler
483425e803 Merge branch 'master' into tx-amount-string 2017-04-24 12:22:36 +02:00
Scott Sadler
3bf1f9fa17 add additional test of negative amount to fix codecov 2017-04-12 12:16:42 +02:00
Scott Sadler
a6ba13dc3e Merge remote-tracking branch 'origin/master' into federation-tests 2017-04-11 11:21:02 +02:00
Rodolphe Marques
4aa6ed1067 fixed pep8 error 2017-03-16 14:18:57 +01:00
Rodolphe Marques
f00f68e03f _sign_threshold now signs all subconditions for a public key.
Created test.
2017-03-16 14:10:04 +01:00
Scott Sadler
25650597b1 test invalid string amount case 2017-03-15 11:27:35 +01:00
Scott Sadler
f23bfa52d1 Output.from_dict accepts string 2017-03-15 10:00:00 +01:00
Scott Sadler
c3d9717b07 fix breakage from other branch 2017-03-14 18:42:05 +01:00
Scott Sadler
28e06399ae fix breakage from other branch 2017-03-14 18:40:04 +01:00
Scott Sadler
47c6a722ad move tests to validate transaction ID 2017-03-14 18:35:53 +01:00
Scott Sadler
66830fc1d9 move version validation to transaction structure test module 2017-03-14 17:12:10 +01:00
Scott Sadler
8a5814bb08 clarify schema testing module 2017-03-14 17:12:10 +01:00
Scott Sadler
ae8153bd10 new home of structural validation in tests 2017-03-14 17:12:10 +01:00
Scott Sadler
7c461e47d7 remove structural and schematic validations from Transaction.validate which is validating the spend 2017-03-14 12:39:57 +01:00
Scott Sadler
b997057962 fix tests 2017-03-13 14:25:36 +01:00
Scott Sadler
4050389df7 move test_create_tx_no_asset_id 2017-03-13 14:01:29 +01:00
Scott Sadler
e8ee2ec0a6 fix tests 2017-03-13 13:47:37 +01:00
Scott Sadler
dbf24a6065 schema validates that create txes only have 1 input and that it has no fulfills 2017-03-13 13:47:37 +01:00
Scott Sadler
5b2d22efd4 test asset schema 2017-03-13 13:47:37 +01:00
Scott Sadler
8077956b95 test serialization hash function 2017-03-13 13:47:37 +01:00
Scott Sadler
bae05e80a0 sign whole transaction body instead of partial transaction 2017-02-28 11:27:55 +01:00
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