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 \ 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, diff --git a/poetry.lock b/poetry.lock index 3ee2c77..6976724 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1962,22 +1962,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" @@ -3996,4 +3996,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "17e8eb31c76eec0f3faeb10bebc9902e7f4044fbf4f301038da7854f8cd8bccc" +content-hash = "e139a00110ff0ac0c55ac7830ce279bacde38d21857f174b4822e17e65a1b74f" diff --git a/pyproject.toml b/pyproject.toml index 1ef699c..ff82bd2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,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"