4302 Commits

Author SHA1 Message Date
z-bowen
3de8b7a0db Problem: Missed a debug print
Solution: Removed it
2018-08-29 15:39:01 +02:00
z-bowen
8f01e1c4e8 Problem: caplog not capturing logging statements in a test
Solution: Put the function execution in the `caplog` context
2018-08-29 15:14:17 +02:00
z-bowen
e163547a7e Merge branch 'master' into create-dynamic-upsert-validator-commands 2018-08-29 14:49:37 +02:00
z-bowen
9bd19bccf0 Merge branch 'master' of github.com:bigchaindb/bigchaindb 2018-08-29 14:48:49 +02:00
vrde
3f7b521809 Problem: make unit-test-watch loops forever (#2486)
Solution: BigchainDB by default writes logs in the same directory it is
run. The `looponfail` feature provided by pytest waits for changes in
the current directory, so it is continuously triggered. This patch tells
pytest to only watch the `bigchaindb` and `tests` directories.
2018-08-29 14:14:47 +02:00
vrde
407b771185 Problem: validating create+transfer might crash the system (#2487)
Solution: if a TRANSFER transaction is validated after a CREATE
transaction, the system crashes with `AttributeError: 'NoneType' object
has no attribute 'txid'`.

This happens because querying `get_spent` checks the attributes `txid`
and `output` of `input.fulfills` for every transaction in the current
buffer (`current_transactions`). For a CREATE, `input.fulfills` is None,
so the check would fail.

The solution is to check if `input.fulfills` is defined. If not, then
the current transaction cannot spend any output, so we can safely skip
it.
2018-08-29 14:13:22 +02:00
z-bowen
58a6fb450b Problem: test_upsert_validator_show was moved to the tests/upsert_validator directory, making it redundant
Solution: Removed the redundant test
2018-08-29 13:16:33 +02:00
z-bowen
efa2be26be Problem: test for run_upsert_validator_show made use of run_upsert_validator_new, which was overly complicated
Solution: Moved the test to the `tests/upsert_validator` directory so it could make use of the `election` fixtures.
2018-08-29 13:15:30 +02:00
z-bowen
473f385702 Problem: Return value removed from upsert-validator show but still listed in the docstring
Solution: Removed the return value from the docstring
2018-08-29 11:59:07 +02:00
z-bowen
c9847f9537 Problem: public_key displayed in base58 format, while the input is in base64
Solution: Convert the key back to base64 before displaying it to the user
2018-08-29 11:56:23 +02:00
z-bowen
5f12ee84a3 Problem: show changed to write to logger instead of returning a string
Solution: Aligned tests to check for messages in `logger`, rather than checking for return values
2018-08-29 11:45:53 +02:00
z-bowen
800a2dc791 Problem: No error handling for invalid election ids
Solution: Send an error message to `logger.error` if bigchain fails to get the election, then `return`
2018-08-28 17:47:40 +02:00
z-bowen
4a08abf4e8 Problem: upsert-validator show returning the response message, rather than printing it to stdout
Solution: Sent it to `logger.info` instead
2018-08-28 17:43:36 +02:00
z-bowen
a307c531c3 Problem: status needed an explanation in the docs
Solution: Wrote one
2018-08-28 17:40:11 +02:00
z-bowen
eaff0b1d2d Problem: Left a 'WIP' tag on a finished test
Solution: Removed the tag
2018-08-28 17:33:05 +02:00
z-bowen
d399af2e7d Merge branch 'create-dynamic-upsert-validator-commands' of github.com:z-bowen/bigchaindb into create-dynamic-upsert-validator-commands 2018-08-28 17:31:00 +02:00
z-bowen
163f7dc660 Merge branch 'master' into create-dynamic-upsert-validator-commands 2018-08-28 17:29:13 +02:00
z-bowen
c02cea0a25 Merge branch 'master' of github.com:bigchaindb/bigchaindb 2018-08-28 16:52:52 +02:00
Zachary Bowen
952c1338c5
Merge branch 'master' into create-dynamic-upsert-validator-commands 2018-08-28 16:51:32 +02:00
z-bowen
223488e647 Problem: Requested new return value for upsert-validator show, status
Solution: Wrote code and tests to implement the new return value
2018-08-28 16:45:44 +02:00
z-bowen
3bdfd0a948 Problem: Requested new return value for upsert-validator show, status
Solution: Wrote code and tests to implement the new return value
2018-08-28 16:44:08 +02:00
Vanshdeep Singh
8e97c753eb Problem: upsert-validator 'approve' command does not transfer vote to election public key (#2480)
Solution: Transfer vote to the election public key; generalize implemenation to handle election txn type

* Problem: Upsert valdiator 'new' doesn't accept public in base64 format

Solution: Tendermint stores all keys in base64 format so it would suitable to
abandon base58 encoding in favour of base64 encoding

* Problem: Not test for invalid execution of upsert-validator 'new'

Solution: Write tests to when invalid power or private key path has been supplied

* Problem: Exceptions are not informational when executing upsert-validator

Solution: generate error logs or print statement indicating success
2018-08-28 14:21:59 +02:00
Troy McConaghy
dfadbff60f Problem: All Tendermint docs moved (#2483)
Solution: Update all links to Tendermint docs
2018-08-28 11:13:59 +02:00
Troy McConaghy
d78ff75225 Problem: HTTP API docs wrong regarding the mode parameter (#2481)
Solution: Edit those docs to be accurate
2018-08-27 15:01:55 +02:00
vrde
41a2687b9b Problem: websocket fails with ELECTION transaction (#2482)
Solution: have a more general approach to process transaction types. If
a transaction does *not* contain `asset.id`, then the `id` of the
`asset` is the `id` of the transaction.
2018-08-27 15:00:02 +02:00
codegeschrei
6fdcaf44a7 Problem: we have unused and outdated fixtures (#2476)
* Problem: we have unused and outdated fixtures
Solution: clean up fixtures and tests accordingly
2018-08-27 09:48:20 +02:00
z-bowen
d337670e43 Problem: Docs needed to be aligned for changed return value format in upsert-validator show
Solution: Updated the docs
2018-08-24 14:30:17 +02:00
z-bowen
a48e6b7046 Problem: Wrong return value format for upsert-validator show
Solution: Changed the formating to align with BEP-21
2018-08-24 14:29:09 +02:00
z-bowen
b3a0c13da1 Problem: No test covering upsert-validator show
Solution: Wrote a test. Also changed validator node_ids to include the name of the test they're part of, which should prevent `DuplicateTransaction` collisions during testing.
2018-08-24 14:18:54 +02:00
z-bowen
6ca97bd0e5 Merge branch 'master' into create-dynamic-upsert-validator-commands 2018-08-24 10:04:56 +02:00
z-bowen
67d5d8d379 Merge branch 'master' of github.com:bigchaindb/bigchaindb 2018-08-24 09:58:10 +02:00
codegeschrei
d31ab9fb40 Problem: There is no way to vote for an election (#2458)
* Problem: `run_upsert_validator_approve` was getting the voting power in a convoluted way

Solution: Changed it to get the voting power from the election outputs

* Problem: `run_upsert_validator_approve` casts votes for *all* voters, not just the user calling the command

Solution: Filter vote txs by the users public key

* Problem: Docs needed a more specific description of how to input the path to the private-key file

Solution: Changed the wording a bit
2018-08-24 09:52:00 +02:00
Troy McConaghy
a16d561f54
Add link to the Java driver in Contributing docs (#2478) 2018-08-23 15:17:05 +02:00
codegeschrei
e2aafb9cf9 Problem: there is a new version of the python driver (#2477)
Solution: update the Dockerfile for acceptance tests
2018-08-23 14:49:04 +02:00
Troy McConaghy
045136f9a6 Problem: Not clear that simple-network-setup (old name) is the analog of Kubernetes Deployment template (#2475)
Solution: Rename it the "Simple Deployment Template" & fix all refs
2018-08-23 09:44:12 +02:00
z-bowen
e5a4cf9a87 Merge branch 'master' of github.com:bigchaindb/bigchaindb 2018-08-22 18:16:53 +02:00
codegeschrei
90f2fdfc23 Problem: several tests are skipped (#2452)
* Problem: several tests are skipped
Solution: activate or remove tests

* Problem: store_transaction is deprecated
Solution: replace it with store_bulk_transaction

* Problem: we don't test the transaction split
Solution: undelete `test_store_transaction`

* Problem: failing tests
Solution: merge master and change deprecated store_transaction
2018-08-22 10:48:43 +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
acc60bcce1 Problem: 'backlog' still referenced by some code & comments (#2474)
Solution: Remove all references to 'backlog'.
Also make the tuple of TABLES common to all backend databases.
2018-08-21 10:27:25 +02:00
Troy McConaghy
4815e75855 Problem: People reading HTTP API docs not told about the option to query MongoDB directly (#2463)
Solution: Tell them
2018-08-21 10:26:39 +02:00
z-bowen
fa3a8ddb2c Merge branch 'master' of github.com:bigchaindb/bigchaindb 2018-08-20 17:09:49 +02:00
Vanshdeep Singh
01dba7e883 Problem: Cannot conclude validator election (#2445)
Solution: Gather votes and conclude election when supermajority is achieved
2018-08-20 16:57:32 +02:00
Troy McConaghy
a3dce723be
Problem: Config settings docs missing some configs & inconsistent (#2461)
* Problem: Config settings docs missing some configs & inconsistent

Solution: Document some undocumented config settings and make the config settings docs page more consistent

* Problem: No docs about how config setting env var name determined

Solution: Explain and show the relationship between the config-file name and the environment variable name of config settings
2018-08-20 09:34:55 +02:00
Troy McConaghy
bd49a3804f
Problem: Docs say "BigchainDB cluster" but IRL we say "BigchainDB network" (#2471)
Solution: Edit the docs to say "BigchainDB network" instead
2018-08-17 16:04:58 +02:00
Troy McConaghy
423820bcda
Problem: simple-network-setup page getting long (#2464)
Solution: Start refactoring it into a new section
2018-08-17 14:19:58 +02:00
vrde
0142e98dba Problem: Rapid JSON is outdated and slow (#2470)
Solution: Use the last version of Rapid JSON.
2018-08-17 14:08:49 +02:00
z-bowen
0a285edf1a Merge branch 'master' of github.com:bigchaindb/bigchaindb 2018-08-17 11:27:36 +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
z-bowen
645f26c1aa Merge branch 'master' of github.com:bigchaindb/bigchaindb 2018-08-15 11:53:57 +02:00
z-bowen
4d3f194e1e Problem: Needed documentation for upsert-validator show
Solution: Wrote an entry for the docs
2018-08-14 15:24:53 +02:00