diff --git a/docker-compose.yml b/docker-compose.yml index e7f7124..88b30d6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,7 +27,7 @@ services: restart: always planetmint: depends_on: - #- mongodb + - mongodb - tendermint - tarantool build: @@ -124,4 +124,4 @@ services: image: alpine command: /bin/sh -c "./planetmint/scripts/clean.sh" volumes: - - $PWD:/planetmint \ No newline at end of file + - $PWD:/planetmint diff --git a/docs/root/source/basic-usage.md b/docs/root/source/basic-usage.md index 844c309..16d9490 100644 --- a/docs/root/source/basic-usage.md +++ b/docs/root/source/basic-usage.md @@ -151,7 +151,6 @@ and Planetmint has been developed with simple logical gateways in mind. The logic got introduced by [cryptoconditions](https://https://docs.planetmint.io/projects/cryptoconditions). The cryptocondition documentation contains all details about how conditoins are defined and how they can be verified and fulfilled. -<<<<<<< HEAD The integration of such into the transaction schema of Planetmint is shown below. ## Zenroom Smart Contracts and Policies @@ -160,6 +159,3 @@ The integration of such into the transaction schema of Planetmint is shown below At the moment these contracts can only be stateless, which implies that the conditions and fulfillments need to be transacted in the same transaction. However, [PRP-10](https://github.com/planetmint/PRPs/tree/main/10) aims to make stateful contracts possible, which enables asynchronous and party-independent processing of contracts. As for network-wide or asset-based policies [PRP-11](https://github.com/planetmint/PRPs/tree/main/11) specifies how these can be implemented and how these can be used to verify a transaction state before it is commited to the network. -======= -The integration of such into the transaction schema of Planetmint is shown below. ->>>>>>> planetmint-tarantool diff --git a/docs/root/source/introduction/quickstart.md b/docs/root/source/introduction/quickstart.md index 729bfd6..5549856 100644 --- a/docs/root/source/introduction/quickstart.md +++ b/docs/root/source/introduction/quickstart.md @@ -43,11 +43,7 @@ $ python notarize.py # Install Planetmint ## Local Node Planemtint is a Tendermint applicatoin with an attached database. -<<<<<<< HEAD A basic installation installs the database, Tendermint and therafter Planetmint. -======= -A basic installation installs the database, Tenermint and therafter Planetmint. ->>>>>>> planetmint-tarantool Planetmint currently supports Tarantool and MongoDB database. The installation is as follows: ``` diff --git a/planetmint/backend/tarantool/connection.py b/planetmint/backend/tarantool/connection.py index 93e260e..ae11396 100644 --- a/planetmint/backend/tarantool/connection.py +++ b/planetmint/backend/tarantool/connection.py @@ -44,6 +44,7 @@ class TarantoolDBConnection(DBConnection): "inputs", "outputs", "keys", + "scripts" ] except tarantool.error.NetworkError as network_err: logger.info("Host cant be reached") diff --git a/planetmint/lib.py b/planetmint/lib.py index c13af74..e814999 100644 --- a/planetmint/lib.py +++ b/planetmint/lib.py @@ -13,13 +13,7 @@ from uuid import uuid4 from planetmint.backend.connection import Connection import rapidjson - -try: - from hashlib import sha3_256 -except ImportError: - # NOTE: needed for Python < 3.6 - from sha3 import sha3_256 - +from hashlib import sha3_256 import requests import planetmint diff --git a/planetmint/tendermint_utils.py b/planetmint/tendermint_utils.py index 508a1be..e1b10ec 100644 --- a/planetmint/tendermint_utils.py +++ b/planetmint/tendermint_utils.py @@ -7,11 +7,7 @@ import base64 import hashlib import json from binascii import hexlify - -try: - from hashlib import sha3_256 -except ImportError: - from sha3 import sha3_256 +from hashlib import sha3_256 def encode_transaction(value): diff --git a/planetmint/transactions/common/crypto.py b/planetmint/transactions/common/crypto.py index 0812018..d0d9bd9 100644 --- a/planetmint/transactions/common/crypto.py +++ b/planetmint/transactions/common/crypto.py @@ -6,11 +6,7 @@ # Separate all crypto code so that we can easily test several implementations from collections import namedtuple -try: - from hashlib import sha3_256 -except ImportError: - from sha3 import sha3_256 - +from hashlib import sha3_256 from cryptoconditions import crypto diff --git a/planetmint/transactions/common/transaction.py b/planetmint/transactions/common/transaction.py index 33f504c..b8269ef 100644 --- a/planetmint/transactions/common/transaction.py +++ b/planetmint/transactions/common/transaction.py @@ -20,11 +20,7 @@ import base58 from cryptoconditions import Fulfillment, ThresholdSha256, Ed25519Sha256, ZenroomSha256 from cryptoconditions.exceptions import ParsingError, ASN1DecodeError, ASN1EncodeError from cid import is_cid - -try: - from hashlib import sha3_256 -except ImportError: - from sha3 import sha3_256 +from hashlib import sha3_256 from planetmint.transactions.common.crypto import PrivateKey, hash_data from planetmint.transactions.common.exceptions import ( diff --git a/tests/common/test_transaction.py b/tests/common/test_transaction.py index 5e81937..91c624f 100644 --- a/tests/common/test_transaction.py +++ b/tests/common/test_transaction.py @@ -23,11 +23,7 @@ from cryptoconditions import PreimageSha256 from cryptoconditions import Ed25519Sha256 from pytest import mark, raises from ipld import marshal, multihash - -try: - from hashlib import sha3_256 -except ImportError: - from sha3 import sha3_256 +from hashlib import sha3_256 pytestmark = mark.bdb diff --git a/tests/tendermint/test_lib.py b/tests/tendermint/test_lib.py index c7e7077..15fce4c 100644 --- a/tests/tendermint/test_lib.py +++ b/tests/tendermint/test_lib.py @@ -8,12 +8,7 @@ import os from unittest.mock import patch from planetmint.transactions.types.assets.create import Create from planetmint.transactions.types.assets.transfer import Transfer - -try: - from hashlib import sha3_256 -except ImportError: - # NOTE: needed for Python < 3.6 - from sha3 import sha3_256 +from hashlib import sha3_256 import pytest from pymongo import MongoClient diff --git a/tests/tendermint/test_utils.py b/tests/tendermint/test_utils.py index fe9dc62..9a0ad56 100644 --- a/tests/tendermint/test_utils.py +++ b/tests/tendermint/test_utils.py @@ -6,11 +6,7 @@ import base64 import json from pytest import mark - -try: - from hashlib import sha3_256 -except ImportError: - from sha3 import sha3_256 +from hashlib import sha3_256 def test_encode_decode_transaction(b): diff --git a/tests/web/test_transactions.py b/tests/web/test_transactions.py index b2fd3e0..807f136 100644 --- a/tests/web/test_transactions.py +++ b/tests/web/test_transactions.py @@ -10,11 +10,7 @@ import base58 import pytest from cryptoconditions import Ed25519Sha256 from ipld import multihash, marshal - -try: - from hashlib import sha3_256 -except ImportError: - from sha3 import sha3_256 +from hashlib import sha3_256 from planetmint.transactions.common import crypto from planetmint.transactions.types.assets.create import Create