From 899409b4381d93dae01ba0232d97529696b78b4f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 16:09:42 +0200 Subject: [PATCH 1/3] build(deps): bump marshmallow in the other-dependencies group (#128) Bumps the other-dependencies group with 1 update: [marshmallow](https://github.com/marshmallow-code/marshmallow). Updates `marshmallow` from 3.22.0 to 3.23.0 - [Changelog](https://github.com/marshmallow-code/marshmallow/blob/dev/CHANGELOG.rst) - [Commits](https://github.com/marshmallow-code/marshmallow/compare/3.22.0...3.23.0) --- updated-dependencies: - dependency-name: marshmallow dependency-type: direct:production update-type: version-update:semver-minor dependency-group: other-dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 16 ++++++++-------- pyproject.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/poetry.lock b/poetry.lock index ae2bd60..16c2c30 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1958,22 +1958,22 @@ files = [ [[package]] name = "marshmallow" -version = "3.22.0" +version = "3.23.0" description = "A lightweight library for converting complex datatypes to and from native Python datatypes." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "marshmallow-3.22.0-py3-none-any.whl", hash = "sha256:71a2dce49ef901c3f97ed296ae5051135fd3febd2bf43afe0ae9a82143a494d9"}, - {file = "marshmallow-3.22.0.tar.gz", hash = "sha256:4972f529104a220bb8637d595aa4c9762afbe7f7a77d82dc58c1615d70c5823e"}, + {file = "marshmallow-3.23.0-py3-none-any.whl", hash = "sha256:82f20a2397834fe6d9611b241f2f7e7b680ed89c49f84728a1ad937be6b4bdf4"}, + {file = "marshmallow-3.23.0.tar.gz", hash = "sha256:98d8827a9f10c03d44ead298d2e99c6aea8197df18ccfad360dae7f89a50da2e"}, ] [package.dependencies] packaging = ">=17.0" [package.extras] -dev = ["marshmallow[tests]", "pre-commit (>=3.5,<4.0)", "tox"] -docs = ["alabaster (==1.0.0)", "autodocsumm (==0.2.13)", "sphinx (==8.0.2)", "sphinx-issues (==4.1.0)", "sphinx-version-warning (==1.1.2)"] -tests = ["pytest", "pytz", "simplejson"] +dev = ["marshmallow[tests]", "pre-commit (>=3.5,<5.0)", "tox"] +docs = ["alabaster (==1.0.0)", "autodocsumm (==0.2.13)", "sphinx (==8.1.3)", "sphinx-issues (==5.0.0)", "sphinx-version-warning (==1.1.2)"] +tests = ["pytest", "simplejson"] [[package]] name = "mccabe" @@ -3888,4 +3888,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "7d6f719a25e5c160f18be330737eaac3ede6cd013c47e8fec8be0d85a2a29058" +content-hash = "49d44d7e889eb4adb358df69a956e92ecbb44bb8ce89e546767cd371702fc296" diff --git a/pyproject.toml b/pyproject.toml index 661d6bd..d8a68bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ Cerberus = "1.3.4" Flask = "3.0.3" Flask-Cors = "5.0.0" Flask-RESTful = "0.3.10" -marshmallow = "3.22.0" +marshmallow = "3.23.0" psycopg2-binary = "2.9.10" PyYAML = "6.0.1" SQLAlchemy = "2.0.36" From d16e50fd925178f903f4c388b45ce6ec9f449652 Mon Sep 17 00:00:00 2001 From: Danut Date: Fri, 18 Oct 2024 16:28:39 +0200 Subject: [PATCH 2/3] fix: remove validator fee from same-blockchain bids (#124) Co-authored-by: Juan M. Tirado --- docker-compose.yml | 8 ++++---- pantos/servicenode/business/plugins.py | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 367861b..4e6e42a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -67,10 +67,10 @@ services: target: /opt/pantos/pantos-service-node/alembic.ini - action: sync+restart path: service-node-config.env - target: /root/service-node-config.env + target: /etc/pantos/service-node-config.env - action: sync+restart path: bids.yml - target: /etc/service-node-bids.yml + target: /etc/pantos/service-node-bids.yml - action: rebuild path: Dockerfile - action: rebuild @@ -141,10 +141,10 @@ services: target: /opt/pantos/pantos-service-node/alembic.ini - action: sync+restart path: service-node-config.env - target: /root/service-node-config.env + target: /etc/pantos/service-node-config.env - action: sync+restart path: bids.yml - target: /etc/service-node-bids.yml + target: /etc/pantos/service-node-bids.yml - action: rebuild path: Dockerfile - action: rebuild diff --git a/pantos/servicenode/business/plugins.py b/pantos/servicenode/business/plugins.py index 9f9545a..5960a78 100644 --- a/pantos/servicenode/business/plugins.py +++ b/pantos/servicenode/business/plugins.py @@ -69,8 +69,9 @@ def replace_bids(self, source_blockchain: Blockchain) -> int: bids, delay = bid_plugin.get_bids(source_blockchain.value, destination_blockchain.value, **bids_arguments) - self.__add_validator_fee(bids, source_blockchain_factor, - destination_blockchain_factor) + if source_blockchain is not destination_blockchain: + self.__add_validator_fee(bids, source_blockchain_factor, + destination_blockchain_factor) _logger.debug(f'Saving {len(bids)} bids in database') bids = [dataclasses.asdict(bid) for bid in bids] replace_bids(source_blockchain.value, From f3b1a7a75671eef3c99072c289ad6d83bb667b61 Mon Sep 17 00:00:00 2001 From: "Juan M. Tirado" Date: Fri, 18 Oct 2024 16:48:39 +0200 Subject: [PATCH 3/3] fix: unify cached docker (#119) * fix: unify cached docker --- .github/workflows/build.yml | 2 +- .github/workflows/ci.yaml | 4 ++-- .github/workflows/publish-docker.yaml | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b4f64b..cc20a29 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,7 +35,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10"] + python-version: ["3.12"] architecture: ["amd64"] steps: - name: Harden Runner diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bccde19..4eeea44 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -69,9 +69,9 @@ jobs: uses: actions/cache@v4 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-v1.0-service-node-${{ matrix.arch}}-${{ github.ref_name }} + key: ${{ runner.os }}-buildx-v1.0-service-node-${{ matrix.arch }}-${{ github.ref_name }} restore-keys: | - ${{ runner.os }}-buildx-v1.0-service-node-${{ matrix.arch}}- + ${{ runner.os }}-buildx-v1.0-service-node-${{ matrix.arch }}- - name: Check docker config and disable live reload run: | diff --git a/.github/workflows/publish-docker.yaml b/.github/workflows/publish-docker.yaml index 42ee7eb..274cb58 100644 --- a/.github/workflows/publish-docker.yaml +++ b/.github/workflows/publish-docker.yaml @@ -50,9 +50,9 @@ jobs: uses: actions/cache@v4 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-v1.0-service-node-${{ github.sha }} + key: ${{ runner.os }}-to-publish-service-node-${{ matrix.arch }}-${{ github.ref_name }} restore-keys: | - ${{ runner.os }}-buildx-v1.0-service-node- + ${{ runner.os }}-to-publish-service-node-${{ matrix.arch }}- - uses: actions/download-artifact@v4 with: @@ -89,7 +89,7 @@ jobs: docker buildx bake \ --set "*.cache-from=type=local,src=/tmp/.buildx-cache" \ --set "*.cache-to=type=local,dest=/tmp/.buildx-cache-new" \ - --set "*.platform=linux/amd64,linux/arm64" \ + --set "*.platform=linux/amd64" \ --builder ${{ steps.buildx.outputs.name }} \ --sbom=true \ --push \