4303 Commits

Author SHA1 Message Date
Troy McConaghy
d85b9df615
Last PR before the release of v2.0.0b8 (#2596) v2.0.0b8 2018-11-03 18:37:27 +01:00
Troy McConaghy
ff906b0abe
Updated some package version requirements (#2595) 2018-11-03 17:51:52 +01:00
Troy McConaghy
20e6c6a686
Update acceptance Dockerfile to use latest Python driver (#2594)
* Update acceptance Dockerfile to use latest Python driver

* Fixed four Flake8 errors
2018-11-03 17:34:36 +01:00
gamjapark
73afc38697 Translate the readme to Korean (#2592) 2018-11-01 15:17:47 +01:00
Troy McConaghy
c5fea574b5
Updated Python driver version for acceptance tests 2018-10-20 22:03:50 +02:00
Troy McConaghy
ee7bd938dc
Fixed typo in k8s configmap template (#2583)
Thanks to @aberey for pointing this out.
2018-10-18 09:21:02 +02:00
Troy McConaghy
e2b3c78d9c
Edit nginx/nginx.conf to enable CORS (#2580)
* Edit nginx/nginx.conf to enable CORS

* In nginx/nginx.conf, add more allowed headers w/ OPTIONS requests
2018-10-11 09:53:24 +02:00
Troy McConaghy
f1353a3db9
Fixed some docs (#2579)
in the intro page about the Simple Deployment Template:
- removed the note about the BigchainDB Testnet for now
- changed the link to the docs about contributing to BigchainDB from Markdown to RST
2018-10-09 18:10:49 +02:00
Troy McConaghy
c1993c3787
Revised Simple Deployment Template: added NGINX instructions (#2578) 2018-10-09 12:27:06 +02:00
Troy McConaghy
5c1511b479
Add help with make release to release process 2018-09-28 13:35:33 +02:00
Troy McConaghy
3da13eda3d
Last PR before releasing 2.0.0b7 (#2576)
* Updated changelog for 2.0.0b7

* Change 2.0.0b3 to b7 in network-setup.md

* Updated k8s yamls for 2.0.0b7 release

* Updated version.py for 2.0.0b7 release
v2.0.0b7
2018-09-28 13:23:04 +02:00
Lev Berman
0c4d6ec906 Implement crash recovery for elections. (#2566)
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.
2018-09-28 12:32:45 +02:00
Troy McConaghy
f4d6ccbacf
Added server.bind note re connecting via IPv6 & edited reverse proxy instructions. (#2575) 2018-09-28 10:45:03 +02:00
Troy McConaghy
009cbe4e11
Copy-edited the log rotation page (docs) (#2546)
* Copy-edited the log rotation page (docs)

* Fix and add some hyperlinks re/ logging.

* Add back the section/link to log-rotation.html

* Correct the location of BigchainDB logs. Omit mention of bigchaindb-benchmark.log

* Revive notes re BigchainDB Server log rotation
2018-09-28 09:19:20 +02:00
Troy McConaghy
54ac7adaa9
Changed packaging~=17.0 to 18.0 in four places (#2573) 2018-09-27 15:31:30 +02:00
Troy McConaghy
4f01dd4997
See what happens if packaging~=17.0 in setup.py AND docs/*/requirements.txt (#2572) 2018-09-27 13:30:58 +02:00
Vanshdeep Singh
72d7986a58 Problem: 'packaging' version not pinned (#2571)
Solution: Pin the version
2018-09-26 16:33:23 +02:00
Vanshdeep Singh
78dafce146 Problem: Outputs API responds with incorrect outputs (#2567).
* 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
2018-09-26 10:17:39 +02:00
Troy McConaghy
bedb1945a9 Added docs & link re/ adding/removing validators (#2570) 2018-09-25 17:33:59 +02:00
Lev Berman
cb74cb43d2 Extend chain migration show command (#2558)
* Extend `election show` with migration data.

* Test chain-migration show.
2018-09-25 11:38:29 +02:00
Lev Berman
40ea961d4a Update elections documentation (#2563)
* Improve election docs. Reference relevant BEPs.

* Fix typos and headings (election docs).

* Enumerate supported election types (election docs).

* Clarify the BEP-42 ref (election docs).
2018-09-25 10:46:30 +02:00
Lev Berman
24ca0b32a9 Separate pending and effective validator updates. (#2556)
* 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.
2018-09-21 10:51:57 +02:00
Troy McConaghy
39be7a2fdf
Renamed "consensus" to "validation" where relevant (#2561) 2018-09-20 17:17:33 +02:00
Muawia Khan
eb139fba00 Remove benchmark logging (#2565).
* Problem: Benchmark logging is not needed.

* Solution: Clean it up.
2018-09-20 14:30:30 +02:00
codegeschrei
407571ddf4 Problem: send function has a deprecation warning in the driver (#2547)
Solution: replace send with the matching new functions
2018-09-20 10:31:05 +02:00
Troy McConaghy
2f6bbaeb4b
Link to Alberto's tips from Troubleshooting page (#2562)
because they are useful!
2018-09-20 09:54:34 +02:00
Lev Berman
126e90e732 Adjust multiple elections conclusion. (#2553)
- Do not conclude migration election if there is a migration in progress.
- Rewrite election tests to not use mocks and assert many different things.
- Record concluded elections in the `election` collection.
2018-09-18 12:32:16 +02:00
Vanshdeep Singh
cf6fa6b553 Problem: Election type not casted for runnign command (#2551)
Solution: Replace '-' with '_' before running election sub-command
v2.0.0b6
2018-09-17 15:36:38 +02:00
Troy McConaghy
528ba07c68
Last PR before 2.0.0b6 (#2550)
* Update k8s files for 2.0.0b6

* Update version.py for 2.0.0b6
2018-09-17 15:00:26 +02:00
Troy McConaghy
eb0e387b18
Problem: CHANGELOG.md hasn't been updated since Aug. 1 (#2509)
Last update to CHANGELOG.md before 2.0.0b6
2018-09-17 14:43:03 +02:00
Vanshdeep Singh
16355748dd Problem: Docs build fails (#2549)
Solution: Create __init__.py so that migrations can be imported properly
2018-09-17 14:39:00 +02:00
Muawia Khan
e3e95836d0 Problem: bigchaindb not starting because of a module dependency (#2548) 2018-09-17 14:10:22 +02:00
Troy McConaghy
8e5f770707 List the "blocks" endpoint in response to HTTP info requests (#2545)
* Problem: HTTP info endpoints don't include "blocks"

Solution: Add "blocks" to the response to the HTTP info endpoints

* Removed "blocks" endpoints from "Advanced Usage"
because they are really not that advanced
2018-09-17 14:06:48 +02:00
Zachary Bowen
e6893632dc Create migration election class (#2535).
* Problem: We need a way to synchronize a halt to block production to allow for upgrades across breaking changes.

* Solution: Created `MigrationElection`.

* Problem: Need documentation for `migration` elections.

* Solution: Updated the docs.

* Problem: `MigrationElection` needs 'new' CLI method.

* Solution: Updated the definition of `election` to include the new `migration` type.

* Problem: The way `end_block` checks for concluded elections assumes there is only one type of election (so we can't conclude an `upsert-validator` and a `chain-migration` at the same height).

* Solution: Re-engineered the code in `Elections` to conclude multiple elections in the same block. If more than one election change the validator set, only one of them is applied.

* Problem: Tendermint change to store validator changes at height h+2 will break `Election.get_status`.

* Solution: Reworked `get_validator_change` to look at only the latest block height or less.
2018-09-17 13:59:57 +02:00
Troy McConaghy
3cb0f8e2ab
Update the list of MongoDB collections in query.rst (#2543) 2018-09-14 16:25:36 +02:00
Muawia Khan
bd39076522 Problem: Users trying to use an incompatible version of Tendermint (#2541)
-  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
2018-09-14 15:37:18 +02:00
Troy McConaghy
754730a045 Update the Quickstart page (#2538)
* Update the Quickstart page

* Add links to docs about how to deploy a local node
2018-09-14 11:47:39 +02:00
Troy McConaghy
5394054132 Add Troubleshooting page to Simple Deployment Template (#2517) 2018-09-13 16:46:02 +02:00
Troy McConaghy
61ce427e1d Problem: Unclear that we want users to use Monit (#2533)
Solution: Edit the "How to Set Up a BigchainDB Network" page
so that the Monit way is the only fully-documented way.
Give a tip for do-it-yourselfers.
2018-09-13 16:43:15 +02:00
Shahbaz Nazir
c68fab6c31 Problem: A duplicate tx may result in HTTP 500.
* Improve parsing of errors received from Tendermint RPC.
2018-09-13 16:03:22 +02:00
Lev Berman
f55f22144f Problem: the skip_id param is redundant. (#2531)
Solution: remove the param; only call validate_id where it is needed.
2018-09-13 15:35:24 +02:00
Troy McConaghy
6a9064196a Make requirements.txt files consistent with setup.py (#2539) 2018-09-13 14:11:15 +02:00
vrde
241aae335d Problem: validation is slow (#2489)
Solution: parallelize the validation of transactions. This patch adds a
new flag for the `start` command, namely
`--experimental-parallel-validation`, that can be used to enable this
experimental feature.
2018-09-13 12:16:45 +02:00
vrde
901b6b9d02 Problem: Sphinx deprecated a config option (#2537)
Solution: Move from `autodoc_default_flags` to
`autodoc_default_options`.

Related issue:
- https://github.com/sphinx-doc/sphinx/issues/5421
2018-09-13 12:05:01 +02:00
vrde
4b54e702f8 Problem: Events API is unreliable (#2529)
Solution: Stop getting events from the Tendermint events API. Get the
event right before returning from the COMMIT phase of Tendermint, and
publish it to the events queue.
2018-09-12 16:55:23 +02:00
Troy McConaghy
0f41869bea Updated the Python Driver version in acceptance/python/Dockerfile (#2532)
* Updated the Python Driver version in acceptance/python/Dockerfile

* Let package manager auto-update to latest patch version
2018-09-12 16:53:07 +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
Zachary Bowen
8a7650c13a Generalize election management commands (#2515)
* 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: Adding base58 as a requirement seems to break the build...

Solution: Reverting the changes

* Problem: Responding to a suggestion for improved method naming

Solution: Refactored `get_result_by_election_id` to `get_election_result_by_id`

* Problem: No need to store different types of elections in their own tables

Solution: Remove `DB_TABLE` property from `Election` class

* Revert "Problem: No need to store different types of elections in their own tables"

This reverts commit db45374d3c690429d18a25bcc319f8056c016500.

* Problem: Missed a method in `Bigchain` class when updating the naming for an election method

Solution: Finished the refactoring

* Problem: Need a table to store data for all elections

Solution: Created the `elections` table with secondary_index `election_id`

* Problem: `Election` class needs to be updated to store concluded elections in the `elections` table

Solution: Updated the class to use the new table

* 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: Error in docstring return signature

Solution: Fixed the docstring

* Problem: Hardcoded reference to the `VOTE_TYPE` in `Election` base class

Solution: Pointed the reference to the class variable

* Problem: Schema still refers to `ValidatorElectionVote` instead of `Vote`

Solution:  Renamed `TX_SCHEMA_VALIDATOR_ELECTION_VOTE` as `TX_SCHEMA_VOTE`

* Problem: `Election` class variable `ELECTION_TYPE` is overly specific

Solution: Renamed `ELECTION_TYPE` to `OPERATION`

* Problem: Command line options for `upsert-validator` can be generalized to manage any type of election

Solution: Refactored the CLI to manage generalized elections

* Problem: Default for `show_election` not implemented for `Election` class

Solution: Create a default method that work if all fields in the 'asset[data]' can be displayed without additional formatting

* Problem: Multiple small issues with style etc.

Solution: Addressed comments from PR

* Problem: `Election` class variable to `VOTE_TYPE` unnecessary

Solution: Removed the variable and hardcoded everything to use the `Vote` class

* Problem: Minor style issues with PR

Solution: Addressing comments

* Problem: Changes to format for validator keys broke some tests

Solution: Aligned the tests to reflect the changed key format

* Problem: `election show` command displaying the base56 public key

Solution: Cast any public key to base64

* Problem: `election_parser` help message still refers to upsert-validator

Solution: Updated the help message
2018-09-12 13:41:16 +02:00
Muawia Khan
5a440843b6 Problem: No log rotation when BigchainDB and Tendermint started with Monit (#2528)
* Log rotation for tendermint and BigchainDB using Monit

* Change file size from 100KB used for testing to 200 MB for test envs

* Add docs for log rotation

* remove --consensus.create_empty_blocks from monit start

Because already taken care of in the config file

* do not run bigchaindb with debug flag instead use config file

* Address comments I

- Rephrase log rotation to imply monit is not default
- Add statement to explain where bigchaindb log files are created
- Fix HTML comment
- Add log rotation to index

* Address comments II
2018-09-12 11:14:51 +02:00
Lev Berman
b33e3808a6 Problem: Test fails if Tendermint is not up. (#2530)
Solution: Mark the test with the abci mark since it requires running BigchainDB and Tendermint. Fails since the mark cleanup in #2522.
2018-09-11 16:41:27 +02:00