Skip to content

Problem: Tendermint configuration not present in BigchainDB config#2342

Merged
muawiakh merged 10 commits intobigchaindb:masterfrom
muawiakh:update-tm-config
Jun 29, 2018
Merged

Problem: Tendermint configuration not present in BigchainDB config#2342
muawiakh merged 10 commits intobigchaindb:masterfrom
muawiakh:update-tm-config

Conversation

@muawiakh
Copy link
Copy Markdown
Contributor

@muawiakh muawiakh commented Jun 8, 2018

Solution

Add Tendermint host, port to BigchainDB configuration

Issues Resolved

Resolves #2255

@muawiakh muawiakh requested review from kansi, ldmberman and ttmc June 8, 2018 13:44
Copy link
Copy Markdown
Contributor

@ttmc ttmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also mention these new configuration settings in the docs, in bigchaindb/docs/server/source/server-reference/configuration.md

@ldmberman
Copy link
Copy Markdown
Contributor

As far as I can see, the config is not taken into account when the Tendermint endpoint is buillt in tendermint/lib.py.

Copy link
Copy Markdown
Contributor

@ttmc ttmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There doesn't seem to be any code that uses conf['tendermint']['host'] or port. Maybe I'm missing something.

"""return if transaction is in backlog"""

def __init__(self, connection=None):
def __init__(self, tendermint_host=None, tendermint_port=None, connection=None):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this, the user can use the config file .bigchaindb or the environment variables.

self.endpoint = 'http://{}:{}/'.format(self.tendermint_host, self.tendermint_port)
self.mode_list = ('broadcast_tx_async',
'broadcast_tx_sync',
'broadcast_tx_commit')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code has been added to the old core.py. As a part of the cleanup, we decided not to add any code to the older files. So, it would be better to move this to tendermint/lib.py


**Default values**

If (no environment variables were set and there's no local config file), or you used `bigchaindb -y configure localmongodb` to create a default local config file for a `localmongodb` backend, then the defaults will be:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line about how the environment variables, config file and default values are used to determine the run-time value of each configuration setting isn't needed here because it's already explained at the top of this page.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you like, you could add a short line to every subsection about default values, saying something like, "To understand how the default value of a setting affects the run-time value of a setting, see the top of this page."

@ttmc
Copy link
Copy Markdown
Contributor

ttmc commented Jun 12, 2018

I approved because GitHub was still showing my review status with the red X even though it was supposed to be showing the speech balloon to indicate that I'd made comments. It should still be showing the speech balloon, but I don't know how to make that happen without making a new comment. GitHub!

@muawiakh
Copy link
Copy Markdown
Contributor Author

Docs server are failing, will be fixed by #2360

@codecov-io
Copy link
Copy Markdown

codecov-io commented Jun 29, 2018

Codecov Report

Merging #2342 into master will decrease coverage by 0.08%.
The diff coverage is 81.81%.

@@            Coverage Diff             @@
##           master    #2342      +/-   ##
==========================================
- Coverage   83.07%   82.98%   -0.09%     
==========================================
  Files          38       38              
  Lines        2245     2251       +6     
==========================================
+ Hits         1865     1868       +3     
- Misses        380      383       +3

@muawiakh muawiakh merged commit 1bad851 into bigchaindb:master Jun 29, 2018
z-bowen added a commit to z-bowen/bigchaindb that referenced this pull request Jun 29, 2018
Solution: Merged and repushed
z-bowen added a commit to z-bowen/bigchaindb that referenced this pull request Jun 29, 2018
Solution: Merge changes into Master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants