Skip to content

Commit

Permalink
removed all mention of indy-crypto
Browse files Browse the repository at this point in the history
Signed-off-by: Brent Zundel <[email protected]>
  • Loading branch information
brentzundel committed Jun 18, 2020
1 parent 15032ab commit 11a7e13
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 93 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ Indy Node repo consists of the following parts:
- An official SDK for Indy.
- It contains client and anoncreds implementation
- You don't need it to contribute to Indy-Node. But please use indy-sdk for your own applications dealing with Indy ecosystem.
- [indy-crypto](https://github.com/hyperledger/indy-crypto)
- A shared crypto library
- It's based on [AMCL](https://github.com/milagro-crypto/amcl)
- [ursa](https://github.com/hyperledger/ursa)
- Hyperledger's shared crypto library
- In particular, it contains BLS multi-signature crypto needed for state proofs support in Indy.

## Contact us
Expand Down
14 changes: 2 additions & 12 deletions ci/pipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def systemTests(Closure body) {

Map indyPlenumVersions = [:]
Map indySDKVersions = [:]
Map indyCryptoVersions = [:]

def dockerClean = {
sh "./system/docker/clean.sh $systemTestsNetwork"
Expand Down Expand Up @@ -66,7 +65,6 @@ def systemTests(Closure body) {
sh """
sed -i 's/python3-indy.*/python3-indy==${indySDKVersions.pypi}/g' ./system/requirements.txt
#sed -i 's/indy-plenum.*/indy-plenum==${indyPlenumVersions.pypi}/g' ./system/requirements.txt
#sed -i 's/indy-crypto.*/indy-crypto==${indyCryptoVersions.pypi}/g' ./system/requirements.txt
"""
}

Expand All @@ -77,8 +75,6 @@ def systemTests(Closure body) {
stage("[${testGroup}] Prepare docker env") {
withEnv([
"INDY_NODE_REPO_COMPONENT=${config.repoChannel}",
"LIBINDY_CRYPTO_VERSION=${indyCryptoVersions.debian}",
"PYTHON3_LIBINDY_CRYPTO_VERSION=${indyCryptoVersions.debian}",
"INDY_PLENUM_VERSION=${indyPlenumVersions.debian}",
"INDY_NODE_VERSION=${config.pkgVersion}",
"LIBINDY_REPO_COMPONENT=${indySDKVersions.debian == indySDKVersions.pypi ? 'stable' : 'master'}",
Expand Down Expand Up @@ -166,16 +162,10 @@ def systemTests(Closure body) {
""").trim()
indySDKVersions.debian = indySDKVersions.pypi.replaceAll(/-(dev|rc)-(.*)/, "~\$2")
echo "indy-sdk version: ${indySDKVersions}"

indyCryptoVersions.pypi = sh(returnStdout: true, script: """
grep "^Collecting indy-crypto==" $pipLogName | awk '{print \$2}' | awk -F'==' '{print \$2}'
""").trim()
indyCryptoVersions.debian = indyCryptoVersions.pypi.replaceAll(/-(dev|rc)-(.*)/, "~\$2")
echo "indy-crypto version: ${indyCryptoVersions}"
}

if (!(indyPlenumVersions.debian && indySDKVersions.debian && indyCryptoVersions.debian)) {
error "Failed to get versions for indy-plenum or indy-crypto or indy-sdk"
if (!(indyPlenumVersions.debian && indySDKVersions.debian)) {
error "Failed to get versions for indy-plenum or indy-sdk"
}
}
}
Expand Down
1 change: 0 additions & 1 deletion ci/ubuntu.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ ARG venv=venv

RUN apt-get update -y && apt-get install -y \
python3-nacl \
libindy-crypto=0.4.5 \
libindy=1.13.0~1420 \
# rocksdb python wrapper
libbz2-dev \
Expand Down
4 changes: 2 additions & 2 deletions design/anoncreds.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Here you can find the requirements and design for Anoncreds workflow (including

Anoncreds protocol links:
- [Anoncreds Sequence Diagram](https://github.com/hyperledger/indy-sdk/blob/master/doc/libindy-anoncreds.svg)
- [Anoncreds Protocol Math](https://github.com/hyperledger/indy-crypto/blob/master/libindy-crypto/docs/AnonCred.pdf)
- [Anoncreds Protocol Crypto API](https://github.com/hyperledger/indy-crypto/blob/master/libindy-crypto/docs/anoncreds-design.md)
- [Anoncreds Protocol Math](https://github.com/hyperledger/ursa-docs/tree/master/specs/anoncreds1)
- [Anoncreds Protocol Crypto API](https://github.com/hyperledger/ursa/blob/master/libursa/docs/anoncreds-design.md)

## Requirements
1. Creation of Schemas:
Expand Down
18 changes: 2 additions & 16 deletions dev-setup/osx/setup-dev-dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#!/usr/bin/env bash

if [ "$#" -ne 2 ]; then
echo "Please specify indy-sdk and indy-crypto version tags"
echo "e.g ./setup-dev-dependencies.sh 1.6.7 0.4.2"
echo "Please specify indy-sdk version tag"
echo "e.g ./setup-dev-dependencies.sh 1.6.7"
exit 1
fi

indy_sdk_version=$1
indy_crypto_version=$2

brew update

Expand Down Expand Up @@ -43,16 +42,3 @@ popd
rm -rf indy-sdk
popd
echo 'Installed libindy'

echo 'Installing libcrypto...'
pushd /tmp
git clone https://github.com/hyperledger/indy-crypto.git
pushd indy-crypto/libindy-crypto
git fetch --all --tags --prune
git checkout tags/v"${indy_crypto_version}"
cargo build --release
cp target/release/libindy_crypto.dylib /usr/local/lib/
popd
rm -rf indy-crypto
popd
echo 'Installed libcrypto'
6 changes: 3 additions & 3 deletions dev-setup/ubuntu/setup-dev-depend-ubuntu14.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ echo 'Installing libsodium...'
sudo apt-get install -y libsodium13
echo 'Installed libsodium'

echo 'Installing Libindy and Libindy Crypto...'
sudo apt-get install -y libindy libindy-crypto
echo 'Installed Libindy and Libindy Crypto'
echo 'Installing Libindy...'
sudo apt-get install -y libindy
echo 'Installed Libindy'
6 changes: 3 additions & 3 deletions dev-setup/ubuntu/setup-dev-depend-ubuntu16.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ sudo apt-get install -y libbz2-dev \
echo 'Installed RocksDB'


echo 'Installing Libindy and Libindy Crypto...'
sudo apt-get install -y libindy libindy-crypto
echo 'Installed Libindy and Libindy Crypto'
echo 'Installing Libindy...'
sudo apt-get install -y libindy
echo 'Installed Libindy'
21 changes: 2 additions & 19 deletions docs/source/setup-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You can also have a look at the scripts mentioned below to follow them and perfo
1. Get scripts from [dev-setup-ubuntu](https://github.com/hyperledger/indy-node/tree/master/dev-setup/ubuntu)
1. Run `setup-dev-python.sh` to setup Python3.5, pip and virtualenv
1. Run `source ~/.bashrc` to apply virtual environment wrapper installation
1. Run `setup-dev-depend-ubuntu16.sh` to setup dependencies (libindy, libindy-crypto, libsodium)
1. Run `setup-dev-depend-ubuntu16.sh` to setup dependencies (libindy, libsodium)
1. Fork [indy-plenum](https://github.com/hyperledger/indy-plenum) and [indy-node](https://github.com/hyperledger/indy-node)
1. Go to the destination folder for the project
1. Run `init-dev-project.sh <github-name> <new-virtualenv-name>` to clone indy-plenum and indy-node projects and
Expand Down Expand Up @@ -112,29 +112,12 @@ Once you have homebrew installed, run ```brew install libsodium``` to install li
1. Copy the libsodium-x.dll from libsodium-win32\bin or libsodium-win64\bin to C:\Windows\System or System32 and rename it to libsodium.dll.


### Setup Indy-Crypto

Indy depends on [Indy-Crypto](https://github.com/hyperledger/indy-crypto).

There is a deb package of libindy-crypto that can be used on Ubuntu:
```
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88
sudo add-apt-repository "deb https://repo.sovrin.org/deb xenial master"
sudo apt-get update
sudo apt-get install libindy-crypto
```

See [Indy-Crypto](https://github.com/hyperledger/indy-crypto) on how it can be installed on other platforms.


### Setup RocksDB

Indy depends on RocksDB, an embeddable persistent key-value store for fast storage.

Currently Indy requires RocksDB version 5.8.8 or higher. There is a deb package of RocksDB-5.8.8 and related stuff that
can be used on Ubuntu 16.04 (repository configuration steps may be skipped if Indy-Crypto installation steps have been done):
can be used on Ubuntu 16.04:
```
# Start of repository configuration steps
sudo apt-get update
Expand Down
2 changes: 1 addition & 1 deletion environment/docker/baseimage/indy-core-repo.preferences
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Package: /indy-crypto/ /libindy/
Package: /libindy/
Pin: release l=Indy Main Repository
Pin-Priority: 1000
2 changes: 1 addition & 1 deletion indy_common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
# Top level package to be updated via pool upgrade command
UPGRADE_ENTRY = 'indy-node'

PACKAGES_TO_HOLD = ['indy-plenum', 'indy-node', 'python3-indy-crypto', 'libindy-crypto',
PACKAGES_TO_HOLD = ['indy-plenum', 'indy-node',
# From indy-plenum:
'python3-ioflo', 'python3-orderedset', 'python3-base58', 'python3-prompt-toolkit', 'python3-rlp', 'python3-sha3',
'python3-libnacl', 'python3-six', 'python3-portalocker', 'python3-sortedcontainers',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,22 @@ def test_node_as_depend(monkeypatch, tconf):
nct = NodeControlTool(config=tconf)
top_level_package = (EXT_PKT_NAME, EXT_PKT_VERSION)
plenum_package = ('indy-plenum', '0.0.3')
python_crypto = ('python3-indy-crypto', '0.4.5')
libindy_crypto = ('libindy-crypto', '0.4.5')
top_level_package_with_version = '{}={}'.format(*top_level_package)
top_level_package_dep1_with_version = '{}={}'.format(*EXT_TOP_PKT_DEPS[0])
top_level_package_dep2_with_version = '{}={}'.format(*EXT_TOP_PKT_DEPS[1])
node_package_with_version = '{}={}'.format(*node_package)
plenum_package_with_version = '{}={}'.format(*plenum_package)
python_crypto_with_version = '{}={}'.format(*python_crypto)
libindy_crypto_with_version = '{}={}'.format(*libindy_crypto)
mock_info = {
top_level_package_with_version: "{}\nVersion:{}\nDepends:{} (= {}), {} (= {}), {} (= {})\n".format(
randomText(100), top_level_package[1], *node_package, *EXT_TOP_PKT_DEPS[0], *EXT_TOP_PKT_DEPS[1]),
node_package_with_version: '{}\nVersion:{}\nDepends:{} (= {})\n'.format(
randomText(100), node_package[1], *plenum_package),
plenum_package_with_version: '{}\nVersion:{}\nDepends:{} (= {})\n'.format(
randomText(100), plenum_package[1], *python_crypto),
randomText(100), plenum_package[1], randomText(100)),
top_level_package_dep1_with_version: '{}\nVersion:{}\nDepends:{} (= {})\n'.format(
randomText(100), EXT_TOP_PKT_DEPS[0][1], *plenum_package),
top_level_package_dep2_with_version: '{}\nVersion:{}\nDepends:{} (= {})\n'.format(
randomText(100), EXT_TOP_PKT_DEPS[1][1], *node_package),
python_crypto_with_version: '{}\nVersion:{}\nDepends:{} (= {})\n'.format(
randomText(100), python_crypto[1], *libindy_crypto),
libindy_crypto_with_version: '{}\nVersion:{}\nDepends: \n{}'.format(
randomText(100), libindy_crypto[1], randomText(100)),
}

def mock_get_info_from_package_manager(*package):
Expand All @@ -66,12 +58,10 @@ def mock_get_info_from_package_manager(*package):
lambda *x: mock_get_info_from_package_manager(*x))
monkeypatch.setattr(NodeControlUtil, 'get_sys_holds',
lambda *x: [top_level_package[0], plenum_package[0], node_package[0],
EXT_TOP_PKT_DEPS[0][0], EXT_TOP_PKT_DEPS[1][0], python_crypto[0],
libindy_crypto[0]])
EXT_TOP_PKT_DEPS[0][0], EXT_TOP_PKT_DEPS[1][0]])
monkeypatch.setattr(NodeControlUtil, '_get_curr_info', lambda *x: PACKAGE_MNG_EXT_PTK_OUTPUT)
ret = nct._get_deps_list(top_level_package_with_version)
nct.server.close()
assert sorted(ret.split()) == sorted([libindy_crypto_with_version,
python_crypto_with_version, plenum_package_with_version,
assert sorted(ret.split()) == sorted([plenum_package_with_version,
node_package_with_version, top_level_package_dep2_with_version,
top_level_package_dep1_with_version, top_level_package_with_version])
2 changes: 0 additions & 2 deletions pool_automation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ Parameters:
- _indy_node_channel_ (master): which release channel to use (master/rc/stable)
- _indy_node_ver_
- _indy_plenum_ver_
- _python_indy_crypto_ver_
- _libindy_crypto_ver_

Todos:
- allow providing only _indy_node_ver_
Expand Down
2 changes: 0 additions & 2 deletions pool_automation/roles/indy_node/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ indy_node_channel: master
# TODO remove default values for versions
indy_node_ver: 1.6.563
indy_plenum_ver: 1.6.501
python_indy_crypto_ver: 0.4.1
libindy_crypto_ver: 0.4.0

# configuration parameters
indy_node_configuration: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
indy_node_ver: 1.6.563
indy_plenum_ver: 1.6.501
python_indy_crypto_ver: 0.4.1
libindy_crypto_ver: 0.4.0
...
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,12 @@ def ansible_vars(host):
def test_correct_package_versions_are_installed(host, ansible_vars):
indy_node = host.package('indy-node')
indy_plenum = host.package('indy-plenum')
python_indy_crypto = host.package('python3-indy-crypto')
libindy_crypto = host.package('libindy-crypto')

assert indy_node.is_installed
assert indy_plenum.is_installed
assert python_indy_crypto.is_installed
assert libindy_crypto.is_installed

assert indy_node.version == ansible_vars['indy_node_ver']
assert indy_plenum.version == ansible_vars['indy_plenum_ver']
assert python_indy_crypto.version == ansible_vars['python_indy_crypto_ver']
assert libindy_crypto.version == ansible_vars['libindy_crypto_ver']


def test_node_service_is_enabled(host):
Expand Down
4 changes: 0 additions & 4 deletions pool_automation/roles/indy_node/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
- indy_node_channel
- indy_node_ver
- indy_plenum_ver
- python_indy_crypto_ver
- libindy_crypto_ver
- network_name
- indy_node_pool_dir_name
- indy_node_pool_genesis_txns_name
Expand All @@ -27,8 +25,6 @@
name:
- "indy-node={{ indy_node_ver }}"
- "indy-plenum={{ indy_plenum_ver }}"
- "libindy-crypto={{ libindy_crypto_ver }}"
- "python3-indy-crypto={{ python_indy_crypto_ver }}"
update_cache: true
become: true

Expand Down
4 changes: 1 addition & 3 deletions scripts/ansible/pool_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
sovrin_ver: 1.1.148
node_ver: 1.10.0~dev1070
plenum_ver: 1.10.0~dev880
python_indy_crypto_ver: 0.4.5
libindy_crypto_ver: 0.4.5
plugin_ver: 1.0.2~dev82

tasks:
Expand All @@ -31,7 +29,7 @@
run_once: yes

- name: Install indy-node
apt: "name=sovrin={{ sovrin_ver }},indy-node={{ node_ver }},indy-plenum={{ plenum_ver }},libindy-crypto={{ libindy_crypto_ver }},python3-indy-crypto={{ python_indy_crypto_ver }},sovtoken={{ plugin_ver }},sovtokenfees={{ plugin_ver }} force=yes update_cache=yes"
apt: "name=sovrin={{ sovrin_ver }},indy-node={{ node_ver }},indy-plenum={{ plenum_ver }},sovtoken={{ plugin_ver }},sovtokenfees={{ plugin_ver }} force=yes update_cache=yes"
become: yes

- name: Make indy config dir
Expand Down

0 comments on commit 11a7e13

Please sign in to comment.