changed constructed/allowed tx 'version' from '1.0' to '2.0' (#2048)

- Created three new JSON Schema files for the v2.0 transaction schema, based on the v1.0 files. The only change is the allowed value of version (from "^1\\.0$" to "^2\\.0$").
- I didn't delete the v1.0 JSON Schema files because we might want those some day (to validate old transactions).
- Updated the __init__.py in the directory with the JSON Schema files so that it now uses the version 2.0 JSON Schema files.
- Updated all relevant tests. I only found one, in tests/validation/test_transaction_structure.py
- Updated VERSION in common/transaction.py
- Checked to make sure the example HTTP API docs show "version" with value "2.0". They do.
- Updated the docs page about "The Transaction Model". It just points to the IPDB Transaction Spec.
- If someone submits a transaction with "version" having value "1.0" then the error message comes from the JSON Schema checker.
This commit is contained in:
Troy McConaghy
2018-02-15 11:07:16 +01:00
committed by vrde
parent cd6095e854
commit 63bd698b21
7 changed files with 225 additions and 21 deletions

View File

@@ -2,21 +2,3 @@ The Transaction Model
=====================
See the `IPDB Transaction Spec <https://github.com/ipdb/ipdb-tx-spec>`_.
The Transaction Schema
----------------------
BigchainDB checks all transactions (JSON documents)
against a formal schema defined
in some `JSON Schema <http://json-schema.org/>`_ files.
Those files are part of the
`IPDB Transaction Spec <https://github.com/ipdb/ipdb-tx-spec>`_.
Their official source is the ``tx_schema/`` directory
in the `ipdb/ipdb-tx-spec repository on GitHub
<https://github.com/ipdb/ipdb-tx-spec>`_,
but BigchainDB Server uses copies of those files;
those copies can be found
in the ``bigchaindb/common/schema/`` directory
in the `bigchaindb/bigchaindb repository on GitHub
<https://github.com/bigchaindb/bigchaindb>`_.