* Reorganized docs
* Fixed internal links in basic usage
* fixed the docker-compose command and volume for docs
* fixed docs tests
* fix travis docs test
* tox ini file
* fixed readme localhost links
* edited tox and test docs to previous state
* Fix tests errors related to docs reorganization
Signed-off-by: David Dashyan <mail@davie.li>
* Added ansible script installation option
Signed-off-by: Lana Ivina <lana@ipdb.io>
* Added ansible script to network setup guide
Signed-off-by: Lana Ivina <lana@ipdb.io>
* Hid the non-working button for now.
Signed-off: Lana Ivina <lana@ipdb.io>
* Try now button
Co-authored-by: David Dashyan <mail@davie.li>
1. Save pre-commit state in the beginning of end block.
2. Provide an interface for custom elections to rollback on crash recovery.
3. Simplify pre-commit management.
4. Add crash recovery for updert-validator and chain migration elecitons.
* Problem: Outputs API doesn't respond with correct unspent/spent outputs
Solution: Fix fastquery such that embedded document is queried properly
* Problem: key order agnostic queries not implemented
Solution: get_spent queries embedded documents which respect key order. This is
not expected by the application hence the query should be altered to query any
kind of key order
* Problem: Mongo query for get_spent too complicated
Solution: Simplify query using $elemMatch
* Problem: No test for checking mixed spent outputs
Solution: Add test for `get_spending_transactions` to check that correct
matching is done when querying documents with multiple inputs
* Problem: tranasction ids not assert when getting spent outputs
Solution: assert tranasction ids
* Separate pending and effective validator updates.
- Pending validator updates do not prevent elections from concluding.
- ValidatorElection overrides has_conclude to not conclude when there is a pending update for the matching height.
- Effective validator updates deem past elections inconclusive.
* Problem: Looking for election block is inefficient.
Solution: Record placed elections, update the records upon election conclusion.
* Clarify the conclusion order in Election.process_blocks.
* Insert election records in bulk.
Otherwise, one can significantly slow nodes down by posting a whole bunch of unique elections.
* Change get_election to use find_one.
* Calculate total votes without making extra query.
* Fix the pending valset check.
* Fix election test setup.
- Hard-wire the supported Tendermint version(s) right in the code of BigchainDB Server. Check the version of Tendermint and disconnect if Tendermint version is an unsupported one.
- Expose a CLI command bigchaindb tendermint-version to display the supported Tendermint versions.
- PR also takes care the long list of warnings we get when we run tests.
- Updated deprecated pymongo methods
- Do not call pytest fixtures directly.
- Also added the doc for the new cli command
* Problem: `ValidatorElection` and `MigrationElection` need to inherit from a common `Election` class.
Solution: Factored the common logic out of `ValidatorElection` and moved it to `Election` parent class.
* Problem: No need to store different types of elections in their own tables
Solution: Remove `DB_TABLE` property from `Election` class.
Solution: Created the `elections` table with secondary_index `election_id`.
* Problem: `UpsertValidatorVote` can be generalized to just be `Vote`
Solution: Renamed, refactored and moved the `Vote` class to tie in with the more general `Election` base class.
* Problem: `election_id` is not unique if two elections have the same properties.
Solution: Added a random `uuid4` seed to enforce uniqueness.
* 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
* Problem: No good way to check for val set absence.
Solution: Make get_validator_set/get_validators return None/[] when there are no validators yet.
* Problem: Incompatible ABCI chain upgrades.
Solution: Record known chains and sync through InitChain. Triggering the migration and adjusting other ABCI endpoints will follow.
Solution: Election ID has to be unique but not every validator set record has it. MongoDB does not support partial indexes, does not even allow for multiple Nones. This is a temporary fix since we are introducing an `election` collection to store election IDs in #2498.
Solution: Remove un-necessary code. Deployment of MongoDB with or without replicaSet should be the responsibility of MongoDB admin which can and cannot be a BigchainDB node operator. As far as BigchainDB is concerned replicaset, if provided in bigchaindb configs, should be used to establish connection with MongoDB.
* Problem: We need to store the `election_id` as part of the `validator_update` so we can efficiently check which election was resposible for the change
Solution: Added the parameter to `store_validator_set` and aligned the tests
* Problem: Logic for `upsert-validator show` is convoluted
Solution: Rewrote the function to be much simpler
* Problem: Need a uniqueness constraint for election_id wrt validator changes
Solution: Added a new key to the db schema
* 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 -*-
* Problem: Validator set not tracked by BigchainDB
Solution: BigchainDB depends on tendermint's RPC API to get the validator set
which is not avaiable during replay so the validators set should be tracked
inside BigchainDB
* Problem: Unclear code and documentation
Solution: Fix decode_validator and docs strings
* Problem: Doc strings missing
Solution: Add doc string for store_validato_set
* Problem: core.py contains an unused class, `Bigchain`
Solution: Remove core.py. Refactor BigchainDB Class to remove inheritance from Bigchain.
* 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!
* 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: BigchainDB class should be part of project root
Solution: Removed the /tendermint directory and moved its contents to project root
* Problem: Flake8 complained that imports were not at the top of the file
Solution: Had to play around with the order of imports to avoid cyclic dependencies, but its working and style compliant now
* Problem: Stale reference to /tendermint directory in the index
Solution: Removed the references to /tendermint
* Problem: Flake8 complaining of unused import in __init__.py
Solution: The import is there so I can import App directly from bigchaindb, rather than from bigchaindb.core (which I think improves code readability. I added a # noqa to silence Flake8.
* Problem: Stale references to `bigchaindb.tendermint.BigchainDB` in the rst files cause Sphinx to fail
Solution: Updated the autodoc files to use `bigchaindb.BigchainDB` instead
* Problem: Stale reference to the `tendermint` directory in an @patch in a disabled test
Solution: Updated the @patch for completeness
* Problem: BigchainDB class should be part of project root
Solution: Removed the /tendermint directory and moved its contents to project root
* Problem: Flake8 complained that imports were not at the top of the file
Solution: Had to play around with the order of imports to avoid cyclic dependencies, but its working and style compliant now
* Problem: Stale reference to /tendermint directory in the index
Solution: Removed the references to /tendermint
* Problem: Flake8 complaining of unused import in __init__.py
Solution: The import is there so I can import App directly from bigchaindb, rather than from bigchaindb.core (which I think improves code readability. I added a # noqa to silence Flake8.
* Problem: Stale references to `bigchaindb.tendermint.BigchainDB` in the rst files cause Sphinx to fail
Solution: Updated the autodoc files to use `bigchaindb.BigchainDB` instead
* Problem: Stale reference to the `tendermint` directory in an @patch in a disabled test
Solution: Updated the @patch for completeness
* Problem: RethinkDB, change feed, old mongo, admin interface are not supported any longer.
Solution: Remove unsupported functionality. Bring the MongoDB backend implementation completely to the localmongodb package. Fix the test setup.
* Problem: Nothing depends on multipipes any longer.
Solution: Remove multipipes from setup.py.
* Problem: The how-to-run-tests doc uses --database-backend.
Solution: Do not include the --database-backend option into the documented pytest usage.
* Problem: The backends docs are outdated.
Solution: Document MongoDB as the default and only backend for BigchainDB.
* Problem: The inputs fixtures uses old blocks API.
Solution: Change the inputs fixtures to use the new blocks API.
* Problem: rethinkdb package is not used anymore.
Solution: Remove the rethinkdb dependency from setup.py.
* Problem: The abci-marked tests use outdated Mongo conn.
Solution: Replace MongoDBConnection with LocalMongoDBConnection for them.