From 26e295145119a4e6ae1f7a6e094642faa94e53c9 Mon Sep 17 00:00:00 2001 From: Luke Date: Fri, 19 Aug 2022 22:11:31 +0100 Subject: [PATCH 1/7] Docker: Specify image arch's to build (#348) --- .github/workflows/publish-image.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml index b59bc71..f73e3e6 100644 --- a/.github/workflows/publish-image.yml +++ b/.github/workflows/publish-image.yml @@ -16,6 +16,12 @@ jobs: packages: write steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Checkout repository uses: actions/checkout@v3 @@ -36,6 +42,7 @@ jobs: uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: context: . + platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From cd4aa90c5dd285b3250eb97cb775458fecd6c879 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?DJ=CE=9ERFY?= Date: Fri, 26 Aug 2022 23:29:42 +0200 Subject: [PATCH 2/7] Support Chia 1.5.1 (#352) --- src/chia_log/parsers/wallet_added_coin_parser.py | 6 +++--- .../logs/wallet_added_coin/nominal-after-1.5.1.txt | 2 ++ tests/chia_log/parsers/test_wallet_added_coin_parser.py | 8 +++++--- 3 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 tests/chia_log/logs/wallet_added_coin/nominal-after-1.5.1.txt diff --git a/src/chia_log/parsers/wallet_added_coin_parser.py b/src/chia_log/parsers/wallet_added_coin_parser.py index 58f9261..7efdb71 100644 --- a/src/chia_log/parsers/wallet_added_coin_parser.py +++ b/src/chia_log/parsers/wallet_added_coin_parser.py @@ -25,8 +25,8 @@ class WalletAddedCoinParser: def __init__(self): logging.info("Enabled parser for wallet activity - added coins.") self._regex = re.compile( - r"([0-9:.]*) wallet (?:src|chia).wallet.wallet_state_manager(?:\s?): " - r"INFO\s*Adding( | record to state manager )?coin: {'amount': ([0-9]*)," + r"([0-9:.]*) wallet (?:src|chia).wallet.wallet_(?:state_manager|node)(?:\s*)?: " + r"INFO\s*(?:Adding|Adding record to state manager|request) coin: (?:\w*{'coin': )?{'amount': ([0-9]*)," ) def parse(self, logs: str) -> List[WalletAddedCoinMessage]: @@ -42,7 +42,7 @@ def parse(self, logs: str) -> List[WalletAddedCoinMessage]: parsed_messages.append( WalletAddedCoinMessage( timestamp=dateutil_parser.parse(match[0]), - amount_mojos=int(match[2]), + amount_mojos=int(match[1]), ) ) diff --git a/tests/chia_log/logs/wallet_added_coin/nominal-after-1.5.1.txt b/tests/chia_log/logs/wallet_added_coin/nominal-after-1.5.1.txt new file mode 100644 index 0000000..324427f --- /dev/null +++ b/tests/chia_log/logs/wallet_added_coin/nominal-after-1.5.1.txt @@ -0,0 +1,2 @@ +15:37:11.668 wallet chia.wallet.wallet_node : INFO request coin: cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc{'coin': {'amount': 250000000000, +16:53:59.677 wallet chia.wallet.wallet_node : INFO request coin: 1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff{'coin': {'amount': 1750000000000, diff --git a/tests/chia_log/parsers/test_wallet_added_coin_parser.py b/tests/chia_log/parsers/test_wallet_added_coin_parser.py index a6c3ef8..b488cdc 100644 --- a/tests/chia_log/parsers/test_wallet_added_coin_parser.py +++ b/tests/chia_log/parsers/test_wallet_added_coin_parser.py @@ -11,12 +11,14 @@ def setUp(self) -> None: self.parser = WalletAddedCoinParser() self.example_logs_path = Path(__file__).resolve().parents[1] / "logs/wallet_added_coin" with open(self.example_logs_path / "nominal-before-1.4.0.txt", encoding="UTF-8") as f: - self.nominal_logs_before = f.read() + self.nominal_logs_before_140 = f.read() with open(self.example_logs_path / "nominal-after-1.4.0.txt", encoding="UTF-8") as f: - self.nominal_logs_after = f.read() + self.nominal_logs_after_140 = f.read() + with open(self.example_logs_path / "nominal-after-1.5.1.txt", encoding="UTF-8") as f: + self.nominal_logs_after_151 = f.read() def testBasicParsing(self): - for nominal_logs in [self.nominal_logs_before, self.nominal_logs_after]: + for nominal_logs in [self.nominal_logs_before_140, self.nominal_logs_after_140, self.nominal_logs_after_151]: added_coins = self.parser.parse(nominal_logs) total_mojos = 0 for coin in added_coins: From 0ce52711550cbd85308f9a1ae0e5820134721a89 Mon Sep 17 00:00:00 2001 From: Martin Mihaylov <3739458+martomi@users.noreply.github.com> Date: Fri, 26 Aug 2022 23:39:00 +0200 Subject: [PATCH 3/7] CHANGELOG: Add version 0.7.3 (#353) --- CHANGELOG.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ce6b78..7b13962 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [0.7.3] - 2022-08-26 + +### Added +- Docker image build for linux/arm64 architecture - thanks [@lryanuk](https://github.com/lryanuk)! + +### Fixed +- Fixed wallet parser for Chia v1.5.1+ - thanks [@djerfy](https://github.com/djerfy)! + ## [0.7.2] - 2022-07-04 ### Fixed @@ -222,7 +230,9 @@ The purpose of this minor release is to get out a few fixes. No new features in - Adds basic condition checks for harvester operations. - Adds integration for Pushover (mobile notifications). -[Unreleased]: https://github.com/martomi/chiadog/compare/v0.7.2...main +[Unreleased]: https://github.com/martomi/chiadog/compare/v0.7.3...main + +[0.7.3]: https://github.com/martomi/chiadog/compare/v0.7.2...v0.7.3 [0.7.2]: https://github.com/martomi/chiadog/compare/v0.7.1...v0.7.2 From 2e8fee82cef7caee37909896e00b9a3f4197036c Mon Sep 17 00:00:00 2001 From: Martin Mihaylov <3739458+martomi@users.noreply.github.com> Date: Wed, 2 Nov 2022 20:47:26 +0100 Subject: [PATCH 4/7] Bump paramiko to 2.11.0 (#354) --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 22d522e..d1588ea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -paramiko==2.10.1 +paramiko==2.11.0 python-dateutil~=2.8.1 PyYAML==5.4 retry==0.9.2 -pygtail==0.11.1 \ No newline at end of file +pygtail==0.11.1 From 6f5be9ed7bc551eef355b2b3b26d6dd93202ee21 Mon Sep 17 00:00:00 2001 From: Martin Mihaylov <3739458+martomi@users.noreply.github.com> Date: Wed, 2 Nov 2022 20:53:51 +0100 Subject: [PATCH 5/7] CHANGELOG: Add version 0.7.4 --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b13962..570ed9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [0.7.4] - 2022-11-02 + +### Fixed +- Bumped `paramiko` dependency to latest version (2.11.0) to fix a deprecation warning + ## [0.7.3] - 2022-08-26 ### Added @@ -230,7 +235,9 @@ The purpose of this minor release is to get out a few fixes. No new features in - Adds basic condition checks for harvester operations. - Adds integration for Pushover (mobile notifications). -[Unreleased]: https://github.com/martomi/chiadog/compare/v0.7.3...main +[Unreleased]: https://github.com/martomi/chiadog/compare/v0.7.4...main + +[0.7.4]: https://github.com/martomi/chiadog/compare/v0.7.3...v0.7.4 [0.7.3]: https://github.com/martomi/chiadog/compare/v0.7.2...v0.7.3 From 29a82fe9fa758d6346fe57750196e0b1d449bb33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?DJ=CE=9ERFY?= Date: Mon, 7 Nov 2022 23:33:38 +0100 Subject: [PATCH 6/7] Support wallet notification for Chia 1.6.1 (#356) * Support wallet notification for Chia 1.6.1 * Reformat list in test_wallet_added_coin_parser.py --- src/chia_log/parsers/wallet_added_coin_parser.py | 2 +- .../logs/wallet_added_coin/nominal-after-1.6.1.txt | 2 ++ tests/chia_log/parsers/test_wallet_added_coin_parser.py | 9 ++++++++- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 tests/chia_log/logs/wallet_added_coin/nominal-after-1.6.1.txt diff --git a/src/chia_log/parsers/wallet_added_coin_parser.py b/src/chia_log/parsers/wallet_added_coin_parser.py index 7efdb71..583f56a 100644 --- a/src/chia_log/parsers/wallet_added_coin_parser.py +++ b/src/chia_log/parsers/wallet_added_coin_parser.py @@ -26,7 +26,7 @@ def __init__(self): logging.info("Enabled parser for wallet activity - added coins.") self._regex = re.compile( r"([0-9:.]*) wallet (?:src|chia).wallet.wallet_(?:state_manager|node)(?:\s*)?: " - r"INFO\s*(?:Adding|Adding record to state manager|request) coin: (?:\w*{'coin': )?{'amount': ([0-9]*)," + r"INFO\s*(?:Adding|Adding record to state manager|request) coin: (?:.*)'?amount'?: ([0-9]*)(\s})?," ) def parse(self, logs: str) -> List[WalletAddedCoinMessage]: diff --git a/tests/chia_log/logs/wallet_added_coin/nominal-after-1.6.1.txt b/tests/chia_log/logs/wallet_added_coin/nominal-after-1.6.1.txt new file mode 100644 index 0000000..82c9c03 --- /dev/null +++ b/tests/chia_log/logs/wallet_added_coin/nominal-after-1.6.1.txt @@ -0,0 +1,2 @@ +06:33:18.310 wallet chia.wallet.wallet_node : INFO request coin: ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccCoinState { coin: Coin { parent_coin_info: cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc, puzzle_hash: cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc, amount: 250000000000 }, spent_height: None, created_height: Some(0000000) } +06:33:18.310 wallet chia.wallet.wallet_node : INFO request coin: 1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffCoinState { coin: Coin { parent_coin_info: 1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, puzzle_hash: 1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, amount: 1750000000000 }, spent_height: None, created_height: Some(0000000) } diff --git a/tests/chia_log/parsers/test_wallet_added_coin_parser.py b/tests/chia_log/parsers/test_wallet_added_coin_parser.py index b488cdc..7923cb5 100644 --- a/tests/chia_log/parsers/test_wallet_added_coin_parser.py +++ b/tests/chia_log/parsers/test_wallet_added_coin_parser.py @@ -16,9 +16,16 @@ def setUp(self) -> None: self.nominal_logs_after_140 = f.read() with open(self.example_logs_path / "nominal-after-1.5.1.txt", encoding="UTF-8") as f: self.nominal_logs_after_151 = f.read() + with open(self.example_logs_path / "nominal-after-1.6.1.txt", encoding="UTF-8") as f: + self.nominal_logs_after_161 = f.read() def testBasicParsing(self): - for nominal_logs in [self.nominal_logs_before_140, self.nominal_logs_after_140, self.nominal_logs_after_151]: + for nominal_logs in [ + self.nominal_logs_before_140, + self.nominal_logs_after_140, + self.nominal_logs_after_151, + self.nominal_logs_after_161, + ]: added_coins = self.parser.parse(nominal_logs) total_mojos = 0 for coin in added_coins: From aa3305cb70f3fbdca59093aa0abacdaf65726fa8 Mon Sep 17 00:00:00 2001 From: Martin Mihaylov <3739458+martomi@users.noreply.github.com> Date: Mon, 7 Nov 2022 23:37:40 +0100 Subject: [PATCH 7/7] CHANGELOG: Deprecate in favor of Releases --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 570ed9f..ef3fae2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## Important Notice + +Starting from version `0.7.5`, **this CHANGELOG is deprecated** in favor of the [Releases +Page](https://github.com/martomi/chiadog/releases). ## [0.7.4] - 2022-11-02