41 Commits

Author SHA1 Message Date
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
diminator
8b55f24998
flask restful
trailing slashes
2016-08-23 17:43:08 +02:00
diminator
d7a73e23f5
PR review @r-marques 2016-08-23 13:44:00 +02:00
diminator
5eb69a9c01
Merge branch 'core/557/improve-get-transaction' into api/555/transactions-status-endpoint 2016-08-22 18:21:50 +02:00
diminator
150aa1e58f
status endpoint
test/docs
2016-08-22 15:05:06 +02:00
Sylvain Bellemare
6f159d3930 Closes #348 (#578) 2016-08-19 16:00:18 +02:00
Dimitri De Jonghe
87a57bae33 #554 transactions GET/POST endpoints (#563)
* split up views per resource
add error cases to get/post transaction
update docs/test

* remove apiary from docstring

* PR review docs
2016-08-19 13:56:08 +02:00
diminator
e871458a99
split up views per resource
add error cases to get/post transaction
update docs/test
2016-08-17 12:18:52 +02:00
vrde
ac603c2744
Merge branch 'add-informative-json-to-api-server' 2016-06-16 15:03:08 +02:00
vrde
0c35e9abff
Return 404 when tx not found 2016-06-08 09:43:29 -07:00
vrde
33114215c2
Add informative JSON message on API root 2016-06-07 15:31:27 -07:00
diminator
51addb9cc9
Merge remote-tracking branch 'remotes/origin/master' into feat/128/multiple-input-output
Conflicts:
	tests/test_util.py
2016-04-21 15:19:23 +02:00
Troy McConaghy
dadde325b8 Merge pull request #186 from bigchaindb/feat/179/cli-export-import-public-keys
Added CLI command to export public key
2016-04-20 15:15:03 +02:00
vrde
667b30e5e8
Add connection pool to web views 2016-04-15 16:08:08 +02:00
troymc
53196c5b8c Renamed dict_config() to set_config() 2016-04-14 10:55:07 +02:00
diminator
7d99bcba7b
merge + fixed tests for get_owned_ids
Merge remote-tracking branch 'remotes/origin/feat/128/multiple-input-output' into feat/127/crypto-conditions-ilp-bigchain-integration

Conflicts:
	bigchaindb/core.py
2016-04-08 16:08:33 +02:00
diminator
8dc0c48681
fixed tests 2016-04-08 15:56:51 +02:00
diminator
66e3c9e8a9
sign/validate fulfillment (single owner)
Merge remote-tracking branch 'remotes/origin/develop' into feat/127/crypto-conditions-ilp-bigchain-integration

Conflicts:
	tests/conftest.py
2016-04-07 18:21:13 +02:00
diminator
ec08bca3d0
fulfillment preparations 2016-04-06 16:21:35 +02:00
vrde
20d3dd4ff3 Wrap the wsgi app in a standalone Gunicorn app 2016-03-22 18:49:14 +01:00
vrde
3a714a7f8e Add config to blueprint and fix tests madness
There was a problem related to the import of the module
`bigchaindb.web.views`.
The module, when imported, inizialises a new `Bigchain` instance, and
this is wrong for testing and because it's a bad practice.

I spent more or less 2h finding out the problem.
2016-03-03 01:40:40 +01:00
vrde
8938811c67 Update endpoints names 2016-02-29 18:28:04 +01:00
vrde
3bfb6bc4c4 Merge remote-tracking branch 'origin/develop' into feat/17/provide-a-restful-api 2016-02-24 12:02:54 +01:00
vrde
9383fa84be Remove useless print 2016-02-24 11:09:59 +01:00
vrde
aeede79846 Add asset create and transfer 2016-02-24 02:38:30 +01:00
vrde
56357e978d Add simple flask webserver and tests 2016-02-23 03:37:33 +01:00