Commit Graph

26 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
Lev Berman 35e35ecd57 Problem: New collections are not created in existing DB. (#2520)
Solution: Do not abort the initialisation if a collection exists. Unify the index creation.
2018-09-12 14:39:07 +02:00
Vanshdeep Singh cbfbfa8fc4 Problem: Public key format not standardized (#2508)
Solution: Add 'type' field to public key so that it can be decoded properly
2018-09-06 16:06:36 +02:00
codegeschrei 55a9151c14 Problem: tests in test_bigchain_api are not activated (#2456)
* Problem: tests in test_bigchain_api are not activated
Solution: remove or active tests

* Problem: TransactionNotInValidBlock was removed
Solution: remove TransactionNotInValidBlock from tests
2018-08-22 09:56:44 +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
Zachary Bowen 3092beb995 Reenable test bigchain api - part 1 (#2415)
* Problem: core.py contains an unused class, `Bigchain`

Solution: Remove core.py. Refactor BigchainDB Class to remove inheritance from Bigchain.

* Fixed flake8 complaint about too many blank lines

* Attempting to fix Sphinx docs. This may result in some redundant commits, as I don't know what I'm doing, and I can't experiment without running the CI...

Sorry in advance!

* Updating from master changed BigchainDB.process_post_response to a private method, so I had to align with that.

* Fixed a couple stale references to bigchaindb.Bigchain in docstrings

* Missed a reference to `Bigchain` in a patch call...

* Problem: Tests in class `TestBigChainAPI` from `tests/db/test_bigchain_api.py` were disabled

Solution: Fixed the tests that still made sense, and deleted the rest.

* Problem: Flake8 style complaints

Solution: Made things prettier

* Problem: Debugging comments were slightly NSFW

Solution: Deleted the debugging comments

* Problem: Stale use of `pytest.mark.genesis` decorator on these tests

Solution: Removed the decorator

* Problem: CriticalDoubleInclusion exception was no longer used anywhere in the code

Solution: Deleted it

* Problem: Unused exception `GenesisBlockAlreadyExistsError`

Solution: Deleted it

* Problem: I removed a test that covered writing to the DB and checking that everything is stored faithfully

Solution: Replaced it and got it working again
2018-08-13 09:54:45 +02:00
Vanshdeep Singh 7dcdefc58b Problem: There is no way to add new validators (BEP-21) (#2392).
Solution: Start by integrating the new election spec specifed in BEP-21.
2018-07-27 17:38:24 +02:00
codegeschrei 7449b026fa Problem: voting code is not used anymore (#2357)
* Problem: voting code is not used anymore
Solution: remove all voting related code

* Problem: Some voting functionality is still present.

Solution: Remove it. Update some of the related tests.

* Problem: some skipped tests are now running
Solution: remove pytest mark to not run them

* Problem: fastquery is not related to votes
Solution: remove it in another PR
2018-06-28 11:30:13 +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
Vanshdeep Singh e4e528e5c4 Problem: Changing validators requires a network restart (#2070)
Solution: Allow nodes to add, update, or remove validators at runtime using a new command. Implements BEP3.
2018-03-29 18:25:26 +02:00
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
Krish e8411fc99e Do not allow duplicate GENESIS block creation - #1556 (#1612)
* Add a check for GENESIS transaction

* Add test and fixture

* Removed database query for GENESIS block

* Undo log level change
2017-07-03 17:21:15 +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
Scott Sadler 53dff83ed4 Merge remote-tracking branch 'origin/master' into validationerror-refactor 2017-03-08 13:07:51 +01:00
Scott Sadler e5dd5c665b address vrde's comments, reshuffle some exceptions around 2017-03-07 13:15:31 +01:00
Scott Sadler 59e21bfa4d fix test, log tx validation errors and document ValidationError 2017-03-03 11:52:12 +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 1d935b9ae6 dedupe tx in block, reject duplicate tx in block 2017-03-02 14:35:20 +01:00
Sylvain Bellemare c036b1490b Inherit from BigchainDBError for common exceptions 2017-01-11 07:48:28 -05:00
Scott Sadler 04a78aacec Merge remote-tracking branch 'origin/master' into inputs-outputs 2016-12-22 13:45:02 +01:00
Brett Sun 7070c39aca Fix small typo in AmountError's docstring 2016-12-19 15:38:30 +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
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
troymc 2d6dfaa6f4 Rename FulfillmentNotInValidBlock to TransactionNotInValidBlock 2016-10-29 16:35:15 +02:00
Sylvain Bellemare 50647c997e Extract common implementation 2016-10-24 14:43:21 +02:00