75 Commits

Author SHA1 Message Date
Scott Sadler
ae14d0e5c4 api method to get transactions by asset_id 2017-01-18 15:43:53 +01:00
Scott Sadler
d899d4c8b6 query string parameters test 2017-01-18 15:42:17 +01:00
Brett Sun
b59ea00118 Merge pull request #1031 from bigchaindb/feat/api/blocks
Implement blocks endpoint
2017-01-17 14:42:24 +01:00
Brett Sun
0751b2bf0b Merge pull request #1029 from bigchaindb/feat/api/votes
Implement votes endpoint
2017-01-17 14:42:02 +01:00
Sylvain Bellemare
1dbc998b36 Only fetch needed element (public key) 2017-01-17 07:50:00 -05:00
Sylvain Bellemare
5759de6ae3 Remove unused fixture 2017-01-17 07:50:00 -05:00
Sylvain Bellemare
9766aa90a1 Addresses #663 partially 2017-01-17 07:50:00 -05:00
Brett Sun
ded7f3e28f PR comments 2017-01-13 18:25:35 +01:00
diminator
3919cc3d5d return empty list if no blocks found 2017-01-13 18:08:28 +01:00
diminator
f018a4f6e7 replace status strings by Bigchain attributes 2017-01-13 18:08:28 +01:00
diminator
1cc46fb86e return list of block_id
implement status query param
test
2017-01-13 18:08:27 +01:00
diminator
1b57ace714 implement GET /blocks endpoint 2017-01-13 18:08:25 +01:00
Brett Sun
7071d471a5 Add test for empty block_id parameter for votes API 2017-01-13 18:07:12 +01:00
libscott
ece5581eb3 Merge branch 'master' into 1021/http_api_root 2017-01-12 15:26:10 +01:00
diminator
5e3bd1d54c
rename test functions 2017-01-12 10:43:11 +01:00
diminator
af2e8e14a5
Merge remote-tracking branch 'remotes/origin/master' into feat/api/votes 2017-01-12 09:59:39 +01:00
diminator
8aa37277c2
remove blank line for travis 2017-01-11 17:17:20 +01:00
diminator
5608a36616
implement /votes endpoint 2017-01-10 11:34:10 +01:00
diminator
8fa231c040
include _links in transaction status payload 2017-01-09 17:14:22 +01:00
diminator
7124adcd34
implement statuses endpoint 2017-01-06 15:55:07 +01:00
Scott Sadler
990d863dc7 tests for informational endpoints 2017-01-06 14:46:40 +01:00
Scott Sadler
80f3bb3809 /api/v1/ informational endpoint 2017-01-06 14:46:40 +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
Scott Sadler
ed55b3984e s/fulfillments/inputs/g && s/conditions/outputs/g (code changes) 2016-12-19 12:29:29 +01:00
Sylvain Bellemare
2b9a351912 Rename owner_after to public_key 2016-12-19 04:31:05 +01:00
Sylvain Bellemare
c81e7a7479 Merge pull request #954 from sbellem/re-work-test-fixtures-iter-one
Re work test fixtures iter one
2016-12-16 20:59:27 +01:00
Sylvain Bellemare
3922b2d4fa Fix unspents endpoint 2016-12-15 17:17:18 +01:00
tim
09cbba8886 Notes, TODOs and formating 2016-12-15 17:17:18 +01:00
tim
8e8bc90742 Add unspents endpoint 2016-12-15 17:17:18 +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
Sylvain Bellemare
6f90c8f3df Add tests for HTTP API returned errors 2016-12-08 16:50:56 +01:00
Troy McConaghy
bd6b9da080 Merge pull request #821 from bigchaindb/issue/780/remove-api-endpoint-setting
Removed the "api_endpoint" setting from everywhere (in this repo)
2016-12-06 17:33:14 +01:00
Sylvain Bellemare
9dacc12b3c Handle transaction schema validation errors
in POST /transactions
2016-12-02 14:32:18 +01:00
troymc
adde84970f Fixed merge conflict in bigchaindb/__init__.py 2016-12-01 16:09:34 +01:00
Scott Sadler
8d4677f456 flatten transaction - code changes 2016-12-01 14:31:31 +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
786635df4a Explicitly pass settings for flask into flask app factory (#750) 2016-11-15 17:41:35 +01:00
troymc
29d783425d Remove or comment-out the api_endpoint setting everywhere 2016-11-15 17:05:09 +01:00
tim
85eccb48be Test file for info.py 2016-11-15 12:05:54 +01:00
tim
e99930c501 web/test_basic_views --> web/test_transactions 2016-11-15 11:54: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
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
Sylvain Bellemare
ea9dfaf1e5 Replace bigchaindb_common pkg by bigchaindb.common 2016-10-24 17:01:43 +02:00
Rodolphe Marques
0652348bf0 initial integration of asset 2016-10-07 15:46:21 +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