diff --git a/bigchaindb/tendermint/lib.py b/bigchaindb/tendermint/lib.py index ed7aec15..5e238c94 100644 --- a/bigchaindb/tendermint/lib.py +++ b/bigchaindb/tendermint/lib.py @@ -254,10 +254,10 @@ class BigchainDB(object): def get_transaction(self, transaction_id, include_status=False): transaction = backend.query.get_transaction(self.connection, transaction_id) - asset = backend.query.get_asset(self.connection, transaction_id) - metadata = backend.query.get_metadata(self.connection, [transaction_id]) if transaction: + asset = backend.query.get_asset(self.connection, transaction_id) + metadata = backend.query.get_metadata(self.connection, [transaction_id]) if asset: transaction['asset'] = asset diff --git a/docs/root/source/smart-contracts.rst b/docs/root/source/smart-contracts.rst index 91b01b3b..b031f2f2 100644 --- a/docs/root/source/smart-contracts.rst +++ b/docs/root/source/smart-contracts.rst @@ -3,7 +3,7 @@ BigchainDB and Smart Contracts One can store the source code of any smart contract (i.e. a computer program) in BigchainDB, but BigchainDB won't run arbitrary smart contracts. -BigchainDB will run the subset of smart contracts expressible using `Crypto-Conditions `_. Crypto-conditions are part of the `Interledger Protocol `_. +BigchainDB will run the subset of smart contracts expressible using `Crypto-Conditions `_. The owners of an asset can impose conditions on it that must be met for the asset to be transferred to new owners. Examples of possible conditions (crypto-conditions) include: diff --git a/docs/root/source/transaction-concepts.md b/docs/root/source/transaction-concepts.md index 18c2d3b7..6a3b183d 100644 --- a/docs/root/source/transaction-concepts.md +++ b/docs/root/source/transaction-concepts.md @@ -27,9 +27,8 @@ and the other output might have 15 oak trees for another set of owners. Each output also has an associated condition: the condition that must be met (by a TRANSFER transaction) to transfer/spend the output. -BigchainDB supports a variety of conditions, -a subset of the [Interledger Protocol (ILP)](https://interledger.org/) -crypto-conditions. For details, see +BigchainDB supports a variety of conditions. +For details, see the section titled **Transaction Components: Conditions** in the relevant [BigchainDB Transactions Spec](https://github.com/bigchaindb/BEPs/tree/master/tx-specs/). diff --git a/docs/server/source/simple-network-setup.md b/docs/server/source/simple-network-setup.md index 752b39ba..dc13dd43 100644 --- a/docs/server/source/simple-network-setup.md +++ b/docs/server/source/simple-network-setup.md @@ -244,6 +244,19 @@ If you followed the recommended approach and created startup scripts for Bigchai If you followed the above instructions, then your node should be publicly-accessible with BigchainDB Root URL `http://hostname:9984` (where hostname is something like `bdb7.canada.vmsareus.net` or `17.122.200.76`). That is, anyone can interact with your node using the [BigchainDB HTTP API](http-client-server-api.html) exposed at that address. The most common way to do that is to use one of the [BigchainDB Drivers](./drivers-clients/index.html). +## Troubleshooting + +To check which nodes your node is connected to (via Tendermint protocols), do: + +```text +# if you don't jq installed, then install it +sudo apt install jq +# then do +curl -s localhost:26657/net_info | jq ".result.peers[].node_info | {id, listen_addr, moniker}" +``` + +Tendermint has other endpoints besides `/net_info`: see [the Tendermint RPC docs](https://tendermint.github.io/slate/?shell#introduction). + ## Refreshing Your Node If you want to refresh your node back to a fresh empty state, then your best bet is to terminate it and deploy a new virtual machine, but if that's not an option, then you can: diff --git a/pkg/configuration/roles/bigchaindb/tasks/stop.yml b/pkg/configuration/roles/bigchaindb/tasks/stop.yml index 016a06fe..8c518690 100644 --- a/pkg/configuration/roles/bigchaindb/tasks/stop.yml +++ b/pkg/configuration/roles/bigchaindb/tasks/stop.yml @@ -13,6 +13,7 @@ - name: Get Running BigchainDB Process(es) shell: "ps aux | grep \"[b]igchaindb\" | awk '{print $2}'" register: bdb_ps + ignore_errors: yes when: stack_type|lower == "local" tags: [bigchaindb] @@ -30,4 +31,4 @@ - gunicorn ignore_errors: yes when: stack_type|lower == "local" - tags: [bigchaindb] \ No newline at end of file + tags: [bigchaindb] diff --git a/pkg/configuration/roles/mongodb/defaults/main.yml b/pkg/configuration/roles/mongodb/defaults/main.yml index 612b96b1..e198d632 100644 --- a/pkg/configuration/roles/mongodb/defaults/main.yml +++ b/pkg/configuration/roles/mongodb/defaults/main.yml @@ -8,7 +8,8 @@ distribution_major: "{{ ansible_distribution_major_version }}" server_arch: "amd64,arm64" # MongoDB Repos -mongodb_apt_repo: "deb [arch={{ server_arch }}] http://repo.mongodb.org/apt/{{ distribution_name }} {{ distribution_codename }}/{{ mongodb_package }}/{{ mongo_version }} {{'main' if ansible_distribution == 'debian' else 'multiverse'}}" +mongodb_apt_repo: "deb [arch={{ server_arch }}] http://repo.mongodb.org/apt/{{ distribution_name }} {{ distribution_codename }}/{{ mongodb_package }}/{{ mongo_version }} multiverse" +mongodb_deb_repo: "deb http://repo.mongodb.org/apt/{{ distribution_name }} {{ distribution_codename }}/{{ mongodb_package }}/{{ mongo_version }} main" mongodb_yum_base_url: "https://repo.mongodb.org/yum/{{ ansible_os_family|lower }}/$releasever/{{ mongodb_package }}/{{ mongo_version }}/{{ ansible_architecture }}" mongodb_dnf_base_url: "https://repo.mongodb.org/yum/{{ ansible_os_family|lower }}/7/{{ mongodb_package }}/{{ mongo_version }}/{{ ansible_architecture }}" diff --git a/pkg/configuration/roles/mongodb/tasks/debian.yml b/pkg/configuration/roles/mongodb/tasks/debian.yml index 86dab821..e2e38855 100644 --- a/pkg/configuration/roles/mongodb/tasks/debian.yml +++ b/pkg/configuration/roles/mongodb/tasks/debian.yml @@ -22,6 +22,15 @@ repo: "{{ mongodb_apt_repo }}" state: present update_cache: no + when: distribution_name == "ubuntu" + tags: [mongodb] + +- name: Add MongoDB repo and update cache | deb + apt_repository: + repo: "{{ mongodb_deb_repo }}" + state: present + update_cache: no + when: distribution_name == "debian" tags: [mongodb] - name: Install MongoDB | apt @@ -31,4 +40,4 @@ update_cache: yes with_items: - "{{ mongodb_package }}" - tags: [mongodb] \ No newline at end of file + tags: [mongodb]