diff --git a/catalyst/assets/_assets.pyx b/catalyst/assets/_assets.pyx
index f80fbf4a..22a637fe 100644
--- a/catalyst/assets/_assets.pyx
+++ b/catalyst/assets/_assets.pyx
@@ -630,23 +630,28 @@ cdef class TradingPair(Asset):
and whose second element is a tuple of all the attributes that should
be serialized/deserialized during pickling.
"""
- #TODO: make sure that all fields set there
+ # added arguments for catalyst
return (self.__class__, (self.symbol,
self.exchange,
self.start_date,
self.asset_name,
self.sid,
self.leverage,
+ self.end_daily,
+ self.end_minute,
self.end_date,
+ self.exchange_symbol,
self.first_traded,
self.auto_close_date,
self.exchange_full,
self.min_trade_size,
self.max_trade_size,
+ self.maker,
+ self.taker,
self.lot,
self.decimals,
- self.taker,
- self.maker))
+ self.trading_state,
+ self.data_source))
def make_asset_array(int size, Asset asset):
cdef np.ndarray out = np.empty([size], dtype=object)
diff --git a/catalyst/marketplace/contract_enigma_address.txt b/catalyst/marketplace/contract_enigma_address.txt
index 8ce1f421..85ef0ff2 100644
--- a/catalyst/marketplace/contract_enigma_address.txt
+++ b/catalyst/marketplace/contract_enigma_address.txt
@@ -1 +1 @@
-0x39a54f480d922a58c963de8091a6c9afc69db2cf
+0xf0ee6b27b759c9893ce4f094b49ad28fd15a23e4
\ No newline at end of file
diff --git a/catalyst/marketplace/contract_marketplace_address.txt b/catalyst/marketplace/contract_marketplace_address.txt
index 6f0728fa..2f35b6f0 100644
--- a/catalyst/marketplace/contract_marketplace_address.txt
+++ b/catalyst/marketplace/contract_marketplace_address.txt
@@ -1 +1 @@
-0xa2b37c6cd52f60fd4eb46ca59fafcf22d081aebc
\ No newline at end of file
+0xa64927358a82254be92eb1f1cb01de68d1787004
\ No newline at end of file
diff --git a/catalyst/marketplace/marketplace.py b/catalyst/marketplace/marketplace.py
index a703bb70..4b7da304 100644
--- a/catalyst/marketplace/marketplace.py
+++ b/catalyst/marketplace/marketplace.py
@@ -20,7 +20,6 @@ from requests_toolbelt.multipart.decoder import \
from catalyst.constants import (
LOG_LEVEL, AUTH_SERVER, ETH_REMOTE_NODE, MARKETPLACE_CONTRACT,
MARKETPLACE_CONTRACT_ABI, ENIGMA_CONTRACT, ENIGMA_CONTRACT_ABI)
-from catalyst.utils.cli import maybe_show_progress
from catalyst.exchange.utils.stats_utils import set_print_settings
from catalyst.marketplace.marketplace_errors import (
MarketplacePubAddressEmpty, MarketplaceDatasetNotFound,
@@ -70,7 +69,10 @@ class Marketplace:
contract_url.info().get_content_charset()).strip())
abi_url = urllib.urlopen(MARKETPLACE_CONTRACT_ABI)
- abi = json.load(abi_url)
+ abi_url = abi_url.read().decode(
+ abi_url.info().get_content_charset())
+
+ abi = json.loads(abi_url)
self.mkt_contract = self.web3.eth.contract(
self.mkt_contract_address,
@@ -84,7 +86,10 @@ class Marketplace:
contract_url.info().get_content_charset()).strip())
abi_url = urllib.urlopen(ENIGMA_CONTRACT_ABI)
- abi = json.load(abi_url)
+ abi_url = abi_url.read().decode(
+ abi_url.info().get_content_charset())
+
+ abi = json.loads(abi_url)
self.eng_contract = self.web3.eth.contract(
self.eng_contract_address,
@@ -518,7 +523,7 @@ class Marketplace:
# iter(decoder.parts),
# True,
# label='Processing files') as part:
- counter = 0
+ counter = 1
for part in decoder.parts:
log.info("Processing file {} of {}".format(
counter, len(decoder.parts)))
@@ -638,7 +643,7 @@ class Marketplace:
def register(self):
while True:
desc = input('Enter the name of the dataset to register: ')
- dataset = desc.lower()
+ dataset = desc.lower().strip()
provider_info = self.mkt_contract.functions.getDataProviderInfo(
Web3.toHex(dataset)
).call()
@@ -778,26 +783,32 @@ class Marketplace:
else:
key, secret = get_key_secret(provider_info[0], match['wallet'])
- headers = get_signed_headers(dataset, key, secret)
filenames = glob.glob(os.path.join(datadir, '*.csv'))
if not filenames:
raise MarketplaceNoCSVFiles(datadir=datadir)
files = []
- for file in filenames:
+ for idx, file in enumerate(filenames):
+ log.info('Uploading file {} of {}: {}'.format(
+ idx+1, len(filenames), file))
+ files = []
files.append(('file', open(file, 'rb')))
- r = requests.post('{}/marketplace/publish'.format(AUTH_SERVER),
- files=files,
- headers=headers)
+ headers = get_signed_headers(dataset, key, secret)
+ r = requests.post('{}/marketplace/publish'.format(AUTH_SERVER),
+ files=files,
+ headers=headers)
- if r.status_code != 200:
- raise MarketplaceHTTPRequest(request='upload file',
- error=r.status_code)
+ if r.status_code != 200:
+ raise MarketplaceHTTPRequest(request='upload file',
+ error=r.status_code)
- if 'error' in r.json():
- raise MarketplaceHTTPRequest(request='upload file',
- error=r.json()['error'])
+ if 'error' in r.json():
+ raise MarketplaceHTTPRequest(request='upload file',
+ error=r.json()['error'])
- print('Dataset {} uploaded successfully.'.format(dataset))
+ log.info('File processed successfully.')
+
+ print('\nDataset {} uploaded and processed successfully.'.format(
+ dataset))
diff --git a/catalyst/marketplace/utils/auth_utils.py b/catalyst/marketplace/utils/auth_utils.py
index 5eb0b66a..fc964a2d 100644
--- a/catalyst/marketplace/utils/auth_utils.py
+++ b/catalyst/marketplace/utils/auth_utils.py
@@ -123,7 +123,7 @@ def get_signed_headers(ds_name, key, secret):
-------
"""
- nonce = str(int(time.time()))
+ nonce = str(int(time.time() * 1000))
signature = hmac.new(
secret.encode('utf-8'),
diff --git a/docs/source/install.rst b/docs/source/install.rst
index 87f3c64c..30d408a2 100644
--- a/docs/source/install.rst
+++ b/docs/source/install.rst
@@ -562,6 +562,10 @@ If after following the instructions above, and going through the
*Troubleshooting* sections, you still experience problems installing Catalyst,
you can seek additional help through the following channels:
+- Join our `Catalyst Forum `_, and browse a variety
+ of topics and conversations around common issues that others face when using
+ Catalyst, and how to resolve them. And join the conversation!
+
- Join our `Discord community `_, and head over
the #catalyst_dev channel where many other users (as well as the project
developers) hang out, and can assist you with your particular issue. The
diff --git a/docs/source/releases.rst b/docs/source/releases.rst
index 73e9e5ff..1f9727fe 100644
--- a/docs/source/releases.rst
+++ b/docs/source/releases.rst
@@ -2,6 +2,21 @@
Release Notes
=============
+Version 0.5.7
+^^^^^^^^^^^^^
+**Release Date**: 2018-03-29
+
+Build
+~~~~~
+- Data Marketplace deployed on mainnet.
+- Added progress indicators for publishing data, and made the data publishing
+ synchronous to provide feedback to the publisher.
+
+Bug Fixes
+~~~~~~~~~
+- Added arguments to the ``reduce`` function in tha Asset class :issue:`214`,
+ :issue:`287`
+
Version 0.5.6
^^^^^^^^^^^^^
**Release Date**: 2018-03-22
@@ -9,9 +24,9 @@ Version 0.5.6
Build
~~~~~
- Data Marketplace: ensures compatibility across wallets, now fully supporting
-`ledger`, `trezor`, `keystore`, `private key`. Partial support for `metamask`
-(includes sign_msg, but not sign_tx). Current support for `Digital Bitbox` is
-unknown.
+ ``ledger``, ``trezor``, ``keystore``, ``private key``. Partial support for
+ ``metamask`` (includes sign_msg, but not sign_tx). Current support for
+ ``Digital Bitbox`` is unknown, but believed to be supported.
- Data Marketplace: Switched online provider from MyEtherWallet to MyCrypto.
- Data Marketplace: Added progress indicator for data ingestion.