mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-06-23 17:56:41 +02:00
Merge remote-tracking branch 'origin/master' into feat/1462/text-search
This commit is contained in:
commit
ef52c04808
|
@ -10,6 +10,7 @@ that [major version 0.x does not export a stable API](http://semver.org/#spec-it
|
|||
A minor release is preceeded by a feature freeze and created from the 'master' branch. This is a summary of the steps we go through to release a new minor version of BigchainDB Server.
|
||||
|
||||
1. Update the `CHANGELOG.md` file in master
|
||||
1. In `k8s/bigchaindb/bigchaindb-dep.yaml`, find the line of the form `image: bigchaindb/bigchaindb:0.8.1` and change the version number to the new version number, e.g. `0.9.0`. (This is the Docker image that Kubernetes should pull from Docker Hub.) Commit that change to master
|
||||
1. Create and checkout a new branch for the minor release, named after the minor version, without a preceeding 'v', e.g. `git checkout -b 0.9` (*not* 0.9.0, this new branch will be for e.g. 0.9.0, 0.9.1, 0.9.2, etc. each of which will be identified by a tagged commit)
|
||||
1. In `bigchaindb/version.py`, update `__version__` and `__short_version__`, e.g. to `0.9` and `0.9.0` (with no `.dev` on the end)
|
||||
1. Commit that change, and push the new branch to GitHub
|
||||
|
@ -26,8 +27,11 @@ A patch release is similar to a minor release, but piggybacks on an existing min
|
|||
1. Check out the minor release branch, e.g. `0.9`
|
||||
1. Apply the changes you want, e.g. using `git cherry-pick`.
|
||||
1. Update the `CHANGELOG.md` file
|
||||
1. Increment the patch version in `bigchaindb/version.py`, e.g. "0.9.1"
|
||||
1. Commit that change, and push the updated branch to GitHub
|
||||
1. Increment the patch version in `bigchaindb/version.py`, e.g. `0.9.1`
|
||||
1. Commit that change
|
||||
1. In `k8s/bigchaindb/bigchaindb-dep.yaml`, find the line of the form `image: bigchaindb/bigchaindb:0.9.0` and change the version number to the new version number, e.g. `0.9.1`. (This is the Docker image that Kubernetes should pull from Docker Hub.)
|
||||
1. Commit that change
|
||||
1. Push the updated minor release branch to GitHub
|
||||
1. Follow steps outlined in [Common Steps](#common-steps)
|
||||
1. Cherry-pick the `CHANGELOG.md` update commit (made above) to the `master` branch
|
||||
|
||||
|
|
|
@ -259,7 +259,7 @@ def get_assets(connection, asset_ids):
|
|||
"""Get a list of assets from the assets table.
|
||||
|
||||
Args:
|
||||
asset_ids (list): a of list of ids for the assets to be retrieved from
|
||||
asset_ids (list): a list of ids for the assets to be retrieved from
|
||||
the database.
|
||||
|
||||
Returns:
|
||||
|
@ -323,7 +323,7 @@ def get_last_voted_block_id(connection, node_pubkey):
|
|||
node_pubkey (str): base58 encoded public key.
|
||||
|
||||
Returns:
|
||||
The last block id the node has voted on. If the node didn't cast
|
||||
The id of the last block the node has voted on. If the node didn't cast
|
||||
any vote then the genesis block id is returned.
|
||||
"""
|
||||
|
||||
|
|
|
@ -605,7 +605,7 @@ class Bigchain(object):
|
|||
asset_ids (:obj:`list` of :obj:`str`): A list of asset_ids to
|
||||
retrieve from the database.
|
||||
|
||||
Returs:
|
||||
Returns:
|
||||
list: The list of assets returned from the database.
|
||||
"""
|
||||
return backend.query.get_assets(self.connection, asset_ids)
|
||||
|
|
|
@ -106,7 +106,7 @@ class Transaction(Transaction):
|
|||
if tx_dict['operation'] in [Transaction.CREATE, Transaction.GENESIS]:
|
||||
# TODO: Maybe replace this call to a call to get_asset_by_id
|
||||
asset = list(bigchain.get_assets([tx_dict['id']]))[0]
|
||||
asset.pop('id')
|
||||
del asset['id']
|
||||
tx_dict.update({'asset': asset})
|
||||
|
||||
return cls.from_dict(tx_dict)
|
||||
|
@ -351,7 +351,7 @@ class Block(object):
|
|||
|
||||
def decouple_assets(self):
|
||||
"""
|
||||
Extracts the assets from the `CREATE` transactions in the block.
|
||||
Extracts the assets from the ``CREATE`` transactions in the block.
|
||||
|
||||
Returns:
|
||||
tuple: (assets, block) with the assets being a list of dicts and
|
||||
|
@ -372,9 +372,9 @@ class Block(object):
|
|||
@staticmethod
|
||||
def couple_assets(block_dict, assets):
|
||||
"""
|
||||
Give a block_dict with not assets (as returned from a database call)
|
||||
and a list of assets, reconstruct the original block by puting the
|
||||
assets back into the `CREATE` transactions in the block.
|
||||
Given a block_dict with no assets (as returned from a database call)
|
||||
and a list of assets, reconstruct the original block by putting the
|
||||
assets back into the ``CREATE`` transactions in the block.
|
||||
|
||||
Args:
|
||||
block_dict (:obj:`dict`): The block dict as returned from a
|
||||
|
@ -391,15 +391,14 @@ class Block(object):
|
|||
for transaction in block_dict['block']['transactions']:
|
||||
if transaction['operation'] in [Transaction.CREATE,
|
||||
Transaction.GENESIS]:
|
||||
transaction.update({'asset': assets.get(transaction['id'],
|
||||
None)})
|
||||
transaction.update({'asset': assets.get(transaction['id'])})
|
||||
return block_dict
|
||||
|
||||
@staticmethod
|
||||
def get_asset_ids(block_dict):
|
||||
"""
|
||||
Given a block_dict return all the asset_ids for that block (the txid
|
||||
of CREATE transactions). Usefull to know which assets to retrieve
|
||||
of CREATE transactions). Useful to know which assets to retrieve
|
||||
from the database to reconstruct the block.
|
||||
|
||||
Args:
|
||||
|
|
|
@ -20,7 +20,7 @@ Community-Driven Libraries and Tools
|
|||
Some of these projects are a work in progress,
|
||||
but may still be useful.
|
||||
|
||||
* `Javascript transaction builder <https://github.com/sohkai/js-bigchaindb-quickstart>`_
|
||||
* `JavaScript / Node.js driver <https://github.com/bigchaindb/js-bigchaindb-driver>`_
|
||||
* `Haskell transaction builder <https://github.com/bigchaindb/bigchaindb-hs>`_
|
||||
* `Go driver <https://github.com/zbo14/envoke/blob/master/bigchain/bigchain.go>`_
|
||||
* `Java driver <https://github.com/mgrand/bigchaindb-java-driver>`_
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: bigchaindb
|
||||
version: master
|
||||
version: git
|
||||
summary: a scalable blockchain database
|
||||
description: |
|
||||
With high throughput, sub-second latency and powerful functionality to
|
||||
|
|
|
@ -220,7 +220,7 @@ class TestBlockModel(object):
|
|||
block_dict_reconstructed = Block.couple_assets(block_dict,
|
||||
assets_from_block)
|
||||
|
||||
# check that the reconstructed block is the as the original block
|
||||
# check that the reconstructed block is the same as the original block
|
||||
assert block == Block.from_dict(block_dict_reconstructed)
|
||||
|
||||
def test_get_asset_ids(self, b):
|
||||
|
|
Loading…
Reference in New Issue
Block a user