Compare commits

...

60 Commits

Author SHA1 Message Date
yongtheskill
3c89d306ef
Capitalisation mistake (#2734)
Changed "BigchaindB" to "BigchainDB"
2022-05-17 00:30:19 +02:00
Jürgen Eckel
ad83ef1d35
fixed chardet version to 3.0.4 (#2736)
* fixed chardet version to 3.0.4

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* defined working version of jinga2

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* removed obsolete doc building commands

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>

* defined werkzeug version explicitly

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
2022-05-17 00:29:54 +02:00
Tim Gates
0961aa6b26
docs: fix simple typo, neeeded -> needed (#2717)
There is a small typo in bigchaindb/lib.py, tests/tendermint/test_lib.py.

Should read `needed` rather than `neeeded`.
2021-12-06 14:11:29 +01:00
zzappie
6a6a19207c
[WIP] Maintenance release (#2728)
* Dependencies update

Signed-off-by: David Dashyan <mail@davie.li>

* Dockerfile-dev: update python version + remove system pynacl

Signed-off-by: David Dashyan <mail@davie.li>

* Set dummy_transaction fixture scope to "session"

Signed-off-by: David Dashyan <mail@davie.li>

* Add 3.7 and 3.8 python tests

* setup.py: fix version typo
2021-12-06 14:09:51 +01:00
David Dashyan
caf31647e0 Update priv validator format in k8s to support tm v0.28.0+
Signed-off-by: David Dashyan <mail@davie.li>
2020-09-29 12:17:46 +00:00
David Dashyan
8630e74f77 Remove @asyncio.coroutine decorators
Signed-off-by: David Dashyan <mail@davie.li>
2020-09-29 12:17:46 +00:00
David Dashyan
5166fa6b46 Update changelog
Signed-off-by: David Dashyan <mail@davie.li>
2020-09-29 12:17:46 +00:00
David Dashyan
22cf5f26c3 chmod +x tm_config_gen tm_start
Signed-off-by: David Dashyan <mail@davie.li>
2020-09-29 12:17:46 +00:00
David Dashyan
62ae66fef7 Update priv validator format in stack.sh to support tm v0.28.0+
Signed-off-by: David Dashyan <mail@davie.li>
2020-09-29 12:17:46 +00:00
Andrijan Ostrun
d77ab60651 Problem: Fixed stack.sh & tendermint's start.yml script (#2708)
* Fixed tendermint start task - fixed parsing of priv_validatorX.json files

* Fixed tendermint start task - fixed parsing of priv_validatorX.json files

Signed-off-by: Andrijan Ostrun <andrijan.ostrun@gmail.com>

Co-authored-by: Andrijan Ostrun <andrijan.ostrun@suprabit.eu>
2020-09-29 12:17:46 +00:00
David Dashyan
af2517b2ae Update k8s container versions
Signed-off-by: David Dashyan <mail@davie.li>
2020-09-29 12:17:46 +00:00
David Dashyan
8895d50f5b Version bump
Signed-off-by: David Dashyan <mail@davie.li>
2020-09-29 12:17:46 +00:00
David Dashyan
40a92756f9 Update Dockerfile-alpine and losen 'packaging' version
Signed-off-by: David Dashyan <mail@davie.li>
2020-09-29 12:17:46 +00:00
David Dashyan
41f7534f3a Update dependencies and fix versions
Signed-off-by: David Dashyan <mail@davie.li>
2020-09-29 12:17:46 +00:00
David Dashyan
26cb560bb1 Tidy up setup.py 2020-09-29 12:17:46 +00:00
David Dashyan
2b0babb95b Update email addresses
Signed-off-by: David Dashyan <mail@davie.li>
2020-09-29 12:17:46 +00:00
Amartya Gaur
b272fb342a
owners_before error message correction (#2698)
* owners_before error message correction
Signed-off-by: Amartya Gaur amarkaushik1999@gmail.com

* Changed some formatting
Signed-off-by: Amartya Gaur amarkaushik1999@gmail.com

* Changes essential to pass tests
Signed-off-by: Amartya Gaur amarkaushik1999@gmail.com

* Resolve conflicts with master
Signed-off-by: Amartya Gaur amarkaushik1999@gmail.com
2020-08-12 12:32:33 +00:00
Karthikeyan Singaravelan
e86666b6b3
Import ABC from collections.abc (#2704)
Signed-off-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
2020-07-22 08:51:58 +00:00
David Dashyan
d9dfa98819
Flask update (#2700)
* Flask security update

The Pallets Project Flask before 1.0 is affected by: unexpected memory
usage. The impact is: denial of service.
The attack vector is: crafted encoded JSON data. The fixed version is:
1. NOTE: this may overlap CVE-2018-1000656.

Signed-off-by: David Dashyan <mail@davie.li>

* Make send_naughty_tx error regex more robust

Signed-off-by: David Dashyan <mail@davie.li>
2020-06-02 14:36:56 +07:00
lana-shanghai
4a008e51e3
[WIP] Documentation re-org (#2694)
* 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>
2020-05-18 20:22:26 +07:00
David Dashyan
2accca9ff1
Fix Docker-all-in-one Tendermint download link (#2692)
Resolves issue #2691

Signed-off-by: David Dashyan <mail@davie.li>
2020-05-13 16:13:29 +07:00
David Dashyan
186cd87444
Updated bigchaindb-abci (#2689)
* Updated bigchaindb-abci

Reason: gevent API change breaks BigchainDB installation
Signed-off-by: David Dashyan <mail@davie.li>

* Version bump

Signed-off-by: David Dashyan <mail@davie.li>

* Updated changelog
2020-04-14 23:59:51 +02:00
David Dashyan
9e99c024d3
Replace headers (#2683)
Signed-off-by: David Dashyan <mail@davie.li>
2020-04-06 11:52:18 +02:00
David Dashyan
09391351a4
Version bump to 2.2.0 (#2682)
Signed-off-by: David Dashyan <mail@davie.li>
2020-02-20 16:30:37 +01:00
Zac Hatfield-Dodds
f795301f90 Update Hypothesis (#2678)
Fixes #1738

Signed-off-by: Zac Hatfield-Dodds <zac@zhd.dev>
2020-01-26 22:18:40 +03:00
David Dashyan
7df59994e9 Tendermint v0.22.8 backward compatibility (#2677)
Problem statement:

BigchainDB v2.0.0b9 has been around for quite a while. Recently we have updated
Tendermint supported version to v0.31.5 which has incompatible blockchain.
Despite the fact that we have defined instructions on chain migration, no one
expected to migrate to incompatible chain within patch version range. So there
is a demand for Tendermint v0.22.8 compatibility among BigchainDB users.

Work has been done:

bigchaindb-abci package was upgraded to support multiple API versions.
New configuration field stating tendermint version was added.

Signed-off-by: David Dashyan <mail@davie.li>
2020-01-23 23:17:27 +01:00
Yuliya Palamarchuk
86472157db Fixed not being able to connect to mongo (#2674)
From version 3.6+ mongodb by default binds only to localhost (127.0.0.1) IP. That can be checked with "netstat -tulpn | grep LISTEN" command in container. It will return "127.0.0.1:27017 | 0.0.0.0:* | LISTEN | 15/mongod" for mongod. That causes inability to connect to running mongo from host machine. Proposed change allows mongo to bind to container network interface, thus allowing connections from host machine.
2019-12-02 15:23:10 +03:00
Jürgen Eckel
b54c31539f
Transcation API extension: last_tx parameter (#2667)
* added last_tx switch to the TX get query to only get the latest TX for a given asset.
* extended test case to contain last_tx field
* Add last_tx option in query module
* Fix natural descending cursor sort argument
2019-11-06 23:23:14 +01:00
David Dashyan
ecd6e9cc46 Update issue templates (#2670) 2019-10-28 20:30:14 +01:00
David Dashyan
f12d44ff82 Fix bigchaidb-tendermint version mismatch 2019-10-15 15:24:37 +03:00
Jürgen Eckel
9bcefdf3e2
Tendermint upgrade (#2666)
* migrated to tendermint 0.35.1

* increased bigchaindb_abci version

* fixed API adjustments due to Tendermint upgrade

Signed-off-by: Juergen Eckel <juergen@riddleandcode.com>

* migrated to bigchaindb-abci == py-abci 0.7.1

Signed-off-by: Juergen Eckel <juergen@riddleandcode.com>
2019-10-07 16:32:35 +02:00
Giuseppe Raveduto
16a9888d1e using alpine v3.9 (#2658)
Since version 3.10, Alpine linux has removed mongodb from the available packages.
Using v3.9 it's still possible to build the all-in-one configuration using the provided Dockerfile.

Signed-off-by: Giuseppe Raveduto <giuseppe.raveduto@eng.it>
2019-09-30 09:32:01 +02:00
Simon Pfeifhofer
645d457b7b Add quotes to env-variables (#2662)
Signed-off-by: Simon Pfeifhofer <simon.pfeifhofer@gmail.com>
2019-09-26 13:10:09 +02:00
Nikita Chernyi
2975c372c8 Remove pysha3 for python >= 3.6 (#2652)
* Init pypy support

* Fixed setup
2019-09-25 22:22:51 +02:00
Troy McConaghy
df23bec320 Add a docs link to the ANSI C driver (#2650)
Signed-off-by: Troy McConaghy <troy@bigchaindb.com>
2019-09-25 22:20:02 +02:00
Mike Klimontov
c801c833fc Add unit transaction_mode_types (#2648)
Signed-off-by: Mike Klimontov <klimontovm@gmail.com>
2019-06-12 16:28:24 +02:00
Troy McConaghy
a5452169b9 pip 19+ is now needed to install bigchaindb (#2645)
Signed-off-by: Troy McConaghy <troy@bigchaindb.com>
2019-05-26 22:11:41 +02:00
Troy McConaghy
a24c0f429b Note the new C# driver in the server docs (#2644)
Signed-off-by: Troy McConaghy <troy@bigchaindb.com>
2019-05-20 21:11:00 +02:00
Troy McConaghy
835fdfcf59 Updates for the switch from BEP-16 to BEP-24 (#2641)
Signed-off-by: Troy McConaghy <troy@bigchaindb.com>
2019-04-15 23:47:56 +02:00
manjush08
20a59a9640 Problem: No volume mounted to store tendermint data (#2637)
* Fix: mount volume to store tendermint data

* Fix: mount volume to store tendermint data
2019-03-14 13:38:19 +01:00
manjush08
f0dc9986aa Update main.yml (#2636) 2019-03-13 14:33:36 +01:00
Chuseuiti
6bed80cff3 Restart on sporadic failures on BDB container#2624 (#2634)
To account for sporadic failures on bigchaindb server and container stop, it would be beneficial to include in docker-compose the ability for the containers to restart on failure or docker daemon restart. Issue #2624
2019-02-26 09:57:38 +01:00
Troy McConaghy
7781f5aae8
Remove --no-cache-dir from all pip install cmds (#2628)
because it broke in pip 19
2019-01-29 13:51:29 +01:00
Troy McConaghy
eb2f8ddc73
Sphinx changed how it handles rel links in .md (#2627)
* Sphinx changed how it handles rel links in .md

* Remove all --process-dependency-links everywhere
2019-01-24 14:21:21 +01:00
Troy McConaghy
d8f51d8999
Replace rel link with absolute URL 2019-01-24 13:57:44 +01:00
Troy McConaghy
3b72181b3d
Fix a link in the docs 2019-01-13 14:56:03 +01:00
Troy McConaghy
ca012ae8b6
Update pyyaml, part 2 2019-01-13 14:51:16 +01:00
Troy McConaghy
1a9c5d47e6
Update pyyaml, part 1 2019-01-13 14:50:33 +01:00
Kuro1
edcd59e235 Translate the readme to Chinese (#2615) 2018-12-24 15:51:24 +01:00
Troy McConaghy
11817b9590
Change email to devs@bigchaindb.com (#2612)
* Change email to devs@bigchaindb.com

* Update Travis build badge URL

* Update some other email addresses
2018-12-10 18:10:58 +01:00
Troy McConaghy
d9725d483b
Revised docs based on tips from user (#2611) 2018-12-02 22:07:31 +01:00
xunconnectedx
f0df5bd2e0 corrected the syntax for which an error occurred in the execution stack.sh (#2609) 2018-11-29 11:59:45 +01:00
Troy McConaghy
f8191b0d8e
Last commit before v2.0.0b9 (#2608) 2018-11-27 19:50:05 +01:00
Troy McConaghy
dcfe23f292
Account for values that are arrays/lists (#2607)
when checking if keys are valid.
2018-11-25 20:24:03 +01:00
Troy McConaghy
5de2fef284
Problem: "language" values are not being checked in metadata (#2606)
Check "language" values in metadata too, not just in `asset.data`.
2018-11-25 19:11:35 +01:00
gamjapark
a62cc4e101 Translated docs to Korean (#2603)
Add Korean translations of all the BigchainDB root docs
2018-11-22 09:28:11 +01:00
Troy McConaghy
288c2ecd2a
In NGINX conf files under k8s/: Drop TLSv1 & TLSv1.1, enable TLSv1.3 (#2601)
because TLS v1 and v1.1 are old
2018-11-17 09:23:08 +01:00
Troy McConaghy
fe467fddbd
nginx.conf: Drop TLSv1 & TLSv1.1, enable TLSv1.3
Because TLS v1 and v1.1 are old. See http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_protocols
2018-11-17 09:08:08 +01:00
Troy McConaghy
0b935c09c7
Add extra step to RELEASE_PROCESS.md
because readthedocs.org has gotten even more arcane
2018-11-09 20:21:06 +01:00
Salah Alsasa
1bd5845a83 Fix links in network setup readme file (#2600)
* Fix links in network setup readme file

* Update docs/server/source/simple-deployment-template/network-setup.md

Co-Authored-By: sd189 <salahalsasa@gmail.com>
2018-11-08 11:16:23 +01:00
430 changed files with 3250 additions and 2776 deletions

View File

@ -1,5 +1,6 @@
#!/bin/bash
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,5 +1,6 @@
#!/bin/bash
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,5 +1,6 @@
#!/bin/bash
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,5 +1,6 @@
#!/bin/bash
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,5 +1,6 @@
#!/bin/bash
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
@ -12,9 +13,6 @@ if [[ -n ${TOXENV} ]]; then
pip install --upgrade tox
elif [[ ${BIGCHAINDB_CI_ABCI} == 'enable' ]]; then
docker-compose build --no-cache --build-arg abci_status=enable bigchaindb
elif [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then
docker-compose build --build-arg python_version=3.5 --no-cache bigchaindb
pip install --upgrade codecov
elif [[ $BIGCHAINDB_INTEGRATION_TEST == 'enable' ]]; then
docker-compose build bigchaindb python-driver
else

View File

@ -1,5 +1,6 @@
#!/bin/bash
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,5 +1,6 @@
<!---
Copyright BigchainDB GmbH and BigchainDB contributors
Copyright © 2020 Interplanetary Database Association e.V.,
BigchainDB and IPDB software contributors.
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
Code is Apache-2.0 and docs are CC-BY-4.0
--->

30
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,30 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
**Expected behavior**
A clear and concise description of what you expected to happen.
**Logs or terminal output**
If applicable, add add textual content to help explain your problem.
**Desktop (please complete the following information):**
- Distribution: [e.g. Ubuntu 18.04]
- Bigchaindb version:
- Tendermint version:
- Mongodb version:
- Python full version: [e.g. Python 3.6.6]
**Additional context**
Add any other context about the problem here.

2
.gitignore vendored
View File

@ -95,3 +95,5 @@ network/*/data
# Docs that are fetched at build time
docs/contributing/source/cross-project-policies/*.md
.DS_Store

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,10 +1,11 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020, 2021 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
sudo: required
dist: trusty
dist: focal
services:
- docker
@ -13,26 +14,19 @@ language: python
cache: pip
python:
- 3.5
- 3.6
- 3.7
- 3.8
env:
global:
- DOCKER_COMPOSE_VERSION=1.19.0
- DOCKER_COMPOSE_VERSION=1.29.2
matrix:
- TOXENV=flake8
- TOXENV=docsroot
- TOXENV=docsserver
matrix:
fast_finish: true
exclude:
- python: 3.5
env: TOXENV=flake8
- python: 3.5
env: TOXENV=docsroot
- python: 3.5
env: TOXENV=docsserver
include:
- python: 3.6
env:
@ -46,6 +40,31 @@ matrix:
- python: 3.6
env:
- BIGCHAINDB_ACCEPTANCE_TEST=enable
- python: 3.7
env:
- BIGCHAINDB_DATABASE_BACKEND=localmongodb
- BIGCHAINDB_DATABASE_SSL=
- python: 3.7
env:
- BIGCHAINDB_DATABASE_BACKEND=localmongodb
- BIGCHAINDB_DATABASE_SSL=
- BIGCHAINDB_CI_ABCI=enable
- python: 3.7
env:
- BIGCHAINDB_ACCEPTANCE_TEST=enable
- python: 3.8
env:
- BIGCHAINDB_DATABASE_BACKEND=localmongodb
- BIGCHAINDB_DATABASE_SSL=
- python: 3.8
env:
- BIGCHAINDB_DATABASE_BACKEND=localmongodb
- BIGCHAINDB_DATABASE_SSL=
- BIGCHAINDB_CI_ABCI=enable
- python: 3.8
env:
- BIGCHAINDB_ACCEPTANCE_TEST=enable
before_install: sudo .ci/travis-before-install.sh

View File

@ -1,5 +1,6 @@
<!---
Copyright BigchainDB GmbH and BigchainDB contributors
Copyright © 2020 Interplanetary Database Association e.V.,
BigchainDB and IPDB software contributors.
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
Code is Apache-2.0 and docs are CC-BY-4.0
--->
@ -24,6 +25,59 @@ For reference, the possible headings are:
* **Known Issues**
* **Notes**
## [2.2.2] - 2020-08-12
### Security
Several dependencies updated including Flask that had vulnerability.
### Fixed
* Updated priv_validator key format in stack script (#2707)
### External Contributors
* @aostrun - [#2708](https://github.com/bigchaindb/bigchaindb/pull/2708)
## [2.2.1] - 2020-04-14
### Fixed
Gevent library API update is incompatible with bigchaindb-abci 1.0.1 version.
Updated bigchaindb-abci.
## [2.2.0] - 2020-02-20
### Added
Support for multiple ABCI versions.
## [2.1.0] - 2019-11-06
### Added
Option for last transaction retrieval added.
## [2.0] - 2019-09-26
### Changed
Migrated from Tendermint 0.22.8 to 0.31.5.
## [2.0 Beta 9] - 2018-11-27
### Changed
Removed support for TLSv1 and TLSv1.1 in all NGINX config files. Kept support for TLSv1.2 and added support for TLSv1.3. [Pull Request #2601](https://github.com/bigchaindb/bigchaindb/pull/2601)
### Fixed
Fixed two issues with schema validation. Pull requests [#2606](https://github.com/bigchaindb/bigchaindb/pull/2606) & [#2607](https://github.com/bigchaindb/bigchaindb/pull/2607)
### External Contributors
[@gamjapark](https://github.com/gamjapark) and team translated all the [BigchainDB root docs](https://docs.bigchaindb.com/en/latest/korean/index.html) into Korean. [Pull Request #2603](https://github.com/bigchaindb/bigchaindb/pull/2603)
## [2.0 Beta 8] - 2018-11-03
### Changed

View File

@ -1,5 +1,6 @@
<!---
Copyright BigchainDB GmbH and BigchainDB contributors
Copyright © 2020 Interplanetary Database Association e.V.,
BigchainDB and IPDB software contributors.
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
Code is Apache-2.0 and docs are CC-BY-4.0
--->
@ -41,7 +42,7 @@ This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.
Instances of abusive, harassing, or otherwise unacceptable behavior directed at yourself or another community member may be
reported by contacting a project maintainer at [conduct@bigchaindb.com](mailto:conduct@bigchaindb.com). All
reported by contacting a project maintainer at [contact@bigchaindb.com](mailto:contact@bigchaindb.com). All
complaints will be reviewed and investigated and will result in a response that
is appropriate to the circumstances. Maintainers are
obligated to maintain confidentiality with regard to the reporter of an

View File

@ -1,12 +1,12 @@
FROM python:3.6
LABEL maintainer "dev@bigchaindb.com"
LABEL maintainer "contact@ipdb.global"
RUN mkdir -p /usr/src/app
COPY . /usr/src/app/
WORKDIR /usr/src/app
RUN apt-get -qq update \
&& apt-get -y upgrade \
&& apt-get install -y jq \
&& pip install --no-cache-dir --process-dependency-links . \
&& pip install . \
&& apt-get autoremove \
&& apt-get clean

View File

@ -1,7 +1,7 @@
FROM alpine:latest
LABEL maintainer "dev@bigchaindb.com"
FROM alpine:3.9
LABEL maintainer "contact@ipdb.global"
ARG TM_VERSION=0.22.8
ARG TM_VERSION=v0.31.5
RUN mkdir -p /usr/src/app
ENV HOME /root
COPY . /usr/src/app/
@ -13,7 +13,7 @@ RUN apk --update add sudo bash \
libffi-dev openssl-dev build-base jq \
&& apk add --no-cache libstdc++ dpkg gnupg \
&& pip3 install --upgrade pip cffi \
&& pip install --no-cache-dir --process-dependency-links -e . \
&& pip install -e . \
&& apk del build-dependencies \
&& rm -f /var/cache/apk/*
@ -21,7 +21,7 @@ RUN apk --update add sudo bash \
RUN apk --update add mongodb monit
# Install Tendermint
RUN wget https://github.com/tendermint/tendermint/releases/download/v${TM_VERSION}/tendermint_${TM_VERSION}_linux_amd64.zip \
RUN wget https://github.com/tendermint/tendermint/releases/download/${TM_VERSION}/tendermint_${TM_VERSION}_linux_amd64.zip \
&& unzip tendermint_${TM_VERSION}_linux_amd64.zip \
&& mv tendermint /usr/local/bin/ \
&& rm tendermint_${TM_VERSION}_linux_amd64.zip

View File

@ -1,15 +1,15 @@
FROM alpine:latest
LABEL maintainer "dev@bigchaindb.com"
LABEL maintainer "contact@ipdb.global"
RUN mkdir -p /usr/src/app
COPY . /usr/src/app/
WORKDIR /usr/src/app
RUN apk --update add sudo \
&& apk --update add python3 openssl ca-certificates git\
&& apk --update add python3 py-pip openssl ca-certificates git\
&& apk --update add --virtual build-dependencies python3-dev \
libffi-dev openssl-dev build-base \
&& apk add --no-cache libstdc++ \
&& pip3 install --upgrade pip cffi \
&& pip install --no-cache-dir --process-dependency-links -e .[dev] \
&& pip install -e . \
&& apk del build-dependencies \
&& rm -f /var/cache/apk/*
# When developing with Python in a docker container, we are using PYTHONBUFFERED

View File

@ -1,11 +1,10 @@
ARG python_version=3.6
FROM python:${python_version}
LABEL maintainer "dev@bigchaindb.com"
LABEL maintainer "contact@ipdb.global"
RUN apt-get update \
&& apt-get install -y vim \
&& apt-get install -y git \
&& pip install -U pip \
&& pip install pynacl \
&& apt-get autoremove \
&& apt-get clean
@ -32,5 +31,5 @@ ENV BIGCHAINDB_CI_ABCI ${abci_status}
RUN mkdir -p /usr/src/app
COPY . /usr/src/app/
WORKDIR /usr/src/app
RUN pip install --no-cache-dir --process-dependency-links -e .[dev]
RUN bigchaindb -y configure
RUN pip install -e .[dev]
RUN bigchaindb -y configure

View File

@ -1,9 +0,0 @@
<!---
Copyright BigchainDB GmbH and BigchainDB contributors
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
Code is Apache-2.0 and docs are CC-BY-4.0
--->
# How to Handle External Pull Requests
See [BEP-16](https://github.com/bigchaindb/BEPs/tree/master/16).

View File

@ -2,10 +2,12 @@
## Copyrights
Except as noted in the **Exceptions** section below, for all code and documentation in this repository, BigchainDB GmbH ("We") either:
For all the code and documentation in this repository, the copyright is owned by one or more of the following:
1. owns the copyright, or
2. owns the right to sublicense it under any license (because all external contributors must agree to a Contributor License Agreement).
- BigchainDB GmbH
- A BigchainDB contributor who agreed to a BigchainDB Contributor License Agreement (CLA) with BigchainDB GmbH. (See [BEP-16](https://github.com/bigchaindb/BEPs/tree/master/16).)
- A BigchainDB contributor who signed off on the Developer Certificate of Origin (DCO) for all their contributions. (See [BEP-24](https://github.com/bigchaindb/BEPs/tree/master/24).)
- (Rarely, see the **Exceptions Section** below) A third pary who licensed the code in question under an open source license.
## Code Licenses

View File

@ -88,8 +88,6 @@ cov: check-deps ## Check code coverage and open the result in the browser
doc: check-deps ## Generate HTML documentation and open it in the browser
@$(DC) run --rm --no-deps bdocs make -C docs/root html
@$(DC) run --rm --no-deps bdocs make -C docs/server html
@$(DC) run --rm --no-deps bdocs make -C docs/contributing html
$(BROWSER) docs/root/build/html/index.html
doc-acceptance: check-deps ## Create documentation for acceptance tests

View File

@ -1,5 +1,6 @@
<!---
Copyright BigchainDB GmbH and BigchainDB contributors
Copyright © 2020 Interplanetary Database Association e.V.,
BigchainDB and IPDB software contributors.
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
Code is Apache-2.0 and docs are CC-BY-4.0
--->
@ -91,6 +92,6 @@ flake8 --max-line-length 119 bigchaindb/
## Writing and Running (Python) Tests
The content of this section was moved to [`bigchaindb/tests/README.md`](./tests/README.md).
The content of this section was moved to [`bigchaindb/tests/README.md`](https://github.com/bigchaindb/bigchaindb/blob/master/tests/README.md).
Note: We automatically run all tests on all pull requests (using Travis CI), so you should definitely run all tests locally before you submit a pull request. See the above-linked README file for instructions.

View File

@ -1,5 +1,6 @@
<!---
Copyright BigchainDB GmbH and BigchainDB contributors
Copyright © 2020 Interplanetary Database Association e.V.,
BigchainDB and IPDB software contributors.
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
Code is Apache-2.0 and docs are CC-BY-4.0
--->
@ -12,7 +13,7 @@ so show the latest GitHub release instead.
[![Codecov branch](https://img.shields.io/codecov/c/github/bigchaindb/bigchaindb/master.svg)](https://codecov.io/github/bigchaindb/bigchaindb?branch=master)
[![Latest release](https://img.shields.io/github/release/bigchaindb/bigchaindb/all.svg)](https://github.com/bigchaindb/bigchaindb/releases)
[![Status on PyPI](https://img.shields.io/pypi/status/bigchaindb.svg)](https://pypi.org/project/BigchainDB/)
[![Travis branch](https://img.shields.io/travis/bigchaindb/bigchaindb/master.svg)](https://travis-ci.org/bigchaindb/bigchaindb)
[![Travis branch](https://img.shields.io/travis/bigchaindb/bigchaindb/master.svg)](https://travis-ci.com/bigchaindb/bigchaindb)
[![Documentation Status](https://readthedocs.org/projects/bigchaindb-server/badge/?version=latest)](https://docs.bigchaindb.com/projects/server/en/latest/)
[![Join the chat at https://gitter.im/bigchaindb/bigchaindb](https://badges.gitter.im/bigchaindb/bigchaindb.svg)](https://gitter.im/bigchaindb/bigchaindb?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

77
README_cn.md Normal file
View File

@ -0,0 +1,77 @@
<!---
Copyright © 2020 Interplanetary Database Association e.V.,
BigchainDB and IPDB software contributors.
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
Code is Apache-2.0 and docs are CC-BY-4.0
--->
<!--- There is no shield to get the latest version
(including pre-release versions) from PyPI,
so show the latest GitHub release instead.
--->
[![Codecov branch](https://img.shields.io/codecov/c/github/bigchaindb/bigchaindb/master.svg)](https://codecov.io/github/bigchaindb/bigchaindb?branch=master)
[![Latest release](https://img.shields.io/github/release/bigchaindb/bigchaindb/all.svg)](https://github.com/bigchaindb/bigchaindb/releases)
[![Status on PyPI](https://img.shields.io/pypi/status/bigchaindb.svg)](https://pypi.org/project/BigchainDB/)
[![Travis branch](https://img.shields.io/travis/bigchaindb/bigchaindb/master.svg)](https://travis-ci.com/bigchaindb/bigchaindb)
[![Documentation Status](https://readthedocs.org/projects/bigchaindb-server/badge/?version=latest)](https://docs.bigchaindb.com/projects/server/en/latest/)
[![Join the chat at https://gitter.im/bigchaindb/bigchaindb](https://badges.gitter.im/bigchaindb/bigchaindb.svg)](https://gitter.im/bigchaindb/bigchaindb?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
# BigchainDB 服务器
BigchainDB 是区块链数据库. 这是 _BigchainDB 服务器_ 的仓库.
## 基础知识
* [尝试快速开始](https://docs.bigchaindb.com/projects/server/en/latest/quickstart.html)
* [阅读 BigchainDB 2.0 白皮书](https://www.bigchaindb.com/whitepaper/)
* [查阅漫游指南](https://www.bigchaindb.com/developers/guide/)
## 运行和测试 `master` 分支的 BigchainDB 服务器
运行和测试最新版本的 BigchainDB 服务器非常简单. 确认你有安装最新版本的 [Docker Compose](https://docs.docker.com/compose/install/). 当你准备好了, 打开一个终端并运行:
```text
git clone https://github.com/bigchaindb/bigchaindb.git
cd bigchaindb
make run
```
BigchainDB 应该可以通过 `http://localhost:9984/` 访问.
这里也有一些其他的命令你可以运行:
* `make start`: 通过源码和守护进程的方式运行 BigchainDB (通过 `make stop` 停止).
* `make stop`: 停止运行 BigchainDB.
* `make logs`: 附在日志上.
* `make test`: 运行所有单元和验收测试.
* `make test-unit-watch`: 运行所有测试并等待. 每次更改代码时都会再次运行测试.
* `make cov`: 检查代码覆盖率并在浏览器中打开结果.
* `make doc`: 生成 HTML 文档并在浏览器中打开它.
* `make clean`: 删除所有构建, 测试, 覆盖和 Python 生成物.
* `make reset`: 停止并移除所有容器. 警告: 您将丢失存储在 BigchainDB 中的所有数据.
查看所有可用命令, 请运行 `make`.
## 一般人员链接
* [BigchainDB.com](https://www.bigchaindb.com/) - BigchainDB 主网站, 包括新闻订阅
* [路线图](https://github.com/bigchaindb/org/blob/master/ROADMAP.md)
* [博客](https://medium.com/the-bigchaindb-blog)
* [推特](https://twitter.com/BigchainDB)
## 开发人员链接
* [所有的 BigchainDB 文档](https://docs.bigchaindb.com/en/latest/)
* [BigchainDB 服务器 文档](https://docs.bigchaindb.com/projects/server/en/latest/index.html)
* [CONTRIBUTING.md](.github/CONTRIBUTING.md) - how to contribute
* [社区指南](CODE_OF_CONDUCT.md)
* [公开问题](https://github.com/bigchaindb/bigchaindb/issues)
* [公开的 pull request](https://github.com/bigchaindb/bigchaindb/pulls)
* [Gitter 聊天室](https://gitter.im/bigchaindb/bigchaindb)
## 法律声明
* [许可](LICENSES.md) - 开源代码 & 开源内容
* [印记](https://www.bigchaindb.com/imprint/)
* [联系我们](https://www.bigchaindb.com/contact/)

View File

@ -62,4 +62,4 @@ make run
* [라이선스](https://github.com/bigchaindb/bigchaindb/blob/master/LICENSES.md) - 오픈 소스 & 오픈 콘텐츠
* [발행](https://www.bigchaindb.com/imprint/)
* [연락처](https://www.bigchaindb.com/contact/)
* [연락처](https://www.bigchaindb.com/contact/)

View File

@ -1,5 +1,6 @@
<!---
Copyright BigchainDB GmbH and BigchainDB contributors
Copyright © 2020 Interplanetary Database Association e.V.,
BigchainDB and IPDB software contributors.
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
Code is Apache-2.0 and docs are CC-BY-4.0
--->
@ -45,36 +46,39 @@ The following steps are what we do to release a new version of _BigchainDB Serve
- In `bigchaindb/version.py`:
- update `__version__` to e.g. `0.9.0` (with no `.dev` on the end)
- update `__short_version__` to e.g. `0.9` (with no `.dev` on the end)
- In the docs about installing BigchainDB (and Tendermint), and in the associated scripts, recommend/install a version of Tendermint that _actually works_ with the soon-to-be-released version of BigchainDB. You can find all such references by doing a search for the previously-recommended version number, such as `0.22.8`.
- In the docs about installing BigchainDB (and Tendermint), and in the associated scripts, recommend/install a version of Tendermint that _actually works_ with the soon-to-be-released version of BigchainDB. You can find all such references by doing a search for the previously-recommended version number, such as `0.31.5`.
- In `setup.py`, _maybe_ update the development status item in the `classifiers` list. For example, one allowed value is `"Development Status :: 5 - Production/Stable"`. The [allowed values are listed at pypi.python.org](https://pypi.python.org/pypi?%3Aaction=list_classifiers).
1. **Wait for all the tests to pass!**
1. Merge the pull request into the `master` branch.
1. Go to the [bigchaindb/bigchaindb Releases page on GitHub](https://github.com/bigchaindb/bigchaindb/releases)
2. **Wait for all the tests to pass!**
3. Merge the pull request into the `master` branch.
4. Go to the [bigchaindb/bigchaindb Releases page on GitHub](https://github.com/bigchaindb/bigchaindb/releases)
and click the "Draft a new release" button.
1. Fill in the details:
5. Fill in the details:
- **Tag version:** version number preceded by `v`, e.g. `v0.9.1`
- **Target:** the last commit that was just merged. In other words, that commit will get a Git tag with the value given for tag version above.
- **Title:** Same as tag version above, e.g `v0.9.1`
- **Description:** The body of the changelog entry (Added, Changed, etc.)
1. Click "Publish release" to publish the release on GitHub.
1. On your local computer, make sure you're on the `master` branch and that it's up-to-date with the `master` branch in the bigchaindb/bigchaindb repository (e.g. `git pull upstream master`). We're going to use that to push a new `bigchaindb` package to PyPI.
1. Make sure you have a `~/.pypirc` file containing credentials for PyPI.
1. Do `make release` to build and publish the new `bigchaindb` package on PyPI. For this step you need to have `twine` installed. If you get an error like `Makefile:135: recipe for target 'clean-pyc' failed` then try doing
6. Click "Publish release" to publish the release on GitHub.
7. On your local computer, make sure you're on the `master` branch and that it's up-to-date with the `master` branch in the bigchaindb/bigchaindb repository (e.g. `git pull upstream master`). We're going to use that to push a new `bigchaindb` package to PyPI.
8. Make sure you have a `~/.pypirc` file containing credentials for PyPI.
9. Do `make release` to build and publish the new `bigchaindb` package on PyPI. For this step you need to have `twine` installed. If you get an error like `Makefile:135: recipe for target 'clean-pyc' failed` then try doing
```text
sudo chown -R $(whoami):$(whoami) .
```
1. [Log in to readthedocs.org](https://readthedocs.org/accounts/login/) and go to the **BigchainDB Server** project, then:
10. [Log in to readthedocs.org](https://readthedocs.org/accounts/login/) and go to the **BigchainDB Server** project, then:
- Click on "Builds", select "latest" from the drop-down menu, then click the "Build Version:" button.
- Wait for the build of "latest" to finish. This can take a few minutes.
- Go to Admin --> Advanced Settings
and make sure that "Default branch:" (i.e. what "latest" points to)
is set to the new release's tag, e.g. `v0.9.1`.
(Don't miss the `v` in front.)
(It won't be an option if you didn't wait for the build of "latest" to finish.)
Then scroll to the bottom and click "Save".
- Go to Admin --> Versions
and under **Choose Active Versions**, do these things:
1. Make sure that the new version's tag is "Active" and "Public"
1. Make sure the **stable** branch is _not_ active.
1. Scroll to the bottom of the page and click the "Submit" button.
1. Go to [Docker Hub](https://hub.docker.com/) and sign in, then:
2. Make sure the **stable** branch is _not_ active.
3. Scroll to the bottom of the page and click "Save".
11. Go to [Docker Hub](https://hub.docker.com/) and sign in, then:
- Click on "Organizations"
- Click on "bigchaindb"
- Click on "bigchaindb/bigchaindb"

View File

@ -1,5 +1,6 @@
<!---
Copyright BigchainDB GmbH and BigchainDB contributors
Copyright © 2020 Interplanetary Database Association e.V.,
BigchainDB and IPDB software contributors.
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
Code is Apache-2.0 and docs are CC-BY-4.0
--->

View File

@ -1,5 +1,6 @@
<!---
Copyright BigchainDB GmbH and BigchainDB contributors
Copyright © 2020 Interplanetary Database Association e.V.,
BigchainDB and IPDB software contributors.
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
Code is Apache-2.0 and docs are CC-BY-4.0
--->

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
@ -65,8 +66,12 @@ def send_naughty_tx(asset, metadata):
# Then she expects a nicely formatted error code
status_code = sent_transaction.status_code
error = sent_transaction.error
regex = '\{"message":"Invalid transaction \\(ValidationError\\): Invalid key name .* in asset object. ' \
'The key name cannot contain characters .* or null characters","status":400\}\n'
regex = (
r'\{\s*\n*'
r'\s*"message":\s*"Invalid transaction \(ValidationError\):\s*'
r'Invalid key name.*The key name cannot contain characters.*\n*'
r'\s*"status":\s*400\n*'
r'\s*\}\n*')
assert status_code == 400
assert re.fullmatch(regex, error), sent_transaction
# Otherwise, she expects to see her transaction in the database

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,5 +1,6 @@
<!---
Copyright BigchainDB GmbH and BigchainDB contributors
Copyright © 2020 Interplanetary Database Association e.V.,
BigchainDB and IPDB software contributors.
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
Code is Apache-2.0 and docs are CC-BY-4.0
--->

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
@ -70,6 +71,7 @@ config = {
'tendermint': {
'host': 'localhost',
'port': 26657,
'version': 'v0.31.5', # look for __tm_supported_versions__
},
# FIXME: hardcoding to localmongodb for now
'database': _database_map['localmongodb'],

View File

@ -1,5 +1,6 @@
<!---
Copyright BigchainDB GmbH and BigchainDB contributors
Copyright © 2020 Interplanetary Database Association e.V.,
BigchainDB and IPDB software contributors.
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
Code is Apache-2.0 and docs are CC-BY-4.0
--->

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,15 +1,16 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
from itertools import repeat
from importlib import import_module
import logging
from importlib import import_module
from itertools import repeat
import bigchaindb
from bigchaindb.common.exceptions import ConfigurationError
from bigchaindb.backend.exceptions import ConnectionError
from bigchaindb.backend.utils import get_bigchaindb_config_value, get_bigchaindb_config_value_or_key_error
from bigchaindb.common.exceptions import ConfigurationError
BACKENDS = {
'localmongodb': 'bigchaindb.backend.localmongodb.connection.LocalMongoDBConnection',
@ -47,10 +48,10 @@ def connect(backend=None, host=None, port=None, name=None, max_tries=None,
Authentication failure after connecting to the database.
"""
backend = backend or bigchaindb.config['database']['backend']
host = host or bigchaindb.config['database']['host']
port = port or bigchaindb.config['database']['port']
dbname = name or bigchaindb.config['database']['name']
backend = backend or get_bigchaindb_config_value_or_key_error('backend')
host = host or get_bigchaindb_config_value_or_key_error('host')
port = port or get_bigchaindb_config_value_or_key_error('port')
dbname = name or get_bigchaindb_config_value_or_key_error('name')
# Not sure how to handle this here. This setting is only relevant for
# mongodb.
# I added **kwargs for both RethinkDBConnection and MongoDBConnection
@ -60,15 +61,15 @@ def connect(backend=None, host=None, port=None, name=None, max_tries=None,
# UPD: RethinkDBConnection is not here anymore cause we no longer support RethinkDB.
# The problem described above might be reconsidered next time we introduce a backend,
# if it ever happens.
replicaset = replicaset or bigchaindb.config['database'].get('replicaset')
ssl = ssl if ssl is not None else bigchaindb.config['database'].get('ssl', False)
login = login or bigchaindb.config['database'].get('login')
password = password or bigchaindb.config['database'].get('password')
ca_cert = ca_cert or bigchaindb.config['database'].get('ca_cert', None)
certfile = certfile or bigchaindb.config['database'].get('certfile', None)
keyfile = keyfile or bigchaindb.config['database'].get('keyfile', None)
keyfile_passphrase = keyfile_passphrase or bigchaindb.config['database'].get('keyfile_passphrase', None)
crlfile = crlfile or bigchaindb.config['database'].get('crlfile', None)
replicaset = replicaset or get_bigchaindb_config_value('replicaset')
ssl = ssl if ssl is not None else get_bigchaindb_config_value('ssl', False)
login = login or get_bigchaindb_config_value('login')
password = password or get_bigchaindb_config_value('password')
ca_cert = ca_cert or get_bigchaindb_config_value('ca_cert')
certfile = certfile or get_bigchaindb_config_value('certfile')
keyfile = keyfile or get_bigchaindb_config_value('keyfile')
keyfile_passphrase = keyfile_passphrase or get_bigchaindb_config_value('keyfile_passphrase', None)
crlfile = crlfile or get_bigchaindb_config_value('crlfile')
try:
module_name, _, class_name = BACKENDS[backend].rpartition('.')
@ -117,7 +118,7 @@ class Connection:
self.host = host or dbconf['host']
self.port = port or dbconf['port']
self.dbname = dbname or dbconf['name']
self.connection_timeout = connection_timeout if connection_timeout is not None\
self.connection_timeout = connection_timeout if connection_timeout is not None \
else dbconf['connection_timeout']
self.max_tries = max_tries if max_tries is not None else dbconf['max_tries']
self.max_tries_counter = range(self.max_tries) if self.max_tries != 0 else repeat(0)

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
@ -7,13 +8,13 @@ from ssl import CERT_REQUIRED
import pymongo
import bigchaindb
from bigchaindb.utils import Lazy
from bigchaindb.common.exceptions import ConfigurationError
from bigchaindb.backend.connection import Connection
from bigchaindb.backend.exceptions import (DuplicateKeyError,
OperationError,
ConnectionError)
from bigchaindb.backend.connection import Connection
from bigchaindb.backend.utils import get_bigchaindb_config_value
from bigchaindb.common.exceptions import ConfigurationError
from bigchaindb.utils import Lazy
logger = logging.getLogger(__name__)
@ -33,15 +34,15 @@ class LocalMongoDBConnection(Connection):
"""
super().__init__(**kwargs)
self.replicaset = replicaset or bigchaindb.config['database'].get('replicaset')
self.ssl = ssl if ssl is not None else bigchaindb.config['database'].get('ssl', False)
self.login = login or bigchaindb.config['database'].get('login')
self.password = password or bigchaindb.config['database'].get('password')
self.ca_cert = ca_cert or bigchaindb.config['database'].get('ca_cert', None)
self.certfile = certfile or bigchaindb.config['database'].get('certfile', None)
self.keyfile = keyfile or bigchaindb.config['database'].get('keyfile', None)
self.keyfile_passphrase = keyfile_passphrase or bigchaindb.config['database'].get('keyfile_passphrase', None)
self.crlfile = crlfile or bigchaindb.config['database'].get('crlfile', None)
self.replicaset = replicaset or get_bigchaindb_config_value('replicaset')
self.ssl = ssl if ssl is not None else get_bigchaindb_config_value('ssl', False)
self.login = login or get_bigchaindb_config_value('login')
self.password = password or get_bigchaindb_config_value('password')
self.ca_cert = ca_cert or get_bigchaindb_config_value('ca_cert')
self.certfile = certfile or get_bigchaindb_config_value('certfile')
self.keyfile = keyfile or get_bigchaindb_config_value('keyfile')
self.keyfile_passphrase = keyfile_passphrase or get_bigchaindb_config_value('keyfile_passphrase')
self.crlfile = crlfile or get_bigchaindb_config_value('crlfile')
@property
def db(self):

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
@ -120,29 +121,19 @@ def store_block(conn, block):
@register_query(LocalMongoDBConnection)
def get_txids_filtered(conn, asset_id, operation=None):
match_create = {
'operation': 'CREATE',
'id': asset_id
}
match_transfer = {
'operation': 'TRANSFER',
'asset.id': asset_id
}
def get_txids_filtered(conn, asset_id, operation=None, last_tx=None):
if operation == Transaction.CREATE:
match = match_create
elif operation == Transaction.TRANSFER:
match = match_transfer
else:
match = {'$or': [match_create, match_transfer]}
match = {
Transaction.CREATE: {'operation': 'CREATE', 'id': asset_id},
Transaction.TRANSFER: {'operation': 'TRANSFER', 'asset.id': asset_id},
None: {'$or': [{'asset.id': asset_id}, {'id': asset_id}]},
}[operation]
cursor = conn.run(conn.collection('transactions').find(match))
if last_tx:
cursor = cursor.sort([('$natural', DESCENDING)]).limit(1)
pipeline = [
{'$match': match}
]
cursor = conn.run(
conn.collection('transactions')
.aggregate(pipeline))
return (elem['id'] for elem in cursor)

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
@ -10,7 +11,7 @@ import logging
import bigchaindb
from bigchaindb.backend.connection import connect
from bigchaindb.common.exceptions import ValidationError
from bigchaindb.common.utils import validate_all_values_for_key
from bigchaindb.common.utils import validate_all_values_for_key_in_obj, validate_all_values_for_key_in_list
logger = logging.getLogger(__name__)
@ -101,7 +102,9 @@ def validate_language_key(obj, key):
if backend == 'localmongodb':
data = obj.get(key, {})
if isinstance(data, dict):
validate_all_values_for_key(data, 'language', validate_language)
validate_all_values_for_key_in_obj(data, 'language', validate_language)
elif isinstance(data, list):
validate_all_values_for_key_in_list(data, 'language', validate_language)
def validate_language(value):

View File

@ -1,7 +1,10 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
import bigchaindb
class ModuleDispatchRegistrationError(Exception):
"""Raised when there is a problem registering dispatched functions for a
@ -21,6 +24,16 @@ def module_dispatch_registrar(module):
('`{module}` does not contain a single-dispatchable '
'function named `{func}`. The module being registered '
'was not implemented correctly!').format(
func=func_name, module=module.__name__)) from ex
func=func_name, module=module.__name__)) from ex
return wrapper
return dispatch_wrapper
def get_bigchaindb_config_value(key, default_value=None):
return bigchaindb.config['database'].get(key, default_value)
def get_bigchaindb_config_value_or_key_error(key):
return bigchaindb.config['database'][key]

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
@ -16,6 +17,7 @@ import sys
from bigchaindb.core import rollback
from bigchaindb.migrations.chain_migration_election import ChainMigrationElection
from bigchaindb.utils import load_node_key
from bigchaindb.common.transaction_mode_types import BROADCAST_TX_COMMIT
from bigchaindb.common.exceptions import (DatabaseDoesNotExist,
ValidationError)
from bigchaindb.elections.vote import Vote
@ -131,7 +133,7 @@ def create_new_election(sk, bigchain, election_class, data):
logger.error(fd_404)
return False
resp = bigchain.write_transaction(election, 'broadcast_tx_commit')
resp = bigchain.write_transaction(election, BROADCAST_TX_COMMIT)
if resp == (202, ''):
logger.info('[SUCCESS] Submitted proposal with id: {}'.format(election.id))
return election.id
@ -206,7 +208,7 @@ def run_election_approve(args, bigchain):
tx.id).sign([key.private_key])
approval.validate(bigchain)
resp = bigchain.write_transaction(approval, 'broadcast_tx_commit')
resp = bigchain.write_transaction(approval, BROADCAST_TX_COMMIT)
if resp == (202, ''):
logger.info('[SUCCESS] Your vote has been submitted')
@ -261,7 +263,6 @@ def run_drop(args):
return
conn = backend.connect()
dbname = bigchaindb.config['database']['name']
try:
schema.drop_database(conn, dbname)
except DatabaseDoesNotExist:

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,11 +1,16 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
# Separate all crypto code so that we can easily test several implementations
from collections import namedtuple
import sha3
try:
from hashlib import sha3_256
except ImportError:
from sha3 import sha3_256
from cryptoconditions import crypto
@ -14,7 +19,7 @@ CryptoKeypair = namedtuple('CryptoKeypair', ('private_key', 'public_key'))
def hash_data(data):
"""Hash the provided data using SHA3-256"""
return sha3.sha3_256(data.encode()).hexdigest()
return sha3_256(data.encode()).hexdigest()
def generate_key_pair():

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,5 +1,6 @@
<!---
Copyright BigchainDB GmbH and BigchainDB contributors
Copyright © 2020 Interplanetary Database Association e.V.,
BigchainDB and IPDB software contributors.
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
Code is Apache-2.0 and docs are CC-BY-4.0
--->

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
@ -19,7 +20,10 @@ import base58
from cryptoconditions import Fulfillment, ThresholdSha256, Ed25519Sha256
from cryptoconditions.exceptions import (
ParsingError, ASN1DecodeError, ASN1EncodeError, UnsupportedTypeError)
from sha3 import sha3_256
try:
from hashlib import sha3_256
except ImportError:
from sha3 import sha3_256
from bigchaindb.common.crypto import PrivateKey, hash_data
from bigchaindb.common.exceptions import (KeypairMismatchException,
@ -74,7 +78,7 @@ class Input(object):
if fulfills is not None and not isinstance(fulfills, TransactionLink):
raise TypeError('`fulfills` must be a TransactionLink instance')
if not isinstance(owners_before, list):
raise TypeError('`owners_after` must be a list instance')
raise TypeError('`owners_before` must be a list instance')
self.fulfillment = fulfillment
self.fulfills = fulfills
@ -542,7 +546,7 @@ class Transaction(object):
elif (operation == self.TRANSFER and
not (isinstance(asset, dict) and 'id' in asset)):
raise TypeError(('`asset` must be a dict holding an `id` property '
"for 'TRANSFER' Transactions".format(operation)))
'for \'TRANSFER\' Transactions'))
if outputs and not isinstance(outputs, list):
raise TypeError('`outputs` must be a list instance or None')
@ -865,8 +869,9 @@ class Transaction(object):
return cls._sign_threshold_signature_fulfillment(input_, message,
key_pairs)
else:
raise ValueError("Fulfillment couldn't be matched to "
'Cryptocondition fulfillment type.')
raise ValueError(
'Fulfillment couldn\'t be matched to '
'Cryptocondition fulfillment type.')
@classmethod
def _sign_simple_signature_fulfillment(cls, input_, message, key_pairs):

View File

@ -0,0 +1,8 @@
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
BROADCAST_TX_COMMIT = 'broadcast_tx_commit'
BROADCAST_TX_ASYNC = 'broadcast_tx_async'
BROADCAST_TX_SYNC = 'broadcast_tx_sync'

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
@ -76,10 +77,20 @@ def validate_txn_obj(obj_name, obj, key, validation_fun):
if backend == 'localmongodb':
data = obj.get(key, {})
if isinstance(data, dict):
validate_all_keys(obj_name, data, validation_fun)
validate_all_keys_in_obj(obj_name, data, validation_fun)
elif isinstance(data, list):
validate_all_items_in_list(obj_name, data, validation_fun)
def validate_all_keys(obj_name, obj, validation_fun):
def validate_all_items_in_list(obj_name, data, validation_fun):
for item in data:
if isinstance(item, dict):
validate_all_keys_in_obj(obj_name, item, validation_fun)
elif isinstance(item, list):
validate_all_items_in_list(obj_name, item, validation_fun)
def validate_all_keys_in_obj(obj_name, obj, validation_fun):
"""Validate all (nested) keys in `obj` by using `validation_fun`.
Args:
@ -97,10 +108,12 @@ def validate_all_keys(obj_name, obj, validation_fun):
for key, value in obj.items():
validation_fun(obj_name, key)
if isinstance(value, dict):
validate_all_keys(obj_name, value, validation_fun)
validate_all_keys_in_obj(obj_name, value, validation_fun)
elif isinstance(value, list):
validate_all_items_in_list(obj_name, value, validation_fun)
def validate_all_values_for_key(obj, key, validation_fun):
def validate_all_values_for_key_in_obj(obj, key, validation_fun):
"""Validate value for all (nested) occurrence of `key` in `obj`
using `validation_fun`.
@ -117,7 +130,17 @@ def validate_all_values_for_key(obj, key, validation_fun):
if vkey == key:
validation_fun(value)
elif isinstance(value, dict):
validate_all_values_for_key(value, key, validation_fun)
validate_all_values_for_key_in_obj(value, key, validation_fun)
elif isinstance(value, list):
validate_all_values_for_key_in_list(value, key, validation_fun)
def validate_all_values_for_key_in_list(input_list, key, validation_fun):
for item in input_list:
if isinstance(item, dict):
validate_all_values_for_key_in_obj(item, key, validation_fun)
elif isinstance(item, list):
validate_all_values_for_key_in_list(item, key, validation_fun)
def validate_key(obj_name, key):

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
@ -19,7 +20,7 @@ import os
import copy
import json
import logging
import collections
import collections.abc
from functools import lru_cache
from pkg_resources import iter_entry_points, ResolutionError
@ -51,7 +52,7 @@ def map_leafs(func, mapping):
path = []
for key, val in mapping.items():
if isinstance(val, collections.Mapping):
if isinstance(val, collections.abc.Mapping):
_inner(val, path + [key])
else:
mapping[key] = func(val, path=path+[key])
@ -79,7 +80,7 @@ def update(d, u):
mapping: An updated version of d (updated by u).
"""
for k, v in u.items():
if isinstance(v, collections.Mapping):
if isinstance(v, collections.abc.Mapping):
r = update(d.get(k, {}), v)
d[k] = r
else:

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
@ -9,15 +10,7 @@ import logging
import sys
from abci.application import BaseApplication
from abci.types_pb2 import (
ResponseInitChain,
ResponseInfo,
ResponseCheckTx,
ResponseBeginBlock,
ResponseDeliverTx,
ResponseEndBlock,
ResponseCommit,
)
from abci import CodeTypeOk
from bigchaindb import BigchainDB
from bigchaindb.elections.election import Election
@ -30,7 +23,6 @@ import bigchaindb.upsert_validator.validator_utils as vutils
from bigchaindb.events import EventTypes, Event
CodeTypeOk = 0
CodeTypeError = 1
logger = logging.getLogger(__name__)
@ -42,7 +34,8 @@ class App(BaseApplication):
transaction logic to Tendermint Core.
"""
def __init__(self, bigchaindb=None, events_queue=None):
def __init__(self, abci, bigchaindb=None, events_queue=None,):
super().__init__(abci)
self.events_queue = events_queue
self.bigchaindb = bigchaindb or BigchainDB()
self.block_txn_ids = []
@ -53,9 +46,9 @@ class App(BaseApplication):
self.chain = self.bigchaindb.get_latest_abci_chain()
def log_abci_migration_error(self, chain_id, validators):
logger.error(f'An ABCI chain migration is in process. ' +
'Download the new ABCI client and configure it with ' +
'chain_id={chain_id} and validators={validators}.')
logger.error('An ABCI chain migration is in process. '
'Download the new ABCI client and configure it with '
f'chain_id={chain_id} and validators={validators}.')
def abort_if_abci_chain_is_not_synced(self):
if self.chain is None or self.chain['is_synced']:
@ -76,8 +69,8 @@ class App(BaseApplication):
chain_id = known_chain['chain_id']
if known_chain['is_synced']:
msg = f'Got invalid InitChain ABCI request ({genesis}) - ' + \
'the chain {chain_id} is already synced.'
msg = (f'Got invalid InitChain ABCI request ({genesis}) - '
f'the chain {chain_id} is already synced.')
logger.error(msg)
sys.exit(1)
@ -108,7 +101,7 @@ class App(BaseApplication):
genesis.chain_id, True)
self.chain = {'height': abci_chain_height, 'is_synced': True,
'chain_id': genesis.chain_id}
return ResponseInitChain()
return self.abci.ResponseInitChain()
def info(self, request):
"""Return height of the latest committed block."""
@ -123,7 +116,7 @@ class App(BaseApplication):
logger.info(f"Tendermint version: {request.version}")
r = ResponseInfo()
r = self.abci.ResponseInfo()
block = self.bigchaindb.get_latest_block()
if block:
chain_shift = 0 if self.chain is None else self.chain['height']
@ -148,10 +141,10 @@ class App(BaseApplication):
transaction = decode_transaction(raw_transaction)
if self.bigchaindb.is_valid_transaction(transaction):
logger.debug('check_tx: VALID')
return ResponseCheckTx(code=CodeTypeOk)
return self.abci.ResponseCheckTx(code=CodeTypeOk)
else:
logger.debug('check_tx: INVALID')
return ResponseCheckTx(code=CodeTypeError)
return self.abci.ResponseCheckTx(code=CodeTypeError)
def begin_block(self, req_begin_block):
"""Initialize list of transaction.
@ -168,7 +161,7 @@ class App(BaseApplication):
self.block_txn_ids = []
self.block_transactions = []
return ResponseBeginBlock()
return self.abci.ResponseBeginBlock()
def deliver_tx(self, raw_transaction):
"""Validate the transaction before mutating the state.
@ -185,12 +178,12 @@ class App(BaseApplication):
if not transaction:
logger.debug('deliver_tx: INVALID')
return ResponseDeliverTx(code=CodeTypeError)
return self.abci.ResponseDeliverTx(code=CodeTypeError)
else:
logger.debug('storing tx')
self.block_txn_ids.append(transaction.id)
self.block_transactions.append(transaction)
return ResponseDeliverTx(code=CodeTypeOk)
return self.abci.ResponseDeliverTx(code=CodeTypeOk)
def end_block(self, request_end_block):
"""Calculate block hash using transaction ids and previous block
@ -226,7 +219,7 @@ class App(BaseApplication):
self.new_height,
self.block_transactions)
return ResponseEndBlock(validator_updates=validator_update)
return self.abci.ResponseEndBlock(validator_updates=validator_update)
def commit(self):
"""Store the new height and along with block hash."""
@ -257,7 +250,7 @@ class App(BaseApplication):
})
self.events_queue.put(event)
return ResponseCommit(data=data)
return self.abci.ResponseCommit(data=data)
def rollback(b):

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
from collections import OrderedDict

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
@ -9,12 +10,13 @@ MongoDB.
import logging
from collections import namedtuple
from uuid import uuid4
import rapidjson
try:
from hashlib import sha3_256
except ImportError:
# NOTE: neeeded for Python < 3.6
# NOTE: needed for Python < 3.6
from sha3 import sha3_256
import requests
@ -25,6 +27,9 @@ from bigchaindb.models import Transaction
from bigchaindb.common.exceptions import (SchemaValidationError,
ValidationError,
DoubleSpend)
from bigchaindb.common.transaction_mode_types import (BROADCAST_TX_COMMIT,
BROADCAST_TX_ASYNC,
BROADCAST_TX_SYNC)
from bigchaindb.tendermint_utils import encode_transaction, merkleroot
from bigchaindb import exceptions as core_exceptions
from bigchaindb.validation import BaseValidationRules
@ -56,9 +61,9 @@ class BigchainDB(object):
A connection to the database.
"""
config_utils.autoconfigure()
self.mode_commit = 'broadcast_tx_commit'
self.mode_list = ('broadcast_tx_async',
'broadcast_tx_sync',
self.mode_commit = BROADCAST_TX_COMMIT
self.mode_list = (BROADCAST_TX_ASYNC,
BROADCAST_TX_SYNC,
self.mode_commit)
self.tendermint_host = bigchaindb.config['tendermint']['host']
self.tendermint_port = bigchaindb.config['tendermint']['port']
@ -257,11 +262,11 @@ class BigchainDB(object):
def get_transactions(self, txn_ids):
return backend.query.get_transactions(self.connection, txn_ids)
def get_transactions_filtered(self, asset_id, operation=None):
def get_transactions_filtered(self, asset_id, operation=None, last_tx=None):
"""Get a list of transactions filtered on some criteria
"""
txids = backend.query.get_txids_filtered(self.connection, asset_id,
operation)
operation, last_tx)
for txid in txids:
yield self.get_transaction(txid)

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,16 +1,20 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
from bigchaindb.backend.schema import validate_language_key
from bigchaindb.common.exceptions import (InvalidSignature,
DuplicateTransaction)
from bigchaindb.common.schema import validate_transaction_schema
from bigchaindb.common.transaction import Transaction
from bigchaindb.common.utils import (validate_txn_obj, validate_key)
from bigchaindb.common.schema import validate_transaction_schema
from bigchaindb.backend.schema import validate_language_key
class Transaction(Transaction):
ASSET = 'asset'
METADATA = 'metadata'
DATA = 'data'
def validate(self, bigchain, current_transactions=[]):
"""Validate transaction spend
@ -46,9 +50,10 @@ class Transaction(Transaction):
@classmethod
def validate_schema(cls, tx_body):
validate_transaction_schema(tx_body)
validate_txn_obj('asset', tx_body['asset'], 'data', validate_key)
validate_txn_obj('metadata', tx_body, 'metadata', validate_key)
validate_language_key(tx_body['asset'], 'data')
validate_txn_obj(cls.ASSET, tx_body[cls.ASSET], cls.DATA, validate_key)
validate_txn_obj(cls.METADATA, tx_body, cls.METADATA, validate_key)
validate_language_key(tx_body[cls.ASSET], cls.DATA)
validate_language_key(tx_body, cls.METADATA)
class FastTransaction:

View File

@ -1,31 +1,28 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
import multiprocessing as mp
from collections import defaultdict
from abci.types_pb2 import ResponseCheckTx, ResponseDeliverTx
from bigchaindb import BigchainDB, App
from bigchaindb import App, BigchainDB
from bigchaindb.tendermint_utils import decode_transaction
CodeTypeOk = 0
from abci import CodeTypeOk
class ParallelValidationApp(App):
def __init__(self, bigchaindb=None, events_queue=None):
super().__init__(bigchaindb, events_queue)
def __init__(self, bigchaindb=None, events_queue=None, abci=None):
super().__init__(bigchaindb, events_queue, abci=abci)
self.parallel_validator = ParallelValidator()
self.parallel_validator.start()
def check_tx(self, raw_transaction):
return ResponseCheckTx(code=CodeTypeOk)
return self.abci.ResponseCheckTx(code=CodeTypeOk)
def deliver_tx(self, raw_transaction):
self.parallel_validator.validate(raw_transaction)
return ResponseDeliverTx(code=CodeTypeOk)
return self.abci.ResponseDeliverTx(code=CodeTypeOk)
def end_block(self, request_end_block):
result = self.parallel_validator.result(timeout=30)

View File

@ -1,10 +1,13 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
import logging
import setproctitle
from abci import TmVersion, ABCI
import bigchaindb
from bigchaindb.lib import BigchainDB
from bigchaindb.core import App
@ -19,10 +22,8 @@ logger = logging.getLogger(__name__)
BANNER = """
****************************************************************************
* *
* *
* *
* *
* codename "fluffy cat" *
* BigchainDB 2.2.2 *
* codename "jumping sloth" *
* Initialization complete. BigchainDB Server is ready and waiting. *
* *
* You can send HTTP requests via the HTTP API documented in the *
@ -62,15 +63,26 @@ def start(args):
# We need to import this after spawning the web server
# because import ABCIServer will monkeypatch all sockets
# for gevent.
from abci import ABCIServer
from abci.server import ABCIServer
setproctitle.setproctitle('bigchaindb')
# Start the ABCIServer
abci = ABCI(TmVersion(bigchaindb.config['tendermint']['version']))
if args.experimental_parallel_validation:
app = ABCIServer(app=ParallelValidationApp(events_queue=exchange.get_publisher_queue()))
app = ABCIServer(
app=ParallelValidationApp(
abci=abci.types,
events_queue=exchange.get_publisher_queue(),
)
)
else:
app = ABCIServer(app=App(events_queue=exchange.get_publisher_queue()))
app = ABCIServer(
app=App(
abci=abci.types,
events_queue=exchange.get_publisher_queue(),
)
)
app.run()

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,20 +1,28 @@
import codecs
import base64
import binascii
import codecs
from abci.types_pb2 import (Validator,
PubKey)
from bigchaindb.common.exceptions import InvalidPublicKey
import bigchaindb
from abci import types_v0_22_8, types_v0_31_5, TmVersion
from bigchaindb.common.exceptions import InvalidPublicKey, BigchainDBError
def encode_validator(v):
ed25519_public_key = v['public_key']['value']
# NOTE: tendermint expects public to be encoded in go-amino format
pub_key = PubKey(type='ed25519',
data=bytes.fromhex(ed25519_public_key))
return Validator(pub_key=pub_key,
address=b'',
power=v['power'])
try:
version = TmVersion(bigchaindb.config["tendermint"]["version"])
except ValueError:
raise BigchainDBError('Invalid tendermint version, '
'check BigchainDB configuration file')
validator_update_t, pubkey_t = {
TmVersion.v0_22_8: (types_v0_22_8.Validator, types_v0_22_8.PubKey),
TmVersion.v0_31_5: (types_v0_31_5.ValidatorUpdate, types_v0_31_5.PubKey)
}[version]
pub_key = pubkey_t(type='ed25519', data=bytes.fromhex(ed25519_public_key))
return validator_update_t(pub_key=pub_key, power=v['power'])
def decode_validator(v):

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,9 +1,10 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
__version__ = '2.0.0b8'
__short_version__ = '2.0b8'
__version__ = '2.2.2'
__short_version__ = '2.2'
# Supported Tendermint versions
__tm_supported_versions__ = ["0.22.8"]
__tm_supported_versions__ = ["0.31.5", "0.22.8"]

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
@ -36,7 +37,10 @@ def base_ws_uri():
customized (typically when running behind NAT, firewall, etc.)
"""
scheme = config['wsserver']['advertised_scheme']
host = config['wsserver']['advertised_host']
port = config['wsserver']['advertised_port']
config_wsserver = config['wsserver']
scheme = config_wsserver['advertised_scheme']
host = config_wsserver['advertised_host']
port = config_wsserver['advertised_port']
return '{}://{}:{}'.format(scheme, host, port)

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,9 +1,14 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
import re
from bigchaindb.common.transaction_mode_types import (BROADCAST_TX_COMMIT,
BROADCAST_TX_ASYNC,
BROADCAST_TX_SYNC)
def valid_txid(txid):
if re.match('^[a-fA-F0-9]{64}$', txid):
@ -38,9 +43,9 @@ def valid_operation(op):
def valid_mode(mode):
if mode == 'async':
return 'broadcast_tx_async'
return BROADCAST_TX_ASYNC
if mode == 'sync':
return 'broadcast_tx_sync'
return BROADCAST_TX_SYNC
if mode == 'commit':
return 'broadcast_tx_commit'
return BROADCAST_TX_COMMIT
raise ValueError('Mode must be "async", "sync" or "commit"')

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
@ -11,6 +12,7 @@ import logging
from flask import current_app, request, jsonify
from flask_restful import Resource, reqparse
from bigchaindb.common.transaction_mode_types import BROADCAST_TX_ASYNC
from bigchaindb.common.exceptions import SchemaValidationError, ValidationError
from bigchaindb.web.views.base import make_error
from bigchaindb.web.views import parameters
@ -47,8 +49,9 @@ class TransactionListApi(Resource):
parser.add_argument('operation', type=parameters.valid_operation)
parser.add_argument('asset_id', type=parameters.valid_txid,
required=True)
parser.add_argument('last_tx', type=parameters.valid_bool,
required=False)
args = parser.parse_args()
with current_app.config['bigchain_pool']() as bigchain:
txs = bigchain.get_transactions_filtered(**args)
@ -62,7 +65,7 @@ class TransactionListApi(Resource):
"""
parser = reqparse.RequestParser()
parser.add_argument('mode', type=parameters.valid_mode,
default='broadcast_tx_async')
default=BROADCAST_TX_ASYNC)
args = parser.parse_args()
mode = str(args['mode'])

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
@ -95,12 +96,11 @@ class Dispatcher:
del self.subscribers[uuid]
@asyncio.coroutine
def publish(self):
async def publish(self):
"""Publish new events to the subscribers."""
while True:
event = yield from self.event_source.get()
event = await self.event_source.get()
str_buffer = []
if event == POISON_PILL:
@ -114,23 +114,22 @@ class Dispatcher:
for str_item in str_buffer:
for _, websocket in self.subscribers.items():
yield from websocket.send_str(str_item)
await websocket.send_str(str_item)
@asyncio.coroutine
def websocket_handler(request):
async def websocket_handler(request):
"""Handle a new socket connection."""
logger.debug('New websocket connection.')
websocket = web.WebSocketResponse()
yield from websocket.prepare(request)
await websocket.prepare(request)
uuid = uuid4()
request.app['dispatcher'].subscribe(uuid, websocket)
while True:
# Consume input buffer
try:
msg = yield from websocket.receive()
msg = await websocket.receive()
except RuntimeError as e:
logger.debug('Websocket exception: %s', str(e))
break

View File

@ -1,4 +1,5 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0

View File

@ -1,8 +1,9 @@
# Copyright BigchainDB GmbH and BigchainDB contributors
# Copyright © 2020 Interplanetary Database Association e.V.,
# BigchainDB and IPDB software contributors.
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
version: '2.1'
version: '2.2'
services:
# Build: docker-compose build -d bigchaindb
@ -12,6 +13,7 @@ services:
ports:
- "27017:27017"
command: mongod
restart: always
bigchaindb:
depends_on:
- mongodb
@ -47,8 +49,9 @@ services:
timeout: 5s
retries: 3
command: '.ci/entrypoint.sh'
restart: always
tendermint:
image: tendermint/tendermint:0.22.8
image: tendermint/tendermint:v0.31.5
# volumes:
# - ./tmdata:/tendermint
entrypoint: ''
@ -56,6 +59,7 @@ services:
- "26656:26656"
- "26657:26657"
command: sh -c "tendermint init && tendermint node --consensus.create_empty_blocks=false --proxy_app=tcp://bigchaindb:26658"
restart: always
bdb:
image: busybox
depends_on:
@ -92,10 +96,10 @@ services:
backend: localmongodb
volumes:
- .:/usr/src/app/
command: make -C docs/server html
command: make -C docs/root html
vdocs:
image: nginx
ports:
- '33333:80'
volumes:
- ./docs/server/build/html:/usr/share/nginx/html
- ./docs/root/build/html:/usr/share/nginx/html

View File

@ -1,5 +1,6 @@
<!---
Copyright BigchainDB GmbH and BigchainDB contributors
Copyright © 2020 Interplanetary Database Association e.V.,
BigchainDB and IPDB software contributors.
SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
Code is Apache-2.0 and docs are CC-BY-4.0
--->
@ -44,7 +45,7 @@ You can also use [Docker Compose](https://docs.docker.com/compose/) to build and
$ docker-compose up -d bdocs
```
The docs will be hosted on port **33333**, and can be accessed over [localhost](http:/localhost:33333), [127.0.0.1](http:/127.0.0.1:33333)
The docs will be hosted on port **33333**, and can be accessed over [localhost](http://localhost:33333), [127.0.0.1](http://127.0.0.1:33333)
OR http:/HOST_IP:33333.

Some files were not shown because too many files have changed in this diff Show More