1
0
mirror of https://github.com/bigchaindb/bigchaindb.git synced 2024-06-23 01:36:42 +02:00
Commit Graph

52 Commits

Author SHA1 Message Date
David Dashyan
9e99c024d3
Replace headers (#2683)
Signed-off-by: David Dashyan <mail@davie.li>
2020-04-06 11:52:18 +02:00
codegeschrei
dd84d4eb6f Problem: There are unnecessary markers (#2522)
* Problem: we have unused and outdated fixtures
Solution: clean up fixtures and tests accordingly

* Problem: there are still unused fixtures
Solution: remove Merlin keys

* Problem: There are unnecessary markers
Solution: remove the tendermint marker for tests
2018-09-10 09:53:18 +02:00
Troy McConaghy
abdd23f5a6 Problem: Source files contain no license info (#2455)
* Problem: Source files contain no license info

Solution: Add comments with SPDX license info to source files

* Python 3 files don't need # -*- coding: utf-8 -*-
2018-08-16 12:31:32 +02:00
Vanshdeep Singh
f13c9a9d57 Problem: Stateful validation doesn't raise double spend exception (#2422)
* Problem: Stateful validation doesn't raise double spend exception

Solution: Transaction.validate should raise exception DoubleSpend if the given
transaction is already a part of the database

* Problem: Double spend exception message not accurate

Solution: The exception message should state that the double spend is because of
spending the same input more than once in the transaction
2018-07-31 14:06:21 +02:00
Muawia Khan
2b39566a4b Problem: Some configurations are defunct (#2338)
* Problem: BigchainDB config has stale/deprecated parameters

- Remove `keyring` and `keypair` from config
- Update tests
- Add `tendermint` config

* Fix flake8

* Update some naming conventions and redundant changes

* Remove redundant routine `fast_query`

* Remove deprecated parameters and descriptions

* remove some more unwanted code

* Problem: Two flake8 errors made Travis fail

Solution: Fix the two flake8 errors

* Address comments

- Remove reference of nodes_except_me and me_private and me
  as attributes of BigchainDB instances
- Update and re-add test(s)
- Do not introduce `tendermint` in configuration instead handle that
  in a separate PR along with docs

* Address comments

- Remove tests that are already covered with 2.0
- Remove tests that are no longer relevant
- Add TODO for more cleanup

* Remove tendermint config from configure command
2018-06-08 15:50:50 +02:00
Lev Berman
89d665c01e Problem: Asset tests are disabled. (#2277)
Solution: Update the tests to work with BigchainDB 2.* and enable them back.
2018-05-15 11:19:47 +02:00
Sylvain Bellemare
9dd2e026b0 Fixes #1891 2017-12-05 19:38:52 +01: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
Scott Sadler
4b060e6488 move tests related to assets 2017-03-14 18:07:25 +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
5584de59b0 Make ValidationError a superclass of all validation errors and use it 2017-03-03 11:36:50 +01:00
Scott Sadler
dbb3414fd0 generalise get_txids_by_asset_id into get_txids_filtered and remove get_transactions_by_asset_id 2017-01-18 15:42:47 +01:00
libscott
da69aa11f1 Update test_digital_assets.py
On mobile!
2017-01-16 17:47:51 +01:00
Scott Sadler
d9cf4df5e6 duplicate asset id / fix test_get_transactions_by_asset_id 2017-01-16 16:08:15 +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
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
libscott
b2cb426097 Merge pull request #962 from bigchaindb/remove-asset-keywords
Remove asset keywords
2016-12-20 10:02:42 +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
56feefe3f4 Re-work test fixtures - iteration one 2016-12-15 15:54:15 +01:00
Ryan Henderson
d8256d50f2 remove rethinkdb calls (#953)
* remove rethinkdb calls from db/conftest.py
2016-12-15 14:16:30 +01:00
Brett Sun
345fc27a39 Remove durability from all database-related calls 2016-12-12 16:07:41 +01:00
Rodolphe Marques
e03a547276 Merge remote-tracking branch 'origin/master' into feat/332/get-txs-by-asset-id-ignore-invalid-blocks 2016-11-18 14:50:36 +01:00
Rodolphe Marques
aef5dcdf1b fixed typo 2016-11-18 14:40:26 +01:00
Rodolphe Marques
9e1da05103 Fixed some tests 2016-11-17 11:41:54 +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
b7b9338f21 get_transactions_by_asset_id now ignores invalid transactions 2016-11-11 15:25:59 +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
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
a2e28ae806 addressed comments 2016-11-09 17:48:39 +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
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
db55aa8153 Support for multiple io in TRANSFER transactions
Create tests
2016-11-06 18:09:43 +01:00
Rodolphe Marques
ee3b967184 Added support for divisible assets in TRANSFER transactions
Created tests
2016-11-06 01:55:47 +01:00
Rodolphe Marques
5b5c701e0a Finished implementing divisible assets for CREATE transactions
Simplified Transaction.create logic
Created tests
2016-11-06 00:04:27 +01:00
Rodolphe Marques
63f5879cb2 consolidate Asset model in common 2016-11-04 11:31:07 +01:00
Rodolphe Marques
dd382ee4e6 Added ability to CREATE divisible assets 2016-11-03 15:57:05 +01:00
Sylvain Bellemare
ea9dfaf1e5 Replace bigchaindb_common pkg by bigchaindb.common 2016-10-24 17:01:43 +02:00
Rodolphe Marques
7d3c6ee5ce Addressed comments to import tests.
Fixed some pep8 violations
2016-10-13 13:53:08 +02:00
Rodolphe Marques
80c9cdcb09 Finished integration of digital asset.
Fixed tests
2016-10-12 10:29:25 +02:00
Rodolphe Marques
0652348bf0 initial integration of asset 2016-10-07 15:46:21 +02:00
Rodolphe Marques
7715bbc807 more descriptive unit test name 2016-10-04 16:23:36 +02:00
Rodolphe Marques
148e30a84b Remove unnecessart database queries in get_asset_id 2016-10-04 16:23:36 +02:00
Rodolphe Marques
b447a75a8d Added get_txs_by_asset_id
Created secondary index for assets.
Created tests
2016-10-04 16:22:33 +02:00
Rodolphe Marques
f10d1d0bcb Small change to the asset template in TRANSFER transactions.
This change is so that both `CREATE` and `TRANSFER` transactions have
the uuid under the same key so that we can create secondary indexes on
it.
2016-10-04 16:19:06 +02:00
Rodolphe Marques
0189ede72e Renamed asset to asset_data. Added digital asset validation to
validate_transaction

Created and fixed tests.
2016-10-04 16:18:04 +02:00