diff --git a/.github/workflows/smoke_test.yml b/.github/workflows/smoke_test.yml index 9abd820..41e1a28 100644 --- a/.github/workflows/smoke_test.yml +++ b/.github/workflows/smoke_test.yml @@ -38,7 +38,7 @@ jobs: pwd ./tests/smoke_test.sh - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: web path: output diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c0af32c..eb60336 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,27 +8,25 @@ concurrency: jobs: test: + # Run directly on the host (not inside a python container) so the Docker CLI + # and the Compose v2 plugin are available to testcontainers 4.x, which drives + # `docker compose` as a subprocess. runs-on: ubuntu-22.04 - container: - image: python:3.11 - volumes: - - /var/run/docker.sock:/var/run/docker.sock - env: - TESTCONTAINERS_HOST_OVERRIDE: "host.docker.internal" steps: - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' - name: Install and configure Poetry uses: snok/install-poetry@v1 with: - version: 1.5.1 + version: 1.8.5 virtualenvs-create: true virtualenvs-in-project: true - name: Run tests run: | - # PyYaml is required until docker-compose is migrated to v2 - pip install pyyaml==5.3.1 - pip install docker==6.1.3 docker-compose requests==2.31.0 - poetry install --no-interaction --no-ansi - docker-compose version + docker compose version + poetry install --no-interaction --no-ansi --no-root poetry run python -m pytest diff --git a/Dockerfile b/Dockerfile index f678879..c90fef0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,6 @@ COPY poetry.lock pyproject.toml /app/ WORKDIR /app RUN pip install poetry && \ poetry config virtualenvs.in-project true && \ - poetry install --no-interaction --no-ansi + poetry install --no-interaction --no-ansi --no-root COPY . /app EXPOSE 5000 \ No newline at end of file diff --git a/app/lib/network_utils.py b/app/lib/network_utils.py index 8b36cfc..23bbe12 100644 --- a/app/lib/network_utils.py +++ b/app/lib/network_utils.py @@ -2,6 +2,8 @@ import logging from datetime import datetime, timedelta +from substrateinterface import Keypair + from app.config.network_configuration import get_relay_chain_rpc_url, network_sudo_seed, derivation_root_seed, \ node_http_endpoint, get_network, relay_chain_consensus, node_ws_endpoint from app.lib.balance_utils import fund_accounts @@ -264,12 +266,16 @@ async def setup_validators_session_keys(node_name): return '' else: log.info("Rotating session key on {} ({}) session key".format(node_name, stash_account_address)) - node_session_key = rotate_node_session_keys(node_endpoint) + node_stash_account_mnemonic = get_node_stash_account_mnemonic(validators_root_seed, node_name) + # `owner` binds the ownership proof to the stash calling `set_keys`: the + # SCALE-encoded account id = the raw 32-byte public key (polkadot-sdk#1739). + owner = '0x' + Keypair.create_from_uri(node_stash_account_mnemonic).public_key.hex() + node_session_key = rotate_node_session_keys(node_endpoint, owner=owner) # If rotate_key result from node is not empty, set session key and mark account to be registered if node_session_key: - log.info("Setting session key for {} ({})".format(stash_account_address, node_session_key)) - node_stash_account_mnemonic = get_node_stash_account_mnemonic(validators_root_seed, node_name) - session_key_set_status = set_node_session_key(ws_endpoint, node_stash_account_mnemonic, node_session_key) + log.info("Setting session key for {} ({})".format(stash_account_address, node_session_key['keys'])) + session_key_set_status = set_node_session_key(ws_endpoint, node_stash_account_mnemonic, + node_session_key['keys'], proof=node_session_key['proof']) # Don't add the account to the validator set if the setKey operation failed if session_key_set_status: log.info('Successfully set session keys'.format(stash_account_address)) @@ -334,12 +340,20 @@ async def register_validator_pods(pods): else: for node in nodes_to_register: validator_stash_mnemonic = get_node_stash_account_mnemonic(validators_root_seed, node) + # `owner` binds the ownership proof to the account calling `set_keys` + # (the stash); it is the SCALE-encoded account id = the raw 32-byte + # public key. Required by runtimes carrying polkadot-sdk#1739. + owner = '0x' + Keypair.create_from_uri(validator_stash_mnemonic).public_key.hex() log.info(f'Rotate node session keys for {node}') - node_session_key = rotate_node_session_keys(node_http_endpoint(node)) + rotated = rotate_node_session_keys(node_http_endpoint(node), owner=owner) + if not rotated: + log.error(f'Fail to set up PoS Validator: {node} (session key rotation failed)') + continue log.info(f'Registering PoS Validator: {node}') - status = setup_pos_validator(ws_endpoint, validator_stash_mnemonic, node_session_key) + status = setup_pos_validator(ws_endpoint, validator_stash_mnemonic, + rotated['keys'], proof=rotated['proof']) if status: log.info(f'Successfully set up PoS Validator: {node}') else: diff --git a/app/lib/session_keys.py b/app/lib/session_keys.py index 863d5f6..cd5d318 100644 --- a/app/lib/session_keys.py +++ b/app/lib/session_keys.py @@ -7,16 +7,46 @@ # substrate_client must be connected to the node on which we want to run rotate_keys -def rotate_node_session_keys(node_http_endpoint): +def rotate_node_session_keys(node_http_endpoint, owner=None): + """Rotate the node's session keys. + + When `owner` (the hex-encoded stash account id) is given, call + `author_rotateKeysWithOwner` so the node also returns a `proof` of key + ownership. Runtimes carrying polkadot-sdk#1739 verify this proof in + `session.set_keys` and reject an empty one with `InvalidProof`. Nodes + whose binary predates that RPC (and runtimes that don't require a proof) + are handled by falling back to plain `author_rotateKeys`. + + Returns `{'keys': '0x..', 'proof': '0x..'}` (proof is `'0x'` when the + chain/binary doesn't produce one), or `''` on failure. + """ try: - rotate_keys = requests.post(node_http_endpoint, - data='{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}', - headers={'Content-type': 'application/json'}, timeout=10) - if rotate_keys.status_code == 200: - log.info("{} session keys rotated successfully".format(node_http_endpoint)) - return rotate_keys.json()['result'] + if owner: + req = {"id": 1, "jsonrpc": "2.0", + "method": "author_rotateKeysWithOwner", "params": [owner]} else: + req = {"id": 1, "jsonrpc": "2.0", "method": "author_rotateKeys", "params": []} + rotate_keys = requests.post(node_http_endpoint, json=req, + headers={'Content-type': 'application/json'}, timeout=10) + if rotate_keys.status_code != 200: + return '' + body = rotate_keys.json() + if 'error' in body: + # -32601 = "Method not found": the node binary predates + # `author_rotateKeysWithOwner`, retry with the legacy RPC. + if owner and body['error'].get('code') == -32601: + log.warning("{} lacks author_rotateKeysWithOwner, falling back to " + "author_rotateKeys (no ownership proof)".format(node_http_endpoint)) + return rotate_node_session_keys(node_http_endpoint, owner=None) + log.error("Failed to rotate key on {}; RPC error: {}".format(node_http_endpoint, body['error'])) return '' + result = body['result'] + log.info("{} session keys rotated successfully".format(node_http_endpoint)) + # `author_rotateKeysWithOwner` returns {keys, proof}; `author_rotateKeys` + # returns the keys blob directly. + if isinstance(result, dict): + return {'keys': result['keys'], 'proof': result.get('proof') or '0x'} + return {'keys': result, 'proof': '0x'} except Exception as err: log.error("Failed to rotate key on {}; Error: {}".format(node_http_endpoint, err)) return '' @@ -29,7 +59,7 @@ def decode_session_key(substrate_client, session_key): # stash keypair account must have some funds -def set_node_session_key(ws_endpoint, stash_seed, session_key): +def set_node_session_key(ws_endpoint, stash_seed, session_key, proof='0x'): substrate_client = get_substrate_client(ws_endpoint) if type(session_key) == str: @@ -41,7 +71,9 @@ def set_node_session_key(ws_endpoint, stash_seed, session_key): call_function='set_keys', call_params={ 'keys': session_key, - 'proof': 'None' + # `proof` (Vec) is the ownership proof from `rotateKeysWithOwner`; + # verified by runtimes carrying polkadot-sdk#1739, ignored by older ones. + 'proof': proof } ) result = substrate_call(substrate_client, keypair, call, wait=True) diff --git a/app/lib/validator_manager.py b/app/lib/validator_manager.py index dd7e21b..10d01de 100644 --- a/app/lib/validator_manager.py +++ b/app/lib/validator_manager.py @@ -59,7 +59,7 @@ def get_validators_pending_deletion(ws_endpoint): return list(set(active_validators) - set(staking_validators)) -def setup_pos_validator(ws_endpoint, stash_seed, session_key=None, controller_seed=None): +def setup_pos_validator(ws_endpoint, stash_seed, session_key=None, controller_seed=None, proof='0x'): batch_call = [] substrate_client = get_substrate_client(ws_endpoint) stash_keypair = Keypair.create_from_uri(stash_seed) @@ -91,7 +91,10 @@ def setup_pos_validator(ws_endpoint, stash_seed, session_key=None, controller_se call_function='set_keys', call_params={ 'keys': session_key, - 'proof': '' + # `proof` (Vec) is the ownership proof from + # `rotateKeysWithOwner`; verified by runtimes carrying + # polkadot-sdk#1739, ignored by older ones. + 'proof': proof } ) ) diff --git a/local-kubernetes/Makefile b/local-kubernetes/Makefile index eaef74e..4740628 100644 --- a/local-kubernetes/Makefile +++ b/local-kubernetes/Makefile @@ -3,7 +3,7 @@ # ============================================================================================ KUBERNETES_CONTEXT = minikube # minikube or rancher-desktop -# rococo or wococo (don't put space at the end of the variable it will be used as is) +# don't put a space at the end of the variable, it will be used as is CHAIN_NAMESPACE = rococo # docker or podman MINIKUBE_DRIVER = docker @@ -25,7 +25,7 @@ kube: kube_${KUBERNETES_CONTEXT} kube_minikube: @minikube start \ --addons ingress --addons metrics-server --addons registry --driver docker \ - --kubernetes-version=1.27.4 --memory=6g --cpus=2 + --kubernetes-version=1.31.0 --memory=6g --cpus=2 kube_minikube-podman: @minikube start \ @@ -67,14 +67,6 @@ rpc: @xdg-open 'https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/explorer' @kubectl --context ${KUBERNETES_CONTEXT} port-forward service/local-${CHAIN_NAMESPACE}-bootnode 9944:9944 -n ${CHAIN_NAMESPACE} -para-shell: - @xdg-open 'https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9948#/explorer' - @kubectl --context ${KUBERNETES_CONTEXT} port-forward service/local-${CHAIN_NAMESPACE}-shell-collator-node 9948:9944 -n ${CHAIN_NAMESPACE} - -para-moon: - @xdg-open 'https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9949#/explorer' - @kubectl --context ${KUBERNETES_CONTEXT} port-forward service/local-${CHAIN_NAMESPACE}-moonbase-alice-node 9949:9944 -n ${CHAIN_NAMESPACE} - para-mint: @xdg-open 'https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9950#/explorer' @kubectl --context ${KUBERNETES_CONTEXT} port-forward service/local-${CHAIN_NAMESPACE}-statemint-alice-node 9950:9944 -n ${CHAIN_NAMESPACE} @@ -120,4 +112,4 @@ uninstall: check @kubectl --context ${KUBERNETES_CONTEXT} delete pvc -n ${CHAIN_NAMESPACE} --all cleanup: check - @kubectl --context ${KUBERNETES_CONTEXT} delete namespace rococo wococo + @kubectl --context ${KUBERNETES_CONTEXT} delete namespace rococo diff --git a/local-kubernetes/charts/helmfile-rococo.yaml b/local-kubernetes/charts/helmfile-rococo.yaml index e910b1b..db993e4 100644 --- a/local-kubernetes/charts/helmfile-rococo.yaml +++ b/local-kubernetes/charts/helmfile-rococo.yaml @@ -59,14 +59,6 @@ releases: seed: "test test test test test test test test test test test junk" extraDerivation: "//validator//${HOSTNAME}" -## Para chain Shell ## - - name: local-rococo-shell-collator - namespace: rococo - chart: parity/node - version: *node_version - values: - - values-shell-collator.yaml - ## Para chain Statemint ## - name: local-rococo-statemint-alice namespace: rococo @@ -106,28 +98,6 @@ releases: scheme: "sr25519" seed: "test test test test test test test test test test test junk" extraDerivation: "//collator//${HOSTNAME}" -## Para chain Moonbase ## - - name: local-rococo-moonbase-alice - namespace: rococo - chart: parity/node - version: *node_version - values: - - values-moonbase-collator.yml - - node: - flags: - - "--allow-private-ipv4" - - "--alice" - extraLabels: - paraId: "1001" - collatorAccount: "0xf24ff3a9cf04c71dbc94d0b566f7a27b94566cac" -# collators - - name: local-rococo-moonbase-collator - namespace: rococo - chart: parity/node - version: *node_version - values: - - values-moonbase-collator.yml - ## Para chain Tick ## - name: local-rococo-tick-collator namespace: rococo diff --git a/local-kubernetes/charts/helmfile-wococo.yaml b/local-kubernetes/charts/helmfile-wococo.yaml deleted file mode 100644 index 1f60684..0000000 --- a/local-kubernetes/charts/helmfile-wococo.yaml +++ /dev/null @@ -1,36 +0,0 @@ -repositories: - - name: parity - url: https://paritytech.github.io/helm-charts/ - -helmDefaults: - createNamespace: false - waitForJobs: true - -releases: - - name: testnet-manager - namespace: wococo - chart: parity/testnet-manager - version: # empty value is latest - values: - - ./values-testnet-manager.yml - - configmap: - RELAY_CHAIN_RPC_URL: "ws://localwococo-bootnode.wococo:9944" - RPC_NODE_URL_PATTERN: "NODE_NAME.wococo:9944" - RELAY_CHAIN_CONSENSUS: pos - - - name: localwococo-bootnode - namespace: wococo - chart: parity/node - version: &node_version 5.1.7 - values: - - ./values-localwococo-bootnode.yaml - - - name: localwococo-validator-a - namespace: wococo - chart: parity/node - version: *node_version - values: - - ./values-localwococo-bootnode.yaml - - node: - replicas: 2 - keys: [] diff --git a/local-kubernetes/charts/values-local-wococo-bootnode.yaml b/local-kubernetes/charts/values-local-wococo-bootnode.yaml deleted file mode 100644 index a919098..0000000 --- a/local-kubernetes/charts/values-local-wococo-bootnode.yaml +++ /dev/null @@ -1,62 +0,0 @@ -image: - # also update version in kube-setup/validators-chainspec.yml - repository: parity/polkadot - tag: latest - pullPolicy: Always - -initContainer: - debug: true - -node: - chain: wococo-local - role: authority - replicas: 4 - chainData: - pruning: 1000 - volumeSize: 2Gi - storageClass: "standard" - chainKeystore: - mountInMemory: - enabled: true - sizeLimit: 10Mi - podManagementPolicy: Parallel - allowUnsafeRpcMethods: true - customChainspecUrl: http://chainspec.rococo/wococo-local.json - forceDownloadChainspec: true - persistGeneratedNodeKey: true - flags: - - "--allow-private-ipv4" - keys: - - type: "gran" - scheme: "ed25519" - # DERIVATION_ROOT_SEED - seed: "test test test test test test test test test test test junk" - extraDerivation: "//${HOSTNAME}//grandpa" - - type: "babe" - scheme: "sr25519" - seed: "test test test test test test test test test test test junk" - extraDerivation: "//${HOSTNAME}//babe" - - type: "imon" - scheme: "sr25519" - seed: "test test test test test test test test test test test junk" - extraDerivation: "//${HOSTNAME}//im_online" - - type: "para" - scheme: "sr25519" - seed: "test test test test test test test test test test test junk" - extraDerivation: "//${HOSTNAME}//para_validator" - - type: "asgn" - scheme: "sr25519" - seed: "test test test test test test test test test test test junk" - extraDerivation: "//${HOSTNAME}//para_assignment" - - type: "audi" - scheme: "sr25519" - seed: "test test test test test test test test test test test junk" - extraDerivation: "//${HOSTNAME}//authority_discovery" - -extraInitContainers: - - name: dump-session-keys - image: docker.io/paritytech/substrate-session-keys-grabber:d17032f1-20221202 - args: ["/keystore"] - volumeMounts: - - mountPath: /keystore - name: chain-keystore \ No newline at end of file diff --git a/local-kubernetes/charts/values-moonbase-collator.yml b/local-kubernetes/charts/values-moonbase-collator.yml deleted file mode 100644 index a359e19..0000000 --- a/local-kubernetes/charts/values-moonbase-collator.yml +++ /dev/null @@ -1,37 +0,0 @@ -image: - # also update version in kube-setup/validators-chainspec.yml - repository: moonbeamfoundation/moonbeam - tag: latest - pullPolicy: Always - -initContainer: - debug: true - -node: - chainData: &chainData - volumeSize: 2Gi - storageClass: "standard" - chainKeystore: &chainKeystore - mountInMemory: - enabled: true - sizeLimit: 10Mi - chain: moonbase - role: collator - replicas: 1 - command: "/moonbeam/moonbeam" - # kube-setup/validators-chainspec.yml - forceDownloadChainspec: true - customChainspecUrl: "http://chainspec.rococo/moonbase.json" - customChainspecPath: "/chain-data/moonbase.json" - isParachain: true - collatorRelayChain: - customChainspecUrl: "http://chainspec.rococo/rococo-local.json" - chainData: *chainData - chainKeystore: *chainKeystore - persistGeneratedNodeKey: true - allowUnsafeRpcMethods: true - flags: - - "--allow-private-ipv4" - -extraLabels: - paraId: "1001" diff --git a/local-kubernetes/charts/values-shell-collator.yaml b/local-kubernetes/charts/values-shell-collator.yaml deleted file mode 100644 index 42f4887..0000000 --- a/local-kubernetes/charts/values-shell-collator.yaml +++ /dev/null @@ -1,33 +0,0 @@ -image: - # also update version in kube-setup/chainspec.yml - repository: parity/polkadot-parachain - tag: latest - pullPolicy: Always - -initContainer: - debug: true - -node: - chainData: &chainData - volumeSize: 2Gi - storageClass: "standard" - chainKeystore: &chainKeystore - mountInMemory: - enabled: true - sizeLimit: 10Mi - chain: shell - role: collator - replicas: 1 - command: "/usr/local/bin/polkadot-parachain" - # manifests/chainspec.yml - forceDownloadChainspec: true - customChainspecUrl: "http://chainspec.rococo/shell.json" - isParachain: true - collatorRelayChain: - customChainspecUrl: "http://chainspec.rococo/rococo-local.json" - chainData: *chainData - chainKeystore: *chainKeystore - persistGeneratedNodeKey: true - -extraLabels: - paraId: "1000" diff --git a/local-kubernetes/kube-setup/0-validators-namespace.yaml b/local-kubernetes/kube-setup/0-validators-namespace.yaml index fe4676b..1c3fbae 100644 --- a/local-kubernetes/kube-setup/0-validators-namespace.yaml +++ b/local-kubernetes/kube-setup/0-validators-namespace.yaml @@ -1,9 +1,4 @@ kind: Namespace apiVersion: v1 metadata: - name: rococo ---- -kind: Namespace -apiVersion: v1 -metadata: - name: wococo \ No newline at end of file + name: rococo \ No newline at end of file diff --git a/local-kubernetes/kube-setup/prepare-test-net.sh b/local-kubernetes/kube-setup/prepare-test-net.sh deleted file mode 100755 index fcef730..0000000 --- a/local-kubernetes/kube-setup/prepare-test-net.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env bash -set -e -### -# Script to generate part of chainspec with keys and accounts. -### - - -if [ "$#" -ne 1 ]; then - echo "Please provide the number of initial validators!" - echo "Usage: " - echo "export SUDO_SEED= sudo account seed" //Alice - echo "export DERIVATION_ROOT_SEED= base seed to derive from " - echo "export PREFIX= derivation prefix " - echo "$0 " - echo "Example: " - echo "export SUDO_SEED=0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a" //Alice - echo "export DERIVATION_ROOT_SEED='test test test test test test test test test test test junk'" - echo "export PREFIX=localwococo-bootnode-" - echo "$0 4" - exit 1 -fi - -generate_address() { - subkey inspect ${3:-} ${4:-} "$DERIVATION_ROOT_SEED//$PREFIX$1//$2" | grep "SS58 Address" | awk '{ print $3 }' -} - -V_NUM=$(($1 - 1)) - -BALANCES='\"balances\": {"balances": [\n' -INVULNERABLES='"invulnerables": [\n' -STAKERS='"stakers": [\n' -SESSION='"session": {\n "keys": [\n' - -SUDO_ADDRESS=$(subkey inspect $SUDO_SEED | grep "SS58 Address" | awk '{ print $3 }') -BALANCES+=" [\"${SUDO_ADDRESS}\", 1000000000000000000],\n" -SUDO="\"sudo\": {\"key\": \"${SUDO_ADDRESS}\" }" - -for i in $(seq 0 $V_NUM); do - if [ $i -eq $V_NUM ] - then - LAST="" - else - LAST=',' - fi - STASH=$(generate_address $i stash) - - BALANCES+=" [\"${STASH}\", 100000000000000]${LAST}\n" - INVULNERABLES+=" \"${STASH}\"${LAST}\n" - STAKERS+=" [\"${STASH}\", \"$(generate_address $i controller)\", 100000000000000, \"Validator\"]${LAST}\n" - - SESSION+="[\n" - SESSION+=" \"${STASH}\",\n" - SESSION+=" \"${STASH}\",\n" - SESSION+=" {\n" - SESSION+=" \"grandpa\": \"$(generate_address $i grandpa '--scheme ed25519')\",\n" - SESSION+=" \"babe\": \"$(generate_address $i babe '--scheme sr25519')\",\n" - SESSION+=" \"im_online\": \"$(generate_address $i im_online '--scheme sr25519')\",\n" - SESSION+=" \"para_validator\": \"$(generate_address $i para_validator '--scheme sr25519')\",\n" - SESSION+=" \"para_assignment\": \"$(generate_address $i para_assignment '--scheme sr25519')\",\n" - SESSION+=" \"authority_discovery\": \"$(generate_address $i authority_discovery '--scheme sr25519')\"\n" - #SESSION+=" \"beefy\": \"$(generate_address $i beefy '--scheme ecdsa')\"\n" - SESSION+=" }\n]${LAST}\n" -done -BALANCES+="]}" -INVULNERABLES+="]" -STAKERS+="]" -SESSION+=' ]\n}\n' - -CHAINSPEC=' - { - "name": "Wococo", - "id": "wococo", - "chainType": "Live", - "genesis": { - "runtime": { - '"$BALANCES, \"staking\": {\"validatorCount\": 10, ${INVULNERABLES}, ${STAKERS}}, ${SESSION}, ${SUDO}"' - } - } - } -' - -printf "$CHAINSPEC" | jq - diff --git a/local-kubernetes/kube-setup/validators-chainspec.yml b/local-kubernetes/kube-setup/validators-chainspec.yml index c2dda68..04eabe0 100644 --- a/local-kubernetes/kube-setup/validators-chainspec.yml +++ b/local-kubernetes/kube-setup/validators-chainspec.yml @@ -51,15 +51,6 @@ spec: volumeMounts: - name: dir mountPath: /dir - - name: create-chainspec-shell - image: parity/polkadot-parachain:latest - command: [ "/bin/sh" ] - args: - - -c - - polkadot-parachain build-spec --chain shell --disable-default-bootnode --raw > /dir/shell.json - volumeMounts: - - name: dir - mountPath: /dir - name: create-chainspec-statemint image: parity/polkadot-parachain:latest command: [ "/bin/sh" ] @@ -76,24 +67,6 @@ spec: volumeMounts: - name: dir mountPath: /dir - - name: create-chainspec-moonbase - image: moonbeamfoundation/moonbeam:latest - imagePullPolicy: IfNotPresent - command: [ "/bin/sh" ] - args: - - -c - - > - set -xe; - /moonbeam/moonbeam build-spec --chain moonbase-dev > /dir/moonbase-dev-plain.json; - sed 's/"id": "moonbase_dev"/"id": "moonbase"/' -i /dir/moonbase-dev-plain.json; - sed 's/"chainType": "Development"/"chainType": "Live"/' -i /dir/moonbase-dev-plain.json; - sed 's/"relayChain": "dev-service"/"relayChain": "rococo"/' -i /dir/moonbase-dev-plain.json; - sed 's/"paraId": 0/"paraId": 1001/' -i /dir/moonbase-dev-plain.json; - sed 's/"parachainId": 0/"parachainId": 1001/' -i /dir/moonbase-dev-plain.json; - /moonbeam/moonbeam build-spec --chain /dir/moonbase-dev-plain.json --raw > /dir/moonbase.json; - volumeMounts: - - name: dir - mountPath: /dir - name: create-chainspec-tick image: parity/polkadot-parachain:latest command: [ "/bin/sh" ] @@ -119,151 +92,3 @@ spec: mountPath: /dir securityContext: runAsUser: 0 - - name: create-chainspec-wococo - image: paritypr/polkadot-debug:6007 - command: [ "/bin/bash" ] - env: - - name: OVERRIDE_JSON - # 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY - SEED (//Alice) - # export SUDO_SEED=0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a - # export DERIVATION_ROOT_SEED="test test test test test test test test test test test junk" - # export PREFIX=localwococo-bootnode- - # scripts/prepare-test-net.sh 4 - value: | - { - "name": "Wococo", - "id": "wococo", - "chainType": "Live", - "genesis": { - "runtime": { - "balances": { - "balances": [ - [ - "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY", - 1e+18 - ], - [ - "5ENyKNtRnxZQwcfEAAVCTJAbpRSyJ9aYHMwkDcWt5vU4gpFc", - 100000000000000 - ], - [ - "5ELY2Fa32fbKi4uZwAQQ23GVJfCfTs2SVyDEqCKw17r8rK7V", - 100000000000000 - ], - [ - "5CXbZ1kk2AeqUcKwKb1R5DmCGAMEm1PaycsfNaSpsgSGTXo7", - 100000000000000 - ], - [ - "5C8UKeQSHFXtjtRNDtRxD1JzCh6MazKWNxMmUTsnQSQ8E2QK", - 100000000000000 - ] - ] - }, - "staking": { - "validatorCount": 10, - "invulnerables": [ - "5ENyKNtRnxZQwcfEAAVCTJAbpRSyJ9aYHMwkDcWt5vU4gpFc", - "5ELY2Fa32fbKi4uZwAQQ23GVJfCfTs2SVyDEqCKw17r8rK7V", - "5CXbZ1kk2AeqUcKwKb1R5DmCGAMEm1PaycsfNaSpsgSGTXo7", - "5C8UKeQSHFXtjtRNDtRxD1JzCh6MazKWNxMmUTsnQSQ8E2QK" - ], - "stakers": [ - [ - "5ENyKNtRnxZQwcfEAAVCTJAbpRSyJ9aYHMwkDcWt5vU4gpFc", - "5CApF4xe6tfGQuwmmfDZsxL5EDYXhFwnE6PhUsi8MBnuLTBy", - 100000000000000, - "Validator" - ], - [ - "5ELY2Fa32fbKi4uZwAQQ23GVJfCfTs2SVyDEqCKw17r8rK7V", - "5HZ8SQNnu1n8ioMMYbRiBYkjBv2RcjZNhq1ZEyFRqr5DFBGL", - 100000000000000, - "Validator" - ], - [ - "5CXbZ1kk2AeqUcKwKb1R5DmCGAMEm1PaycsfNaSpsgSGTXo7", - "5CrQZyu8Z65BGR7C6PETPZHoUptwHeP24Ge7xwhaUwsfg5Hh", - 100000000000000, - "Validator" - ], - [ - "5C8UKeQSHFXtjtRNDtRxD1JzCh6MazKWNxMmUTsnQSQ8E2QK", - "5C5NkAkCLDGM1S9s8EKjf3t1FDybFeTrW6g4GXHVLWxsLSWT", - 100000000000000, - "Validator" - ] - ] - }, - "session": { - "keys": [ - [ - "5ENyKNtRnxZQwcfEAAVCTJAbpRSyJ9aYHMwkDcWt5vU4gpFc", - "5ENyKNtRnxZQwcfEAAVCTJAbpRSyJ9aYHMwkDcWt5vU4gpFc", - { - "grandpa": "5EDW9eXu3v7FRZsn4CBs1rz4oqd5dbMsjKLcifNBpnrNuoih", - "babe": "5G1H27tM6m7JVYnU1sgfj632F7xQhXeuvp6ZFjKCWN6LGuak", - "im_online": "5EwBqdgCcVMoHRFrbiQT8NwKMj7HEEM5g46no1Ai7FP3xwpS", - "para_validator": "5FjsdBGXRw8bfAuKx9PZ5GjL48WJQKzGeZ4d3iKa9Z4gBaWU", - "para_assignment": "5HpHzYbpiJqsJQptgtxvgYWxcppWvD77gzEWqvA3LjDazp4e", - "authority_discovery": "5CAQqpYksUanA8PAG79P4AoWFD7sdG6qJQVcHneYcn6UgRcq" - } - ], - [ - "5ELY2Fa32fbKi4uZwAQQ23GVJfCfTs2SVyDEqCKw17r8rK7V", - "5ELY2Fa32fbKi4uZwAQQ23GVJfCfTs2SVyDEqCKw17r8rK7V", - { - "grandpa": "5GMp6dESSZ5RvWsPe6EkB8MBMBQJfPtrSzYLswXEFCj4Jd4Q", - "babe": "5E2k8rRPevDExaATZcRPLyzEjMAZw5yit7xrnL3KUvYBa933", - "im_online": "5F9QGWP5KB3BxeyskwESqVTkeGPYBVxC6XM317KL1cxGpj6E", - "para_validator": "5Hn48pCkee8mzWvzHiziHvfR59e9xNG9ACW4qTpTQnFoa6sK", - "para_assignment": "5CfQxtGykkTNbfc4WzSQ13st9xqNEhKhPFSeHwTndKgbkove", - "authority_discovery": "5EccAKRak3cmxpkt9UAkWjVagKSu2mBBoNquaZu3tHSrz1Ah" - } - ], - [ - "5CXbZ1kk2AeqUcKwKb1R5DmCGAMEm1PaycsfNaSpsgSGTXo7", - "5CXbZ1kk2AeqUcKwKb1R5DmCGAMEm1PaycsfNaSpsgSGTXo7", - { - "grandpa": "5F6VWVUFUdbsXZg4GdjQNAd1BstvqoAYtfsuuLsf76PTcuh1", - "babe": "5Dxysx6jngu9TZZzezHQWqiN1e1o4344m1N766ywkvsd9aZP", - "im_online": "5EyS9ZveryeasJnPVTQXkPEmHwaMnrRFY2Y5qZizBWq4Eo28", - "para_validator": "5EyVUUhdz4s1yqiaQb4jrWbVYCbqyMnH1Gjhw4Fj3XKr5ys3", - "para_assignment": "5GdiEoFSnZ6Hh4WkniHsSK6VUYjsV3FPtkYfws7es5QXv1M4", - "authority_discovery": "5CyWN39TYuy2HPNLgGp4K6wrA3D36fTqPPsF9GBGBRzf8tiJ" - } - ], - [ - "5C8UKeQSHFXtjtRNDtRxD1JzCh6MazKWNxMmUTsnQSQ8E2QK", - "5C8UKeQSHFXtjtRNDtRxD1JzCh6MazKWNxMmUTsnQSQ8E2QK", - { - "grandpa": "5FTVk3HfUqSNByviyuBbgDtf6V7XqmnZ5vt7DK3HndrsWzz1", - "babe": "5F1iKbnutAGsSd3PjJzTrgz7aWn2XF48oSYKQyHvDK2srQ2P", - "im_online": "5Fy4pA4dxUYTxKWeJKaMnfEW3a2NE2JNLfuTsu8WC2MY2XAD", - "para_validator": "5FHp7XPoUrmno6xgnqiBaycQHWpEXTVYFSKmw4F9fyfbRUBX", - "para_assignment": "5DvyYrciA2fjtq6Z8ASzBfhJW8xFKZ6zJCgS8kvy5e2LN1Tu", - "authority_discovery": "5F7AcSkv2wUUfWTWCTKqfxxPJgfDYdFJTC6Y451quPXCrS6L" - } - ] - ] - }, - "sudo": { - "key": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY" - } - } - } - } - args: - - -c - - > - set -xe; - apt update; apt install -y jq; - polkadot build-spec --chain wococo-local --disable-default-bootnode > /dir/wococo-plain-source.json; - jq -s '.[0] * .[1]' /dir/wococo-plain-source.json <( echo $OVERRIDE_JSON) > /dir/wococo-plain.json; - sed 's/1e+18/1000000000000000000/' -i /dir/wococo-plain.json; - polkadot build-spec --chain /dir/wococo-plain.json --raw --disable-default-bootnode > /dir/wococo-local.json; - volumeMounts: - - name: dir - mountPath: /dir - securityContext: - runAsUser: 0 diff --git a/poetry.lock b/poetry.lock index 135d0a9..510b704 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.4.1 and should not be changed by hand. [[package]] name = "annotated-types" @@ -6,6 +6,7 @@ version = "0.7.0" description = "Reusable constraint types to use with typing.Annotated" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"}, {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, @@ -17,6 +18,7 @@ version = "4.4.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "anyio-4.4.0-py3-none-any.whl", hash = "sha256:c1b2d8f46a8a812513012e1107cb0e68c17159a7a594208005a57dc776e1bdc7"}, {file = "anyio-4.4.0.tar.gz", hash = "sha256:5aadc6a1bbb7cdb0bede386cac5e2940f5e2ff3aa20277e991cf028e0585ce94"}, @@ -28,7 +30,7 @@ sniffio = ">=1.1" [package.extras] doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17) ; platform_python_implementation == \"CPython\" and platform_system != \"Windows\""] trio = ["trio (>=0.23)"] [[package]] @@ -37,6 +39,7 @@ version = "3.10.4" description = "In-process task scheduler with Cron-like capabilities" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "APScheduler-3.10.4-py3-none-any.whl", hash = "sha256:fb91e8a768632a4756a585f79ec834e0e27aad5860bac7eaa523d9ccefd87661"}, {file = "APScheduler-3.10.4.tar.gz", hash = "sha256:e6df071b27d9be898e486bc7940a7be50b4af2e9da7c08f0744a96d4bd4cef4a"}, @@ -65,6 +68,7 @@ version = "2.1.1" description = "Base58 and Base58Check implementation." optional = false python-versions = ">=3.5" +groups = ["main"] files = [ {file = "base58-2.1.1-py3-none-any.whl", hash = "sha256:11a36f4d3ce51dfc1043f3218591ac4eb1ceb172919cebe05b52a5bcc8d245c2"}, {file = "base58-2.1.1.tar.gz", hash = "sha256:c5d0cb3f5b6e81e8e35da5754388ddcc6d0d14b6c6a132cb93d69ed580a7278c"}, @@ -79,6 +83,7 @@ version = "5.3.3" description = "Extensible memoizing collections and decorators" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "cachetools-5.3.3-py3-none-any.whl", hash = "sha256:0abad1021d3f8325b2fc1d2e9c8b9c9d57b04c3932657a72465447332c24d945"}, {file = "cachetools-5.3.3.tar.gz", hash = "sha256:ba29e2dfa0b8b556606f097407ed1aa62080ee108ab0dc5ec9d6a723a007d105"}, @@ -90,6 +95,7 @@ version = "2024.6.2" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" +groups = ["main", "dev"] files = [ {file = "certifi-2024.6.2-py3-none-any.whl", hash = "sha256:ddc6c8ce995e6987e7faf5e3f1b02b302836a0e5d98ece18392cb1a36c72ad56"}, {file = "certifi-2024.6.2.tar.gz", hash = "sha256:3cd43f1c6fa7dedc5899d69d3ad0398fd018ad1a17fba83ddaf78aa46c747516"}, @@ -101,6 +107,7 @@ version = "1.16.0" description = "Foreign Function Interface for Python calling C code." optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "cffi-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6b3d6606d369fc1da4fd8c357d026317fbb9c9b75d36dc16e90e84c26854b088"}, {file = "cffi-1.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ac0f5edd2360eea2f1daa9e26a41db02dd4b0451b48f7c318e217ee092a213e9"}, @@ -165,6 +172,7 @@ version = "3.3.2" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false python-versions = ">=3.7.0" +groups = ["main", "dev"] files = [ {file = "charset-normalizer-3.3.2.tar.gz", hash = "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5"}, {file = "charset_normalizer-3.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3"}, @@ -264,6 +272,7 @@ version = "8.1.7" description = "Composable command line interface toolkit" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, @@ -278,10 +287,12 @@ version = "0.4.6" description = "Cross-platform colored terminal text." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +groups = ["main", "dev"] files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, ] +markers = {main = "platform_system == \"Windows\"", dev = "sys_platform == \"win32\""} [[package]] name = "cytoolz" @@ -289,6 +300,8 @@ version = "0.12.3" description = "Cython implementation of Toolz: High performance functional utilities" optional = false python-versions = ">=3.7" +groups = ["main"] +markers = "implementation_name == \"cpython\"" files = [ {file = "cytoolz-0.12.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bbe58e26c84b163beba0fbeacf6b065feabc8f75c6d3fe305550d33f24a2d346"}, {file = "cytoolz-0.12.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c51b66ada9bfdb88cf711bf350fcc46f82b83a4683cf2413e633c31a64df6201"}, @@ -402,26 +415,13 @@ toolz = ">=0.8.0" [package.extras] cython = ["cython"] -[[package]] -name = "deprecation" -version = "2.1.0" -description = "A library to handle automated deprecations" -optional = false -python-versions = "*" -files = [ - {file = "deprecation-2.1.0-py2.py3-none-any.whl", hash = "sha256:a10811591210e1fb0e768a8c25517cabeabcba6f0bf96564f8ff45189f90b14a"}, - {file = "deprecation-2.1.0.tar.gz", hash = "sha256:72b3bde64e5d778694b0cf68178aed03d15e15477116add3fb773e581f9518ff"}, -] - -[package.dependencies] -packaging = "*" - [[package]] name = "docker" version = "7.1.0" description = "A Python library for the Docker Engine API." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "docker-7.1.0-py3-none-any.whl", hash = "sha256:c96b93b7f0a746f9e77d325bcfb87422a3d8bd4f03136ae8a85b37f1898d5fc0"}, {file = "docker-7.1.0.tar.gz", hash = "sha256:ad8c70e6e3f8926cb8a92619b832b4ea5299e2831c14284663184e200546fa6c"}, @@ -444,6 +444,7 @@ version = "0.19.0" description = "ECDSA cryptographic signature library (pure python)" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.6" +groups = ["main"] files = [ {file = "ecdsa-0.19.0-py2.py3-none-any.whl", hash = "sha256:2cea9b88407fdac7bbeca0833b189e4c9c53f2ef1e1eaa29f6224dbc809b707a"}, {file = "ecdsa-0.19.0.tar.gz", hash = "sha256:60eaad1199659900dd0af521ed462b793bbdf867432b3948e87416ae4caf6bf8"}, @@ -462,6 +463,7 @@ version = "0.7.0" description = "eth-hash: The Ethereum hashing function, keccak256, sometimes (erroneously) called sha3" optional = false python-versions = ">=3.8, <4" +groups = ["main"] files = [ {file = "eth-hash-0.7.0.tar.gz", hash = "sha256:bacdc705bfd85dadd055ecd35fd1b4f846b671add101427e089a4ca2e8db310a"}, {file = "eth_hash-0.7.0-py3-none-any.whl", hash = "sha256:b8d5a230a2b251f4a291e3164a23a14057c4a6de4b0aa4a16fa4dc9161b57e2f"}, @@ -471,7 +473,7 @@ files = [ dev = ["build (>=0.9.0)", "bumpversion (>=0.5.3)", "ipython", "pre-commit (>=3.4.0)", "pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)", "sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)", "tox (>=4.0.0)", "twine", "wheel"] docs = ["sphinx (>=6.0.0)", "sphinx-rtd-theme (>=1.0.0)", "towncrier (>=21,<22)"] pycryptodome = ["pycryptodome (>=3.6.6,<4)"] -pysha3 = ["pysha3 (>=1.0.0,<2.0.0)", "safe-pysha3 (>=1.0.0)"] +pysha3 = ["pysha3 (>=1.0.0,<2.0.0) ; python_version < \"3.9\"", "safe-pysha3 (>=1.0.0) ; python_version >= \"3.9\""] test = ["pytest (>=7.0.0)", "pytest-xdist (>=2.4.0)"] [[package]] @@ -480,6 +482,7 @@ version = "0.5.1" description = "eth-keys: Common API for Ethereum key operations" optional = false python-versions = "<4,>=3.8" +groups = ["main"] files = [ {file = "eth_keys-0.5.1-py3-none-any.whl", hash = "sha256:ad13d920a2217a49bed3a1a7f54fb0980f53caf86d3bbab2139fd3330a17b97e"}, {file = "eth_keys-0.5.1.tar.gz", hash = "sha256:2b587e4bbb9ac2195215a7ab0c0fb16042b17d4ec50240ed670bbb8f53da7a48"}, @@ -501,6 +504,7 @@ version = "4.3.0" description = "eth-typing: Common type annotations for ethereum python packages" optional = false python-versions = "<4,>=3.8" +groups = ["main"] files = [ {file = "eth_typing-4.3.0-py3-none-any.whl", hash = "sha256:718f8ef8180ac1a15e476f072e4522e7bd4429bdabc71499e3ca79e2219d775c"}, {file = "eth_typing-4.3.0.tar.gz", hash = "sha256:3f4eface387eefa68761b23743baab8d413d609b4201c4086c64a006be5dbf53"}, @@ -520,6 +524,7 @@ version = "2.3.1" description = "eth-utils: Common utility functions for python code that interacts with Ethereum" optional = false python-versions = ">=3.7,<4" +groups = ["main"] files = [ {file = "eth-utils-2.3.1.tar.gz", hash = "sha256:56a969b0536d4969dcb27e580521de35abf2dbed8b1bf072b5c80770c4324e27"}, {file = "eth_utils-2.3.1-py3-none-any.whl", hash = "sha256:614eedc5ffcaf4e6708ca39e23b12bd69526a312068c1170c773bd1307d13972"}, @@ -543,6 +548,7 @@ version = "0.109.2" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "fastapi-0.109.2-py3-none-any.whl", hash = "sha256:2c9bab24667293b501cad8dd388c05240c850b58ec5876ee3283c47d6e1e3a4d"}, {file = "fastapi-0.109.2.tar.gz", hash = "sha256:f3817eac96fe4f65a2ebb4baa000f394e55f5fccdaf7f75250804bc58f354f73"}, @@ -562,6 +568,7 @@ version = "2.30.0" description = "Google Authentication Library" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "google-auth-2.30.0.tar.gz", hash = "sha256:ab630a1320f6720909ad76a7dbdb6841cdf5c66b328d690027e4867bdfb16688"}, {file = "google_auth-2.30.0-py2.py3-none-any.whl", hash = "sha256:8df7da660f62757388b8a7f249df13549b3373f24388cb5d2f1dd91cc18180b5"}, @@ -585,6 +592,7 @@ version = "20.1.0" description = "WSGI HTTP Server for UNIX" optional = false python-versions = ">=3.5" +groups = ["main"] files = [ {file = "gunicorn-20.1.0-py3-none-any.whl", hash = "sha256:9dcc4547dbb1cb284accfb15ab5667a0e5d1881cc443e0677b4882a4067a807e"}, {file = "gunicorn-20.1.0.tar.gz", hash = "sha256:e0a968b5ba15f8a328fdfd7ab1fcb5af4470c28aaf7e55df02a99bc13138e6e8"}, @@ -605,6 +613,7 @@ version = "0.14.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, @@ -616,6 +625,7 @@ version = "3.7" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.5" +groups = ["main", "dev"] files = [ {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, @@ -627,6 +637,7 @@ version = "2.0.0" description = "brain-dead simple config-ini parsing" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, @@ -638,6 +649,7 @@ version = "3.1.4" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, @@ -655,13 +667,14 @@ version = "27.2.0" description = "Kubernetes python client" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "kubernetes-27.2.0-py2.py3-none-any.whl", hash = "sha256:0f9376329c85cf07615ed6886bf9bf21eb1cbfc05e14ec7b0f74ed8153cd2815"}, {file = "kubernetes-27.2.0.tar.gz", hash = "sha256:d479931c6f37561dbfdf28fc5f46384b1cb8b28f9db344ed4a232ce91990825a"}, ] [package.dependencies] -certifi = ">=14.05.14" +certifi = ">=14.5.14" google-auth = ">=1.0.1" oauthlib = ">=3.2.2" python-dateutil = ">=2.5.3" @@ -681,6 +694,7 @@ version = "2.1.5" description = "Safely add untrusted strings to HTML/XML markup." optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc"}, {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5"}, @@ -750,6 +764,7 @@ version = "10.3.0" description = "More routines for operating on iterables, beyond itertools" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "more-itertools-10.3.0.tar.gz", hash = "sha256:e5d93ef411224fbcef366a6e8ddc4c5781bc6359d43412a65dd5964e46111463"}, {file = "more_itertools-10.3.0-py3-none-any.whl", hash = "sha256:ea6a02e24a9161e51faad17a8782b92a0df82c12c1c8886fec7f0c3fa1a1b320"}, @@ -761,6 +776,7 @@ version = "3.2.2" description = "A generic, spec-compliant, thorough implementation of the OAuth request-signing logic" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "oauthlib-3.2.2-py3-none-any.whl", hash = "sha256:8139f29aac13e25d502680e9e19963e83f16838d48a0d71c287fe40e7067fbca"}, {file = "oauthlib-3.2.2.tar.gz", hash = "sha256:9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918"}, @@ -777,6 +793,7 @@ version = "24.1" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, @@ -788,6 +805,7 @@ version = "1.5.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, @@ -803,6 +821,7 @@ version = "0.1.11" description = "Python bindings for tiny-bip39 RUST crate" optional = false python-versions = "*" +groups = ["main"] files = [ {file = "py_bip39_bindings-0.1.11-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:324a7363f8b49201ebe1cc72d970017ec5139f8a5ddf605fa2774904eb7f08a1"}, {file = "py_bip39_bindings-0.1.11-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:77173b83c7ade4ca3c91fae0da9c9b1bc5f4c6819baa2276feacd5abec6005fa"}, @@ -824,6 +843,15 @@ files = [ {file = "py_bip39_bindings-0.1.11-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:4ee776f3b33b2d71fee48679951f117e3d1f052449ec2fcb184f3c64a4c77e4f"}, {file = "py_bip39_bindings-0.1.11-cp311-none-win32.whl", hash = "sha256:d8b722e49562810f94eb61c9efa172f327537c74c37da3e86b161f7f444c51bf"}, {file = "py_bip39_bindings-0.1.11-cp311-none-win_amd64.whl", hash = "sha256:be934052497f07605768e2c7184e4f4269b3e2e77930131dfc9bdbb791e6fdf4"}, + {file = "py_bip39_bindings-0.1.11-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:afa9c5762cfaec01141f478a9c3132de01ec3890ff2e5a4013c79d3ba3aff8bb"}, + {file = "py_bip39_bindings-0.1.11-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:a3af7c1f955c6bbd613c6b38d022f7c73896acaf0ecc972ac0dee4b952e14568"}, + {file = "py_bip39_bindings-0.1.11-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:6aed3e86f105a36676e8dd0c8bc3f611a81b7ba4309b22a77fdc0f63b260e094"}, + {file = "py_bip39_bindings-0.1.11-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d202f051cf063abae3acd0b74454d9d7b1dbeaf466ef7cb47a34ccedac845b62"}, + {file = "py_bip39_bindings-0.1.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ae120b5542fecf97aa3fdb6a526bac1004cb641bc9cc0d0030c6735dc2156072"}, + {file = "py_bip39_bindings-0.1.11-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:baf896aabb3bec42803015e010c121c8a3210b20184f37aaa6e400ae8e877e60"}, + {file = "py_bip39_bindings-0.1.11-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:e4d45324c598197dbddac10a0298197ca2587fa7b09d1450697517988a29d515"}, + {file = "py_bip39_bindings-0.1.11-cp312-none-win32.whl", hash = "sha256:92abce265b0f2d8c5830441aff06b7b4f9426088a3de39624b12f3f9ff9fc2eb"}, + {file = "py_bip39_bindings-0.1.11-cp312-none-win_amd64.whl", hash = "sha256:6794187229eb0b04d0770f0fba936f0c5c598f552848a398ed5af9a61638cacb"}, {file = "py_bip39_bindings-0.1.11-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:76fc141ed154ccef9c36d5e2eb615565f2e272a43ed56edbdda538840b597187"}, {file = "py_bip39_bindings-0.1.11-cp37-cp37m-macosx_11_0_arm64.whl", hash = "sha256:3837f7040e732f7be49da5f595f147de2304e92a67267b12d5aa08a9bb02dd4b"}, {file = "py_bip39_bindings-0.1.11-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:82de90eabe531095d4e4721ea1546873f0161c101c30b43dcf0a7bbd9cdcce69"}, @@ -862,6 +890,7 @@ version = "1.0.1" description = "Python bindings for the ed25519-zebra RUST crate" optional = false python-versions = "*" +groups = ["main"] files = [ {file = "py_ed25519_zebra_bindings-1.0.1-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:a5c83e3a30f2f34556244422962cb9d2214fbf6ebdc82e9afb1e09d1d44ac457"}, {file = "py_ed25519_zebra_bindings-1.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:28b6addbf398b92bd8bf16da188094f3af2344c352d78647d0b2f13d5f7e4bd0"}, @@ -883,6 +912,14 @@ files = [ {file = "py_ed25519_zebra_bindings-1.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:2e715341b4927f6735ed7113644c0a5362310df4ddad1f938b5040c85884db15"}, {file = "py_ed25519_zebra_bindings-1.0.1-cp311-none-win32.whl", hash = "sha256:21498379d5e85d97a9633b7cf6362b4d187c7575ab8633c3ba6c99b1dcb83358"}, {file = "py_ed25519_zebra_bindings-1.0.1-cp311-none-win_amd64.whl", hash = "sha256:58e7d56a6f565fc044d313ec429b782150366a39ada973051dde60f1363abd9b"}, + {file = "py_ed25519_zebra_bindings-1.0.1-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:e90d55655ba2837cba691cbcf7f14d3146f07716bc5e60a4032d1a933672c261"}, + {file = "py_ed25519_zebra_bindings-1.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2c29de01849e581bf0698f98a6131c7c80af6daf1c43f38fc4374fc6ad44d47e"}, + {file = "py_ed25519_zebra_bindings-1.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ffcf39d48380454c132a38ff6172045035067848beb8ea619465ab389ff46717"}, + {file = "py_ed25519_zebra_bindings-1.0.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c2d9aa959c0d84cbf741f1b0605f49468584226401ffc0f60f0ab8752ca3e255"}, + {file = "py_ed25519_zebra_bindings-1.0.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:9549258b35c930a062653a696cdc656699c9aa039df84a63234d94b397610421"}, + {file = "py_ed25519_zebra_bindings-1.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:32188a3a5390f1f63bfbd10fd18dbde82802e5db615a94914574c52a450357ee"}, + {file = "py_ed25519_zebra_bindings-1.0.1-cp312-none-win32.whl", hash = "sha256:ca83b898458a701d31749a56c6c441f8f1bdb451f70df00eace68abf34dbb90c"}, + {file = "py_ed25519_zebra_bindings-1.0.1-cp312-none-win_amd64.whl", hash = "sha256:68ae9d36ff0062b2cc90f47e19a364590151dac78a0c36a72786078051a3990e"}, {file = "py_ed25519_zebra_bindings-1.0.1-cp36-cp36m-macosx_10_7_x86_64.whl", hash = "sha256:ac9d378114ce16420f66fd990ff09156f1d056b993a6076edeae4f866f5fd67f"}, {file = "py_ed25519_zebra_bindings-1.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d5e884b347d4a8d821327bafbdfcc19b2c8997d6a78704db15ef1db33baea4c1"}, {file = "py_ed25519_zebra_bindings-1.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3fcbe7677a8ba0888df9ce882402e13153b23dfdb97c8d0ec4e2ebd41d7c6b69"}, @@ -932,6 +969,7 @@ version = "0.2.0" description = "Python bindings for sr25519 library" optional = false python-versions = "*" +groups = ["main"] files = [ {file = "py_sr25519_bindings-0.2.0-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:86cc1a571852a4f2ade827ebf211e066b23ab805d3e864cbe213a3d8cd53f7d5"}, {file = "py_sr25519_bindings-0.2.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:453c9088e39dd04b07bf3ada6c473a5349c4dfd965009a35124b2c807117eda8"}, @@ -952,6 +990,15 @@ files = [ {file = "py_sr25519_bindings-0.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:7b56b5cbbfb36b41ddfa462989a03386590ac036f3a755ef64fffeb2fed88654"}, {file = "py_sr25519_bindings-0.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:8f06ea3237e06666e3a4ff4719b4fba415472943831b229428753c37d5ecd1b4"}, {file = "py_sr25519_bindings-0.2.0-cp311-none-win_amd64.whl", hash = "sha256:d62af30b2022f5fa787e46c06823c35a21abe791bf55012f498f9ba8e4baabc8"}, + {file = "py_sr25519_bindings-0.2.0-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:ceafa0c31b49f2128461eb2c6ea18dc5d0bfae7218a100be7153f271e46bac49"}, + {file = "py_sr25519_bindings-0.2.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:c8dedb8525556591738a64310875df70ea67886e5a40f2799bd96ef8848936cf"}, + {file = "py_sr25519_bindings-0.2.0-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:ce149796923696f5cfc6263f135674a14fe2d513fd35b2bfa73226b940aff648"}, + {file = "py_sr25519_bindings-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20d71ca3ba22f98f4c208d509f735fe4eb5aa9e3547a507733a95828adde6cab"}, + {file = "py_sr25519_bindings-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fe8e20ee0856e8a60682566df955b81e7631670136607da627ab6892df34790d"}, + {file = "py_sr25519_bindings-0.2.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0efd5487e3f6d6053cfc4a891b10f729d69263897270d0354f409ee2106fc9b7"}, + {file = "py_sr25519_bindings-0.2.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:ae7f2164d510458740145d20912d5d7a5c45e8fcde7cebd4057f60811ecc276f"}, + {file = "py_sr25519_bindings-0.2.0-cp312-none-win32.whl", hash = "sha256:92382456c6f176c07e0d554c71d483853387885ce17714f8a4b50fdcf7552297"}, + {file = "py_sr25519_bindings-0.2.0-cp312-none-win_amd64.whl", hash = "sha256:48ee4e14a77f815f3996beecb7d7abf422b756e9163ee4df739c1aded8a3e8ba"}, {file = "py_sr25519_bindings-0.2.0-cp36-cp36m-macosx_10_7_x86_64.whl", hash = "sha256:c3de899a1e911b8945f09e6389f8d2df68924c12c78e3e66fedb15f1e4ff56ad"}, {file = "py_sr25519_bindings-0.2.0-cp36-cp36m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:758761b605f90e4238304df7520155a3358b13cc55ee18c5113632da17343163"}, {file = "py_sr25519_bindings-0.2.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f63580a224607e68b861eb03421465091c3104b6309e5fca7448f5aa6dbda60"}, @@ -1004,6 +1051,7 @@ version = "0.6.0" description = "Pure-Python implementation of ASN.1 types and DER/BER/CER codecs (X.208)" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "pyasn1-0.6.0-py2.py3-none-any.whl", hash = "sha256:cca4bb0f2df5504f02f6f8a775b6e416ff9b0b3b16f7ee80b5a3153d9b804473"}, {file = "pyasn1-0.6.0.tar.gz", hash = "sha256:3a35ab2c4b5ef98e17dfdec8ab074046fbda76e281c5a706ccd82328cfc8f64c"}, @@ -1015,6 +1063,7 @@ version = "0.4.0" description = "A collection of ASN.1-based protocols modules" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "pyasn1_modules-0.4.0-py3-none-any.whl", hash = "sha256:be04f15b66c206eed667e0bb5ab27e2b1855ea54a842e5037738099e8ca4ae0b"}, {file = "pyasn1_modules-0.4.0.tar.gz", hash = "sha256:831dbcea1b177b28c9baddf4c6d1013c24c3accd14a1873fffaa6a2e905f17b6"}, @@ -1029,6 +1078,7 @@ version = "2.22" description = "C parser in Python" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, @@ -1040,6 +1090,7 @@ version = "3.20.0" description = "Cryptographic library for Python" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +groups = ["main"] files = [ {file = "pycryptodome-3.20.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:f0e6d631bae3f231d3634f91ae4da7a960f7ff87f2865b2d2b831af1dfb04e9a"}, {file = "pycryptodome-3.20.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:baee115a9ba6c5d2709a1e88ffe62b73ecc044852a925dcb67713a288c4ec70f"}, @@ -1081,6 +1132,7 @@ version = "2.7.3" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "pydantic-2.7.3-py3-none-any.whl", hash = "sha256:ea91b002777bf643bb20dd717c028ec43216b24a6001a280f83877fd2655d0b4"}, {file = "pydantic-2.7.3.tar.gz", hash = "sha256:c46c76a40bb1296728d7a8b99aa73dd70a48c3510111ff290034f860c99c419e"}, @@ -1100,6 +1152,7 @@ version = "2.18.4" description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "pydantic_core-2.18.4-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:f76d0ad001edd426b92233d45c746fd08f467d56100fd8f30e9ace4b005266e4"}, {file = "pydantic_core-2.18.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:59ff3e89f4eaf14050c8022011862df275b552caef8082e37b542b066ce1ff26"}, @@ -1191,6 +1244,7 @@ version = "1.5.0" description = "Python binding to the Networking and Cryptography (NaCl) library" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "PyNaCl-1.5.0-cp36-abi3-macosx_10_10_universal2.whl", hash = "sha256:401002a4aaa07c9414132aaed7f6836ff98f59277a234704ff66878c2ee4a0d1"}, {file = "PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:52cb72a79269189d4e0dc537556f4740f7f0a9ec41c1322598799b0bdad4ef92"}, @@ -1217,6 +1271,7 @@ version = "7.4.4" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "pytest-7.4.4-py3-none-any.whl", hash = "sha256:b090cdf5ed60bf4c45261be03239c2c1c22df034fbffe691abe93cd80cea01d8"}, {file = "pytest-7.4.4.tar.gz", hash = "sha256:2cf0005922c6ace4a3e2ec8b4080eb0d9753fdc93107415332f50ce9e7994280"}, @@ -1237,6 +1292,7 @@ version = "2.9.0.post0" description = "Extensions to the standard Python datetime module" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +groups = ["main"] files = [ {file = "python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3"}, {file = "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427"}, @@ -1245,12 +1301,28 @@ files = [ [package.dependencies] six = ">=1.5" +[[package]] +name = "python-dotenv" +version = "1.2.2" +description = "Read key-value pairs from a .env file and set them as environment variables" +optional = false +python-versions = ">=3.10" +groups = ["dev"] +files = [ + {file = "python_dotenv-1.2.2-py3-none-any.whl", hash = "sha256:1d8214789a24de455a8b8bd8ae6fe3c6b69a5e3d64aa8a8e5d68e694bbcb285a"}, + {file = "python_dotenv-1.2.2.tar.gz", hash = "sha256:2c371a91fbd7ba082c2c1dc1f8bf89ca22564a087c2c287cd9b662adde799cf3"}, +] + +[package.extras] +cli = ["click (>=5.0)"] + [[package]] name = "python-multipart" version = "0.0.7" description = "A streaming multipart parser for Python" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "python_multipart-0.0.7-py3-none-any.whl", hash = "sha256:b1fef9a53b74c795e2347daac8c54b252d9e0df9c619712691c1cc8021bd3c49"}, {file = "python_multipart-0.0.7.tar.gz", hash = "sha256:288a6c39b06596c1b988bb6794c6fbc80e6c369e35e5062637df256bee0c9af9"}, @@ -1265,6 +1337,7 @@ version = "2024.1" description = "World timezone definitions, modern and historical" optional = false python-versions = "*" +groups = ["main"] files = [ {file = "pytz-2024.1-py2.py3-none-any.whl", hash = "sha256:328171f4e3623139da4983451950b28e95ac706e13f3f2630a879749e7a8b319"}, {file = "pytz-2024.1.tar.gz", hash = "sha256:2a29735ea9c18baf14b448846bde5a48030ed267578472d8955cd0e7443a9812"}, @@ -1276,6 +1349,8 @@ version = "306" description = "Python for Window Extensions" optional = false python-versions = "*" +groups = ["dev"] +markers = "sys_platform == \"win32\"" files = [ {file = "pywin32-306-cp310-cp310-win32.whl", hash = "sha256:06d3420a5155ba65f0b72f2699b5bacf3109f36acbe8923765c22938a69dfc8d"}, {file = "pywin32-306-cp310-cp310-win_amd64.whl", hash = "sha256:84f4471dbca1887ea3803d8848a1616429ac94a4a8d05f4bc9c5dcfd42ca99c8"}, @@ -1299,6 +1374,7 @@ version = "6.0.1" description = "YAML parser and emitter for Python" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "PyYAML-6.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a"}, {file = "PyYAML-6.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f"}, @@ -1318,6 +1394,7 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, @@ -1358,6 +1435,7 @@ version = "2.32.3" description = "Python HTTP for Humans." optional = false python-versions = ">=3.8" +groups = ["main", "dev"] files = [ {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, @@ -1379,6 +1457,7 @@ version = "2.0.0" description = "OAuthlib authentication support for Requests." optional = false python-versions = ">=3.4" +groups = ["main"] files = [ {file = "requests-oauthlib-2.0.0.tar.gz", hash = "sha256:b3dffaebd884d8cd778494369603a9e7b58d29111bf6b41bdc2dcd87203af4e9"}, {file = "requests_oauthlib-2.0.0-py2.py3-none-any.whl", hash = "sha256:7dd8a5c40426b779b0868c404bdef9768deccf22749cde15852df527e6269b36"}, @@ -1397,6 +1476,7 @@ version = "4.9" description = "Pure-Python RSA implementation" optional = false python-versions = ">=3.6,<4" +groups = ["main"] files = [ {file = "rsa-4.9-py3-none-any.whl", hash = "sha256:90260d9058e514786967344d0ef75fa8727eed8a7d2e43ce9f4bcf1b536174f7"}, {file = "rsa-4.9.tar.gz", hash = "sha256:e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21"}, @@ -1411,6 +1491,7 @@ version = "1.2.10" description = "Python SCALE Codec Library" optional = false python-versions = "<4,>=3.6" +groups = ["main"] files = [ {file = "scalecodec-1.2.10-py3-none-any.whl", hash = "sha256:09eaed1e91fb7fc3cf37cc94db56d7b6726a3c50d75127a87ea4188cd69f687c"}, {file = "scalecodec-1.2.10.tar.gz", hash = "sha256:48a55d72d04c17787b19895ff0fa4ad7402e1c5652e7a236aafea24b498c60c5"}, @@ -1430,6 +1511,7 @@ version = "70.0.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "setuptools-70.0.0-py3-none-any.whl", hash = "sha256:54faa7f2e8d2d11bcd2c07bed282eef1046b5c080d1c32add737d7b5817b1ad4"}, {file = "setuptools-70.0.0.tar.gz", hash = "sha256:f211a66637b8fa059bb28183da127d4e86396c991a942b028c6650d4319c3fd0"}, @@ -1437,7 +1519,7 @@ files = [ [package.extras] docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +testing = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21) ; python_version >= \"3.9\" and sys_platform != \"cygwin\"", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov ; platform_python_implementation != \"PyPy\"", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf ; sys_platform != \"cygwin\"", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\"", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] [[package]] name = "six" @@ -1445,6 +1527,7 @@ version = "1.16.0" description = "Python 2 and 3 compatibility utilities" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +groups = ["main"] files = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, @@ -1456,6 +1539,7 @@ version = "1.3.1" description = "Sniff out which async library your code is running under" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"}, {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, @@ -1467,6 +1551,7 @@ version = "0.36.3" description = "The little ASGI library that shines." optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "starlette-0.36.3-py3-none-any.whl", hash = "sha256:13d429aa93a61dc40bf503e8c801db1f1bca3dc706b10ef2434a36123568f044"}, {file = "starlette-0.36.3.tar.gz", hash = "sha256:90a671733cfb35771d8cc605e0b679d23b992f8dcfad48cc60b38cb29aeb7080"}, @@ -1484,6 +1569,7 @@ version = "1.7.9" description = "Library for interfacing with a Substrate node" optional = false python-versions = "<4,>=3.7" +groups = ["main"] files = [ {file = "substrate-interface-1.7.9.tar.gz", hash = "sha256:3e33f420eed0a8d2c21af43ab5c85053f2e5d3d4c7874d6c2d68b1307a441b5e"}, {file = "substrate_interface-1.7.9-py3-none-any.whl", hash = "sha256:279ff8677ada33997cd161b8f0975e52bcd554d8f17ad5a31dd254989b73926f"}, @@ -1511,36 +1597,59 @@ test = ["coverage", "pytest"] [[package]] name = "testcontainers" -version = "3.7.1" -description = "Library provides lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container" +version = "4.15.0" +description = "Python library for throwaway instances of anything that can run in a Docker container" optional = false -python-versions = ">=3.7" +python-versions = ">=3.10" +groups = ["dev"] files = [ - {file = "testcontainers-3.7.1-py2.py3-none-any.whl", hash = "sha256:7f48cef4bf0ccd78f1a4534d4b701a003a3bace851f24eae58a32f9e3f0aeba0"}, + {file = "testcontainers-4.15.0-py3-none-any.whl", hash = "sha256:8796c14e76604031ad39cf0ed3b8e9806283a1fbf5270965c2b1c594caa31b74"}, + {file = "testcontainers-4.15.0.tar.gz", hash = "sha256:085cde086337632e19002719460b7b80bbab2bdd51bb3ea04f77d0de96504706"}, ] [package.dependencies] -deprecation = "*" -docker = ">=4.0.0" +docker = "*" +python-dotenv = "*" +typing-extensions = "*" +urllib3 = "*" wrapt = "*" [package.extras] -arangodb = ["python-arango"] -azurite = ["azure-storage-blob"] +arangodb = ["python-arango (>=8)"] +aws = ["boto3 (>=1)", "httpx"] +azurite = ["azure-storage-blob (>=12)"] +chroma = ["chromadb-client (>=1)"] clickhouse = ["clickhouse-driver"] -docker-compose = ["docker-compose"] -google-cloud-pubsub = ["google-cloud-pubsub (<2)"] -kafka = ["kafka-python"] -keycloak = ["python-keycloak"] -mongo = ["pymongo"] -mssqlserver = ["pymssql"] -mysql = ["pymysql", "sqlalchemy"] -neo4j = ["neo4j"] -oracle = ["cx-Oracle", "sqlalchemy"] -postgresql = ["psycopg2-binary", "sqlalchemy"] -rabbitmq = ["pika"] -redis = ["redis"] -selenium = ["selenium"] +cosmosdb = ["azure-cosmos (>=4)"] +cratedb = ["httpx", "sqlalchemy-cratedb"] +db2 = ["ibm-db-sa ; platform_machine != \"aarch64\" and platform_machine != \"arm64\"", "sqlalchemy"] +generic = ["httpx", "redis (>=7)", "sqlalchemy"] +google = ["google-cloud-datastore (>=2)", "google-cloud-pubsub (>=2)"] +influxdb = ["influxdb (>=5)", "influxdb-client (>=1)"] +k3s = ["kubernetes", "pyyaml (>=6.0.3)"] +keycloak = ["python-keycloak (>=6) ; python_version < \"4.0\""] +localstack = ["boto3 (>=1)"] +mailpit = ["cryptography"] +minio = ["minio (>=7)"] +mongodb = ["pymongo (>=4)"] +mssql = ["pymssql (>=2)", "sqlalchemy"] +mysql = ["pymysql[rsa] (>=1)", "sqlalchemy"] +nats = ["nats-py (>=2)"] +neo4j = ["neo4j (>=6)"] +openfga = ["openfga-sdk"] +opensearch = ["opensearch-py (>=3) ; python_version < \"4.0\""] +oracle = ["oracledb (>=3)", "sqlalchemy"] +oracle-free = ["oracledb (>=3)", "sqlalchemy"] +qdrant = ["qdrant-client (>=1)"] +rabbitmq = ["pika (>=1)"] +redis = ["redis (>=7)"] +registry = ["bcrypt (>=5)"] +scylla = ["cassandra-driver (>=3) ; python_version < \"3.14\""] +selenium = ["selenium (>=4)"] +sftp = ["cryptography"] +test-module-import = ["httpx"] +trino = ["trino"] +weaviate = ["weaviate-client (>=4)"] [[package]] name = "toolz" @@ -1548,6 +1657,8 @@ version = "0.12.1" description = "List processing tools and functional utilities" optional = false python-versions = ">=3.7" +groups = ["main"] +markers = "implementation_name == \"cpython\" or implementation_name == \"pypy\"" files = [ {file = "toolz-0.12.1-py3-none-any.whl", hash = "sha256:d22731364c07d72eea0a0ad45bafb2c2937ab6fd38a3507bf55eae8744aa7d85"}, {file = "toolz-0.12.1.tar.gz", hash = "sha256:ecca342664893f177a13dac0e6b41cbd8ac25a358e5f215316d43e2100224f4d"}, @@ -1559,6 +1670,7 @@ version = "4.12.2" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" +groups = ["main", "dev"] files = [ {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, @@ -1570,6 +1682,8 @@ version = "2024.1" description = "Provider of IANA time zone data" optional = false python-versions = ">=2" +groups = ["main"] +markers = "platform_system == \"Windows\"" files = [ {file = "tzdata-2024.1-py2.py3-none-any.whl", hash = "sha256:9068bc196136463f5245e51efda838afa15aaeca9903f49050dfa2679db4d252"}, {file = "tzdata-2024.1.tar.gz", hash = "sha256:2674120f8d891909751c38abcdfd386ac0a5a1127954fbc332af6b5ceae07efd"}, @@ -1581,6 +1695,7 @@ version = "5.2" description = "tzinfo object for the local timezone" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "tzlocal-5.2-py3-none-any.whl", hash = "sha256:49816ef2fe65ea8ac19d19aa7a1ae0551c834303d5014c6d5a62e4cbda8047b8"}, {file = "tzlocal-5.2.tar.gz", hash = "sha256:8d399205578f1a9342816409cc1e46a93ebd5755e39ea2d85334bea911bf0e6e"}, @@ -1598,13 +1713,14 @@ version = "2.2.1" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.8" +groups = ["main", "dev"] files = [ {file = "urllib3-2.2.1-py3-none-any.whl", hash = "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d"}, {file = "urllib3-2.2.1.tar.gz", hash = "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19"}, ] [package.extras] -brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] +brotli = ["brotli (>=1.0.9) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; platform_python_implementation != \"CPython\""] h2 = ["h2 (>=4,<5)"] socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] zstd = ["zstandard (>=0.18.0)"] @@ -1615,6 +1731,7 @@ version = "0.21.1" description = "The lightning-fast ASGI server." optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "uvicorn-0.21.1-py3-none-any.whl", hash = "sha256:e47cac98a6da10cd41e6fd036d472c6f58ede6c5dbee3dbee3ef7a100ed97742"}, {file = "uvicorn-0.21.1.tar.gz", hash = "sha256:0fac9cb342ba099e0d582966005f3fdba5b0290579fed4a6266dc702ca7bb032"}, @@ -1625,7 +1742,7 @@ click = ">=7.0" h11 = ">=0.8" [package.extras] -standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "watchfiles (>=0.13)", "websockets (>=10.4)"] +standard = ["colorama (>=0.4) ; sys_platform == \"win32\"", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1) ; sys_platform != \"win32\" and sys_platform != \"cygwin\" and platform_python_implementation != \"PyPy\"", "watchfiles (>=0.13)", "websockets (>=10.4)"] [[package]] name = "websocket-client" @@ -1633,6 +1750,7 @@ version = "1.8.0" description = "WebSocket client for Python with low level API options" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "websocket_client-1.8.0-py3-none-any.whl", hash = "sha256:17b44cc997f5c498e809b22cdf2d9c7a9e71c02c8cc2b6c56e7c2d1239bfa526"}, {file = "websocket_client-1.8.0.tar.gz", hash = "sha256:3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da"}, @@ -1649,6 +1767,7 @@ version = "1.16.0" description = "Module for decorators, wrappers and monkey patching." optional = false python-versions = ">=3.6" +groups = ["dev"] files = [ {file = "wrapt-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ffa565331890b90056c01db69c0fe634a776f8019c143a5ae265f9c6bc4bd6d4"}, {file = "wrapt-1.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e4fdb9275308292e880dcbeb12546df7f3e0f96c6b41197e0cf37d2826359020"}, @@ -1728,6 +1847,7 @@ version = "3.4.1" description = "Python binding for xxHash" optional = false python-versions = ">=3.7" +groups = ["main"] files = [ {file = "xxhash-3.4.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:91dbfa55346ad3e18e738742236554531a621042e419b70ad8f3c1d9c7a16e7f"}, {file = "xxhash-3.4.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:665a65c2a48a72068fcc4d21721510df5f51f1142541c890491afc80451636d2"}, @@ -1840,6 +1960,6 @@ files = [ ] [metadata] -lock-version = "2.0" +lock-version = "2.1" python-versions = "^3.11" -content-hash = "b1417ef06f87d8b63580a5f9785d0f01a2777a439c61a213d70de2722f17907b" +content-hash = "0216455b519552d5e2ecca6854dabe2ec7c5d11579983c8ebd0dff90b852e086" diff --git a/pyproject.toml b/pyproject.toml index 8d51075..c3eaeff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ fastapi = "^0.109.1" python-multipart = "^0.0.7" [tool.poetry.dev-dependencies] -testcontainers = "^3.7.1" +testcontainers = "^4.0" pytest = "^7.2.2" [build-system] diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index e7c39a1..ad8c575 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -1,4 +1,3 @@ -version: '3.7' services: chainspec: image: &polkadotimage parity/polkadot:latest @@ -51,7 +50,7 @@ services: - "9944" depends_on: *depends_on_chainspec command: | - --chain shell + --chain tick --unsafe-rpc-external --rpc-cors=all --rpc-methods=unsafe diff --git a/tests/session_keys_test.py b/tests/session_keys_test.py index d9208e9..076b004 100644 --- a/tests/session_keys_test.py +++ b/tests/session_keys_test.py @@ -1,6 +1,7 @@ import time import unittest +from substrateinterface import Keypair from testcontainers.core.container import DockerContainer from app.lib.session_keys import rotate_node_session_keys, set_node_session_key @@ -8,6 +9,10 @@ from tests.test_utils import wait_for_http_ready +def _owner(stash_seed): + return '0x' + Keypair.create_from_uri(stash_seed).public_key.hex() + + class NodeSessionKeysTest(unittest.TestCase): def setUp(self): @@ -23,22 +28,28 @@ def tearDown(self): self.polkadot.stop() def test_rotate_node_session_keys(self): - session_key = rotate_node_session_keys(self.polkadot_rpc_http_url) - self.assertTrue(session_key, "Rotate key executed successfully on the node") + rotated = rotate_node_session_keys(self.polkadot_rpc_http_url, owner=_owner('//Alice//stash')) + self.assertTrue(rotated, "Rotate key executed successfully on the node") + self.assertTrue(rotated['keys'], "Rotate returned session keys") + # Recent binaries return an ownership proof; older ones fall back to '0x'. + self.assertTrue(rotated['proof'], "Rotate returned a proof (or the '0x' fallback)") def test_set_node_session_keys(self): - session_key = rotate_node_session_keys(self.polkadot_rpc_http_url) - result = set_node_session_key(self.polkadot_rpc_ws_url, '//Alice//stash', session_key) + rotated = rotate_node_session_keys(self.polkadot_rpc_http_url, owner=_owner('//Alice//stash')) + result = set_node_session_key(self.polkadot_rpc_ws_url, '//Alice//stash', + rotated['keys'], proof=rotated['proof']) print(result) self.assertTrue(result, 'SetKeys executed successfully on //Alice//stash') def test_rotate_node_session_keys_bad_url(self): - session_key = rotate_node_session_keys('http://localhost:1234') + session_key = rotate_node_session_keys('http://localhost:1234', owner=_owner('//Alice//stash')) self.assertFalse(session_key, "Rotate key correctly fails on bad URL") def test_set_node_session_keys_bad_account(self): - session_key = rotate_node_session_keys(self.polkadot_rpc_http_url) - self.assertFalse(set_node_session_key(self.polkadot_rpc_ws_url, '//Alice/Iamnotafundedaccount', session_key), + bad_seed = '//Alice/Iamnotafundedaccount' + rotated = rotate_node_session_keys(self.polkadot_rpc_http_url, owner=_owner(bad_seed)) + self.assertFalse(set_node_session_key(self.polkadot_rpc_ws_url, bad_seed, + rotated['keys'], proof=rotated['proof']), 'SetKeys correctly fails on an account without funds') if __name__ == '__main__': diff --git a/tests/smoke_test.sh b/tests/smoke_test.sh index 99f738c..eb1d5a2 100755 --- a/tests/smoke_test.sh +++ b/tests/smoke_test.sh @@ -7,8 +7,6 @@ ROUTE='index.html nodes nodes/local-rococo-bootnode-0 -nodes/local-rococo-moonbase-alice-node-0 -nodes/local-rococo-shell-collator-node-0 nodes/local-rococo-statemint-alice-node-0 nodes/local-rococo-tick-collator-node-0 nodes/local-rococo-validator-a-node-0 diff --git a/tests/validator_manager_pos_test.py b/tests/validator_manager_pos_test.py index 16cf794..f3e1da0 100644 --- a/tests/validator_manager_pos_test.py +++ b/tests/validator_manager_pos_test.py @@ -45,8 +45,11 @@ def test_get_pos_validator_set(self): def test_register_pos_validator(self): charlie_stash = Keypair.create_from_uri('//Charlie//stash', ss58_format=42) substrate_client = get_substrate_client(self.alice_validator_rpc_ws_url) - session_key = substrate_client.rpc_request(method="author_rotateKeys", params=[])['result'] - setup_pos_validator(self.alice_validator_rpc_ws_url, "//Charlie//stash", session_key, "//Charlie") + # `owner` = the stash account id the runtime binds the proof to (polkadot-sdk#1739). + owner = '0x' + charlie_stash.public_key.hex() + rotated = substrate_client.rpc_request(method="author_rotateKeysWithOwner", params=[owner])['result'] + setup_pos_validator(self.alice_validator_rpc_ws_url, "//Charlie//stash", rotated['keys'], + "//Charlie", proof=rotated['proof']) validators_to_add = get_validators_pending_addition(self.alice_validator_rpc_ws_url) print(validators_to_add) self.assertEqual(validators_to_add, [charlie_stash.ss58_address], "Registered validator address successfully added to validators_to_add")