From f5cb6e38d650a00af8e2069e4b57b15a9fb8bcec Mon Sep 17 00:00:00 2001 From: Victor Grau Serrat Date: Thu, 22 Mar 2018 12:13:55 -0600 Subject: [PATCH 01/11] DOC: fixed formatting of release notes --- docs/source/releases.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/releases.rst b/docs/source/releases.rst index 73e9e5ff..19f46700 100644 --- a/docs/source/releases.rst +++ b/docs/source/releases.rst @@ -9,9 +9,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. From 30dbeaa5fb19875bb0526c4d8af8c699894190d0 Mon Sep 17 00:00:00 2001 From: Victor Date: Thu, 22 Mar 2018 15:18:55 -0600 Subject: [PATCH 02/11] DOC: Updated README with link to the forum. --- README.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 7bb7361c..a79ed8a0 100644 --- a/README.rst +++ b/README.rst @@ -22,9 +22,11 @@ visit `enigma.co `_ to learn more about Catalyst. Catalyst builds on top of the well-established `Zipline `_ project. We did our best to minimize structural changes to the general API to maximize compatibility with -existing trading algorithms, developer knowledge, and tutorials. Join us on -`Discord `_ where we have a *#catalyst_dev* channel -for questions around Catalyst, algorithmic trading and technical support. +existing trading algorithms, developer knowledge, and tutorials. Join us on the +`Catalyst Forum `_ for questions around Catalyst, +algorithmic trading and technical support. We also have a +`Discord `_ group with the *#catalyst_dev* and +*#catalyst_setup* dedicated channels. Overview ======== From 7c4467d8002d971ec2d3955adfc7f7592a9c4911 Mon Sep 17 00:00:00 2001 From: Victor Date: Thu, 22 Mar 2018 15:15:31 -0600 Subject: [PATCH 03/11] DOC: added forum button in README --- README.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.rst b/README.rst index a79ed8a0..e6275d39 100644 --- a/README.rst +++ b/README.rst @@ -5,6 +5,7 @@ |version tag| |version status| +|forum| |discord| |twitter| @@ -62,6 +63,9 @@ Go to our `Documentation Website `_. .. |version status| image:: https://img.shields.io/pypi/pyversions/enigma-catalyst.svg :target: https://pypi.python.org/pypi/enigma-catalyst + +.. |forum| image:: https://img.shields.io/badge/forum-join-green.svg + :target: https://catalyst.enigma.co/ .. |discord| image:: https://img.shields.io/badge/discord-join%20chat-green.svg :target: https://discordapp.com/invite/SJK32GY From 0db995034720c570e023920c278e2be8b44e7bcd Mon Sep 17 00:00:00 2001 From: Victor Grau Serrat Date: Thu, 22 Mar 2018 15:24:50 -0600 Subject: [PATCH 04/11] DOC: link to forum from install doc --- docs/source/install.rst | 4 ++++ 1 file changed, 4 insertions(+) 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 From b979ffd123d05ab4a5ccec6460569751983c7f72 Mon Sep 17 00:00:00 2001 From: Victor Grau Serrat Date: Fri, 23 Mar 2018 12:38:37 -0600 Subject: [PATCH 05/11] BLD: [mktplace] json handling improvement --- catalyst/marketplace/marketplace.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/catalyst/marketplace/marketplace.py b/catalyst/marketplace/marketplace.py index a703bb70..51d146a6 100644 --- a/catalyst/marketplace/marketplace.py +++ b/catalyst/marketplace/marketplace.py @@ -70,7 +70,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 +87,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, From 22249506e653bf57c1c0802f441d23c6868d4d13 Mon Sep 17 00:00:00 2001 From: AvishaiW Date: Sun, 25 Mar 2018 22:53:01 +0300 Subject: [PATCH 06/11] BUG: #214 #287 added arguments to the _reduce_ function in tha Asset class --- catalyst/assets/_assets.pyx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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) From 887a7cc825a954853ecff183f4d1aebe9dbdc234 Mon Sep 17 00:00:00 2001 From: Victor Date: Mon, 26 Mar 2018 17:22:53 -0600 Subject: [PATCH 07/11] BUG: [mktplace] removing whitespace from datasets to register --- catalyst/marketplace/marketplace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalyst/marketplace/marketplace.py b/catalyst/marketplace/marketplace.py index 51d146a6..1a27378f 100644 --- a/catalyst/marketplace/marketplace.py +++ b/catalyst/marketplace/marketplace.py @@ -644,7 +644,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() From 132dffd239d155c453b3ce5e186104dc393cd204 Mon Sep 17 00:00:00 2001 From: Victor Grau Serrat Date: Tue, 27 Mar 2018 13:22:21 -0600 Subject: [PATCH 08/11] BLD: [mktplace] progress indicator for publishing data --- catalyst/marketplace/marketplace.py | 31 ++++++++++++++---------- catalyst/marketplace/utils/auth_utils.py | 2 +- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/catalyst/marketplace/marketplace.py b/catalyst/marketplace/marketplace.py index 1a27378f..bc1abad9 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, @@ -784,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, 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'), From af85ee31c9b94846c82aa992d5b1c99ba711a35d Mon Sep 17 00:00:00 2001 From: Victor Grau Serrat Date: Tue, 27 Mar 2018 18:12:08 -0600 Subject: [PATCH 09/11] BUG: [mktplace] progress counters start at 1, not 0 --- catalyst/marketplace/marketplace.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/catalyst/marketplace/marketplace.py b/catalyst/marketplace/marketplace.py index bc1abad9..4b7da304 100644 --- a/catalyst/marketplace/marketplace.py +++ b/catalyst/marketplace/marketplace.py @@ -523,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))) @@ -791,7 +791,7 @@ class Marketplace: files = [] for idx, file in enumerate(filenames): log.info('Uploading file {} of {}: {}'.format( - idx, len(filenames), file)) + idx+1, len(filenames), file)) files = [] files.append(('file', open(file, 'rb'))) From 17f9906df42150a182519a5182814b0c34302448 Mon Sep 17 00:00:00 2001 From: Victor Grau Serrat Date: Thu, 29 Mar 2018 08:01:58 -0600 Subject: [PATCH 10/11] DOC: updated release notes for 0.5.7 --- docs/source/releases.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/source/releases.rst b/docs/source/releases.rst index 19f46700..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 From c29b1ef3c1fe4ce1429fa5d6493a3c1d2fa13103 Mon Sep 17 00:00:00 2001 From: Victor Grau Serrat Date: Thu, 29 Mar 2018 08:26:09 -0600 Subject: [PATCH 11/11] BLD: deployment of marketplace on mainnet --- catalyst/marketplace/contract_enigma_address.txt | 2 +- catalyst/marketplace/contract_marketplace_address.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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