diff --git a/.baedeker/.gitignore b/.baedeker/.gitignore new file mode 100644 index 0000000000..fb2b1c2276 --- /dev/null +++ b/.baedeker/.gitignore @@ -0,0 +1,4 @@ +/.bdk-env +/rewrites.jsonnet +/vendor +/baedeker-library diff --git a/.baedeker/.gitkeep b/.baedeker/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.baedeker/collator-selection.jsonnet b/.baedeker/collator-selection.jsonnet new file mode 100644 index 0000000000..4f41662da5 --- /dev/null +++ b/.baedeker/collator-selection.jsonnet @@ -0,0 +1,43 @@ +local +m = import 'baedeker-library/mixin/spec.libsonnet', +; + +local relay = { + name: 'relay', + bin: 'bin/polkadot', + validatorIdAssignment: 'staking', + spec: {Genesis:{ + chain: 'rococo-local', + modify:: m.genericRelay($), + }}, + nodes: { + [name]: { + bin: $.bin, + wantedKeys: 'relay', + }, + for name in ['alice', 'bob', 'charlie', 'dave', 'eve'] + }, +}; + +local unique = { + name: 'unique', + bin: 'bin/unique', + paraId: 1001, + spec: {Genesis:{ + modify:: m.genericPara($), + }}, + nodes: { + [name]: { + bin: $.bin, + wantedKeys: 'para', + }, + for name in ['alpha', 'beta', 'gamma', 'delta'] + }, +}; + +relay + { + parachains: { + [para.name]: para, + for para in [unique] + }, +} diff --git a/.baedeker/down.sh b/.baedeker/down.sh new file mode 100755 index 0000000000..c60bd5a1ac --- /dev/null +++ b/.baedeker/down.sh @@ -0,0 +1,6 @@ +#!/bin/sh +set -e +BDK_DIR=$(dirname $(readlink -f "$0")) +cd $BDK_DIR/.bdk-env +docker compose down -v --remove-orphans +rm -rf discover.env secret specs diff --git a/.baedeker/forkless-data.jsonnet b/.baedeker/forkless-data.jsonnet new file mode 100644 index 0000000000..288eae9ebc --- /dev/null +++ b/.baedeker/forkless-data.jsonnet @@ -0,0 +1,67 @@ +local +m = import 'baedeker-library/mixin/spec.libsonnet', +rm = import 'baedeker-library/mixin/raw-spec.libsonnet', +; + +function(relay_spec, forked_spec, fork_source) + +local relay = { + name: 'relay', + bin: 'bin/polkadot', + validatorIdAssignment: 'staking', + spec: {Genesis:{ + chain: relay_spec, + modify:: m.genericRelay($), + }}, + nodes: { + [name]: { + bin: $.bin, + wantedKeys: 'relay', + }, + for name in ['alice', 'bob', 'charlie', 'dave', 'eve'] + }, +}; + +local unique = { + name: 'unique', + bin: 'bin/unique', + paraId: 1001, + spec: {Raw:{ + local modifyRaw = bdk.mixer([ + rm.resetNetworking($), + rm.decodeSpec(), + rm.polkaLaunchPara($), + rm.reencodeSpec(), + ]), + raw_spec: modifyRaw({ + name: "Unused", + id: "%s_local" % forked_spec, + bootNodes: error "override me", + chainType: error "override me", + telemetryEndpoints: error "override me", + codeSubstitutes: error "override me", + para_id: error "override me", + relay_chain: "unused", + genesis: { + raw: { + top: cql.chain(fork_source).latest._preloadKeys._raw, + childrenDefault: {}, + }, + }, + }), + }}, + nodes: { + [name]: { + bin: $.bin, + wantedKeys: 'para', + }, + for name in ['alice', 'bob'] + }, +}; + +relay + { + parachains: { + [para.name]: para, + for para in [unique] + }, +} diff --git a/.baedeker/node-only.jsonnet b/.baedeker/node-only.jsonnet new file mode 100644 index 0000000000..797ce99827 --- /dev/null +++ b/.baedeker/node-only.jsonnet @@ -0,0 +1,43 @@ +local +m = import 'baedeker-library/mixin/spec.libsonnet', +; + +local relay = { + name: 'relay', + bin: 'bin/polkadot', + validatorIdAssignment: 'staking', + spec: {Genesis:{ + chain: 'rococo-local', + modify:: m.genericRelay($), + }}, + nodes: { + [name]: { + bin: $.bin, + wantedKeys: 'relay', + }, + for name in ['alice', 'bob', 'charlie', 'dave', 'eve'] + }, +}; + +local unique = { + name: 'unique', + bin: 'bin/unique', + paraId: 1001, + spec: {Genesis:{ + modify:: m.genericPara($), + }}, + nodes: { + [name]: { + bin: $.bin, + wantedKeys: 'para', + }, + for name in ['alice', 'bob'] + }, +}; + +relay + { + parachains: { + [para.name]: para, + for para in [unique] + }, +} diff --git a/.baedeker/reset.sh b/.baedeker/reset.sh new file mode 100755 index 0000000000..16b4c14d0d --- /dev/null +++ b/.baedeker/reset.sh @@ -0,0 +1,6 @@ +#!/bin/sh +set -e +BDK_DIR=$(dirname $(readlink -f "$0")) +cd $BDK_DIR/.bdk-env +docker compose down -v --remove-orphans +docker compose up -d --wait diff --git a/.baedeker/rewrites.example.jsonnet b/.baedeker/rewrites.example.jsonnet new file mode 100644 index 0000000000..322cbc30dd --- /dev/null +++ b/.baedeker/rewrites.example.jsonnet @@ -0,0 +1,17 @@ +local dotenv = { + [std.splitLimit(line, "=", 2)[0]]: std.splitLimit(line, "=", 2)[1] + for line in std.split(importstr "../.env", "\n") + if line != "" + if std.member(line, "=") +}; + +function(prev, repoDir) +(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({ + 'bin/unique':'%s/target/release/unique-collator' % repoDir, + 'bin/polkadot':{dockerImage:'uniquenetwork/builder-polkadot:%s' % dotenv.POLKADOT_MAINNET_BRANCH}, + 'bin/acala':{dockerImage:'uniquenetwork/builder-acala:%s' % dotenv.ACALA_BUILD_BRANCH}, + 'bin/moonbeam':{dockerImage:'uniquenetwork/builder-moonbeam:%s' % dotenv.MOONBEAM_BUILD_BRANCH}, + 'bin/cumulus':{dockerImage:'uniquenetwork/builder-cumulus:%s' % dotenv.STATEMINE_BUILD_BRANCH}, + 'bin/astar':{dockerImage:'uniquenetwork/builder-astar:%s' % dotenv.ASTAR_BUILD_BRANCH}, + 'bin/polkadex':{dockerImage:'uniquenetwork/builder-polkadex:%s' % dotenv.POLKADEX_BUILD_BRANCH}, +})(prev) diff --git a/.baedeker/up.sh b/.baedeker/up.sh new file mode 100755 index 0000000000..695175405e --- /dev/null +++ b/.baedeker/up.sh @@ -0,0 +1,6 @@ +#!/bin/sh +set -e +BDK_DIR=$(dirname $(readlink -f "$0")) +RUST_LOG=info baedeker --spec=docker -J$BDK_DIR/vendor/ --generator=docker_compose=$BDK_DIR/.bdk-env --generator=docker_compose_discover=$BDK_DIR/.bdk-env/discover.env --secret=file=$BDK_DIR/.bdk-env/secret --tla-str=relay_spec=rococo-local --input-modules='lib:baedeker-library/ops/nginx.libsonnet' --input-modules='lib:baedeker-library/ops/devtools.libsonnet' --tla-str=repoDir=$(realpath $BDK_DIR/..) $@ $BDK_DIR/rewrites.jsonnet +cd $BDK_DIR/.bdk-env +docker compose up -d --wait --remove-orphans diff --git a/.baedeker/xcm-opal.jsonnet b/.baedeker/xcm-opal.jsonnet new file mode 100644 index 0000000000..c203797263 --- /dev/null +++ b/.baedeker/xcm-opal.jsonnet @@ -0,0 +1,65 @@ +local +m = import 'baedeker-library/mixin/spec.libsonnet', +; + +function(relay_spec) + +local relay = { + name: 'relay', + bin: 'bin/polkadot', + validatorIdAssignment: 'staking', + spec: {Genesis:{ + chain: relay_spec, + modify:: m.genericRelay($, hrmp = [ + [$.parachains.opal.paraId, $.parachains.westmint.paraId, 8, 512], + [$.parachains.westmint.paraId, $.parachains.opal.paraId, 8, 512], + ]), + }}, + nodes: { + [name]: { + bin: $.bin, + wantedKeys: 'relay', + }, + for name in ['alice', 'bob', 'charlie', 'dave', 'eve'] + }, +}; + +local opal = { + name: 'opal', + bin: 'bin/unique', + paraId: 1001, + spec: {Genesis:{ + modify:: m.genericPara($), + }}, + nodes: { + [name]: { + bin: $.bin, + wantedKeys: 'para', + }, + for name in ['alice', 'bob'] + }, +}; + +local westmint = { + name: 'westmint', + bin: 'bin/cumulus', + paraId: 1002, + spec: {Genesis:{ + chain: 'westmint-local', + modify:: m.genericPara($), + }}, + nodes: { + [name]: { + bin: $.bin, + wantedKeys: 'para', + }, + for name in ['alice', 'bob'] + }, +}; + +relay + { + parachains: { + [para.name]: para, + for para in [opal, westmint] + }, +} diff --git a/.baedeker/xcm-quartz.jsonnet b/.baedeker/xcm-quartz.jsonnet new file mode 100644 index 0000000000..ecb958d612 --- /dev/null +++ b/.baedeker/xcm-quartz.jsonnet @@ -0,0 +1,128 @@ +local +m = import 'baedeker-library/mixin/spec.libsonnet', +; + +function(relay_spec) + +local relay = { + name: 'relay', + bin: 'bin/polkadot', + validatorIdAssignment: 'staking', + spec: {Genesis:{ + chain: relay_spec, + modify:: m.genericRelay($, hrmp = std.join([], [ + [[$.parachains[a].paraId, $.parachains[b].paraId, 8, 512], [$.parachains[b].paraId, $.parachains[a].paraId, 8, 512]], + for [a, b] in [ + ['quartz', 'karura'], + ['quartz', 'moonriver'], + ['quartz', 'statemine'], + ['quartz', 'shiden'], + ] + ])), + }}, + nodes: { + [name]: { + bin: $.bin, + wantedKeys: 'relay', + }, + for name in ['alice', 'bob', 'charlie', 'dave', 'eve', 'ferdie'] + }, +}; + +local quartz = { + name: 'quartz', + bin: 'bin/unique', + paraId: 1001, + spec: {Genesis:{ + modify:: m.genericPara($), + }}, + nodes: { + [name]: { + bin: $.bin, + wantedKeys: 'para', + }, + for name in ['alice', 'bob'] + }, +}; + +local karura = { + name: 'karura', + bin: 'bin/acala', + paraId: 1002, + spec: {Genesis:{ + chain: 'karura-dev', + modify:: bdk.mixer([ + m.genericPara($), + function(prev) prev {id+: '-local'}, + ]), + }}, + nodes: { + [name]: { + bin: $.bin, + wantedKeys: 'para', + legacyRpc: true, + }, + for name in ['alice', 'bob'] + }, +}; + +local moonriver = { + name: 'moonriver', + bin: 'bin/moonbeam', + signatureSchema: 'Ethereum', + paraId: 1003, + spec: {Genesis:{ + chain: 'moonriver-local', + specFilePrefix: 'moonriver-local-', + modify:: m.genericPara($), + }}, + nodes: { + [name]: { + bin: $.bin, + wantedKeys: 'para-nimbus', + legacyRpc: true, + }, + for name in ['alith', 'baltathar'] + }, +}; + +local statemine = { + name: 'statemine', + bin: 'bin/cumulus', + paraId: 1004, + spec: {Genesis:{ + chain: 'statemine-local', + modify:: m.genericPara($), + }}, + nodes: { + [name]: { + bin: $.bin, + wantedKeys: 'para', + }, + for name in ['alice', 'bob'] + }, +}; + +local shiden = { + name: 'shiden', + bin: 'bin/astar', + paraId: 1005, + spec: {Genesis:{ + chain: 'shiden-dev', + modify:: m.genericPara($), + }}, + nodes: { + [name]: { + bin: $.bin, + wantedKeys: 'para', + }, + for name in ['alice', 'bob'] + }, +}; + +relay + { + parachains: { + [para.name]: para, + for para in [quartz, karura, moonriver, statemine, shiden] + }, +} diff --git a/.baedeker/xcm-unique.jsonnet b/.baedeker/xcm-unique.jsonnet new file mode 100644 index 0000000000..f7b9dc413c --- /dev/null +++ b/.baedeker/xcm-unique.jsonnet @@ -0,0 +1,147 @@ +local +m = import 'baedeker-library/mixin/spec.libsonnet', +; + +function(relay_spec) + +local relay = { + name: 'relay', + bin: 'bin/polkadot', + validatorIdAssignment: 'staking', + spec: {Genesis:{ + chain: relay_spec, + modify:: m.genericRelay($, hrmp = std.join([], [ + [[$.parachains[a].paraId, $.parachains[b].paraId, 8, 512], [$.parachains[b].paraId, $.parachains[a].paraId, 8, 512]], + for [a, b] in [ + ['unique', 'acala'], + ['unique', 'moonbeam'], + ['unique', 'statemint'], + ['unique', 'astar'], + ['unique', 'polkadex'], + ] + ])), + }}, + nodes: { + [name]: { + bin: $.bin, + wantedKeys: 'relay', + }, + for name in ['alice', 'bob', 'charlie', 'dave', 'eve', 'ferdie', 'gregory'] + }, +}; + +local unique = { + name: 'unique', + bin: 'bin/unique', + paraId: 1001, + spec: {Genesis:{ + modify:: m.genericPara($), + }}, + nodes: { + [name]: { + bin: $.bin, + wantedKeys: 'para', + }, + for name in ['alice', 'bob'] + }, +}; + +local acala = { + name: 'acala', + bin: 'bin/acala', + paraId: 1002, + spec: {Genesis:{ + chain: 'acala-dev', + modify:: bdk.mixer([ + m.genericPara($), + function(prev) prev {id+: '-local'}, + ]), + }}, + nodes: { + [name]: { + bin: $.bin, + wantedKeys: 'para', + legacyRpc: true, + }, + for name in ['alice', 'bob'] + }, +}; + +local moonbeam = { + name: 'moonbeam', + bin: 'bin/moonbeam', + signatureSchema: 'Ethereum', + paraId: 1003, + spec: {Genesis:{ + chain: 'moonbeam-local', + specFilePrefix: 'moonbeam-local-', + modify:: m.genericPara($), + }}, + nodes: { + [name]: { + bin: $.bin, + wantedKeys: 'para-nimbus', + legacyRpc: true, + }, + for name in ['alith', 'baltathar'] + }, +}; + +local statemint = { + name: 'statemint', + bin: 'bin/cumulus', + paraId: 1004, + spec: {Genesis:{ + chain: 'statemint-local', + modify:: m.genericPara($), + }}, + nodes: { + [name]: { + bin: $.bin, + wantedKeys: 'para-ed', + }, + for name in ['alice', 'bob'] + }, +}; + +local astar = { + name: 'astar', + bin: 'bin/astar', + paraId: 1005, + spec: {Genesis:{ + chain: 'astar-dev', + modify:: m.genericPara($), + }}, + nodes: { + [name]: { + bin: $.bin, + wantedKeys: 'para', + legacyRpc: true, + }, + for name in ['alice', 'bob'] + }, +}; + +local polkadex = { + name: 'polkadex', + bin: 'bin/polkadex', + paraId: 1006, + spec: {Genesis:{ + chain: 'mainnet', + modify:: m.genericPara($), + }}, + nodes: { + [name]: { + bin: $.bin, + wantedKeys: 'para', + }, + for name in ['alice', 'bob'] + }, +}; + +relay + { + parachains: { + [para.name]: para, + for para in [unique, acala, moonbeam, statemint, astar, polkadex] + }, +} diff --git a/.docker/Dockerfile-acala.j2 b/.docker/Dockerfile-acala.j2 index c8142baad9..b337d76f54 100644 --- a/.docker/Dockerfile-acala.j2 +++ b/.docker/Dockerfile-acala.j2 @@ -14,12 +14,11 @@ RUN apt-get update && \ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none -RUN rustup toolchain uninstall $(rustup toolchain list) && \ - rustup toolchain install {{ RUST_TOOLCHAIN }} && \ +RUN rustup toolchain install {{ RUST_TOOLCHAIN }} && \ + rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} && \ rustup default {{ RUST_TOOLCHAIN }} && \ rustup target list --installed && \ rustup show -RUN rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} RUN mkdir /unique_parachain WORKDIR /unique_parachain @@ -29,13 +28,19 @@ FROM rust-builder as builder-acala-bin WORKDIR /unique_parachain -RUN git clone -b {{ ACALA_BUILD_BRANCH }} --depth 1 https://github.com/AcalaNetwork/Acala.git && \ +RUN git clone -b {{ ACALA_BUILD_BRANCH }} --depth 1 https://github.com/AcalaNetwork/Acala.git + +RUN --mount=type=cache,target=/cargo-home/registry \ + --mount=type=cache,target=/cargo-home/git \ + --mount=type=cache,target=/unique_parachain/Acala/target \ cd Acala && \ make init && \ - make build-release + make build-release && \ + mv ./target/production/acala /unique_parachain/Acala/ # ===== BIN ====== FROM ubuntu:22.04 as builder-acala -COPY --from=builder-acala-bin /unique_parachain/Acala/target/production/acala /unique_parachain/acala/target/production/acala +COPY --from=builder-acala-bin /unique_parachain/Acala/acala /bin/acala +ENTRYPOINT ["/bin/acala"] diff --git a/.docker/Dockerfile-astar.j2 b/.docker/Dockerfile-astar.j2 index 3a2e39ba8f..eec18e6f9d 100644 --- a/.docker/Dockerfile-astar.j2 +++ b/.docker/Dockerfile-astar.j2 @@ -14,12 +14,11 @@ RUN apt-get update && \ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none -RUN rustup toolchain uninstall $(rustup toolchain list) && \ - rustup toolchain install {{ RUST_TOOLCHAIN }} && \ +RUN rustup toolchain install {{ RUST_TOOLCHAIN }} && \ + rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} && \ rustup default {{ RUST_TOOLCHAIN }} && \ rustup target list --installed && \ rustup show -RUN rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} RUN mkdir /unique_parachain WORKDIR /unique_parachain @@ -29,12 +28,18 @@ FROM rust-builder as builder-astar-bin WORKDIR /unique_parachain -RUN git clone --recurse-submodules -b {{ ASTAR_BUILD_BRANCH }} --depth 1 https://github.com/AstarNetwork/Astar.git && \ +RUN git clone --recurse-submodules -b {{ ASTAR_BUILD_BRANCH }} --depth 1 https://github.com/AstarNetwork/Astar.git + +RUN --mount=type=cache,target=/cargo-home/registry \ + --mount=type=cache,target=/cargo-home/git \ + --mount=type=cache,target=/unique_parachain/Astar/target \ cd Astar && \ - cargo build --release + CARGO_INCREMENTAL=0 cargo build --release --locked && \ + mv ./target/release/astar-collator /unique_parachain/Astar/astar # ===== BIN ====== FROM ubuntu:22.04 as builder-astar -COPY --from=builder-astar-bin /unique_parachain/Astar/target/release/astar-collator /unique_parachain/astar/target/release/astar +COPY --from=builder-astar-bin /unique_parachain/Astar/astar /bin/astar +ENTRYPOINT ["/bin/astar-collator"] diff --git a/.docker/Dockerfile-chain-dev b/.docker/Dockerfile-chain-dev index e086474d35..2cfd83166c 100644 --- a/.docker/Dockerfile-chain-dev +++ b/.docker/Dockerfile-chain-dev @@ -24,4 +24,4 @@ WORKDIR /dev_chain RUN cargo build --release RUN echo "$NETWORK" -CMD cargo run --release --features=${NETWORK}-runtime -- --dev -linfo --unsafe-ws-external --rpc-cors=all --unsafe-rpc-external +CMD cargo run --release --features=${NETWORK}-runtime -- --dev -linfo --rpc-cors=all --unsafe-rpc-external diff --git a/.docker/Dockerfile-chain-dev-unit b/.docker/Dockerfile-chain-dev-unit index 681c7b7ca3..5ea2305bbe 100644 --- a/.docker/Dockerfile-chain-dev-unit +++ b/.docker/Dockerfile-chain-dev-unit @@ -17,4 +17,4 @@ COPY . /dev_chain WORKDIR /dev_chain -CMD cargo test --features=limit-testing --workspace +CMD cargo test --features=limit-testing,tests --workspace diff --git a/.docker/Dockerfile-collators b/.docker/Dockerfile-collators.j2 similarity index 60% rename from .docker/Dockerfile-collators rename to .docker/Dockerfile-collators.j2 index 1227e2dfe6..fe248477c3 100644 --- a/.docker/Dockerfile-collators +++ b/.docker/Dockerfile-collators.j2 @@ -1,21 +1,17 @@ -ARG POLKADOT_BUILD_BRANCH -FROM uniquenetwork/builder-polkadot:${POLKADOT_BUILD_BRANCH} as polkadot +FROM uniquenetwork/builder-polkadot:{{ POLKADOT_BUILD_BRANCH }} as polkadot # ===== Rust builder ===== FROM uniquenetwork/services:latest as rust-builder -ARG RUST_TOOLCHAIN= -ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN ENV CARGO_HOME="/cargo-home" ENV PATH="/cargo-home/bin:$PATH" ENV TZ=UTC - RUN rustup toolchain uninstall $(rustup toolchain list) && \ - rustup toolchain install $RUST_TOOLCHAIN && \ - rustup default $RUST_TOOLCHAIN && \ + rustup toolchain install {{ RUST_TOOLCHAIN }} && \ + rustup default {{ RUST_TOOLCHAIN }} && \ rustup target list --installed && \ rustup show -RUN rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN +RUN rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} RUN mkdir /unique_parachain WORKDIR /unique_parachain @@ -23,18 +19,12 @@ WORKDIR /unique_parachain # ===== BUILD ====== FROM rust-builder as builder-unique -ARG PROFILE=release -ARG NETWORK -ARG POLKADOT_LAUNCH_BRANCH -ARG BRANCH - -ENV POLKADOT_LAUNCH_BRANCH $POLKADOT_LAUNCH_BRANCH - WORKDIR /unique_parachain -RUN git clone -b $BRANCH https://github.com/UniqueNetwork/unique-chain.git && \ - cd unique-chain && \ - cargo build --features=$NETWORK-runtime --$PROFILE +ARG PROFILE=release + +RUN git clone https://github.com/UniqueNetwork/unique-chain.git -b {{ BRANCH }} . && \ + cargo build --features={{ NETWORK }}-runtime --$PROFILE # ===== RUN ====== @@ -48,7 +38,7 @@ RUN apt-get -y update && \ nvm install v16.16.0 && \ nvm use v16.16.0 -RUN git clone https://github.com/uniquenetwork/polkadot-launch -b ${POLKADOT_LAUNCH_BRANCH} +RUN git clone https://github.com/uniquenetwork/polkadot-launch -b {{ POLKADOT_LAUNCH_BRANCH }} RUN export NVM_DIR="$HOME/.nvm" && \ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ @@ -56,14 +46,13 @@ RUN export NVM_DIR="$HOME/.nvm" && \ npm install --global yarn && \ yarn install -COPY --from=builder-unique /unique_parachain/unique-chain/.docker/testnet-config/launch-config.json /polkadot-launch/launch-config.json -COPY --from=builder-unique /unique_parachain/unique-chain/target/release/unique-collator /unique-chain/target/release/ +COPY --from=builder-unique /unique_parachain/target/release/unique-collator /unique-chain/target/release/ +COPY --from=builder-unique /unique_parachain/launch-config.json /polkadot-launch/launch-config.json COPY --from=polkadot /unique_parachain/polkadot/target/release/polkadot /polkadot/target/release/ EXPOSE 9844 EXPOSE 9944 -EXPOSE 9933 EXPOSE 9833 EXPOSE 40333 EXPOSE 30333 diff --git a/.docker/Dockerfile-cumulus.j2 b/.docker/Dockerfile-cumulus.j2 index 82afea4316..e35ace29d9 100644 --- a/.docker/Dockerfile-cumulus.j2 +++ b/.docker/Dockerfile-cumulus.j2 @@ -14,12 +14,11 @@ RUN apt-get update && \ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none -RUN rustup toolchain uninstall $(rustup toolchain list) && \ - rustup toolchain install {{ RUST_TOOLCHAIN }} && \ +RUN rustup toolchain install {{ RUST_TOOLCHAIN }} && \ + rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} && \ rustup default {{ RUST_TOOLCHAIN }} && \ rustup target list --installed && \ rustup show -RUN rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} RUN mkdir /unique_parachain WORKDIR /unique_parachain @@ -29,12 +28,18 @@ FROM rust-builder as builder-cumulus-bin WORKDIR /unique_parachain -RUN git clone -b {{ CUMULUS_BUILD_BRANCH }} --depth 1 https://github.com/paritytech/cumulus.git && \ +RUN git clone -b {{ CUMULUS_BUILD_BRANCH }} --depth 1 https://github.com/paritytech/cumulus.git + +RUN --mount=type=cache,target=/cargo-home/registry \ + --mount=type=cache,target=/cargo-home/git \ + --mount=type=cache,target=/unique_parachain/cumulus/target \ cd cumulus && \ - cargo build --release + CARGO_INCREMENTAL=0 cargo build --release --locked && \ + mv ./target/release/polkadot-parachain /unique_parachain/cumulus/cumulus # ===== BIN ====== FROM ubuntu:22.04 as builder-cumulus -COPY --from=builder-cumulus-bin /unique_parachain/cumulus/target/release/polkadot-parachain /unique_parachain/cumulus/target/release/polkadot-parachain +COPY --from=builder-cumulus-bin /unique_parachain/cumulus/cumulus /bin/cumulus +ENTRYPOINT ["/bin/cumulus"] diff --git a/.docker/Dockerfile-moonbeam.j2 b/.docker/Dockerfile-moonbeam.j2 index 2336219399..3bb81c43c8 100644 --- a/.docker/Dockerfile-moonbeam.j2 +++ b/.docker/Dockerfile-moonbeam.j2 @@ -14,12 +14,11 @@ RUN apt-get update && \ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none -RUN rustup toolchain uninstall $(rustup toolchain list) && \ - rustup toolchain install {{ RUST_TOOLCHAIN }} && \ +RUN rustup toolchain install {{ RUST_TOOLCHAIN }} && \ + rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} && \ rustup default {{ RUST_TOOLCHAIN }} && \ rustup target list --installed && \ rustup show -RUN rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} RUN mkdir /unique_parachain WORKDIR /unique_parachain @@ -30,12 +29,18 @@ FROM rust-builder as builder-moonbeam-bin WORKDIR /unique_parachain -RUN git clone -b {{ MOONBEAM_BUILD_BRANCH }} --depth 1 https://github.com/PureStake/moonbeam.git && \ +RUN git clone -b {{ MOONBEAM_BUILD_BRANCH }} --depth 1 https://github.com/PureStake/moonbeam.git + +RUN --mount=type=cache,target=/cargo-home/registry \ + --mount=type=cache,target=/cargo-home/git \ + --mount=type=cache,target=/unique_parachain/moonbeam/target \ cd moonbeam && \ - cargo build --release + CARGO_INCREMENTAL=0 cargo build --release --locked && \ + mv ./target/release/moonbeam /unique_parachain/moonbeam/ # ===== BIN ====== FROM ubuntu:22.04 as builder-moonbeam -COPY --from=builder-moonbeam-bin /unique_parachain/moonbeam/target/release/moonbeam /unique_parachain/moonbeam/target/release/moonbeam +COPY --from=builder-moonbeam-bin /unique_parachain/moonbeam/moonbeam /bin/moonbeam +ENTRYPOINT ["/bin/moonbeam"] diff --git a/.docker/Dockerfile-parachain-node-only b/.docker/Dockerfile-parachain-node-only deleted file mode 100644 index d8cc4b6f14..0000000000 --- a/.docker/Dockerfile-parachain-node-only +++ /dev/null @@ -1,83 +0,0 @@ -ARG POLKADOT_BUILD_BRANCH -FROM uniquenetwork/builder-polkadot:${POLKADOT_BUILD_BRANCH} as polkadot - -# ===== Rust builder ===== -FROM uniquenetwork/services:latest as rust-builder - -ARG RUST_TOOLCHAIN= -ENV RUST_TOOLCHAIN $RUST_TOOLCHAIN -ENV CARGO_HOME="/cargo-home" -ENV PATH="/cargo-home/bin:$PATH" -ENV TZ=UTC -RUN rustup toolchain uninstall $(rustup toolchain list) && \ - rustup toolchain install $RUST_TOOLCHAIN && \ - rustup default $RUST_TOOLCHAIN && \ - rustup target list --installed && \ - rustup show -RUN rustup target add wasm32-unknown-unknown --toolchain $RUST_TOOLCHAIN - -RUN mkdir /unique_parachain -WORKDIR /unique_parachain - - -# ===== BUILD current version ====== -FROM rust-builder as builder-unique-current - -ARG PROFILE=release -ARG NETWORK -ARG MAINNET_BRANCH -ARG REPO_URL - -WORKDIR /unique_parachain - -RUN git clone $REPO_URL -b $MAINNET_BRANCH . && \ - cargo build --features=${NETWORK}-runtime --$PROFILE - -# ===== BUILD target version ====== -FROM rust-builder as builder-unique-target - -ARG PROFILE=release -ARG NETWORK - -COPY . /unique_parachain -WORKDIR /unique_parachain - -RUN cargo build --features=${NETWORK}-runtime --$PROFILE - -# ===== RUN ====== - -FROM ubuntu:22.04 - -ARG NETWORK -ARG POLKADOT_LAUNCH_BRANCH -ARG WASM_NAME - -RUN apt-get -y update && \ - apt-get -y install curl git && \ - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash && \ - export NVM_DIR="$HOME/.nvm" && \ - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ - nvm install v16.16.0 && \ - nvm use v16.16.0 - -RUN git clone https://github.com/uniquenetwork/polkadot-launch -b ${POLKADOT_LAUNCH_BRANCH} - -RUN export NVM_DIR="$HOME/.nvm" && \ - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ - cd /polkadot-launch && \ - npm install --global yarn && \ - yarn install - -RUN echo "$NETWORK" - -COPY --from=builder-unique-current /unique_parachain/target/release/unique-collator /unique-chain/current/release/ -COPY --from=builder-unique-target /unique_parachain/target/release/unique-collator /unique-chain/target/release/ -COPY --from=builder-unique-target /unique_parachain/target/release/wbuild/"$WASM_NAME"-runtime/"$WASM_NAME"_runtime.compact.compressed.wasm /unique-chain/target/release/wbuild/"$WASM_NAME"-runtime/"$WASM_NAME"_runtime.compact.compressed.wasm - -COPY --from=polkadot /unique_parachain/polkadot/target/release/polkadot /polkadot/target/release/ -COPY --from=polkadot /unique_parachain/polkadot/target/release/wbuild/westend-runtime/westend_runtime.compact.compressed.wasm /polkadot/target/release/wbuild/westend-runtime/westend_runtime.compact.compressed.wasm - -CMD export NVM_DIR="$HOME/.nvm" && \ - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ - cd /polkadot-launch && \ - yarn start launch-config.json --test-upgrade-parachains -w -n diff --git a/.docker/Dockerfile-polkadex.j2 b/.docker/Dockerfile-polkadex.j2 new file mode 100644 index 0000000000..23c20f6295 --- /dev/null +++ b/.docker/Dockerfile-polkadex.j2 @@ -0,0 +1,46 @@ +# ===== Rust builder ===== +FROM ubuntu:22.04 as rust-builder +LABEL maintainer="Unique.Network" + +ENV CARGO_HOME="/cargo-home" +ENV PATH="/cargo-home/bin:$PATH" +ENV TZ=UTC +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +RUN apt-get update && \ + apt-get install -y curl cmake pkg-config libssl-dev git clang llvm libudev-dev protobuf-compiler && \ + apt-get clean && \ + rm -r /var/lib/apt/lists/* + +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none + +RUN rustup toolchain install {{ RUST_TOOLCHAIN }} && \ + rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} && \ + rustup default {{ RUST_TOOLCHAIN }} && \ + rustup target list --installed && \ + rustup show + +RUN mkdir /unique_parachain +WORKDIR /unique_parachain + +# ===== BUILD ACALA ===== +FROM rust-builder as builder-polkadex-bin + +WORKDIR /unique_parachain + +RUN git clone --depth 1 -b {{ POLKADEX_BUILD_BRANCH }} https://github.com/Polkadex-Substrate/parachain.git + +RUN --mount=type=cache,target=/cargo-home/registry \ + --mount=type=cache,target=/cargo-home/git \ + --mount=type=cache,target=/unique_parachain/parachain/target \ + cd parachain && \ + CARGO_INCREMENTAL=0 cargo build --release --locked && \ + mkdir /unique_parachain/Polkadex && \ + mv ./target/release/parachain-polkadex-node /unique_parachain/Polkadex/polkadex + +# ===== BIN ====== + +FROM ubuntu:22.04 as builder-polkadex + +COPY --from=builder-polkadex-bin /unique_parachain/Polkadex/polkadex /bin/polkadex +ENTRYPOINT ["/bin/polkadex"] diff --git a/.docker/Dockerfile-polkadot.j2 b/.docker/Dockerfile-polkadot.j2 index 6b62c36b1a..2aa33ff76f 100644 --- a/.docker/Dockerfile-polkadot.j2 +++ b/.docker/Dockerfile-polkadot.j2 @@ -14,12 +14,11 @@ RUN apt-get update && \ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none -RUN rustup toolchain uninstall $(rustup toolchain list) && \ - rustup toolchain install {{ RUST_TOOLCHAIN }} && \ +RUN rustup toolchain install {{ RUST_TOOLCHAIN }} && \ + rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} && \ rustup default {{ RUST_TOOLCHAIN }} && \ rustup target list --installed && \ rustup show -RUN rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} RUN mkdir /unique_parachain WORKDIR /unique_parachain @@ -29,12 +28,18 @@ FROM rust-builder as builder-polkadot-bin WORKDIR /unique_parachain -RUN git clone -b {{ POLKADOT_BUILD_BRANCH }} --depth 1 https://github.com/paritytech/polkadot.git && \ +RUN git clone -b {{ POLKADOT_BUILD_BRANCH }} --depth 1 https://github.com/paritytech/polkadot.git + +RUN --mount=type=cache,target=/cargo-home/registry \ + --mount=type=cache,target=/cargo-home/git \ + --mount=type=cache,target=/unique_parachain/polkadot/target \ cd polkadot && \ - cargo build --release + CARGO_INCREMENTAL=0 cargo build --release --locked && \ + mv ./target/release/polkadot /unique_parachain/polkadot/ # ===== BIN ====== FROM ubuntu:22.04 as builder-polkadot -COPY --from=builder-polkadot-bin /unique_parachain/polkadot/target/release/polkadot /unique_parachain/polkadot/target/release/polkadot +COPY --from=builder-polkadot-bin /unique_parachain/polkadot/polkadot /bin/polkadot +ENTRYPOINT ["/bin/polkadot"] diff --git a/.docker/Dockerfile-testnet.j2 b/.docker/Dockerfile-testnet.j2 index f5ec1ad738..97eccca70e 100644 --- a/.docker/Dockerfile-testnet.j2 +++ b/.docker/Dockerfile-testnet.j2 @@ -55,7 +55,6 @@ COPY --from=uniquenetwork/builder-polkadot:{{ POLKADOT_BUILD_BRANCH }} /unique_p EXPOSE 9844 EXPOSE 9944 -EXPOSE 9933 EXPOSE 9833 EXPOSE 40333 EXPOSE 30333 diff --git a/.docker/Dockerfile-unique b/.docker/Dockerfile-unique new file mode 100644 index 0000000000..494cc90909 --- /dev/null +++ b/.docker/Dockerfile-unique @@ -0,0 +1,60 @@ +# ===== Rust builder ===== +FROM ubuntu:22.04 as rust-builder +LABEL maintainer="Unique.Network" + +ENV CARGO_HOME="/cargo-home" +ENV PATH="/cargo-home/bin:$PATH" +ENV TZ=UTC +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +RUN apt-get update && \ + apt-get install -y curl cmake pkg-config libssl-dev git clang llvm libudev-dev protobuf-compiler && \ + apt-get clean && \ + rm -r /var/lib/apt/lists/* + +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none + +ARG RUST_TOOLCHAIN +RUN echo "Using Rust '$RUST_TOOLCHAIN'" && \ + rustup toolchain install $RUST_TOOLCHAIN && \ + rustup target add wasm32-unknown-unknown --toolchain ${RUST_TOOLCHAIN} && \ + rustup default $RUST_TOOLCHAIN && \ + rustup target list --installed && \ + rustup show + +RUN mkdir /unique_parachain +WORKDIR /unique_parachain + +# ===== BUILD UNIQUE ===== +FROM rust-builder as builder-polkadot-bin + +WORKDIR /unique_parachain + +COPY . unique-chain/ + +ARG RUNTIME_FEATURES +# registry for Updating registry. It is safe to cache it, because it only contains references to the dependency files, +# and the caches for the files themselves are set in Cargo.lock, which won't be updated because of --locked flag +# git for Updating git repository. It is safe to cache it, because git dependencies are cached by revision, +# revision is locked in Cargo.lock, and it is forbidden to update the Cargo.lock, because of --locked flag +# passed to cargo build +# target for built dependencies. Technically, it may be unsafe to cache it, but there was no bugs in the caching logic +# of it to this day (Ignoring incremental compilation, which is explicitly disabled by CARGO_INCREMENTAL=0). Only the +# fully built crates will be cached depending on the crate source, version and feature set, which are locked by +# Cargo.lock, which can't be updated because of the --locked flag. +RUN --mount=type=cache,target=/cargo-home/registry \ + --mount=type=cache,target=/cargo-home/git \ + --mount=type=cache,target=/unique_parachain/unique-chain/target \ + cd unique-chain && \ + echo "Using runtime features '$RUNTIME_FEATURES'" && \ + CARGO_INCREMENTAL=0 cargo build --release --features="$RUNTIME_FEATURES" --locked && \ + mv ./target/release/unique-collator /unique_parachain/unique-chain/ && \ + cd target/release/wbuild && find . -name "*.wasm" -exec sh -c 'mkdir -p "../../../wasm/$(dirname {})"; cp {} "../../../wasm/{}"' \; + +# ===== BIN ====== + +FROM ubuntu:22.04 as builder-polkadot + +COPY --from=builder-polkadot-bin /unique_parachain/unique-chain/unique-collator /bin/unique-collator +COPY --from=builder-polkadot-bin /unique_parachain/unique-chain/wasm /wasm +ENTRYPOINT ["/bin/unique-collator"] diff --git a/.docker/Dockerfile-unique-release b/.docker/Dockerfile-unique-release new file mode 100644 index 0000000000..ab378b11c9 --- /dev/null +++ b/.docker/Dockerfile-unique-release @@ -0,0 +1,49 @@ +# ===== Rust builder ===== +FROM ubuntu:22.04 as rust-builder +LABEL maintainer="Unique.Network" + +ENV CARGO_HOME="/cargo-home" +ENV PATH="/cargo-home/bin:$PATH" +ENV TZ=UTC +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +RUN apt-get update && \ + apt-get install -y curl cmake pkg-config libssl-dev git clang llvm libudev-dev protobuf-compiler && \ + apt-get clean && \ + rm -r /var/lib/apt/lists/* + +RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none + +ARG RUST_TOOLCHAIN +RUN echo "Using Rust '$RUST_TOOLCHAIN'" && \ + rustup toolchain install $RUST_TOOLCHAIN && \ + rustup target add wasm32-unknown-unknown --toolchain ${RUST_TOOLCHAIN} && \ + rustup default $RUST_TOOLCHAIN && \ + rustup target list --installed && \ + rustup show + +RUN mkdir /unique_parachain +WORKDIR /unique_parachain + +# ===== BUILD POLKADOT ===== +FROM rust-builder as builder-polkadot-bin + +WORKDIR /unique_parachain + +ARG UNIQUE_VERSION +RUN git clone -b "$UNIQUE_VERSION" --depth 1 https://github.com/uniquenetwork/unique-chain.git + +ARG RUNTIME_FEATURES +RUN --mount=type=cache,target=/cargo-home/registry \ + --mount=type=cache,target=/cargo-home/git \ + --mount=type=cache,target=/unique_parachain/polkadot/target \ + cd unique-chain && \ + CARGO_INCREMENTAL=0 cargo build --release --features="$RUNTIME_FEATURES" --locked && \ + mv ./target/release/unique-collator /unique_parachain/unique-chain/ + +# ===== BIN ====== + +FROM ubuntu:22.04 as builder-polkadot + +COPY --from=builder-polkadot-bin /unique_parachain/unique-chain/unique-collator /bin/unique-collator +ENTRYPOINT ["/bin/unique-collator"] diff --git a/.docker/Dockerfile-xcm.j2 b/.docker/Dockerfile-xcm.j2 deleted file mode 100644 index 4495d118ea..0000000000 --- a/.docker/Dockerfile-xcm.j2 +++ /dev/null @@ -1,76 +0,0 @@ -# ===== Rust builder ===== -FROM uniquenetwork/services:latest as rust-builder -ENV CARGO_HOME="/cargo-home" -ENV PATH="/cargo-home/bin:$PATH" -ENV TZ=UTC - -RUN rustup toolchain uninstall $(rustup toolchain list) && \ - rustup toolchain install {{ RUST_TOOLCHAIN }} && \ - rustup default {{ RUST_TOOLCHAIN }} && \ - rustup target list --installed && \ - rustup show -RUN rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} - -RUN mkdir /unique_parachain -WORKDIR /unique_parachain - -# ===== BUILD ====== -FROM rust-builder as builder-unique - -ARG PROFILE=release - -WORKDIR /unique_parachain - -COPY ./xcm-config/launch-config-xcm-{{ NETWORK }}.json ./launch-config-xcm-{{ NETWORK }}.json -COPY ./xcm-config/5validators.jsonnet ./5validators.jsonnet -COPY ./xcm-config/6validators.jsonnet ./6validators.jsonnet - -RUN git clone -b {{ BRANCH }} https://github.com/UniqueNetwork/unique-chain.git && \ - cd unique-chain && \ - cargo build --features={{ NETWORK }}-runtime --$PROFILE - -# ===== RUN ====== - -FROM ubuntu:22.04 - -RUN apt-get -y update && \ - apt-get -y install curl git && \ - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash && \ - export NVM_DIR="$HOME/.nvm" && \ - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ - nvm install v16.16.0 && \ - nvm use v16.16.0 - -RUN git clone https://github.com/uniquenetwork/polkadot-launch -b {{ POLKADOT_LAUNCH_BRANCH }} - -RUN export NVM_DIR="$HOME/.nvm" && \ - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ - cd /polkadot-launch && \ - npm install --global yarn && \ - yarn install - -COPY --from=builder-unique /unique_parachain/launch-config-xcm-{{ NETWORK }}.json /polkadot-launch/ -COPY --from=builder-unique /unique_parachain/5validators.jsonnet /polkadot-launch/5validators.jsonnet -COPY --from=builder-unique /unique_parachain/6validators.jsonnet /polkadot-launch/6validators.jsonnet - -COPY --from=builder-unique /unique_parachain/unique-chain/target/release/unique-collator /unique-chain/target/release/ - -COPY --from=uniquenetwork/builder-polkadot:{{ POLKADOT_BUILD_BRANCH }} /unique_parachain/polkadot/target/release/polkadot /polkadot/target/release/ -COPY --from=uniquenetwork/builder-moonbeam:{{ MOONBEAM_BUILD_BRANCH }} /unique_parachain/moonbeam/target/release/moonbeam /moonbeam/target/release/ -COPY --from=uniquenetwork/builder-cumulus:{{ CUMULUS_BUILD_BRANCH }} /unique_parachain/cumulus/target/release/polkadot-parachain /cumulus/target/release/cumulus -COPY --from=uniquenetwork/builder-acala:{{ ACALA_BUILD_BRANCH }} /unique_parachain/acala/target/production/acala /acala/target/release/ -COPY --from=uniquenetwork/builder-astar:{{ ASTAR_BUILD_BRANCH }} /unique_parachain/astar/target/release/astar /astar/target/release/ -COPY --from=uniquenetwork/builder-chainql:{{ CHAINQL }} /chainql/target/release/chainql /chainql/target/release/ - -EXPOSE 9844 -EXPOSE 9933 -EXPOSE 9944 -EXPOSE 9946 -EXPOSE 9947 -EXPOSE 9948 -EXPOSE 9949 - -CMD export NVM_DIR="$HOME/.nvm" PATH="$PATH:/chainql/target/release" && \ - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ - cd /polkadot-launch && \ - yarn start launch-config-xcm-{{ NETWORK }}.json diff --git a/.docker/Dockerfile-chainql.j2 b/.docker/additional/Dockerfile-chainql similarity index 85% rename from .docker/Dockerfile-chainql.j2 rename to .docker/additional/Dockerfile-chainql index 656b3f3aac..39033519e8 100644 --- a/.docker/Dockerfile-chainql.j2 +++ b/.docker/additional/Dockerfile-chainql @@ -15,11 +15,11 @@ RUN apt-get update && \ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none RUN rustup toolchain uninstall $(rustup toolchain list) && \ - rustup toolchain install {{ RUST_TOOLCHAIN }} && \ - rustup default {{ RUST_TOOLCHAIN }} && \ + rustup toolchain install nightly-2022-11-15 && \ + rustup default nightly-2022-11-15 && \ rustup target list --installed && \ rustup show -RUN rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} +RUN rustup target add wasm32-unknown-unknown --toolchain nightly-2022-11-15 RUN mkdir /unique_parachain WORKDIR /unique_parachain diff --git a/.docker/additional/xcm-rococo/.env b/.docker/additional/xcm-rococo/.env deleted file mode 120000 index e72b3932f4..0000000000 --- a/.docker/additional/xcm-rococo/.env +++ /dev/null @@ -1 +0,0 @@ -../../../.env \ No newline at end of file diff --git a/.docker/additional/xcm-rococo/Dockerfile-xcm-opal-rococo.temp b/.docker/additional/xcm-rococo/Dockerfile-xcm-opal-rococo.temp deleted file mode 100644 index 7993d714e4..0000000000 --- a/.docker/additional/xcm-rococo/Dockerfile-xcm-opal-rococo.temp +++ /dev/null @@ -1,79 +0,0 @@ -FROM uniquenetwork/builder-polkadot:{{ UNIQUEWEST_MAINNET_BRANCH }} as polkadot -FROM uniquenetwork/builder-cumulus:{{ WESTMINT_BUILD_BRANCH }} as cumulus - -# ===== Rust builder ===== -FROM ubuntu:22.04 as rust-builder -LABEL maintainer="Unique.Network" - -ENV CARGO_HOME="/cargo-home" -ENV PATH="/cargo-home/bin:$PATH" -ENV TZ=UTC -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -RUN apt-get update && \ - apt-get install -y curl cmake pkg-config libssl-dev git clang llvm libudev-dev protobuf-compiler && \ - apt-get clean && \ - rm -r /var/lib/apt/lists/* - -RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none - -RUN rustup toolchain uninstall $(rustup toolchain list) && \ - rustup toolchain install {{ RUST_TOOLCHAIN }} && \ - rustup default {{ RUST_TOOLCHAIN }} && \ - rustup target list --installed && \ - rustup show -RUN rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} - -RUN mkdir /unique_parachain -WORKDIR /unique_parachain - -# ===== BUILD ====== -FROM rust-builder as builder-unique - -ARG BRANCH -ARG PROFILE=release - -WORKDIR /unique_parachain -#COPY . . - -RUN git clone -b {{ BRANCH }} https://github.com/UniqueNetwork/unique-chain.git . && \ -# cd unique-chain && \ - cargo build --features=opal-runtime --$PROFILE - -# ===== RUN ====== -FROM ubuntu:22.04 - -RUN apt-get -y update && \ - apt-get -y install curl git && \ - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash && \ - export NVM_DIR="$HOME/.nvm" && \ - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ - nvm install v16.16.0 && \ - nvm use v16.16.0 - -RUN git clone https://github.com/uniquenetwork/polkadot-launch -b {{ POLKADOT_LAUNCH_BRANCH }} - -RUN export NVM_DIR="$HOME/.nvm" && \ - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ - cd /polkadot-launch && \ - npm install --global yarn && \ - yarn install - -COPY --from=builder-unique /unique_parachain/.docker/additional/xcm-rococo/launch-config-xcm-opal-rococo.json /polkadot-launch/launch-config.json -COPY --from=builder-unique /unique_parachain/.docker/xcm-config/5validators.jsonnet /polkadot-launch/5validators.jsonnet - -COPY --from=builder-unique /unique_parachain/target/release/unique-collator /unique-chain/target/release/ -COPY --from=polkadot /unique_parachain/polkadot/target/release/polkadot /polkadot/target/release/ -COPY --from=cumulus /unique_parachain/cumulus/target/release/polkadot-parachain /cumulus/target/release/cumulus -COPY --from=uniquenetwork/builder-chainql:latest /chainql/target/release/chainql /chainql/target/release/ - -EXPOSE 9844 -EXPOSE 9944 -EXPOSE 9946 -EXPOSE 9947 -EXPOSE 9948 - -CMD export NVM_DIR="$HOME/.nvm" PATH="$PATH:/chainql/target/release" && \ - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ - cd /polkadot-launch && \ - yarn start launch-config.json diff --git a/.docker/additional/xcm-rococo/Dockerfile-xcm-quartz-rococo.temp b/.docker/additional/xcm-rococo/Dockerfile-xcm-quartz-rococo.temp deleted file mode 100644 index cc94261f50..0000000000 --- a/.docker/additional/xcm-rococo/Dockerfile-xcm-quartz-rococo.temp +++ /dev/null @@ -1,86 +0,0 @@ -FROM uniquenetwork/builder-polkadot:{{ KUSAMA_MAINNET_BRANCH }} as polkadot -FROM uniquenetwork/builder-moonbeam:{{ MOONRIVER_BUILD_BRANCH }} as moonbeam -FROM uniquenetwork/builder-cumulus:{{ STATEMINE_BUILD_BRANCH }} as cumulus -FROM uniquenetwork/builder-acala:{{ KARURA_BUILD_BRANCH }} as acala -FROM uniquenetwork/builder-astar:{{ SHIDEN_BUILD_BRANCH }} as astar - -# ===== Rust builder ===== -FROM ubuntu:22.04 as rust-builder -LABEL maintainer="Unique.Network" - -ENV CARGO_HOME="/cargo-home" -ENV PATH="/cargo-home/bin:$PATH" -ENV TZ=UTC -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -RUN apt-get update && \ - apt-get install -y curl cmake pkg-config libssl-dev git clang llvm libudev-dev protobuf-compiler && \ - apt-get clean && \ - rm -r /var/lib/apt/lists/* - -RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none - -RUN rustup toolchain uninstall $(rustup toolchain list) && \ - rustup toolchain install {{ RUST_TOOLCHAIN }} && \ - rustup default {{ RUST_TOOLCHAIN }} && \ - rustup target list --installed && \ - rustup show -RUN rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} - -RUN mkdir /unique_parachain -WORKDIR /unique_parachain - -# ===== BUILD ====== -FROM rust-builder as builder-unique - -ARG BRANCH -ARG PROFILE=release - -WORKDIR /unique_parachain -#COPY . . - -RUN git clone -b {{ BRANCH }} https://github.com/UniqueNetwork/unique-chain.git . && \ -# cd unique-chain && \ - cargo build --features=quartz-runtime --$PROFILE - -# ===== RUN ====== -FROM ubuntu:22.04 - -RUN apt-get -y update && \ - apt-get -y install curl git && \ - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash && \ - export NVM_DIR="$HOME/.nvm" && \ - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ - nvm install v16.16.0 && \ - nvm use v16.16.0 - -RUN git clone https://github.com/uniquenetwork/polkadot-launch -b {{ POLKADOT_LAUNCH_BRANCH }} - -RUN export NVM_DIR="$HOME/.nvm" && \ - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ - cd /polkadot-launch && \ - npm install --global yarn && \ - yarn install - -COPY --from=builder-unique /unique_parachain/.docker/additional/xcm-rococo/launch-config-xcm-quartz-rococo.json /polkadot-launch/launch-config.json -COPY --from=builder-unique /unique_parachain/.docker/xcm-config/6validators.jsonnet /polkadot-launch/6validators.jsonnet - -COPY --from=builder-unique /unique_parachain/target/release/unique-collator /unique-chain/target/release/ -COPY --from=polkadot /unique_parachain/polkadot/target/release/polkadot /polkadot/target/release/ -COPY --from=moonbeam /unique_parachain/moonbeam/target/release/moonbeam /moonbeam/target/release/ -COPY --from=cumulus /unique_parachain/cumulus/target/release/polkadot-parachain /cumulus/target/release/cumulus -COPY --from=acala /unique_parachain/Acala/target/production/acala /acala/target/release/ -COPY --from=astar /unique_parachain/astar/target/release/astar /astar/target/release/ -COPY --from=uniquenetwork/builder-chainql:latest /chainql/target/release/chainql /chainql/target/release/ - -EXPOSE 9844 -EXPOSE 9944 -EXPOSE 9946 -EXPOSE 9947 -EXPOSE 9948 -EXPOSE 9949 - -CMD export NVM_DIR="$HOME/.nvm" PATH="$PATH:/chainql/target/release" && \ - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ - cd /polkadot-launch && \ - yarn start launch-config.json diff --git a/.docker/additional/xcm-rococo/Dockerfile-xcm-unique-rococo.temp b/.docker/additional/xcm-rococo/Dockerfile-xcm-unique-rococo.temp deleted file mode 100644 index ceb017f6df..0000000000 --- a/.docker/additional/xcm-rococo/Dockerfile-xcm-unique-rococo.temp +++ /dev/null @@ -1,86 +0,0 @@ -FROM uniquenetwork/builder-polkadot:{{ POLKADOT_MAINNET_BRANCH }} as polkadot -FROM uniquenetwork/builder-moonbeam:{{ MOONBEAM_BUILD_BRANCH }} as moonbeam -FROM uniquenetwork/builder-cumulus:{{ STATEMINT_BUILD_BRANCH }} as cumulus -FROM uniquenetwork/builder-acala:{{ ACALA_BUILD_BRANCH }} as acala -FROM uniquenetwork/builder-astar:{{ ASTAR_BUILD_BRANCH }} as astar - -# ===== Rust builder ===== -FROM ubuntu:22.04 as rust-builder -LABEL maintainer="Unique.Network" - -ENV CARGO_HOME="/cargo-home" -ENV PATH="/cargo-home/bin:$PATH" -ENV TZ=UTC -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -RUN apt-get update && \ - apt-get install -y curl cmake pkg-config libssl-dev git clang llvm libudev-dev protobuf-compiler && \ - apt-get clean && \ - rm -r /var/lib/apt/lists/* - -RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none - -RUN rustup toolchain uninstall $(rustup toolchain list) && \ - rustup toolchain install {{ RUST_TOOLCHAIN }} && \ - rustup default {{ RUST_TOOLCHAIN }} && \ - rustup target list --installed && \ - rustup show -RUN rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }} - -RUN mkdir /unique_parachain -WORKDIR /unique_parachain - -# ===== BUILD ====== -FROM rust-builder as builder-unique - -ARG BRANCH -ARG PROFILE=release - -WORKDIR /unique_parachain -#COPY . . - -RUN git clone -b {{ BRANCH }} https://github.com/UniqueNetwork/unique-chain.git . && \ -# cd unique-chain && \ - cargo build --features=unique-runtime --$PROFILE - -# ===== RUN ====== -FROM ubuntu:22.04 - -RUN apt-get -y update && \ - apt-get -y install curl git && \ - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash && \ - export NVM_DIR="$HOME/.nvm" && \ - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ - nvm install v16.16.0 && \ - nvm use v16.16.0 - -RUN git clone https://github.com/uniquenetwork/polkadot-launch -b {{ POLKADOT_LAUNCH_BRANCH }} - -RUN export NVM_DIR="$HOME/.nvm" && \ - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ - cd /polkadot-launch && \ - npm install --global yarn && \ - yarn install - -COPY --from=builder-unique /unique_parachain/.docker/additional/xcm-rococo/launch-config-xcm-unique-rococo.json /polkadot-launch/launch-config.json -COPY --from=builder-unique /unique_parachain/.docker/xcm-config/6validators.jsonnet /polkadot-launch/6validators.jsonnet - -COPY --from=builder-unique /unique_parachain/target/release/unique-collator /unique-chain/target/release/ -COPY --from=polkadot /unique_parachain/polkadot/target/release/polkadot /polkadot/target/release/ -COPY --from=moonbeam /unique_parachain/moonbeam/target/release/moonbeam /moonbeam/target/release/ -COPY --from=cumulus /unique_parachain/cumulus/target/release/polkadot-parachain /cumulus/target/release/cumulus -COPY --from=acala /unique_parachain/Acala/target/production/acala /acala/target/release/ -COPY --from=astar /unique_parachain/astar/target/release/astar /astar/target/release/ -COPY --from=uniquenetwork/builder-chainql:latest /chainql/target/release/chainql /chainql/target/release/ - -EXPOSE 9844 -EXPOSE 9944 -EXPOSE 9946 -EXPOSE 9947 -EXPOSE 9948 -EXPOSE 9949 - -CMD export NVM_DIR="$HOME/.nvm" PATH="$PATH:/chainql/target/release" && \ - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ - cd /polkadot-launch && \ - yarn start launch-config.json diff --git a/.docker/additional/xcm-rococo/docker-compose-xcm-opal-rococo.yml b/.docker/additional/xcm-rococo/docker-compose-xcm-opal-rococo.yml deleted file mode 100644 index 589a77c339..0000000000 --- a/.docker/additional/xcm-rococo/docker-compose-xcm-opal-rococo.yml +++ /dev/null @@ -1,22 +0,0 @@ -version: "3.5" - -services: - xcm_opal_rococo: - build: - context: . - dockerfile: ./Dockerfile-xcm-opal-rococo - container_name: xcm-opal-rococo - image: xcm-opal-rococo - expose: - - 9844 - - 9944 - - 9946 - - 9947 - - 9948 - ports: - - 127.0.0.1:9844:9844 - - 127.0.0.1:9944:9944 - - 127.0.0.1:9946:9946 - - 127.0.0.1:9947:9947 - - 127.0.0.1:9948:9948 - diff --git a/.docker/additional/xcm-rococo/docker-compose-xcm-quartz-rococo.yml b/.docker/additional/xcm-rococo/docker-compose-xcm-quartz-rococo.yml deleted file mode 100644 index 5647e7f0c9..0000000000 --- a/.docker/additional/xcm-rococo/docker-compose-xcm-quartz-rococo.yml +++ /dev/null @@ -1,24 +0,0 @@ -version: "3.5" - -services: - xcm_quartz_rococo: - build: - context: . - dockerfile: ./Dockerfile-xcm-quartz-rococo - container_name: xcm-quartz-rococo - image: xcm-quartz-rococo - expose: - - 9844 - - 9944 - - 9946 - - 9947 - - 9948 - - 9949 - ports: - - 127.0.0.1:9844:9844 - - 127.0.0.1:9944:9944 - - 127.0.0.1:9946:9946 - - 127.0.0.1:9947:9947 - - 127.0.0.1:9948:9948 - - 127.0.0.1:9949:9949 - diff --git a/.docker/additional/xcm-rococo/docker-compose-xcm-unique-rococo.yml b/.docker/additional/xcm-rococo/docker-compose-xcm-unique-rococo.yml deleted file mode 100644 index a5e8ade288..0000000000 --- a/.docker/additional/xcm-rococo/docker-compose-xcm-unique-rococo.yml +++ /dev/null @@ -1,24 +0,0 @@ -version: "3.5" - -services: - xcm_unique_rococo: - build: - context: . - dockerfile: ./Dockerfile-xcm-unique-rococo - container_name: xcm-unique-rococo - image: xcm-unique-rococo - expose: - - 9844 - - 9944 - - 9946 - - 9947 - - 9948 - - 9949 - ports: - - 127.0.0.1:9844:9844 - - 127.0.0.1:9944:9944 - - 127.0.0.1:9946:9946 - - 127.0.0.1:9947:9947 - - 127.0.0.1:9948:9948 - - 127.0.0.1:9949:9949 - diff --git a/.docker/additional/xcm-rococo/launch-config-xcm-opal-rococo.json b/.docker/additional/xcm-rococo/launch-config-xcm-opal-rococo.json deleted file mode 100644 index 8c34fd6a3e..0000000000 --- a/.docker/additional/xcm-rococo/launch-config-xcm-opal-rococo.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "relaychain": { - "bin": "/polkadot/target/release/polkadot", - "chain": "rococo-local", - "chainInitializer": [ - "chainql", - "--tla-code=spec=import '${spec}'", - "5validators.jsonnet" - ], - "nodes": [ - { - "name": "alice", - "wsPort": 9844, - "rpcPort": 9843, - "port": 30444, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "bob", - "wsPort": 9855, - "rpcPort": 9854, - "port": 30555, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "charlie", - "wsPort": 9866, - "rpcPort": 9865, - "port": 30666, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "dave", - "wsPort": 9877, - "rpcPort": 9876, - "port": 30777, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "eve", - "wsPort": 9888, - "rpcPort": 9887, - "port": 30888, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - } - - ], - "genesis": { - "runtime": { - "runtime_genesis_config": { - "parachainsConfiguration": { - "config": { - "validation_upgrade_frequency": 1, - "validation_upgrade_delay": 1 - } - } - } - } - } - }, - "parachains": [ - { - "bin": "/unique-chain/target/release/unique-collator", - "id": "2095", - "balance": "1000000000000000000000000", - "nodes": [ - { - "port": 31200, - "wsPort": 9944, - "rpcPort": 9933, - "name": "alice", - "flags": [ - "--unsafe-rpc-external", - "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug", - "--unsafe-ws-external" - ] - } - ] - }, - { - "bin": "/cumulus/target/release/cumulus", - "id": "1000", - "chain": "westmint-local", - "balance": "1000000000000000000000000", - "nodes": [ - { - "wsPort": 9948, - "port": 31204, - "name": "alice", - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - } - ] - } - ], - "simpleParachains": [], - "hrmpChannels": [ - { - "sender": 2095, - "recipient": 1000, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 1000, - "recipient": 2095, - "maxCapacity": 8, - "maxMessageSize": 512 - } - ], - "finalization": false -} - diff --git a/.docker/additional/xcm-rococo/launch-config-xcm-quartz-rococo.json b/.docker/additional/xcm-rococo/launch-config-xcm-quartz-rococo.json deleted file mode 100644 index 588757f1d9..0000000000 --- a/.docker/additional/xcm-rococo/launch-config-xcm-quartz-rococo.json +++ /dev/null @@ -1,240 +0,0 @@ -{ - "relaychain": { - "bin": "/polkadot/target/release/polkadot", - "chain": "rococo-local", - "chainInitializer": [ - "chainql", - "--tla-code=spec=import '${spec}'", - "6validators.jsonnet" - ], - "nodes": [ - { - "name": "alice", - "wsPort": 9844, - "rpcPort": 9843, - "port": 30444, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "bob", - "wsPort": 9855, - "rpcPort": 9854, - "port": 30555, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "charlie", - "wsPort": 9866, - "rpcPort": 9865, - "port": 30666, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "dave", - "wsPort": 9877, - "rpcPort": 9876, - "port": 30777, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "eve", - "wsPort": 9888, - "rpcPort": 9887, - "port": 30888, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "ferdie", - "wsPort": 9899, - "rpcPort": 9898, - "port": 30999, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - } - ], - "genesis": { - "runtime": { - "runtime_genesis_config": { - "parachainsConfiguration": { - "config": { - "validation_upgrade_frequency": 1, - "validation_upgrade_delay": 1 - } - } - } - } - } - }, - "parachains": [ - { - "bin": "/unique-chain/target/release/unique-collator", - "id": "2095", - "balance": "1000000000000000000000000", - "nodes": [ - { - "port": 31200, - "wsPort": 9944, - "rpcPort": 9933, - "name": "alice", - "flags": [ - "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug", - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - } - ] - }, - { - "bin": "/acala/target/release/acala", - "id": "2000", - "chain": "karura-dev", - "balance": "1000000000000000000000", - "chainInitializer": [ - "chainql", - "-e", - "(import '${spec}') {id+: '-local'}" - ], - "nodes": [ - { - "wsPort": 9946, - "port": 31202, - "name": "alice", - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - } - ] - }, - { - "bin": "/moonbeam/target/release/moonbeam", - "id": 2023, - "balance": "1000000000000000000000", - "chain": "moonriver-local", - "specNamePrefix": "moonriver-local-", - "nodes": [ - { - "wsPort": 9947, - "port": 31203, - "name": "alice", - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "--", - "--execution=wasm" - ] - } - ] - }, - { - "bin": "/cumulus/target/release/cumulus", - "id": "1000", - "chain": "statemine-local", - "balance": "1000000000000000000000000", - "nodes": [ - { - "wsPort": 9948, - "port": 31204, - "name": "alice", - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - } - ] - }, - { - "bin": "/astar/target/release/astar", - "id": "2007", - "chain": "shiden-dev", - "balance": "1000000000000000000000000", - "nodes": [ - { - "wsPort": 9949, - "port": 31205, - "name": "alice", - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - } - ] - } - ], - "simpleParachains": [], - "hrmpChannels": [ - { - "sender": 2095, - "recipient": 2000, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2000, - "recipient": 2095, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2095, - "recipient": 2023, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2023, - "recipient": 2095, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2095, - "recipient": 1000, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 1000, - "recipient": 2095, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2007, - "recipient": 2095, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2095, - "recipient": 2007, - "maxCapacity": 8, - "maxMessageSize": 512 - } - ], - "finalization": false -} - diff --git a/.docker/additional/xcm-rococo/launch-config-xcm-unique-rococo.json b/.docker/additional/xcm-rococo/launch-config-xcm-unique-rococo.json deleted file mode 100644 index 94fafd9fb5..0000000000 --- a/.docker/additional/xcm-rococo/launch-config-xcm-unique-rococo.json +++ /dev/null @@ -1,240 +0,0 @@ -{ - "relaychain": { - "bin": "/polkadot/target/release/polkadot", - "chain": "rococo-local", - "chainInitializer": [ - "chainql", - "--tla-code=spec=import '${spec}'", - "6validators.jsonnet" - ], - "nodes": [ - { - "name": "alice", - "wsPort": 9844, - "rpcPort": 9843, - "port": 30444, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "bob", - "wsPort": 9855, - "rpcPort": 9854, - "port": 30555, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "charlie", - "wsPort": 9866, - "rpcPort": 9865, - "port": 30666, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "dave", - "wsPort": 9877, - "rpcPort": 9876, - "port": 30777, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "eve", - "wsPort": 9888, - "rpcPort": 9887, - "port": 30888, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "ferdie", - "wsPort": 9899, - "rpcPort": 9898, - "port": 30999, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - } - ], - "genesis": { - "runtime": { - "runtime_genesis_config": { - "parachainsConfiguration": { - "config": { - "validation_upgrade_frequency": 1, - "validation_upgrade_delay": 1 - } - } - } - } - } - }, - "parachains": [ - { - "bin": "/unique-chain/target/release/unique-collator", - "id": "2037", - "balance": "1000000000000000000000000", - "nodes": [ - { - "port": 31200, - "wsPort": 9944, - "rpcPort": 9933, - "name": "alice", - "flags": [ - "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug", - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - } - ] - }, - { - "bin": "/acala/target/release/acala", - "id": "2000", - "chain": "acala-dev", - "balance": "1000000000000000000000", - "chainInitializer": [ - "chainql", - "-e", - "(import '${spec}') {id+: '-local'}" - ], - "nodes": [ - { - "wsPort": 9946, - "port": 31202, - "name": "alice", - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - } - ] - }, - { - "bin": "/moonbeam/target/release/moonbeam", - "id": "2004", - "balance": "1000000000000000000000", - "chain": "moonbeam-local", - "specNamePrefix": "moonbeam-local-", - "nodes": [ - { - "wsPort": 9947, - "port": 31203, - "name": "alice", - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "--", - "--execution=wasm" - ] - } - ] - }, - { - "bin": "/cumulus/target/release/cumulus", - "id": "1000", - "chain": "statemint-local", - "balance": "1000000000000000000000000", - "nodes": [ - { - "wsPort": 9948, - "port": 31204, - "name": "alice", - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - } - ] - }, - { - "bin": "/astar/target/release/astar", - "id": "2006", - "chain": "astar-dev", - "balance": "1000000000000000000000000", - "nodes": [ - { - "wsPort": 9949, - "port": 31205, - "name": "alice", - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - } - ] - } - ], - "simpleParachains": [], - "hrmpChannels": [ - { - "sender": 2037, - "recipient": 2000, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2000, - "recipient": 2037, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2037, - "recipient": 2004, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2004, - "recipient": 2037, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2037, - "recipient": 1000, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 1000, - "recipient": 2037, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2006, - "recipient": 2037, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2037, - "recipient": 2006, - "maxCapacity": 8, - "maxMessageSize": 512 - } - ], - "finalization": false -} - diff --git a/.docker/additional/xcm-rococo/launch-opal-xcm-stand.sh b/.docker/additional/xcm-rococo/launch-opal-xcm-stand.sh deleted file mode 100755 index f17cb820ae..0000000000 --- a/.docker/additional/xcm-rococo/launch-opal-xcm-stand.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -#export BRANCH=$1 - -echo -n "Set the branch for clone unique-chain: " -read BRANCH - -if [ -z ${BRANCH} ]; then - echo "Ветка для клонирования не задана" - exit -else - export BRANCH=$BRANCH - echo "BRANCH="$BRANCH -fi - -pip install j2cli - -# CHAIN=opal -# export $CHAIN - -export PATH="$PATH:$HOME/.local/bin" - -for i in `cat .env`; do export $i; done - -j2 Dockerfile-xcm-opal-rococo.temp > Dockerfile-xcm-opal-rococo -#cat Dockerfile-xcm-opal-rococo.tmp | envsubst > Dockerfile-xcm-opal-rococo -#exit -docker-compose -f ./docker-compose-xcm-opal-rococo.yml up -d diff --git a/.docker/additional/xcm-rococo/launch-quartz-xcm-stand.sh b/.docker/additional/xcm-rococo/launch-quartz-xcm-stand.sh deleted file mode 100755 index 6fb543a36b..0000000000 --- a/.docker/additional/xcm-rococo/launch-quartz-xcm-stand.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -#export BRANCH=$1 - -echo -n "Set the branch for clone unique-chain: " -read BRANCH - -if [ -z ${BRANCH} ]; then - echo "Ветка для клонирования не задана" - exit -else - export BRANCH=$BRANCH - echo "BRANCH="$BRANCH -fi - -pip install j2cli - -# CHAIN=quartz -# export $CHAIN - -export PATH="$PATH:$HOME/.local/bin" - -for i in `cat .env`; do export $i; done - -j2 Dockerfile-xcm-quartz-rococo.temp > Dockerfile-xcm-quartz-rococo -#cat Dockerfile-xcm-quartz-rococo.tmp | envsubst > Dockerfile-xcm-quartz-rococo -#exit -docker-compose -f ./docker-compose-xcm-quartz-rococo.yml up -d diff --git a/.docker/additional/xcm-rococo/launch-unique-xcm-stand.sh b/.docker/additional/xcm-rococo/launch-unique-xcm-stand.sh deleted file mode 100755 index bdf163d730..0000000000 --- a/.docker/additional/xcm-rococo/launch-unique-xcm-stand.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -#export BRANCH=$1 - -echo -n "Set the branch for clone unique-chain: " -read BRANCH - -if [ -z ${BRANCH} ]; then - echo "Ветка для клонирования не задана" - exit -else - export BRANCH=$BRANCH - echo "BRANCH="$BRANCH -fi - -pip install j2cli - -# CHAIN=quartz -# export $CHAIN - -export PATH="$PATH:$HOME/.local/bin" - -for i in `cat .env`; do export $i; done - -j2 Dockerfile-xcm-unique-rococo.temp > Dockerfile-xcm-unique-rococo -#cat Dockerfile-xcm-unique-rococo.tmp | envsubst > Dockerfile-xcm-unique-rococo -#exit -docker-compose -f ./docker-compose-xcm-unique-rococo.yml up -d diff --git a/.docker/docker-compose.collators.j2 b/.docker/docker-compose.collators.j2 new file mode 100644 index 0000000000..ad7bb4d290 --- /dev/null +++ b/.docker/docker-compose.collators.j2 @@ -0,0 +1,10 @@ +version: "3.5" + +services: + forkless-data: + image: uniquenetwork/ci-collator-selection-local:{{ NETWORK }}-{{ BUILD_TAG }} + container_name: collator-selection-{{ NETWORK }} + expose: + - 9944 + ports: + - 127.0.0.1:9944:9944 diff --git a/.docker/docker-compose.forkless-data.j2 b/.docker/docker-compose.forkless-data.j2 index d8d9127730..4ab0e70ba9 100644 --- a/.docker/docker-compose.forkless-data.j2 +++ b/.docker/docker-compose.forkless-data.j2 @@ -6,7 +6,6 @@ services: container_name: forkless-data-{{ NETWORK }} expose: - 9944 - - 9933 - 33044 - 33055 - 33066 @@ -16,7 +15,6 @@ services: - 33155 ports: - 127.0.0.1:9944:9944 - - 127.0.0.1:9933:9933 - 127.0.0.1:33044:33044 - 127.0.0.1:33055:33055 - 127.0.0.1:33066:33066 diff --git a/.docker/docker-compose.forkless-nodata.j2 b/.docker/docker-compose.forkless-nodata.j2 index 423e4553f3..34975d4f83 100644 --- a/.docker/docker-compose.forkless-nodata.j2 +++ b/.docker/docker-compose.forkless-nodata.j2 @@ -6,7 +6,5 @@ services: container_name: forkless-nodata expose: - 9944 - - 9933 ports: - 127.0.0.1:9944:9944 - - 127.0.0.1:9933:9933 \ No newline at end of file diff --git a/.docker/docker-compose.tmp-collators.j2 b/.docker/docker-compose.gov.j2 similarity index 52% rename from .docker/docker-compose.tmp-collators.j2 rename to .docker/docker-compose.gov.j2 index af4924da68..df59ce2043 100644 --- a/.docker/docker-compose.tmp-collators.j2 +++ b/.docker/docker-compose.gov.j2 @@ -1,18 +1,16 @@ version: "3.5" services: - parachain-collators: + node-dev: build: args: - "RUST_TOOLCHAIN={{ RUST_TOOLCHAIN }}" - - "POLKADOT_BUILD_BRANCH={{ POLKADOT_BUILD_BRANCH }}" - - "POLKADOT_LAUNCH_BRANCH={{ POLKADOT_LAUNCH_BRANCH }}" - "NETWORK={{ NETWORK }}" - - "BRANCH={{ BRANCH }}" + - "WASM_NAME={{ WASM_NAME }}" context: ../ - dockerfile: .docker/Dockerfile-parachain - image: parachain-collators - container_name: parachain-collators + dockerfile: .docker/Dockerfile-chain-dev + image: node-dev + container_name: node-dev expose: - 9944 - 9933 @@ -23,3 +21,4 @@ services: options: max-size: "1m" max-file: "3" + command: cargo run --release --features={{ NETWORK }}-runtime,gov-test-timings -- --dev -linfo --rpc-cors=all --unsafe-rpc-external diff --git a/.docker/docker-compose.tmp-dev.j2 b/.docker/docker-compose.tmp-dev.j2 index 5de7ab1a53..bfac7fa28a 100644 --- a/.docker/docker-compose.tmp-dev.j2 +++ b/.docker/docker-compose.tmp-dev.j2 @@ -12,12 +12,10 @@ services: container_name: node-dev expose: - 9944 - - 9933 ports: - 127.0.0.1:9944:9944 - - 127.0.0.1:9933:9933 logging: options: max-size: "1m" max-file: "3" - command: cargo run --release --features={{ NETWORK }}-runtime -- --dev -linfo --unsafe-ws-external --rpc-cors=all --unsafe-rpc-external + command: cargo run --release --features={{ NETWORK }}-runtime -- --dev -linfo --rpc-cors=all --unsafe-rpc-external diff --git a/.docker/docker-compose.tmp-node.j2 b/.docker/docker-compose.tmp-node.j2 index e4337b31fc..e5e9d6b4a4 100644 --- a/.docker/docker-compose.tmp-node.j2 +++ b/.docker/docker-compose.tmp-node.j2 @@ -25,12 +25,10 @@ services: expose: - 9944 - 9945 - - 9933 - 9844 ports: - 127.0.0.1:9944:9944 - 127.0.0.1:9945:9945 - - 127.0.0.1:9933:9933 - 127.0.0.1:9844:9844 logging: options: diff --git a/.docker/docker-compose.try-runtime.j2 b/.docker/docker-compose.try-runtime.j2 index aa99bce7ee..879a6f2666 100644 --- a/.docker/docker-compose.try-runtime.j2 +++ b/.docker/docker-compose.try-runtime.j2 @@ -6,8 +6,6 @@ services: container_name: try-runtime expose: - 9944 - - 9933 ports: - 127.0.0.1:9944:9944 - - 127.0.0.1:9933:9933 diff --git a/.docker/docker-compose.xcm.j2 b/.docker/docker-compose.xcm.j2 deleted file mode 100644 index 00d6b426e0..0000000000 --- a/.docker/docker-compose.xcm.j2 +++ /dev/null @@ -1,24 +0,0 @@ -version: "3.5" - -services: - xcm_nodes: - image: uniquenetwork/ci-xcm-local:{{ NETWORK }}-{{ BUILD_TAG }} - container_name: xcm-{{ NETWORK }}-local - expose: - - 9844 - - 9933 - - 9944 - - 9946 - - 9947 - - 9948 - - 9949 - ports: - - 127.0.0.1:9844:9844 - - 127.0.0.1:9933:9933 - - 127.0.0.1:9944:9944 - - 127.0.0.1:9946:9946 - - 127.0.0.1:9947:9947 - - 127.0.0.1:9948:9948 - - 127.0.0.1:9949:9949 - - diff --git a/.docker/forkless-config/launch-config-forkless-nodata.j2 b/.docker/forkless-config/launch-config-forkless-nodata.j2 index cdf74d594d..d170cb22e1 100644 --- a/.docker/forkless-config/launch-config-forkless-nodata.j2 +++ b/.docker/forkless-config/launch-config-forkless-nodata.j2 @@ -7,8 +7,7 @@ "nodes": [ { "name": "alice", - "wsPort": 9844, - "rpcPort": 9843, + "rpcPort": 9844, "port": 30444, "flags": [ "-lparachain::candidate_validation=debug", @@ -20,8 +19,7 @@ }, { "name": "bob", - "wsPort": 9855, - "rpcPort": 9854, + "rpcPort": 9855, "port": 30555, "flags": [ "-lparachain::candidate_validation=debug", @@ -33,8 +31,7 @@ }, { "name": "charlie", - "wsPort": 9866, - "rpcPort": 9865, + "rpcPort": 9866, "port": 30666, "flags": [ "-lparachain::candidate_validation=debug", @@ -46,8 +43,7 @@ }, { "name": "dave", - "wsPort": 9877, - "rpcPort": 9876, + "rpcPort": 9877, "port": 30777, "flags": [ "-lparachain::candidate_validation=debug", @@ -59,8 +55,7 @@ }, { "name": "eve", - "wsPort": 9888, - "rpcPort": 9887, + "rpcPort": 9888, "port": 30888, "flags": [ "-lparachain::candidate_validation=debug", @@ -94,8 +89,7 @@ "nodes": [ { "port": 31200, - "wsPort": 9944, - "rpcPort": 9933, + "rpcPort": 9944, "name": "alice", "flags": [ "--rpc-cors=all", @@ -111,8 +105,7 @@ }, { "port": 31201, - "wsPort": 9945, - "rpcPort": 9934, + "rpcPort": 9945, "name": "bob", "flags": [ "--rpc-cors=all", diff --git a/.docker/forkless-config/zombienet-forkless-data.toml b/.docker/forkless-config/zombienet-forkless-data.toml index 3f3278affc..84154e6873 100644 --- a/.docker/forkless-config/zombienet-forkless-data.toml +++ b/.docker/forkless-config/zombienet-forkless-data.toml @@ -8,8 +8,7 @@ chain = "{{ RELAY_CHAIN_TYPE }}-local" [[relaychain.nodes]] name = "relay-alice" - ws_port = 9844 - rpc_port = 9843 + rpc_port = 9844 p2p_port = 30444 prometheus_port = 33044 prometheus = false @@ -18,8 +17,7 @@ chain = "{{ RELAY_CHAIN_TYPE }}-local" [[relaychain.nodes]] name = "relay-bob" - ws_port = 9855 - rpc_port = 9854 + rpc_port = 9855 p2p_port = 30555 prometheus_port = 33055 prometheus = false @@ -28,8 +26,7 @@ chain = "{{ RELAY_CHAIN_TYPE }}-local" [[relaychain.nodes]] name = "relay-charlie" - ws_port = 9866 - rpc_port = 9865 + rpc_port = 9866 p2p_port = 30666 prometheus_port = 33066 prometheus = false @@ -38,8 +35,7 @@ chain = "{{ RELAY_CHAIN_TYPE }}-local" [[relaychain.nodes]] name = "relay-dave" - ws_port = 9877 - rpc_port = 9876 + rpc_port = 9877 p2p_port = 30777 prometheus_port = 33077 prometheus = false @@ -48,8 +44,7 @@ chain = "{{ RELAY_CHAIN_TYPE }}-local" [[relaychain.nodes]] name = "relay-eve" - ws_port = 9888 - rpc_port = 9887 + rpc_port = 9888 p2p_port = 3088 prometheus_port = 33088 prometheus = false @@ -68,8 +63,7 @@ chain_spec_modifier_commands = [[ [[parachains.collators]] name = "alice" command = "/unique-chain/current/release/unique-collator" - ws_port = 9944 - rpc_port = 9933 + rpc_port = 9944 p2p_port = 31200 prometheus_port = 33144 prometheus = false @@ -80,8 +74,7 @@ chain_spec_modifier_commands = [[ [[parachains.collators]] name = "bob" command = "/unique-chain/current/release/unique-collator" - ws_port = 9945 - rpc_port = 9934 + rpc_port = 9945 p2p_port = 31201 prometheus_port = 33155 prometheus = false diff --git a/.docker/forkless-config/zombienet-forkless-nodata.toml b/.docker/forkless-config/zombienet-forkless-nodata.toml index 8c70cf42d2..19dc8cd9f8 100644 --- a/.docker/forkless-config/zombienet-forkless-nodata.toml +++ b/.docker/forkless-config/zombienet-forkless-nodata.toml @@ -8,8 +8,7 @@ chain = "{{ RELAY_CHAIN_TYPE }}-local" [[relaychain.nodes]] name = "relay-alice" - ws_port = 9844 - rpc_port = 9843 + rpc_port = 9844 p2p_port = 30444 [[relaychain.node_groups]] @@ -22,8 +21,7 @@ id = 1000 [[parachains.collators]] name = "alice" command = "/unique-chain/current/release/unique-collator" - ws_port = 9944 - rpc_port = 9933 + rpc_port = 9944 p2p_port = 31200 args = [ "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug", @@ -33,8 +31,7 @@ id = 1000 [[parachains.collators]] name = "bob" command = "/unique-chain/current/release/unique-collator" - ws_port = 9945 - rpc_port = 9934 + rpc_port = 9945 p2p_port = 31201 args = [ "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug", diff --git a/.docker/testnet-config/launch-config.json b/.docker/testnet-config/launch-config.json index e4c474642c..01d230cbb6 100644 --- a/.docker/testnet-config/launch-config.json +++ b/.docker/testnet-config/launch-config.json @@ -5,8 +5,7 @@ "nodes": [ { "name": "alice", - "wsPort": 9844, - "rpcPort": 9843, + "rpcPort": 9844, "port": 30444, "flags": [ "-lparachain::candidate_validation=debug", @@ -18,8 +17,7 @@ }, { "name": "bob", - "wsPort": 9855, - "rpcPort": 9854, + "rpcPort": 9855, "port": 30555, "flags": [ "-lparachain::candidate_validation=debug", @@ -31,8 +29,7 @@ }, { "name": "charlie", - "wsPort": 9866, - "rpcPort": 9865, + "rpcPort": 9866, "port": 30666, "flags": [ "-lparachain::candidate_validation=debug", @@ -44,8 +41,7 @@ }, { "name": "dave", - "wsPort": 9877, - "rpcPort": 9876, + "rpcPort": 9877, "port": 30777, "flags": [ "-lparachain::candidate_validation=debug", @@ -57,8 +53,7 @@ }, { "name": "eve", - "wsPort": 9888, - "rpcPort": 9887, + "rpcPort": 9888, "port": 30888, "flags": [ "-lparachain::candidate_validation=debug", @@ -90,8 +85,7 @@ "nodes": [ { "port": 31200, - "wsPort": 9944, - "rpcPort": 9933, + "rpcPort": 9944, "name": "alice", "flags": [ "--rpc-cors=all", @@ -102,8 +96,7 @@ }, { "port": 31201, - "wsPort": 9945, - "rpcPort": 9934, + "rpcPort": 9945, "name": "bob", "flags": [ "--rpc-cors=all", @@ -114,8 +107,7 @@ }, { "port": 31202, - "wsPort": 9946, - "rpcPort": 9935, + "rpcPort": 9946, "name": "charlie", "flags": [ "--rpc-cors=all", @@ -126,8 +118,7 @@ }, { "port": 31203, - "wsPort": 9947, - "rpcPort": 9936, + "rpcPort": 9947, "name": "dave", "flags": [ "--rpc-cors=all", @@ -138,8 +129,7 @@ }, { "port": 31204, - "wsPort": 9948, - "rpcPort": 9937, + "rpcPort": 9948, "name": "eve", "flags": [ "--rpc-cors=all", diff --git a/.docker/xcm-config/5validators.jsonnet b/.docker/xcm-config/5validators.jsonnet deleted file mode 100644 index 582cc9d3c5..0000000000 --- a/.docker/xcm-config/5validators.jsonnet +++ /dev/null @@ -1,50 +0,0 @@ - -function(spec) - spec { - genesis+: { - runtime+: { - staking+: { - validatorCount: 5, - invulnerables: [ - '5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY', - '5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc', - '5Ck5SLSHYac6WFt5UZRSsdJjwmpSZq85fd5TRNAdZQVzEAPT', - '5HKPmK9GYtE1PSLsS1qiYU9xQ9Si1NcEhdeCq9sw5bqu4ns8', - '5FCfAonRZgTFrTd9HREEyeJjDpT397KMzizE6T3DvebLFE7n', - ], - stakers: [ - [ - '5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY', - '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY', - 100000000000000, - 'Validator', - ], - [ - '5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc', - '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty', - 100000000000000, - 'Validator', - ], - [ - '5Ck5SLSHYac6WFt5UZRSsdJjwmpSZq85fd5TRNAdZQVzEAPT', - '5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y', - 100000000000000, - 'Validator', - ], - [ - '5HKPmK9GYtE1PSLsS1qiYU9xQ9Si1NcEhdeCq9sw5bqu4ns8', - '5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy', - 100000000000000, - 'Validator', - ], - [ - '5FCfAonRZgTFrTd9HREEyeJjDpT397KMzizE6T3DvebLFE7n', - '5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw', - 100000000000000, - 'Validator', - ], - ], - }, - }, - }, - } diff --git a/.docker/xcm-config/6validators.jsonnet b/.docker/xcm-config/6validators.jsonnet deleted file mode 100644 index f9dacc1aa0..0000000000 --- a/.docker/xcm-config/6validators.jsonnet +++ /dev/null @@ -1,57 +0,0 @@ - -function(spec) - spec { - genesis+: { - runtime+: { - staking+: { - validatorCount: 6, - invulnerables: [ - '5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY', - '5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc', - '5Ck5SLSHYac6WFt5UZRSsdJjwmpSZq85fd5TRNAdZQVzEAPT', - '5HKPmK9GYtE1PSLsS1qiYU9xQ9Si1NcEhdeCq9sw5bqu4ns8', - '5FCfAonRZgTFrTd9HREEyeJjDpT397KMzizE6T3DvebLFE7n', - '5CRmqmsiNFExV6VbdmPJViVxrWmkaXXvBrSX8oqBT8R9vmWk', - ], - stakers: [ - [ - '5GNJqTPyNqANBkUVMN1LPPrxXnFouWXoe2wNSmmEoLctxiZY', - '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY', - 100000000000000, - 'Validator', - ], - [ - '5HpG9w8EBLe5XCrbczpwq5TSXvedjrBGCwqxK1iQ7qUsSWFc', - '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty', - 100000000000000, - 'Validator', - ], - [ - '5Ck5SLSHYac6WFt5UZRSsdJjwmpSZq85fd5TRNAdZQVzEAPT', - '5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y', - 100000000000000, - 'Validator', - ], - [ - '5HKPmK9GYtE1PSLsS1qiYU9xQ9Si1NcEhdeCq9sw5bqu4ns8', - '5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy', - 100000000000000, - 'Validator', - ], - [ - '5FCfAonRZgTFrTd9HREEyeJjDpT397KMzizE6T3DvebLFE7n', - '5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw', - 100000000000000, - 'Validator', - ], - [ - '5CRmqmsiNFExV6VbdmPJViVxrWmkaXXvBrSX8oqBT8R9vmWk', - '5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL', - 100000000000000, - 'Validator', - ], - ], - }, - }, - }, - } diff --git a/.docker/xcm-config/launch-config-xcm-opal.j2 b/.docker/xcm-config/launch-config-xcm-opal.j2 deleted file mode 100644 index 38acd63eaf..0000000000 --- a/.docker/xcm-config/launch-config-xcm-opal.j2 +++ /dev/null @@ -1,135 +0,0 @@ -{ - "relaychain": { - "bin": "/polkadot/target/release/polkadot", - "chain": "{{ RELAY_CHAIN_TYPE }}-local", - "chainInitializer": [ - "chainql", - "--tla-code=spec=import '${spec}'", - "5validators.jsonnet" - ], - "nodes": [ - { - "name": "alice", - "wsPort": 9844, - "rpcPort": 9843, - "port": 30444, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "bob", - "wsPort": 9855, - "rpcPort": 9854, - "port": 30555, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "charlie", - "wsPort": 9866, - "rpcPort": 9865, - "port": 30666, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "dave", - "wsPort": 9877, - "rpcPort": 9876, - "port": 30777, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "eve", - "wsPort": 9888, - "rpcPort": 9887, - "port": 30888, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - } - - ], - "genesis": { - "runtime": { - "runtime_genesis_config": { - "parachainsConfiguration": { - "config": { - "validation_upgrade_frequency": 1, - "validation_upgrade_delay": 1 - } - } - } - } - } - }, - "parachains": [ - { - "bin": "/unique-chain/target/release/unique-collator", - "id": "2095", - "balance": "1000000000000000000000000", - "nodes": [ - { - "port": 31200, - "wsPort": 9944, - "rpcPort": 9933, - "name": "alice", - "flags": [ - "--unsafe-rpc-external", - "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug", - "--unsafe-ws-external" - ] - } - ] - }, - { - "bin": "/cumulus/target/release/cumulus", - "id": "1000", - "chain": "westmint-local", - "balance": "1000000000000000000000000", - "nodes": [ - { - "wsPort": 9948, - "port": 31204, - "name": "alice", - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - } - ] - } - ], - "simpleParachains": [], - "hrmpChannels": [ - { - "sender": 2095, - "recipient": 1000, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 1000, - "recipient": 2095, - "maxCapacity": 8, - "maxMessageSize": 512 - } - ], - "finalization": false -} - diff --git a/.docker/xcm-config/launch-config-xcm-quartz.j2 b/.docker/xcm-config/launch-config-xcm-quartz.j2 deleted file mode 100644 index d871855452..0000000000 --- a/.docker/xcm-config/launch-config-xcm-quartz.j2 +++ /dev/null @@ -1,240 +0,0 @@ -{ - "relaychain": { - "bin": "/polkadot/target/release/polkadot", - "chain": "{{ RELAY_CHAIN_TYPE }}-local", - "chainInitializer": [ - "chainql", - "--tla-code=spec=import '${spec}'", - "6validators.jsonnet" - ], - "nodes": [ - { - "name": "alice", - "wsPort": 9844, - "rpcPort": 9843, - "port": 30444, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "bob", - "wsPort": 9855, - "rpcPort": 9854, - "port": 30555, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "charlie", - "wsPort": 9866, - "rpcPort": 9865, - "port": 30666, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "dave", - "wsPort": 9877, - "rpcPort": 9876, - "port": 30777, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "eve", - "wsPort": 9888, - "rpcPort": 9887, - "port": 30888, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "ferdie", - "wsPort": 9899, - "rpcPort": 9898, - "port": 30999, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - } - ], - "genesis": { - "runtime": { - "runtime_genesis_config": { - "parachainsConfiguration": { - "config": { - "validation_upgrade_frequency": 1, - "validation_upgrade_delay": 1 - } - } - } - } - } - }, - "parachains": [ - { - "bin": "/unique-chain/target/release/unique-collator", - "id": "2095", - "balance": "1000000000000000000000000", - "nodes": [ - { - "port": 31200, - "wsPort": 9944, - "rpcPort": 9933, - "name": "alice", - "flags": [ - "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug", - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - } - ] - }, - { - "bin": "/acala/target/release/acala", - "id": "2000", - "chain": "karura-dev", - "balance": "1000000000000000000000", - "chainInitializer": [ - "chainql", - "-e", - "(import '${spec}') {id+: '-local'}" - ], - "nodes": [ - { - "wsPort": 9946, - "port": 31202, - "name": "alice", - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - } - ] - }, - { - "bin": "/moonbeam/target/release/moonbeam", - "id": 2023, - "balance": "1000000000000000000000", - "chain": "moonriver-local", - "specNamePrefix": "moonriver-local-", - "nodes": [ - { - "wsPort": 9947, - "port": 31203, - "name": "alice", - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "--", - "--execution=wasm" - ] - } - ] - }, - { - "bin": "/cumulus/target/release/cumulus", - "id": "1000", - "chain": "statemine-local", - "balance": "1000000000000000000000000", - "nodes": [ - { - "wsPort": 9948, - "port": 31204, - "name": "alice", - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - } - ] - }, - { - "bin": "/astar/target/release/astar", - "id": "2007", - "chain": "shiden-dev", - "balance": "1000000000000000000000000", - "nodes": [ - { - "wsPort": 9949, - "port": 31205, - "name": "alice", - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - } - ] - } - ], - "simpleParachains": [], - "hrmpChannels": [ - { - "sender": 2095, - "recipient": 2000, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2000, - "recipient": 2095, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2095, - "recipient": 2023, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2023, - "recipient": 2095, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2095, - "recipient": 1000, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 1000, - "recipient": 2095, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2007, - "recipient": 2095, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2095, - "recipient": 2007, - "maxCapacity": 8, - "maxMessageSize": 512 - } - ], - "finalization": false -} - diff --git a/.docker/xcm-config/launch-config-xcm-unique.j2 b/.docker/xcm-config/launch-config-xcm-unique.j2 deleted file mode 100644 index 365a8a8b47..0000000000 --- a/.docker/xcm-config/launch-config-xcm-unique.j2 +++ /dev/null @@ -1,240 +0,0 @@ -{ - "relaychain": { - "bin": "/polkadot/target/release/polkadot", - "chain": "{{ RELAY_CHAIN_TYPE }}-local", - "chainInitializer": [ - "chainql", - "--tla-code=spec=import '${spec}'", - "6validators.jsonnet" - ], - "nodes": [ - { - "name": "alice", - "wsPort": 9844, - "rpcPort": 9843, - "port": 30444, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "bob", - "wsPort": 9855, - "rpcPort": 9854, - "port": 30555, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "charlie", - "wsPort": 9866, - "rpcPort": 9865, - "port": 30666, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "dave", - "wsPort": 9877, - "rpcPort": 9876, - "port": 30777, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "eve", - "wsPort": 9888, - "rpcPort": 9887, - "port": 30888, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "ferdie", - "wsPort": 9899, - "rpcPort": 9898, - "port": 30999, - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lparachain::candidate_validation=debug" - ] - } - ], - "genesis": { - "runtime": { - "runtime_genesis_config": { - "parachainsConfiguration": { - "config": { - "validation_upgrade_frequency": 1, - "validation_upgrade_delay": 1 - } - } - } - } - } - }, - "parachains": [ - { - "bin": "/unique-chain/target/release/unique-collator", - "id": "2037", - "balance": "1000000000000000000000000", - "nodes": [ - { - "port": 31200, - "wsPort": 9944, - "rpcPort": 9933, - "name": "alice", - "flags": [ - "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug", - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - } - ] - }, - { - "bin": "/acala/target/release/acala", - "id": "2000", - "chain": "acala-dev", - "balance": "1000000000000000000000", - "chainInitializer": [ - "chainql", - "-e", - "(import '${spec}') {id+: '-local'}" - ], - "nodes": [ - { - "wsPort": 9946, - "port": 31202, - "name": "alice", - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - } - ] - }, - { - "bin": "/moonbeam/target/release/moonbeam", - "id": "2004", - "balance": "1000000000000000000000", - "chain": "moonbeam-local", - "specNamePrefix": "moonbeam-local-", - "nodes": [ - { - "wsPort": 9947, - "port": 31203, - "name": "alice", - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external", - "--", - "--execution=wasm" - ] - } - ] - }, - { - "bin": "/cumulus/target/release/cumulus", - "id": "1000", - "chain": "statemint-local", - "balance": "1000000000000000000000000", - "nodes": [ - { - "wsPort": 9948, - "port": 31204, - "name": "alice", - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - } - ] - }, - { - "bin": "/astar/target/release/astar", - "id": "2006", - "chain": "astar-dev", - "balance": "1000000000000000000000000", - "nodes": [ - { - "wsPort": 9949, - "port": 31205, - "name": "alice", - "flags": [ - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - } - ] - } - ], - "simpleParachains": [], - "hrmpChannels": [ - { - "sender": 2037, - "recipient": 2000, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2000, - "recipient": 2037, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2037, - "recipient": 2004, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2004, - "recipient": 2037, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2037, - "recipient": 1000, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 1000, - "recipient": 2037, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2006, - "recipient": 2037, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 2037, - "recipient": 2006, - "maxCapacity": 8, - "maxMessageSize": 512 - } - ], - "finalization": false -} - diff --git a/.dockerignore b/.dockerignore index 01eef2d7e2..f44fc234a3 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,8 +1,12 @@ .git/ .github/ +.docker/ +.baedeker/ doc/ target/ chain-data*/ smart_contract/ Dockerfile-parachain docker-compose-tests-parachain.yml +*.log +/*.json diff --git a/.env b/.env index 1e4ce64310..c53626bf93 100644 --- a/.env +++ b/.env @@ -1,30 +1,33 @@ -RUST_TOOLCHAIN=nightly-2022-11-15 +RUST_TOOLCHAIN=nightly-2023-05-22 POLKADOT_LAUNCH_BRANCH=unique-network RELAY_CHAIN_TYPE=westend CHAINQL=v0.4.1 DESTINATION_SPEC_VERSION=v942057 -POLKADOT_MAINNET_BRANCH=release-v0.9.37 -STATEMINT_BUILD_BRANCH=release-parachains-v9370 -ACALA_BUILD_BRANCH=2.17.0 -MOONBEAM_BUILD_BRANCH=runtime-2302 -ASTAR_BUILD_BRANCH=v5.4.0 -UNIQUE_MAINNET_BRANCH=release-v941055 +POLKADOT_MAINNET_BRANCH=release-v1.0.0 +STATEMINT_BUILD_BRANCH=release-parachains-v9430 +ACALA_BUILD_BRANCH=2.18.0 +MOONBEAM_BUILD_BRANCH=runtime-2403 +ASTAR_BUILD_BRANCH=v5.11.0 +UNIQUE_MAINNET_BRANCH=release-v942057 UNIQUE_REPLICA_FROM=wss://ws.unique.network:443 +POLKADEX_BUILD_BRANCH=v1.1.0 -KUSAMA_MAINNET_BRANCH=release-v0.9.38 -STATEMINE_BUILD_BRANCH=release-parachains-v9382 -KARURA_BUILD_BRANCH=release-karura-2.17.0 -MOONRIVER_BUILD_BRANCH=runtime-2302 -SHIDEN_BUILD_BRANCH=v5.4.0 -QUARTZ_MAINNET_BRANCH=release-v941056 + +KUSAMA_MAINNET_BRANCH=release-v1.0.0 +STATEMINE_BUILD_BRANCH=release-parachains-v9430 +KARURA_BUILD_BRANCH=release-karura-2.18.0 +MOONRIVER_BUILD_BRANCH=runtime-2403 +SHIDEN_BUILD_BRANCH=v5.15.0 +QUARTZ_MAINNET_BRANCH=release-v942057 QUARTZ_REPLICA_FROM=wss://ws-quartz.unique.network:443 -UNIQUEWEST_MAINNET_BRANCH=release-v0.9.42 -WESTMINT_BUILD_BRANCH=parachains-v9420 +UNIQUEWEST_MAINNET_BRANCH=release-v1.0.0 +WESTMINT_BUILD_BRANCH=parachains-v9430 OPAL_MAINNET_BRANCH=release-v942057 OPAL_REPLICA_FROM=wss://ws-opal.unique.network:443 -UNIQUEEAST_MAINNET_BRANCH=release-v0.9.42 -SAPPHIRE_MAINNET_BRANCH=release-v941055 +UNIQUEEAST_MAINNET_BRANCH=release-v1.0.0 +SAPPHIRE_MAINNET_BRANCH=release-v942057 SAPPHIRE_REPLICA_FROM=wss://ws-sapphire.unique.network:443 + diff --git a/.envrc b/.envrc new file mode 100644 index 0000000000..3114ea17ee --- /dev/null +++ b/.envrc @@ -0,0 +1,47 @@ +#!/bin/sh + +# Load .envrc from parent directories +source_up_if_exists +# Load .envrc-dev +source_env_if_exists .envrc-dev +# Common variables from .env +dotenv + +RED='\033[0;31m' +GREEN='\033[0;32m' +RESET='\033[0m' + +dep_not_found=false +function check_bdk { + if ! has $1; then + echo -e "${RED}$1 not found (wanted for beadeker discovery)${RESET}" + dep_not_found=true + fi +} + +watch_file .baedeker/.bdk-env/discover.env +if test -f .baedeker/.bdk-env/discover.env; then + check_bdk baedeker + check_bdk docker + check_bdk jq + if $dep_not_found; then + echo -e "${RED}Not performing bdk discovery${RESET}" + exit 0 + fi + + echo -e "${GREEN}Baedeker env updated${RESET}" + nginx_id=$(docker compose -f .baedeker/.bdk-env/docker-compose.yml ps --format=json | jq -r '.[] | select(.Service == "nginx") | .ID' -e) + if ! [ $? -eq 0 ]; then + echo -e "${RED}Nginx container not found${RESET}" + exit 0 + fi + nginx_ip=$(docker inspect $nginx_id | jq -r -e '.[0].NetworkSettings.Networks[].IPAddress') + if ! [ $? -eq 0 ]; then + echo -e "${RED}Nginx container network misconfigured?${RESET}" + exit 0 + fi + tmpenv=$(mktemp) + cat .baedeker/.bdk-env/discover.env | sed "s|BALANCER_URL|$nginx_ip|g" > $tmpenv + dotenv $tmpenv + echo -e "${GREEN}Enjoy your baedeker networks at $(echo $BDK_BALANCER || sed "s|BALANCER_URL|$nginx_ip|g")${RESET}" +fi diff --git a/.github/actions/buildContainer/action.yml b/.github/actions/buildContainer/action.yml new file mode 100644 index 0000000000..f6f56a4b81 --- /dev/null +++ b/.github/actions/buildContainer/action.yml @@ -0,0 +1,59 @@ +name: Build or pull container +description: '' +inputs: + container: + description: Which name to fetch/push + required: true + tag: + description: Which tag to fetch/push + required: true + context: + description: Container context + required: true + default: "." + dockerfile: + description: Path to dockerfile (relative to context) + required: true + args: + description: Docker build extra args + default: '' + dockerhub_username: + description: Secret + dockerhub_token: + description: Secret +outputs: + name: + description: Full container name + value: ${{ steps.ensure.outputs.name }} +runs: + using: "composite" + steps: + - name: Ensure have ${{ inputs.container }}:${{ inputs.tag }} + id: ensure + run: | + echo "Wanted container: ${{ inputs.container }}:${{ inputs.tag }}" + + TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ inputs.dockerhub_username }}'", "password": "'${{ inputs.dockerhub_token }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token) + + # Get TAGS from DOCKERHUB + TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/${{ inputs.container }}/tags/?page_size=100 | jq -r '."results"[]["name"]' || echo "") + + echo "Available tags:" + echo "$TAGS" + + # Check correct version POLKADOT and build it if it doesn't exist in POLKADOT TAGS + if [[ ${TAGS[*]} =~ (^|[[:space:]])"${{ inputs.tag }}"($|[[:space:]]) ]]; then + echo "Repository has needed version, pulling"; + docker pull ${{ inputs.container }}:${{ inputs.tag }} + else + echo "Repository had no needed version, so build it"; + cd "${{ inputs.context }}" && docker build --file "${{ inputs.dockerfile }}" \ + $BUILD_ARGS --tag ${{ inputs.container }}:${{ inputs.tag }} \ + . + echo "Push built version to the repository"; + docker push ${{ inputs.container }}:${{ inputs.tag }} || true + fi + echo "name=${{ inputs.container }}:${{ inputs.tag }}" >> $GITHUB_OUTPUT + env: + BUILD_ARGS: ${{ inputs.args }} + shell: bash diff --git a/.github/actions/extractDocker/action.yml b/.github/actions/extractDocker/action.yml new file mode 100644 index 0000000000..8a0b6a3f18 --- /dev/null +++ b/.github/actions/extractDocker/action.yml @@ -0,0 +1,27 @@ +name: Extract files from docker image +description: '' +inputs: + image: + description: Image to extract + required: true + directory: + description: Directory to extract from image + required: true +outputs: + dir: + description: Extracted directory + value: ${{ steps.mktemp.outputs.dir }} +runs: + using: composite + steps: + - name: Create temporary directory + id: mktemp + run: | + dir=$(mktemp -d -p $RUNNER_TEMP) + echo "dir=$dir" >> $GITHUB_OUTPUT + shell: bash + - name: Extract directory from image + run: | + docker run --entrypoint tar "${{ inputs.image }}" \ + -C ${{ inputs.directory }} -c . | tar -xC ${{ steps.mktemp.outputs.dir }} + shell: bash diff --git a/.github/actions/prepare/action.yml b/.github/actions/prepare/action.yml index e3b711592b..6c4e817950 100644 --- a/.github/actions/prepare/action.yml +++ b/.github/actions/prepare/action.yml @@ -13,4 +13,17 @@ runs: if: ${{ github.event_name == 'push' }} shell: bash run: | - echo "LAST_COMMIT_SHA=${GITHUB_SHA}" >> ${GITHUB_ENV} \ No newline at end of file + echo "LAST_COMMIT_SHA=${GITHUB_SHA}" >> ${GITHUB_ENV} + - name: Run find-and-replace to remove slashes from branch name + uses: mad9000/actions-find-and-replace-string@4 + id: ref_slug + with: + source: ${{ github.head_ref }} + find: '/' + replace: '-' + - name: Set BUILD_SHA, REF_SLUG + shell: bash + run: | + echo "BUILD_SHA=${LAST_COMMIT_SHA:0:8}" >> $GITHUB_ENV + echo "REF_SLUG=${{ steps.ref_slug.outputs.value }}" >> $GITHUB_ENV + diff --git a/.github/workflows/ci-develop.yml b/.github/workflows/ci-develop.yml index 3911a9e2ea..1ef7044235 100644 --- a/.github/workflows/ci-develop.yml +++ b/.github/workflows/ci-develop.yml @@ -17,51 +17,56 @@ concurrency: jobs: yarn-dev: - if: github.event.pull_request.draft == false # Conditional check for draft per job. + if: github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'CI-minimal') uses: ./.github/workflows/yarn-dev.yml secrets: inherit unit-test: - if: github.event.pull_request.draft == false # Conditional check for draft per job. + if: github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'CI-minimal') uses: ./.github/workflows/unit-test.yml secrets: inherit canary: - if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'CI-canary')) }} # Conditional check for draft & labels per job. + if: github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'CI-canary') uses: ./.github/workflows/canary.yml - secrets: inherit # pass all secrets from initial workflow to nested + secrets: inherit xcm: - if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'CI-xcm')) }} # Conditional check for draft & labels per job. + if: github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'CI-xcm') uses: ./.github/workflows/xcm.yml - secrets: inherit # pass all secrets from initial workflow to nested + secrets: inherit collator-selection: - if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'CI-collator-selection')) }} # Conditional check for draft & labels per job. + if: github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'CI-collator-selection') uses: ./.github/workflows/collator-selection.yml secrets: inherit forkless-update-data: - if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'CI-forkless')) }} # Conditional check for draft & labels per job. + if: github.event.pull_request.draft == false && (contains(github.event.pull_request.labels.*.name, 'CI-forkless') || contains(github.event.pull_request.labels.*.name, 'CI-forkless-update-data')) uses: ./.github/workflows/forkless-update-data.yml - secrets: inherit # pass all secrets from initial workflow to nested + secrets: inherit forkless-update-no-data: - if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'CI-forkless')) }} # Conditional check for draft & labels per job. + if: github.event.pull_request.draft == false && (contains(github.event.pull_request.labels.*.name, 'CI-forkless') || contains(github.event.pull_request.labels.*.name, 'CI-forkless-update-no-data')) uses: ./.github/workflows/forkless-update-nodata.yml - secrets: inherit # pass all secrets from initial workflow to nested + secrets: inherit try-runtime: - if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'CI-forkless')) }} # Conditional check for draft & labels per job. + if: github.event.pull_request.draft == false && (contains(github.event.pull_request.labels.*.name, 'CI-forkless') || contains(github.event.pull_request.labels.*.name, 'CI-try-runtime')) uses: ./.github/workflows/try-runtime.yml - secrets: inherit # pass all secrets from initial workflow to nested + secrets: inherit node-only-update: - if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'CI-node-only-update')) }} # Conditional check for draft & labels per job. + if: github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'CI-node-only-update') uses: ./.github/workflows/node-only-update.yml secrets: inherit + governance: + if: github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'CI-gov') + uses: ./.github/workflows/governance.yml + secrets: inherit + codestyle: - if: github.event.pull_request.draft == false # Conditional check for draft per job. + if: github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'CI-minimal') uses: ./.github/workflows/codestyle.yml - secrets: inherit \ No newline at end of file + secrets: inherit diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index 698feda7f6..106c1a0940 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -52,6 +52,10 @@ jobs: uses: ./.github/workflows/node-only-update.yml secrets: inherit + governance: + uses: ./.github/workflows/governance.yml + secrets: inherit + codestyle: uses: ./.github/workflows/codestyle.yml secrets: inherit diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml index 51dc0ac1ec..dcbcacb31f 100644 --- a/.github/workflows/codestyle.yml +++ b/.github/workflows/codestyle.yml @@ -16,9 +16,12 @@ jobs: - uses: actions/checkout@v3.1.0 with: ref: ${{ github.head_ref }} - - name: Install latest nightly - uses: dtolnay/rust-toolchain@nightly + - name: Read .env file + uses: xom9ikk/dotenv@v2 + - name: Install toolchain version from .env + uses: dtolnay/rust-toolchain@master with: + toolchain: ${{ env.RUST_TOOLCHAIN }} targets: wasm32-unknown-unknown components: rustfmt, clippy - name: Run cargo fmt @@ -37,23 +40,28 @@ jobs: ref: ${{ github.head_ref }} - uses: actions/setup-node@v3.5.1 with: - node-version: 16 + node-version: 18 - name: Install modules run: cd tests && yarn - name: Run ESLint + # run: cd tests && yarn eslint --ext .ts,.js --max-warnings=0 src/ run: cd tests && yarn eslint --ext .ts,.js src/ clippy: - if: ${{ false }} runs-on: [ self-hosted-ci ] steps: - uses: actions/checkout@v3.1.0 - name: Install substrate dependencies run: sudo apt install -y libssl-dev pkg-config libclang-dev clang protobuf-compiler - - name: Install latest nightly - uses: dtolnay/rust-toolchain@nightly + - name: Read .env file + uses: xom9ikk/dotenv@v2 + - name: Install toolchain version from .env + uses: dtolnay/rust-toolchain@master with: + toolchain: ${{ env.RUST_TOOLCHAIN }} targets: wasm32-unknown-unknown components: rustfmt, clippy - name: Run cargo check - run: cargo clippy -- -Dwarnings + run: cargo clippy --features=quartz-runtime,unique-runtime,try-runtime,runtime-benchmarks --tests -- -Dwarnings + env: + SKIP_WASM_BUILD: '1' diff --git a/.github/workflows/collator-selection.yml b/.github/workflows/collator-selection.yml index afdff2ad59..3c70ab0b05 100644 --- a/.github/workflows/collator-selection.yml +++ b/.github/workflows/collator-selection.yml @@ -1,15 +1,24 @@ name: collator-selection-test-run -# Triger: only call from main workflow(re-usable workflows) +# Controls when the action will run. on: workflow_call: + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +#Define Workflow variables +env: + REPO_URL: ${{ github.server_url }}/${{ github.repository }} + # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - execution-marix: + + prepare-execution-marix: + name: Prepare execution matrix - runs-on: self-hosted-ci + runs-on: [self-hosted-ci] outputs: matrix: ${{ steps.create_matrix.outputs.matrix }} @@ -19,7 +28,7 @@ jobs: uses: AutoModality/action-clean@v1.1.0 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v3.1.0 with: ref: ${{ github.head_ref }} #Checking out head commit @@ -27,139 +36,172 @@ jobs: uses: xom9ikk/dotenv@v2 - name: Create Execution matrix - uses: CertainLach/create-matrix-action@v3 + uses: CertainLach/create-matrix-action@v4 id: create_matrix with: matrix: | - network {opal}, wasm_name {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}}, replica_from_address {${{ env.OPAL_REPLICA_FROM }}}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}} - network {quartz}, wasm_name {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}}, replica_from_address {${{ env.QUARTZ_REPLICA_FROM }}}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}} - network {sapphire}, wasm_name {quartz}, mainnet_branch {${{ env.SAPPHIRE_MAINNET_BRANCH }}}, replica_from_address {${{ env.SAPPHIRE_REPLICA_FROM }}}, relay_branch {${{ env.UNIQUEEAST_MAINNET_BRANCH }}} + network {opal}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}} + network {quartz}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}} + network {sapphire}, relay_branch {${{ env.UNIQUEEAST_MAINNET_BRANCH }}} collator-selection: - needs: execution-marix + + needs: prepare-execution-marix # The type of runner that the job will run on runs-on: [self-hosted-ci,large] + timeout-minutes: 1380 name: ${{ matrix.network }} - strategy: - matrix: - include: ${{fromJson(needs.execution-marix.outputs.matrix)}} continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false. + strategy: + matrix: + include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}} + steps: + - name: Skip if pull request is in Draft + if: github.event.pull_request.draft == true + run: exit 1 + - name: Clean Workspace uses: AutoModality/action-clean@v1.1.0 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v3.1.0 with: ref: ${{ github.head_ref }} #Checking out head commit + # Prepare SHA + - name: Prepare SHA + uses: ./.github/actions/prepare + - name: Read .env file uses: xom9ikk/dotenv@v2 - - name: Generate ENV related extend file for docker-compose + - name: Log in to Docker Hub + uses: docker/login-action@v2.1.0 + with: + username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} + password: ${{ secrets.CORE_DOCKERHUB_TOKEN }} + + - name: Run find-and-replace to remove slashes from branch name + uses: mad9000/actions-find-and-replace-string@4 + id: branchname + with: + source: ${{ github.head_ref }} + find: '/' + replace: '-' + + - name: Generate ENV related extend Dockerfile file for POLKADOT uses: cuchi/jinja2-action@v1.2.0 with: - template: .docker/docker-compose.tmp-collators.j2 - output_file: .docker/docker-compose.collators.${{ matrix.network }}.yml + template: .docker/Dockerfile-polkadot.j2 + output_file: .docker/Dockerfile-polkadot.${{ matrix.relay_branch }}.yml variables: | RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }} - POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }} - NETWORK=${{ matrix.network }} - BRANCH=${{ github.head_ref }} - - - name: Show build configuration - run: cat .docker/docker-compose.collators.${{ matrix.network }}.yml + + - name: Prepare polkadot + uses: ./.github/actions/buildContainer + id: polkadot + with: + container: uniquenetwork/builder-polkadot + tag: ${{ matrix.relay_branch }} + context: .docker + dockerfile: Dockerfile-polkadot.${{ matrix.relay_branch }}.yml + dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} + dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }} + + # - name: pull needed images + # run: | + # docker pull uniquenetwork/builder-polkadot:${{ matrix.relay_branch }} + + # - name: Build unique-chain + # run: | + # docker build --file .docker/Dockerfile-unique \ + # --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }} \ + # --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} \ + # --tag uniquenetwork/ci-collator-selection-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-${{ env.BUILD_SHA }} \ + # . + + # - name: Push docker image version + # run: docker push uniquenetwork/ci-collator-selection-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-${{ env.BUILD_SHA }} + + + - name: Prepare latest + uses: ./.github/actions/buildContainer + id: latest + with: + container: uniquenetwork/ci-collator-selection-local + tag: ${{ matrix.network }}-${{ env.REF_SLUG }}-${{ env.BUILD_SHA }} + context: . + dockerfile: .docker/Dockerfile-unique + args: | + --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }},session-test-timings + --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} + dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} + dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }} + + - uses: actions/setup-node@v3.5.1 + with: + node-version: 18 - - name: Show launch-config configuration - run: cat launch-config.json + - name: Install baedeker + uses: UniqueNetwork/baedeker-action/setup@built - - name: Build the stack - run: docker-compose -f ".docker/docker-compose.collators.${{ matrix.network }}.yml" up -d --remove-orphans --force-recreate --timeout 300 + - name: Setup library + run: mkdir -p .baedeker/vendor/ && git clone https://github.com/UniqueNetwork/baedeker-library .baedeker/vendor/baedeker-library - # 🚀 POLKADOT LAUNCH COMPLETE 🚀 - - name: Check if docker logs consist messages related to testing of collator tests - if: success() - run: | - counter=160 - function check_container_status { - docker inspect -f {{.State.Running}} parachain-collators - } - function do_docker_logs { - docker logs --details parachain-collators 2>&1 - } - function is_started { - if [ "$(check_container_status)" == "true" ]; then - echo "Container: collator-${{ matrix.network }}-testnet-local RUNNING"; - echo "Check Docker logs" - DOCKER_LOGS=$(do_docker_logs) - if [[ ${DOCKER_LOGS} = *"POLKADOT LAUNCH COMPLETE"* ]];then - echo "🚀 POLKADOT LAUNCH COMPLETE 🚀" - return 0 - else - echo "Message not found in logs output, repeating..." - return 1 - fi - else - echo "Container collator-${{ matrix.network }}-testnet-local NOT RUNNING" - echo "Halting all future checks" - exit 1 - fi - echo "something goes wrong" - exit 1 - } - while ! is_started; do - echo "Waiting for special message in log files " - sleep 30s - counter=$(( $counter - 1 )) - echo "Counter: $counter" - if [ "$counter" -gt "0" ]; then - continue - else - break - fi - done - echo "Halting script" - exit 0 - shell: bash - - - uses: actions/setup-node@v3 + - name: Start network + uses: UniqueNetwork/baedeker-action@built + id: bdk + with: + jpath: | + .baedeker/vendor + tla-str: | + relay_spec=${{ env.RELAY_CHAIN_TYPE }}-local + inputs: | + .baedeker/collator-selection.jsonnet + snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadot':{dockerImage:'${{ steps.polkadot.outputs.name }}'}}) + snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.latest.outputs.name }}'}}) + + - name: Upload network config + uses: actions/upload-artifact@v3 with: - node-version: 16 + name: ${{ matrix.network }}-network-config + path: ${{ steps.bdk.outputs.composeProject }} + retention-days: 2 - - name: Run Collator tests + - name: Run tests working-directory: tests - if: success() || failure() run: | yarn install yarn add mochawesome - node scripts/readyness.js + # Wanted by both wait_for_first_block + # export RPC_URL="${RELAY_SAPPHIRE_HTTP_URL:-${RELAY_OPAL_HTTP_URL:-${RELAY_QUARTZ_HTTP_URL:-${RELAY_UNIQUE_HTTP_URL:-}}}}" + ./scripts/wait_for_first_block.sh echo "Ready to start tests" - yarn polkadot-types NOW=$(date +%s) && yarn testCollators --reporter mochawesome --reporter-options reportFilename=test-collators-${NOW} env: - RPC_URL: http://127.0.0.1:9933/ + RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }} - - name: Test Report Collator - uses: phoenix-actions/test-reporting@v8 - id: test-report-collator - if: success() || failure() # run this step even if previous step failed + - name: Test Report + uses: phoenix-actions/test-reporting@v10 + id: test-report + if: success() || failure() with: - name: Report Collator tests results - ${{ matrix.network }} # Name of the check run which will be created - path: tests/mochawesome-report/test-collators-*.json # Path to test results + name: Collator Selection Tests ${{ matrix.network }} + path: tests/mochawesome-report/test-collators-*.json reporter: mochawesome-json fail-on-error: 'false' - - name: Stop running containers - if: always() # run this step always - run: docker-compose -f ".docker/docker-compose.collators.${{ matrix.network }}.yml" down + - name: Clean Workspace + if: always() + uses: AutoModality/action-clean@v1.1.0 - name: Remove builder cache - if: always() # run this step always + if: always() run: | - docker builder prune -f -a - docker system prune -f + docker system prune -a -f diff --git a/.github/workflows/forkless-update-data.yml b/.github/workflows/forkless-update-data.yml index 9ee500fa3e..53e9a1db43 100644 --- a/.github/workflows/forkless-update-data.yml +++ b/.github/workflows/forkless-update-data.yml @@ -9,9 +9,9 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - prepare-execution-marix: + prepare-execution-matrix: - name: Prepare execution matrix + name: execution matrix runs-on: self-hosted-ci outputs: @@ -34,113 +34,29 @@ jobs: uses: CertainLach/create-matrix-action@v4 id: create_matrix with: - # TODO: Remove state-version-0 after mainnet upgrade matrix: | - network {quartz}, wasm_name {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}}, replica_from_address {${{ env.QUARTZ_REPLICA_FROM }}}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}, extra_features {,state-version-0} - network {unique}, wasm_name {unique}, mainnet_branch {${{ env.UNIQUE_MAINNET_BRANCH }}}, replica_from_address {${{ env.UNIQUE_REPLICA_FROM }}}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}, extra_features {,state-version-0} - network {opal}, wasm_name {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}}, replica_from_address {${{ env.OPAL_REPLICA_FROM }}}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}, extra_features {,state-version-0} - network {sapphire}, wasm_name {quartz}, mainnet_branch {${{ env.SAPPHIRE_MAINNET_BRANCH }}}, replica_from_address {${{ env.SAPPHIRE_REPLICA_FROM }}}, relay_branch {${{ env.UNIQUEEAST_MAINNET_BRANCH }}}, extra_features {,state-version-0} + network {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}, runtime_features {opal-runtime}, wasm_name {opal}, fork_source {${{ env.OPAL_REPLICA_FROM }}} + network {sapphire}, mainnet_branch {${{ env.SAPPHIRE_MAINNET_BRANCH }}}, relay_branch {${{ env.UNIQUEEAST_MAINNET_BRANCH }}}, runtime_features {sapphire-runtime}, wasm_name {quartz}, fork_source {${{ env.SAPPHIRE_REPLICA_FROM }}} + network {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}, runtime_features {quartz-runtime}, wasm_name {quartz}, fork_source {${{ env.QUARTZ_REPLICA_FROM }}} + network {unique}, mainnet_branch {${{ env.UNIQUE_MAINNET_BRANCH }}}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}, runtime_features {unique-runtime}, wasm_name {unique}, fork_source {${{ env.UNIQUE_REPLICA_FROM }}} forkless-data-build: - needs: prepare-execution-marix + + needs: prepare-execution-matrix # The type of runner that the job will run on runs-on: [self-hosted-ci,large] + timeout-minutes: 1380 name: ${{ matrix.network }}-data-build - strategy: - matrix: - include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}} - - continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false. - - steps: - - name: Clean Workspace - uses: AutoModality/action-clean@v1.1.0 - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.1.0 - with: - ref: ${{ github.head_ref }} #Checking out head commit - - - name: Read .env file - uses: xom9ikk/dotenv@v2 - - # Prepare SHA - - name: Prepare SHA - uses: ./.github/actions/prepare - - # Build main image for FORKLESS-UPDATE-NODATA - - name: Generate ENV related extend Dockerfile file - uses: cuchi/jinja2-action@v1.2.0 - with: - template: .docker/Dockerfile-parachain-upgrade-data.j2 - output_file: .docker/Dockerfile-parachain-upgrade-data.${{ matrix.network }}.yml - variables: | - RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} - NETWORK=${{ matrix.network }} - MAINNET_BRANCH=${{ matrix.mainnet_branch }} - WASM_NAME=${{ matrix.wasm_name }} - RELAY_CHAIN_TYPE=${{ env.RELAY_CHAIN_TYPE }} - DESTINATION_SPEC_VERSION=${{ env.DESTINATION_SPEC_VERSION }} - POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }} - REPLICA_FROM=${{ matrix.replica_from_address }} - CHAINQL=${{ env.CHAINQL }} - EXTRA_FEATURES=${{ matrix.extra_features }} - - - name: Show build configuration - run: cat .docker/Dockerfile-parachain-upgrade-data.${{ matrix.network }}.yml - - - name: Run find-and-replace to remove slashes from branch name - uses: mad9000/actions-find-and-replace-string@4 - id: branchname - with: - source: ${{ github.head_ref }} - find: '/' - replace: '-' - - - name: Set build SHA - shell: bash - run: | - echo "BUILD_SHA=${LAST_COMMIT_SHA:0:8}" >> $GITHUB_ENV - - - name: Build the stack - run: cd .docker/ && docker build --no-cache --file ./Dockerfile-parachain-upgrade-data.${{ matrix.network }}.yml --tag uniquenetwork/ci-forkless-data-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-$BUILD_SHA ../ - - - name: Log in to Docker Hub - uses: docker/login-action@v2.1.0 - with: - username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} - password: ${{ secrets.CORE_DOCKERHUB_TOKEN }} - - - name: Push docker image version - run: docker push uniquenetwork/ci-forkless-data-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-$BUILD_SHA - - - name: Remove builder cache - if: always() # run this step always - run: | - docker builder prune -f - docker system prune -f - - forkless-data-tests: - needs: [prepare-execution-marix, forkless-data-build] - # The type of runner that the job will run on - runs-on: [self-hosted-ci, large] - - timeout-minutes: 600 - - name: ${{ matrix.network }}-data-tests continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false. strategy: matrix: - include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}} + include: ${{fromJson(needs.prepare-execution-matrix.outputs.matrix)}} steps: - - name: Skip if pull request is in Draft - if: github.event.pull_request.draft == true - run: exit 1 - name: Clean Workspace uses: AutoModality/action-clean@v1.1.0 @@ -150,115 +66,112 @@ jobs: with: ref: ${{ github.head_ref }} #Checking out head commit - - name: Prepare + # Prepare SHA + - name: Prepare SHA uses: ./.github/actions/prepare - - name: Set build SHA - shell: bash - run: | - echo "BUILD_SHA=${LAST_COMMIT_SHA:0:8}" >> $GITHUB_ENV - - - name: Run find-and-replace to remove slashes from branch name - uses: mad9000/actions-find-and-replace-string@4 - id: branchname - with: - source: ${{ github.head_ref }} - find: '/' - replace: '-' - - name: Read .env file uses: xom9ikk/dotenv@v2 - - name: Generate ENV related extend file for docker-compose - uses: cuchi/jinja2-action@v1.2.0 - with: - template: .docker/docker-compose.forkless-data.j2 - output_file: .docker/docker-compose.forkless-data.${{ matrix.network }}.yml - variables: | - NETWORK=${{ matrix.network }} - BUILD_TAG=${{ steps.branchname.outputs.value }}-$BUILD_SHA - - - name: Show build configuration - run: cat .docker/docker-compose.forkless-data.${{ matrix.network }}.yml - - name: Log in to Docker Hub uses: docker/login-action@v2.1.0 with: username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} password: ${{ secrets.CORE_DOCKERHUB_TOKEN }} - - name: Build the stack - run: docker-compose -f ".docker/docker-compose.forkless-data.${{ matrix.network }}.yml" up -d --remove-orphans --force-recreate --timeout 300 + - name: Generate ENV related extend Dockerfile file for POLKADOT + uses: cuchi/jinja2-action@v1.2.0 + with: + template: .docker/Dockerfile-polkadot.j2 + output_file: .docker/Dockerfile-polkadot.${{ matrix.relay_branch }}.yml + variables: | + RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} + POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }} + + - name: Prepare polkadot + uses: ./.github/actions/buildContainer + id: polkadot + with: + container: uniquenetwork/builder-polkadot + tag: ${{ matrix.relay_branch }} + context: .docker + dockerfile: Dockerfile-polkadot.${{ matrix.relay_branch }}.yml + dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} + dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }} + + - name: Prepare latest + uses: ./.github/actions/buildContainer + id: latest + with: + container: uniquenetwork/ci-data-${{ matrix.network }} + tag: ${{ env.REF_SLUG }}-${{ env.BUILD_SHA }} + context: . + dockerfile: .docker/Dockerfile-unique + args: | + --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }} + --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} + dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} + dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }} + + - name: Extract wasms + uses: ./.github/actions/extractDocker + id: wasms + with: + image: ${{ steps.latest.outputs.name }} + directory: /wasm - uses: actions/setup-node@v3.5.1 with: - node-version: 16 + node-version: 18 - - name: Check if docker logs consist logs related to Runtime Upgrade testing. - if: success() - run: | - counter=160 - function check_container_status { - docker inspect -f {{.State.Running}} forkless-data-${{ matrix.network }} - } - function do_docker_logs { - docker logs --details forkless-data-${{ matrix.network }} 2>&1 - } - function is_started { - if [ "$(check_container_status)" == "true" ]; then - echo "Container: forkless-data-${{ matrix.network }} RUNNING"; - echo "Check Docker logs" - DOCKER_LOGS=$(do_docker_logs) - if [[ ${DOCKER_LOGS} = *"🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸"* ]];then - echo "🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸" - return 0 - elif [[ ${DOCKER_LOGS} = *"🚧 PARACHAINS' RUNTIME UPGRADE TESTING FAILED 🚧"* ]];then - echo "🚧 PARACHAINS' RUNTIME UPGRADE TESTING FAILED 🚧" - return 1 - else - echo "Message not found in logs output, repeating..." - return 1 - fi - else - echo "Container forkless-data-${{ matrix.network }} not RUNNING" - echo "Halting all future checks" - exit 1 - fi - exit 0 - } - while ! is_started; do - echo "Waiting for special message in log files " - sleep 30s - counter=$(( $counter - 1 )) - echo "Counter: $counter" - if [ "$counter" -gt "0" ]; then - continue - else - echo "Counter reached zero, yet upgrade is not finished" - exit 1 - fi - done - echo "Halting script" - exit 0 - shell: bash - - - name: Collect Docker Logs - if: success() || failure() - uses: jwalton/gh-docker-logs@v2.2.1 + - name: Install baedeker + uses: UniqueNetwork/baedeker-action/setup@built + + - name: Setup library + run: mkdir -p .baedeker/vendor/ && git clone https://github.com/UniqueNetwork/baedeker-library .baedeker/vendor/baedeker-library + + - name: Start network + uses: UniqueNetwork/baedeker-action@built + id: bdk with: - dest: './forkless-parachain-upgrade-data-logs.${{ matrix.network }}' + jpath: | + .baedeker/vendor + tla-str: | + relay_spec=${{ env.RELAY_CHAIN_TYPE }}-local + forked_spec=${{ matrix.network }} + fork_source=${{ matrix.fork_source }} + inputs: | + .baedeker/forkless-data.jsonnet + snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadot':{dockerImage:'${{ steps.polkadot.outputs.name }}'}}) + snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.latest.outputs.name }}'}}) + + - name: "Reconcile: runtime is upgraded" + working-directory: tests + run: | + yarn + ./scripts/wait_for_first_block.sh + echo "Executing upgrade" + yarn ts-node --esm src/util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm + env: + RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }} + + - name: Run Parallel tests after forkless upgrade + working-directory: tests + run: | + ./scripts/wait_for_first_block.sh + echo "Ready to start tests" + NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW} + env: + RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }} - - name: Show Docker logs + - name: Run Sequential tests after forkless upgrade if: success() || failure() - run: cat './forkless-parachain-upgrade-data-logs.${{ matrix.network }}/forkless-data-${{ matrix.network }}.log' - - - name: Stop running containers - if: always() # run this step always - run: docker-compose -f ".docker/docker-compose.forkless-data.${{ matrix.network }}.yml" down --volumes + working-directory: tests + run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW} + env: + RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }} - name: Remove builder cache if: always() # run this step always run: | - docker builder prune -f -a docker system prune -f - docker image prune -f -a diff --git a/.github/workflows/forkless-update-nodata.yml b/.github/workflows/forkless-update-nodata.yml index 923f3222a7..d9f91074ec 100644 --- a/.github/workflows/forkless-update-nodata.yml +++ b/.github/workflows/forkless-update-nodata.yml @@ -8,9 +8,10 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - prepare-execution-marix: - name: Prepare execution matrix + prepare-execution-matrix: + + name: execution matrix runs-on: self-hosted-ci outputs: @@ -34,14 +35,14 @@ jobs: id: create_matrix with: matrix: | - network {quartz}, wasm_name {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}} - network {unique}, wasm_name {unique}, mainnet_branch {${{ env.UNIQUE_MAINNET_BRANCH }}}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}} - network {opal}, wasm_name {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}} - network {sapphire}, wasm_name {quartz}, mainnet_branch {${{ env.SAPPHIRE_MAINNET_BRANCH }}}, relay_branch {${{ env.UNIQUEEAST_MAINNET_BRANCH }}} - + network {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}, runtime_features {opal-runtime}, wasm_name {opal} + network {sapphire}, mainnet_branch {${{ env.SAPPHIRE_MAINNET_BRANCH }}}, relay_branch {${{ env.UNIQUEEAST_MAINNET_BRANCH }}}, runtime_features {sapphire-runtime}, wasm_name {quartz} + network {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}, runtime_features {quartz-runtime}, wasm_name {quartz} + network {unique}, mainnet_branch {${{ env.UNIQUE_MAINNET_BRANCH }}}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}, runtime_features {unique-runtime}, wasm_name {unique} forkless-nodata-build: - needs: prepare-execution-marix + + needs: prepare-execution-matrix # The type of runner that the job will run on runs-on: [self-hosted-ci,large] @@ -53,9 +54,10 @@ jobs: strategy: matrix: - include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}} + include: ${{fromJson(needs.prepare-execution-matrix.outputs.matrix)}} steps: + - name: Clean Workspace uses: AutoModality/action-clean@v1.1.0 @@ -64,255 +66,127 @@ jobs: with: ref: ${{ github.head_ref }} #Checking out head commit - - name: Read .env file - uses: xom9ikk/dotenv@v2 - # Prepare SHA - name: Prepare SHA uses: ./.github/actions/prepare + - name: Read .env file + uses: xom9ikk/dotenv@v2 + - name: Log in to Docker Hub uses: docker/login-action@v2.1.0 with: username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} password: ${{ secrets.CORE_DOCKERHUB_TOKEN }} - # Build main image for FORKLESS-UPDATE-NODATA - - name: Generate ENV related extend Dockerfile file + - name: Generate ENV related extend Dockerfile file for POLKADOT uses: cuchi/jinja2-action@v1.2.0 with: - template: .docker/Dockerfile-parachain-upgrade.j2 - output_file: .docker/Dockerfile-parachain-upgrade.${{ matrix.network }}.yml + template: .docker/Dockerfile-polkadot.j2 + output_file: .docker/Dockerfile-polkadot.${{ matrix.relay_branch }}.yml variables: | RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} - NETWORK=${{ matrix.network }} - MAINNET_BRANCH=${{ matrix.mainnet_branch }} - WASM_NAME=${{ matrix.wasm_name }} POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }} - POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }} - - - name: Show build Dockerfile - run: cat .docker/Dockerfile-parachain-upgrade.${{ matrix.network }}.yml - - - name: Generate launch-config-forkless-nodata.json - uses: cuchi/jinja2-action@v1.2.0 + + - name: Prepare polkadot + uses: ./.github/actions/buildContainer + id: polkadot with: - template: .docker/forkless-config/launch-config-forkless-nodata.j2 - output_file: .docker/forkless-config/launch-config-forkless-nodata.json - variables: | - WASM_NAME=${{ matrix.wasm_name }} - RELAY_CHAIN_TYPE=${{ env.RELAY_CHAIN_TYPE }} - - - name: Show launch-config-forkless configuration - run: cat .docker/forkless-config/launch-config-forkless-nodata.json - - - name: Run find-and-replace to remove slashes from branch name - uses: mad9000/actions-find-and-replace-string@4 - id: branchname + container: uniquenetwork/builder-polkadot + tag: ${{ matrix.relay_branch }} + context: .docker + dockerfile: Dockerfile-polkadot.${{ matrix.relay_branch }}.yml + dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} + dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }} + + - name: Prepare mainnet + uses: ./.github/actions/buildContainer + id: mainnet with: - source: ${{ github.head_ref }} - find: '/' - replace: '-' - - - name: Set build SHA - shell: bash - run: | - echo "BUILD_SHA=${LAST_COMMIT_SHA:0:8}" >> $GITHUB_ENV - - - name: Build the stack - run: cd .docker/ && docker build --no-cache --file ./Dockerfile-parachain-upgrade.${{ matrix.network }}.yml --tag uniquenetwork/ci-forkless-nodata-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-$BUILD_SHA ../ - - - name: Push docker image version - run: docker push uniquenetwork/ci-forkless-nodata-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-$BUILD_SHA - - - name: Remove builder cache - if: always() # run this step always - run: | - docker builder prune -f - docker system prune -f - - - forkless-nodata-tests: - needs: [prepare-execution-marix, forkless-nodata-build] - # The type of runner that the job will run on - runs-on: [self-hosted-ci, large] - - timeout-minutes: 600 - - name: ${{ matrix.network }}-nodata-tests - - continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false. - - strategy: - matrix: - include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}} - - steps: - - name: Skip if pull request is in Draft - if: github.event.pull_request.draft == true - run: exit 1 - - - name: Clean Workspace - uses: AutoModality/action-clean@v1.1.0 - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.1.0 - with: - ref: ${{ github.head_ref }} #Checking out head commit - - - name: Prepare - uses: ./.github/actions/prepare - - - name: Set build SHA - shell: bash - run: | - echo "BUILD_SHA=${LAST_COMMIT_SHA:0:8}" >> $GITHUB_ENV - - - name: Run find-and-replace to remove slashes from branch name - uses: mad9000/actions-find-and-replace-string@4 - id: branchname - with: - source: ${{ github.head_ref }} - find: '/' - replace: '-' - - - name: Read .env file - uses: xom9ikk/dotenv@v2 - - - name: Generate ENV related extend file for docker-compose - uses: cuchi/jinja2-action@v1.2.0 + container: uniquenetwork/ci-nodata-${{ matrix.network }} + tag: ${{ matrix.mainnet_branch }} + context: .docker + dockerfile: Dockerfile-unique-release + args: | + --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }} + --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} + --build-arg UNIQUE_VERSION=${{ matrix.mainnet_branch }} + dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} + dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }} + + - name: Prepare latest + uses: ./.github/actions/buildContainer + id: latest with: - template: .docker/docker-compose.forkless-nodata.j2 - output_file: .docker/docker-compose.forkless-nodata.${{ matrix.network }}.yml - variables: | - NETWORK=${{ matrix.network }} - BUILD_TAG=${{ steps.branchname.outputs.value }}-$BUILD_SHA - - - name: Show build configuration - run: cat .docker/docker-compose.forkless-nodata.${{ matrix.network }}.yml - - - name: Log in to Docker Hub - uses: docker/login-action@v2.1.0 + container: uniquenetwork/ci-nodata-${{ matrix.network }} + tag: ${{ env.REF_SLUG }}-${{ env.BUILD_SHA }} + context: . + dockerfile: .docker/Dockerfile-unique + args: | + --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }} + --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} + dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} + dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }} + + - name: Extract wasms + uses: ./.github/actions/extractDocker + id: wasms with: - username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} - password: ${{ secrets.CORE_DOCKERHUB_TOKEN }} - - - name: Build the stack - run: docker-compose -f ".docker/docker-compose.forkless-nodata.${{ matrix.network }}.yml" up -d --remove-orphans --force-recreate --timeout 300 + image: ${{ steps.latest.outputs.name }} + directory: /wasm - uses: actions/setup-node@v3.5.1 with: - node-version: 16 + node-version: 18 - - name: Check if docker logs consist logs related to Runtime Upgrade testing. - if: success() - run: | - counter=160 - function check_container_status { - docker inspect -f {{.State.Running}} forkless-nodata - } - function do_docker_logs { - docker logs --details forkless-nodata 2>&1 - } - function is_started { - if [ "$(check_container_status)" == "true" ]; then - echo "Container: forkless-nodata RUNNING"; - echo "Check Docker logs" - DOCKER_LOGS=$(do_docker_logs) - if [[ ${DOCKER_LOGS} = *"🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸"* ]];then - echo "🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸" - return 0 - elif [[ ${DOCKER_LOGS} = *"🚧 PARACHAINS' RUNTIME UPGRADE TESTING FAILED 🚧"* ]];then - echo "🚧 PARACHAINS' RUNTIME UPGRADE TESTING FAILED 🚧" - return 1 - else - echo "Message not found in logs output, repeating..." - return 1 - fi - else - echo "Container forkless-nodata not RUNNING" - echo "Halting all future checks" - exit 1 - fi - exit 0 - } - while ! is_started; do - echo "Waiting for special message in log files " - sleep 30s - counter=$(( $counter - 1 )) - echo "Counter: $counter" - if [ "$counter" -gt "0" ]; then - continue - else - break - fi - done - echo "Halting script" - exit 0 - shell: bash - - - name: Collect Docker Logs - if: success() || failure() - uses: jwalton/gh-docker-logs@v2.2.1 - with: - dest: './forkless-parachain-upgrade-nodata-logs.${{ matrix.network }}' + - name: Install baedeker + uses: UniqueNetwork/baedeker-action/setup@built - - name: Show docker logs - if: success() || failure() - run: cat './forkless-parachain-upgrade-nodata-logs.${{ matrix.network }}/forkless-nodata.log' + - name: Setup library + run: mkdir -p .baedeker/vendor/ && git clone https://github.com/UniqueNetwork/baedeker-library .baedeker/vendor/baedeker-library - - name: Run Parallel tests + - name: Start network + uses: UniqueNetwork/baedeker-action@built + id: bdk + with: + jpath: | + .baedeker/vendor + tla-str: | + relay_spec=rococo-local + inputs: | + .baedeker/node-only.jsonnet + snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadot':{dockerImage:'${{ steps.polkadot.outputs.name }}'}}) + # nodata build uses old runtime, but new chain, thus we use mainnet image for spec generation, and then latest image for nodes. + snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.latest.outputs.name }}'}}, for_chain = false) + snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}}) + + - name: "Reconcile: runtime is upgraded" working-directory: tests run: | - yarn install - yarn add mochawesome + yarn ./scripts/wait_for_first_block.sh - echo "Ready to start tests" - yarn polkadot-types - NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW} + echo "Executing upgrade" + yarn ts-node --esm src/util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm env: - RPC_URL: http://127.0.0.1:9933/ + RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }} - - name: Test Report Parallel - uses: phoenix-actions/test-reporting@v10 - id: test-report-parallel - if: success() || failure() # run this step even if previous step failed - with: - name: Report Parallel tests results - ${{ matrix.network }} # Name of the check run which will be created - path: tests/mochawesome-report/test-parallel-*.json # Path to test results - reporter: mochawesome-json - fail-on-error: 'false' - - - name: Run Sequential tests + - name: Run Parallel tests after forkless upgrade working-directory: tests - if: success() || failure() run: | - yarn install - yarn add mochawesome ./scripts/wait_for_first_block.sh echo "Ready to start tests" - yarn polkadot-types - NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW} + NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW} env: - RPC_URL: http://127.0.0.1:9933/ - - - name: Test Report Sequential - uses: phoenix-actions/test-reporting@v10 - id: test-report-sequential - if: success() || failure() # run this step even if previous step failed - with: - name: Report Sequential tests results - ${{ matrix.network }} # Name of the check run which will be created - path: tests/mochawesome-report/test-sequential-*.json # Path to test results - reporter: mochawesome-json - fail-on-error: 'false' + RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }} - - name: Stop running containers - if: always() # run this step always - run: docker-compose -f ".docker/docker-compose.forkless-nodata.${{ matrix.network }}.yml" down + - name: Run Sequential tests after forkless upgrade + if: success() || failure() + working-directory: tests + run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW} + env: + RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }} - name: Remove builder cache if: always() # run this step always run: | - docker builder prune -f -a docker system prune -f - docker image prune -f -a diff --git a/.github/workflows/governance.yml b/.github/workflows/governance.yml new file mode 100644 index 0000000000..b1406e805b --- /dev/null +++ b/.github/workflows/governance.yml @@ -0,0 +1,117 @@ +# Governance tests in --dev mode with gov-test-timings feature enabled to reduce gov timings +name: governance tests + +# Triger: only call from main workflow(re-usable workflows) +on: + workflow_call: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + prepare-execution-marix: + name: Prepare execution matrix + + runs-on: self-hosted-ci + outputs: + matrix: ${{ steps.create_matrix.outputs.matrix }} + + steps: + - name: Clean Workspace + uses: AutoModality/action-clean@v1.1.0 + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3.1.0 + with: + ref: ${{ github.head_ref }} #Checking out head commit + + - name: Read .env file + uses: xom9ikk/dotenv@v2 + + - name: Create Execution matrix + uses: CertainLach/create-matrix-action@v4 + id: create_matrix + with: + matrix: | + network {quartz}, wasm_name {quartz} + network {opal}, wasm_name {opal} + network {sapphire}, wasm_name {quartz} + + dev_build_int_tests: + needs: prepare-execution-marix + # The type of runner that the job will run on + runs-on: [self-hosted-ci, medium] + timeout-minutes: 1380 + + name: ${{ matrix.network }} + strategy: + matrix: + include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}} + + continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false. + + steps: + - name: Clean Workspace + uses: AutoModality/action-clean@v1.1.0 + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3.1.0 + with: + ref: ${{ github.head_ref }} #Checking out head commit + + - name: Read .env file + uses: xom9ikk/dotenv@v2 + + - name: Generate ENV related extend file for docker-compose + uses: cuchi/jinja2-action@v1.2.0 + with: + template: .docker/docker-compose.gov.j2 + output_file: .docker/docker-compose.${{ matrix.network }}.yml + variables: | + RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} + NETWORK=${{ matrix.network }} + WASM_NAME=${{ matrix.wasm_name }} + + - name: Show build configuration + run: cat .docker/docker-compose.${{ matrix.network }}.yml + + - name: Build the stack + run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans + + - uses: actions/setup-node@v3.5.1 + with: + node-version: 18 + + - name: Run tests + working-directory: tests + run: | + yarn install + yarn add mochawesome + ./scripts/wait_for_first_block.sh + echo "Ready to start tests" + NOW=$(date +%s) && yarn testGovernance --reporter mochawesome --reporter-options reportFilename=test-${NOW} + env: + RPC_URL: http://127.0.0.1:9944/ + + - name: Test Report + uses: phoenix-actions/test-reporting@v10 + id: test-report + if: success() || failure() # run this step even if previous step failed + with: + name: int test results - ${{ matrix.network }} # Name of the check run which will be created + path: tests/mochawesome-report/test-*.json # Path to test results + reporter: mochawesome-json + fail-on-error: 'false' + + - name: Read output variables + run: | + echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}" + + - name: Stop running containers + if: always() # run this step always + run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" down + + - name: Remove builder cache + if: always() # run this step always + run: | + docker builder prune -f -a + docker system prune -f + docker image prune -f -a diff --git a/.github/workflows/make-bench.yml b/.github/workflows/make-bench.yml index a2578f72ba..4b07f4bf4c 100644 --- a/.github/workflows/make-bench.yml +++ b/.github/workflows/make-bench.yml @@ -36,7 +36,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - name: RUN benchmarking run: | diff --git a/.github/workflows/market-test.yml b/.github/workflows/market-test.yml index ed2032fa75..f8f848cff3 100644 --- a/.github/workflows/market-test.yml +++ b/.github/workflows/market-test.yml @@ -103,7 +103,7 @@ jobs: - uses: actions/setup-node@v3.5.1 with: - node-version: 16.17 + node-version: 18 - name: Setup TypeScript working-directory: qa-tests @@ -125,7 +125,7 @@ jobs: # ./scripts/wait_for_first_block.sh # echo "Ready to start tests" # env: -# RPC_URL: http://127.0.0.1:9933/ +# RPC_URL: http://127.0.0.1:9944/ - name: Wait for chain up and running run: | diff --git a/.github/workflows/node-only-update.yml b/.github/workflows/node-only-update.yml index 6e7633b77b..027aa61c5f 100644 --- a/.github/workflows/node-only-update.yml +++ b/.github/workflows/node-only-update.yml @@ -11,7 +11,7 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - nodes-execution-matrix: + prepare-execution-matrix: name: execution matrix @@ -37,29 +37,33 @@ jobs: id: create_matrix with: matrix: | - network {opal}, wasm_name {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}} - network {sapphire}, wasm_name {quartz}, mainnet_branch {${{ env.SAPPHIRE_MAINNET_BRANCH }}}, relay_branch {${{ env.UNIQUEEAST_MAINNET_BRANCH }}} - network {quartz}, wasm_name {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}} - network {unique}, wasm_name {unique}, mainnet_branch {${{ env.UNIQUE_MAINNET_BRANCH }}}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}} + network {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}, runtime_features {opal-runtime} + network {sapphire}, mainnet_branch {${{ env.SAPPHIRE_MAINNET_BRANCH }}}, relay_branch {${{ env.UNIQUEEAST_MAINNET_BRANCH }}}, runtime_features {sapphire-runtime} + network {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}, runtime_features {quartz-runtime} + network {unique}, mainnet_branch {${{ env.UNIQUE_MAINNET_BRANCH }}}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}, runtime_features {unique-runtime} + node-only-update-build: - nodes-only-update: - needs: nodes-execution-matrix + needs: prepare-execution-matrix # The type of runner that the job will run on runs-on: [self-hosted-ci] timeout-minutes: 2880 # 48 hours for execution jobs. - name: ${{ matrix.network }} + name: ${{ matrix.network }}-build continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false. strategy: matrix: - include: ${{fromJson(needs.nodes-execution-matrix.outputs.matrix)}} + include: ${{fromJson(needs.prepare-execution-matrix.outputs.matrix)}} steps: + - name: Skip if pull request is in Draft + if: github.event.pull_request.draft == true + run: exit 1 + - name: Clean Workspace uses: AutoModality/action-clean@v1.1.0 @@ -68,223 +72,144 @@ jobs: with: ref: ${{ github.head_ref }} #Checking out head commit + # Prepare SHA + - name: Prepare SHA + uses: ./.github/actions/prepare + - name: Read .env file uses: xom9ikk/dotenv@v2 - - name: Generate ENV related extend file for docker-compose + - name: Log in to Docker Hub + uses: docker/login-action@v2.1.0 + with: + username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} + password: ${{ secrets.CORE_DOCKERHUB_TOKEN }} + + - name: Generate ENV related extend Dockerfile file for POLKADOT uses: cuchi/jinja2-action@v1.2.0 with: - template: .docker/docker-compose.tmp-node.j2 - output_file: .docker/docker-compose.node.${{ matrix.network }}.yml + template: .docker/Dockerfile-polkadot.j2 + output_file: .docker/Dockerfile-polkadot.${{ matrix.relay_branch }}.yml variables: | - REPO_URL=${{ github.server_url }}/${{ github.repository }}.git RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }} - POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }} - # POLKADOT_MAINNET_BRANCH=${{ env.POLKADOT_MAINNET_BRANCH }} - # MAINNET_TAG=${{ matrix.mainnet_tag }} - MAINNET_BRANCH=${{ matrix.mainnet_branch }} - NETWORK=${{ matrix.network }} - WASM_NAME=${{ matrix.wasm_name }} - # BRANCH=${{ github.head_ref }} - - - name: Show build configuration - run: cat .docker/docker-compose.node.${{ matrix.network }}.yml - - - name: Generate launch-config-forkless-nodata.json - uses: cuchi/jinja2-action@v1.2.0 + + - name: Prepare polkadot + uses: ./.github/actions/buildContainer + id: polkadot with: - template: .docker/forkless-config/launch-config-forkless-nodata.j2 - output_file: .docker/launch-config-forkless-nodata.json - variables: | - NETWORK=${{ matrix.network }} - WASM_NAME=${{ matrix.wasm_name }} - RELAY_CHAIN_TYPE=${{ env.RELAY_CHAIN_TYPE }} + container: uniquenetwork/builder-polkadot + tag: ${{ matrix.relay_branch }} + context: .docker + dockerfile: Dockerfile-polkadot.${{ matrix.relay_branch }}.yml + dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} + dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }} + + - name: Prepare mainnet + uses: ./.github/actions/buildContainer + id: mainnet + with: + container: uniquenetwork/ci-node-only-${{ matrix.network }} + tag: ${{ matrix.mainnet_branch }} + context: .docker + dockerfile: Dockerfile-unique-release + args: | + --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }} + --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} + --build-arg UNIQUE_VERSION=${{ matrix.mainnet_branch }} + dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} + dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }} + + - name: Prepare latest + uses: ./.github/actions/buildContainer + id: latest + with: + container: uniquenetwork/ci-node-only-${{ matrix.network }} + tag: ${{ env.REF_SLUG }}-${{ env.BUILD_SHA }} + context: . + dockerfile: .docker/Dockerfile-unique + args: | + --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }} + --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} + dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} + dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }} - - name: Show launch-config-forkless configuration - run: cat .docker/launch-config-forkless-nodata.json + - name: Checkout at '${{ matrix.mainnet_branch }}' branch + uses: actions/checkout@master + with: + ref: ${{ github.head_ref }} + # ref: ${{ matrix.mainnet_branch }} #Checking out head commit + path: ${{ matrix.mainnet_branch }} - uses: actions/setup-node@v3.5.1 with: - node-version: 16 + node-version: 18 - - name: Build the stack - run: docker-compose -f ".docker/docker-compose.node.${{ matrix.network }}.yml" up -d --build --remove-orphans --force-recreate --timeout 300 + - name: Install baedeker + uses: UniqueNetwork/baedeker-action/setup@built - # 🚀 POLKADOT LAUNCH COMPLETE 🚀 - - name: Check if docker logs consist messages related to testing of Node Parachain Upgrade. - if: success() - run: | - counter=160 - function check_container_status { - docker inspect -f {{.State.Running}} node-parachain - } - function do_docker_logs { - docker logs --details node-parachain 2>&1 - } - function is_started { - if [ "$(check_container_status)" == "true" ]; then - echo "Container: node-parachain RUNNING"; - echo "Check Docker logs" - DOCKER_LOGS=$(do_docker_logs) - if [[ ${DOCKER_LOGS} = *"POLKADOT LAUNCH COMPLETE"* ]];then - echo "🚀 POLKADOT LAUNCH COMPLETE 🚀" - return 0 - else - echo "Message not found in logs output, repeating..." - return 1 - fi - else - echo "Container node-parachain NOT RUNNING" - echo "Halting all future checks" - exit 1 - fi - echo "something goes wrong" - exit 1 - } - while ! is_started; do - echo "Waiting for special message in log files " - sleep 30s - counter=$(( $counter - 1 )) - echo "Counter: $counter" - if [ "$counter" -gt "0" ]; then - continue - else - break - fi - done - echo "Halting script" - exit 0 - shell: bash + - name: Setup library + run: mkdir -p .baedeker/vendor/ && git clone https://github.com/UniqueNetwork/baedeker-library .baedeker/vendor/baedeker-library - - name: Checkout at '${{ matrix.mainnet_branch }}' branch - uses: actions/checkout@master + - name: Start network + uses: UniqueNetwork/baedeker-action@built + id: bdk with: - ref: ${{ matrix.mainnet_branch }} #Checking out head commit - path: ${{ matrix.mainnet_branch }} + jpath: | + .baedeker/vendor + tla-str: | + relay_spec=${{ env.RELAY_CHAIN_TYPE }}-local + inputs: | + .baedeker/node-only.jsonnet + snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadot':{dockerImage:'${{ steps.polkadot.outputs.name }}'}}) + ephemeral:snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}}, extra_node_mixin = {legacyRpc: true}) - name: Run Parallel tests before Node Parachain upgrade working-directory: ${{ matrix.mainnet_branch }}/tests if: success() || failure() run: | - yarn install + yarn yarn add mochawesome ./scripts/wait_for_first_block.sh echo "Ready to start tests" - yarn polkadot-types NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW} env: - RPC_URL: http://127.0.0.1:9933/ - - # - name: Upload Parallel Test Report Before Node upgrade - # uses: phoenix-actions/test-reporting@v8 - # id: test-parallel-report-before - # if: success() || failure() # run this step even if previous step failed - # with: - # name: Tests before node upgrade ${{ matrix.network }} # Name of the check run which will be created - # path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-parallel-*.json # Path to test results - # reporter: mochawesome-json - # fail-on-error: 'false' + RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }} - name: Run Sequential tests before Node Parachain upgrade if: success() || failure() working-directory: ${{ matrix.mainnet_branch }}/tests run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW} env: - RPC_URL: http://127.0.0.1:9933/ - - # - name: Upload Sequential Test Report Before Node upgrade - # uses: phoenix-actions/test-reporting@v10 - # id: test-sequential-report-before - # if: success() || failure() # run this step even if previous step failed - # with: - # name: Tests before node upgrade ${{ matrix.network }} # Name of the check run which will be created - # path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-sequential-*.json # Path to test results - # reporter: mochawesome-json - # fail-on-error: 'false' - - - name: Send SIGUSR1 to polkadot-launch process - if: success() || failure() - run: | - #Get PID of polkadot-launch - ContainerID=$(docker ps -aqf "name=node-parachain") - PID=$(docker exec node-parachain pidof 'polkadot-launch') - sleep 30s - echo -e "\n" - echo -e "Restart polkadot-launch process: $PID\n" - docker exec node-parachain kill -SIGUSR1 ${PID} - echo "SIGUSR1 sent to Polkadot-launch PID: $PID" - sleep 60s - echo -e "Show logs of node-parachain container.\n" - docker logs ${ContainerID} - - - name: Get chain logs in case of docker image crashed after Polkadot Launch restart - if: failure() # run this step only at failure - run: | - docker exec node-parachain tail -n 1000 /polkadot-launch/9944.log - docker exec node-parachain tail -n 1000 /polkadot-launch/9945.log - docker exec node-parachain tail -n 1000 /polkadot-launch/alice.log + RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }} - - name: copy chain log files from container to the host + - name: "Reconcile: only one old node" + if: success() || failure() + uses: UniqueNetwork/baedeker-action/reconcile@built + with: + baedeker: ${{ steps.bdk.baedeker }} + # Chain should always be built with the mainnet spec, this we first set binary for all nodes expect one, then set mainnet binary for the last node, and then force chainspec to be still generated from mainnet + inputs: | + snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.latest.outputs.name }}'}}, leave = 1, for_chain = false) + snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}}, extra_node_mixin = {legacyRpc: true}, for_chain = false) + snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}}) + + - name: Ensure network is alive if: success() || failure() # run this step even if previous step failed run: | - mkdir -p /tmp/node-only-update - docker cp node-parachain:/polkadot-launch/9944.log /tmp/node-only-update/ - docker cp node-parachain:/polkadot-launch/9945.log /tmp/node-only-update/ - docker cp node-parachain:/polkadot-launch/alice.log /tmp/node-only-update/ + ./tests/scripts/wait_for_first_block.sh + env: + RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }} - - name: Upload chain log files + - name: "Reconcile: all nodes are updated" if: success() || failure() - uses: actions/upload-artifact@v3 + uses: UniqueNetwork/baedeker-action/reconcile@built with: - name: node-only-update-chain-logs - path: /tmp/node-only-update/ - if-no-files-found: warn - - - name: Check if docker logs consist messages related to testing of Node Parachain Upgrade. - if: success() - run: | - counter=160 - function check_container_status { - docker inspect -f {{.State.Running}} node-parachain - } - function do_docker_logs { - docker logs --details node-parachain 2>&1 - } - function is_started { - if [ "$(check_container_status)" == "true" ]; then - echo "Container: node-parachain RUNNING"; - echo "Check Docker logs" - DOCKER_LOGS=$(do_docker_logs) - if [[ ${DOCKER_LOGS} = *"All parachain collators restarted with the new binaries."* ]];then - echo "🌗 All parachain collators restarted with the new binaries." - return 0 - else - echo "Message not found in logs output, repeating..." - return 1 - fi - else - echo "Container node-parachain NOT RUNNING" - echo "Halting all future checks" - exit 1 - fi - echo "something goes wrong" - exit 1 - } - while ! is_started; do - echo "Waiting for special message in log files " - sleep 30s - counter=$(( $counter - 1 )) - echo "Counter: $counter" - if [ "$counter" -gt "0" ]; then - continue - else - break - fi - done - echo "Halting script" - exit 0 - shell: bash + baedeker: ${{ steps.bdk.baedeker }} + # Chain should always be built with the mainnet spec, this we first set binary for all nodes, and then force chainspec to be still generated from mainnet + inputs: | + snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.latest.outputs.name }}'}}, for_chain = false) + snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}}) - name: Run Parallel tests after Node Parachain upgrade working-directory: ${{ matrix.mainnet_branch }}/tests @@ -294,50 +219,18 @@ jobs: yarn add mochawesome ./scripts/wait_for_first_block.sh echo "Ready to start tests" - yarn polkadot-types NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW} env: - RPC_URL: http://127.0.0.1:9933/ - - #- name: Test Report Parallel After Node upgrade - # uses: phoenix-actions/test-reporting@v10 - # id: test-report-parallel-after - # if: success() || failure() # run this step even if previous step failed - # with: - # name: Tests after node upgrade ${{ matrix.network }} # Name of the check run which will be created - # path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-parallel-*.json # Path to test results - # reporter: mochawesome-json - # fail-on-error: 'false' + RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }} - name: Run Sequential tests after Node Parachain upgrade if: success() || failure() working-directory: ${{ matrix.mainnet_branch }}/tests run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW} env: - RPC_URL: http://127.0.0.1:9933/ - - #- name: Upload Sequential Test Report After Node upgrade - # uses: phoenix-actions/test-reporting@v10 - # id: test-sequential-report-after - # if: success() || failure() # run this step even if previous step failed - # with: - # name: Tests before node upgrade ${{ matrix.network }} # Name of the check run which will be created - # path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-sequential-*.json # Path to test results - # reporter: mochawesome-json - # fail-on-error: 'false' - - - name: Stop running containers - if: always() # run this step always - run: docker-compose -f ".docker/docker-compose.node.${{ matrix.network }}.yml" down --volumes + RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }} - name: Remove builder cache if: always() # run this step always run: | - docker builder prune -f -a docker system prune -f - docker image prune -f -a - - - name: Remove repo at the end - if: always() # run this step always - run: | - ls -ls ./ diff --git a/.github/workflows/polkadot-types.yml b/.github/workflows/polkadot-types.yml index 70e829a8b0..bd471d2b36 100644 --- a/.github/workflows/polkadot-types.yml +++ b/.github/workflows/polkadot-types.yml @@ -68,7 +68,7 @@ jobs: - uses: actions/setup-node@v3.5.1 with: - node-version: 16 + node-version: 18 # - name: Install jq # run: sudo apt install jq -y @@ -82,7 +82,7 @@ jobs: git config --global user.email github-actions@usetech.com /bin/bash ./scripts/generate_types_package.sh --release ${{ matrix.usage }} --push env: - RPC_URL: http://127.0.0.1:9933/ + RPC_URL: http://127.0.0.1:9944/ - name: Stop running containers if: always() # run this step always diff --git a/.github/workflows/try-runtime.yml b/.github/workflows/try-runtime.yml index d6f2a831b2..d687154da6 100644 --- a/.github/workflows/try-runtime.yml +++ b/.github/workflows/try-runtime.yml @@ -117,7 +117,7 @@ jobs: try-runtime-tests: needs: [prepare-execution-marix, try-runtime-build] # The type of runner that the job will run on - runs-on: [self-hosted-ci] + runs-on: [medium] timeout-minutes: 600 @@ -175,7 +175,7 @@ jobs: - uses: actions/setup-node@v3.5.1 with: - node-version: 16 + node-version: 18 - name: Log in to Docker Hub uses: docker/login-action@v2.1.0 @@ -186,6 +186,62 @@ jobs: - name: Build the stack run: docker-compose -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" up -d --remove-orphans --force-recreate --timeout 300 + - name: Check if docker logs consist logs related to Runtime Upgrade testing. + if: success() + run: | + counter=300 + counter_life=0 + function check_container_status { + docker inspect -f {{.State.Running}} try-runtime + } + function do_docker_logs { + docker logs --details try-runtime 2>&1 | grep -i 'TryRuntime_on_runtime_upgrade executed without errors. Consumed' + } + function is_started { + if [ "$(check_container_status)" == "true" ]; then + echo "Container: try-runtime RUNNING"; + echo "Check Docker logs" + DOCKER_LOGS=$(do_docker_logs) + if [[ -n ${DOCKER_LOGS} ]]; then + echo "TryRuntime_on_runtime_upgrade executed without errors." + return 0 + else + echo "Message not found in logs output, repeating..." + return 1 + fi + else + DOCKER_LOGS=$(do_docker_logs) + while [ $counter_life -lt 3 ] + do + (( counter_life++ )) + if [[ -n ${DOCKER_LOGS} ]]; then + echo "TryRuntime_on_runtime_upgrade executed without errors" + return 0 + else + echo "Container try-runtime not RUNNING" + return 1 + fi + done + fi + exit 0 + } + + while ! is_started; do + echo "Waiting for special message in log files " + sleep 30s + counter=$(( $counter - 1 )) + echo "Counter: $counter" + if [ "$counter" -gt "0" ]; then + continue + else + echo "Counter reached zero, yet upgrade is not finished" + exit 1 + fi + done + echo "Halting script" + exit 0 + shell: bash + - name: Collect Docker Logs if: success() || failure() uses: jwalton/gh-docker-logs@v2.2.1 @@ -193,6 +249,7 @@ jobs: dest: './try-runtime-logs.${{ matrix.network }}' - name: Show docker logs + if: success() || failure() run: cat './try-runtime-logs.${{ matrix.network }}/try-runtime.log' - name: Stop running containers diff --git a/.github/workflows/xcm.yml b/.github/workflows/xcm.yml index 97894f25c1..b6b829690c 100644 --- a/.github/workflows/xcm.yml +++ b/.github/workflows/xcm.yml @@ -3,7 +3,7 @@ name: xcm-testnet-build # Controls when the action will run. on: workflow_call: - + # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -40,12 +40,12 @@ jobs: id: create_matrix with: matrix: | - network {opal}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}, acala_version {${{ env.ACALA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONBEAM_BUILD_BRANCH }}}, cumulus_version {${{ env.WESTMINT_BUILD_BRANCH }}}, astar_version {${{ env.ASTAR_BUILD_BRANCH }}}, runtest {testXcmOpal} - network {quartz}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}, acala_version {${{ env.KARURA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONRIVER_BUILD_BRANCH }}}, cumulus_version {${{ env.STATEMINE_BUILD_BRANCH }}}, astar_version {${{ env.SHIDEN_BUILD_BRANCH }}}, runtest {testXcmQuartz} - network {unique}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}, acala_version {${{ env.ACALA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONBEAM_BUILD_BRANCH }}}, cumulus_version {${{ env.STATEMINT_BUILD_BRANCH }}}, astar_version {${{ env.ASTAR_BUILD_BRANCH }}}, runtest {testXcmUnique} + network {opal}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}, acala_version {${{ env.ACALA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONBEAM_BUILD_BRANCH }}}, cumulus_version {${{ env.WESTMINT_BUILD_BRANCH }}}, astar_version {${{ env.ASTAR_BUILD_BRANCH }}}, polkadex_version {${{ env.POLKADEX_BUILD_BRANCH }}}, runtest {testXcmOpal}, runtime_features {opal-runtime} + network {quartz}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}, acala_version {${{ env.KARURA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONRIVER_BUILD_BRANCH }}}, cumulus_version {${{ env.STATEMINE_BUILD_BRANCH }}}, astar_version {${{ env.SHIDEN_BUILD_BRANCH }}}, polkadex_version {${{ env.POLKADEX_BUILD_BRANCH }}}, runtest {testXcmQuartz}, runtime_features {quartz-runtime} + network {unique}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}, acala_version {${{ env.ACALA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONBEAM_BUILD_BRANCH }}}, cumulus_version {${{ env.STATEMINT_BUILD_BRANCH }}}, astar_version {${{ env.ASTAR_BUILD_BRANCH }}}, polkadex_version {${{ env.POLKADEX_BUILD_BRANCH }}}, runtest {testXcmUnique}, runtime_features {unique-runtime} xcm-build: - + needs: prepare-execution-marix # The type of runner that the job will run on runs-on: [XL] @@ -73,7 +73,7 @@ jobs: with: ref: ${{ github.head_ref }} #Checking out head commit - # Prepare SHA + # Prepare SHA - name: Prepare SHA uses: ./.github/actions/prepare @@ -113,7 +113,7 @@ jobs: docker pull uniquenetwork/builder-polkadot:${{ matrix.relay_branch }} else echo "Repository has not needed POLKADOT version, so build it"; - cd .docker/ && docker build --no-cache --file ./Dockerfile-polkadot.${{ matrix.relay_branch }}.yml --tag uniquenetwork/builder-polkadot:${{ matrix.relay_branch }} . + cd .docker/ && docker build --file ./Dockerfile-polkadot.${{ matrix.relay_branch }}.yml --tag uniquenetwork/builder-polkadot:${{ matrix.relay_branch }} . echo "Push needed POLKADOT version to the repository"; docker push uniquenetwork/builder-polkadot:${{ matrix.relay_branch }} fi @@ -146,7 +146,7 @@ jobs: docker pull uniquenetwork/builder-acala:${{ matrix.acala_version }} else echo "Repository has not needed ACALA version, so build it"; - cd .docker/ && docker build --no-cache --file ./Dockerfile-acala.${{ matrix.acala_version }}.yml --tag uniquenetwork/builder-acala:${{ matrix.acala_version }} . + cd .docker/ && docker build --file ./Dockerfile-acala.${{ matrix.acala_version }}.yml --tag uniquenetwork/builder-acala:${{ matrix.acala_version }} . echo "Push needed ACALA version to the repository"; docker push uniquenetwork/builder-acala:${{ matrix.acala_version }} fi @@ -179,7 +179,7 @@ jobs: docker pull uniquenetwork/builder-moonbeam:${{ matrix.moonbeam_version }} else echo "Repository has not needed MOONBEAM version, so build it"; - cd .docker/ && docker build --no-cache --file ./Dockerfile-moonbeam.${{ matrix.moonbeam_version }}.yml --tag uniquenetwork/builder-moonbeam:${{ matrix.moonbeam_version }} . + cd .docker/ && docker build --file ./Dockerfile-moonbeam.${{ matrix.moonbeam_version }}.yml --tag uniquenetwork/builder-moonbeam:${{ matrix.moonbeam_version }} . echo "Push needed MOONBEAM version to the repository"; docker push uniquenetwork/builder-moonbeam:${{ matrix.moonbeam_version }} fi @@ -196,7 +196,7 @@ jobs: CUMULUS_BUILD_BRANCH=${{ matrix.cumulus_version }} - name: Check if the dockerhub repository contains the needed CUMULUS version - run: | + run: | # aquire token TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token) export TOKEN=$TOKEN @@ -212,7 +212,7 @@ jobs: docker pull uniquenetwork/builder-cumulus:${{ matrix.cumulus_version }} else echo "Repository has not needed CUMULUS version, so build it"; - cd .docker/ && docker build --no-cache --file ./Dockerfile-cumulus.${{ matrix.cumulus_version }}.yml --tag uniquenetwork/builder-cumulus:${{ matrix.cumulus_version }} . + cd .docker/ && docker build --file ./Dockerfile-cumulus.${{ matrix.cumulus_version }}.yml --tag uniquenetwork/builder-cumulus:${{ matrix.cumulus_version }} . echo "Push needed CUMULUS version to the repository"; docker push uniquenetwork/builder-cumulus:${{ matrix.cumulus_version }} fi @@ -245,259 +245,117 @@ jobs: docker pull uniquenetwork/builder-astar:${{ matrix.astar_version }} else echo "Repository has not needed ASTAR version, so build it"; - cd .docker/ && docker build --no-cache --file ./Dockerfile-astar.${{ matrix.astar_version }}.yml --tag uniquenetwork/builder-astar:${{ matrix.astar_version }} . + cd .docker/ && docker build --file ./Dockerfile-astar.${{ matrix.astar_version }}.yml --tag uniquenetwork/builder-astar:${{ matrix.astar_version }} . echo "Push needed ASTAR version to the repository"; docker push uniquenetwork/builder-astar:${{ matrix.astar_version }} fi shell: bash - - # Check CHAINQL version and build it if it doesn't exist in repository - - name: Generate ENV related extend Dockerfile file for CHAINQL + # Check POLKADEX version and build it if it doesn't exist in repository + - name: Generate ENV related extend Dockerfile file for POLKADEX uses: cuchi/jinja2-action@v1.2.0 with: - template: .docker/Dockerfile-chainql.j2 - output_file: .docker/Dockerfile-chainql.${{ env.CHAINQL }}.yml + template: .docker/Dockerfile-polkadex.j2 + output_file: .docker/Dockerfile-polkadex.${{ matrix.polkadex_version }}.yml variables: | RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} - CHAINQL=${{ env.CHAINQL }} + POLKADEX_BUILD_BRANCH=${{ matrix.polkadex_version }} - - name: Check if the dockerhub repository contains the needed CHAINQL version + - name: Check if the dockerhub repository contains the needed POLKADEX version run: | # aquire token TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token) export TOKEN=$TOKEN # Get TAGS from DOCKERHUB repository - CHAINQL_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-chainql/tags/?page_size=100 | jq -r '."results"[]["name"]') + POLKADEX_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-polkadex/tags/?page_size=100 | jq -r '."results"[]["name"]') # Show TAGS - echo "CHAINQL TAGS:" - echo $CHAINQL_TAGS - # Check correct version CHAINQL and build it if it doesn't exist in CHAINQL TAGS - if [[ ${CHAINQL_TAGS[*]} =~ (^|[[:space:]])"${{ env.CHAINQL }}"($|[[:space:]]) ]]; then - echo "Repository has needed CHAINQL version"; - docker pull uniquenetwork/builder-chainql:${{ env.CHAINQL }} + echo "POLKADEX TAGS:" + echo $POLKADEX_TAGS + # Check correct version POLKADEX and build it if it doesn't exist in POLKADEX TAGS + if [[ ${POLKADEX_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.polkadex_version }}"($|[[:space:]]) ]]; then + echo "Repository has needed POLKADEX version"; + docker pull uniquenetwork/builder-polkadex:${{ matrix.polkadex_version }} else - echo "Repository has not needed CHAINQL version, so build it"; - cd .docker/ && docker build --no-cache --file ./Dockerfile-chainql.${{ env.CHAINQL }}.yml --tag uniquenetwork/builder-chainql:${{ env.CHAINQL }} . - echo "Push needed CHAINQL version to the repository"; - docker push uniquenetwork/builder-chainql:${{ env.CHAINQL }} + echo "Repository has not needed POLKADEX version, so build it"; + cd .docker/ && docker build --file ./Dockerfile-polkadex.${{ matrix.polkadex_version }}.yml --tag uniquenetwork/builder-polkadex:${{ matrix.polkadex_version }} . + echo "Push needed POLKADEX version to the repository"; + docker push uniquenetwork/builder-polkadex:${{ matrix.polkadex_version }} fi shell: bash - # - name: Pull chainql docker image - # run: docker pull uniquenetwork/builder-chainql:${{ env.CHAINQL }} - - - name: Generate ENV related extend launch-config file - uses: cuchi/jinja2-action@v1.2.0 - with: - template: .docker/xcm-config/launch-config-xcm-${{ matrix.network }}.j2 - output_file: .docker/xcm-config/launch-config-xcm-${{ matrix.network }}.json - variables: | - RELAY_CHAIN_TYPE=${{ env.RELAY_CHAIN_TYPE }} - - - name: Show launch-config-xcm-${{ matrix.network }} configuration - run: cat .docker/xcm-config/launch-config-xcm-${{ matrix.network }}.json - - # Build main image for XCM - - name: Generate ENV related extend Dockerfile file - uses: cuchi/jinja2-action@v1.2.0 - with: - template: .docker/Dockerfile-xcm.j2 - output_file: .docker/Dockerfile-xcm.${{ matrix.network }}.yml - variables: | - RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} - NETWORK=${{ matrix.network }} - POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }} - POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }} - BRANCH=${{ github.head_ref }} - ACALA_BUILD_BRANCH=${{ matrix.acala_version }} - ASTAR_BUILD_BRANCH=${{ matrix.astar_version }} - MOONBEAM_BUILD_BRANCH=${{ matrix.moonbeam_version }} - CUMULUS_BUILD_BRANCH=${{ matrix.cumulus_version }} - CHAINQL=${{ env.CHAINQL }} - - - name: Show build Dockerfile - run: cat .docker/Dockerfile-xcm.${{ matrix.network }}.yml - - - name: Run find-and-replace to remove slashes from branch name - uses: mad9000/actions-find-and-replace-string@4 - id: branchname - with: - source: ${{ github.head_ref }} - find: '/' - replace: '-' - - - name: Set build SHA - shell: bash + - name: Build unique-chain run: | - echo "BUILD_SHA=${LAST_COMMIT_SHA:0:8}" >> $GITHUB_ENV - - - name: Build the stack - run: cd .docker/ && docker build --no-cache --file ./Dockerfile-xcm.${{ matrix.network }}.yml --tag uniquenetwork/ci-xcm-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-$BUILD_SHA . + docker build --file .docker/Dockerfile-unique \ + --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }} \ + --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} \ + --tag uniquenetwork/ci-xcm-local:${{ matrix.network }}-${{ env.REF_SLUG }}-${{ env.BUILD_SHA }} \ + . - name: Push docker image version - run: docker push uniquenetwork/ci-xcm-local:${{ matrix.network }}-${{ steps.branchname.outputs.value }}-$BUILD_SHA - - - name: Remove builder cache - if: always() # run this step always - run: | - docker builder prune -f - docker system prune -f - - xcm-tests: - needs: [prepare-execution-marix, xcm-build] - # The type of runner that the job will run on - runs-on: [XL] - - timeout-minutes: 600 - - name: ${{ matrix.network }}-tests - - continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false. - - strategy: - matrix: - include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}} - - steps: - - name: Skip if pull request is in Draft - if: github.event.pull_request.draft == true - run: exit 1 + run: docker push uniquenetwork/ci-xcm-local:${{ matrix.network }}-${{ env.REF_SLUG }}-${{ env.BUILD_SHA }} - - name: Clean Workspace - uses: AutoModality/action-clean@v1.1.0 - - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3.1.0 + - uses: actions/setup-node@v3.5.1 with: - ref: ${{ github.head_ref }} #Checking out head commit + node-version: 18 - - name: Prepare - uses: ./.github/actions/prepare + - name: Install baedeker + uses: UniqueNetwork/baedeker-action/setup@built - - name: Set build SHA - shell: bash - run: | - echo "BUILD_SHA=${LAST_COMMIT_SHA:0:8}" >> $GITHUB_ENV + - name: Setup library + run: mkdir -p .baedeker/vendor/ && git clone https://github.com/UniqueNetwork/baedeker-library .baedeker/vendor/baedeker-library - - name: Run find-and-replace to remove slashes from branch name - uses: mad9000/actions-find-and-replace-string@4 - id: branchname + - name: Start network + uses: UniqueNetwork/baedeker-action@built + id: bdk with: - source: ${{ github.head_ref }} - find: '/' - replace: '-' - - - name: Read .env file - uses: xom9ikk/dotenv@v2 - - - name: Generate ENV related extend file for docker-compose - uses: cuchi/jinja2-action@v1.2.0 - with: - template: .docker/docker-compose.xcm.j2 - output_file: .docker/docker-compose.xcm.${{ matrix.network }}.yml - variables: | - NETWORK=${{ matrix.network }} - BUILD_TAG=${{ steps.branchname.outputs.value }}-$BUILD_SHA - - - name: Show build configuration - run: cat .docker/docker-compose.xcm.${{ matrix.network }}.yml - - - uses: actions/setup-node@v3.5.1 + jpath: | + .baedeker/vendor + tla-str: | + relay_spec=${{ env.RELAY_CHAIN_TYPE }}-local + inputs: | + .baedeker/xcm-${{ matrix.network }}.jsonnet + snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadot':{dockerImage:'uniquenetwork/builder-polkadot:${{ matrix.relay_branch }}'}}) + snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'uniquenetwork/ci-xcm-local:${{ matrix.network }}-${{ env.REF_SLUG }}-${{ env.BUILD_SHA }}'}}) + snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/acala':{dockerImage:'uniquenetwork/builder-acala:${{ matrix.acala_version }}'}}) + snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/moonbeam':{dockerImage:'uniquenetwork/builder-moonbeam:${{ matrix.moonbeam_version }}'}}) + snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/cumulus':{dockerImage:'uniquenetwork/builder-cumulus:${{ matrix.cumulus_version }}'}}) + snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/astar':{dockerImage:'uniquenetwork/builder-astar:${{ matrix.astar_version }}'}}) + snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadex':{dockerImage:'uniquenetwork/builder-polkadex:${{ matrix.polkadex_version }}'}}) + + - name: Upload network config + uses: actions/upload-artifact@v3 with: - node-version: 16 + name: ${{ matrix.network }}-network-config + path: ${{ steps.bdk.outputs.composeProject }} + retention-days: 2 - - name: Log in to Docker Hub - uses: docker/login-action@v2.1.0 - with: - username: ${{ secrets.CORE_DOCKERHUB_USERNAME }} - password: ${{ secrets.CORE_DOCKERHUB_TOKEN }} - - - name: Build the stack - run: docker-compose -f ".docker/docker-compose.xcm.${{ matrix.network }}.yml" up -d --remove-orphans --force-recreate --timeout 300 - - # 🚀 POLKADOT LAUNCH COMPLETE 🚀 - - name: Check if docker logs consist messages related to testing of xcm tests - if: success() - run: | - counter=160 - function check_container_status { - docker inspect -f {{.State.Running}} xcm-${{ matrix.network }}-local - } - function do_docker_logs { - docker logs --details xcm-${{ matrix.network }}-local 2>&1 - } - function is_started { - if [ "$(check_container_status)" == "true" ]; then - echo "Container: xcm-${{ matrix.network }}-local RUNNING"; - echo "Check Docker logs" - DOCKER_LOGS=$(do_docker_logs) - if [[ ${DOCKER_LOGS} = *"POLKADOT LAUNCH COMPLETE"* ]];then - echo "🚀 POLKADOT LAUNCH COMPLETE 🚀" - return 0 - else - echo "Message not found in logs output, repeating..." - return 1 - fi - else - echo "Container xcm-${{ matrix.network }}-local NOT RUNNING" - echo "Halting all future checks" - exit 1 - fi - echo "something goes wrong" - exit 1 - } - while ! is_started; do - echo "Waiting for special message in log files " - sleep 30s - counter=$(( $counter - 1 )) - echo "Counter: $counter" - if [ "$counter" -gt "0" ]; then - continue - else - break - fi - done - echo "Halting script" - exit 0 - shell: bash - - - name: Run XCM tests + - name: Run XCM tests working-directory: tests run: | yarn install yarn add mochawesome + # Wanted by both wait_for_first_block + export RPC_URL="${RELAY_OPAL_HTTP_URL:-${RELAY_QUARTZ_HTTP_URL:-${RELAY_UNIQUE_HTTP_URL:-}}}" ./scripts/wait_for_first_block.sh echo "Ready to start tests" - yarn polkadot-types NOW=$(date +%s) && yarn ${{ matrix.runtest }} --reporter mochawesome --reporter-options reportFilename=test-${NOW} - env: - RPC_URL: http://127.0.0.1:9933/ - name: XCM Test Report uses: phoenix-actions/test-reporting@v10 id: test-report - if: success() || failure() # run this step even if previous step failed + if: success() || failure() with: - name: XCM Tests ${{ matrix.network }} # Name of the check run which will be created - path: tests/mochawesome-report/test-*.json # Path to test results + name: XCM Tests ${{ matrix.network }} + path: tests/mochawesome-report/test-*.json reporter: mochawesome-json fail-on-error: 'false' - - name: Show container logs - if: always() # run this step always - run: docker-compose -f ".docker/docker-compose.xcm.${{ matrix.network }}.yml" logs - - - name: Stop running containers - if: always() # run this step always - run: docker-compose -f ".docker/docker-compose.xcm.${{ matrix.network }}.yml" down - - name: Clean Workspace if: always() uses: AutoModality/action-clean@v1.1.0 - name: Remove builder cache - if: always() # run this step always + if: always() run: | docker system prune -a -f diff --git a/.github/workflows/yarn-dev.yml b/.github/workflows/yarn-dev.yml index 318cb0d4bd..680928cf09 100644 --- a/.github/workflows/yarn-dev.yml +++ b/.github/workflows/yarn-dev.yml @@ -59,7 +59,7 @@ jobs: - uses: actions/setup-node@v3.5.1 with: - node-version: 16 + node-version: 18 - name: Run tests working-directory: tests @@ -68,10 +68,9 @@ jobs: yarn add mochawesome ./scripts/wait_for_first_block.sh echo "Ready to start tests" - yarn polkadot-types NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW} env: - RPC_URL: http://127.0.0.1:9933/ + RPC_URL: http://127.0.0.1:9944/ - name: Test Report uses: phoenix-actions/test-reporting@v10 @@ -87,6 +86,18 @@ jobs: run: | echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}" + - name: Run benchmark mintFee tests + working-directory: tests + run: | + yarn install + npx ts-node --esm ./src/benchmarks/mintFee/index.ts + + - name: Run benchmark opsFee tests + working-directory: tests + run: | + yarn install + npx ts-node --esm ./src/benchmarks/opsFee/index.ts + - name: Stop running containers if: always() # run this step always run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" down @@ -113,4 +124,4 @@ jobs: # - name: Decide whether the needed jobs succeeded or failed # uses: re-actors/alls-green@v1.2.2 # with: - # jobs: ${{ toJSON(needs) }} \ No newline at end of file + # jobs: ${{ toJSON(needs) }} diff --git a/.gitignore b/.gitignore index f9e07b8cd9..4e3edc65ed 100644 --- a/.gitignore +++ b/.gitignore @@ -14,8 +14,12 @@ einstein_key_file /.cargo/ /.vscode/ +.envrc-dev + tests/.vscode cumulus-parachain/ *genesis *wasm -tmp/ \ No newline at end of file +tmp/ + +*.log diff --git a/.vscode/settings.json b/.vscode/settings.json index 5a8a4d2b19..0b8bca5e0a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,16 +1,14 @@ { - "eslint.format.enable": true, - "[javascript]": { - "editor.defaultFormatter": "dbaeumer.vscode-eslint" - }, - "[typescript]": { - "editor.defaultFormatter": "dbaeumer.vscode-eslint" - }, - "rust-analyzer.cargo.extraEnv": { - "SKIP_WASM_BUILD": "1" - }, - "rust-analyzer.cargo.features": [ - "runtime-benchmarks", - "try-runtime" - ] -} \ No newline at end of file + "eslint.format.enable": true, + "[javascript]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint" + }, + "[typescript]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint" + }, + "rust-analyzer.cargo.extraEnv": { + "SKIP_WASM_BUILD": "1" + }, + "rust-analyzer.cargo.features": ["runtime-benchmarks", "try-runtime"], + "solidity.packageDefaultDependenciesDirectory": "tests/node_modules" +} diff --git a/Cargo.lock b/Cargo.lock index 4b74eeb671..c5dc6c5183 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,20 +14,20 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.17.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli 0.26.2", + "gimli", ] [[package]] name = "addr2line" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" dependencies = [ - "gimli 0.27.2", + "gimli", ] [[package]] @@ -90,9 +90,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" +checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" dependencies = [ "cfg-if", "cipher 0.4.4", @@ -120,7 +120,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" dependencies = [ "aead 0.5.2", - "aes 0.8.2", + "aes 0.8.3", "cipher 0.4.4", "ctr 0.9.2", "ghash 0.5.0", @@ -153,7 +153,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", "once_cell", "version_check", ] @@ -165,25 +165,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ "cfg-if", - "getrandom 0.2.9", + "getrandom 0.2.10", "once_cell", "version_check", ] [[package]] name = "aho-corasick" -version = "0.7.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" -dependencies = [ - "memchr", -] - -[[package]] -name = "aho-corasick" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a" dependencies = [ "memchr", ] @@ -235,15 +226,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" [[package]] name = "anstyle-parse" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" dependencies = [ "utf8parse", ] @@ -259,9 +250,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -269,9 +260,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "8c6f84b74db2535ebae81eede2f39b947dcbf01d093ae5f791e5dd414a1bf289" [[package]] name = "app-promotion-rpc" @@ -325,9 +316,9 @@ checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "asn1-rs" @@ -342,7 +333,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.21", + "time 0.3.25", ] [[package]] @@ -358,7 +349,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.21", + "time 0.3.25", ] [[package]] @@ -396,12 +387,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "asn1_der" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" - [[package]] name = "assert_matches" version = "1.5.0" @@ -410,9 +395,9 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "async-channel" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", "event-listener", @@ -433,17 +418,17 @@ dependencies = [ "log", "parking", "polling", - "rustix 0.37.19", + "rustix 0.37.23", "slab", - "socket2", + "socket2 0.4.9", "waker-fn", ] [[package]] name = "async-lock" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" +checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" dependencies = [ "event-listener", ] @@ -456,31 +441,31 @@ checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "asynchronous-codec" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06a0daa378f5fd10634e44b0a29b2a87b890657658e072a30d6f26e57ddee182" +checksum = "4057f2c32adbb2fc158e22fb38433c8e9bbf76b75a4732c7c0cbaf695fb65568" dependencies = [ "bytes", "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.12", ] [[package]] @@ -520,16 +505,16 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.67" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" dependencies = [ - "addr2line 0.19.0", + "addr2line 0.20.0", "cc", "cfg-if", "libc", - "miniz_oxide 0.6.2", - "object 0.30.3", + "miniz_oxide", + "object 0.31.1", "rustc-demangle", ] @@ -581,7 +566,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "hash-db 0.16.0", "log", @@ -598,22 +583,23 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.64.0" +version = "0.65.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4" +checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cexpr", "clang-sys", "lazy_static", "lazycell", "peeking_take_while", + "prettyplease 0.2.12", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] @@ -622,6 +608,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" + [[package]] name = "bitvec" version = "1.0.1" @@ -650,8 +642,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc" dependencies = [ "arrayref", - "arrayvec 0.7.2", - "constant_time_eq", + "arrayvec 0.7.4", + "constant_time_eq 0.2.6", ] [[package]] @@ -661,21 +653,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6637f448b9e61dfadbdcbae9a885fadee1f3eaffb1f8d3c1965d3ade8bdfd44f" dependencies = [ "arrayref", - "arrayvec 0.7.2", - "constant_time_eq", + "arrayvec 0.7.4", + "constant_time_eq 0.2.6", ] [[package]] name = "blake3" -version = "1.3.3" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ae2468a89544a466886840aa467a25b766499f4f04bf7d9fcd10ecee9fccef" +checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" dependencies = [ "arrayref", - "arrayvec 0.7.2", + "arrayvec 0.7.4", "cc", "cfg-if", - "constant_time_eq", + "constant_time_eq 0.3.0", "digest 0.10.7", ] @@ -756,9 +748,9 @@ dependencies = [ [[package]] name = "bounded-collections" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07fbd1d11282a1eb134d3c3b7cf8ce213b5161c6e5f73fb1b98618482c606b64" +checksum = "eb5b05133427c07c4776906f673ccf36c21b102c9829c641a5b56bd151d44fd6" dependencies = [ "log", "parity-scale-codec", @@ -783,9 +775,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bstr" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" +checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" dependencies = [ "memchr", "serde", @@ -849,18 +841,18 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.4" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2" +checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" dependencies = [ "serde", ] [[package]] name = "cargo-platform" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" +checksum = "2cfa25e60aea747ec7e1124f238816749faa93759c6ff5b31f1ccdda137f4479" dependencies = [ "serde", ] @@ -873,7 +865,7 @@ checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", - "semver 1.0.17", + "semver 1.0.18", "serde", "serde_json", "thiserror", @@ -881,11 +873,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "305fe645edc1442a0fa8b6726ba61d422798d37a52e12eaecf4b022ebbb88f01" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -910,9 +903,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.10.3" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aacacf4d96c24b2ad6eb8ee6df040e4f27b0d0b39a5710c30091baa830485db" +checksum = "b40ccee03b5175c18cde8f37e7d2a33bcef6f8ec8f7cc0d81090d1bb380949c9" dependencies = [ "smallvec", ] @@ -1032,9 +1025,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.1" +version = "4.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ed2379f8603fa2b7509891660e802b88c70a79a6427a70abb5968054de2c28" +checksum = "c27cdf28c0f604ba3f512b0c9a409f8de8513e4816705deb0498b627e7c3a3fd" dependencies = [ "clap_builder", "clap_derive", @@ -1043,27 +1036,26 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.3.1" +version = "4.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72394f3339a76daf211e57d4bcb374410f3965dcc606dd0e03738c7888766980" +checksum = "08a9f1ab5e9f01a9b81f202e8562eb9a10de70abf9eaeac1be465c28b75aa4aa" dependencies = [ "anstream", "anstyle", - "bitflags", "clap_lex", "strsim", ] [[package]] name = "clap_derive" -version = "4.3.1" +version = "4.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59e9ef9a08ee1c0e1f2e162121665ac45ac3783b0f897db7244ae75ad9a8f65b" +checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] @@ -1120,17 +1112,36 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "console" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" +dependencies = [ + "encode_unicode", + "lazy_static", + "libc", + "unicode-width", + "windows-sys 0.45.0", +] + [[package]] name = "const-oid" -version = "0.9.2" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" [[package]] name = "constant_time_eq" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" +checksum = "21a53c0a4d288377e7415b53dcfc3c04da5cdc2cc95c8d5ac178b58f0b861ad6" + +[[package]] +name = "constant_time_eq" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "convert_case" @@ -1184,37 +1195,36 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] [[package]] name = "cranelift-bforest" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc42ba2e232e5b20ff7dc299a812d53337dadce9a7e39a238e6a5cb82d2e57b" +checksum = "1277fbfa94bc82c8ec4af2ded3e639d49ca5f7f3c7eeab2c66accd135ece4e70" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "253531aca9b6f56103c9420369db3263e784df39aa1c90685a1f69cfbba0623e" +checksum = "c6e8c31ad3b2270e9aeec38723888fe1b0ace3bea2b06b3f749ccf46661d3220" dependencies = [ - "arrayvec 0.7.2", "bumpalo", "cranelift-bforest", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-entity", "cranelift-isle", - "gimli 0.26.2", - "hashbrown 0.12.3", + "gimli", + "hashbrown 0.13.2", "log", "regalloc2", "smallvec", @@ -1223,33 +1233,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f2154365e2bff1b1b8537a7181591fdff50d8e27fa6e40d5c69c3bad0ca7c8" +checksum = "c8ac5ac30d62b2d66f12651f6b606dbdfd9c2cfd0908de6b387560a277c5c9da" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "687e14e3f5775248930e0d5a84195abef8b829958e9794bf8d525104993612b4" +checksum = "dd82b8b376247834b59ed9bdc0ddeb50f517452827d4a11bccf5937b213748b8" [[package]] name = "cranelift-entity" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f42ea692c7b450ad18b8c9889661505d51c09ec4380cf1c2d278dbb2da22cae1" +checksum = "40099d38061b37e505e63f89bab52199037a72b931ad4868d9089ff7268660b0" dependencies = [ "serde", ] [[package]] name = "cranelift-frontend" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8483c2db6f45fe9ace984e5adc5d058102227e4c62e5aa2054e16b0275fd3a6e" +checksum = "64a25d9d0a0ae3079c463c34115ec59507b4707175454f0eee0891e83e30e82d" dependencies = [ "cranelift-codegen", "log", @@ -1259,15 +1269,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9793158837678902446c411741d87b43f57dadfb944f2440db4287cda8cbd59" +checksum = "80de6a7d0486e4acbd5f9f87ec49912bf4c8fb6aea00087b989685460d4469ba" [[package]] name = "cranelift-native" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72668c7755f2b880665cb422c8ad2d56db58a88b9bebfef0b73edc2277c13c49" +checksum = "bb6b03e0e03801c4b3fd8ce0758a94750c07a44e7944cc0ffbf0d3f2e7c79b00" dependencies = [ "cranelift-codegen", "libc", @@ -1276,9 +1286,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.93.2" +version = "0.95.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3852ce4b088b44ac4e29459573943009a70d1b192c8d77ef949b4e814f656fc1" +checksum = "ff3220489a3d928ad91e59dd7aeaa8b3de18afb554a6211213673a71c90737ac" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -1337,14 +1347,14 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.14" +version = "0.9.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695" +checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "memoffset 0.8.0", + "memoffset 0.9.0", "scopeguard", ] @@ -1360,9 +1370,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] @@ -1449,7 +1459,7 @@ dependencies = [ [[package]] name = "cumulus-client-cli" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "clap", "parity-scale-codec", @@ -1464,7 +1474,7 @@ dependencies = [ [[package]] name = "cumulus-client-collator" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "cumulus-client-consensus-common", "cumulus-client-network", @@ -1487,13 +1497,20 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-aura" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "async-trait", + "cumulus-client-collator", "cumulus-client-consensus-common", + "cumulus-client-consensus-proposer", "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-relay-chain-interface", "futures", "parity-scale-codec", + "polkadot-node-primitives", + "polkadot-overseer", + "polkadot-primitives", "sc-client-api", "sc-consensus", "sc-consensus-aura", @@ -1509,6 +1526,8 @@ dependencies = [ "sp-inherents", "sp-keystore", "sp-runtime", + "sp-state-machine", + "sp-timestamp", "substrate-prometheus-endpoint", "tracing", ] @@ -1516,7 +1535,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "async-trait", "cumulus-client-pov-recovery", @@ -1532,15 +1551,32 @@ dependencies = [ "schnellru", "sp-blockchain", "sp-consensus", + "sp-core", "sp-runtime", "sp-trie", + "substrate-prometheus-endpoint", "tracing", ] +[[package]] +name = "cumulus-client-consensus-proposer" +version = "0.1.0" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" +dependencies = [ + "anyhow", + "async-trait", + "cumulus-primitives-parachain-inherent", + "sp-consensus", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "thiserror", +] + [[package]] name = "cumulus-client-network" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "async-trait", "cumulus-relay-chain-interface", @@ -1563,7 +1599,7 @@ dependencies = [ [[package]] name = "cumulus-client-pov-recovery" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1587,7 +1623,7 @@ dependencies = [ [[package]] name = "cumulus-client-service" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "cumulus-client-cli", "cumulus-client-collator", @@ -1622,7 +1658,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-aura-ext" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "frame-support", "frame-system", @@ -1638,7 +1674,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-dmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1655,7 +1691,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "bytes", "cumulus-pallet-parachain-system-proc-macro", @@ -1684,18 +1720,18 @@ dependencies = [ [[package]] name = "cumulus-pallet-parachain-system-proc-macro" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "cumulus-pallet-xcm" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1711,7 +1747,7 @@ dependencies = [ [[package]] name = "cumulus-pallet-xcmp-queue" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1731,7 +1767,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-core" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", @@ -1748,7 +1784,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-parachain-inherent" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1771,7 +1807,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-timestamp" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "cumulus-primitives-core", "futures", @@ -1784,7 +1820,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -1802,7 +1838,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-inprocess-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1827,7 +1863,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1845,7 +1881,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-minimal-node" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "array-bytes 6.1.0", "async-trait", @@ -1883,7 +1919,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-rpc-interface" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -1913,7 +1949,7 @@ dependencies = [ [[package]] name = "cumulus-test-relay-sproof-builder" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", @@ -1965,9 +2001,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.95" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109308c20e8445959c2792e81871054c6a17e6976489a93d2769641a2ba5839c" +checksum = "666a3ec767f4bbaf0dcfcc3b4ea048b90520b254fdf88813e763f4c762636c14" dependencies = [ "cc", "cxxbridge-flags", @@ -1977,9 +2013,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.95" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf4c6755cdf10798b97510e0e2b3edb9573032bd9379de8fffa59d68165494f" +checksum = "162bec16c4cc28b19e26db0197b60ba5480fdb9a4cbf0f4c6c104a937741b78e" dependencies = [ "cc", "codespan-reporting", @@ -1987,24 +2023,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "cxxbridge-flags" -version = "1.0.95" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "882074421238e84fe3b4c65d0081de34e5b323bf64555d3e61991f76eb64a7bb" +checksum = "d6e8c238aadc4b9f2c00269d04c87abb23f96dd240803872536eed1a304bb40e" [[package]] name = "cxxbridge-macro" -version = "1.0.95" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a076022ece33e7686fb76513518e219cca4fce5750a8ae6d1ce6c0f48fd1af9" +checksum = "59d9ffb4193dd22180b8d5747b1e095c3d9c9c665ce39b0483a488948f437e06" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] @@ -2081,9 +2117,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56acb310e15652100da43d130af8d97b509e95af61aab1c5a7939ef24337ee17" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", "zeroize", @@ -2117,6 +2153,12 @@ dependencies = [ "rusticata-macros", ] +[[package]] +name = "deranged" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7684a49fb1af197853ef7b2ee694bc1f5b4179556f1e5710e1760c5db6f5e929" + [[package]] name = "derivative" version = "2.2.0" @@ -2268,7 +2310,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] @@ -2285,9 +2327,9 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "dtoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65d09067bfacaa79114679b279d7f5885b53295b1e2cfb4e79c8e4bd3d633169" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" [[package]] name = "dyn-clonable" @@ -2312,9 +2354,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "304e6508efa593091e97a9abbc10f90aa7ca635b6d2784feff3c89d41dd12272" [[package]] name = "ecdsa" @@ -2330,11 +2372,11 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.16.7" +version = "0.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428" +checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ - "der 0.7.6", + "der 0.7.8", "digest 0.10.7", "elliptic-curve 0.13.5", "rfc6979 0.4.0", @@ -2381,9 +2423,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elliptic-curve" @@ -2421,11 +2463,17 @@ dependencies = [ "group 0.13.0", "pkcs8 0.10.2", "rand_core 0.6.4", - "sec1 0.7.2", + "sec1 0.7.3", "subtle", "zeroize", ] +[[package]] +name = "encode_unicode" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" + [[package]] name = "enum-as-inner" version = "0.5.1" @@ -2455,18 +2503,18 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "enumn" -version = "0.1.8" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48016319042fb7c87b78d2993084a831793a897a5cd1a2a67cab9d1eeb4b7d76" +checksum = "b893c4eb2dc092c811165f84dc7447fae16fb66521717968c34c509b39b1a5c5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] @@ -2501,11 +2549,17 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "errno" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" dependencies = [ "errno-dragonfly", "libc", @@ -2579,9 +2633,8 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "evm" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4448c65b71e8e2b9718232d84d09045eeaaccb2320494e6bd6dbf7e58fec8ff" +version = "0.39.1" +source = "git+https://github.com/rust-blockchain/evm?rev=b7b82c7e1fc57b7449d6dfa6826600de37cc1e65#b7b82c7e1fc57b7449d6dfa6826600de37cc1e65" dependencies = [ "auto_impl", "environmental", @@ -2600,8 +2653,9 @@ dependencies = [ [[package]] name = "evm-coder" -version = "0.3.1" -source = "git+https://github.com/uniquenetwork/evm-coder?tag=v0.3.1#21e61c627f71337d6b8a03899fe8de14bfbf67aa" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b88ae5a449e7e9dfef59c0dd2df396bc56d81a6f4e297490c0c64aa73f7f7ad4" dependencies = [ "ethereum", "evm-coder-procedural", @@ -2612,8 +2666,9 @@ dependencies = [ [[package]] name = "evm-coder-procedural" -version = "0.3.1" -source = "git+https://github.com/uniquenetwork/evm-coder?tag=v0.3.1#21e61c627f71337d6b8a03899fe8de14bfbf67aa" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6223c1063c1f53380b4b9aaf2e4d82eba4808c661c61265619b804b09b7a6b1a" dependencies = [ "Inflector", "hex", @@ -2634,9 +2689,8 @@ dependencies = [ [[package]] name = "evm-core" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c51bec0eb68a891c2575c758eaaa1d61373fc51f7caaf216b1fb5c3fea3b5d" +version = "0.39.0" +source = "git+https://github.com/rust-blockchain/evm?rev=b7b82c7e1fc57b7449d6dfa6826600de37cc1e65#b7b82c7e1fc57b7449d6dfa6826600de37cc1e65" dependencies = [ "parity-scale-codec", "primitive-types", @@ -2646,9 +2700,8 @@ dependencies = [ [[package]] name = "evm-gasometer" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8b93c59c54fc26522d842f0e0d3f8e8be331c776df18ff3e540b53c2f64d509" +version = "0.39.0" +source = "git+https://github.com/rust-blockchain/evm?rev=b7b82c7e1fc57b7449d6dfa6826600de37cc1e65#b7b82c7e1fc57b7449d6dfa6826600de37cc1e65" dependencies = [ "environmental", "evm-core", @@ -2658,9 +2711,8 @@ dependencies = [ [[package]] name = "evm-runtime" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c79b9459ce64f1a28688397c4013764ce53cd57bb84efc16b5187fa9b05b13ad" +version = "0.39.0" +source = "git+https://github.com/rust-blockchain/evm?rev=b7b82c7e1fc57b7449d6dfa6826600de37cc1e65#b7b82c7e1fc57b7449d6dfa6826600de37cc1e65" dependencies = [ "auto_impl", "environmental", @@ -2725,7 +2777,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] @@ -2749,6 +2801,12 @@ dependencies = [ "instant", ] +[[package]] +name = "fastrand" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" + [[package]] name = "fatality" version = "0.0.6" @@ -2766,7 +2824,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5aa1e3ae159e592ad222dc90c5acbad632b527779ba88486abe92782ab268bd" dependencies = [ "expander 0.0.4", - "indexmap", + "indexmap 1.9.3", "proc-macro-crate", "proc-macro2", "quote", @@ -2777,10 +2835,9 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.42#4f7a610defd7623aa147d83c83cbc42f907ce8bb" +source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.43#3ae25048cce709349b242e8ad3c54ada2b321564" dependencies = [ "async-trait", - "fc-db", "fp-consensus", "fp-rpc", "sc-consensus", @@ -2794,8 +2851,9 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.42#4f7a610defd7623aa147d83c83cbc42f907ce8bb" +source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.43#3ae25048cce709349b242e8ad3c54ada2b321564" dependencies = [ + "async-trait", "fp-storage", "kvdb-rocksdb", "log", @@ -2813,7 +2871,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.42#4f7a610defd7623aa147d83c83cbc42f907ce8bb" +source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.43#3ae25048cce709349b242e8ad3c54ada2b321564" dependencies = [ "fc-db", "fc-storage", @@ -2834,7 +2892,7 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.42#4f7a610defd7623aa147d83c83cbc42f907ce8bb" +source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.43#3ae25048cce709349b242e8ad3c54ada2b321564" dependencies = [ "ethereum", "ethereum-types", @@ -2867,6 +2925,7 @@ dependencies = [ "sc-transaction-pool", "sc-transaction-pool-api", "sc-utils", + "serde", "sp-api", "sp-block-builder", "sp-blockchain", @@ -2883,7 +2942,7 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.42#4f7a610defd7623aa147d83c83cbc42f907ce8bb" +source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.43#3ae25048cce709349b242e8ad3c54ada2b321564" dependencies = [ "ethereum", "ethereum-types", @@ -2896,7 +2955,7 @@ dependencies = [ [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.42#4f7a610defd7623aa147d83c83cbc42f907ce8bb" +source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.43#3ae25048cce709349b242e8ad3c54ada2b321564" dependencies = [ "ethereum", "ethereum-types", @@ -2958,13 +3017,13 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "windows-sys 0.48.0", ] @@ -3004,13 +3063,13 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" dependencies = [ "crc32fast", "libz-sys", - "miniz_oxide 0.7.1", + "miniz_oxide", ] [[package]] @@ -3031,7 +3090,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "parity-scale-codec", ] @@ -3048,7 +3107,7 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.42#4f7a610defd7623aa147d83c83cbc42f907ce8bb" +source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.43#3ae25048cce709349b242e8ad3c54ada2b321564" dependencies = [ "hex", "impl-serde", @@ -3060,13 +3119,14 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", + "sp-runtime-interface", "sp-std", ] [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.42#4f7a610defd7623aa147d83c83cbc42f907ce8bb" +source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.43#3ae25048cce709349b242e8ad3c54ada2b321564" dependencies = [ "ethereum", "parity-scale-codec", @@ -3078,13 +3138,13 @@ dependencies = [ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.42#4f7a610defd7623aa147d83c83cbc42f907ce8bb" +source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.43#3ae25048cce709349b242e8ad3c54ada2b321564" dependencies = [ "ethereum", "ethereum-types", "fp-evm", "frame-support", - "num_enum", + "num_enum 0.6.1", "parity-scale-codec", "sp-std", ] @@ -3092,7 +3152,7 @@ dependencies = [ [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.42#4f7a610defd7623aa147d83c83cbc42f907ce8bb" +source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.43#3ae25048cce709349b242e8ad3c54ada2b321564" dependencies = [ "evm", "frame-support", @@ -3108,7 +3168,7 @@ dependencies = [ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.42#4f7a610defd7623aa147d83c83cbc42f907ce8bb" +source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.43#3ae25048cce709349b242e8ad3c54ada2b321564" dependencies = [ "ethereum", "ethereum-types", @@ -3125,7 +3185,7 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.42#4f7a610defd7623aa147d83c83cbc42f907ce8bb" +source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.43#3ae25048cce709349b242e8ad3c54ada2b321564" dependencies = [ "frame-support", "parity-scale-codec", @@ -3137,7 +3197,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.42#4f7a610defd7623aa147d83c83cbc42f907ce8bb" +source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.43#3ae25048cce709349b242e8ad3c54ada2b321564" dependencies = [ "parity-scale-codec", "serde", @@ -3152,7 +3212,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-support", "frame-support-procedural", @@ -3177,7 +3237,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "Inflector", "array-bytes 4.2.0", @@ -3224,18 +3284,18 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -3252,7 +3312,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-support", "frame-system", @@ -3281,10 +3341,11 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "async-recursion", "futures", + "indicatif", "jsonrpsee", "log", "parity-scale-codec", @@ -3292,16 +3353,18 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", + "spinners", "substrate-rpc-client", "tokio", + "tokio-retry", ] [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ - "bitflags", + "bitflags 1.3.2", "environmental", "frame-metadata", "frame-support-procedural", @@ -3318,6 +3381,7 @@ dependencies = [ "sp-arithmetic", "sp-core", "sp-core-hashing-proc-macro", + "sp-debug-derive", "sp-inherents", "sp-io", "sp-runtime", @@ -3332,7 +3396,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "Inflector", "cfg-expr", @@ -3342,36 +3406,37 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ + "cfg-if", "frame-support", "log", "parity-scale-codec", @@ -3388,7 +3453,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -3403,7 +3468,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "parity-scale-codec", "sp-api", @@ -3412,7 +3477,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-support", "parity-scale-codec", @@ -3439,11 +3504,11 @@ dependencies = [ [[package]] name = "fs4" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7672706608ecb74ab2e055c68327ffc25ae4cac1e12349204fd5fb0f3487cce2" +checksum = "2eeb4ed9e12f43b7fa0baae3f9cdda28352770132ef2e09a23760c29cae8bd47" dependencies = [ - "rustix 0.37.19", + "rustix 0.38.8", "windows-sys 0.48.0", ] @@ -3508,12 +3573,12 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ - "fastrand", + "fastrand 1.9.0", "futures-core", "futures-io", "memchr", "parking", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.12", "waker-fn", ] @@ -3525,7 +3590,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] @@ -3570,7 +3635,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.12", "pin-utils", "slab", ] @@ -3627,9 +3692,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", @@ -3653,26 +3718,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40" dependencies = [ "opaque-debug 0.3.0", - "polyval 0.6.0", + "polyval 0.6.1", ] [[package]] name = "gimli" -version = "0.26.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" dependencies = [ "fallible-iterator", - "indexmap", + "indexmap 1.9.3", "stable_deref_trait", ] -[[package]] -name = "gimli" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" - [[package]] name = "glob" version = "0.3.1" @@ -3681,11 +3740,11 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" +checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" dependencies = [ - "aho-corasick 0.7.20", + "aho-corasick", "bstr", "fnv", "log", @@ -3716,9 +3775,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ "bytes", "fnv", @@ -3726,7 +3785,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", @@ -3786,6 +3845,12 @@ dependencies = [ "ahash 0.8.3", ] +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + [[package]] name = "heck" version = "0.4.1" @@ -3803,18 +3868,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "hex" @@ -3907,14 +3963,14 @@ checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.12", ] [[package]] name = "http-range-header" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" @@ -3924,9 +3980,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -3936,9 +3992,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -3950,8 +4006,8 @@ dependencies = [ "httparse", "httpdate", "itoa", - "pin-project-lite 0.2.9", - "socket2", + "pin-project-lite 0.2.12", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -3976,9 +4032,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -4102,6 +4158,29 @@ dependencies = [ "serde", ] +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", +] + +[[package]] +name = "indicatif" +version = "0.17.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b297dc40733f23a0e52728a58fa9489a5b7638a324932de16b41adc3ef80730" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", +] + [[package]] name = "inout" version = "0.1.3" @@ -4160,7 +4239,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi 0.3.2", "libc", "windows-sys 0.48.0", ] @@ -4173,31 +4252,30 @@ checksum = "aa2f047c0a98b2f299aa5d6d7088443570faae494e9ae1305e48be000c9e0eb1" [[package]] name = "ipconfig" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd302af1b90f2463a98fa5ad469fc212c8e3175a41c3068601bfa2727591c5be" +checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2", + "socket2 0.5.3", "widestring", - "winapi", + "windows-sys 0.48.0", "winreg", ] [[package]] name = "ipnet" -version = "2.7.2" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "is-terminal" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix 0.37.19", + "hermit-abi 0.3.2", + "rustix 0.38.8", "windows-sys 0.48.0", ] @@ -4212,9 +4290,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "jobserver" @@ -4227,9 +4305,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.63" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] @@ -4277,7 +4355,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4e70b4439a751a5de7dd5ed55eacff78ebf4ffe0fc009cb1ebb11417f5b536b" dependencies = [ "anyhow", - "arrayvec 0.7.2", + "arrayvec 0.7.4", "async-lock", "async-trait", "beef", @@ -4385,10 +4463,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" dependencies = [ "cfg-if", - "ecdsa 0.16.7", + "ecdsa 0.16.8", "elliptic-curve 0.13.5", "once_cell", - "sha2 0.10.6", + "sha2 0.10.7", ] [[package]] @@ -4402,8 +4480,8 @@ dependencies = [ [[package]] name = "kusama-runtime" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "bitvec", "frame-benchmarking", @@ -4432,10 +4510,11 @@ dependencies = [ "pallet-elections-phragmen", "pallet-fast-unstake", "pallet-grandpa", - "pallet-identity 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "pallet-identity 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43)", "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nis", "pallet-nomination-pools", @@ -4500,8 +4579,8 @@ dependencies = [ [[package]] name = "kusama-runtime-constants" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "frame-support", "polkadot-primitives", @@ -4533,9 +4612,9 @@ dependencies = [ [[package]] name = "kvdb-rocksdb" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe7a749456510c45f795e8b04a6a3e0976d0139213ecbf465843830ad55e2217" +checksum = "b644c70b92285f66bfc2032922a79000ea30af7bc2ab31902992a5dcb9b434f6" dependencies = [ "kvdb", "num_cpus", @@ -4559,9 +4638,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.145" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc86cde3ff845662b8f4ef6cb50ea0e20c524eb3d29ae048287e06a1b3fa6a81" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libloading" @@ -4587,22 +4666,24 @@ checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" [[package]] name = "libp2p" -version = "0.50.1" +version = "0.51.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7b0104790be871edcf97db9bd2356604984e623a08d825c3f27852290266b8" +checksum = "f210d259724eae82005b5c48078619b7745edb7b76de370b03f8ba59ea103097" dependencies = [ "bytes", "futures", "futures-timer", - "getrandom 0.2.9", + "getrandom 0.2.10", "instant", - "libp2p-core 0.38.0", + "libp2p-allow-block-list", + "libp2p-connection-limits", + "libp2p-core", "libp2p-dns", "libp2p-identify", + "libp2p-identity", "libp2p-kad", "libp2p-mdns", "libp2p-metrics", - "libp2p-mplex", "libp2p-noise", "libp2p-ping", "libp2p-quic", @@ -4613,44 +4694,32 @@ dependencies = [ "libp2p-webrtc", "libp2p-websocket", "libp2p-yamux", - "multiaddr 0.16.0", - "parking_lot 0.12.1", + "multiaddr", "pin-project", - "smallvec", ] [[package]] -name = "libp2p-core" -version = "0.38.0" +name = "libp2p-allow-block-list" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a8fcd392ff67af6cc3f03b1426c41f7f26b6b9aff2dc632c1c56dd649e571f" +checksum = "510daa05efbc25184458db837f6f9a5143888f1caa742426d92e1833ddd38a50" dependencies = [ - "asn1_der", - "bs58", - "ed25519-dalek", - "either", - "fnv", - "futures", - "futures-timer", - "instant", - "log", - "multiaddr 0.16.0", - "multihash 0.16.3", - "multistream-select", - "once_cell", - "parking_lot 0.12.1", - "pin-project", - "prost", - "prost-build", - "rand 0.8.5", - "rw-stream-sink", - "sec1 0.3.0", - "sha2 0.10.6", - "smallvec", - "thiserror", - "unsigned-varint", + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", + "void", +] + +[[package]] +name = "libp2p-connection-limits" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4caa33f1d26ed664c4fe2cca81a08c8e07d4c1c04f2f4ac7655c2dd85467fda0" +dependencies = [ + "libp2p-core", + "libp2p-identity", + "libp2p-swarm", "void", - "zeroize", ] [[package]] @@ -4666,7 +4735,7 @@ dependencies = [ "instant", "libp2p-identity", "log", - "multiaddr 0.17.1", + "multiaddr", "multihash 0.17.0", "multistream-select", "once_cell", @@ -4683,12 +4752,12 @@ dependencies = [ [[package]] name = "libp2p-dns" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e42a271c1b49f789b92f7fc87749fa79ce5c7bdc88cbdfacb818a4bca47fec5" +checksum = "146ff7034daae62077c415c2376b8057368042df6ab95f5432ad5e88568b1554" dependencies = [ "futures", - "libp2p-core 0.38.0", + "libp2p-core", "log", "parking_lot 0.12.1", "smallvec", @@ -4697,20 +4766,21 @@ dependencies = [ [[package]] name = "libp2p-identify" -version = "0.41.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c052d0026f4817b44869bfb6810f4e1112f43aec8553f2cb38881c524b563abf" +checksum = "5455f472243e63b9c497ff320ded0314254a9eb751799a39c283c6f20b793f3c" dependencies = [ "asynchronous-codec", + "either", "futures", "futures-timer", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm", "log", - "lru 0.8.1", - "prost", - "prost-build", - "prost-codec", + "lru 0.10.1", + "quick-protobuf", + "quick-protobuf-codec", "smallvec", "thiserror", "void", @@ -4725,22 +4795,22 @@ dependencies = [ "bs58", "ed25519-dalek", "log", - "multiaddr 0.17.1", + "multiaddr", "multihash 0.17.0", "quick-protobuf", "rand 0.8.5", - "sha2 0.10.6", + "sha2 0.10.7", "thiserror", "zeroize", ] [[package]] name = "libp2p-kad" -version = "0.42.1" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2766dcd2be8c87d5e1f35487deb22d765f49c6ae1251b3633efe3b25698bd3d2" +checksum = "39d5ef876a2b2323d63c258e63c2f8e36f205fe5a11f0b3095d59635650790ff" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "asynchronous-codec", "bytes", "either", @@ -4748,13 +4818,13 @@ dependencies = [ "futures", "futures-timer", "instant", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm", "log", - "prost", - "prost-build", + "quick-protobuf", "rand 0.8.5", - "sha2 0.10.6", + "sha2 0.10.7", "smallvec", "thiserror", "uint", @@ -4764,19 +4834,20 @@ dependencies = [ [[package]] name = "libp2p-mdns" -version = "0.42.0" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f378264aade9872d6ccd315c0accc18be3a35d15fc1b9c36e5b6f983b62b5b" +checksum = "19983e1f949f979a928f2c603de1cf180cc0dc23e4ac93a62651ccb18341460b" dependencies = [ "data-encoding", "futures", "if-watch", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm", "log", "rand 0.8.5", "smallvec", - "socket2", + "socket2 0.4.9", "tokio", "trust-dns-proto", "void", @@ -4784,11 +4855,11 @@ dependencies = [ [[package]] name = "libp2p-metrics" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad8a64f29da86005c86a4d2728b8a0719e9b192f4092b609fd8790acb9dec55" +checksum = "a42ec91e227d7d0dafa4ce88b333cdf5f277253873ab087555c92798db2ddd46" dependencies = [ - "libp2p-core 0.38.0", + "libp2p-core", "libp2p-identify", "libp2p-kad", "libp2p-ping", @@ -4796,40 +4867,22 @@ dependencies = [ "prometheus-client", ] -[[package]] -name = "libp2p-mplex" -version = "0.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03805b44107aa013e7cbbfa5627b31c36cbedfdfb00603c0311998882bc4bace" -dependencies = [ - "asynchronous-codec", - "bytes", - "futures", - "libp2p-core 0.38.0", - "log", - "nohash-hasher", - "parking_lot 0.12.1", - "rand 0.8.5", - "smallvec", - "unsigned-varint", -] - [[package]] name = "libp2p-noise" -version = "0.41.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a978cb57efe82e892ec6f348a536bfbd9fee677adbe5689d7a93ad3a9bffbf2e" +checksum = "9c3673da89d29936bc6435bafc638e2f184180d554ce844db65915113f86ec5e" dependencies = [ "bytes", "curve25519-dalek 3.2.0", "futures", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "log", "once_cell", - "prost", - "prost-build", + "quick-protobuf", "rand 0.8.5", - "sha2 0.10.6", + "sha2 0.10.7", "snow", "static_assertions", "thiserror", @@ -4839,14 +4892,15 @@ dependencies = [ [[package]] name = "libp2p-ping" -version = "0.41.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "929fcace45a112536e22b3dcfd4db538723ef9c3cb79f672b98be2cc8e25f37f" +checksum = "3e57759c19c28a73ef1eb3585ca410cefb72c1a709fcf6de1612a378e4219202" dependencies = [ + "either", "futures", "futures-timer", "instant", - "libp2p-core 0.38.0", + "libp2p-core", "libp2p-swarm", "log", "rand 0.8.5", @@ -4855,15 +4909,16 @@ dependencies = [ [[package]] name = "libp2p-quic" -version = "0.7.0-alpha" +version = "0.7.0-alpha.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01e7c867e95c8130667b24409d236d37598270e6da69b3baf54213ba31ffca59" +checksum = "c6b26abd81cd2398382a1edfe739b539775be8a90fa6914f39b2ab49571ec735" dependencies = [ "bytes", "futures", "futures-timer", "if-watch", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-tls", "log", "parking_lot 0.12.1", @@ -4876,49 +4931,46 @@ dependencies = [ [[package]] name = "libp2p-request-response" -version = "0.23.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3236168796727bfcf4927f766393415361e2c644b08bedb6a6b13d957c9a4884" +checksum = "7ffdb374267d42dc5ed5bc53f6e601d4a64ac5964779c6e40bb9e4f14c1e30d5" dependencies = [ "async-trait", - "bytes", "futures", "instant", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm", - "log", "rand 0.8.5", "smallvec", - "unsigned-varint", ] [[package]] name = "libp2p-swarm" -version = "0.41.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a35472fe3276b3855c00f1c032ea8413615e030256429ad5349cdf67c6e1a0" +checksum = "903b3d592d7694e56204d211f29d31bc004be99386644ba8731fc3e3ef27b296" dependencies = [ "either", "fnv", "futures", "futures-timer", "instant", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-swarm-derive", "log", - "pin-project", "rand 0.8.5", "smallvec", - "thiserror", "tokio", "void", ] [[package]] name = "libp2p-swarm-derive" -version = "0.31.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d527d5827582abd44a6d80c07ff8b50b4ee238a8979e05998474179e79dc400" +checksum = "0fba456131824ab6acd4c7bf61e9c0f0a3014b5fc9868ccb8e10d344594cdc4f" dependencies = [ "heck", "quote", @@ -4927,17 +4979,17 @@ dependencies = [ [[package]] name = "libp2p-tcp" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b257baf6df8f2df39678b86c578961d48cc8b68642a12f0f763f56c8e5858d" +checksum = "33d33698596d7722d85d3ab0c86c2c322254fce1241e91208e3679b4eb3026cf" dependencies = [ "futures", "futures-timer", "if-watch", "libc", - "libp2p-core 0.38.0", + "libp2p-core", "log", - "socket2", + "socket2 0.4.9", "tokio", ] @@ -4949,7 +5001,7 @@ checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" dependencies = [ "futures", "futures-rustls", - "libp2p-core 0.39.2", + "libp2p-core", "libp2p-identity", "rcgen 0.10.0", "ring", @@ -4962,13 +5014,13 @@ dependencies = [ [[package]] name = "libp2p-wasm-ext" -version = "0.38.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bb1a35299860e0d4b3c02a3e74e3b293ad35ae0cee8a056363b0c862d082069" +checksum = "77dff9d32353a5887adb86c8afc1de1a94d9e8c3bc6df8b2201d7cdf5c848f43" dependencies = [ "futures", "js-sys", - "libp2p-core 0.38.0", + "libp2p-core", "parity-send-wrapper", "wasm-bindgen", "wasm-bindgen-futures", @@ -4976,9 +5028,9 @@ dependencies = [ [[package]] name = "libp2p-webrtc" -version = "0.4.0-alpha" +version = "0.4.0-alpha.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb6cd86dd68cba72308ea05de1cebf3ba0ae6e187c40548167955d4e3970f6a" +checksum = "dba48592edbc2f60b4bc7c10d65445b0c3964c07df26fdf493b6880d33be36f8" dependencies = [ "async-trait", "asynchronous-codec", @@ -4987,13 +5039,13 @@ dependencies = [ "futures-timer", "hex", "if-watch", - "libp2p-core 0.38.0", + "libp2p-core", + "libp2p-identity", "libp2p-noise", "log", - "multihash 0.16.3", - "prost", - "prost-build", - "prost-codec", + "multihash 0.17.0", + "quick-protobuf", + "quick-protobuf-codec", "rand 0.8.5", "rcgen 0.9.3", "serde", @@ -5007,14 +5059,14 @@ dependencies = [ [[package]] name = "libp2p-websocket" -version = "0.40.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d705506030d5c0aaf2882437c70dab437605f21c5f9811978f694e6917a3b54" +checksum = "111273f7b3d3510524c752e8b7a5314b7f7a1fee7e68161c01a7d72cbb06db9f" dependencies = [ "either", "futures", "futures-rustls", - "libp2p-core 0.38.0", + "libp2p-core", "log", "parking_lot 0.12.1", "quicksink", @@ -5026,23 +5078,22 @@ dependencies = [ [[package]] name = "libp2p-yamux" -version = "0.42.0" +version = "0.43.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f63594a0aa818642d9d4915c791945053877253f08a3626f13416b5cd928a29" +checksum = "4dcd21d950662700a385d4c6d68e2f5f54d778e97068cdd718522222ef513bda" dependencies = [ "futures", - "libp2p-core 0.38.0", + "libp2p-core", "log", - "parking_lot 0.12.1", "thiserror", "yamux", ] [[package]] name = "librocksdb-sys" -version = "0.10.0+7.9.2" +version = "0.11.0+8.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fe4d5874f5ff2bc616e55e8c6086d478fcda13faf9495768a4aa1c22042d30b" +checksum = "d3386f101bcb4bd252d8e9d2fb41ec3b0862a15a62b478c355b2982efa469e3e" dependencies = [ "bindgen", "bzip2-sys", @@ -5103,9 +5154,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.9" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db" +checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" dependencies = [ "cc", "pkg-config", @@ -5114,9 +5165,9 @@ dependencies = [ [[package]] name = "link-cplusplus" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" +checksum = "9d240c6f7e1ba3a28b0249f774e6a9dd0175054b52dfbb61b16eb8505c3785c9" dependencies = [ "cc", ] @@ -5138,9 +5189,9 @@ dependencies = [ [[package]] name = "linregress" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "475015a7f8f017edb28d2e69813be23500ad4b32cfe3421c4148efc97324ee52" +checksum = "4de0b5f52a9f84544d268f5fabb71b38962d6aa3c6600b8bcd27d44ccf9c9c45" dependencies = [ "nalgebra", ] @@ -5157,11 +5208,17 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +[[package]] +name = "linux-raw-sys" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" + [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -5169,9 +5226,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.18" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lru" @@ -5191,6 +5248,15 @@ dependencies = [ "hashbrown 0.13.2", ] +[[package]] +name = "lru" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" +dependencies = [ + "hashbrown 0.13.2", +] + [[package]] name = "lru-cache" version = "0.1.2" @@ -5229,6 +5295,12 @@ dependencies = [ "libc", ] +[[package]] +name = "maplit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + [[package]] name = "match_cfg" version = "0.1.0" @@ -5241,7 +5313,7 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" dependencies = [ - "regex-automata", + "regex-automata 0.1.10", ] [[package]] @@ -5281,7 +5353,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" dependencies = [ - "rustix 0.37.19", + "rustix 0.37.23", ] [[package]] @@ -5311,6 +5383,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +dependencies = [ + "autocfg", +] + [[package]] name = "memory-db" version = "0.32.0" @@ -5355,15 +5436,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.7.1" @@ -5387,7 +5459,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "futures", "log", @@ -5406,7 +5478,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "anyhow", "jsonrpsee", @@ -5446,24 +5518,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "multiaddr" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aebdb21e90f81d13ed01dc84123320838e53963c2ca94b60b305d3fa64f31e" -dependencies = [ - "arrayref", - "byteorder", - "data-encoding", - "multibase", - "multihash 0.16.3", - "percent-encoding", - "serde", - "static_assertions", - "unsigned-varint", - "url", -] - [[package]] name = "multiaddr" version = "0.17.1" @@ -5506,7 +5560,7 @@ dependencies = [ "core2", "digest 0.10.7", "multihash-derive", - "sha2 0.10.6", + "sha2 0.10.7", "sha3 0.10.8", "unsigned-varint", ] @@ -5518,7 +5572,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" dependencies = [ "core2", + "digest 0.10.7", "multihash-derive", + "sha2 0.10.7", "unsigned-varint", ] @@ -5558,9 +5614,9 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.32.2" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d68d47bba83f9e2006d117a9a33af1524e655516b8919caac694427a6fb1e511" +checksum = "307ed9b18cc2423f29e83f84fd23a8e73628727990181f18641a8b5dc2ab1caa" dependencies = [ "approx", "matrixmultiply", @@ -5574,9 +5630,9 @@ dependencies = [ [[package]] name = "nalgebra-macros" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d232c68884c0c99810a5a4d333ef7e47689cfd0edc85efc9e54e1e6bf5212766" +checksum = "91761aed67d03ad966ef783ae962ef9bbaca728d2dd7ceb7939ec110fffad998" dependencies = [ "proc-macro2", "quote", @@ -5617,7 +5673,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9ea4302b9759a7a88242299225ea3688e63c85ea136371bb6cf94fd674efaab" dependencies = [ "anyhow", - "bitflags", + "bitflags 1.3.2", "byteorder", "libc", "netlink-packet-core", @@ -5670,7 +5726,7 @@ version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa52e972a9a719cecb6864fb88568781eb706bac2cd1d4f04a648542dbf78069" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "libc", "memoffset 0.6.5", @@ -5711,9 +5767,9 @@ dependencies = [ [[package]] name = "num-complex" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e0d21255c828d6f128a1e41534206671e8c3ea0c62f32291e808dc82cff17d" +checksum = "1ba157ca0885411de85d6ca030ba7e2a83a28636056c7c699b07c8b6f7383214" dependencies = [ "num-traits", ] @@ -5724,7 +5780,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "itoa", ] @@ -5752,20 +5808,20 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.2", "libc", ] @@ -5775,7 +5831,16 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" dependencies = [ - "num_enum_derive", + "num_enum_derive 0.5.11", +] + +[[package]] +name = "num_enum" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +dependencies = [ + "num_enum_derive 0.6.1", ] [[package]] @@ -5784,29 +5849,46 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ - "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "num_enum_derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.28", +] + +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + [[package]] name = "object" -version = "0.29.0" +version = "0.30.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" dependencies = [ "crc32fast", - "hashbrown 0.12.3", - "indexmap", + "hashbrown 0.13.2", + "indexmap 1.9.3", "memchr", ] [[package]] name = "object" -version = "0.30.3" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" dependencies = [ "memchr", ] @@ -5837,7 +5919,7 @@ checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "opal-runtime" -version = "0.9.42" +version = "0.9.43" dependencies = [ "app-promotion-rpc", "cumulus-pallet-aura-ext", @@ -5863,7 +5945,7 @@ dependencies = [ "hex-literal", "impl-trait-for-tuples", "log", - "num_enum", + "num_enum 0.5.11", "orml-tokens", "orml-traits", "orml-vesting", @@ -5876,8 +5958,10 @@ dependencies = [ "pallet-balances-adapter", "pallet-base-fee", "pallet-collator-selection", + "pallet-collective", "pallet-common", "pallet-configuration", + "pallet-democracy", "pallet-ethereum", "pallet-evm", "pallet-evm-coder-substrate", @@ -5887,12 +5971,17 @@ dependencies = [ "pallet-evm-transaction-payment", "pallet-foreign-assets", "pallet-fungible", + "pallet-gov-origins", "pallet-identity 4.0.0-dev", "pallet-inflation", "pallet-maintenance", + "pallet-membership", "pallet-nonfungible", "pallet-preimage", + "pallet-ranked-collective", + "pallet-referenda", "pallet-refungible", + "pallet-scheduler", "pallet-session", "pallet-state-trie-migration", "pallet-structure", @@ -5905,6 +5994,7 @@ dependencies = [ "pallet-treasury", "pallet-unique", "pallet-unique-scheduler-v2", + "pallet-utility", "pallet-xcm", "parachain-info", "parity-scale-codec", @@ -5999,7 +6089,7 @@ dependencies = [ [[package]] name = "orml-tokens" version = "0.4.1-dev" -source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=polkadot-v0.9.42#4890cd1a55486394a7c70471c98d8b02dd2b22bf" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.43#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" dependencies = [ "frame-support", "frame-system", @@ -6015,7 +6105,7 @@ dependencies = [ [[package]] name = "orml-traits" version = "0.4.1-dev" -source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=polkadot-v0.9.42#4890cd1a55486394a7c70471c98d8b02dd2b22bf" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.43#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -6034,7 +6124,7 @@ dependencies = [ [[package]] name = "orml-utilities" version = "0.4.1-dev" -source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=polkadot-v0.9.42#4890cd1a55486394a7c70471c98d8b02dd2b22bf" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.43#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" dependencies = [ "frame-support", "parity-scale-codec", @@ -6048,7 +6138,7 @@ dependencies = [ [[package]] name = "orml-vesting" version = "0.4.1-dev" -source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=polkadot-v0.9.42#4890cd1a55486394a7c70471c98d8b02dd2b22bf" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.43#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" dependencies = [ "frame-support", "frame-system", @@ -6063,7 +6153,7 @@ dependencies = [ [[package]] name = "orml-xcm-support" version = "0.4.1-dev" -source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=polkadot-v0.9.42#4890cd1a55486394a7c70471c98d8b02dd2b22bf" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.43#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" dependencies = [ "frame-support", "orml-traits", @@ -6077,7 +6167,7 @@ dependencies = [ [[package]] name = "orml-xtokens" version = "0.4.1-dev" -source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=polkadot-v0.9.42#4890cd1a55486394a7c70471c98d8b02dd2b22bf" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.43#28a2e6f0df9540d91db4018c7ecebb8bfc217a2a" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -6103,7 +6193,7 @@ checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" dependencies = [ "ecdsa 0.14.8", "elliptic-curve 0.12.3", - "sha2 0.10.6", + "sha2 0.10.7", ] [[package]] @@ -6114,7 +6204,7 @@ checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa" dependencies = [ "ecdsa 0.14.8", "elliptic-curve 0.12.3", - "sha2 0.10.6", + "sha2 0.10.7", ] [[package]] @@ -6129,13 +6219,12 @@ dependencies = [ [[package]] name = "pallet-app-promotion" -version = "0.2.0" +version = "0.2.1" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "log", - "pallet-balances", "pallet-common", "pallet-configuration", "pallet-evm", @@ -6153,7 +6242,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-support", "frame-system", @@ -6169,7 +6258,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-support", "frame-system", @@ -6185,7 +6274,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-support", "frame-system", @@ -6199,7 +6288,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -6223,7 +6312,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6243,7 +6332,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -6279,7 +6368,7 @@ dependencies = [ [[package]] name = "pallet-base-fee" version = "1.0.0" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.42#4f7a610defd7623aa147d83c83cbc42f907ce8bb" +source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.43#3ae25048cce709349b242e8ad3c54ada2b321564" dependencies = [ "fp-evm", "frame-support", @@ -6293,7 +6382,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-support", "frame-system", @@ -6312,7 +6401,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "array-bytes 4.2.0", "binary-merkle-tree", @@ -6336,7 +6425,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -6354,7 +6443,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -6372,7 +6461,7 @@ dependencies = [ [[package]] name = "pallet-collator-selection" -version = "4.0.0" +version = "5.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -6381,7 +6470,6 @@ dependencies = [ "pallet-aura", "pallet-authorship", "pallet-balances", - "pallet-configuration", "pallet-session", "pallet-timestamp", "parity-scale-codec", @@ -6400,7 +6488,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -6418,6 +6506,7 @@ dependencies = [ name = "pallet-common" version = "0.1.14" dependencies = [ + "bondrewd", "ethereum", "evm-coder", "frame-benchmarking", @@ -6436,25 +6525,28 @@ dependencies = [ [[package]] name = "pallet-configuration" -version = "0.1.3" +version = "0.2.0" dependencies = [ "fp-evm", "frame-benchmarking", "frame-support", "frame-system", + "hex-literal", "parity-scale-codec", "scale-info", "smallvec", "sp-arithmetic", "sp-core", + "sp-io", "sp-std", + "up-common", "xcm", ] [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6471,7 +6563,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -6489,7 +6581,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6512,7 +6604,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6525,7 +6617,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -6543,7 +6635,7 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.42#4f7a610defd7623aa147d83c83cbc42f907ce8bb" +source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.43#3ae25048cce709349b242e8ad3c54ada2b321564" dependencies = [ "ethereum", "ethereum-types", @@ -6566,7 +6658,7 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.42#4f7a610defd7623aa147d83c83cbc42f907ce8bb" +source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.43#3ae25048cce709349b242e8ad3c54ada2b321564" dependencies = [ "environmental", "evm", @@ -6576,6 +6668,7 @@ dependencies = [ "frame-support", "frame-system", "hex", + "hex-literal", "impl-trait-for-tuples", "log", "parity-scale-codec", @@ -6645,7 +6738,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.42#4f7a610defd7623aa147d83c83cbc42f907ce8bb" +source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.43#3ae25048cce709349b242e8ad3c54ada2b321564" dependencies = [ "fp-evm", "ripemd", @@ -6671,7 +6764,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6728,10 +6821,20 @@ dependencies = [ "up-data-structs", ] +[[package]] +name = "pallet-gov-origins" +version = "0.2.1" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", +] + [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -6771,7 +6874,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6787,7 +6890,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -6807,7 +6910,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -6853,7 +6956,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -6867,10 +6970,29 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-message-queue" +version = "7.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-weights", +] + [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -6887,7 +7009,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -6903,7 +7025,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -6919,7 +7041,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-support", "frame-system", @@ -6936,7 +7058,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6956,7 +7078,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -6988,7 +7110,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-support", "frame-system", @@ -7005,7 +7127,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7029,7 +7151,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -7046,7 +7168,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -7061,7 +7183,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -7079,7 +7201,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -7094,7 +7216,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "assert_matches", "frame-benchmarking", @@ -7133,7 +7255,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -7150,7 +7272,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-support", "frame-system", @@ -7171,7 +7293,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -7187,7 +7309,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-support", "frame-system", @@ -7201,7 +7323,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -7224,18 +7346,18 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "log", "sp-arithmetic", @@ -7244,7 +7366,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "parity-scale-codec", "sp-api", @@ -7253,7 +7375,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -7286,8 +7408,9 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", @@ -7300,7 +7423,7 @@ dependencies = [ [[package]] name = "pallet-template-transaction-payment" version = "3.0.0" -source = "git+https://github.com/uniquenetwork/pallet-sponsoring?branch=polkadot-v0.9.42#be3a4a92920866f234c66eff18df9c624bb7dfc4" +source = "git+https://github.com/uniquenetwork/pallet-sponsoring?branch=polkadot-v0.9.43#bd6e4a2a97b1415c22f96512b857d9615cbe2f81" dependencies = [ "frame-benchmarking", "frame-support", @@ -7332,7 +7455,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -7350,7 +7473,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -7369,7 +7492,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-support", "frame-system", @@ -7385,7 +7508,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -7401,7 +7524,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -7413,7 +7536,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -7436,6 +7559,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "log", "pallet-balances-adapter", "pallet-common", "pallet-evm", @@ -7472,7 +7596,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -7488,7 +7612,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -7503,7 +7627,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-benchmarking", "frame-support", @@ -7517,8 +7641,8 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "bounded-collections", "frame-benchmarking", @@ -7538,8 +7662,8 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "frame-benchmarking", "frame-support", @@ -7558,7 +7682,7 @@ dependencies = [ [[package]] name = "parachain-info" version = "0.1.0" -source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.42#f603a61ff370fc33740c9373833c3c6ba1486846" +source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.43#b8999fce0f61fb757f9e57e326cda48e70137019" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -7569,9 +7693,9 @@ dependencies = [ [[package]] name = "parity-db" -version = "0.4.8" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4890dcb9556136a4ec2b0c51fa4a08c8b733b829506af8fff2e853f3a065985b" +checksum = "78f19d20a0d2cc52327a88d131fa1c4ea81ea4a04714aedcfeca2dd410049cf8" dependencies = [ "blake2", "crc32fast", @@ -7589,11 +7713,11 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.5.0" +version = "3.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ddb756ca205bd108aee3c62c6d3c994e1df84a59b9d6d4a5ea42ee1fd5a9a28" +checksum = "dd8e946cc0cc711189c0b0249fb8b599cbeeab9784d83c415719368bb8d4ac64" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "bitvec", "byte-slice-cast", "bytes", @@ -7604,9 +7728,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.1.4" +version = "3.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b26a931f824dd4eca30b3e43bb4f31cd5f0d3a403c5f5ff27106b805bfde7b" +checksum = "2a296c3079b5fefbc499e1de58dc26c09b1b9a5952d26694ee89f04a43ebbb3e" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -7650,7 +7774,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.7", + "parking_lot_core 0.9.8", ] [[package]] @@ -7669,22 +7793,28 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "smallvec", - "windows-sys 0.45.0", + "windows-targets 0.48.2", ] +[[package]] +name = "partial_sort" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7924d1d0ad836f665c9065e26d016c673ece3993f30d340068b16f282afc1156" + [[package]] name = "paste" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pbkdf2" @@ -7736,9 +7866,9 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.6.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e68e84bfb01f0507134eac1e9b410a12ba379d064eab48c50ba4ce329a527b70" +checksum = "1acb4a4365a13f749a93f1a094a7805e5cfa0955373a9de860d962eaa3a5fe5a" dependencies = [ "thiserror", "ucd-trie", @@ -7746,9 +7876,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.6.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b79d4c71c865a25a4322296122e3924d30bc8ee0834c8bfc8b95f7f054afbfb" +checksum = "666d00490d4ac815001da55838c500eafb0320019bbaa44444137c48b443a853" dependencies = [ "pest", "pest_generator", @@ -7756,26 +7886,26 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.6.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c435bf1076437b851ebc8edc3a18442796b30f1728ffea6262d59bbe28b077e" +checksum = "68ca01446f50dbda87c1786af8770d535423fa8a53aec03b8f4e3d7eb10e0929" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "pest_meta" -version = "2.6.0" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "745a452f8eb71e39ffd8ee32b3c5f51d03845f99786fa9b68db6ff509c505411" +checksum = "56af0a30af74d0445c0bf6d9d051c979b516a1a5af790d251daee76005420a48" dependencies = [ "once_cell", "pest", - "sha2 0.10.6", + "sha2 0.10.7", ] [[package]] @@ -7785,27 +7915,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" dependencies = [ "fixedbitset", - "indexmap", + "indexmap 1.9.3", ] [[package]] name = "pin-project" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.0" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] @@ -7816,9 +7946,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" [[package]] name = "pin-utils" @@ -7842,7 +7972,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.6", + "der 0.7.8", "spki 0.7.2", ] @@ -7866,8 +7996,8 @@ checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" [[package]] name = "polkadot-approval-distribution" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "futures", "polkadot-node-jaeger", @@ -7882,8 +8012,8 @@ dependencies = [ [[package]] name = "polkadot-availability-bitfield-distribution" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "futures", "polkadot-node-network-protocol", @@ -7896,8 +8026,8 @@ dependencies = [ [[package]] name = "polkadot-availability-distribution" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "derive_more", "fatality", @@ -7919,8 +8049,8 @@ dependencies = [ [[package]] name = "polkadot-availability-recovery" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "fatality", "futures", @@ -7940,8 +8070,8 @@ dependencies = [ [[package]] name = "polkadot-cli" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "clap", "frame-benchmarking-cli", @@ -7969,8 +8099,8 @@ dependencies = [ [[package]] name = "polkadot-client" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "async-trait", "frame-benchmarking", @@ -8011,8 +8141,8 @@ dependencies = [ [[package]] name = "polkadot-collator-protocol" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "always-assert", "bitvec", @@ -8033,8 +8163,8 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "parity-scale-codec", "scale-info", @@ -8045,14 +8175,14 @@ dependencies = [ [[package]] name = "polkadot-dispute-distribution" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "derive_more", "fatality", "futures", "futures-timer", - "indexmap", + "indexmap 1.9.3", "lru 0.9.0", "parity-scale-codec", "polkadot-erasure-coding", @@ -8070,8 +8200,8 @@ dependencies = [ [[package]] name = "polkadot-erasure-coding" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "parity-scale-codec", "polkadot-node-primitives", @@ -8084,8 +8214,8 @@ dependencies = [ [[package]] name = "polkadot-gossip-support" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "futures", "futures-timer", @@ -8104,8 +8234,8 @@ dependencies = [ [[package]] name = "polkadot-network-bridge" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "always-assert", "async-trait", @@ -8127,8 +8257,8 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "futures", "parity-scale-codec", @@ -8145,8 +8275,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "bitvec", "derive_more", @@ -8174,8 +8304,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-av-store" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "bitvec", "futures", @@ -8195,8 +8325,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-backing" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "bitvec", "fatality", @@ -8214,8 +8344,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-bitfield-signing" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "futures", "polkadot-node-subsystem", @@ -8229,8 +8359,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "async-trait", "futures", @@ -8249,8 +8379,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-api" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "futures", "polkadot-node-metrics", @@ -8264,8 +8394,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-chain-selection" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "futures", "futures-timer", @@ -8281,8 +8411,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "fatality", "futures", @@ -8300,8 +8430,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-parachains-inherent" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "async-trait", "futures", @@ -8317,8 +8447,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-provisioner" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "bitvec", "fatality", @@ -8335,8 +8465,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "always-assert", "futures", @@ -8362,8 +8492,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "futures", "polkadot-node-primitives", @@ -8378,8 +8508,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-worker" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "assert_matches", "cpu-time", @@ -8407,8 +8537,8 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "futures", "lru 0.9.0", @@ -8422,8 +8552,8 @@ dependencies = [ [[package]] name = "polkadot-node-jaeger" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "lazy_static", "log", @@ -8440,8 +8570,8 @@ dependencies = [ [[package]] name = "polkadot-node-metrics" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "bs58", "futures", @@ -8459,9 +8589,10 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ + "async-channel", "async-trait", "derive_more", "fatality", @@ -8481,8 +8612,8 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "bounded-vec", "futures", @@ -8503,8 +8634,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "polkadot-node-jaeger", "polkadot-node-subsystem-types", @@ -8513,8 +8644,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-types" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "async-trait", "derive_more", @@ -8536,8 +8667,8 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem-util" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "async-trait", "derive_more", @@ -8569,8 +8700,8 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "async-trait", "futures", @@ -8592,8 +8723,8 @@ dependencies = [ [[package]] name = "polkadot-parachain" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "bounded-collections", "derive_more", @@ -8609,8 +8740,8 @@ dependencies = [ [[package]] name = "polkadot-performance-test" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "env_logger 0.9.3", "kusama-runtime", @@ -8627,8 +8758,8 @@ dependencies = [ [[package]] name = "polkadot-primitives" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "bitvec", "hex-literal", @@ -8653,8 +8784,8 @@ dependencies = [ [[package]] name = "polkadot-rpc" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "jsonrpsee", "mmr-rpc", @@ -8685,8 +8816,8 @@ dependencies = [ [[package]] name = "polkadot-runtime" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "bitvec", "frame-benchmarking", @@ -8714,10 +8845,11 @@ dependencies = [ "pallet-elections-phragmen", "pallet-fast-unstake", "pallet-grandpa", - "pallet-identity 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "pallet-identity 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43)", "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -8779,8 +8911,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-common" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "bitvec", "frame-benchmarking", @@ -8825,8 +8957,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-constants" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "frame-support", "polkadot-primitives", @@ -8839,8 +8971,8 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "bs58", "parity-scale-codec", @@ -8851,10 +8983,10 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ - "bitflags", + "bitflags 1.3.2", "bitvec", "derive_more", "frame-benchmarking", @@ -8865,6 +8997,7 @@ dependencies = [ "pallet-authorship", "pallet-babe", "pallet-balances", + "pallet-message-queue", "pallet-session", "pallet-staking", "pallet-timestamp", @@ -8895,8 +9028,8 @@ dependencies = [ [[package]] name = "polkadot-service" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "async-trait", "frame-benchmarking-cli", @@ -9004,13 +9137,13 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "arrayvec 0.5.2", "fatality", "futures", - "indexmap", + "indexmap 1.9.3", "parity-scale-codec", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -9025,8 +9158,8 @@ dependencies = [ [[package]] name = "polkadot-statement-table" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -9040,12 +9173,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg", - "bitflags", + "bitflags 1.3.2", "cfg-if", "concurrent-queue", "libc", "log", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.12", "windows-sys 0.48.0", ] @@ -9074,9 +9207,9 @@ dependencies = [ [[package]] name = "polyval" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef234e08c11dfcb2e56f79fd70f6f2eb7f025c0ce2333e82f4f0518ecad30c6" +checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb" dependencies = [ "cfg-if", "cpufeatures", @@ -9084,6 +9217,12 @@ dependencies = [ "universal-hash 0.5.1", ] +[[package]] +name = "portable-atomic" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f32154ba0af3a075eefa1eda8bb414ee928f62303a54ea85b8d6638ff1a6ee9e" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -9094,7 +9233,7 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" name = "precompile-utils-macro" version = "0.1.0" dependencies = [ - "num_enum", + "num_enum 0.5.11", "proc-macro2", "quote", "sha3 0.8.2", @@ -9135,10 +9274,20 @@ dependencies = [ name = "prettyplease" version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" +checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" +dependencies = [ + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "prettyplease" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" dependencies = [ "proc-macro2", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] @@ -9213,14 +9362,14 @@ checksum = "0e99670bafb56b9a106419397343bdbc8b8742c3cc449fec6345f86173f47cd4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "proc-macro2" -version = "1.0.59" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] @@ -9241,25 +9390,25 @@ dependencies = [ [[package]] name = "prometheus-client" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83cd1b99916654a69008fd66b4f9397fbe08e6e51dfe23d4417acf5d3b8cb87c" +checksum = "5d6fa99d535dd930d1249e6c79cb3c2915f9172a540fe2b02a4c8f9ca954721e" dependencies = [ "dtoa", "itoa", "parking_lot 0.12.1", - "prometheus-client-derive-text-encode", + "prometheus-client-derive-encode", ] [[package]] -name = "prometheus-client-derive-text-encode" -version = "0.3.0" +name = "prometheus-client-derive-encode" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a455fbcb954c1a7decf3c586e860fd7889cddf4b8e164be736dbac95a953cd" +checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] @@ -9285,7 +9434,7 @@ dependencies = [ "log", "multimap", "petgraph", - "prettyplease", + "prettyplease 0.1.25", "prost", "prost-types", "regex", @@ -9294,19 +9443,6 @@ dependencies = [ "which", ] -[[package]] -name = "prost-codec" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc34979ff898b6e141106178981ce2596c387ea6e62533facfc61a37fc879c0" -dependencies = [ - "asynchronous-codec", - "bytes", - "prost", - "thiserror", - "unsigned-varint", -] - [[package]] name = "prost-derive" version = "0.11.9" @@ -9340,7 +9476,7 @@ dependencies = [ [[package]] name = "quartz-runtime" -version = "0.9.42" +version = "0.9.43" dependencies = [ "app-promotion-rpc", "cumulus-pallet-aura-ext", @@ -9366,7 +9502,7 @@ dependencies = [ "hex-literal", "impl-trait-for-tuples", "log", - "num_enum", + "num_enum 0.5.11", "orml-tokens", "orml-traits", "orml-vesting", @@ -9379,8 +9515,10 @@ dependencies = [ "pallet-balances-adapter", "pallet-base-fee", "pallet-collator-selection", + "pallet-collective", "pallet-common", "pallet-configuration", + "pallet-democracy", "pallet-ethereum", "pallet-evm", "pallet-evm-coder-substrate", @@ -9390,12 +9528,17 @@ dependencies = [ "pallet-evm-transaction-payment", "pallet-foreign-assets", "pallet-fungible", + "pallet-gov-origins", "pallet-identity 4.0.0-dev", "pallet-inflation", "pallet-maintenance", + "pallet-membership", "pallet-nonfungible", "pallet-preimage", + "pallet-ranked-collective", + "pallet-referenda", "pallet-refungible", + "pallet-scheduler", "pallet-session", "pallet-state-trie-migration", "pallet-structure", @@ -9407,6 +9550,7 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", "pallet-unique", + "pallet-utility", "pallet-xcm", "parachain-info", "parity-scale-codec", @@ -9454,6 +9598,19 @@ dependencies = [ "byteorder", ] +[[package]] +name = "quick-protobuf-codec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1693116345026436eb2f10b677806169c1a1260c1c60eaaffe3fb5a29ae23d8b" +dependencies = [ + "asynchronous-codec", + "bytes", + "quick-protobuf", + "thiserror", + "unsigned-varint", +] + [[package]] name = "quicksink" version = "0.1.2" @@ -9467,9 +9624,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c10f662eee9c94ddd7135043e544f3c82fa839a1e7b865911331961b53186c" +checksum = "f31999cfc7927c4e212e60fd50934ab40e8e8bfd2d493d6095d2d306bc0764d9" dependencies = [ "bytes", "rand 0.8.5", @@ -9485,9 +9642,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.28" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" dependencies = [ "proc-macro2", ] @@ -9557,7 +9714,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", ] [[package]] @@ -9614,7 +9771,7 @@ checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" dependencies = [ "pem", "ring", - "time 0.3.21", + "time 0.3.25", "x509-parser 0.13.2", "yasna", ] @@ -9627,7 +9784,7 @@ checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", "ring", - "time 0.3.21", + "time 0.3.25", "yasna", ] @@ -9637,7 +9794,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -9646,7 +9803,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -9655,7 +9812,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", "redox_syscall 0.2.16", "thiserror", ] @@ -9675,29 +9832,29 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.16" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43faa91b1c8b36841ee70e97188a869d37ae21759da6846d4be66de5bf7b12c" +checksum = "61ef7e18e8841942ddb1cf845054f8008410030a3997875d9e49b7a363063df1" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.16" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" +checksum = "2dfaf0c85b766276c797f3791f5bc6d5bd116b41d53049af2789666b0c0bc9fa" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "regalloc2" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c" +checksum = "80535183cae11b149d618fbd3c37e38d7cda589d82d7769e196ca9a9042d7621" dependencies = [ "fxhash", "log", @@ -9707,13 +9864,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.4" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" dependencies = [ - "aho-corasick 1.0.2", + "aho-corasick", "memchr", - "regex-syntax 0.7.2", + "regex-automata 0.3.6", + "regex-syntax 0.7.4", ] [[package]] @@ -9726,28 +9884,27 @@ dependencies = [ ] [[package]] -name = "regex-syntax" -version = "0.6.29" +name = "regex-automata" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" +checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.7.4", +] [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] -name = "region" -version = "3.0.0" +name = "regex-syntax" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76e189c2369884dce920945e2ddf79b3dff49e071a167dd1817fa9c4c00d512e" -dependencies = [ - "bitflags", - "libc", - "mach", - "winapi", -] +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "resolv-conf" @@ -9828,9 +9985,9 @@ dependencies = [ [[package]] name = "rocksdb" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "015439787fce1e75d55f279078d33ff14b4af5d93d995e8838ee4631301c8a99" +checksum = "bb6f170a4041d50a0ce04b0d2e14916d6ca863ea2e422689a5b694395d299ffe" dependencies = [ "libc", "librocksdb-sys", @@ -9838,8 +9995,8 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "binary-merkle-tree", "frame-benchmarking", @@ -9863,10 +10020,11 @@ dependencies = [ "pallet-democracy", "pallet-elections-phragmen", "pallet-grandpa", - "pallet-identity 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "pallet-identity 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43)", "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-mmr", "pallet-multisig", "pallet-nis", @@ -9924,8 +10082,8 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "frame-support", "polkadot-primitives", @@ -10021,7 +10179,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.17", + "semver 1.0.18", ] [[package]] @@ -10035,11 +10193,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.14" +version = "0.36.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14e4d67015953998ad0eb82887a0eb0129e18a7e2f3b7b0f6c422fddcd503d62" +checksum = "c37f1bd5ef1b5422177b7646cba67430579cfe2ace80f284fee876bca52ad941" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", @@ -10049,11 +10207,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.19" +version = "0.37.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", @@ -10061,6 +10219,19 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "rustix" +version = "0.38.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" +dependencies = [ + "bitflags 2.4.0", + "errno", + "libc", + "linux-raw-sys 0.4.5", + "windows-sys 0.48.0", +] + [[package]] name = "rustls" version = "0.19.1" @@ -10088,9 +10259,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", "rustls-pemfile", @@ -10100,18 +10271,18 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ "base64 0.21.2", ] [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "rw-stream-sink" @@ -10126,15 +10297,15 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "safe_arch" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794821e4ccb0d9f979512f9c1973480123f9bd62a90d74ab0f9426fcf8f4a529" +checksum = "f398075ce1e6a179b46f51bd88d0598b92b00d3551f1a2d4ac49e771b56ac354" dependencies = [ "bytemuck", ] @@ -10151,7 +10322,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "log", "sp-core", @@ -10162,7 +10333,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "async-trait", "futures", @@ -10170,6 +10341,7 @@ dependencies = [ "ip_network", "libp2p", "log", + "multihash 0.17.0", "parity-scale-codec", "prost", "prost-build", @@ -10190,7 +10362,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "futures", "futures-timer", @@ -10213,7 +10385,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -10228,7 +10400,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -10247,25 +10419,25 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "array-bytes 4.2.0", "chrono", "clap", "fdlimit", "futures", - "libp2p", + "libp2p-identity", "log", "names", "parity-scale-codec", @@ -10298,7 +10470,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "fnv", "futures", @@ -10317,6 +10489,7 @@ dependencies = [ "sp-keystore", "sp-runtime", "sp-state-machine", + "sp-statement-store", "sp-storage", "substrate-prometheus-endpoint", ] @@ -10324,7 +10497,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "hash-db 0.16.0", "kvdb", @@ -10350,12 +10523,12 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "async-trait", "futures", "futures-timer", - "libp2p", + "libp2p-identity", "log", "mockall", "parking_lot 0.12.1", @@ -10375,7 +10548,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "async-trait", "futures", @@ -10404,7 +10577,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "async-trait", "fork-tree", @@ -10440,7 +10613,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "futures", "jsonrpsee", @@ -10462,9 +10635,10 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "array-bytes 4.2.0", + "async-channel", "async-trait", "fnv", "futures", @@ -10497,7 +10671,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "futures", "jsonrpsee", @@ -10516,7 +10690,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "fork-tree", "parity-scale-codec", @@ -10529,7 +10703,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "ahash 0.8.3", "array-bytes 4.2.0", @@ -10569,7 +10743,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "finality-grandpa", "futures", @@ -10589,11 +10763,12 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "assert_matches", "async-trait", "futures", + "futures-timer", "jsonrpsee", "log", "parity-scale-codec", @@ -10623,7 +10798,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "async-trait", "futures", @@ -10646,13 +10821,12 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "lru 0.8.1", "parity-scale-codec", "parking_lot 0.12.1", "sc-executor-common", - "sc-executor-wasmi", "sc-executor-wasmtime", "sp-api", "sp-core", @@ -10664,46 +10838,31 @@ dependencies = [ "sp-version", "sp-wasm-interface", "tracing", - "wasmi", ] [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", "sp-wasm-interface", "thiserror", "wasm-instrument", - "wasmi", -] - -[[package]] -name = "sc-executor-wasmi" -version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" -dependencies = [ - "log", - "sc-allocator", - "sc-executor-common", - "sp-runtime-interface", - "sp-wasm-interface", - "wasmi", ] [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "anyhow", "cfg-if", "libc", "log", "once_cell", - "rustix 0.36.14", + "rustix 0.36.15", "sc-allocator", "sc-executor-common", "sp-runtime-interface", @@ -10714,7 +10873,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "ansi_term", "futures", @@ -10730,10 +10889,9 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "array-bytes 4.2.0", - "async-trait", "parking_lot 0.12.1", "serde_json", "sp-application-crypto", @@ -10745,7 +10903,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "array-bytes 4.2.0", "async-channel", @@ -10790,11 +10948,12 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ + "async-channel", "cid", "futures", - "libp2p", + "libp2p-identity", "log", "prost", "prost-build", @@ -10810,15 +10969,15 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "array-bytes 4.2.0", "async-trait", - "bitflags", + "bitflags 1.3.2", "bytes", "futures", "futures-timer", - "libp2p", + "libp2p-identity", "parity-scale-codec", "prost-build", "sc-consensus", @@ -10838,7 +10997,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "ahash 0.8.3", "futures", @@ -10857,11 +11016,12 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "array-bytes 4.2.0", + "async-channel", "futures", - "libp2p", + "libp2p-identity", "log", "parity-scale-codec", "prost", @@ -10879,9 +11039,10 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "array-bytes 4.2.0", + "async-channel", "async-trait", "fork-tree", "futures", @@ -10913,7 +11074,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "array-bytes 4.2.0", "futures", @@ -10933,7 +11094,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "array-bytes 4.2.0", "bytes", @@ -10964,20 +11125,23 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "futures", - "libp2p", + "libp2p-identity", "log", + "parking_lot 0.12.1", + "partial_sort", "sc-utils", "serde_json", + "sp-arithmetic", "wasm-timer", ] [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10986,7 +11150,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "futures", "jsonrpsee", @@ -11009,6 +11173,7 @@ dependencies = [ "sp-rpc", "sp-runtime", "sp-session", + "sp-statement-store", "sp-version", "tokio", ] @@ -11016,7 +11181,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -11035,7 +11200,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "http", "jsonrpsee", @@ -11050,7 +11215,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "array-bytes 4.2.0", "futures", @@ -11076,7 +11241,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "async-trait", "directories", @@ -11142,7 +11307,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "log", "parity-scale-codec", @@ -11153,7 +11318,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "clap", "fs4", @@ -11169,7 +11334,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -11188,7 +11353,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "futures", "libc", @@ -11207,7 +11372,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "chrono", "futures", @@ -11226,7 +11391,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "ansi_term", "atty", @@ -11257,18 +11422,18 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "async-trait", "futures", @@ -11295,7 +11460,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "async-trait", "futures", @@ -11309,7 +11474,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "async-channel", "futures", @@ -11323,9 +11488,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.7.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b569c32c806ec3abdf3b5869fb8bf1e0d275a7c1c9b0b05603d9464632649edf" +checksum = "35c0a159d0c45c12b20c5a844feb1fe4bea86e28f17b92a5f0c42193634d3782" dependencies = [ "bitvec", "cfg-if", @@ -11337,9 +11502,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.6.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53012eae69e5aa5c14671942a5dd47de59d4cdcff8532a6dd0e081faf1119482" +checksum = "912e55f6d20e0e80d63733872b40e1227c0bce1e1ab81ba67d696339bfd7fd29" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11349,11 +11514,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -11387,15 +11552,15 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "scratch" -version = "1.0.5" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" +checksum = "a3cf7c11c38cb994f3d40e8a8cde3bbd1f72a435e4c49e85d6553d8312306152" [[package]] name = "sct" @@ -11445,12 +11610,12 @@ dependencies = [ [[package]] name = "sec1" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct 0.2.0", - "der 0.7.6", + "der 0.7.8", "generic-array 0.14.7", "pkcs8 0.10.2", "subtle", @@ -11486,11 +11651,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -11499,9 +11664,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -11518,9 +11683,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" dependencies = [ "serde", ] @@ -11533,29 +11698,29 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.163" +version = "1.0.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "32ac8da02677876d532745a130fc9d8e6edfa81a269b107c5b00829b91d8eb3c" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "aafe972d60b0b9bee71a91b92fee2d4fb3c9d7e8f6b179aa99f27203d99a4816" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" dependencies = [ "itoa", "ryu", @@ -11564,9 +11729,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" +checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" dependencies = [ "serde", ] @@ -11622,9 +11787,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if", "cpufeatures", @@ -11740,8 +11905,8 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "enumn", "parity-scale-codec", @@ -11761,9 +11926,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "snap" @@ -11784,7 +11949,7 @@ dependencies = [ "rand_core 0.6.4", "ring", "rustc_version", - "sha2 0.10.6", + "sha2 0.10.7", "subtle", ] @@ -11798,6 +11963,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "soketto" version = "0.7.1" @@ -11818,7 +11993,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "hash-db 0.16.0", "log", @@ -11838,7 +12013,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "Inflector", "blake2", @@ -11846,13 +12021,13 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "parity-scale-codec", "scale-info", @@ -11865,7 +12040,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "integer-sqrt", "num-traits", @@ -11879,7 +12054,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "parity-scale-codec", "scale-info", @@ -11892,7 +12067,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "parity-scale-codec", "sp-api", @@ -11904,7 +12079,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "futures", "log", @@ -11922,7 +12097,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "async-trait", "futures", @@ -11937,7 +12112,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "async-trait", "parity-scale-codec", @@ -11955,7 +12130,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "async-trait", "parity-scale-codec", @@ -11976,7 +12151,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "lazy_static", "parity-scale-codec", @@ -11995,7 +12170,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "finality-grandpa", "log", @@ -12013,7 +12188,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "parity-scale-codec", "scale-info", @@ -12025,10 +12200,10 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "array-bytes 4.2.0", - "bitflags", + "bitflags 1.3.2", "blake2", "bounded-collections", "bs58", @@ -12069,12 +12244,12 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "blake2b_simd", "byteorder", "digest 0.10.7", - "sha2 0.10.6", + "sha2 0.10.7", "sha3 0.10.8", "sp-std", "twox-hash", @@ -12083,18 +12258,18 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "proc-macro2", "quote", "sp-core-hashing", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -12103,17 +12278,17 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "environmental", "parity-scale-codec", @@ -12124,7 +12299,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -12139,7 +12314,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "bytes", "ed25519", @@ -12165,7 +12340,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "lazy_static", "sp-core", @@ -12176,7 +12351,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "futures", "parity-scale-codec", @@ -12190,16 +12365,16 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "thiserror", - "zstd 0.12.3+zstd.1.5.2", + "zstd 0.12.4", ] [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -12210,7 +12385,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -12228,7 +12403,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "parity-scale-codec", "scale-info", @@ -12242,7 +12417,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "sp-api", "sp-core", @@ -12252,7 +12427,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "backtrace", "lazy_static", @@ -12262,7 +12437,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "rustc-hash", "serde", @@ -12272,7 +12447,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "either", "hash256-std-hasher", @@ -12294,7 +12469,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -12312,19 +12487,19 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "Inflector", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "parity-scale-codec", "scale-info", @@ -12338,7 +12513,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "parity-scale-codec", "scale-info", @@ -12351,7 +12526,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "hash-db 0.16.0", "log", @@ -12368,15 +12543,33 @@ dependencies = [ "tracing", ] +[[package]] +name = "sp-statement-store" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" +dependencies = [ + "log", + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-externalities", + "sp-runtime", + "sp-runtime-interface", + "sp-std", + "thiserror", +] + [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12389,7 +12582,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "async-trait", "futures-timer", @@ -12404,7 +12597,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "parity-scale-codec", "sp-std", @@ -12416,7 +12609,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "sp-api", "sp-runtime", @@ -12425,7 +12618,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "async-trait", "log", @@ -12441,7 +12634,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "ahash 0.8.3", "hash-db 0.16.0", @@ -12464,7 +12657,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12481,18 +12674,18 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -12506,7 +12699,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "parity-scale-codec", "scale-info", @@ -12526,7 +12719,7 @@ checksum = "c87e960f4dca2788eeb86bbdde8dd246be8948790b7618d656e68f9b720a86e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] @@ -12535,6 +12728,17 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spinners" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08615eea740067d9899969bc2891c68a19c315cb1f66640af9a9ecb91b13bcab" +dependencies = [ + "lazy_static", + "maplit", + "strum", +] + [[package]] name = "spki" version = "0.6.0" @@ -12552,14 +12756,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", - "der 0.7.6", + "der 0.7.8", ] [[package]] name = "ss58-registry" -version = "1.40.0" +version = "1.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47a8ad42e5fc72d5b1eb104a5546937eaf39843499948bb666d6e93c62423b" +checksum = "14782ef66f16396bc977f43c89b36f2c7b58357a2cc0bf58a09627542c13c379" dependencies = [ "Inflector", "num-format", @@ -12600,7 +12804,7 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a2a1c578e98c1c16fc3b8ec1328f7659a500737d7a0c6d625e73e830ff9c1f6" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg_aliases", "libc", "parking_lot 0.11.2", @@ -12706,7 +12910,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "platforms 2.0.0", ] @@ -12714,7 +12918,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -12733,7 +12937,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "hyper", "log", @@ -12745,7 +12949,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "async-trait", "jsonrpsee", @@ -12758,7 +12962,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "jsonrpsee", "log", @@ -12777,7 +12981,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "futures", "substrate-test-utils-derive", @@ -12787,18 +12991,18 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "ansi_term", "build-helper", @@ -12807,7 +13011,7 @@ dependencies = [ "sp-maybe-compressed-blob", "strum", "tempfile", - "toml 0.7.4", + "toml 0.7.6", "walkdir", "wasm-opt", ] @@ -12840,9 +13044,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.18" +version = "2.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" dependencies = [ "proc-macro2", "quote", @@ -12867,7 +13071,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "system-configuration-sys", ] @@ -12890,21 +13094,21 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.7" +version = "0.12.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" +checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" [[package]] name = "tempfile" -version = "3.5.0" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +checksum = "dc02fddf48964c42031a0b3fe0428320ecf3a73c401040fc0096f97794310651" dependencies = [ "cfg-if", - "fastrand", + "fastrand 2.0.0", "redox_syscall 0.3.5", - "rustix 0.37.19", - "windows-sys 0.45.0", + "rustix 0.38.8", + "windows-sys 0.48.0", ] [[package]] @@ -12956,22 +13160,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "d9207952ae1a003f42d3d5e892dac3c6ba42aa6ac0c79a6a91a2b5cb4253e75c" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "f1728216d3244de4f14f14f8c15c79be1a7c67867d28d69b719690e2a19fb445" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] @@ -13014,9 +13218,9 @@ dependencies = [ [[package]] name = "tikv-jemalloc-ctl" -version = "0.5.0" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e37706572f4b151dff7a0146e040804e9c26fe3a3118591112f05cf12a4216c1" +checksum = "619bfed27d807b54f7f776b9430d4f8060e66ee138a28632ca898584d462c31c" dependencies = [ "libc", "paste", @@ -13025,9 +13229,9 @@ dependencies = [ [[package]] name = "tikv-jemalloc-sys" -version = "0.5.3+5.3.0-patched" +version = "0.5.4+5.3.0-patched" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a678df20055b43e57ef8cddde41cdfda9a3c1a060b67f4c5836dfb1d78543ba8" +checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1" dependencies = [ "cc", "libc", @@ -13046,10 +13250,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.21" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" +checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea" dependencies = [ + "deranged", "itoa", "serde", "time-core", @@ -13064,9 +13269,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.9" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" dependencies = [ "time-core", ] @@ -13083,7 +13288,7 @@ dependencies = [ "pbkdf2 0.11.0", "rand 0.8.5", "rustc-hash", - "sha2 0.10.6", + "sha2 0.10.7", "thiserror", "unicode-normalization", "wasm-bindgen", @@ -13126,19 +13331,19 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.2" +version = "1.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" +checksum = "40de3a2ba249dcb097e01be5e67a5ff53cf250397715a071a81543e8a832a920" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", "mio", "num_cpus", "parking_lot 0.12.1", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.12", "signal-hook-registry", - "socket2", + "socket2 0.5.3", "tokio-macros", "windows-sys 0.48.0", ] @@ -13151,7 +13356,18 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", +] + +[[package]] +name = "tokio-retry" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" +dependencies = [ + "pin-project", + "rand 0.8.5", + "tokio", ] [[package]] @@ -13172,7 +13388,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.12", "tokio", "tokio-util", ] @@ -13187,7 +13403,7 @@ dependencies = [ "futures-core", "futures-io", "futures-sink", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.12", "tokio", "tracing", ] @@ -13203,9 +13419,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" +checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" dependencies = [ "serde", "serde_spanned", @@ -13215,20 +13431,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.10" +version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" +checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ - "indexmap", + "indexmap 2.0.0", "serde", "serde_spanned", "toml_datetime", @@ -13248,18 +13464,18 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.3.5" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" +checksum = "55ae70283aba8d2a8b411c695c437fe25b8b5e44e23e780662002fc72fb47a82" dependencies = [ - "bitflags", + "bitflags 2.4.0", "bytes", "futures-core", "futures-util", "http", "http-body", "http-range-header", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.12", "tower-layer", "tower-service", ] @@ -13284,20 +13500,20 @@ checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if", "log", - "pin-project-lite 0.2.9", + "pin-project-lite 0.2.12", "tracing-attributes", "tracing-core", ] [[package]] name = "tracing-attributes" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] @@ -13322,8 +13538,8 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "polkadot-node-jaeger", "polkadot-primitives", @@ -13333,14 +13549,14 @@ dependencies = [ [[package]] name = "tracing-gum-proc-macro" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "expander 2.0.0", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] @@ -13449,7 +13665,7 @@ dependencies = [ "lazy_static", "rand 0.8.5", "smallvec", - "socket2", + "socket2 0.4.9", "thiserror", "tinyvec", "tokio", @@ -13486,7 +13702,7 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42#569aae5341ea0c1d10426fa1ec13a36c0b64393b" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43#5e49f6e44820affccaf517fd22af564f4b495d40" dependencies = [ "async-trait", "clap", @@ -13517,7 +13733,7 @@ dependencies = [ "sp-version", "sp-weights", "substrate-rpc-client", - "zstd 0.12.3+zstd.1.5.2", + "zstd 0.12.4", ] [[package]] @@ -13599,9 +13815,9 @@ dependencies = [ [[package]] name = "ucd-trie" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "uint" @@ -13623,9 +13839,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" @@ -13650,7 +13866,7 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "unique-node" -version = "0.9.42" +version = "0.9.43" dependencies = [ "app-promotion-rpc", "clap", @@ -13670,9 +13886,11 @@ dependencies = [ "fc-rpc", "fc-rpc-core", "fp-rpc", + "fp-storage", "frame-benchmarking", "frame-benchmarking-cli", "futures", + "jsonrpsee", "log", "opal-runtime", "pallet-transaction-payment-rpc-runtime-api", @@ -13690,6 +13908,7 @@ dependencies = [ "sc-executor", "sc-network", "sc-network-sync", + "sc-rpc", "sc-service", "sc-sysinfo", "sc-telemetry", @@ -13735,9 +13954,9 @@ dependencies = [ "fp-rpc", "fp-storage", "jsonrpsee", + "pallet-ethereum", "pallet-transaction-payment-rpc", "sc-client-api", - "sc-consensus-grandpa", "sc-network", "sc-network-sync", "sc-rpc", @@ -13759,7 +13978,7 @@ dependencies = [ [[package]] name = "unique-runtime" -version = "0.9.42" +version = "0.9.43" dependencies = [ "app-promotion-rpc", "cumulus-pallet-aura-ext", @@ -13785,7 +14004,7 @@ dependencies = [ "hex-literal", "impl-trait-for-tuples", "log", - "num_enum", + "num_enum 0.5.11", "orml-tokens", "orml-traits", "orml-vesting", @@ -13798,8 +14017,10 @@ dependencies = [ "pallet-balances-adapter", "pallet-base-fee", "pallet-collator-selection", + "pallet-collective", "pallet-common", "pallet-configuration", + "pallet-democracy", "pallet-ethereum", "pallet-evm", "pallet-evm-coder-substrate", @@ -13809,12 +14030,17 @@ dependencies = [ "pallet-evm-transaction-payment", "pallet-foreign-assets", "pallet-fungible", + "pallet-gov-origins", "pallet-identity 4.0.0-dev", "pallet-inflation", "pallet-maintenance", + "pallet-membership", "pallet-nonfungible", "pallet-preimage", + "pallet-ranked-collective", + "pallet-referenda", "pallet-refungible", + "pallet-scheduler", "pallet-session", "pallet-state-trie-migration", "pallet-structure", @@ -13826,6 +14052,7 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api", "pallet-treasury", "pallet-unique", + "pallet-utility", "pallet-xcm", "parachain-info", "parity-scale-codec", @@ -13898,7 +14125,7 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "up-common" -version = "0.9.42" +version = "0.9.43" dependencies = [ "cumulus-primitives-core", "fp-rpc", @@ -13916,6 +14143,7 @@ version = "0.2.2" dependencies = [ "bondrewd", "derivative", + "evm-coder", "frame-support", "pallet-evm", "parity-scale-codec", @@ -13957,7 +14185,7 @@ dependencies = [ [[package]] name = "up-sponsorship" version = "0.1.0" -source = "git+https://github.com/uniquenetwork/pallet-sponsoring?branch=polkadot-v0.9.42#be3a4a92920866f234c66eff18df9c624bb7dfc4" +source = "git+https://github.com/uniquenetwork/pallet-sponsoring?branch=polkadot-v0.9.43#bd6e4a2a97b1415c22f96512b857d9615cbe2f81" dependencies = [ "impl-trait-for-tuples", ] @@ -13981,11 +14209,11 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.3.3" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345444e32442451b267fc254ae85a209c64be56d2890e601a0c37ff0c3c5ecd2" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" dependencies = [ - "getrandom 0.2.9", + "getrandom 0.2.10", ] [[package]] @@ -14039,11 +14267,10 @@ dependencies = [ [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -14067,9 +14294,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -14077,24 +14304,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.36" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d1985d03709c53167ce907ff394f5316aa22cb4e12761295c5dc57dacb6297e" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ "cfg-if", "js-sys", @@ -14104,9 +14331,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -14114,22 +14341,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "wasm-instrument" @@ -14142,9 +14369,9 @@ dependencies = [ [[package]] name = "wasm-opt" -version = "0.111.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a303793cbc01fb96551badfc7367db6007396bba6bac97936b3c8b6f7fdb41" +checksum = "87fef6d0d508f08334e0ab0e6877feb4c0ecb3956bcf2cb950699b22fedf3e9c" dependencies = [ "anyhow", "libc", @@ -14158,9 +14385,9 @@ dependencies = [ [[package]] name = "wasm-opt-cxx-sys" -version = "0.111.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c9deb56f8a9f2ec177b3bd642a8205621835944ed5da55f2388ef216aca5a4" +checksum = "bc816bbc1596c8f2e8127e137a760c798023ef3d378f2ae51f0f1840e2dfa445" dependencies = [ "anyhow", "cxx", @@ -14170,15 +14397,14 @@ dependencies = [ [[package]] name = "wasm-opt-sys" -version = "0.111.0" +version = "0.112.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4432e28b542738a9776cedf92e8a99d8991c7b4667ee2c7ccddfb479dd2856a7" +checksum = "40199e4f68ef1071b3c6d0bd8026a12b481865d4b9e49c156932ea9a6234dd14" dependencies = [ "anyhow", "cc", "cxx", "cxx-build", - "regex", ] [[package]] @@ -14227,32 +14453,31 @@ dependencies = [ "memory_units", "num-rational", "num-traits", - "region", ] [[package]] name = "wasmparser" -version = "0.100.0" +version = "0.102.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64b20236ab624147dfbb62cf12a19aaf66af0e41b8398838b66e997d07d269d4" +checksum = "48134de3d7598219ab9eaf6b91b15d8e50d31da76b8519fe4ecfcec2cf35104b" dependencies = [ - "indexmap", + "indexmap 1.9.3", "url", ] [[package]] name = "wasmtime" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a222f5fa1e14b2cefc286f1b68494d7a965f4bf57ec04c59bb62673d639af6" +checksum = "f907fdead3153cb9bfb7a93bbd5b62629472dc06dee83605358c64c52ed3dda9" dependencies = [ "anyhow", "bincode", "cfg-if", - "indexmap", + "indexmap 1.9.3", "libc", "log", - "object 0.29.0", + "object 0.30.4", "once_cell", "paste", "psm", @@ -14265,43 +14490,43 @@ dependencies = [ "wasmtime-environ", "wasmtime-jit", "wasmtime-runtime", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-asm-macros" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4407a7246e7d2f3d8fb1cf0c72fda8dbafdb6dd34d555ae8bea0e5ae031089cc" +checksum = "d3b9daa7c14cd4fa3edbf69de994408d5f4b7b0959ac13fa69d465f6597f810d" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ceb3adf61d654be0be67fffdce42447b0880481348785be5fe40b5dd7663a4c" +checksum = "c86437fa68626fe896e5afc69234bb2b5894949083586535f200385adfd71213" dependencies = [ "anyhow", - "base64 0.13.1", + "base64 0.21.2", "bincode", "directories-next", "file-per-thread-logger", "log", - "rustix 0.36.14", + "rustix 0.36.15", "serde", - "sha2 0.10.6", + "sha2 0.10.7", "toml 0.5.11", - "windows-sys 0.42.0", + "windows-sys 0.45.0", "zstd 0.11.2+zstd.1.5.2", ] [[package]] name = "wasmtime-cranelift" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c366bb8647e01fd08cb5589976284b00abfded5529b33d7e7f3f086c68304a4" +checksum = "b1cefde0cce8cb700b1b21b6298a3837dba46521affd7b8c38a9ee2c869eee04" dependencies = [ "anyhow", "cranelift-codegen", @@ -14309,27 +14534,43 @@ dependencies = [ "cranelift-frontend", "cranelift-native", "cranelift-wasm", - "gimli 0.26.2", + "gimli", "log", - "object 0.29.0", + "object 0.30.4", "target-lexicon", "thiserror", "wasmparser", + "wasmtime-cranelift-shared", + "wasmtime-environ", +] + +[[package]] +name = "wasmtime-cranelift-shared" +version = "8.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd041e382ef5aea1b9fc78442394f1a4f6d676ce457e7076ca4cb3f397882f8b" +dependencies = [ + "anyhow", + "cranelift-codegen", + "cranelift-native", + "gimli", + "object 0.30.4", + "target-lexicon", "wasmtime-environ", ] [[package]] name = "wasmtime-environ" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b8b50962eae38ee319f7b24900b7cf371f03eebdc17400c1dc8575fc10c9a7" +checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" dependencies = [ "anyhow", "cranelift-entity", - "gimli 0.26.2", - "indexmap", + "gimli", + "indexmap 1.9.3", "log", - "object 0.29.0", + "object 0.30.4", "serde", "target-lexicon", "thiserror", @@ -14339,18 +14580,18 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffaed4f9a234ba5225d8e64eac7b4a5d13b994aeb37353cde2cbeb3febda9eaa" +checksum = "0de48df552cfca1c9b750002d3e07b45772dd033b0b206d5c0968496abf31244" dependencies = [ - "addr2line 0.17.0", + "addr2line 0.19.0", "anyhow", "bincode", "cfg-if", "cpp_demangle", - "gimli 0.26.2", + "gimli", "log", - "object 0.29.0", + "object 0.30.4", "rustc-demangle", "serde", "target-lexicon", @@ -14358,60 +14599,60 @@ dependencies = [ "wasmtime-jit-debug", "wasmtime-jit-icache-coherence", "wasmtime-runtime", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-jit-debug" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed41cbcbf74ce3ff6f1d07d1b707888166dc408d1a880f651268f4f7c9194b2" +checksum = "6e0554b84c15a27d76281d06838aed94e13a77d7bf604bbbaf548aa20eb93846" dependencies = [ - "object 0.29.0", + "object 0.30.4", "once_cell", - "rustix 0.36.14", + "rustix 0.36.15", ] [[package]] name = "wasmtime-jit-icache-coherence" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a28ae1e648461bfdbb79db3efdaee1bca5b940872e4175390f465593a2e54c" +checksum = "aecae978b13f7f67efb23bd827373ace4578f2137ec110bbf6a4a7cde4121bbd" dependencies = [ "cfg-if", "libc", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-runtime" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e704b126e4252788ccfc3526d4d4511d4b23c521bf123e447ac726c14545217b" +checksum = "658cf6f325232b6760e202e5255d823da5e348fdea827eff0a2a22319000b441" dependencies = [ "anyhow", "cc", "cfg-if", - "indexmap", + "indexmap 1.9.3", "libc", "log", "mach", "memfd", - "memoffset 0.6.5", + "memoffset 0.8.0", "paste", "rand 0.8.5", - "rustix 0.36.14", + "rustix 0.36.15", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "wasmtime-types" -version = "6.0.2" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83e5572c5727c1ee7e8f28717aaa8400e4d22dcbd714ea5457d85b5005206568" +checksum = "a4f6fffd2a1011887d57f07654dd112791e872e3ff4a2e626aee8059ee17f06f" dependencies = [ "cranelift-entity", "serde", @@ -14421,9 +14662,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.63" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", @@ -14481,10 +14722,10 @@ dependencies = [ "sdp", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.7", "stun", "thiserror", - "time 0.3.21", + "time 0.3.25", "tokio", "turn", "url", @@ -14544,7 +14785,7 @@ dependencies = [ "sec1 0.3.0", "serde", "sha1", - "sha2 0.10.6", + "sha2 0.10.7", "signature 1.6.4", "subtle", "thiserror", @@ -14586,7 +14827,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f08dfd7a6e3987e255c4dbe710dde5d94d0f0574f8a21afa95d171376c143106" dependencies = [ "log", - "socket2", + "socket2 0.4.9", "thiserror", "tokio", "webrtc-util", @@ -14653,7 +14894,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f1db1727772c05cf7a2cfece52c3aca8045ca1e176cd517d323489aa3c6d87" dependencies = [ "async-trait", - "bitflags", + "bitflags 1.3.2", "bytes", "cc", "ipnet", @@ -14669,8 +14910,8 @@ dependencies = [ [[package]] name = "westend-runtime" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "bitvec", "frame-benchmarking", @@ -14695,10 +14936,11 @@ dependencies = [ "pallet-elections-phragmen", "pallet-fast-unstake", "pallet-grandpa", - "pallet-identity 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.42)", + "pallet-identity 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.43)", "pallet-im-online", "pallet-indices", "pallet-membership", + "pallet-message-queue", "pallet-multisig", "pallet-nomination-pools", "pallet-nomination-pools-benchmarking", @@ -14761,8 +15003,8 @@ dependencies = [ [[package]] name = "westend-runtime-constants" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "frame-support", "polkadot-primitives", @@ -14786,9 +15028,9 @@ dependencies = [ [[package]] name = "wide" -version = "0.7.9" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cd0496a71f3cc6bc4bf0ed91346426a5099e93d89807e663162dc5a1069ff65" +checksum = "aa469ffa65ef7e0ba0f164183697b89b854253fd31aeb92358b7b6155177d62f" dependencies = [ "bytemuck", "safe_arch", @@ -14796,9 +15038,9 @@ dependencies = [ [[package]] name = "widestring" -version = "0.5.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17882f045410753661207383517a6f62ec3dbeb6a4ed2acce01f0728238d1983" +checksum = "653f141f39ec16bba3c5abe400a0c60da7468261cc2cbf36805022876bc721a8" [[package]] name = "winapi" @@ -14850,22 +15092,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.0", -] - -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets 0.48.2", ] [[package]] @@ -14883,7 +15110,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.2", ] [[package]] @@ -14903,17 +15130,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "d1eeca1c172a285ee6c2c84c341ccea837e7c01b12fbb2d0fe3c9e550ce49ec8" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.2", + "windows_aarch64_msvc 0.48.2", + "windows_i686_gnu 0.48.2", + "windows_i686_msvc 0.48.2", + "windows_x86_64_gnu 0.48.2", + "windows_x86_64_gnullvm 0.48.2", + "windows_x86_64_msvc 0.48.2", ] [[package]] @@ -14924,9 +15151,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "b10d0c968ba7f6166195e13d593af609ec2e3d24f916f081690695cf5eaffb2f" [[package]] name = "windows_aarch64_msvc" @@ -14942,9 +15169,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "571d8d4e62f26d4932099a9efe89660e8bd5087775a2ab5cdd8b747b811f1058" [[package]] name = "windows_i686_gnu" @@ -14960,9 +15187,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "2229ad223e178db5fbbc8bd8d3835e51e566b8474bfca58d2e6150c48bb723cd" [[package]] name = "windows_i686_msvc" @@ -14978,9 +15205,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "600956e2d840c194eedfc5d18f8242bc2e17c7775b6684488af3a9fff6fe3287" [[package]] name = "windows_x86_64_gnu" @@ -14996,9 +15223,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "ea99ff3f8b49fb7a8e0d305e5aec485bd068c2ba691b6e277d29eaeac945868a" [[package]] name = "windows_x86_64_gnullvm" @@ -15008,9 +15235,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "8f1a05a1ece9a7a0d5a7ccf30ba2c33e3a61a30e042ffd247567d1de1d94120d" [[package]] name = "windows_x86_64_msvc" @@ -15026,26 +15253,27 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "d419259aba16b663966e29e6d7c6ecfa0bb8425818bb96f6f1f3c3eb71a6e7b9" [[package]] name = "winnow" -version = "0.4.6" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" +checksum = "1e461589e194280efaa97236b73623445efa195aa633fd7004f39805707a9d53" dependencies = [ "memchr", ] [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if", + "windows-sys 0.48.0", ] [[package]] @@ -15095,7 +15323,7 @@ dependencies = [ "ring", "rusticata-macros", "thiserror", - "time 0.3.21", + "time 0.3.25", ] [[package]] @@ -15113,13 +15341,13 @@ dependencies = [ "oid-registry 0.6.1", "rusticata-macros", "thiserror", - "time 0.3.21", + "time 0.3.25", ] [[package]] name = "xcm" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "bounded-collections", "derivative", @@ -15134,8 +15362,8 @@ dependencies = [ [[package]] name = "xcm-builder" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "frame-support", "frame-system", @@ -15149,14 +15377,15 @@ dependencies = [ "sp-io", "sp-runtime", "sp-std", + "sp-weights", "xcm", "xcm-executor", ] [[package]] name = "xcm-executor" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "environmental", "frame-benchmarking", @@ -15175,13 +15404,13 @@ dependencies = [ [[package]] name = "xcm-procedural" -version = "0.9.42" -source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.42#9b1fc27cec47f01a2c229532ee7ab79cc5bb28ef" +version = "0.9.43" +source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.43#ba42b9ce51d25bdaf52d2c61e0763a6e3da50d25" dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] @@ -15204,7 +15433,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.21", + "time 0.3.25", ] [[package]] @@ -15224,7 +15453,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.28", ] [[package]] @@ -15238,11 +15467,11 @@ dependencies = [ [[package]] name = "zstd" -version = "0.12.3+zstd.1.5.2" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76eea132fb024e0e13fd9c2f5d5d595d8a967aa72382ac2f9d39fcc95afd0806" +checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" dependencies = [ - "zstd-safe 6.0.5+zstd.1.5.4", + "zstd-safe 6.0.6", ] [[package]] @@ -15257,9 +15486,9 @@ dependencies = [ [[package]] name = "zstd-safe" -version = "6.0.5+zstd.1.5.4" +version = "6.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56d9e60b4b1758206c238a10165fbcae3ca37b01744e394c463463f6529d23b" +checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" dependencies = [ "libc", "zstd-sys", diff --git a/Cargo.toml b/Cargo.toml index 10c55da2a4..5aeeb8bc53 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ members = [ 'runtime/tests', 'runtime/unique', ] -package.version = "0.9.42" +package.version = "0.9.43" resolver = "2" [profile.release] @@ -27,10 +27,12 @@ opt-level = 3 [workspace.dependencies] # Unique app-promotion-rpc = { path = "primitives/app_promotion_rpc", default-features = false } -evm-coder = { git = "https://github.com/uniquenetwork/evm-coder", tag = "v0.3.1", default-features = false } +evm-coder = { version = "0.4.2", default-features = false, features = [ + 'bondrewd', +] } pallet-app-promotion = { path = "pallets/app-promotion", default-features = false } pallet-balances-adapter = { default-features = false, path = "pallets/balances-adapter" } -pallet-charge-transaction = { package = "pallet-template-transaction-payment", default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.42" } +pallet-charge-transaction = { package = "pallet-template-transaction-payment", default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.43" } pallet-collator-selection = { default-features = false, path = "pallets/collator-selection" } pallet-common = { default-features = false, path = "pallets/common" } pallet-configuration = { default-features = false, path = "pallets/configuration" } @@ -40,6 +42,7 @@ pallet-evm-migration = { path = "pallets/evm-migration", default-features = fals pallet-evm-transaction-payment = { path = "pallets/evm-transaction-payment", default-features = false } pallet-foreign-assets = { default-features = false, path = "pallets/foreign-assets" } pallet-fungible = { default-features = false, path = "pallets/fungible" } +pallet-gov-origins = { default-features = false, path = "pallets/gov-origins" } pallet-identity = { default-features = false, path = "pallets/identity" } pallet-inflation = { path = "pallets/inflation", default-features = false } pallet-maintenance = { default-features = false, path = "pallets/maintenance" } @@ -57,7 +60,7 @@ up-common = { path = "primitives/common", default-features = false } up-data-structs = { path = "primitives/data-structs", default-features = false } up-pov-estimate-rpc = { path = "primitives/pov-estimate-rpc", default-features = false } up-rpc = { path = "primitives/rpc", default-features = false } -up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.42" } +up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.43" } # Unique: Runtimes opal-runtime = { path = "runtime/opal" } @@ -65,130 +68,137 @@ quartz-runtime = { path = "runtime/quartz" } unique-runtime = { path = "runtime/unique" } # Frontier (Unique patches over the Parity version) -fc-consensus = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.42" } -fc-db = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.42" } -fc-mapping-sync = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.42" } -fc-rpc = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.42" } -fc-rpc-core = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.42" } -fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.42" } -fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.42" } -fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.42" } -fp-storage = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.42" } -pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.42" } -pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.42" } -pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.42" } -pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.42" } +fc-consensus = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" } +fc-db = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" } +fc-mapping-sync = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" } +fc-rpc = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" } +fc-rpc-core = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" } +fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" } +fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" } +fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" } +fp-storage = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" } +pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" } +pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" } +pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" } +pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.43" } # Parity codec = { default-features = false, features = ['derive'], package = 'parity-scale-codec', version = "3.2.2" } -cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-pallet-aura-ext = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-pallet-dmp-queue = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-pallet-parachain-system = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-pallet-xcm = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-pallet-xcmp-queue = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-primitives-core = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-primitives-timestamp = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-primitives-utility = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -frame-executive = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -pallet-aura = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -pallet-authorship = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -pallet-preimage = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -pallet-session = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -pallet-state-trie-migration = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -pallet-sudo = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -pallet-treasury = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42", default-features = false } -parachain-info = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.42" } -polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42" } -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42", default-features = false } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42" } -polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42" } -sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-consensus-manual-seal = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } +cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +cumulus-pallet-aura-ext = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +cumulus-pallet-dmp-queue = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +cumulus-pallet-parachain-system = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +cumulus-pallet-xcm = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +cumulus-pallet-xcmp-queue = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +cumulus-primitives-core = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +cumulus-primitives-timestamp = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +cumulus-primitives-utility = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +frame-executive = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +pallet-aura = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +pallet-authorship = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +pallet-collective = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +pallet-democracy = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +pallet-membership = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +pallet-preimage = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +pallet-ranked-collective = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +pallet-referenda = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +pallet-scheduler = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +pallet-session = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +pallet-state-trie-migration = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +pallet-sudo = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +pallet-utility = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +pallet-treasury = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43", default-features = false } +parachain-info = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.43" } +parity-scale-codec = { version = "3.2.2", features = ["derive"], default-features = false } +polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43", default-features = false } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } +polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43" } +sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-consensus-manual-seal = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } scale-info = { version = "2.1.1", default-features = false, features = ["derive"] } -sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-arithmetic = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-block-builder = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-consensus-aura = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-inherents = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-offchain = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-session = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-staking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-transaction-pool = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-trie = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -sp-version = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42", default-features = false } -xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42", default-features = false } -xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.42", default-features = false } +sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-arithmetic = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-block-builder = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-consensus-aura = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-inherents = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-offchain = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-session = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-staking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-transaction-pool = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-trie = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +sp-version = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43", default-features = false } +xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43", default-features = false } +xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.43", default-features = false } # Parity: Build utils -substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } +substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } # Parity: Benchmarking -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } # Parity: Try Runtime -frame-try-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } -try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } +frame-try-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } +try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } # ORML -orml-tokens = { default-features = false, git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "polkadot-v0.9.42" } -orml-traits = { default-features = false, git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "polkadot-v0.9.42" } -orml-vesting = { default-features = false, git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "polkadot-v0.9.42" } -orml-xcm-support = { default-features = false, git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "polkadot-v0.9.42" } -orml-xtokens = { default-features = false, git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "polkadot-v0.9.42" } +orml-tokens = { default-features = false, git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } +orml-traits = { default-features = false, git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } +orml-vesting = { default-features = false, git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } +orml-xcm-support = { default-features = false, git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } +orml-xtokens = { default-features = false, git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } # Other derivative = { version = "2.2.0", features = ["use_core"] } ethereum = { version = "0.14.0", default-features = false } -evm-core = { default-features = false, version = "0.37.0" } +evm-core = { git = "https://github.com/rust-blockchain/evm", rev = "b7b82c7e1fc57b7449d6dfa6826600de37cc1e65", default-features = false } hex-literal = "0.4.1" impl-trait-for-tuples = "0.2.2" jsonrpsee = { version = "0.16.2", features = ["macros", "server"] } diff --git a/Makefile b/Makefile index d870898f25..9a72a1d0cf 100644 --- a/Makefile +++ b/Makefile @@ -166,4 +166,4 @@ check: .PHONY: clippy clippy: - SKIP_WASM_BUILD=1 cargo clippy --features=quartz-runtime,unique-runtime,try-runtime,runtime-benchmarks --tests + cargo clippy --features=quartz-runtime,unique-runtime,try-runtime,runtime-benchmarks --tests diff --git a/README.md b/README.md index 868d3a4650..78703a74c6 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,12 @@ If you are building an application that operates NFT tokens, use [this document] Building Unique chain requires special versions of Rust and toolchain. We don't use the most recent versions of everything so that we can keep the builds stable. +*Windows note: We do not provide support for Windows systems and don't test the Unique chain on them. +Nonetheless, the Unique chain node might work on Windows. To build it on Windows, you need to enable symlink support in Git:* +``` +git config --global core.symlinks true +``` + 1. Install Rust: ```bash @@ -90,7 +96,7 @@ git checkout unique-network ``` git clone https://github.com/paritytech/polkadot.git cd polkadot -git checkout release-v0.9.42 +git checkout release-v0.9.43 cargo build --release ``` diff --git a/client/rpc/src/lib.rs b/client/rpc/src/lib.rs index 5cc90a2a66..b861f186e5 100644 --- a/client/rpc/src/lib.rs +++ b/client/rpc/src/lib.rs @@ -432,16 +432,15 @@ where keys: Option> ) -> Vec, unique_api); - pass_method!( - token_data( - collection: CollectionId, - token_id: TokenId, - - #[map = string_keys_to_bytes_keys] - keys: Option>, - ) -> TokenData, unique_api; - changed_in 3, token_data_before_version_3(collection, token_id, string_keys_to_bytes_keys(keys)) => |value| Ok(value.into()) - ); + fn token_data( + &self, + collection: CollectionId, + token_id: TokenId, + keys: Option>, + at: Option<::Hash>, + ) -> Result> { + token_data_internal(self.client.clone(), collection, token_id, keys, at) + } pass_method!(adminlist(collection: CollectionId) -> Vec, unique_api); pass_method!(allowlist(collection: CollectionId) -> Vec, unique_api); @@ -497,6 +496,55 @@ where .collect::>(), app_promotion_api); } +fn token_data_internal( + client: Arc, + collection: CollectionId, + token_id: TokenId, + keys: Option>, + at: Option<::Hash>, +) -> Result> +where + AccountId: Decode, + Block: BlockT, + Client: ProvideRuntimeApi + HeaderBackend, + Client::Api: UniqueRuntimeApi, + CrossAccountId: pallet_evm::account::CrossAccountId, +{ + let api = client.runtime_api(); + let at = at.unwrap_or_else(|| client.info().best_hash); + let api_version = if let Ok(Some(api_version)) = + api.api_version::>(at) + { + api_version + } else { + return Err(anyhow!("api is not available").into()); + }; + let result = if api_version >= 3 { + api.token_data(at, collection, token_id, string_keys_to_bytes_keys(keys)) + } else { + #[allow(deprecated)] + api.token_data_before_version_3(at, collection, token_id, string_keys_to_bytes_keys(keys)) + .map( + |r: sc_service::Result< + up_data_structs::TokenDataVersion1, + sp_runtime::DispatchError, + >| r.map(|value| value.into()), + ) + .or_else(|_| { + Ok(api + .token_owner(at, collection, token_id)? + .map(|owner| TokenData { + properties: Vec::new(), + owner, + pieces: 0, + })) + }) + }; + Ok(result + .map_err(|e| anyhow!("unable to query: {e}"))? + .map_err(|e| anyhow!("runtime error: {e:?}"))?) +} + fn string_keys_to_bytes_keys(keys: Option>) -> Option>> { keys.map(|keys| keys.into_iter().map(|key| key.into_bytes()).collect()) } diff --git a/launch-config-full.json b/launch-config-full.json deleted file mode 100644 index d8a03272f6..0000000000 --- a/launch-config-full.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "relaychain": { - "bin": "../polkadot/target/release/polkadot", - "chain": "westend-local", - "nodes": [ - { - "name": "alice", - "wsPort": 9844, - "rpcPort": 9843, - "port": 30444, - "flags": [ - "-lparachain::candidate_validation=debug", - "-lxcm=trace" - ] - }, - { - "name": "bob", - "wsPort": 9855, - "rpcPort": 9854, - "port": 30555, - "flags": [ - "-lparachain::candidate_validation=debug", - "-lxcm=trace" - ] - }, - { - "name": "charlie", - "wsPort": 9866, - "rpcPort": 9865, - "port": 30666, - "flags": [ - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "dave", - "wsPort": 9877, - "rpcPort": 9876, - "port": 30777, - "flags": [ - "-lparachain::candidate_validation=debug" - ] - }, - { - "name": "eve", - "wsPort": 9888, - "rpcPort": 9887, - "port": 30888, - "flags": [ - "-lparachain::candidate_validation=debug" - ] - } - ], - "genesis": { - "runtime": { - "runtime_genesis_config": { - "parachainsConfiguration": { - "config": { - "validation_upgrade_frequency": 1, - "validation_upgrade_delay": 1 - } - } - } - } - } - }, - "parachains": [ - { - "bin": "../unique-chain/target/release/unique-collator", - "id": "1000", - "balance": "1000000000000000000000000", - "nodes": [ - { - "port": 31200, - "wsPort": 9944, - "rpcPort": 9933, - "name": "alice", - "flags": [ - "--rpc-cors=all", - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lxcm=trace" - ] - }, - { - "port": 31201, - "wsPort": 9945, - "rpcPort": 9934, - "name": "bob", - "flags": [ - "--rpc-cors=all", - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lxcm=trace" - ] - } - ] - }, - { - "bin": "../Acala/target/release/acala", - "id": "2000", - "chain": "karura-dev", - "balance": "1000000000000000000000", - "nodes": [ - { - "wsPort": 9946, - "port": 31202, - "name": "alice", - "flags": [ - "--rpc-cors=all", - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lxcm=trace" - ] - } - ] - } - ], - "simpleParachains": [], - "hrmpChannels": [ - { - "sender": 2000, - "recipient": 1000, - "maxCapacity": 8, - "maxMessageSize": 512 - }, - { - "sender": 1000, - "recipient": 2000, - "maxCapacity": 8, - "maxMessageSize": 512 - } - ], - "finalization": false -} diff --git a/launch-config.json b/launch-config.json deleted file mode 100644 index 90fb73e0fd..0000000000 --- a/launch-config.json +++ /dev/null @@ -1,157 +0,0 @@ -{ - "relaychain": { - "bin": "../polkadot/target/release/polkadot", - "chain": "rococo-local", - "nodes": [ - { - "name": "alice", - "wsPort": 9844, - "rpcPort": 9843, - "port": 30444, - "flags": [ - "-lparachain::candidate_validation=debug", - "-lxcm=trace", - "--rpc-cors=all", - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - }, - { - "name": "bob", - "wsPort": 9855, - "rpcPort": 9854, - "port": 30555, - "flags": [ - "-lparachain::candidate_validation=debug", - "-lxcm=trace", - "--rpc-cors=all", - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - }, - { - "name": "charlie", - "wsPort": 9866, - "rpcPort": 9865, - "port": 30666, - "flags": [ - "-lparachain::candidate_validation=debug", - "-lxcm=trace", - "--rpc-cors=all", - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - }, - { - "name": "dave", - "wsPort": 9877, - "rpcPort": 9876, - "port": 30777, - "flags": [ - "-lparachain::candidate_validation=debug", - "-lxcm=trace", - "--rpc-cors=all", - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - }, - { - "name": "eve", - "wsPort": 9888, - "rpcPort": 9887, - "port": 30888, - "flags": [ - "-lparachain::candidate_validation=debug", - "-lxcm=trace", - "--rpc-cors=all", - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - } - ], - "genesis": { - "runtime": { - "runtime_genesis_config": { - "parachainsConfiguration": { - "config": { - "validation_upgrade_frequency": 1, - "validation_upgrade_delay": 1 - } - } - } - } - } - }, - "parachains": [ - { - "bin": "../unique-chain/target/release/unique-collator", - "id": 1000, - "balance": "1000000000000000000000000", - "nodes": [ - { - "port": 31200, - "wsPort": 9944, - "rpcPort": 9933, - "name": "alice", - "flags": [ - "--rpc-cors=all", - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lxcm=trace" - ] - }, - { - "port": 31201, - "wsPort": 9945, - "rpcPort": 9934, - "name": "bob", - "flags": [ - "--rpc-cors=all", - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lxcm=trace" - ] - }, - { - "port": 31202, - "wsPort": 9946, - "rpcPort": 9935, - "name": "charlie", - "flags": [ - "--rpc-cors=all", - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lxcm=trace" - ] - }, - { - "port": 31203, - "wsPort": 9947, - "rpcPort": 9936, - "name": "dave", - "flags": [ - "--rpc-cors=all", - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lxcm=trace" - ] - }, - { - "port": 31204, - "wsPort": 9948, - "rpcPort": 9937, - "name": "eve", - "flags": [ - "--rpc-cors=all", - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lxcm=trace" - ] - } - ] - } - ], - "simpleParachains": [], - "hrmpChannels": [], - "finalization": false -} diff --git a/launch-testnet-full.sh b/launch-testnet-full.sh deleted file mode 100755 index 092e216f11..0000000000 --- a/launch-testnet-full.sh +++ /dev/null @@ -1,6 +0,0 @@ -cp launch-config-full.json ../polkadot-launch/launch-config-full.json - -cd ../polkadot-launch -yarn install -yarn build -yarn start launch-config-full.json diff --git a/launch-testnet.sh b/launch-testnet.sh deleted file mode 100755 index 94b20e0529..0000000000 --- a/launch-testnet.sh +++ /dev/null @@ -1,6 +0,0 @@ -cp launch-config.json ../polkadot-launch/launch-config.json - -cd ../polkadot-launch -yarn install -yarn build -yarn start launch-config.json diff --git a/launch-zombienet.toml b/launch-zombienet.toml deleted file mode 100644 index 7578d8a20d..0000000000 --- a/launch-zombienet.toml +++ /dev/null @@ -1,43 +0,0 @@ -# To launch this zombienet out-of-the-box, run `yarn frankenstein` in the `tests` folder. - -[settings] -provider = "native" - -[relaychain] -# RELAY_DIR is an environment variable. If you're launching ZN from the repository's root, you should likely specify it as ../polkadot/ -default_command = "{{RELAY_DIR}}target/release/polkadot" -default_args = [ "-lparachain::candidate_validation=debug", "-lxcm=trace", ] -chain = "rococo-local" - - [[relaychain.nodes]] - name = "relay-alice" - ws_port = 9844 - rpc_port = 9843 - p2p_port = 30444 - # Zombienet does not grant the default balance to nodes created with [[nodes]]. - balance = 2000000000000 - - [[relaychain.node_groups]] - name = "relay" - count = 4 - -[[parachains]] -id = 1000 - - [[parachains.collators]] - name = "alice" - # PARA_DIR is an environment variable. If you're launching ZN from the repository's root, you should likely specify it as ./ - command = "{{PARA_DIR}}target/release/unique-collator" - ws_port = 9944 - rpc_port = 9933 - p2p_port = 31200 - args = [ "-lxcm=trace", ] - - [[parachains.collators]] - name = "bob" - # PARA_DIR is an environment variable. If you're launching ZN from the repository's root, you should likely specify it as ./ - command = "{{PARA_DIR}}target/release/unique-collator" - ws_port = 9945 - rpc_port = 9934 - p2p_port = 31201 - args = [ "-lxcm=trace", ] diff --git a/node/cli/Cargo.toml b/node/cli/Cargo.toml index e20a87c66c..eadf809978 100644 --- a/node/cli/Cargo.toml +++ b/node/cli/Cargo.toml @@ -21,7 +21,7 @@ targets = ['x86_64-unknown-linux-gnu'] [dependencies] clap = "4.1" -futures = '0.3.17' +futures = '0.3.28' tokio = { version = "1.24", features = ["time"] } serde_json = "1.0" @@ -94,6 +94,9 @@ uc-rpc = { workspace = true } unique-rpc = { workspace = true } up-pov-estimate-rpc = { workspace = true } up-rpc = { workspace = true } +jsonrpsee.workspace = true +fp-storage.workspace = true +sc-rpc.workspace = true [build-dependencies] substrate-build-script-utils = { workspace = true } @@ -105,4 +108,5 @@ pov-estimate = ['opal-runtime/pov-estimate', 'quartz-runtime?/pov-estimate', 'uc runtime-benchmarks = ['opal-runtime/runtime-benchmarks', 'polkadot-cli/runtime-benchmarks', 'polkadot-service/runtime-benchmarks', 'quartz-runtime?/runtime-benchmarks', 'sc-service/runtime-benchmarks', 'unique-runtime?/runtime-benchmarks'] sapphire-runtime = ['quartz-runtime', 'quartz-runtime/become-sapphire'] try-runtime = ['opal-runtime?/try-runtime', 'quartz-runtime?/try-runtime', 'try-runtime-cli/try-runtime', 'unique-runtime?/try-runtime'] -state-version-0 = ['opal-runtime?/state-version-0', 'quartz-runtime?/state-version-0', 'unique-runtime?/state-version-0'] +session-test-timings = ['opal-runtime/session-test-timings', 'quartz-runtime?/session-test-timings', 'unique-runtime?/session-test-timings'] +gov-test-timings = ['opal-runtime/gov-test-timings', 'quartz-runtime?/gov-test-timings', 'unique-runtime?/gov-test-timings'] diff --git a/node/cli/src/chain_spec.rs b/node/cli/src/chain_spec.rs index ced44b649c..92a75f11e4 100644 --- a/node/cli/src/chain_spec.rs +++ b/node/cli/src/chain_spec.rs @@ -168,12 +168,14 @@ macro_rules! testnet_genesis { .collect(), }, common: Default::default(), + configuration: Default::default(), nonfungible: Default::default(), treasury: Default::default(), tokens: TokensConfig { balances: vec![] }, sudo: SudoConfig { key: Some($root_key), }, + vesting: VestingConfig { vesting: vec![] }, parachain_info: ParachainInfoConfig { parachain_id: $id.into(), @@ -206,6 +208,7 @@ macro_rules! testnet_genesis { ethereum: EthereumConfig {}, polkadot_xcm: Default::default(), transaction_payment: Default::default(), + ..Default::default() } }}; } @@ -228,6 +231,7 @@ macro_rules! testnet_genesis { .to_vec(), }, common: Default::default(), + configuration: Default::default(), nonfungible: Default::default(), balances: BalancesConfig { balances: $endowed_accounts @@ -277,7 +281,7 @@ pub fn development_config() -> DefaultChainSpec { // Name format!( "{}{}", - default_runtime::RUNTIME_NAME.to_uppercase(), + default_runtime::VERSION.spec_name.to_uppercase(), if cfg!(feature = "unique-runtime") { "" } else { @@ -286,14 +290,14 @@ pub fn development_config() -> DefaultChainSpec { ) .as_str(), // ID - format!("{}_dev", default_runtime::RUNTIME_NAME).as_str(), + format!("{}_dev", default_runtime::VERSION.spec_name).as_str(), ChainType::Local, move || { testnet_genesis!( default_runtime, // Sudo account get_account_id_from_seed::("Alice"), - vec![ + [ ( get_account_id_from_seed::("Alice"), get_from_seed::("Alice"), @@ -351,7 +355,7 @@ pub fn local_testnet_config() -> DefaultChainSpec { // Name format!( "{}{}", - default_runtime::RUNTIME_NAME.to_uppercase(), + default_runtime::VERSION.impl_name.to_uppercase(), if cfg!(feature = "unique-runtime") { "" } else { @@ -360,14 +364,14 @@ pub fn local_testnet_config() -> DefaultChainSpec { ) .as_str(), // ID - format!("{}_local", default_runtime::RUNTIME_NAME).as_str(), + format!("{}_local", default_runtime::VERSION.spec_name).as_str(), ChainType::Local, move || { testnet_genesis!( default_runtime, // Sudo account get_account_id_from_seed::("Alice"), - vec![ + [ ( get_account_id_from_seed::("Alice"), get_from_seed::("Alice"), diff --git a/node/cli/src/cli.rs b/node/cli/src/cli.rs index 6de8455d81..e9db9fd983 100644 --- a/node/cli/src/cli.rs +++ b/node/cli/src/cli.rs @@ -114,7 +114,7 @@ pub struct RelayChainCli { pub chain_id: Option, /// The base path that should be used by the relay chain. - pub base_path: Option, + pub base_path: PathBuf, } impl RelayChainCli { @@ -125,10 +125,7 @@ impl RelayChainCli { ) -> Self { let extension = chain_spec::Extensions::try_get(&*para_config.chain_spec); let chain_id = extension.map(|e| e.relay_chain.clone()); - let base_path = para_config - .base_path - .as_ref() - .map(|x| x.path().join("polkadot")); + let base_path = para_config.base_path.path().join("polkadot"); Self { base_path, chain_id, diff --git a/node/cli/src/command.rs b/node/cli/src/command.rs index 54b58f45bf..c4be6cbc81 100644 --- a/node/cli/src/command.rs +++ b/node/cli/src/command.rs @@ -59,12 +59,10 @@ use sc_cli::{ ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams, NetworkParams, Result, RuntimeVersion, SharedParams, SubstrateCli, }; -use sc_service::{ - config::{BasePath, PrometheusConfig}, -}; +use sc_service::config::{BasePath, PrometheusConfig}; use sp_core::hexdisplay::HexDisplay; use sp_runtime::traits::{AccountIdConversion, Block as BlockT}; -use std::{net::SocketAddr, time::Duration}; +use std::{time::Duration}; use up_common::types::opaque::{Block, RuntimeId}; @@ -555,14 +553,10 @@ impl DefaultConfigurationValues for RelayChainCli { 30334 } - fn rpc_ws_listen_port() -> u16 { + fn rpc_listen_port() -> u16 { 9945 } - fn rpc_http_listen_port() -> u16 { - 9934 - } - fn prometheus_listen_port() -> u16 { 9616 } @@ -589,19 +583,7 @@ impl CliConfiguration for RelayChainCli { Ok(self .shared_params() .base_path()? - .or_else(|| self.base_path.clone().map(Into::into))) - } - - fn rpc_http(&self, default_listen_port: u16) -> Result> { - self.base.base.rpc_http(default_listen_port) - } - - fn rpc_ipc(&self) -> Result> { - self.base.base.rpc_ipc() - } - - fn rpc_ws(&self, default_listen_port: u16) -> Result> { - self.base.base.rpc_ws(default_listen_port) + .or_else(|| Some(self.base_path.clone().into()))) } fn prometheus_config( @@ -646,8 +628,8 @@ impl CliConfiguration for RelayChainCli { self.base.base.rpc_methods() } - fn rpc_ws_max_connections(&self) -> Result> { - self.base.base.rpc_ws_max_connections() + fn rpc_max_connections(&self) -> Result { + self.base.base.rpc_max_connections() } fn rpc_cors(&self, is_dev: bool) -> Result>> { diff --git a/node/cli/src/service.rs b/node/cli/src/service.rs index 67a4f374cc..02071640e3 100644 --- a/node/cli/src/service.rs +++ b/node/cli/src/service.rs @@ -20,16 +20,19 @@ use std::sync::Mutex; use std::collections::BTreeMap; use std::time::Duration; use std::pin::Pin; +use fc_mapping_sync::EthereumBlockNotificationSinks; +use fc_rpc::EthBlockDataCacheTask; +use fc_rpc::EthTask; use fc_rpc_core::types::FeeHistoryCache; use futures::{ Stream, StreamExt, stream::select, task::{Context, Poll}, }; +use sc_rpc::SubscriptionTaskExecutor; use sp_keystore::KeystorePtr; use tokio::time::Interval; - -use unique_rpc::overrides_handle; +use jsonrpsee::RpcModule; use serde::{Serialize, Deserialize}; @@ -49,23 +52,32 @@ use cumulus_relay_chain_interface::{RelayChainInterface, RelayChainResult}; use cumulus_relay_chain_minimal_node::build_minimal_relay_chain_node; // Substrate Imports -use sp_api::BlockT; +use sp_api::{BlockT, HeaderT, ProvideRuntimeApi, StateBackend}; use sc_executor::NativeElseWasmExecutor; use sc_executor::NativeExecutionDispatch; use sc_network::NetworkBlock; use sc_network_sync::SyncingService; -use sc_service::{BasePath, Configuration, PartialComponents, TaskManager}; +use sc_service::{Configuration, PartialComponents, TaskManager}; use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle}; use sp_runtime::traits::BlakeTwo256; use substrate_prometheus_endpoint::Registry; -use sc_client_api::BlockchainEvents; +use sc_client_api::{BlockchainEvents, BlockOf, Backend, AuxStore, StorageProvider}; +use sp_blockchain::{HeaderBackend, HeaderMetadata, Error as BlockChainError}; use sc_consensus::ImportQueue; +use sp_core::H256; +use sp_block_builder::BlockBuilder; use polkadot_service::CollatorPair; // Frontier Imports use fc_rpc_core::types::FilterPool; -use fc_mapping_sync::{MappingSyncWorker, SyncStrategy}; +use fc_mapping_sync::{kv::MappingSyncWorker, SyncStrategy}; +use fc_rpc::{ + StorageOverride, OverrideHandle, SchemaV1Override, SchemaV2Override, SchemaV3Override, + RuntimeApiStorageOverride, +}; +use fp_rpc::EthereumRuntimeRPCApi; +use fp_storage::EthereumStorageSchema; use up_common::types::opaque::*; @@ -173,22 +185,16 @@ impl Stream for AutosealInterval { } } -pub fn open_frontier_backend>( +pub fn open_frontier_backend>( client: Arc, config: &Configuration, -) -> Result>, String> { - let config_dir = config - .base_path - .as_ref() - .map(|base_path| base_path.config_dir(config.chain_spec.id())) - .unwrap_or_else(|| { - BasePath::from_project("", "", "unique").config_dir(config.chain_spec.id()) - }); +) -> Result>, String> { + let config_dir = config.base_path.config_dir(config.chain_spec.id()); let database_dir = config_dir.join("frontier").join("db"); - Ok(Arc::new(fc_db::Backend::::new( + Ok(Arc::new(fc_db::kv::Backend::::new( client, - &fc_db::DatabaseSettings { + &fc_db::kv::DatabaseSettings { source: fc_db::DatabaseSource::RocksDb { path: database_dir, cache_size: 0, @@ -219,13 +225,7 @@ pub fn new_partial( FullSelectChain, sc_consensus::DefaultImportQueue>, sc_transaction_pool::FullPool>, - ( - Option, - Option, - Arc>, - Option, - FeeHistoryCache, - ), + OtherPartial, >, sc_service::Error, > @@ -248,17 +248,6 @@ where sc_service::Error, >, { - let _telemetry = config - .telemetry_endpoints - .clone() - .filter(|x| !x.is_empty()) - .map(|endpoints| -> Result<_, sc_telemetry::Error> { - let worker = TelemetryWorker::new(16)?; - let telemetry = worker.handle().new_telemetry(endpoints); - Ok((worker, telemetry)) - }) - .transpose()?; - let telemetry = config .telemetry_endpoints .clone() @@ -299,9 +288,9 @@ where client.clone(), ); - let filter_pool: Option = Some(Arc::new(Mutex::new(BTreeMap::new()))); + let eth_filter_pool: Option = Some(Arc::new(Mutex::new(BTreeMap::new()))); - let frontier_backend = open_frontier_backend(client.clone(), config)?; + let eth_backend = open_frontier_backend(client.clone(), config)?; let import_queue = build_import_queue( client.clone(), @@ -310,7 +299,6 @@ where telemetry.as_ref().map(|telemetry| telemetry.handle()), &task_manager, )?; - let fee_history_cache: FeeHistoryCache = Arc::new(Mutex::new(BTreeMap::new())); let params = PartialComponents { backend, @@ -320,13 +308,12 @@ where task_manager, transaction_pool, select_chain, - other: ( + other: OtherPartial { telemetry, - filter_pool, - frontier_backend, + eth_filter_pool, + eth_backend, telemetry_worker_handle, - fee_history_cache, - ), + }, }; Ok(params) @@ -433,8 +420,13 @@ where let params = new_partial::(¶chain_config, build_import_queue)?; - let (mut telemetry, filter_pool, frontier_backend, telemetry_worker_handle, fee_history_cache) = - params.other; + let OtherPartial { + mut telemetry, + telemetry_worker_handle, + eth_filter_pool, + eth_backend, + } = params.other; + let net_config = sc_network::config::FullNetworkConfiguration::new(¶chain_config.network); let client = params.client.clone(); let backend = params.backend.clone(); @@ -462,6 +454,7 @@ where let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) = sc_service::build_network(sc_service::BuildNetworkParams { config: ¶chain_config, + net_config, client: client.clone(), transaction_pool: transaction_pool.clone(), spawn_handle: task_manager.spawn_handle(), @@ -474,69 +467,72 @@ where let select_chain = params.select_chain.clone(); - let block_data_cache = Arc::new(fc_rpc::EthBlockDataCacheTask::new( - task_manager.spawn_handle(), - overrides_handle::<_, _, Runtime>(client.clone()), - 50, - 50, - prometheus_registry.clone(), - )); + let runtime_id = parachain_config.chain_spec.runtime_id(); + + // Frontier + let fee_history_cache: FeeHistoryCache = Arc::new(Mutex::new(BTreeMap::new())); + let fee_history_limit = 2048; - let pubsub_notification_sinks: fc_mapping_sync::EthereumBlockNotificationSinks< - fc_mapping_sync::EthereumBlockNotification, + let eth_pubsub_notification_sinks: Arc< + EthereumBlockNotificationSinks>, > = Default::default(); - let pubsub_notification_sinks = Arc::new(pubsub_notification_sinks); - task_manager.spawn_essential_handle().spawn( - "frontier-mapping-sync-worker", - Some("frontier"), - MappingSyncWorker::new( - client.import_notification_stream(), - Duration::new(6, 0), - client.clone(), - backend.clone(), - overrides_handle::<_, _, Runtime>(client.clone()), - frontier_backend.clone(), - 3, - 0, - SyncStrategy::Parachain, - sync_service.clone(), - pubsub_notification_sinks.clone(), - ) - .for_each(|()| futures::future::ready(())), + let overrides = overrides_handle(client.clone()); + let eth_block_data_cache = spawn_frontier_tasks( + FrontierTaskParams { + client: client.clone(), + substrate_backend: backend.clone(), + eth_filter_pool: eth_filter_pool.clone(), + eth_backend: eth_backend.clone(), + fee_history_limit, + fee_history_cache: fee_history_cache.clone(), + task_manager: &task_manager, + prometheus_registry: prometheus_registry.clone(), + overrides: overrides.clone(), + sync_strategy: SyncStrategy::Parachain, + }, + sync_service.clone(), + eth_pubsub_notification_sinks.clone(), ); - let runtime_id = parachain_config.chain_spec.runtime_id(); - + // Rpc let rpc_builder = Box::new({ clone!( client, backend, - pubsub_notification_sinks, + eth_backend, + eth_pubsub_notification_sinks, + fee_history_cache, + eth_block_data_cache, + overrides, transaction_pool, network, sync_service, - frontier_backend, ); - move |deny_unsafe, subscription_task_executor| { + move |deny_unsafe, subscription_task_executor: SubscriptionTaskExecutor| { clone!( backend, - runtime_id, + eth_block_data_cache, client, - transaction_pool, - filter_pool, + eth_backend, + eth_filter_pool, + eth_pubsub_notification_sinks, + fee_history_cache, + eth_block_data_cache, network, + runtime_id, + transaction_pool, select_chain, - block_data_cache, - fee_history_cache, - pubsub_notification_sinks, - frontier_backend, + overrides, ); #[cfg(not(feature = "pov-estimate"))] let _ = backend; + let mut rpc_handle = RpcModule::new(()); + let full_deps = unique_rpc::FullDeps { + client: client.clone(), runtime_id, #[cfg(feature = "pov-estimate")] @@ -550,32 +546,40 @@ where #[cfg(feature = "pov-estimate")] backend, - eth_backend: frontier_backend, deny_unsafe, + pool: transaction_pool.clone(), + select_chain, + }; + + unique_rpc::create_full::<_, _, _, Runtime, RuntimeApi, _>(&mut rpc_handle, full_deps)?; + + let eth_deps = unique_rpc::EthDeps { client, graph: transaction_pool.pool().clone(), pool: transaction_pool, - // TODO: Unhardcode - enable_dev_signer: false, - filter_pool, - network, - sync: sync_service.clone(), - select_chain, is_authority: validator, + network, + eth_backend, // TODO: Unhardcode max_past_logs: 10000, - block_data_cache, + fee_history_limit, fee_history_cache, + eth_block_data_cache, // TODO: Unhardcode - fee_history_limit: 2048, - pubsub_notification_sinks, + enable_dev_signer: false, + eth_filter_pool, + eth_pubsub_notification_sinks, + overrides, + sync: sync_service.clone(), }; - unique_rpc::create_full::<_, _, _, _, Runtime, RuntimeApi, _>( - full_deps, - subscription_task_executor, - ) - .map_err(Into::into) + unique_rpc::create_eth( + &mut rpc_handle, + eth_deps, + subscription_task_executor.clone(), + )?; + + Ok(rpc_handle) } }); @@ -870,6 +874,13 @@ where )) } +pub struct OtherPartial { + pub telemetry: Option, + pub telemetry_worker_handle: Option, + pub eth_filter_pool: Option, + pub eth_backend: Arc>, +} + /// Builds a new development service. This service uses instant seal, and mocks /// the parachain inherent pub fn start_dev_node( @@ -903,7 +914,6 @@ where { use sc_consensus_manual_seal::{run_manual_seal, EngineCommand, ManualSealParams}; use fc_consensus::FrontierBlockImport; - use sc_client_api::HeaderBackend; let sc_service::PartialComponents { client, @@ -914,29 +924,23 @@ where select_chain: maybe_select_chain, transaction_pool, other: - (telemetry, filter_pool, frontier_backend, _telemetry_worker_handle, fee_history_cache), + OtherPartial { + telemetry, + eth_filter_pool, + eth_backend, + telemetry_worker_handle: _, + }, } = new_partial::( &config, dev_build_import_queue::, )?; + let net_config = sc_network::config::FullNetworkConfiguration::new(&config.network); let prometheus_registry = config.prometheus_registry().cloned(); - let block_data_cache = Arc::new(fc_rpc::EthBlockDataCacheTask::new( - task_manager.spawn_handle(), - overrides_handle::<_, _, Runtime>(client.clone()), - 50, - 50, - prometheus_registry.clone(), - )); - - let pubsub_notification_sinks: fc_mapping_sync::EthereumBlockNotificationSinks< - fc_mapping_sync::EthereumBlockNotification, - > = Default::default(); - let pubsub_notification_sinks = Arc::new(pubsub_notification_sinks); - let (network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) = sc_service::build_network(sc_service::BuildNetworkParams { config: &config, + net_config, client: client.clone(), transaction_pool: transaction_pool.clone(), spawn_handle: task_manager.spawn_handle(), @@ -959,8 +963,7 @@ where let select_chain = maybe_select_chain; if collator { - let block_import = - FrontierBlockImport::new(client.clone(), client.clone(), frontier_backend.clone()); + let block_import = FrontierBlockImport::new(client.clone(), client.clone()); let env = sc_basic_authorship::ProposerFactory::new( task_manager.spawn_handle(), @@ -1050,56 +1053,75 @@ where ); } - task_manager.spawn_essential_handle().spawn( - "frontier-mapping-sync-worker", - Some("block-authoring"), - MappingSyncWorker::new( - client.import_notification_stream(), - Duration::new(6, 0), - client.clone(), - backend.clone(), - overrides_handle::<_, _, Runtime>(client.clone()), - frontier_backend.clone(), - 3, - 0, - SyncStrategy::Normal, - sync_service.clone(), - pubsub_notification_sinks.clone(), - ) - .for_each(|()| futures::future::ready(())), - ); - #[cfg(feature = "pov-estimate")] let rpc_backend = backend.clone(); let runtime_id = config.chain_spec.runtime_id(); + // Frontier + let fee_history_cache: FeeHistoryCache = Arc::new(Mutex::new(BTreeMap::new())); + let fee_history_limit = 2048; + + let eth_pubsub_notification_sinks: Arc< + EthereumBlockNotificationSinks>, + > = Default::default(); + + let overrides = overrides_handle(client.clone()); + let eth_block_data_cache = spawn_frontier_tasks( + FrontierTaskParams { + client: client.clone(), + substrate_backend: backend.clone(), + eth_filter_pool: eth_filter_pool.clone(), + eth_backend: eth_backend.clone(), + fee_history_limit, + fee_history_cache: fee_history_cache.clone(), + task_manager: &task_manager, + prometheus_registry, + overrides: overrides.clone(), + sync_strategy: SyncStrategy::Normal, + }, + sync_service.clone(), + eth_pubsub_notification_sinks.clone(), + ); + + // Rpc let rpc_builder = Box::new({ clone!( - backend, client, - sync_service, - frontier_backend, - network, + backend, + eth_backend, + eth_pubsub_notification_sinks, + fee_history_cache, + eth_block_data_cache, + overrides, transaction_pool, - pubsub_notification_sinks + network, + sync_service, ); - move |deny_unsafe, subscription_executor| { + move |deny_unsafe, subscription_task_executor: SubscriptionTaskExecutor| { clone!( backend, - block_data_cache, + eth_block_data_cache, client, + eth_backend, + eth_filter_pool, + eth_pubsub_notification_sinks, fee_history_cache, - filter_pool, + eth_block_data_cache, network, - pubsub_notification_sinks, + runtime_id, + transaction_pool, + select_chain, + overrides, ); #[cfg(not(feature = "pov-estimate"))] let _ = backend; + let mut rpc_module = RpcModule::new(()); + let full_deps = unique_rpc::FullDeps { - runtime_id: runtime_id.clone(), + runtime_id, #[cfg(feature = "pov-estimate")] exec_params: uc_rpc::pov_estimate::ExecutorParams { @@ -1111,32 +1133,42 @@ where #[cfg(feature = "pov-estimate")] backend, - eth_backend: frontier_backend.clone(), + // eth_backend, deny_unsafe, - client, + client: client.clone(), pool: transaction_pool.clone(), + select_chain, + }; + + unique_rpc::create_full::<_, _, _, Runtime, RuntimeApi, _>(&mut rpc_module, full_deps)?; + + let eth_deps = unique_rpc::EthDeps { + client, graph: transaction_pool.pool().clone(), - // TODO: Unhardcode - enable_dev_signer: false, - filter_pool, + pool: transaction_pool, + is_authority: true, network, - sync: sync_service.clone(), - select_chain: select_chain.clone(), - is_authority: collator, + eth_backend, // TODO: Unhardcode max_past_logs: 10000, - block_data_cache, + fee_history_limit, fee_history_cache, + eth_block_data_cache, // TODO: Unhardcode - fee_history_limit: 2048, - pubsub_notification_sinks, + enable_dev_signer: false, + eth_filter_pool, + eth_pubsub_notification_sinks, + overrides, + sync: sync_service.clone(), }; - unique_rpc::create_full::<_, _, _, _, Runtime, RuntimeApi, _>( - full_deps, - subscription_executor, - ) - .map_err(Into::into) + unique_rpc::create_eth( + &mut rpc_module, + eth_deps, + subscription_task_executor.clone(), + )?; + + Ok(rpc_module) } }); @@ -1158,3 +1190,130 @@ where network_starter.start_network(); Ok(task_manager) } + +fn overrides_handle(client: Arc) -> Arc> +where + C: ProvideRuntimeApi + StorageProvider + AuxStore, + C: HeaderBackend + HeaderMetadata, + C: Send + Sync + 'static, + C::Api: fp_rpc::EthereumRuntimeRPCApi, + BE: Backend + 'static, + BE::State: StateBackend, +{ + let mut overrides_map = BTreeMap::new(); + overrides_map.insert( + EthereumStorageSchema::V1, + Box::new(SchemaV1Override::new(client.clone())) as Box + 'static>, + ); + overrides_map.insert( + EthereumStorageSchema::V2, + Box::new(SchemaV2Override::new(client.clone())) as Box + 'static>, + ); + overrides_map.insert( + EthereumStorageSchema::V3, + Box::new(SchemaV3Override::new(client.clone())) as Box + 'static>, + ); + + Arc::new(OverrideHandle { + schemas: overrides_map, + fallback: Box::new(RuntimeApiStorageOverride::new(client)), + }) +} + +pub struct FrontierTaskParams<'a, B: BlockT, C, BE> { + pub task_manager: &'a TaskManager, + pub client: Arc, + pub substrate_backend: Arc, + pub eth_backend: Arc>, + pub eth_filter_pool: Option, + pub overrides: Arc>, + pub fee_history_limit: u64, + pub fee_history_cache: FeeHistoryCache, + pub sync_strategy: SyncStrategy, + pub prometheus_registry: Option, +} + +pub fn spawn_frontier_tasks( + params: FrontierTaskParams, + sync: Arc>, + pubsub_notification_sinks: Arc< + EthereumBlockNotificationSinks>, + >, +) -> Arc> +where + C: ProvideRuntimeApi + BlockOf, + C: HeaderBackend + HeaderMetadata + 'static, + C: BlockchainEvents + StorageProvider, + C: Send + Sync + 'static, + C::Api: EthereumRuntimeRPCApi, + C::Api: BlockBuilder, + B: BlockT + Send + Sync + 'static, + B::Header: HeaderT, + BE: Backend + 'static, + BE::State: StateBackend, +{ + let FrontierTaskParams { + task_manager, + client, + substrate_backend, + eth_backend, + eth_filter_pool, + overrides, + fee_history_limit, + fee_history_cache, + sync_strategy, + prometheus_registry, + } = params; + // Frontier offchain DB task. Essential. + // Maps emulated ethereum data to substrate native data. + params.task_manager.spawn_essential_handle().spawn( + "frontier-mapping-sync-worker", + Some("frontier"), + MappingSyncWorker::new( + client.import_notification_stream(), + Duration::new(6, 0), + client.clone(), + substrate_backend, + overrides.clone(), + eth_backend, + 3, + 0, + sync_strategy, + sync, + pubsub_notification_sinks, + ) + .for_each(|()| futures::future::ready(())), + ); + + // Frontier `EthFilterApi` maintenance. + // Manages the pool of user-created Filters. + if let Some(eth_filter_pool) = eth_filter_pool { + // Each filter is allowed to stay in the pool for 100 blocks. + const FILTER_RETAIN_THRESHOLD: u64 = 100; + params.task_manager.spawn_essential_handle().spawn( + "frontier-filter-pool", + Some("frontier"), + EthTask::filter_pool_task(client.clone(), eth_filter_pool, FILTER_RETAIN_THRESHOLD), + ); + } + + // Spawn Frontier FeeHistory cache maintenance task. + params.task_manager.spawn_essential_handle().spawn( + "frontier-fee-history", + Some("frontier"), + EthTask::fee_history_task( + client, + overrides.clone(), + fee_history_cache, + fee_history_limit, + ), + ); + + Arc::new(EthBlockDataCacheTask::new( + task_manager.spawn_handle(), + overrides, + 50, + 50, + prometheus_registry, + )) +} diff --git a/node/rpc/Cargo.toml b/node/rpc/Cargo.toml index ca1bfaea4c..884c5a5b6e 100644 --- a/node/rpc/Cargo.toml +++ b/node/rpc/Cargo.toml @@ -14,7 +14,6 @@ jsonrpsee = { workspace = true } # pallet-contracts-rpc = { git = 'https://github.com/paritytech/substrate', branch = 'master' } pallet-transaction-payment-rpc = { workspace = true } sc-client-api = { workspace = true } -sc-consensus-grandpa = { workspace = true } sc-network = { workspace = true } sc-network-sync = { workspace = true } sc-rpc = { workspace = true } @@ -41,6 +40,7 @@ up-common = { workspace = true } up-data-structs = { workspace = true } up-pov-estimate-rpc = { workspace = true, default-features = true } up-rpc = { workspace = true } +pallet-ethereum.workspace = true [features] default = [] diff --git a/node/rpc/src/lib.rs b/node/rpc/src/lib.rs index 5eb60930f7..c544c8f57f 100644 --- a/node/rpc/src/lib.rs +++ b/node/rpc/src/lib.rs @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Unique Network. If not, see . +use fc_mapping_sync::{EthereumBlockNotificationSinks, EthereumBlockNotification}; use sp_runtime::traits::BlakeTwo256; use fc_rpc::{ EthBlockDataCacheTask, OverrideHandle, RuntimeApiStorageOverride, SchemaV1Override, @@ -27,9 +28,6 @@ use sc_client_api::{ client::BlockchainEvents, StateBackend, Backend, }; -use sc_consensus_grandpa::{ - FinalityProofProvider, GrandpaJustificationStream, SharedAuthoritySet, SharedVoterState, -}; use sc_network::NetworkService; use sc_network_sync::SyncingService; use sc_rpc::SubscriptionTaskExecutor; @@ -46,42 +44,16 @@ use up_common::types::opaque::*; #[cfg(feature = "pov-estimate")] type FullBackend = sc_service::TFullBackend; -/// Extra dependencies for GRANDPA -pub struct GrandpaDeps { - /// Voting round info. - pub shared_voter_state: SharedVoterState, - /// Authority set info. - pub shared_authority_set: SharedAuthoritySet, - /// Receives notifications about justification events from Grandpa. - pub justification_stream: GrandpaJustificationStream, - /// Executor to drive the subscription manager in the Grandpa RPC handler. - pub subscription_executor: SubscriptionTaskExecutor, - /// Finality proof provider. - pub finality_provider: Arc>, -} - /// Full client dependencies. -pub struct FullDeps { +pub struct FullDeps { /// The client instance to use. pub client: Arc, /// Transaction pool instance. pub pool: Arc

, - /// Graph pool instance. - pub graph: Arc>, /// The SelectChain Strategy pub select_chain: SC, - /// The Node authority flag - pub is_authority: bool, - /// Whether to enable dev signer - pub enable_dev_signer: bool, - /// Network service - pub network: Arc>, - /// Syncing service - pub sync: Arc>, /// Whether to deny unsafe calls pub deny_unsafe: DenyUnsafe, - /// EthFilterApi pool. - pub filter_pool: Option, /// Runtime identification (read from the chain spec) pub runtime_id: RuntimeId, @@ -91,23 +63,6 @@ pub struct FullDeps { /// Substrate Backend. #[cfg(feature = "pov-estimate")] pub backend: Arc, - - /// Ethereum Backend. - pub eth_backend: Arc>, - /// Maximum number of logs in a query. - pub max_past_logs: u32, - /// Maximum fee history cache size. - pub fee_history_limit: u64, - /// Fee history cache. - pub fee_history_cache: FeeHistoryCache, - /// Cache for Ethereum block data. - pub block_data_cache: Arc>, - - pub pubsub_notification_sinks: Arc< - fc_mapping_sync::EthereumBlockNotificationSinks< - fc_mapping_sync::EthereumBlockNotification, - >, - >, } pub fn overrides_handle(client: Arc) -> Arc> @@ -142,10 +97,10 @@ where } /// Instantiate all Full RPC extensions. -pub fn create_full( - deps: FullDeps, - subscription_task_executor: SubscriptionTaskExecutor, -) -> Result, Box> +pub fn create_full( + io: &mut RpcModule<()>, + deps: FullDeps, +) -> Result<(), Box> where C: ProvideRuntimeApi + StorageProvider + AuxStore, C: HeaderBackend + HeaderMetadata + 'static, @@ -155,8 +110,6 @@ where C::Api: BlockBuilder, // C::Api: pallet_contracts_rpc::ContractsRuntimeApi, C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi, - C::Api: fp_rpc::EthereumRuntimeRPCApi, - C::Api: fp_rpc::ConvertTransactionRuntimeApi, C::Api: up_rpc::UniqueApi::CrossAccountId, AccountId>, C::Api: app_promotion_rpc::AppPromotionApi< Block, @@ -168,7 +121,6 @@ where B: sc_client_api::Backend + Send + Sync + 'static, B::State: sc_client_api::backend::StateBackend>, P: TransactionPool + 'static, - CA: ChainApi + 'static, R: RuntimeInstance + Send + Sync + 'static, ::CrossAccountId: serde::Serialize, C: sp_api::CallApiAt< @@ -179,10 +131,6 @@ where >, for<'de> ::CrossAccountId: serde::Deserialize<'de>, { - use fc_rpc::{ - Eth, EthApiServer, EthDevSigner, EthFilter, EthFilterApiServer, EthPubSub, - EthPubSubApiServer, EthSigner, Net, NetApiServer, Web3, Web3ApiServer, - }; use uc_rpc::{UniqueApiServer, Unique}; use uc_rpc::{AppPromotionApiServer, AppPromotion}; @@ -194,21 +142,11 @@ where use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; use substrate_frame_rpc_system::{System, SystemApiServer}; - let mut io = RpcModule::new(()); let FullDeps { client, pool, - graph, select_chain: _, - fee_history_limit, - fee_history_cache, - block_data_cache, - enable_dev_signer, - is_authority, - network, - sync, deny_unsafe, - filter_pool, runtime_id: _, @@ -217,37 +155,139 @@ where #[cfg(feature = "pov-estimate")] backend, - - eth_backend, - max_past_logs, - pubsub_notification_sinks, } = deps; io.merge(System::new(Arc::clone(&client), Arc::clone(&pool), deny_unsafe).into_rpc())?; io.merge(TransactionPayment::new(Arc::clone(&client)).into_rpc())?; - // io.extend_with(ContractsApi::to_delegate(Contracts::new(client.clone()))); + io.merge(Unique::new(client.clone()).into_rpc())?; + + io.merge(AppPromotion::new(client).into_rpc())?; + + #[cfg(feature = "pov-estimate")] + io.merge( + PovEstimate::new( + client.clone(), + backend, + deny_unsafe, + exec_params, + runtime_id, + ) + .into_rpc(), + )?; + + Ok(()) +} + +pub struct EthDeps { + /// The client instance to use. + pub client: Arc, + /// Transaction pool instance. + pub pool: Arc

, + /// Graph pool instance. + pub graph: Arc>, + /// Syncing service + pub sync: Arc>, + /// The Node authority flag + pub is_authority: bool, + /// Network service + pub network: Arc>, + + /// Ethereum Backend. + pub eth_backend: Arc + Send + Sync>, + /// Maximum number of logs in a query. + pub max_past_logs: u32, + /// Maximum fee history cache size. + pub fee_history_limit: u64, + /// Fee history cache. + pub fee_history_cache: FeeHistoryCache, + pub eth_block_data_cache: Arc>, + /// EthFilterApi pool. + pub eth_filter_pool: Option, + pub eth_pubsub_notification_sinks: + Arc>>, + /// Whether to enable eth dev signer + pub enable_dev_signer: bool, + + pub overrides: Arc>, +} + +/// This converter is never used, but we have a generic +/// Option, where T should implement ConvertTransaction +/// +/// TODO: remove after never-type (`!`) stabilization +enum NeverConvert {} +impl fp_rpc::ConvertTransaction for NeverConvert { + fn convert_transaction(&self, _transaction: pallet_ethereum::Transaction) -> T { + unreachable!() + } +} + +pub fn create_eth( + io: &mut RpcModule<()>, + deps: EthDeps, + subscription_task_executor: SubscriptionTaskExecutor, +) -> Result<(), Box> +where + C: ProvideRuntimeApi + StorageProvider + AuxStore, + C: HeaderBackend + HeaderMetadata + 'static, + C: Send + Sync + 'static, + C: BlockchainEvents, + C::Api: BlockBuilder, + C::Api: fp_rpc::EthereumRuntimeRPCApi, + C::Api: fp_rpc::ConvertTransactionRuntimeApi, + P: TransactionPool + 'static, + CA: ChainApi + 'static, + B: sc_client_api::Backend + Send + Sync + 'static, + C: sp_api::CallApiAt< + sp_runtime::generic::Block< + sp_runtime::generic::Header, + sp_runtime::OpaqueExtrinsic, + >, + >, +{ + use fc_rpc::{ + Eth, EthApiServer, EthDevSigner, EthFilter, EthFilterApiServer, EthPubSub, + EthPubSubApiServer, EthSigner, Net, NetApiServer, Web3, Web3ApiServer, TxPool, + TxPoolApiServer, + }; + + let EthDeps { + client, + pool, + graph, + eth_backend, + max_past_logs, + fee_history_limit, + fee_history_cache, + eth_block_data_cache, + eth_filter_pool, + eth_pubsub_notification_sinks, + enable_dev_signer, + sync, + is_authority, + network, + overrides, + } = deps; let mut signers = Vec::new(); if enable_dev_signer { signers.push(Box::new(EthDevSigner::new()) as Box); } - - let overrides = overrides_handle::<_, _, R>(client.clone()); - let execute_gas_limit_multiplier = 10; io.merge( Eth::new( client.clone(), pool.clone(), - graph, - Some(::get_transaction_converter()), + graph.clone(), + // We have no runtimes old enough to only accept converted transactions + None::, sync.clone(), signers, overrides.clone(), eth_backend.clone(), is_authority, - block_data_cache.clone(), + eth_block_data_cache.clone(), fee_history_cache, fee_history_limit, execute_gas_limit_multiplier, @@ -256,36 +296,22 @@ where .into_rpc(), )?; - io.merge(Unique::new(client.clone()).into_rpc())?; - - io.merge(AppPromotion::new(client.clone()).into_rpc())?; + let tx_pool = TxPool::new(client.clone(), graph); - #[cfg(feature = "pov-estimate")] - io.merge( - PovEstimate::new( - client.clone(), - backend, - deny_unsafe, - exec_params, - runtime_id, - ) - .into_rpc(), - )?; - - if let Some(filter_pool) = filter_pool { + if let Some(filter_pool) = eth_filter_pool { io.merge( EthFilter::new( client.clone(), eth_backend, + tx_pool.clone(), filter_pool, 500_usize, // max stored filters max_past_logs, - block_data_cache, + eth_block_data_cache, ) .into_rpc(), )?; } - io.merge( Net::new( client.clone(), @@ -295,9 +321,7 @@ where ) .into_rpc(), )?; - io.merge(Web3::new(client.clone()).into_rpc())?; - io.merge( EthPubSub::new( pool, @@ -305,10 +329,11 @@ where sync, subscription_task_executor, overrides, - pubsub_notification_sinks, + eth_pubsub_notification_sinks, ) .into_rpc(), )?; + io.merge(tx_pool.into_rpc())?; - Ok(io) + Ok(()) } diff --git a/pallets/app-promotion/CHANGELOG.md b/pallets/app-promotion/CHANGELOG.md index 67d4db2e34..06144b553c 100644 --- a/pallets/app-promotion/CHANGELOG.md +++ b/pallets/app-promotion/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. + +## [0.2.1] - 2023-06-23 + +### Changed + +- Removed types associated with support for `Currency` trait. + +### Fixed + +- Benchmarks. + ## [0.2.0] - 2023-05-19 ### Changed diff --git a/pallets/app-promotion/Cargo.toml b/pallets/app-promotion/Cargo.toml index 32622c84eb..49717137bc 100644 --- a/pallets/app-promotion/Cargo.toml +++ b/pallets/app-promotion/Cargo.toml @@ -9,7 +9,7 @@ homepage = 'https://unique.network' license = 'GPLv3' name = 'pallet-app-promotion' repository = 'https://github.com/UniqueNetwork/unique-chain' -version = '0.2.0' +version = '0.2.1' [package.metadata.docs.rs] targets = ['x86_64-unknown-linux-gnu'] @@ -27,7 +27,6 @@ std = [ 'frame-benchmarking/std', 'frame-support/std', 'frame-system/std', - 'pallet-balances/std', 'pallet-evm/std', 'sp-core/std', 'sp-runtime/std', @@ -48,7 +47,7 @@ scale-info = { workspace = true } frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true } frame-system = { workspace = true } -pallet-balances = { features = ["insecure_zero_ed"], workspace = true } + pallet-evm = { workspace = true } sp-core = { workspace = true } sp-runtime = { workspace = true } diff --git a/pallets/app-promotion/src/benchmarking.rs b/pallets/app-promotion/src/benchmarking.rs index 9796b160bb..9acd558ec9 100644 --- a/pallets/app-promotion/src/benchmarking.rs +++ b/pallets/app-promotion/src/benchmarking.rs @@ -18,7 +18,7 @@ use super::*; use crate::Pallet as PromototionPallet; - +use frame_support::traits::fungible::Unbalanced; use sp_runtime::traits::Bounded; use frame_benchmarking::{benchmarks, account}; @@ -63,9 +63,9 @@ benchmarks! { (0..b).try_for_each(|index| { let staker = account::("staker", index, SEED); - ::Currency::set_balance(&staker, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value()); + ::Currency::write_balance(&staker, Into::>::into(10_000u128) * T::Nominal::get())?; PromototionPallet::::stake(RawOrigin::Signed(staker.clone()).into(), Into::>::into(100u128) * T::Nominal::get())?; - PromototionPallet::::unstake_all(RawOrigin::Signed(staker.clone()).into())?; + PromototionPallet::::unstake_all(RawOrigin::Signed(staker).into())?; Result::<(), sp_runtime::DispatchError>::Ok(()) })?; let block_number = >::current_block_number() + T::PendingInterval::get(); @@ -82,13 +82,14 @@ benchmarks! { let pallet_admin = account::("admin", 1, SEED); let share = Perbill::from_rational(1u32, 20); PromototionPallet::::set_admin_address(RawOrigin::Root.into(), T::CrossAccountId::from_sub(pallet_admin.clone()))?; - ::Currency::set_balance(&pallet_admin, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value()); - ::Currency::set_balance(&::TreasuryAccountId::get(), Perbill::from_rational(1u32, 2) * BalanceOf::::max_value()); + ::Currency::write_balance(&pallet_admin, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value())?; + ::Currency::write_balance(&::TreasuryAccountId::get(), Perbill::from_rational(1u32, 2) * BalanceOf::::max_value())?; let stakers: Vec = (0..b).map(|index| account("staker", index, SEED)).collect(); - stakers.iter().for_each(|staker| { - ::Currency::set_balance(&staker, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value()); - }); + stakers.iter().try_for_each(|staker| { + ::Currency::write_balance(staker, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value())?; + Result::<(), sp_runtime::DispatchError>::Ok(()) + })?; (1..11).try_for_each(|i| { >::set_block_number(i.into()); T::RelayBlockNumberProvider::set_block_number((2*i).into()); @@ -102,7 +103,7 @@ benchmarks! { Result::<(), sp_runtime::DispatchError>::Ok(()) })?; - let stakes = Staked::::iter_prefix((&stakers[0],)).into_iter().collect::>(); + let stakes = Staked::::iter_prefix((&stakers[0],)).collect::>(); assert_eq!(stakes.len(), 10); >::set_block_number(15_000.into()); @@ -112,13 +113,13 @@ benchmarks! { stake { let caller = account::("caller", 0, SEED); let share = Perbill::from_rational(1u32, 10); - let _ = ::Currency::set_balance(&caller, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value()); + let _ = ::Currency::write_balance(&caller, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value()); } : _(RawOrigin::Signed(caller.clone()), share * ::Currency::total_balance(&caller)) unstake_all { let caller = account::("caller", 0, SEED); let share = Perbill::from_rational(1u32, 20); - let _ = ::Currency::set_balance(&caller, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value()); + let _ = ::Currency::write_balance(&caller, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value()); (1..11).map(|i| { // used to change block number >::set_block_number(i.into()); @@ -133,7 +134,7 @@ benchmarks! { unstake_partial { let caller = account::("caller", 0, SEED); let share = Perbill::from_rational(1u32, 20); - let _ = ::Currency::set_balance(&caller, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value()); + let _ = ::Currency::write_balance(&caller, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value()); (1..11).map(|i| { // used to change block number >::set_block_number(i.into()); @@ -148,19 +149,19 @@ benchmarks! { sponsor_collection { let pallet_admin = account::("admin", 0, SEED); PromototionPallet::::set_admin_address(RawOrigin::Root.into(), T::CrossAccountId::from_sub(pallet_admin.clone()))?; - let _ = ::Currency::set_balance(&pallet_admin, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value()); + let _ = ::Currency::write_balance(&pallet_admin, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value()); let caller: T::AccountId = account("caller", 0, SEED); - let _ = ::Currency::set_balance(&caller, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value()); - let collection = create_nft_collection::(caller.clone())?; + let _ = ::Currency::write_balance(&caller, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value()); + let collection = create_nft_collection::(caller)?; } : _(RawOrigin::Signed(pallet_admin.clone()), collection) stop_sponsoring_collection { let pallet_admin = account::("admin", 0, SEED); PromototionPallet::::set_admin_address(RawOrigin::Root.into(), T::CrossAccountId::from_sub(pallet_admin.clone()))?; - let _ = ::Currency::set_balance(&pallet_admin, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value()); + let _ = ::Currency::write_balance(&pallet_admin, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value()); let caller: T::AccountId = account("caller", 0, SEED); - let _ = ::Currency::set_balance(&caller, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value()); - let collection = create_nft_collection::(caller.clone())?; + let _ = ::Currency::write_balance(&caller, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value()); + let collection = create_nft_collection::(caller)?; PromototionPallet::::sponsor_collection(RawOrigin::Signed(pallet_admin.clone()).into(), collection)?; } : _(RawOrigin::Signed(pallet_admin.clone()), collection) @@ -168,9 +169,9 @@ benchmarks! { let pallet_admin = account::("admin", 0, SEED); PromototionPallet::::set_admin_address(RawOrigin::Root.into(), T::CrossAccountId::from_sub(pallet_admin.clone()))?; - let _ = ::Currency::set_balance(&pallet_admin, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value()); + let _ = ::Currency::write_balance(&pallet_admin, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value()); let address = H160::from_low_u64_be(SEED as u64); - let data: Vec = (0..20 as u8).collect(); + let data: Vec = (0..20).collect(); >::begin(RawOrigin::Root.into(), address)?; >::finish(RawOrigin::Root.into(), address, data)?; } : _(RawOrigin::Signed(pallet_admin.clone()), address) @@ -179,9 +180,9 @@ benchmarks! { let pallet_admin = account::("admin", 0, SEED); PromototionPallet::::set_admin_address(RawOrigin::Root.into(), T::CrossAccountId::from_sub(pallet_admin.clone()))?; - let _ = ::Currency::set_balance(&pallet_admin, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value()); + let _ = ::Currency::write_balance(&pallet_admin, Perbill::from_rational(1u32, 2) * BalanceOf::::max_value()); let address = H160::from_low_u64_be(SEED as u64); - let data: Vec = (0..20 as u8).collect(); + let data: Vec = (0..20).collect(); >::begin(RawOrigin::Root.into(), address)?; >::finish(RawOrigin::Root.into(), address, data)?; PromototionPallet::::sponsor_contract(RawOrigin::Signed(pallet_admin.clone()).into(), address)?; diff --git a/pallets/app-promotion/src/lib.rs b/pallets/app-promotion/src/lib.rs index 96d6342a16..b4920ad96f 100644 --- a/pallets/app-promotion/src/lib.rs +++ b/pallets/app-promotion/src/lib.rs @@ -53,16 +53,9 @@ mod benchmarking; pub mod types; pub mod weights; -use sp_std::{ - vec::{Vec}, - vec, - iter::Sum, - borrow::ToOwned, - cell::RefCell, -}; +use sp_std::{vec::Vec, vec, iter::Sum, borrow::ToOwned, cell::RefCell}; use sp_core::H160; use codec::EncodeLike; -use pallet_balances::BalanceLock; pub use types::*; use up_data_structs::CollectionId; @@ -70,7 +63,7 @@ use up_data_structs::CollectionId; use frame_support::{ dispatch::{DispatchResult}, traits::{ - Get, LockableCurrency, + Get, tokens::Balance, fungible::{Inspect, InspectFreeze, Mutate, MutateFreeze}, }, @@ -87,8 +80,6 @@ use sp_runtime::{ ArithmeticError, DispatchError, }; -pub const LOCK_IDENTIFIER: [u8; 8] = *b"appstake"; - const PENDING_LIMIT_PER_BLOCK: u32 = 3; type BalanceOf = @@ -108,12 +99,7 @@ pub mod pallet { frame_system::Config + pallet_evm::Config + pallet_configuration::Config { /// Type to interact with the native token - type Currency: MutateFreeze - + Mutate - + ExtendedLockableCurrency< - Self::AccountId, - Balance = <::Currency as Inspect>::Balance, - >; + type Currency: MutateFreeze + Mutate; /// Type for interacting with collections type CollectionHandler: CollectionHandler< @@ -705,47 +691,6 @@ pub mod pallet { Ok(()) } - /// Migrates lock state into freeze one - /// - /// # Permissions - /// - /// * Sudo - /// - /// # Arguments - /// - /// * `origin`: Must be `Root`. - /// * `stakers`: Accounts to be upgraded. - #[pallet::call_index(9)] - #[pallet::weight(T::DbWeight::get().reads_writes(2, 2) * stakers.len() as u64)] - pub fn upgrade_accounts( - origin: OriginFor, - stakers: Vec, - ) -> DispatchResult { - ensure_root(origin)?; - - stakers - .into_iter() - .try_for_each(|s| -> Result<_, DispatchError> { - if let Some(BalanceLock { amount, .. }) = Self::get_locked_balance(&s) { - if Self::get_frozen_balance(&s).is_some() { - return Err(Error::::InconsistencyState.into()); - } - - <::Currency as LockableCurrency>::remove_lock( - LOCK_IDENTIFIER, - &s, - ); - - Self::set_freeze_with_result(&s, amount)?; - Ok(()) - } else { - Ok(()) - } - })?; - - Ok(()) - } - /// Called for blocks that, for some reason, have not been unstacked /// /// # Permissions @@ -756,7 +701,7 @@ pub mod pallet { /// /// * `origin`: Must be `Root`. /// * `pending_blocks`: Block numbers that will be processed. - #[pallet::call_index(10)] + #[pallet::call_index(9)] #[pallet::weight(::WeightInfo::on_initialize(PENDING_LIMIT_PER_BLOCK*pending_blocks.len() as u32))] pub fn force_unstake( origin: OriginFor, @@ -935,17 +880,6 @@ impl Pallet { } } - /// Returns the balance locked by the pallet for the staker. - /// - /// - `staker`: staker account. - pub fn get_locked_balance( - staker: impl EncodeLike, - ) -> Option>> { - <::Currency as ExtendedLockableCurrency>::locks(staker) - .into_iter() - .find(|l| l.id == LOCK_IDENTIFIER) - } - /// Returns the balance frozen by the pallet for the staker. /// /// - `staker`: staker account. diff --git a/pallets/app-promotion/src/types.rs b/pallets/app-promotion/src/types.rs index 4cea412eb9..ac9315ed31 100644 --- a/pallets/app-promotion/src/types.rs +++ b/pallets/app-promotion/src/types.rs @@ -1,7 +1,5 @@ -use codec::EncodeLike; -use frame_support::{traits::LockableCurrency, WeakBoundedVec, Parameter, dispatch::DispatchResult}; +use frame_support::{dispatch::DispatchResult}; -use pallet_balances::{BalanceLock, Config as BalancesConfig, Pallet as PalletBalances}; use pallet_common::CollectionHandle; use sp_runtime::{DispatchError, Perbill}; @@ -14,25 +12,6 @@ use sp_core::Get; const MAX_NUMBER_PAYOUTS: u8 = 100; pub(crate) const DEFAULT_NUMBER_PAYOUTS: u8 = 20; -/// This trait was defined because `LockableCurrency` -/// has no way to know the state of the lock for an account. -pub trait ExtendedLockableCurrency: LockableCurrency { - /// Returns lock balance for an account. Allows to determine the cause of the lock. - fn locks(who: KArg) -> WeakBoundedVec, Self::MaxLocks> - where - KArg: EncodeLike; -} - -impl, I: 'static> ExtendedLockableCurrency - for PalletBalances -{ - fn locks(who: KArg) -> WeakBoundedVec, Self::MaxLocks> - where - KArg: EncodeLike, - { - Self::locks(who) - } -} /// Trait for interacting with collections. pub trait CollectionHandler { type CollectionId; diff --git a/pallets/collator-selection/CHANGELOG.md b/pallets/collator-selection/CHANGELOG.md index 18dc095c10..aa0bc5e2f4 100644 --- a/pallets/collator-selection/CHANGELOG.md +++ b/pallets/collator-selection/CHANGELOG.md @@ -4,22 +4,28 @@ All notable changes to this project will be documented in this file. +## [5.0.0] - 2023-06-27 + +### Major change + +- The dependency (tight coupling) this pallet on the configuration pallet has been removed. + ## [4.0.0] - 2022-12-29 ### Added - Entire functionality moved over from cumulus/pallet-collator-selection (v3.0.0). Refactored business logic: - - Added an extra step for candidacy, `get_license`, at which payment happens. The number of license holders is unlimited. - - Only licensed accounts can apply for candidacy with `onboard`. No extra deposits are made. - - Active candidates may `offboard`, but they will retain their license. - - Deposit is returned, and candidacy possibly removed with `release_license`. - - License can be forcibly forfeited and candidacy removed with `force_release_license`. - - Failing collators' deposits will now be fully slashed, and funds will be redirected to Treasury. - - Unify `MaxInvulnerables` and `MaxCandidates` into `MaxCollators`. - - Remove `MinCandidates`. - - Minimal amount of invulnerables is now 1. - - Both invulnerables and candidates count against the limits together, however invulnerables ignore `DesiredCollators`. - - `KickThreshold` is made configurable. - - `DesiredCollators`, `LicenseBond`, and `KickThreshold` are moved to and referenced from `pallet-configuration`. - - Naming changes to better reflect the new functionality. - - More minor changes, tests, benchmarks, etc. \ No newline at end of file + - Added an extra step for candidacy, `get_license`, at which payment happens. The number of license holders is unlimited. + - Only licensed accounts can apply for candidacy with `onboard`. No extra deposits are made. + - Active candidates may `offboard`, but they will retain their license. + - Deposit is returned, and candidacy possibly removed with `release_license`. + - License can be forcibly forfeited and candidacy removed with `force_release_license`. + - Failing collators' deposits will now be fully slashed, and funds will be redirected to Treasury. + - Unify `MaxInvulnerables` and `MaxCandidates` into `MaxCollators`. + - Remove `MinCandidates`. + - Minimal amount of invulnerables is now 1. + - Both invulnerables and candidates count against the limits together, however invulnerables ignore `DesiredCollators`. + - `KickThreshold` is made configurable. + - `DesiredCollators`, `LicenseBond`, and `KickThreshold` are moved to and referenced from `pallet-configuration`. + - Naming changes to better reflect the new functionality. + - More minor changes, tests, benchmarks, etc. diff --git a/pallets/collator-selection/Cargo.toml b/pallets/collator-selection/Cargo.toml index 012a20f057..7815141673 100644 --- a/pallets/collator-selection/Cargo.toml +++ b/pallets/collator-selection/Cargo.toml @@ -6,7 +6,7 @@ homepage = "https://unique.network" license = "GPLv3" name = "pallet-collator-selection" repository = "https://github.com/UniqueNetwork/unique-chain" -version = "4.0.0" +version = "5.0.0" [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] @@ -23,7 +23,6 @@ serde = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } pallet-authorship = { workspace = true } -pallet-configuration = { workspace = true } pallet-session = { workspace = true } sp-runtime = { workspace = true } sp-staking = { workspace = true } @@ -55,8 +54,6 @@ std = [ "frame-system/std", "log/std", "pallet-authorship/std", - 'pallet-aura/std', - 'pallet-balances/std', "pallet-session/std", "rand/std", "scale-info/std", @@ -64,6 +61,8 @@ std = [ "sp-runtime/std", "sp-staking/std", "sp-std/std", + 'pallet-aura/std', + 'pallet-balances/std', ] try-runtime = ["frame-support/try-runtime"] diff --git a/pallets/collator-selection/src/benchmarking.rs b/pallets/collator-selection/src/benchmarking.rs index d64d4e9066..6ae72acf8e 100644 --- a/pallets/collator-selection/src/benchmarking.rs +++ b/pallets/collator-selection/src/benchmarking.rs @@ -35,7 +35,7 @@ use super::*; #[allow(unused)] -use crate::Pallet as CollatorSelection; +use crate::{Pallet as CollatorSelection, BalanceOf}; use frame_benchmarking::{account, benchmarks, impl_benchmark_test_suite, whitelisted_caller}; use frame_support::{ assert_ok, @@ -49,11 +49,6 @@ use frame_support::{ use frame_system::{EventRecord, RawOrigin}; use pallet_authorship::EventHandler; use pallet_session::{self as session, SessionManager}; -use pallet_configuration::{ - self as configuration, BalanceOf, - CollatorSelectionDesiredCollatorsOverride as DesiredCollators, - CollatorSelectionLicenseBondOverride as LicenseBond, -}; use sp_std::prelude::*; const SEED: u32 = 0; @@ -117,7 +112,7 @@ fn register_validators(count: u32) -> Vec(count: u32) { +fn register_invulnerables(count: u32) { let candidates = (0..count) .map(|c| account("candidate", c, SEED)) .collect::>(); @@ -131,33 +126,27 @@ fn register_invulnerables(count: u32) { } } -fn register_candidates(count: u32) { +fn register_candidates(count: u32) { let candidates = (0..count) .map(|c| account("candidate", c, SEED)) .collect::>(); - assert!( - >::get() > 0u32.into(), - "Bond cannot be zero!" - ); + assert!(T::LicenseBond::get() > 0u32.into(), "Bond cannot be zero!"); for who in candidates { - T::Currency::set_balance(&who, >::get() * 2u32.into()); + T::Currency::set_balance(&who, T::LicenseBond::get() * 2u32.into()); >::get_license(RawOrigin::Signed(who.clone()).into()).unwrap(); >::onboard(RawOrigin::Signed(who).into()).unwrap(); } } -fn get_licenses(count: u32) { +fn get_licenses(count: u32) { let candidates = (0..count) .map(|c| account("candidate", c, SEED)) .collect::>(); - assert!( - >::get() > 0u32.into(), - "Bond cannot be zero!" - ); + assert!(T::LicenseBond::get() > 0u32.into(), "Bond cannot be zero!"); for who in candidates { - T::Currency::set_balance(&who, >::get() * 2u32.into()); + T::Currency::set_balance(&who, T::LicenseBond::get() * 2u32.into()); >::get_license(RawOrigin::Signed(who.clone()).into()).unwrap(); } } @@ -165,7 +154,7 @@ fn get_licenses(count: u32) { /// `Currency::minimum_balance` was used originally, but in unique-chain, we have /// zero existential deposit, thus triggering zero bond assertion. fn balance_unit() -> BalanceOf { - 200u32.into() + T::LicenseBond::get() } /// Our benchmarking environment already has invulnerables registered. @@ -173,7 +162,7 @@ const INITIAL_INVULNERABLES: u32 = 2; benchmarks! { where_clause { where - T: pallet_authorship::Config + session::Config + configuration::Config + T: Config + pallet_authorship::Config + session::Config } // todo:collator this and all the following do not work for some reason, going all the way up to 10 in length @@ -188,7 +177,7 @@ benchmarks! { let new_invulnerable: T::AccountId = whitelisted_caller(); let bond: BalanceOf = balance_unit::() * 2u32.into(); - T::Currency::set_balance(&new_invulnerable, bond.clone()); + ::Currency::set_balance(&new_invulnerable, bond); >::set_keys( RawOrigin::Signed(new_invulnerable.clone()).into(), @@ -226,14 +215,12 @@ benchmarks! { get_license { let c in 1 .. T::MaxCollators::get() - 1; - >::put(balance_unit::()); - register_validators::(c); get_licenses::(c); let caller: T::AccountId = whitelisted_caller(); let bond: BalanceOf = balance_unit::() * 2u32.into(); - T::Currency::set_balance(&caller, bond.clone()); + T::Currency::set_balance(&caller, bond); >::set_keys( RawOrigin::Signed(caller.clone()).into(), @@ -251,15 +238,12 @@ benchmarks! { onboard { let c in 1 .. T::MaxCollators::get() - INITIAL_INVULNERABLES - 1; - >::put(balance_unit::()); - >::put(c + INITIAL_INVULNERABLES + 1); - register_validators::(c); register_candidates::(c); let caller: T::AccountId = whitelisted_caller(); let bond: BalanceOf = balance_unit::() * 2u32.into(); - T::Currency::set_balance(&caller, bond.clone()); + T::Currency::set_balance(&caller, bond); let origin = RawOrigin::Signed(caller.clone()); @@ -279,9 +263,7 @@ benchmarks! { // worst case is the last candidate leaving. offboard { - let c in 1 .. T::MaxCollators::get(); - >::put(balance_unit::()); - >::put(c + INITIAL_INVULNERABLES); + let c in 1 .. T::MaxCollators::get() - INITIAL_INVULNERABLES; register_validators::(c); register_candidates::(c); @@ -295,10 +277,8 @@ benchmarks! { // worst case is the last candidate leaving. release_license { - let c in 1 .. T::MaxCollators::get(); + let c in 1 .. T::MaxCollators::get() - INITIAL_INVULNERABLES; let bond = balance_unit::(); - >::put(bond); - >::put(c + INITIAL_INVULNERABLES); register_validators::(c); register_candidates::(c); @@ -312,10 +292,8 @@ benchmarks! { // worst case is the last candidate leaving. force_release_license { - let c in 1 .. T::MaxCollators::get(); + let c in 1 .. T::MaxCollators::get() - INITIAL_INVULNERABLES; let bond = balance_unit::(); - >::put(bond); - >::put(c + INITIAL_INVULNERABLES); register_validators::(c); register_candidates::(c); @@ -334,7 +312,6 @@ benchmarks! { // worst case is paying a non-existing candidate account. note_author { - >::put(balance_unit::()); T::Currency::set_balance( &>::account_id(), balance_unit::() * 4u32.into(), @@ -353,11 +330,9 @@ benchmarks! { // worst case for new session. new_session { - let r in 1 .. T::MaxCollators::get(); - let c in 1 .. T::MaxCollators::get(); + let r in 1 .. T::MaxCollators::get() - INITIAL_INVULNERABLES; + let c in 1 .. T::MaxCollators::get() - INITIAL_INVULNERABLES; - >::put(balance_unit::()); - >::put(c + INITIAL_INVULNERABLES); frame_system::Pallet::::set_block_number(0u32.into()); register_validators::(c); diff --git a/pallets/collator-selection/src/lib.rs b/pallets/collator-selection/src/lib.rs index 4607c7ce92..99db1d7d1b 100644 --- a/pallets/collator-selection/src/lib.rs +++ b/pallets/collator-selection/src/lib.rs @@ -90,6 +90,10 @@ mod tests; mod benchmarking; pub mod weights; +use frame_support::traits::fungible::Inspect; + +type BalanceOf = + <::Currency as Inspect<::AccountId>>::Balance; #[frame_support::pallet] pub mod pallet { use super::*; @@ -111,11 +115,6 @@ pub mod pallet { use frame_system::pallet_prelude::*; use pallet_session::SessionManager; use sp_runtime::{Perbill, traits::Convert}; - use pallet_configuration::{ - CollatorSelectionDesiredCollatorsOverride as DesiredCollators, - CollatorSelectionLicenseBondOverride as LicenseBond, - CollatorSelectionKickThresholdOverride as KickThreshold, BalanceOf, - }; use sp_staking::SessionIndex; /// A convertor from collators id. Since this pallet does not have stash/controller, this is @@ -129,9 +128,12 @@ pub mod pallet { /// Configure the pallet by specifying the parameters and types on which it depends. #[pallet::config] - pub trait Config: frame_system::Config + pallet_configuration::Config { + pub trait Config: frame_system::Config { /// Overarching event type. type RuntimeEvent: From> + IsType<::RuntimeEvent>; + type Currency: Mutate + + MutateHold + + BalancedHold; /// Origin that can dictate updating parameters of this pallet. type UpdateOrigin: EnsureOrigin; @@ -163,7 +165,13 @@ pub mod pallet { type WeightInfo: WeightInfo; #[pallet::constant] - type LicenceBondIdentifier: Get<<::Currency as InspectHold>::Reason>; + type LicenceBondIdentifier: Get<>::Reason>; + + type DesiredCollators: Get; + + type LicenseBond: Get>; + + type KickThreshold: Get; } #[pallet::pallet] @@ -365,7 +373,7 @@ pub mod pallet { Error::::ValidatorNotRegistered ); - let deposit = >::get(); + let deposit = T::LicenseBond::get(); T::Currency::hold(&T::LicenceBondIdentifier::get(), &who, deposit)?; LicenseDepositOf::::insert(who.clone(), deposit); @@ -396,7 +404,7 @@ pub mod pallet { let length = >::decode_len().unwrap_or_default() + >::decode_len().unwrap_or_default(); ensure!( - (length as u32) < >::get(), + (length as u32) < T::DesiredCollators::get(), Error::::TooManyCandidates ); ensure!( @@ -415,7 +423,7 @@ pub mod pallet { // First authored block is current block plus kick threshold to handle session delay >::insert( who.clone(), - frame_system::Pallet::::block_number() + >::get(), + frame_system::Pallet::::block_number() + T::KickThreshold::get(), ); Ok(candidates.len()) } @@ -574,7 +582,7 @@ pub mod pallet { candidates: BoundedVec, ) -> BoundedVec { let now = frame_system::Pallet::::block_number(); - let kick_threshold = >::get(); + let kick_threshold = T::KickThreshold::get(); candidates .into_iter() .filter_map(|c| { diff --git a/pallets/collator-selection/src/mock.rs b/pallets/collator-selection/src/mock.rs index 3d6d861b0a..ba0c7d33fe 100644 --- a/pallets/collator-selection/src/mock.rs +++ b/pallets/collator-selection/src/mock.rs @@ -63,7 +63,6 @@ frame_support::construct_runtime!( Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, CollatorSelection: collator_selection::{Pallet, Call, Storage, Event}, Authorship: pallet_authorship::{Pallet, Storage}, - Configuration: pallet_configuration::{Pallet, Call, Storage, Event}, } ); @@ -218,21 +217,6 @@ parameter_types! { pub const LicenceBondIdentifier: [u8; 16] = *b"licenceidentifie"; } -impl pallet_configuration::Config for Test { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type DefaultCollatorSelectionMaxCollators = MaxCollators; - type DefaultCollatorSelectionKickThreshold = KickThreshold; - type DefaultCollatorSelectionLicenseBond = LicenseBond; - // the following constants we don't care about - type DefaultWeightToFeeCoefficient = DefaultWeightToFeeCoefficient; - type DefaultMinGasPrice = DefaultMinGasPrice; - type MaxXcmAllowedLocations = MaxXcmAllowedLocations; - type AppPromotionDailyRate = AppPromotionDailyRate; - type DayRelayBlocks = DayRelayBlocks; - type WeightInfo = pallet_configuration::weights::SubstrateWeight; -} - ord_parameter_types! { pub const RootAccount: u64 = 777; } @@ -246,11 +230,7 @@ parameter_types! { pub struct IsRegistered; impl ValidatorRegistration for IsRegistered { fn is_registered(id: &u64) -> bool { - if *id == 7u64 { - false - } else { - true - } + *id != 7u64 } } @@ -265,6 +245,10 @@ impl Config for Test { type ValidatorIdOf = IdentityCollator; type ValidatorRegistration = IsRegistered; type LicenceBondIdentifier = LicenceBondIdentifier; + type Currency = Balances; + type DesiredCollators = MaxCollators; + type LicenseBond = LicenseBond; + type KickThreshold = KickThreshold; type WeightInfo = (); } @@ -277,7 +261,11 @@ pub fn new_test_ext() -> sp_io::TestExternalities { let ed = ::ExistentialDeposit::get(); - let balances = vec![(1, 100), (2, 100), (3, 100), (4, 100), (5, 100), (33, ed)]; + let balances: Vec<(u64, u64)> = (1..=::DesiredCollators::get() as u64 + 1) + .map(|i| (i, 100)) + .chain(core::iter::once((33, ed))) + .collect(); + let keys = balances .iter() .map(|&(i, _)| { diff --git a/pallets/collator-selection/src/tests.rs b/pallets/collator-selection/src/tests.rs index b8d6fa122b..86dc549cf3 100644 --- a/pallets/collator-selection/src/tests.rs +++ b/pallets/collator-selection/src/tests.rs @@ -30,19 +30,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate as collator_selection; +use crate::{self as collator_selection, Config}; use crate::{mock::*, Error}; use frame_support::{ assert_noop, assert_ok, traits::{fungible, GenesisBuild, OnInitialize}, }; -use frame_system::RawOrigin; use sp_runtime::{traits::BadOrigin, TokenError}; -use pallet_configuration::{ - CollatorSelectionDesiredCollatorsOverride as DesiredCollators, - CollatorSelectionKickThresholdOverride as KickThreshold, - CollatorSelectionLicenseBondOverride as LicenseBond, -}; use scale_info::prelude::*; fn get_license_and_onboard(account_id: ::AccountId) { @@ -57,9 +51,6 @@ fn get_license_and_onboard(account_id: ::AccountId #[test] fn basic_setup_works() { new_test_ext().execute_with(|| { - assert_eq!(>::get(), 5); - assert_eq!(>::get(), 10); - assert!(CollatorSelection::candidates().is_empty()); assert_eq!(CollatorSelection::invulnerables(), vec![1, 2]); }); @@ -124,51 +115,6 @@ fn it_should_remove_invulnerables() { }); } -#[test] -fn set_desired_collators_works() { - new_test_ext().execute_with(|| { - // given - assert_eq!(>::get(), 5); - - // can set - assert_ok!(Configuration::set_collator_selection_desired_collators( - RawOrigin::Root.into(), - Some(7) - )); - assert_eq!(>::get(), 7); - - // rejects bad origin - assert_noop!( - Configuration::set_collator_selection_desired_collators( - RuntimeOrigin::signed(1), - Some(8) - ), - BadOrigin - ); - }); -} - -#[test] -fn set_license_bond() { - new_test_ext().execute_with(|| { - // given - assert_eq!(>::get(), 10); - - // can set - assert_ok!(Configuration::set_collator_selection_license_bond( - RawOrigin::Root.into(), - Some(7) - )); - assert_eq!(>::get(), 7); - - // rejects bad origin. - assert_noop!( - Configuration::set_collator_selection_license_bond(RuntimeOrigin::signed(1), Some(8)), - BadOrigin - ); - }); -} - #[test] fn cannot_onboard_candidate_with_no_license() { new_test_ext().execute_with(|| { @@ -187,26 +133,19 @@ fn cannot_onboard_candidate_with_no_license() { #[test] fn cannot_onboard_candidate_if_too_many() { new_test_ext().execute_with(|| { - // reset desired candidates - >::put(0); - - // can still get a license. - assert_ok!(CollatorSelection::get_license(RuntimeOrigin::signed(4))); - - // can't accept anyone anymore. - assert_noop!( - CollatorSelection::onboard(RuntimeOrigin::signed(4)), - Error::::TooManyCandidates, - ); - - // reset desired candidates to invulnerables + 1 - >::put(3); - assert_ok!(CollatorSelection::onboard(RuntimeOrigin::signed(4))); + // can accept desired value of collators. + for c in 3u64..=(::DesiredCollators::get()).into() { + assert_ok!(CollatorSelection::get_license(RuntimeOrigin::signed(c))); + assert_ok!(CollatorSelection::onboard(RuntimeOrigin::signed(c))); + } // but no more. - assert_ok!(CollatorSelection::get_license(RuntimeOrigin::signed(5))); + let undesired_collator = (::DesiredCollators::get() + 1) as u64; + assert_ok!(CollatorSelection::get_license(RuntimeOrigin::signed( + undesired_collator + ))); assert_noop!( - CollatorSelection::onboard(RuntimeOrigin::signed(5)), + CollatorSelection::onboard(RuntimeOrigin::signed(undesired_collator)), Error::::TooManyCandidates, ); }) @@ -227,8 +166,8 @@ fn cannot_obtain_license_if_keys_not_registered() { fn cannot_obtain_license_if_poor() { new_test_ext().execute_with(|| { let ed = ::ExistentialDeposit::get(); - assert_eq!(Balances::free_balance(&3), 100); - assert_eq!(Balances::free_balance(&33), ed); + assert_eq!(Balances::free_balance(3), 100); + assert_eq!(Balances::free_balance(33), ed); // works assert_ok!(CollatorSelection::get_license(RuntimeOrigin::signed(3))); @@ -266,21 +205,18 @@ fn cannot_onboard_dupe_candidate() { #[test] fn becoming_candidate_works() { new_test_ext().execute_with(|| { - // given - assert_eq!(>::get(), 5); - assert_eq!(>::get(), 10); assert_eq!(CollatorSelection::candidates(), Vec::new()); assert_eq!(CollatorSelection::invulnerables(), vec![1, 2]); // take two endowed, non-invulnerables accounts. - assert_eq!(Balances::free_balance(&3), 100); - assert_eq!(Balances::free_balance(&4), 100); + assert_eq!(Balances::free_balance(3), 100); + assert_eq!(Balances::free_balance(4), 100); get_license_and_onboard(3); get_license_and_onboard(4); - assert_eq!(Balances::free_balance(&3), 90); - assert_eq!(Balances::free_balance(&4), 90); + assert_eq!(Balances::free_balance(3), 90); + assert_eq!(Balances::free_balance(4), 90); assert_eq!(CollatorSelection::candidates().len(), 2); }); @@ -513,7 +449,7 @@ fn kick_mechanism() { assert_eq!(SessionHandlerCollators::get(), vec![1, 2, 3, 4]); assert_eq!(CollatorSelection::candidates(), vec![4]); - assert_eq!(>::get(), 10); + // assert_eq!(>::get(), 10); assert_eq!(CollatorSelection::last_authored_block(4), 20); initialize_to_block(30); diff --git a/pallets/common/Cargo.toml b/pallets/common/Cargo.toml index 4a77672d0c..05c7d44679 100644 --- a/pallets/common/Cargo.toml +++ b/pallets/common/Cargo.toml @@ -10,6 +10,7 @@ codec = { workspace = true, package = "parity-scale-codec" } scale-info = { workspace = true } +bondrewd = { version = "0.1.14", features = ["derive"], default-features = false } ethereum = { workspace = true } evm-coder = { workspace = true } frame-benchmarking = { workspace = true, optional = true } @@ -34,6 +35,8 @@ std = [ "sp-std/std", "up-data-structs/std", "up-pov-estimate-rpc/std", + "evm-coder/std", ] -stubgen = ["evm-coder/stubgen"] +stubgen = ["evm-coder/stubgen", "up-data-structs/stubgen"] +tests = [] try-runtime = ["frame-support/try-runtime"] diff --git a/pallets/common/src/benchmarking.rs b/pallets/common/src/benchmarking.rs index f068d26ae0..ba2006dcf0 100644 --- a/pallets/common/src/benchmarking.rs +++ b/pallets/common/src/benchmarking.rs @@ -21,10 +21,9 @@ use crate::{Config, CollectionHandle, Pallet}; use pallet_evm::account::CrossAccountId; use frame_benchmarking::{benchmarks, account}; use up_data_structs::{ - CollectionMode, CollectionFlags, CreateCollectionData, CollectionId, Property, PropertyKey, - PropertyValue, CollectionPermissions, NestingPermissions, AccessMode, - MAX_COLLECTION_NAME_LENGTH, MAX_COLLECTION_DESCRIPTION_LENGTH, MAX_TOKEN_PREFIX_LENGTH, - MAX_PROPERTIES_PER_ITEM, + CollectionMode, CreateCollectionData, CollectionId, Property, PropertyKey, PropertyValue, + CollectionPermissions, NestingPermissions, AccessMode, MAX_COLLECTION_NAME_LENGTH, + MAX_COLLECTION_DESCRIPTION_LENGTH, MAX_TOKEN_PREFIX_LENGTH, MAX_PROPERTIES_PER_ITEM, }; use frame_support::{ traits::{Get, fungible::Balanced, Imbalance, tokens::Precision}, @@ -47,12 +46,7 @@ pub fn create_u16_data() -> BoundedVec> { .unwrap() } pub fn create_var_data(size: u32) -> BoundedVec> { - assert!( - size <= S, - "size ({}) should be less within bound ({})", - size, - S - ); + assert!(size <= S, "size ({size}) should be less within bound ({S})",); (0..size) .map(|v| (v & 0xff) as u8) .collect::>() @@ -69,7 +63,7 @@ pub fn property_key(id: usize) -> PropertyKey { } let bytes = id.to_string(); let len = data.len(); - data[len - bytes.len()..].copy_from_slice(&bytes.as_bytes()); + data[len - bytes.len()..].copy_from_slice(bytes.as_bytes()); data } pub fn property_value() -> PropertyValue { @@ -81,12 +75,12 @@ pub fn create_collection_raw( mode: CollectionMode, handler: impl FnOnce( T::CrossAccountId, - CreateCollectionData, + CreateCollectionData, ) -> Result, cast: impl FnOnce(CollectionHandle) -> R, ) -> Result { let imbalance = ::Currency::deposit( - &owner.as_sub(), + owner.as_sub(), T::CollectionCreationPrice::get(), Precision::Exact, )?; @@ -124,9 +118,7 @@ fn create_collection( create_collection_raw( owner, CollectionMode::NFT, - |owner: T::CrossAccountId, data| { - >::init_collection(owner.clone(), owner, data, CollectionFlags::default()) - }, + |owner: T::CrossAccountId, data| >::init_collection(owner.clone(), owner, data), |h| h, ) } diff --git a/pallets/common/src/dispatch.rs b/pallets/common/src/dispatch.rs index 5eed795757..fe51ea0563 100644 --- a/pallets/common/src/dispatch.rs +++ b/pallets/common/src/dispatch.rs @@ -9,7 +9,7 @@ use frame_support::{ traits::Get, }; use sp_runtime::DispatchError; -use up_data_structs::{CollectionId, CreateCollectionData, CollectionFlags}; +use up_data_structs::{CollectionId, CreateCollectionData}; use crate::{pallet::Config, CommonCollectionOperations}; @@ -76,8 +76,7 @@ pub trait CollectionDispatch { fn create( sender: T::CrossAccountId, payer: T::CrossAccountId, - data: CreateCollectionData, - flags: CollectionFlags, + data: CreateCollectionData, ) -> Result; /// Delete the collection. diff --git a/pallets/common/src/erc.rs b/pallets/common/src/erc.rs index a05d4a3473..f08b6d903e 100644 --- a/pallets/common/src/erc.rs +++ b/pallets/common/src/erc.rs @@ -402,10 +402,44 @@ where Ok(()) } + #[solidity(rename_selector = "setCollectionNesting")] + fn set_nesting( + &mut self, + caller: Caller, + collection_nesting_and_permissions: eth::CollectionNestingAndPermission, + ) -> Result<()> { + self.consume_store_reads_and_writes(1, 1)?; + + let caller = T::CrossAccountId::from_eth(caller); + + let mut permissions = self.collection.permissions.clone(); + let mut nesting = permissions.nesting().clone(); + + let bv = if !collection_nesting_and_permissions.restricted.is_empty() { + let mut bv = OwnerRestrictedSet::new(); + for address in collection_nesting_and_permissions.restricted.iter() { + bv.try_insert(crate::eth::map_eth_to_id(address).ok_or_else(|| { + Error::Revert("Can't convert address into collection id".into()) + })?) + .map_err(|_| "too many collections")?; + } + Some(bv) + } else { + None + }; + + nesting.token_owner = collection_nesting_and_permissions.token_owner; + nesting.collection_admin = collection_nesting_and_permissions.collection_admin; + nesting.restricted = bv; + permissions.nesting = Some(nesting); + + >::update_permissions(&caller, self, permissions).map_err(dispatch_to_evm::) + } + /// Toggle accessibility of collection nesting. /// /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled' - #[solidity(rename_selector = "setCollectionNesting")] + #[solidity(hide, rename_selector = "setCollectionNesting")] fn set_nesting_bool(&mut self, caller: Caller, enable: bool) -> Result<()> { self.consume_store_reads_and_writes(1, 1)?; @@ -424,8 +458,8 @@ where /// /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled' /// @param collections Addresses of collections that will be available for nesting. - #[solidity(rename_selector = "setCollectionNesting")] - fn set_nesting( + #[solidity(hide, rename_selector = "setCollectionNesting")] + fn set_nesting_collection_ids( &mut self, caller: Caller, enable: bool, @@ -464,8 +498,28 @@ where >::update_permissions(&caller, self, permissions).map_err(dispatch_to_evm::) } + #[solidity(rename_selector = "collectionNesting")] + fn collection_nesting(&self) -> Result { + let nesting = self.collection.permissions.nesting(); + + Ok(eth::CollectionNestingAndPermission::new( + nesting.token_owner, + nesting.collection_admin, + nesting + .restricted + .clone() + .map(|b| { + b.0.into_inner() + .iter() + .map(|id| crate::eth::collection_id_to_address(id.0.into())) + .collect() + }) + .unwrap_or_default(), + )) + } + /// Returns nesting for a collection - #[solidity(rename_selector = "collectionNestingRestrictedCollectionIds")] + #[solidity(hide, rename_selector = "collectionNestingRestrictedCollectionIds")] fn collection_nesting_restricted_ids(&self) -> Result { let nesting = self.collection.permissions.nesting(); @@ -480,6 +534,7 @@ where } /// Returns permissions for a collection + #[solidity(hide)] fn collection_nesting_permissions(&self) -> Result> { let nesting = self.collection.permissions.nesting(); Ok(vec![ diff --git a/pallets/common/src/eth.rs b/pallets/common/src/eth.rs index a36cd34f3a..2b659a2c15 100644 --- a/pallets/common/src/eth.rs +++ b/pallets/common/src/eth.rs @@ -24,7 +24,8 @@ use evm_coder::{ }; pub use pallet_evm::{Config, account::CrossAccountId}; use sp_core::{H160, U256}; -use up_data_structs::CollectionId; +use up_data_structs::{CollectionId, CollectionFlags}; +use pallet_evm_coder_substrate::execution::Error; // 0x17c4e6453Cc49AAAaEACA894e6D9683e00000001 - collection 1 // TODO: Unhardcode prefix @@ -104,10 +105,26 @@ impl CrossAddress { sub: Default::default(), } } + + /// Converts [`CrossAddress`] to `Option`. + pub fn into_option_sub_cross_account(&self) -> Result, Error> + where + T: pallet_evm::Config, + T::AccountId: From<[u8; 32]>, + { + if self.eth == Default::default() && self.sub == Default::default() { + Ok(None) + } else if self.eth == Default::default() { + Ok(Some(convert_uint256_to_cross_account::(self.sub))) + } else if self.sub == Default::default() { + Ok(Some(T::CrossAccountId::from_eth(self.eth))) + } else { + Err(format!("All fields of cross account is non zeroed {:?}", self).into()) + } + } + /// Converts [`CrossAddress`] to `CrossAccountId`. - pub fn into_sub_cross_account( - &self, - ) -> pallet_evm_coder_substrate::execution::Result + pub fn into_sub_cross_account(&self) -> Result where T: pallet_evm::Config, T::AccountId: From<[u8; 32]>, @@ -124,6 +141,19 @@ impl CrossAddress { } } +/// Type of tokens in collection +#[derive(AbiCoder, Copy, Clone, Default, Debug, PartialEq)] +#[repr(u8)] +pub enum CollectionMode { + /// Nonfungible + #[default] + Nonfungible, + /// Fungible + Fungible, + /// Refungible + Refungible, +} + /// Ethereum representation of collection [`PropertyKey`](up_data_structs::PropertyKey) and [`PropertyValue`](up_data_structs::PropertyValue). #[derive(Debug, Default, AbiCoder)] pub struct Property { @@ -131,8 +161,20 @@ pub struct Property { value: evm_coder::types::Bytes, } +impl Property { + /// Property key. + pub fn key(&self) -> &str { + self.key.as_str() + } + + /// Property value. + pub fn value(&self) -> &[u8] { + self.value.0.as_slice() + } +} + impl TryFrom for Property { - type Error = pallet_evm_coder_substrate::execution::Error; + type Error = Error; fn try_from(from: up_data_structs::Property) -> Result { let key = evm_coder::types::String::from_utf8(from.key.into()) @@ -143,7 +185,7 @@ impl TryFrom for Property { } impl TryInto for Property { - type Error = pallet_evm_coder_substrate::execution::Error; + type Error = Error; fn try_into(self) -> Result { let key = >::from(self.key) @@ -208,17 +250,14 @@ impl CollectionLimit { pub fn has_value(&self) -> bool { self.value.is_some() } -} -impl TryInto for CollectionLimit { - type Error = pallet_evm_coder_substrate::execution::Error; - - fn try_into(self) -> Result { + /// Set corresponding property in CollectionLimits struct + pub fn apply_limit(&self, limits: &mut up_data_structs::CollectionLimits) -> Result<(), Error> { let value = self .value - .ok_or::("can't convert `None` value to boolean".into())?; + .ok_or::("can't convert `None` value to boolean".into())?; let value = Some(value.try_into().map_err(|error| { - Self::Error::Revert(format!( + Error::Revert(format!( "can't convert value to u32 \"{value}\" because: \"{error}\"" )) })?); @@ -227,16 +266,13 @@ impl TryInto for CollectionLimit { Some(value) => match value { 0 => Ok(Some(false)), 1 => Ok(Some(true)), - _ => { - return Err(Self::Error::Revert(format!( - "can't convert value to boolean \"{value}\"" - ))) - } + _ => Err(Error::Revert(format!( + "can't convert value to boolean \"{value}\"" + ))), }, None => Ok(None), }; - let mut limits = up_data_structs::CollectionLimits::default(); match self.field { CollectionLimitField::AccountTokenOwnership => { limits.account_token_ownership_limit = value; @@ -267,6 +303,95 @@ impl TryInto for CollectionLimit { limits.transfers_enabled = convert_value_to_bool()?; } }; + Ok(()) + } +} + +/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM. +#[derive(Debug, Default, AbiCoder)] +pub struct CollectionLimitValue { + field: CollectionLimitField, + value: U256, +} + +impl CollectionLimitValue { + /// Create [`CollectionLimitValue`] from field and value. + pub fn new(field: CollectionLimitField, value: u32) -> Self { + Self { + field, + value: value.into(), + } + } + + /// Set corresponding property in CollectionLimits struct + pub fn apply_limit(&self, limits: &mut up_data_structs::CollectionLimits) -> Result<(), Error> { + let value = self.value; + let value: u32 = value.try_into().map_err(|error| { + Error::Revert(format!( + "can't convert value to u32 \"{value}\" because: \"{error}\"" + )) + })?; + + let convert_value_to_bool = || match value { + 0 => Ok(Some(false)), + 1 => Ok(Some(true)), + _ => Err(Error::Revert(format!( + "can't convert value to boolean \"{value}\"" + ))), + }; + + match self.field { + CollectionLimitField::AccountTokenOwnership => { + limits.account_token_ownership_limit = Some(value); + } + CollectionLimitField::SponsoredDataSize => { + limits.sponsored_data_size = Some(value); + } + CollectionLimitField::SponsoredDataRateLimit => { + limits.sponsored_data_rate_limit = + Some(up_data_structs::SponsoringRateLimit::Blocks(value)); + } + CollectionLimitField::TokenLimit => { + limits.token_limit = Some(value); + } + CollectionLimitField::SponsorTransferTimeout => { + limits.sponsor_transfer_timeout = Some(value); + } + CollectionLimitField::SponsorApproveTimeout => { + limits.sponsor_approve_timeout = Some(value); + } + CollectionLimitField::OwnerCanTransfer => { + limits.owner_can_transfer = convert_value_to_bool()?; + } + CollectionLimitField::OwnerCanDestroy => { + limits.owner_can_destroy = convert_value_to_bool()?; + } + CollectionLimitField::TransferEnabled => { + limits.transfers_enabled = convert_value_to_bool()?; + } + }; + Ok(()) + } +} + +impl TryInto for CollectionLimit { + type Error = Error; + + fn try_into(self) -> Result { + let mut limits = up_data_structs::CollectionLimits::default(); + self.apply_limit(&mut limits)?; + Ok(limits) + } +} + +impl FromIterator for Result { + fn from_iter>( + iter: T, + ) -> Result { + let mut limits = up_data_structs::CollectionLimits::default(); + for value in iter.into_iter() { + value.apply_limit(&mut limits)?; + } Ok(limits) } } @@ -374,8 +499,7 @@ impl TokenPropertyPermission { /// Convert vector of [`TokenPropertyPermission`] into vector of [`up_data_structs::PropertyKeyPermission`]. pub fn into_property_key_permissions( permissions: Vec, - ) -> pallet_evm_coder_substrate::execution::Result> - { + ) -> Result, Error> { let mut perms = Vec::new(); for TokenPropertyPermission { key, permissions } in permissions { @@ -400,6 +524,57 @@ pub struct TokenUri { pub uri: String, } +/// Nested collections and permissions +#[derive(Debug, Default, AbiCoder)] +pub struct CollectionNestingAndPermission { + /// Owner of token can nest tokens under it. + pub token_owner: bool, + /// Admin of token collection can nest tokens under token. + pub collection_admin: bool, + /// If set - only tokens from specified collections can be nested. + pub restricted: Vec

, +} + +impl CollectionNestingAndPermission { + /// Create [`CollectionNesting`]. + pub fn new(token_owner: bool, collection_admin: bool, restricted: Vec
) -> Self { + Self { + token_owner, + collection_admin, + restricted, + } + } +} + +/// Collection properties +#[derive(Debug, Default, AbiCoder)] +pub struct CreateCollectionData { + /// Collection name + pub name: String, + /// Collection description + pub description: String, + /// Token prefix + pub token_prefix: String, + /// Token type (NFT, FT or RFT) + pub mode: CollectionMode, + /// Fungible token precision + pub decimals: u8, + /// Custom Properties + pub properties: Vec, + /// Permissions for token properties + pub token_property_permissions: Vec, + /// Collection admins + pub admin_list: Vec, + /// Nesting settings + pub nesting_settings: CollectionNestingAndPermission, + /// Collection limits + pub limits: Vec, + /// Collection sponsor + pub pending_sponsor: CrossAddress, + /// Extra collection flags + pub flags: CollectionFlags, +} + /// Nested collections. #[derive(Debug, Default, AbiCoder)] pub struct CollectionNesting { diff --git a/pallets/common/src/lib.rs b/pallets/common/src/lib.rs index feb9439d97..efcca90026 100644 --- a/pallets/common/src/lib.rs +++ b/pallets/common/src/lib.rs @@ -73,16 +73,15 @@ use frame_support::{ transactional, fail, }; use up_data_structs::{ - AccessMode, COLLECTION_NUMBER_LIMIT, Collection, RpcCollection, CollectionFlags, - RpcCollectionFlags, CollectionId, CreateItemData, MAX_TOKEN_PREFIX_LENGTH, - COLLECTION_ADMINS_LIMIT, TokenId, TokenChild, CollectionStats, MAX_TOKEN_OWNERSHIP, - CollectionMode, NFT_SPONSOR_TRANSFER_TIMEOUT, FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, - REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, MAX_SPONSOR_TIMEOUT, CUSTOM_DATA_LIMIT, CollectionLimits, - CreateCollectionData, SponsorshipState, CreateItemExData, SponsoringRateLimit, budget::Budget, - PhantomType, Property, CollectionProperties as CollectionPropertiesT, TokenProperties, - PropertiesPermissionMap, PropertyKey, PropertyValue, PropertyPermission, PropertiesError, - TokenOwnerError, PropertyKeyPermission, TokenData, TrySetProperty, PropertyScope, - CollectionPermissions, + AccessMode, COLLECTION_NUMBER_LIMIT, Collection, RpcCollection, RpcCollectionFlags, + CollectionId, CreateItemData, MAX_TOKEN_PREFIX_LENGTH, COLLECTION_ADMINS_LIMIT, TokenId, + TokenChild, CollectionStats, MAX_TOKEN_OWNERSHIP, CollectionMode, NFT_SPONSOR_TRANSFER_TIMEOUT, + FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, MAX_SPONSOR_TIMEOUT, + CUSTOM_DATA_LIMIT, CollectionLimits, CreateCollectionData, SponsorshipState, CreateItemExData, + SponsoringRateLimit, budget::Budget, PhantomType, Property, + CollectionProperties as CollectionPropertiesT, TokenProperties, PropertiesPermissionMap, + PropertyKey, PropertyValue, PropertyPermission, PropertiesError, TokenOwnerError, + PropertyKeyPermission, TokenData, TrySetProperty, PropertyScope, CollectionPermissions, }; use up_pov_estimate_rpc::PovInfo; @@ -216,7 +215,6 @@ impl CollectionHandle { /// /// # Arguments /// - /// * `sender`: Caller's account. /// * `sponsor`: ID of the account of the sponsor-to-be. pub fn force_set_sponsor(&mut self, sponsor: T::AccountId) -> DispatchResult { self.check_is_internal()?; @@ -867,6 +865,74 @@ pub mod pallet { >; } +/// Represents the change mode for the token property. +pub enum SetPropertyMode { + /// The token already exists. + ExistingToken, + + /// New token. + NewToken { + /// The creator of the token is the recipient. + mint_target_is_sender: bool, + }, +} + +/// Value representation with delayed initialization time. +pub struct LazyValue T> { + value: Option, + f: Option, +} + +impl T> LazyValue { + /// Create a new LazyValue. + pub fn new(f: F) -> Self { + Self { + value: None, + f: Some(f), + } + } + + /// Get the value. If it call furst time the value will be initialized. + pub fn value(&mut self) -> &T { + if self.value.is_none() { + self.value = Some(self.f.take().unwrap()()) + } + + self.value.as_ref().unwrap() + } + + /// Is value initialized. + pub fn has_value(&self) -> bool { + self.value.is_some() + } +} + +fn check_token_permissions( + collection_admin_permitted: bool, + token_owner_permitted: bool, + is_collection_admin: &mut LazyValue, + is_token_owner: &mut LazyValue, FTO>, + is_token_exist: &mut LazyValue, +) -> DispatchResult +where + T: Config, + FCA: FnOnce() -> bool, + FTO: FnOnce() -> Result, + FTE: FnOnce() -> bool, +{ + if !(collection_admin_permitted && *is_collection_admin.value() + || token_owner_permitted && (*is_token_owner.value())?) + { + fail!(>::NoPermission); + } + + let token_certainly_exist = is_token_owner.has_value() && (*is_token_owner.value())?; + if !token_certainly_exist && !is_token_exist.value() { + fail!(>::TokenNotFound); + } + Ok(()) +} + impl Pallet { /// Enshure that receiver address is correct. /// @@ -1027,8 +1093,27 @@ impl Pallet { pub fn init_collection( owner: T::CrossAccountId, payer: T::CrossAccountId, - data: CreateCollectionData, - flags: CollectionFlags, + data: CreateCollectionData, + ) -> Result { + ensure!(data.flags.is_allowed_for_user(), >::NoPermission); + Self::init_collection_internal(owner, payer, data) + } + + /// Initializes the collection with ForeignCollection flag. Returns [CollectionId] on success, [DispatchError] otherwise. + pub fn init_foreign_collection( + owner: T::CrossAccountId, + payer: T::CrossAccountId, + mut data: CreateCollectionData, + ) -> Result { + data.flags.foreign = true; + let id = Self::init_collection_internal(owner, payer, data)?; + Ok(id) + } + + fn init_collection_internal( + owner: T::CrossAccountId, + payer: T::CrossAccountId, + data: CreateCollectionData, ) -> Result { { ensure!( @@ -1060,7 +1145,7 @@ impl Pallet { token_prefix: data.token_prefix, sponsorship: data .pending_sponsor - .map(SponsorshipState::Unconfirmed) + .map(|sponsor| SponsorshipState::Unconfirmed(sponsor.as_sub().clone())) .unwrap_or_default(), limits: data .limits @@ -1072,7 +1157,7 @@ impl Pallet { Self::clamp_permissions(data.mode.clone(), &Default::default(), permissions) }) .unwrap_or_else(|| Ok(CollectionPermissions::default()))?, - flags, + flags: data.flags, }; let mut collection_properties = CollectionPropertiesT::new(); @@ -1089,6 +1174,21 @@ impl Pallet { CollectionPropertyPermissions::::insert(id, token_props_permissions); + let mut admin_amount = 0u32; + for admin in data.admin_list.iter() { + if !>::get((id, admin)) { + >::insert((id, admin), true); + admin_amount = admin_amount + .checked_add(1) + .ok_or(>::CollectionAdminCountExceeded)?; + } + } + ensure!( + admin_amount <= Self::collection_admins_limit(), + >::CollectionAdminCountExceeded, + ); + >::insert(id, admin_amount); + // Take a (non-refundable) deposit of collection creation { let mut imbalance = ::Currency>>::zero(); @@ -1218,10 +1318,6 @@ impl Pallet { /// * sets a property under the with the value provided `(, Some())` /// * removes a property under the if the value is `None` `(, None)`. /// - /// - `nesting_budget`: Limit for searching parents in-depth to check ownership. - /// - `is_token_create`: Indicates that method is called during token initialization. - /// Allows to bypass ownership check. - /// /// All affected properties should have `mutable` permission /// to be **deleted** or to be **set more than once**, /// and the sender should have permission to edit those properties. @@ -1229,35 +1325,36 @@ impl Pallet { /// This function fires an event for each property change. /// In case of an error, all the changes (including the events) will be reverted /// since the function is transactional. - pub fn modify_token_properties( + #[allow(clippy::too_many_arguments)] + pub fn modify_token_properties( collection: &CollectionHandle, sender: &T::CrossAccountId, token_id: TokenId, + is_token_exist: &mut LazyValue, properties_updates: impl Iterator)>, - is_token_create: bool, mut stored_properties: TokenProperties, - is_token_owner: impl Fn() -> Result, + is_token_owner: &mut LazyValue, FTO>, set_token_properties: impl FnOnce(TokenProperties), log: evm_coder::ethereum::Log, - ) -> DispatchResult { - let is_collection_admin = collection.is_owner_or_admin(sender); + ) -> DispatchResult + where + FTO: FnOnce() -> Result, + FTE: FnOnce() -> bool, + { + let mut is_collection_admin = LazyValue::new(|| collection.is_owner_or_admin(sender)); let permissions = Self::property_permissions(collection.id); - let mut token_owner_result = None; - let mut is_token_owner = || -> Result { - *token_owner_result.get_or_insert_with(&is_token_owner) - }; - + let mut changed = false; for (key, value) in properties_updates { let permission = permissions .get(&key) .cloned() .unwrap_or_else(PropertyPermission::none); - let is_property_exists = stored_properties.get(&key).is_some(); + let property_exists = stored_properties.get(&key).is_some(); match permission { - PropertyPermission { mutable: false, .. } if is_property_exists => { + PropertyPermission { mutable: false, .. } if property_exists => { return Err(>::NoPermission.into()); } @@ -1265,17 +1362,13 @@ impl Pallet { collection_admin, token_owner, .. - } => { - //TODO: investigate threats during public minting. - let is_token_create = - is_token_create && (collection_admin || token_owner) && value.is_some(); - if !(is_token_create - || (collection_admin && is_collection_admin) - || (token_owner && is_token_owner()?)) - { - fail!(>::NoPermission); - } - } + } => check_token_permissions::( + collection_admin, + token_owner, + &mut is_collection_admin, + is_token_owner, + is_token_exist, + )?, } match value { @@ -1293,7 +1386,11 @@ impl Pallet { } } - >::deposit_log(log.clone()); + changed = true; + } + + if changed { + >::deposit_log(log); } set_token_properties(stored_properties); @@ -2322,3 +2419,87 @@ impl From for Error { } } } + +#[cfg(any(feature = "tests", test))] +#[allow(missing_docs)] +pub mod tests { + use crate::{DispatchResult, DispatchError, LazyValue, Config}; + + const fn to_bool(u: u8) -> bool { + u != 0 + } + + #[derive(Debug)] + pub struct TestCase { + pub collection_admin: bool, + pub is_collection_admin: bool, + pub token_owner: bool, + pub is_token_owner: bool, + pub no_permission: bool, + } + + impl TestCase { + const fn new( + collection_admin: u8, + is_collection_admin: u8, + token_owner: u8, + is_token_owner: u8, + no_permission: u8, + ) -> Self { + Self { + collection_admin: to_bool(collection_admin), + is_collection_admin: to_bool(is_collection_admin), + token_owner: to_bool(token_owner), + is_token_owner: to_bool(is_token_owner), + no_permission: to_bool(no_permission), + } + } + } + + #[rustfmt::skip] + pub const TABLE: [TestCase; 16] = [ + // ┌╴collection_admin + // │ ┌╴is_collection_admin + // │ │ ┌╴token_owner + // │ │ │ ┌╴is_token_ownership + // │ │ │ │ ┌╴no_permission + /* 0*/ TestCase::new(0, 0, 0, 0, 1), + /* 1*/ TestCase::new(0, 0, 0, 1, 1), + /* 2*/ TestCase::new(0, 0, 1, 0, 1), + /* 3*/ TestCase::new(0, 0, 1, 1, 0), + /* 4*/ TestCase::new(0, 1, 0, 0, 1), + /* 5*/ TestCase::new(0, 1, 0, 1, 1), + /* 6*/ TestCase::new(0, 1, 1, 0, 1), + /* 7*/ TestCase::new(0, 1, 1, 1, 0), + /* 8*/ TestCase::new(1, 0, 0, 0, 1), + /* 9*/ TestCase::new(1, 0, 0, 1, 1), + /* 10*/ TestCase::new(1, 0, 1, 0, 1), + /* 11*/ TestCase::new(1, 0, 1, 1, 0), + /* 12*/ TestCase::new(1, 1, 0, 0, 0), + /* 13*/ TestCase::new(1, 1, 0, 1, 0), + /* 14*/ TestCase::new(1, 1, 1, 0, 0), + /* 15*/ TestCase::new(1, 1, 1, 1, 0), + ]; + + pub fn check_token_permissions( + collection_admin_permitted: bool, + token_owner_permitted: bool, + is_collection_admin: &mut LazyValue, + check_token_ownership: &mut LazyValue, FTO>, + check_token_existence: &mut LazyValue, + ) -> DispatchResult + where + T: Config, + FCA: FnOnce() -> bool, + FTO: FnOnce() -> Result, + FTE: FnOnce() -> bool, + { + crate::check_token_permissions::( + collection_admin_permitted, + token_owner_permitted, + is_collection_admin, + check_token_ownership, + check_token_existence, + ) + } +} diff --git a/pallets/configuration/CHANGELOG.md b/pallets/configuration/CHANGELOG.md index aee4f857e3..00719a9b40 100644 --- a/pallets/configuration/CHANGELOG.md +++ b/pallets/configuration/CHANGELOG.md @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file. +## [0.2.0] - 2023-06-27 + +### Major change + +- Architecture fixed: in the configuration of this pallet, bounds on the associated type were determined not by the functional requirements for this pallet itself, but by the pallet that had tight coupling with it. ## [0.1.3] - 2022-12-29 @@ -20,4 +25,4 @@ All notable changes to this project will be documented in this file. ### Other changes -- build: Upgrade polkadot to v0.9.27 2c498572636f2b34d53b1c51b7283a761a7dc90a \ No newline at end of file +- build: Upgrade polkadot to v0.9.27 2c498572636f2b34d53b1c51b7283a761a7dc90a diff --git a/pallets/configuration/Cargo.toml b/pallets/configuration/Cargo.toml index 727c9723c6..0648c2716a 100644 --- a/pallets/configuration/Cargo.toml +++ b/pallets/configuration/Cargo.toml @@ -1,7 +1,7 @@ [package] edition = "2021" name = "pallet-configuration" -version = "0.1.3" +version = "0.2.0" [dependencies] # Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it. @@ -15,18 +15,22 @@ scale-info = { workspace = true } smallvec = { workspace = true } sp-arithmetic = { workspace = true } sp-core = { workspace = true } +sp-io = { workspace = true } sp-std = { workspace = true } +up-common = { workspace = true } xcm = { workspace = true } +hex-literal = { workspace = true } + [features] default = ["std"] runtime-benchmarks = ["frame-benchmarking"] std = [ + "codec/std", "fp-evm/std", "frame-benchmarking/std", "frame-support/std", "frame-system/std", - "codec/std", "sp-arithmetic/std", "sp-core/std", "sp-std/std", diff --git a/pallets/configuration/src/benchmarking.rs b/pallets/configuration/src/benchmarking.rs index 04f8c86ad4..8c566b313d 100644 --- a/pallets/configuration/src/benchmarking.rs +++ b/pallets/configuration/src/benchmarking.rs @@ -19,7 +19,7 @@ use super::*; use frame_benchmarking::benchmarks; use frame_system::{EventRecord, RawOrigin}; -use frame_support::{assert_ok, traits::fungible::Inspect}; +use frame_support::assert_ok; fn assert_last_event(generic_event: ::RuntimeEvent) { let events = frame_system::Pallet::::events(); @@ -30,7 +30,10 @@ fn assert_last_event(generic_event: ::RuntimeEvent) { } benchmarks! { - where_clause { where T: Config } + where_clause { where + T: Config, + T::Balance: From + } set_weight_to_fee_coefficient_override { let coeff: u64 = 999; @@ -60,7 +63,7 @@ benchmarks! { let max: u32 = 999; }: { assert_ok!( - >::set_collator_selection_desired_collators(RawOrigin::Root.into(), Some(max.clone())) + >::set_collator_selection_desired_collators(RawOrigin::Root.into(), Some(max)) ); } verify { @@ -68,10 +71,10 @@ benchmarks! { } set_collator_selection_license_bond { - let bond_cost: Option> = Some(T::Currency::minimum_balance() * 10u32.into()); + let bond_cost: Option = Some(1000u32.into()); }: { assert_ok!( - >::set_collator_selection_license_bond(RawOrigin::Root.into(), bond_cost.clone()) + >::set_collator_selection_license_bond(RawOrigin::Root.into(), bond_cost) ); } verify { @@ -82,7 +85,7 @@ benchmarks! { let threshold: Option = Some(900u32.into()); }: { assert_ok!( - >::set_collator_selection_kick_threshold(RawOrigin::Root.into(), threshold.clone()) + >::set_collator_selection_kick_threshold(RawOrigin::Root.into(), threshold) ); } verify { diff --git a/pallets/configuration/src/lib.rs b/pallets/configuration/src/lib.rs index 8db7864b67..f1c3a88a78 100644 --- a/pallets/configuration/src/lib.rs +++ b/pallets/configuration/src/lib.rs @@ -22,6 +22,7 @@ use frame_support::{ pallet, weights::{WeightToFeePolynomial, WeightToFeeCoefficients, WeightToFeeCoefficient, Weight}, traits::Get, + Parameter, }; use codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; @@ -42,27 +43,32 @@ pub mod weights; mod pallet { use super::*; use frame_support::{ - traits::{fungible, Get}, - pallet_prelude::{StorageValue, ValueQuery, DispatchResult, IsType}, + traits::Get, + pallet_prelude::*, log, + dispatch::{Codec, fmt::Debug}, }; - use frame_system::{pallet_prelude::OriginFor, ensure_root, Config as SystemConfig}; - + use frame_system::{pallet_prelude::OriginFor, ensure_root, pallet_prelude::*}; + use sp_arithmetic::{FixedPointOperand, traits::AtLeast32BitUnsigned, Permill}; pub use crate::weights::WeightInfo; - pub type BalanceOf = - <::Currency as fungible::Inspect<::AccountId>>::Balance; #[pallet::config] pub trait Config: frame_system::Config { /// Overarching event type. type RuntimeEvent: From> + IsType<::RuntimeEvent>; - type Currency: fungible::Inspect - + fungible::Mutate - + fungible::MutateFreeze - + fungible::InspectHold - + fungible::MutateHold - + fungible::BalancedHold; + type Balance: Parameter + + Member + + AtLeast32BitUnsigned + + From + + Codec + + Default + + Copy + + MaybeSerializeDeserialize + + Debug + + MaxEncodedLen + + TypeInfo + + FixedPointOperand; #[pallet::constant] type DefaultWeightToFeeCoefficient: Get; @@ -79,7 +85,7 @@ mod pallet { #[pallet::constant] type DefaultCollatorSelectionMaxCollators: Get; #[pallet::constant] - type DefaultCollatorSelectionLicenseBond: Get>; + type DefaultCollatorSelectionLicenseBond: Get; #[pallet::constant] type DefaultCollatorSelectionKickThreshold: Get; @@ -94,13 +100,54 @@ mod pallet { desired_collators: Option, }, NewCollatorLicenseBond { - bond_cost: Option>, + bond_cost: Option, }, NewCollatorKickThreshold { length_in_blocks: Option, }, } + fn update_base_fee() { + let base_fee_per_gas: U256 = >::get().into(); + let elasticity: Permill = Permill::zero(); + // twox_128(BaseFee) ++ twox_128(BaseFeePerGas) + sp_io::storage::set( + &hex_literal::hex!("c1fef3b7207c11a52df13c12884e77263864ade243c642793ebcfe9e16f454ca"), + &base_fee_per_gas.encode(), + ); + // twox_128(BaseFee) ++ twox_128(Elasticity) + sp_io::storage::set( + &hex_literal::hex!("c1fef3b7207c11a52df13c12884e772609bc3a1e532c9cb85d57feed02cbff8e"), + &elasticity.encode(), + ); + } + + /// We update our default weights on every release + #[pallet::hooks] + impl Hooks> for Pallet { + fn on_runtime_upgrade() -> Weight { + update_base_fee::(); + T::DbWeight::get().reads_writes(1, 2) + } + } + + #[pallet::genesis_config] + pub struct GenesisConfig(PhantomData); + + #[cfg(feature = "std")] + impl Default for GenesisConfig { + fn default() -> Self { + Self(Default::default()) + } + } + + #[pallet::genesis_build] + impl GenesisBuild for GenesisConfig { + fn build(&self) { + update_base_fee::(); + } + } + #[pallet::error] pub enum Error { InconsistentConfiguration, @@ -130,7 +177,7 @@ mod pallet { #[pallet::storage] pub type CollatorSelectionLicenseBondOverride = StorageValue< - Value = BalanceOf, + Value = T::Balance, QueryKind = ValueQuery, OnEmpty = T::DefaultCollatorSelectionLicenseBond, >; @@ -171,6 +218,9 @@ mod pallet { } else { >::kill(); } + // This code should not be called in production, but why keep development in the + // inconsistent state + update_base_fee::(); Ok(()) } @@ -221,7 +271,7 @@ mod pallet { #[pallet::weight(T::WeightInfo::set_collator_selection_license_bond())] pub fn set_collator_selection_license_bond( origin: OriginFor, - amount: Option>, + amount: Option<::Balance>, ) -> DispatchResult { ensure_root(origin)?; if let Some(amount) = amount { diff --git a/pallets/evm-coder-substrate/procedural/src/lib.rs b/pallets/evm-coder-substrate/procedural/src/lib.rs index 6ab138bdb9..b52395a402 100644 --- a/pallets/evm-coder-substrate/procedural/src/lib.rs +++ b/pallets/evm-coder-substrate/procedural/src/lib.rs @@ -52,7 +52,7 @@ pub fn derive_predispatch(item: proc_macro::TokenStream) -> proc_macro::TokenStr let (impl_generics, ty_generics, _where_clause) = input.generics.split_for_impl(); let ident = &input.ident; let Data::Enum(data) = &input.data else { - return Err(Error::new_spanned(input, "PreDispatch input is enum")) + return Err(Error::new_spanned(input, "PreDispatch input is enum")); }; let matching = data diff --git a/pallets/evm-coder-substrate/src/lib.rs b/pallets/evm-coder-substrate/src/lib.rs index 3ceaee4ef2..259a904086 100644 --- a/pallets/evm-coder-substrate/src/lib.rs +++ b/pallets/evm-coder-substrate/src/lib.rs @@ -26,7 +26,7 @@ use execution::PreDispatch; use frame_support::dispatch::Weight; use core::marker::PhantomData; -use sp_std::cell::RefCell; +use sp_std::{cell::RefCell, vec::Vec}; use codec::Decode; use frame_support::pallet_prelude::DispatchError; @@ -41,25 +41,23 @@ use sp_core::{Get, H160}; // #[cfg(feature = "runtime-benchmarks")] // pub mod benchmarking; pub mod execution; -pub use evm_coder::*; #[doc(hidden)] pub use spez::spez; use evm_coder::{ - abi::{AbiReader, AbiWrite, AbiWriter}, types::{Msg, Value}, + AbiEncode, }; pub use pallet::*; +pub use evm_coder::{ResultWithPostInfoOf, Contract, abi, solidity_interface, ToLog, types}; #[frame_support::pallet] pub mod pallet { use super::*; - use frame_system::ensure_signed; pub use frame_support::dispatch::DispatchResult; - use frame_system::pallet_prelude::*; /// DispatchError is opaque, but we need to somehow extract correct error in case of OutOfGas failure /// So we have this pallet, which defines OutOfGas error, and knews its own id to check if DispatchError @@ -77,16 +75,6 @@ pub mod pallet { #[pallet::pallet] pub struct Pallet(_); - - #[pallet::call] - impl Pallet { - #[pallet::call_index(0)] - #[pallet::weight(0)] - pub fn empty_call(origin: OriginFor) -> DispatchResult { - let _sender = ensure_signed(origin)?; - Ok(()) - } - } } // From instabul hardfork configuration: https://github.com/rust-blockchain/evm/blob/fd4fd6acc0ca3208d6770fdb3ba407c94cdf97c6/runtime/src/lib.rs#L284 @@ -180,7 +168,7 @@ impl SubstrateRecorder { pub fn evm_to_precompile_output( self, handle: &mut impl PrecompileHandle, - result: execution::Result>, + result: execution::Result>>, ) -> Option { use execution::Error; // We ignore error here, as it should not occur, as we have our own bookkeeping of gas @@ -188,18 +176,13 @@ impl SubstrateRecorder { Some(match result { Ok(Some(v)) => Ok(PrecompileOutput { exit_status: ExitSucceed::Returned, - output: v.finish(), + output: v, }), Ok(None) => return None, - Err(Error::Revert(e)) => { - let mut writer = AbiWriter::new_call(evm_coder::fn_selector!(Error(string))); - (&e as &str).abi_write(&mut writer); - - Err(PrecompileFailure::Revert { - exit_status: ExitRevert::Reverted, - output: writer.finish(), - }) - } + Err(Error::Revert(e)) => Err(PrecompileFailure::Revert { + exit_status: ExitRevert::Reverted, + output: (&e as &str,).abi_encode_call(evm_coder::fn_selector!(Error(string))), + }), Err(Error::Fatal(f)) => Err(PrecompileFailure::Fatal { exit_status: f }), Err(Error::Error(e)) => Err(e.into()), }) @@ -278,7 +261,7 @@ where C: evm_coder::Call + PreDispatch, E: evm_coder::Callable + WithRecorder, H: PrecompileHandle, - execution::ResultWithPostInfo: From>, + execution::ResultWithPostInfo>: From>>, { let result = call_internal( handle.context().caller, @@ -294,18 +277,23 @@ fn call_internal( e: &mut E, value: Value, input: &[u8], -) -> execution::Result> +) -> execution::Result>> where T: Config, C: evm_coder::Call + PreDispatch, E: Contract + evm_coder::Callable + WithRecorder, - execution::ResultWithPostInfo: From>, + execution::ResultWithPostInfo>: From>>, { - let (selector, mut reader) = AbiReader::new_call(input)?; - let call = C::parse(selector, &mut reader)?; + let call = C::parse_full(input)?; if call.is_none() { - let selector = u32::from_be_bytes(selector); - return Err(format!("unrecognized selector: 0x{selector:0<8x}").into()); + let selector = if input.len() >= 4 { + let mut selector = [0; 4]; + selector.copy_from_slice(&input[..4]); + u32::from_be_bytes(selector) + } else { + 0 + }; + return Err(format!("unrecognized selector: 0x{selector:0>8x}").into()); } let call = call.unwrap(); @@ -348,7 +336,7 @@ mod tests { ERC165Call(ERC165Call, PhantomData T>), OtherCall(ERC165Call), - #[weight(Weight::from_ref_time(a + b))] + #[weight(Weight::from_parts(a + b, 0))] Example { a: u64, b: u64, diff --git a/pallets/evm-contract-helpers/src/eth.rs b/pallets/evm-contract-helpers/src/eth.rs index cec8552a38..542614f773 100644 --- a/pallets/evm-contract-helpers/src/eth.rs +++ b/pallets/evm-contract-helpers/src/eth.rs @@ -19,7 +19,7 @@ extern crate alloc; use core::marker::PhantomData; use evm_coder::{ - abi::{AbiWriter, AbiType}, + abi::{AbiType, AbiEncode}, generate_stubgen, solidity_interface, types::*, ToLog, @@ -370,11 +370,8 @@ where { return Some(Err(PrecompileFailure::Revert { exit_status: ExitRevert::Reverted, - output: { - let mut writer = AbiWriter::new_call(evm_coder::fn_selector!(Error(string))); - writer.string("Target contract is allowlisted"); - writer.finish() - }, + output: ("target contract is allowlisted",) + .abi_encode_call(evm_coder::fn_selector!(Error(string))), })); } diff --git a/pallets/evm-contract-helpers/src/lib.rs b/pallets/evm-contract-helpers/src/lib.rs index 011bb83763..68df173789 100644 --- a/pallets/evm-contract-helpers/src/lib.rs +++ b/pallets/evm-contract-helpers/src/lib.rs @@ -32,7 +32,6 @@ pub const MAX_FEE_LIMITED_METHODS: u32 = 5; #[frame_support::pallet] pub mod pallet { pub use super::*; - use crate::eth::ContractHelpersEvents; use frame_support::{pallet_prelude::*, sp_runtime::DispatchResult}; use frame_system::{pallet_prelude::OriginFor, ensure_root}; use sp_core::{H160, U256}; diff --git a/pallets/foreign-assets/src/lib.rs b/pallets/foreign-assets/src/lib.rs index 93c13aa3b9..6be344d960 100644 --- a/pallets/foreign-assets/src/lib.rs +++ b/pallets/foreign-assets/src/lib.rs @@ -42,9 +42,9 @@ use frame_support::{ RuntimeDebug, }; use frame_system::pallet_prelude::*; -use up_data_structs::{CollectionMode}; -use pallet_fungible::{Pallet as PalletFungible}; -use scale_info::{TypeInfo}; +use up_data_structs::CollectionMode; +use pallet_fungible::Pallet as PalletFungible; +use scale_info::TypeInfo; use sp_runtime::{ traits::{One, Zero}, ArithmeticError, @@ -304,7 +304,7 @@ pub mod module { .collect::>(); description.append(&mut name.clone()); - let data: CreateCollectionData = CreateCollectionData { + let data: CreateCollectionData = CreateCollectionData { name: name.try_into().unwrap(), description: description.try_into().unwrap(), mode: CollectionMode::Fungible(md.decimals), diff --git a/pallets/fungible/src/benchmarking.rs b/pallets/fungible/src/benchmarking.rs index ed6280bb8f..2ced45af3b 100644 --- a/pallets/fungible/src/benchmarking.rs +++ b/pallets/fungible/src/benchmarking.rs @@ -31,9 +31,7 @@ fn create_collection( create_collection_raw( owner, CollectionMode::Fungible(0), - |owner: T::CrossAccountId, data| { - >::init_collection(owner.clone(), owner, data, Default::default()) - }, + |owner: T::CrossAccountId, data| >::init_collection(owner.clone(), owner, data), FungibleHandle::cast, ) } @@ -55,7 +53,7 @@ benchmarks! { let data = (0..b).map(|i| { bench_init!(to: cross_sub(i);); (to, 200) - }).collect::>().try_into().unwrap(); + }).collect::>(); }: {>::create_multiple_items(&collection, &sender, data, &Unlimited)?} burn_item { diff --git a/pallets/fungible/src/lib.rs b/pallets/fungible/src/lib.rs index c92f4fa270..96371e7179 100644 --- a/pallets/fungible/src/lib.rs +++ b/pallets/fungible/src/lib.rs @@ -87,8 +87,8 @@ use frame_support::{ }; use pallet_evm::account::CrossAccountId; use up_data_structs::{ - AccessMode, CollectionId, CollectionFlags, TokenId, CreateCollectionData, - mapping::TokenAddressMapping, budget::Budget, PropertyKey, Property, + AccessMode, CollectionId, TokenId, CreateCollectionData, mapping::TokenAddressMapping, + budget::Budget, PropertyKey, Property, }; use pallet_common::{ Error as CommonError, Event as CommonEvent, Pallet as PalletCommon, @@ -219,28 +219,18 @@ impl Pallet { pub fn init_collection( owner: T::CrossAccountId, payer: T::CrossAccountId, - data: CreateCollectionData, - flags: CollectionFlags, + data: CreateCollectionData, ) -> Result { - >::init_collection(owner, payer, data, flags) + >::init_collection(owner, payer, data) } /// Initializes the collection with ForeignCollection flag. Returns [CollectionId] on success, [DispatchError] otherwise. pub fn init_foreign_collection( owner: T::CrossAccountId, payer: T::CrossAccountId, - data: CreateCollectionData, + data: CreateCollectionData, ) -> Result { - let id = >::init_collection( - owner, - payer, - data, - CollectionFlags { - foreign: true, - ..Default::default() - }, - )?; - Ok(id) + >::init_foreign_collection(owner, payer, data) } /// Destroys a collection. diff --git a/pallets/fungible/src/stubs/UniqueFungible.raw b/pallets/fungible/src/stubs/UniqueFungible.raw index 44f66929fc..85c402efc4 100644 Binary files a/pallets/fungible/src/stubs/UniqueFungible.raw and b/pallets/fungible/src/stubs/UniqueFungible.raw differ diff --git a/pallets/fungible/src/stubs/UniqueFungible.sol b/pallets/fungible/src/stubs/UniqueFungible.sol index eee96c7961..097ca608e8 100644 --- a/pallets/fungible/src/stubs/UniqueFungible.sol +++ b/pallets/fungible/src/stubs/UniqueFungible.sol @@ -18,7 +18,7 @@ contract ERC165 is Dummy { } /// @title A contract that allows you to work with collections. -/// @dev the ERC-165 identifier for this interface is 0x2a14cfd1 +/// @dev the ERC-165 identifier for this interface is 0xb34d97e9 contract Collection is Dummy, ERC165 { // /// Set collection property. // /// @@ -230,48 +230,64 @@ contract Collection is Dummy, ERC165 { // dummy = 0; // } - /// Toggle accessibility of collection nesting. - /// - /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled' - /// @dev EVM selector for this function is: 0x112d4586, - /// or in textual repr: setCollectionNesting(bool) - function setCollectionNesting(bool enable) public { + /// @dev EVM selector for this function is: 0x0b9f3890, + /// or in textual repr: setCollectionNesting((bool,bool,address[])) + function setCollectionNesting(CollectionNestingAndPermission memory collectionNestingAndPermissions) public { require(false, stub_error); - enable; + collectionNestingAndPermissions; dummy = 0; } - /// Toggle accessibility of collection nesting. - /// - /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled' - /// @param collections Addresses of collections that will be available for nesting. - /// @dev EVM selector for this function is: 0x64872396, - /// or in textual repr: setCollectionNesting(bool,address[]) - function setCollectionNesting(bool enable, address[] memory collections) public { - require(false, stub_error); - enable; - collections; - dummy = 0; - } + // /// Toggle accessibility of collection nesting. + // /// + // /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled' + // /// @dev EVM selector for this function is: 0x112d4586, + // /// or in textual repr: setCollectionNesting(bool) + // function setCollectionNesting(bool enable) public { + // require(false, stub_error); + // enable; + // dummy = 0; + // } - /// Returns nesting for a collection - /// @dev EVM selector for this function is: 0x22d25bfe, - /// or in textual repr: collectionNestingRestrictedCollectionIds() - function collectionNestingRestrictedCollectionIds() public view returns (CollectionNesting memory) { - require(false, stub_error); - dummy; - return CollectionNesting(false, new uint256[](0)); - } + // /// Toggle accessibility of collection nesting. + // /// + // /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled' + // /// @param collections Addresses of collections that will be available for nesting. + // /// @dev EVM selector for this function is: 0x64872396, + // /// or in textual repr: setCollectionNesting(bool,address[]) + // function setCollectionNesting(bool enable, address[] memory collections) public { + // require(false, stub_error); + // enable; + // collections; + // dummy = 0; + // } - /// Returns permissions for a collection - /// @dev EVM selector for this function is: 0x5b2eaf4b, - /// or in textual repr: collectionNestingPermissions() - function collectionNestingPermissions() public view returns (CollectionNestingPermission[] memory) { + /// @dev EVM selector for this function is: 0x92c660a8, + /// or in textual repr: collectionNesting() + function collectionNesting() public view returns (CollectionNestingAndPermission memory) { require(false, stub_error); dummy; - return new CollectionNestingPermission[](0); + return CollectionNestingAndPermission(false, false, new address[](0)); } + // /// Returns nesting for a collection + // /// @dev EVM selector for this function is: 0x22d25bfe, + // /// or in textual repr: collectionNestingRestrictedCollectionIds() + // function collectionNestingRestrictedCollectionIds() public view returns (CollectionNesting memory) { + // require(false, stub_error); + // dummy; + // return CollectionNesting(false,new uint256[](0)); + // } + + // /// Returns permissions for a collection + // /// @dev EVM selector for this function is: 0x5b2eaf4b, + // /// or in textual repr: collectionNestingPermissions() + // function collectionNestingPermissions() public view returns (CollectionNestingPermission[] memory) { + // require(false, stub_error); + // dummy; + // return new CollectionNestingPermission[](0); + // } + /// Set the collection access method. /// @param mode Access mode /// @dev EVM selector for this function is: 0x41835d4c, @@ -469,6 +485,16 @@ struct CollectionNesting { uint256[] ids; } +/// Nested collections and permissions +struct CollectionNestingAndPermission { + /// Owner of token can nest tokens under it. + bool token_owner; + /// Admin of token collection can nest tokens under token. + bool collection_admin; + /// If set - only tokens from specified collections can be nested. + address[] restricted; +} + /// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM. struct CollectionLimit { CollectionLimitField field; diff --git a/pallets/gov-origins/Cargo.toml b/pallets/gov-origins/Cargo.toml new file mode 100644 index 0000000000..48b669582b --- /dev/null +++ b/pallets/gov-origins/Cargo.toml @@ -0,0 +1,32 @@ +################################################################################ +# Package + +[package] +authors = ['Unique Network '] +description = 'Unique App Governance Origins Pallet' +edition = '2021' +homepage = 'https://unique.network' +license = 'GPLv3' +name = 'pallet-gov-origins' +repository = 'https://github.com/UniqueNetwork/unique-chain' +version = '0.2.1' + +[package.metadata.docs.rs] +targets = ['x86_64-unknown-linux-gnu'] + +[features] +default = ['std'] +std = ['frame-support/std', 'frame-system/std', 'parity-scale-codec/std'] +try-runtime = ["frame-support/try-runtime"] + +[dependencies] +################################################################################ +# Substrate Dependencies + +# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it. +parity-scale-codec = { workspace = true } + +scale-info = { workspace = true } + +frame-support = { workspace = true } +frame-system = { workspace = true } diff --git a/pallets/gov-origins/src/lib.rs b/pallets/gov-origins/src/lib.rs new file mode 100644 index 0000000000..ecd0d2548c --- /dev/null +++ b/pallets/gov-origins/src/lib.rs @@ -0,0 +1,39 @@ +// Copyright 2019-2023 Unique Network (Gibraltar) Ltd. +// This file is part of Unique Network. + +// Unique Network is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Unique Network is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Unique Network. If not, see . + +#![cfg_attr(not(feature = "std"), no_std)] + +use frame_support::pallet_prelude::*; + +pub use pallet::*; + +#[frame_support::pallet] +pub mod pallet { + use super::*; + #[pallet::config] + pub trait Config: frame_system::Config {} + + #[pallet::pallet] + pub struct Pallet(_); + + #[derive(PartialEq, Eq, Clone, MaxEncodedLen, Encode, Decode, TypeInfo, RuntimeDebug)] + #[pallet::origin] + #[non_exhaustive] + pub enum Origin { + /// Origin able to send proposal from fellowship collective to democracy pallet. + FellowshipProposition, + } +} diff --git a/pallets/identity/src/benchmarking.rs b/pallets/identity/src/benchmarking.rs index d9d79158fd..16d416229e 100644 --- a/pallets/identity/src/benchmarking.rs +++ b/pallets/identity/src/benchmarking.rs @@ -35,6 +35,7 @@ //! Identity pallet benchmarking. #![cfg(feature = "runtime-benchmarks")] +#![allow(clippy::no_effect)] use super::*; diff --git a/pallets/identity/src/tests.rs b/pallets/identity/src/tests.rs index 486c249b5e..019acaf025 100644 --- a/pallets/identity/src/tests.rs +++ b/pallets/identity/src/tests.rs @@ -67,7 +67,7 @@ frame_support::construct_runtime!( parameter_types! { pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_ref_time(1024)); + frame_system::limits::BlockWeights::simple_max(frame_support::weights::Weight::from_parts(1024, 0)); } impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; diff --git a/pallets/identity/src/types.rs b/pallets/identity/src/types.rs index 057715b114..4fbcef5596 100644 --- a/pallets/identity/src/types.rs +++ b/pallets/identity/src/types.rs @@ -481,7 +481,7 @@ mod tests { let mut registry = scale_info::Registry::new(); let type_id = registry.register_type(&scale_info::meta_type::()); let registry: scale_info::PortableRegistry = registry.into(); - let type_info = registry.resolve(type_id.id()).unwrap(); + let type_info = registry.resolve(type_id.id).unwrap(); let check_type_info = |data: &Data| { let variant_name = match data { @@ -492,20 +492,20 @@ mod tests { Data::ShaThree256(_) => "ShaThree256".to_string(), Data::Raw(bytes) => format!("Raw{}", bytes.len()), }; - if let scale_info::TypeDef::Variant(variant) = type_info.type_def() { + if let scale_info::TypeDef::Variant(variant) = &type_info.type_def { let variant = variant - .variants() + .variants .iter() - .find(|v| v.name() == &variant_name) + .find(|v| v.name == variant_name) .expect(&format!("Expected to find variant {}", variant_name)); let field_arr_len = variant - .fields() + .fields .first() - .and_then(|f| registry.resolve(f.ty().id())) + .and_then(|f| registry.resolve(f.ty.id)) .map(|ty| { - if let scale_info::TypeDef::Array(arr) = ty.type_def() { - arr.len() + if let scale_info::TypeDef::Array(arr) = &ty.type_def { + arr.len } else { panic!("Should be an array type") } @@ -513,7 +513,7 @@ mod tests { .unwrap_or(0); let encoded = data.encode(); - assert_eq!(encoded[0], variant.index()); + assert_eq!(encoded[0], variant.index); assert_eq!(encoded.len() as u32 - 1, field_arr_len); } else { panic!("Should be a variant type") diff --git a/pallets/inflation/src/lib.rs b/pallets/inflation/src/lib.rs index 91b6f8752f..47f1eb2e60 100644 --- a/pallets/inflation/src/lib.rs +++ b/pallets/inflation/src/lib.rs @@ -163,7 +163,10 @@ pub mod pallet { /// /// * inflation_start_relay_block: The relay chain block at which inflation should start #[pallet::call_index(0)] - #[pallet::weight(0)] + // Constant weights are deprecated, + // but in this case writing benchmark is not feasible, `start_inflation` call + // might be even moved to GenesisConfig + #[pallet::weight(Weight::from_parts(0, 0))] pub fn start_inflation( origin: OriginFor, inflation_start_relay_block: T::BlockNumber, diff --git a/pallets/inflation/src/tests.rs b/pallets/inflation/src/tests.rs index d90819c953..72b247ff08 100644 --- a/pallets/inflation/src/tests.rs +++ b/pallets/inflation/src/tests.rs @@ -78,7 +78,7 @@ frame_support::construct_runtime!( parameter_types! { pub const BlockHashCount: u64 = 250; pub BlockWeights: frame_system::limits::BlockWeights = - frame_system::limits::BlockWeights::simple_max(Weight::from_ref_time(1024)); + frame_system::limits::BlockWeights::simple_max(Weight::from_parts(1024, 0)); pub const SS58Prefix: u8 = 42; } diff --git a/pallets/maintenance/src/lib.rs b/pallets/maintenance/src/lib.rs index e86ca882c8..f34caabe80 100644 --- a/pallets/maintenance/src/lib.rs +++ b/pallets/maintenance/src/lib.rs @@ -25,10 +25,9 @@ pub mod weights; #[frame_support::pallet] pub mod pallet { + use frame_support::{dispatch::*, pallet_prelude::*}; - use frame_support::{ - traits::{QueryPreimage, StorePreimage}, - }; + use frame_support::traits::{QueryPreimage, StorePreimage, EnsureOrigin}; use frame_system::pallet_prelude::*; use sp_core::H256; @@ -39,21 +38,21 @@ pub mod pallet { /// The overarching event type. type RuntimeEvent: From> + IsType<::RuntimeEvent>; - /// The runtime origin type. - type RuntimeOrigin: From> - + IsType<::RuntimeOrigin>; - /// The aggregated call type. type RuntimeCall: Parameter - + Dispatchable< - RuntimeOrigin = ::RuntimeOrigin, - PostInfo = PostDispatchInfo, - > + GetDispatchInfo + + Dispatchable + + GetDispatchInfo + From>; /// The preimage provider with which we look up call hashes to get the call. type Preimages: QueryPreimage + StorePreimage; + /// The Origin that has the right to enable or disable the maintenance mode. + type ManagerOrigin: EnsureOrigin<::RuntimeOrigin>; + + /// The Origin that has the right to execute preimage. + type PreimageOrigin: EnsureOrigin<::RuntimeOrigin>; + /// Weight information for extrinsics in this pallet. type WeightInfo: WeightInfo; } @@ -80,7 +79,7 @@ pub mod pallet { #[pallet::call_index(0)] #[pallet::weight(::WeightInfo::enable())] pub fn enable(origin: OriginFor) -> DispatchResult { - ensure_root(origin)?; + T::ManagerOrigin::ensure_origin(origin)?; >::set(true); @@ -92,7 +91,7 @@ pub mod pallet { #[pallet::call_index(1)] #[pallet::weight(::WeightInfo::disable())] pub fn disable(origin: OriginFor) -> DispatchResult { - ensure_root(origin)?; + T::ManagerOrigin::ensure_origin(origin)?; >::set(false); @@ -114,7 +113,7 @@ pub mod pallet { ) -> DispatchResultWithPostInfo { use codec::Decode; - ensure_root(origin)?; + T::PreimageOrigin::ensure_origin(origin.clone())?; let data = T::Preimages::fetch(&hash, None)?; weight_bound.set_proof_size( @@ -136,7 +135,7 @@ pub mod pallet { DispatchError::Exhausted ); - match call.dispatch(frame_system::RawOrigin::Root.into()) { + match call.dispatch(origin) { Ok(_) => Ok(Pays::No.into()), Err(error_and_info) => Err(DispatchErrorWithPostInfo { post_info: Pays::No.into(), diff --git a/pallets/nonfungible/src/benchmarking.rs b/pallets/nonfungible/src/benchmarking.rs index e28a7d0438..ec582d4762 100644 --- a/pallets/nonfungible/src/benchmarking.rs +++ b/pallets/nonfungible/src/benchmarking.rs @@ -43,12 +43,12 @@ fn create_max_item( owner: T::CrossAccountId, ) -> Result { >::create_item( - &collection, + collection, sender, create_max_item_data::(owner), &Unlimited, )?; - Ok(TokenId(>::get(&collection.id))) + Ok(TokenId(>::get(collection.id))) } fn create_collection( @@ -57,9 +57,7 @@ fn create_collection( create_collection_raw( owner, CollectionMode::NFT, - |owner: T::CrossAccountId, data| { - >::init_collection(owner.clone(), owner, data, Default::default()) - }, + |owner: T::CrossAccountId, data| >::init_collection(owner.clone(), owner, data), NonfungibleHandle::cast, ) } @@ -200,7 +198,7 @@ benchmarks! { value: property_value(), }).collect::>(); let item = create_max_item(&collection, &owner, owner.clone())?; - }: {>::set_token_properties(&collection, &owner, item, props.into_iter(), false, &Unlimited)?} + }: {>::set_token_properties(&collection, &owner, item, props.into_iter(), SetPropertyMode::ExistingToken, &Unlimited)?} delete_token_properties { let b in 0..MAX_PROPERTIES_PER_ITEM; @@ -222,7 +220,7 @@ benchmarks! { value: property_value(), }).collect::>(); let item = create_max_item(&collection, &owner, owner.clone())?; - >::set_token_properties(&collection, &owner, item, props.into_iter(), false, &Unlimited)?; + >::set_token_properties(&collection, &owner, item, props.into_iter(), SetPropertyMode::ExistingToken, &Unlimited)?; let to_delete = (0..b).map(|k| property_key(k as usize)).collect::>(); }: {>::delete_token_properties(&collection, &owner, item, to_delete.into_iter(), &Unlimited)?} diff --git a/pallets/nonfungible/src/common.rs b/pallets/nonfungible/src/common.rs index 64aaeeed31..9044e15fa6 100644 --- a/pallets/nonfungible/src/common.rs +++ b/pallets/nonfungible/src/common.rs @@ -245,7 +245,7 @@ impl CommonCollectionOperations for NonfungibleHandle { &sender, token_id, properties.into_iter(), - false, + pallet_common::SetPropertyMode::ExistingToken, nesting_budget, ), weight, diff --git a/pallets/nonfungible/src/erc.rs b/pallets/nonfungible/src/erc.rs index e4f7887689..bb617e5358 100644 --- a/pallets/nonfungible/src/erc.rs +++ b/pallets/nonfungible/src/erc.rs @@ -194,7 +194,7 @@ impl NonfungibleHandle { &caller, TokenId(token_id), properties.into_iter(), - false, + pallet_common::SetPropertyMode::ExistingToken, &nesting_budget, ) .map_err(dispatch_to_evm::) @@ -939,9 +939,8 @@ where /// @notice Returns next free NFT ID. fn next_token_id(&self) -> Result { self.consume_store_reads(1)?; - Ok(>::get(self.id) - .checked_add(1) - .ok_or("item id overflow")? + Ok(>::next_token_id(self) + .map_err(dispatch_to_evm::)? .into()) } diff --git a/pallets/nonfungible/src/lib.rs b/pallets/nonfungible/src/lib.rs index 2f266e8242..5889431482 100644 --- a/pallets/nonfungible/src/lib.rs +++ b/pallets/nonfungible/src/lib.rs @@ -100,16 +100,16 @@ use frame_support::{ dispatch::{PostDispatchInfo, Pays}, }; use up_data_structs::{ - AccessMode, CollectionId, CollectionFlags, CustomDataLimit, TokenId, CreateCollectionData, - CreateNftExData, mapping::TokenAddressMapping, budget::Budget, Property, PropertyKey, - PropertyValue, PropertyKeyPermission, PropertyScope, TrySetProperty, TokenChild, - AuxPropertyValue, PropertiesPermissionMap, TokenProperties as TokenPropertiesT, + AccessMode, CollectionId, CustomDataLimit, TokenId, CreateCollectionData, CreateNftExData, + mapping::TokenAddressMapping, budget::Budget, Property, PropertyKey, PropertyValue, + PropertyKeyPermission, PropertyScope, TrySetProperty, TokenChild, AuxPropertyValue, + PropertiesPermissionMap, TokenProperties as TokenPropertiesT, }; use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm}; use pallet_common::{ Error as CommonError, Pallet as PalletCommon, Event as CommonEvent, CollectionHandle, eth::collection_id_to_address, SelfWeightOf as PalletCommonWeightOf, - weights::WeightInfo as CommonWeightInfo, helpers::add_weight_to_post_info, + weights::WeightInfo as CommonWeightInfo, helpers::add_weight_to_post_info, SetPropertyMode, }; use pallet_structure::{Pallet as PalletStructure, Error as StructureError}; use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder}; @@ -424,10 +424,9 @@ impl Pallet { pub fn init_collection( owner: T::CrossAccountId, payer: T::CrossAccountId, - data: CreateCollectionData, - flags: CollectionFlags, + data: CreateCollectionData, ) -> Result { - >::init_collection(owner, payer, data, flags) + >::init_collection(owner, payer, data) } /// Destroy NFT collection @@ -585,8 +584,6 @@ impl Pallet { /// A batch operation to add, edit or remove properties for a token. /// /// - `nesting_budget`: Limit for searching parents in-depth to check ownership. - /// - `is_token_create`: Indicates that method is called during token initialization. - /// Allows to bypass ownership check. /// /// All affected properties should have `mutable` permission /// to be **deleted** or to be **set more than once**, @@ -601,10 +598,17 @@ impl Pallet { sender: &T::CrossAccountId, token_id: TokenId, properties_updates: impl Iterator)>, - is_token_create: bool, + mode: SetPropertyMode, nesting_budget: &dyn Budget, ) -> DispatchResult { - let is_token_owner = || { + let mut is_token_owner = pallet_common::LazyValue::new(|| { + if let SetPropertyMode::NewToken { + mint_target_is_sender, + } = mode + { + return Ok(mint_target_is_sender); + } + let is_owned = >::check_indirectly_owned( sender.clone(), collection.id, @@ -614,7 +618,10 @@ impl Pallet { )?; Ok(is_owned) - }; + }); + + let mut is_token_exist = + pallet_common::LazyValue::new(|| Self::token_exists(collection, token_id)); let stored_properties = >::get((collection.id, token_id)); @@ -622,10 +629,10 @@ impl Pallet { collection, sender, token_id, + &mut is_token_exist, properties_updates, - is_token_create, stored_properties, - is_token_owner, + &mut is_token_owner, |properties| >::set((collection.id, token_id), properties), erc::ERC721TokenEvent::TokenChanged { token_id: token_id.into(), @@ -634,6 +641,19 @@ impl Pallet { ) } + pub fn next_token_id(collection: &NonfungibleHandle) -> Result { + let next_token_id = >::get(collection.id) + .checked_add(1) + .ok_or(>::CollectionTokenLimitExceeded)?; + + ensure!( + collection.limits.token_limit() >= next_token_id, + >::CollectionTokenLimitExceeded + ); + + Ok(TokenId(next_token_id)) + } + /// Batch operation to add or edit properties for the token /// /// Same as [`modify_token_properties`] but doesn't allow to remove properties @@ -644,7 +664,7 @@ impl Pallet { sender: &T::CrossAccountId, token_id: TokenId, properties: impl Iterator, - is_token_create: bool, + mode: SetPropertyMode, nesting_budget: &dyn Budget, ) -> DispatchResult { Self::modify_token_properties( @@ -652,7 +672,7 @@ impl Pallet { sender, token_id, properties.map(|p| (p.key, Some(p.value))), - is_token_create, + mode, nesting_budget, ) } @@ -669,14 +689,12 @@ impl Pallet { property: Property, nesting_budget: &dyn Budget, ) -> DispatchResult { - let is_token_create = false; - Self::set_token_properties( collection, sender, token_id, [property].into_iter(), - is_token_create, + SetPropertyMode::ExistingToken, nesting_budget, ) } @@ -693,14 +711,12 @@ impl Pallet { property_keys: impl Iterator, nesting_budget: &dyn Budget, ) -> DispatchResult { - let is_token_create = false; - Self::modify_token_properties( collection, sender, token_id, property_keys.into_iter().map(|key| (key, None)), - is_token_create, + SetPropertyMode::ExistingToken, nesting_budget, ) } @@ -985,7 +1001,9 @@ impl Pallet { sender, TokenId(token), data.properties.clone().into_iter(), - true, + SetPropertyMode::NewToken { + mint_target_is_sender: sender.conv_eq(&data.owner), + }, nesting_budget, ) { return TransactionOutcome::Rollback(Err(e)); diff --git a/pallets/nonfungible/src/stubs/UniqueNFT.raw b/pallets/nonfungible/src/stubs/UniqueNFT.raw index bae4e0ff85..423c0fbb54 100644 Binary files a/pallets/nonfungible/src/stubs/UniqueNFT.raw and b/pallets/nonfungible/src/stubs/UniqueNFT.raw differ diff --git a/pallets/nonfungible/src/stubs/UniqueNFT.sol b/pallets/nonfungible/src/stubs/UniqueNFT.sol index 4182b3bee7..0277cc89db 100644 --- a/pallets/nonfungible/src/stubs/UniqueNFT.sol +++ b/pallets/nonfungible/src/stubs/UniqueNFT.sol @@ -165,7 +165,7 @@ enum TokenPermissionField { } /// @title A contract that allows you to work with collections. -/// @dev the ERC-165 identifier for this interface is 0x2a14cfd1 +/// @dev the ERC-165 identifier for this interface is 0xb34d97e9 contract Collection is Dummy, ERC165 { // /// Set collection property. // /// @@ -377,48 +377,64 @@ contract Collection is Dummy, ERC165 { // dummy = 0; // } - /// Toggle accessibility of collection nesting. - /// - /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled' - /// @dev EVM selector for this function is: 0x112d4586, - /// or in textual repr: setCollectionNesting(bool) - function setCollectionNesting(bool enable) public { + /// @dev EVM selector for this function is: 0x0b9f3890, + /// or in textual repr: setCollectionNesting((bool,bool,address[])) + function setCollectionNesting(CollectionNestingAndPermission memory collectionNestingAndPermissions) public { require(false, stub_error); - enable; + collectionNestingAndPermissions; dummy = 0; } - /// Toggle accessibility of collection nesting. - /// - /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled' - /// @param collections Addresses of collections that will be available for nesting. - /// @dev EVM selector for this function is: 0x64872396, - /// or in textual repr: setCollectionNesting(bool,address[]) - function setCollectionNesting(bool enable, address[] memory collections) public { - require(false, stub_error); - enable; - collections; - dummy = 0; - } + // /// Toggle accessibility of collection nesting. + // /// + // /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled' + // /// @dev EVM selector for this function is: 0x112d4586, + // /// or in textual repr: setCollectionNesting(bool) + // function setCollectionNesting(bool enable) public { + // require(false, stub_error); + // enable; + // dummy = 0; + // } - /// Returns nesting for a collection - /// @dev EVM selector for this function is: 0x22d25bfe, - /// or in textual repr: collectionNestingRestrictedCollectionIds() - function collectionNestingRestrictedCollectionIds() public view returns (CollectionNesting memory) { - require(false, stub_error); - dummy; - return CollectionNesting(false, new uint256[](0)); - } + // /// Toggle accessibility of collection nesting. + // /// + // /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled' + // /// @param collections Addresses of collections that will be available for nesting. + // /// @dev EVM selector for this function is: 0x64872396, + // /// or in textual repr: setCollectionNesting(bool,address[]) + // function setCollectionNesting(bool enable, address[] memory collections) public { + // require(false, stub_error); + // enable; + // collections; + // dummy = 0; + // } - /// Returns permissions for a collection - /// @dev EVM selector for this function is: 0x5b2eaf4b, - /// or in textual repr: collectionNestingPermissions() - function collectionNestingPermissions() public view returns (CollectionNestingPermission[] memory) { + /// @dev EVM selector for this function is: 0x92c660a8, + /// or in textual repr: collectionNesting() + function collectionNesting() public view returns (CollectionNestingAndPermission memory) { require(false, stub_error); dummy; - return new CollectionNestingPermission[](0); + return CollectionNestingAndPermission(false, false, new address[](0)); } + // /// Returns nesting for a collection + // /// @dev EVM selector for this function is: 0x22d25bfe, + // /// or in textual repr: collectionNestingRestrictedCollectionIds() + // function collectionNestingRestrictedCollectionIds() public view returns (CollectionNesting memory) { + // require(false, stub_error); + // dummy; + // return CollectionNesting(false,new uint256[](0)); + // } + + // /// Returns permissions for a collection + // /// @dev EVM selector for this function is: 0x5b2eaf4b, + // /// or in textual repr: collectionNestingPermissions() + // function collectionNestingPermissions() public view returns (CollectionNestingPermission[] memory) { + // require(false, stub_error); + // dummy; + // return new CollectionNestingPermission[](0); + // } + /// Set the collection access method. /// @param mode Access mode /// @dev EVM selector for this function is: 0x41835d4c, @@ -616,6 +632,16 @@ struct CollectionNesting { uint256[] ids; } +/// Nested collections and permissions +struct CollectionNestingAndPermission { + /// Owner of token can nest tokens under it. + bool token_owner; + /// Admin of token collection can nest tokens under token. + bool collection_admin; + /// If set - only tokens from specified collections can be nested. + address[] restricted; +} + /// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM. struct CollectionLimit { CollectionLimitField field; diff --git a/pallets/refungible/src/benchmarking.rs b/pallets/refungible/src/benchmarking.rs index 8555e918e9..67efadaa05 100644 --- a/pallets/refungible/src/benchmarking.rs +++ b/pallets/refungible/src/benchmarking.rs @@ -51,8 +51,8 @@ fn create_max_item( users: impl IntoIterator, ) -> Result { let data: CreateItemData = create_max_item_data::(users); - >::create_item(&collection, sender, data, &Unlimited)?; - Ok(TokenId(>::get(&collection.id))) + >::create_item(collection, sender, data, &Unlimited)?; + Ok(TokenId(>::get(collection.id))) } fn create_collection( @@ -61,9 +61,7 @@ fn create_collection( create_collection_raw( owner, CollectionMode::ReFungible, - |owner: T::CrossAccountId, data| { - >::init_collection(owner.clone(), owner, data, Default::default()) - }, + |owner: T::CrossAccountId, data| >::init_collection(owner.clone(), owner, data), RefungibleHandle::cast, ) } @@ -106,7 +104,7 @@ benchmarks! { let data = vec![create_max_item_data::((0..b).map(|u| { bench_init!(to: cross_sub(u);); (to, 200) - }))].try_into().unwrap(); + }))]; }: {>::create_multiple_items(&collection, &sender, data, &Unlimited)?} // Other user left, token data is kept @@ -257,7 +255,7 @@ benchmarks! { value: property_value(), }).collect::>(); let item = create_max_item(&collection, &owner, [(owner.clone(), 200)])?; - }: {>::set_token_properties(&collection, &owner, item, props.into_iter(), false, &Unlimited)?} + }: {>::set_token_properties(&collection, &owner, item, props.into_iter(), SetPropertyMode::ExistingToken, &Unlimited)?} delete_token_properties { let b in 0..MAX_PROPERTIES_PER_ITEM; @@ -279,7 +277,7 @@ benchmarks! { value: property_value(), }).collect::>(); let item = create_max_item(&collection, &owner, [(owner.clone(), 200)])?; - >::set_token_properties(&collection, &owner, item, props.into_iter(), false, &Unlimited)?; + >::set_token_properties(&collection, &owner, item, props.into_iter(), SetPropertyMode::ExistingToken, &Unlimited)?; let to_delete = (0..b).map(|k| property_key(k as usize)).collect::>(); }: {>::delete_token_properties(&collection, &owner, item, to_delete.into_iter(), &Unlimited)?} @@ -296,7 +294,7 @@ benchmarks! { owner: sub; collection: collection(owner); sender: cross_from_sub(owner); owner: cross_sub; }; - let item = create_max_item(&collection, &sender, [(owner.clone(), 100)])?; + let item = create_max_item(&collection, &sender, [(owner, 100)])?; }: {>::token_owner(collection.id, item).unwrap()} set_allowance_for_all { diff --git a/pallets/refungible/src/common.rs b/pallets/refungible/src/common.rs index 3b221d51ff..a952a29df8 100644 --- a/pallets/refungible/src/common.rs +++ b/pallets/refungible/src/common.rs @@ -399,7 +399,7 @@ impl CommonCollectionOperations for RefungibleHandle { &sender, token_id, properties.into_iter(), - false, + pallet_common::SetPropertyMode::ExistingToken, nesting_budget, ), weight, diff --git a/pallets/refungible/src/erc.rs b/pallets/refungible/src/erc.rs index 10b7f246e5..e8100b1780 100644 --- a/pallets/refungible/src/erc.rs +++ b/pallets/refungible/src/erc.rs @@ -196,7 +196,7 @@ impl RefungibleHandle { &caller, TokenId(token_id), properties.into_iter(), - false, + pallet_common::SetPropertyMode::ExistingToken, &nesting_budget, ) .map_err(dispatch_to_evm::) @@ -973,9 +973,8 @@ where /// @notice Returns next free RFT ID. fn next_token_id(&self) -> Result { self.consume_store_reads(1)?; - Ok(>::get(self.id) - .checked_add(1) - .ok_or("item id overflow")? + Ok(>::next_token_id(self) + .map_err(dispatch_to_evm::)? .into()) } diff --git a/pallets/refungible/src/lib.rs b/pallets/refungible/src/lib.rs index ab4d80668c..0aab9cafd8 100644 --- a/pallets/refungible/src/lib.rs +++ b/pallets/refungible/src/lib.rs @@ -97,18 +97,17 @@ use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm}; use pallet_evm_coder_substrate::WithRecorder; use pallet_common::{ CommonCollectionOperations, Error as CommonError, eth::collection_id_to_address, - Event as CommonEvent, Pallet as PalletCommon, + Event as CommonEvent, Pallet as PalletCommon, SetPropertyMode, }; use pallet_structure::Pallet as PalletStructure; use sp_core::{Get, H160}; use sp_runtime::{ArithmeticError, DispatchError, DispatchResult, TransactionOutcome}; use sp_std::{vec::Vec, vec, collections::btree_map::BTreeMap}; use up_data_structs::{ - AccessMode, budget::Budget, CollectionId, CollectionFlags, CreateCollectionData, - mapping::TokenAddressMapping, MAX_REFUNGIBLE_PIECES, Property, PropertyKey, - PropertyKeyPermission, PropertyScope, PropertyValue, TokenId, TrySetProperty, - PropertiesPermissionMap, CreateRefungibleExMultipleOwners, TokenOwnerError, - TokenProperties as TokenPropertiesT, + AccessMode, budget::Budget, CollectionId, CreateCollectionData, mapping::TokenAddressMapping, + MAX_REFUNGIBLE_PIECES, Property, PropertyKey, PropertyKeyPermission, PropertyScope, + PropertyValue, TokenId, TrySetProperty, PropertiesPermissionMap, + CreateRefungibleExMultipleOwners, TokenOwnerError, TokenProperties as TokenPropertiesT, }; pub use pallet::*; @@ -334,10 +333,9 @@ impl Pallet { pub fn init_collection( owner: T::CrossAccountId, payer: T::CrossAccountId, - data: CreateCollectionData, - flags: CollectionFlags, + data: CreateCollectionData, ) -> Result { - >::init_collection(owner, payer, data, flags) + >::init_collection(owner, payer, data) } /// Destroy RFT collection @@ -521,8 +519,6 @@ impl Pallet { /// * removes a property under the if the value is `None` `(, None)`. /// /// - `nesting_budget`: Limit for searching parents in-depth to check ownership. - /// - `is_token_create`: Indicates that method is called during token initialization. - /// Allows to bypass ownership check. /// /// All affected properties should have `mutable` permission /// to be **deleted** or to be **set more than once**, @@ -537,27 +533,38 @@ impl Pallet { sender: &T::CrossAccountId, token_id: TokenId, properties_updates: impl Iterator)>, - is_token_create: bool, + mode: SetPropertyMode, nesting_budget: &dyn Budget, ) -> DispatchResult { - let is_token_owner = || -> Result { - let balance = collection.balance(sender.clone(), token_id); - let total_pieces: u128 = - Self::total_pieces(collection.id, token_id).unwrap_or(u128::MAX); - if balance != total_pieces { - return Ok(false); - } + let mut is_token_owner = + pallet_common::LazyValue::new(|| -> Result { + if let SetPropertyMode::NewToken { + mint_target_is_sender, + } = mode + { + return Ok(mint_target_is_sender); + } - let is_bundle_owner = >::check_indirectly_owned( - sender.clone(), - collection.id, - token_id, - None, - nesting_budget, - )?; + let balance = collection.balance(sender.clone(), token_id); + let total_pieces: u128 = + Self::total_pieces(collection.id, token_id).unwrap_or(u128::MAX); + if balance != total_pieces { + return Ok(false); + } - Ok(is_bundle_owner) - }; + let is_bundle_owner = >::check_indirectly_owned( + sender.clone(), + collection.id, + token_id, + None, + nesting_budget, + )?; + + Ok(is_bundle_owner) + }); + + let mut is_token_exist = + pallet_common::LazyValue::new(|| Self::token_exists(collection, token_id)); let stored_properties = >::get((collection.id, token_id)); @@ -565,10 +572,10 @@ impl Pallet { collection, sender, token_id, + &mut is_token_exist, properties_updates, - is_token_create, stored_properties, - is_token_owner, + &mut is_token_owner, |properties| >::set((collection.id, token_id), properties), erc::ERC721TokenEvent::TokenChanged { token_id: token_id.into(), @@ -577,12 +584,25 @@ impl Pallet { ) } + pub fn next_token_id(collection: &RefungibleHandle) -> Result { + let next_token_id = >::get(collection.id) + .checked_add(1) + .ok_or(>::CollectionTokenLimitExceeded)?; + + ensure!( + collection.limits.token_limit() >= next_token_id, + >::CollectionTokenLimitExceeded + ); + + Ok(TokenId(next_token_id)) + } + pub fn set_token_properties( collection: &RefungibleHandle, sender: &T::CrossAccountId, token_id: TokenId, properties: impl Iterator, - is_token_create: bool, + mode: SetPropertyMode, nesting_budget: &dyn Budget, ) -> DispatchResult { Self::modify_token_properties( @@ -590,7 +610,7 @@ impl Pallet { sender, token_id, properties.map(|p| (p.key, Some(p.value))), - is_token_create, + mode, nesting_budget, ) } @@ -602,14 +622,12 @@ impl Pallet { property: Property, nesting_budget: &dyn Budget, ) -> DispatchResult { - let is_token_create = false; - Self::set_token_properties( collection, sender, token_id, [property].into_iter(), - is_token_create, + SetPropertyMode::ExistingToken, nesting_budget, ) } @@ -621,14 +639,12 @@ impl Pallet { property_keys: impl Iterator, nesting_budget: &dyn Budget, ) -> DispatchResult { - let is_token_create = false; - Self::modify_token_properties( collection, sender, token_id, property_keys.into_iter().map(|key| (key, None)), - is_token_create, + SetPropertyMode::ExistingToken, nesting_budget, ) } @@ -914,10 +930,14 @@ impl Pallet { let token_id = first_token_id + i as u32 + 1; >::insert((collection.id, token_id), totals[i]); + let mut mint_target_is_sender = true; for (user, amount) in data.users.iter() { if *amount == 0 { continue; } + + mint_target_is_sender = mint_target_is_sender && sender.conv_eq(user); + >::insert((collection.id, token_id, &user), amount); >::insert((collection.id, &user, TokenId(token_id)), true); >::nest_if_sent_to_token_unchecked( @@ -932,7 +952,9 @@ impl Pallet { sender, TokenId(token_id), data.properties.clone().into_iter(), - true, + SetPropertyMode::NewToken { + mint_target_is_sender, + }, nesting_budget, ) { return TransactionOutcome::Rollback(Err(e)); diff --git a/pallets/refungible/src/stubs/UniqueRefungible.raw b/pallets/refungible/src/stubs/UniqueRefungible.raw index 4d1230c1d5..d12291ca9e 100644 Binary files a/pallets/refungible/src/stubs/UniqueRefungible.raw and b/pallets/refungible/src/stubs/UniqueRefungible.raw differ diff --git a/pallets/refungible/src/stubs/UniqueRefungible.sol b/pallets/refungible/src/stubs/UniqueRefungible.sol index 49d4614b00..3c6f0ea45a 100644 --- a/pallets/refungible/src/stubs/UniqueRefungible.sol +++ b/pallets/refungible/src/stubs/UniqueRefungible.sol @@ -165,7 +165,7 @@ enum TokenPermissionField { } /// @title A contract that allows you to work with collections. -/// @dev the ERC-165 identifier for this interface is 0x2a14cfd1 +/// @dev the ERC-165 identifier for this interface is 0xb34d97e9 contract Collection is Dummy, ERC165 { // /// Set collection property. // /// @@ -377,48 +377,64 @@ contract Collection is Dummy, ERC165 { // dummy = 0; // } - /// Toggle accessibility of collection nesting. - /// - /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled' - /// @dev EVM selector for this function is: 0x112d4586, - /// or in textual repr: setCollectionNesting(bool) - function setCollectionNesting(bool enable) public { + /// @dev EVM selector for this function is: 0x0b9f3890, + /// or in textual repr: setCollectionNesting((bool,bool,address[])) + function setCollectionNesting(CollectionNestingAndPermission memory collectionNestingAndPermissions) public { require(false, stub_error); - enable; + collectionNestingAndPermissions; dummy = 0; } - /// Toggle accessibility of collection nesting. - /// - /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled' - /// @param collections Addresses of collections that will be available for nesting. - /// @dev EVM selector for this function is: 0x64872396, - /// or in textual repr: setCollectionNesting(bool,address[]) - function setCollectionNesting(bool enable, address[] memory collections) public { - require(false, stub_error); - enable; - collections; - dummy = 0; - } + // /// Toggle accessibility of collection nesting. + // /// + // /// @param enable If "true" degenerates to nesting: 'Owner' else to nesting: 'Disabled' + // /// @dev EVM selector for this function is: 0x112d4586, + // /// or in textual repr: setCollectionNesting(bool) + // function setCollectionNesting(bool enable) public { + // require(false, stub_error); + // enable; + // dummy = 0; + // } - /// Returns nesting for a collection - /// @dev EVM selector for this function is: 0x22d25bfe, - /// or in textual repr: collectionNestingRestrictedCollectionIds() - function collectionNestingRestrictedCollectionIds() public view returns (CollectionNesting memory) { - require(false, stub_error); - dummy; - return CollectionNesting(false, new uint256[](0)); - } + // /// Toggle accessibility of collection nesting. + // /// + // /// @param enable If "true" degenerates to nesting: {OwnerRestricted: [1, 2, 3]} else to nesting: 'Disabled' + // /// @param collections Addresses of collections that will be available for nesting. + // /// @dev EVM selector for this function is: 0x64872396, + // /// or in textual repr: setCollectionNesting(bool,address[]) + // function setCollectionNesting(bool enable, address[] memory collections) public { + // require(false, stub_error); + // enable; + // collections; + // dummy = 0; + // } - /// Returns permissions for a collection - /// @dev EVM selector for this function is: 0x5b2eaf4b, - /// or in textual repr: collectionNestingPermissions() - function collectionNestingPermissions() public view returns (CollectionNestingPermission[] memory) { + /// @dev EVM selector for this function is: 0x92c660a8, + /// or in textual repr: collectionNesting() + function collectionNesting() public view returns (CollectionNestingAndPermission memory) { require(false, stub_error); dummy; - return new CollectionNestingPermission[](0); + return CollectionNestingAndPermission(false, false, new address[](0)); } + // /// Returns nesting for a collection + // /// @dev EVM selector for this function is: 0x22d25bfe, + // /// or in textual repr: collectionNestingRestrictedCollectionIds() + // function collectionNestingRestrictedCollectionIds() public view returns (CollectionNesting memory) { + // require(false, stub_error); + // dummy; + // return CollectionNesting(false,new uint256[](0)); + // } + + // /// Returns permissions for a collection + // /// @dev EVM selector for this function is: 0x5b2eaf4b, + // /// or in textual repr: collectionNestingPermissions() + // function collectionNestingPermissions() public view returns (CollectionNestingPermission[] memory) { + // require(false, stub_error); + // dummy; + // return new CollectionNestingPermission[](0); + // } + /// Set the collection access method. /// @param mode Access mode /// @dev EVM selector for this function is: 0x41835d4c, @@ -616,6 +632,16 @@ struct CollectionNesting { uint256[] ids; } +/// Nested collections and permissions +struct CollectionNestingAndPermission { + /// Owner of token can nest tokens under it. + bool token_owner; + /// Admin of token collection can nest tokens under token. + bool collection_admin; + /// If set - only tokens from specified collections can be nested. + address[] restricted; +} + /// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM. struct CollectionLimit { CollectionLimitField field; diff --git a/pallets/scheduler-v2/Cargo.toml b/pallets/scheduler-v2/Cargo.toml index 861fdef074..09e30ef1f7 100644 --- a/pallets/scheduler-v2/Cargo.toml +++ b/pallets/scheduler-v2/Cargo.toml @@ -25,7 +25,7 @@ sp-std = { workspace = true } [dev-dependencies] pallet-preimage = { workspace = true } -substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.42" } +substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" } [features] default = ["std"] diff --git a/pallets/scheduler-v2/src/benchmarking.rs b/pallets/scheduler-v2/src/benchmarking.rs index 0c4313e190..b70c086c65 100644 --- a/pallets/scheduler-v2/src/benchmarking.rs +++ b/pallets/scheduler-v2/src/benchmarking.rs @@ -83,11 +83,11 @@ fn u32_to_name(i: u32) -> TaskName { /// /// # Arguments /// * `periodic` - makes the task periodic. -/// Sets the task's period and repetition count to `100`. +/// Sets the task's period and repetition count to `100`. /// * `named` - gives a name to the task: `u32_to_name(0)`. /// * `signed` - determines the origin of the task. -/// If true, it will have the Signed origin. Otherwise it will have the Root origin. -/// See [`make_origin`] for details. +/// If true, it will have the Signed origin. Otherwise it will have the Root origin. +/// See [`make_origin`] for details. /// * maybe_lookup_len - sets optional lookup length. It is used to benchmark task fetching from the `Preimages` store. /// * priority - the task's priority. fn make_task( @@ -155,12 +155,10 @@ fn make_call(maybe_lookup_len: Option) -> ScheduledCall { } if maybe_lookup_len.is_some() { len += 1; + } else if len > 0 { + len -= 1; } else { - if len > 0 { - len -= 1; - } else { - break c; - } + break c; } } } diff --git a/pallets/scheduler-v2/src/mock.rs b/pallets/scheduler-v2/src/mock.rs index 6bda42fad8..fd8a839643 100644 --- a/pallets/scheduler-v2/src/mock.rs +++ b/pallets/scheduler-v2/src/mock.rs @@ -33,6 +33,7 @@ // limitations under the License. //! # Scheduler test environment. +#![allow(deprecated)] use super::*; @@ -229,6 +230,10 @@ impl, O>> + From>> EnsureOrigin r => Err(O::from(r)), }) } + #[cfg(feature = "runtime-benchmarks")] + fn try_successful_origin() -> Result { + Ok(O::from(RawOrigin::Root)) + } } pub struct Executor; diff --git a/pallets/scheduler-v2/src/tests.rs b/pallets/scheduler-v2/src/tests.rs index 9dcf565e74..916a5a991e 100644 --- a/pallets/scheduler-v2/src/tests.rs +++ b/pallets/scheduler-v2/src/tests.rs @@ -33,6 +33,7 @@ // limitations under the License. //! # Scheduler tests. +#![allow(deprecated)] use super::*; use crate::mock::{ diff --git a/pallets/structure/src/benchmarking.rs b/pallets/structure/src/benchmarking.rs index 6da03b5066..178b7b9d2e 100644 --- a/pallets/structure/src/benchmarking.rs +++ b/pallets/structure/src/benchmarking.rs @@ -19,8 +19,7 @@ use super::*; use frame_benchmarking::{benchmarks, account}; use frame_support::traits::{fungible::Balanced, Get, tokens::Precision}; use up_data_structs::{ - CreateCollectionData, CollectionMode, CreateItemData, CollectionFlags, CreateNftData, - budget::Unlimited, + CreateCollectionData, CollectionMode, CreateItemData, CreateNftData, budget::Unlimited, }; use pallet_common::Config as CommonConfig; use pallet_evm::account::CrossAccountId; @@ -40,12 +39,11 @@ benchmarks! { mode: CollectionMode::NFT, ..Default::default() }, - CollectionFlags::default(), )?; let dispatch = T::CollectionDispatch::dispatch(CollectionId(1))?; let dispatch = dispatch.as_dyn(); - dispatch.create_item(caller_cross.clone(), caller_cross.clone(), CreateItemData::NFT(CreateNftData::default()), &Unlimited)?; + dispatch.create_item(caller_cross.clone(), caller_cross, CreateItemData::NFT(CreateNftData::default()), &Unlimited)?; }: { let parent = >::find_parent(CollectionId(1), TokenId(1))?; assert!(matches!(parent, Parent::User(_))) diff --git a/pallets/structure/src/lib.rs b/pallets/structure/src/lib.rs index 8bb3ae4c82..3374ccdd65 100644 --- a/pallets/structure/src/lib.rs +++ b/pallets/structure/src/lib.rs @@ -399,8 +399,9 @@ impl Pallet { if is_collection(account.as_eth()) { fail!(>::CantNestTokenUnderCollection); } - let Some((collection, token)) = T::CrossTokenAddressMapping::address_to_token(account) else { - return Ok(()) + let Some((collection, token)) = T::CrossTokenAddressMapping::address_to_token(account) + else { + return Ok(()); }; let dispatch = T::CollectionDispatch::dispatch(collection)?; diff --git a/pallets/unique/Cargo.toml b/pallets/unique/Cargo.toml index ef98d86c81..3807d5da5a 100644 --- a/pallets/unique/Cargo.toml +++ b/pallets/unique/Cargo.toml @@ -47,6 +47,7 @@ evm-coder = { workspace = true } frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true } frame-system = { workspace = true } +log = { workspace = true } pallet-balances-adapter = { workspace = true } pallet-common = { workspace = true } pallet-evm = { workspace = true } diff --git a/pallets/unique/src/benchmarking.rs b/pallets/unique/src/benchmarking.rs index 0615d28bfa..1d182a1781 100644 --- a/pallets/unique/src/benchmarking.rs +++ b/pallets/unique/src/benchmarking.rs @@ -70,7 +70,7 @@ benchmarks! { let mode: CollectionMode = CollectionMode::NFT; let caller: T::AccountId = account("caller", 0, SEED); let _ = ::Currency::deposit(&caller, T::CollectionCreationPrice::get(), Precision::Exact).unwrap(); - }: _(RawOrigin::Signed(caller.clone()), col_name.clone(), col_desc.clone(), token_prefix.clone(), mode) + }: _(RawOrigin::Signed(caller.clone()), col_name, col_desc, token_prefix, mode) verify { assert_eq!(>::get(CollectionId(1)).unwrap().owner, caller); } @@ -155,6 +155,6 @@ benchmarks! { force_repair_collection { let caller: T::AccountId = account("caller", 0, SEED); - let collection = create_nft_collection::(caller.clone())?; + let collection = create_nft_collection::(caller)?; }: _(RawOrigin::Root, collection) } diff --git a/pallets/unique/src/eth/mod.rs b/pallets/unique/src/eth/mod.rs index 497dc9ef99..cf43a10225 100644 --- a/pallets/unique/src/eth/mod.rs +++ b/pallets/unique/src/eth/mod.rs @@ -15,18 +15,16 @@ // along with Unique Network. If not, see . //! Implementation of CollectionHelpers contract. - +//! use core::marker::PhantomData; use ethereum as _; use evm_coder::{abi::AbiType, generate_stubgen, solidity_interface, types::*}; -use frame_support::traits::Get; -use crate::Pallet; - +use frame_support::{BoundedVec, traits::Get}; use pallet_common::{ CollectionById, dispatch::CollectionDispatch, erc::{CollectionHelpersEvents, static_property::key}, - eth::{map_eth_to_id, collection_id_to_address}, + eth::{self, map_eth_to_id, collection_id_to_address}, Pallet as PalletCommon, CollectionHandle, }; use pallet_evm::{account::CrossAccountId, OnMethodCall, PrecompileHandle, PrecompileResult}; @@ -36,13 +34,13 @@ use pallet_evm_coder_substrate::{ frontier_contract, }; use up_data_structs::{ - CollectionDescription, CollectionMode, CollectionName, CollectionTokenPrefix, - CreateCollectionData, + CollectionDescription, CollectionMode, CollectionName, CollectionPermissions, + CollectionTokenPrefix, CreateCollectionData, NestingPermissions, }; -use crate::{weights::WeightInfo, Config, SelfWeightOf}; +use crate::{weights::WeightInfo, Config, Pallet, SelfWeightOf}; -use alloc::format; +use alloc::{format, collections::BTreeSet}; use sp_std::vec::Vec; frontier_contract! { @@ -113,9 +111,8 @@ fn create_collection_internal( let collection_helpers_address = T::CrossAccountId::from_eth(::ContractAddress::get()); - let collection_id = - T::CollectionDispatch::create(caller, collection_helpers_address, data, Default::default()) - .map_err(pallet_evm_coder_substrate::dispatch_to_evm::)?; + let collection_id = T::CollectionDispatch::create(caller, collection_helpers_address, data) + .map_err(pallet_evm_coder_substrate::dispatch_to_evm::)?; let address = pallet_common::eth::collection_id_to_address(collection_id); Ok(address) } @@ -140,7 +137,117 @@ fn check_sent_amount_equals_collection_creation_price(value: Value) - impl EvmCollectionHelpers where T: Config + pallet_common::Config + pallet_nonfungible::Config + pallet_refungible::Config, + T::AccountId: From<[u8; 32]>, { + /// Create a collection + /// @return address Address of the newly created collection + #[weight(>::create_collection())] + #[solidity(rename_selector = "createCollection")] + fn create_collection( + &mut self, + caller: Caller, + value: Value, + data: eth::CreateCollectionData, + ) -> Result
{ + let (caller, name, description, token_prefix) = + convert_data::(caller, data.name, data.description, data.token_prefix)?; + if data.mode != eth::CollectionMode::Fungible && data.decimals != 0 { + return Err("decimals are only supported for NFT and RFT collections".into()); + } + let mode = match data.mode { + eth::CollectionMode::Fungible => CollectionMode::Fungible(data.decimals), + eth::CollectionMode::Nonfungible => CollectionMode::NFT, + eth::CollectionMode::Refungible => CollectionMode::ReFungible, + }; + + let properties: BoundedVec<_, _> = data + .properties + .into_iter() + .map(eth::Property::try_into) + .collect::>>()? + .try_into() + .map_err(|_| "too many properties")?; + + let token_property_permissions = + eth::TokenPropertyPermission::into_property_key_permissions( + data.token_property_permissions, + )? + .try_into() + .map_err(|_| "too many property permissions")?; + + let limits = if !data.limits.is_empty() { + Some( + data.limits + .into_iter() + .collect::>()?, + ) + } else { + None + }; + + let pending_sponsor = data.pending_sponsor.into_option_sub_cross_account::()?; + + let restricted = if !data.nesting_settings.restricted.is_empty() { + Some( + data.nesting_settings + .restricted + .iter() + .map(map_eth_to_id) + .collect::>>() + .ok_or("can't convert address into collection id")? + .try_into() + .map_err(|_| "too many collections")?, + ) + } else { + None + }; + + let admin_list = data + .admin_list + .into_iter() + .map(|admin| admin.into_sub_cross_account::()) + .collect::>>()?; + + let flags = data.flags; + if !flags.is_allowed_for_user() { + return Err("internal flags were used".into()); + } + + let data = CreateCollectionData { + name, + mode, + description, + token_prefix, + properties, + token_property_permissions, + limits, + pending_sponsor, + access: None, + permissions: Some(CollectionPermissions { + access: None, + mint_mode: None, + nesting: Some(NestingPermissions { + token_owner: data.nesting_settings.token_owner, + collection_admin: data.nesting_settings.collection_admin, + restricted, + #[cfg(feature = "runtime-benchmarks")] + permissive: true, + }), + }), + admin_list, + flags, + }; + check_sent_amount_equals_collection_creation_price::(value)?; + let collection_helpers_address = + T::CrossAccountId::from_eth(::ContractAddress::get()); + + let collection_id = T::CollectionDispatch::create(caller, collection_helpers_address, data) + .map_err(dispatch_to_evm::)?; + + let address = pallet_common::eth::collection_id_to_address(collection_id); + Ok(address) + } + /// Create an NFT collection /// @param name Name of the collection /// @param description Informative description of the collection @@ -168,13 +275,8 @@ where check_sent_amount_equals_collection_creation_price::(value)?; let collection_helpers_address = T::CrossAccountId::from_eth(::ContractAddress::get()); - let collection_id = T::CollectionDispatch::create( - caller, - collection_helpers_address, - data, - Default::default(), - ) - .map_err(dispatch_to_evm::)?; + let collection_id = T::CollectionDispatch::create(caller, collection_helpers_address, data) + .map_err(dispatch_to_evm::)?; let address = pallet_common::eth::collection_id_to_address(collection_id); Ok(address) @@ -387,6 +489,8 @@ where pub struct CollectionHelpersOnMethodCall(PhantomData<*const T>); impl OnMethodCall for CollectionHelpersOnMethodCall +where + T::AccountId: From<[u8; 32]>, { fn is_reserved(contract: &sp_core::H160) -> bool { contract == &T::ContractAddress::get() diff --git a/pallets/unique/src/eth/stubs/CollectionHelpers.raw b/pallets/unique/src/eth/stubs/CollectionHelpers.raw index 2132c271a5..172f8bd938 100644 Binary files a/pallets/unique/src/eth/stubs/CollectionHelpers.raw and b/pallets/unique/src/eth/stubs/CollectionHelpers.raw differ diff --git a/pallets/unique/src/eth/stubs/CollectionHelpers.sol b/pallets/unique/src/eth/stubs/CollectionHelpers.sol index b158c39aa5..1aad73de74 100644 --- a/pallets/unique/src/eth/stubs/CollectionHelpers.sol +++ b/pallets/unique/src/eth/stubs/CollectionHelpers.sol @@ -25,8 +25,19 @@ contract CollectionHelpersEvents { } /// @title Contract, which allows users to operate with collections -/// @dev the ERC-165 identifier for this interface is 0xe65011aa +/// @dev the ERC-165 identifier for this interface is 0x4135fff1 contract CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents { + /// Create a collection + /// @return address Address of the newly created collection + /// @dev EVM selector for this function is: 0xa765ee5b, + /// or in textual repr: createCollection(((address,uint256),string,string,string,uint8,uint8,(string,bytes)[],(string,(uint8,bool)[])[],(address,uint256)[],(bool,bool,address[]),(uint8,uint256)[],uint8)) + function createCollection(CreateCollectionData memory data) public payable returns (address) { + require(false, stub_error); + data; + dummy = 0; + return 0x0000000000000000000000000000000000000000; + } + /// Create an NFT collection /// @param name Name of the collection /// @param description Informative description of the collection @@ -156,3 +167,135 @@ contract CollectionHelpers is Dummy, ERC165, CollectionHelpersEvents { return 0; } } + +/// Collection properties +struct CreateCollectionData { + /// Collection sponsor + CrossAddress pending_sponsor; + /// Collection name + string name; + /// Collection description + string description; + /// Token prefix + string token_prefix; + /// Token type (NFT, FT or RFT) + CollectionMode mode; + /// Fungible token precision + uint8 decimals; + /// Custom Properties + Property[] properties; + /// Permissions for token properties + TokenPropertyPermission[] token_property_permissions; + /// Collection admins + CrossAddress[] admin_list; + /// Nesting settings + CollectionNestingAndPermission nesting_settings; + /// Collection limits + CollectionLimitValue[] limits; + /// Extra collection flags + CollectionFlags flags; +} + +/// Cross account struct +type CollectionFlags is uint8; + +library CollectionFlagsLib { + /// Tokens in foreign collections can be transferred, but not burnt + CollectionFlags constant foreignField = CollectionFlags.wrap(128); + /// Supports ERC721Metadata + CollectionFlags constant erc721metadataField = CollectionFlags.wrap(64); + /// External collections can't be managed using `unique` api + CollectionFlags constant externalField = CollectionFlags.wrap(1); + + /// Reserved bits + function reservedField(uint8 value) public pure returns (CollectionFlags) { + require(value < 1 << 5, "out of bound value"); + return CollectionFlags.wrap(value << 1); + } +} + +/// [`CollectionLimits`](up_data_structs::CollectionLimits) field representation for EVM. +struct CollectionLimitValue { + CollectionLimitField field; + uint256 value; +} + +/// [`CollectionLimits`](up_data_structs::CollectionLimits) fields representation for EVM. +enum CollectionLimitField { + /// How many tokens can a user have on one account. + AccountTokenOwnership, + /// How many bytes of data are available for sponsorship. + SponsoredDataSize, + /// In any case, chain default: [`SponsoringRateLimit::SponsoringDisabled`] + SponsoredDataRateLimit, + /// How many tokens can be mined into this collection. + TokenLimit, + /// Timeouts for transfer sponsoring. + SponsorTransferTimeout, + /// Timeout for sponsoring an approval in passed blocks. + SponsorApproveTimeout, + /// Whether the collection owner of the collection can send tokens (which belong to other users). + OwnerCanTransfer, + /// Can the collection owner burn other people's tokens. + OwnerCanDestroy, + /// Is it possible to send tokens from this collection between users. + TransferEnabled +} + +/// Nested collections and permissions +struct CollectionNestingAndPermission { + /// Owner of token can nest tokens under it. + bool token_owner; + /// Admin of token collection can nest tokens under token. + bool collection_admin; + /// If set - only tokens from specified collections can be nested. + address[] restricted; +} + +/// Cross account struct +struct CrossAddress { + address eth; + uint256 sub; +} + +/// Ethereum representation of Token Property Permissions. +struct TokenPropertyPermission { + /// Token property key. + string key; + /// Token property permissions. + PropertyPermission[] permissions; +} + +/// Ethereum representation of TokenPermissions (see [`up_data_structs::PropertyPermission`]) as an key and value. +struct PropertyPermission { + /// TokenPermission field. + TokenPermissionField code; + /// TokenPermission value. + bool value; +} + +/// Ethereum representation of TokenPermissions (see [`up_data_structs::PropertyPermission`]) fields as an enumeration. +enum TokenPermissionField { + /// Permission to change the property and property permission. See [`up_data_structs::PropertyPermission::mutable`] + Mutable, + /// Change permission for the collection administrator. See [`up_data_structs::PropertyPermission::token_owner`] + TokenOwner, + /// Permission to change the property for the owner of the token. See [`up_data_structs::PropertyPermission::collection_admin`] + CollectionAdmin +} + +/// Ethereum representation of collection [`PropertyKey`](up_data_structs::PropertyKey) and [`PropertyValue`](up_data_structs::PropertyValue). +struct Property { + string key; + bytes value; +} + +/// Type of tokens in collection +enum CollectionMode { + /// Fungible + Fungible, + /// Nonfungible + Nonfungible, + /// Refungible + Refungible +} diff --git a/pallets/unique/src/lib.rs b/pallets/unique/src/lib.rs index 3776b854ef..0b37621bf8 100644 --- a/pallets/unique/src/lib.rs +++ b/pallets/unique/src/lib.rs @@ -365,7 +365,7 @@ pub mod pallet { token_prefix: BoundedVec>, mode: CollectionMode, ) -> DispatchResult { - let data: CreateCollectionData = CreateCollectionData { + let data: CreateCollectionData = CreateCollectionData { name: collection_name, description: collection_description, token_prefix, @@ -390,14 +390,13 @@ pub mod pallet { #[pallet::weight(>::create_collection())] pub fn create_collection_ex( origin: OriginFor, - data: CreateCollectionData, + data: CreateCollectionData, ) -> DispatchResult { let sender = ensure_signed(origin)?; // ========= let sender = T::CrossAccountId::from_sub(sender); - let _id = - T::CollectionDispatch::create(sender.clone(), sender, data, Default::default())?; + let _id = T::CollectionDispatch::create(sender.clone(), sender, data)?; Ok(()) } diff --git a/primitives/common/src/types.rs b/primitives/common/src/types.rs index a7a78d1f3e..05197eaf3c 100644 --- a/primitives/common/src/types.rs +++ b/primitives/common/src/types.rs @@ -48,13 +48,6 @@ pub mod opaque { + Send + Sync + 'static; - - type TransactionConverter: fp_rpc::ConvertTransaction - + Send - + Sync - + 'static; - - fn get_transaction_converter() -> Self::TransactionConverter; } } diff --git a/primitives/data-structs/Cargo.toml b/primitives/data-structs/Cargo.toml index 17fbe13a4a..f70992b1f2 100644 --- a/primitives/data-structs/Cargo.toml +++ b/primitives/data-structs/Cargo.toml @@ -22,6 +22,7 @@ sp-runtime = { workspace = true } sp-std = { workspace = true } bondrewd = { version = "0.1.14", features = ["derive"], default-features = false } struct-versioning = { workspace = true } +evm-coder = { workspace = true } [features] default = ["std"] @@ -38,3 +39,4 @@ std = [ "sp-runtime/std", "sp-std/std", ] +stubgen = ["evm-coder/stubgen"] diff --git a/primitives/data-structs/src/lib.rs b/primitives/data-structs/src/lib.rs index 291de5bd86..ab2fad1ebb 100644 --- a/primitives/data-structs/src/lib.rs +++ b/primitives/data-structs/src/lib.rs @@ -32,11 +32,13 @@ use serde::{Serialize, Deserialize}; use sp_core::U256; use sp_runtime::{ArithmeticError, sp_std::prelude::Vec}; +use sp_std::collections::btree_set::BTreeSet; use codec::{Decode, Encode, EncodeLike, MaxEncodedLen}; -use bondrewd::Bitfields; use frame_support::{BoundedVec, traits::ConstU32}; use derivative::Derivative; use scale_info::TypeInfo; +use evm_coder::AbiCoderFlags; +use bondrewd::Bitfields; mod bondrewd_codec; mod bounded; @@ -163,6 +165,14 @@ impl From for CollectionId { } } +impl Deref for CollectionId { + type Target = u32; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} + /// Token id. #[derive( Encode, @@ -350,7 +360,7 @@ pub type CollectionName = BoundedVec>; pub type CollectionDescription = BoundedVec>; pub type CollectionTokenPrefix = BoundedVec>; -#[derive(Bitfields, Clone, Copy, PartialEq, Eq, Debug, Default)] +#[derive(AbiCoderFlags, Bitfields, Clone, Copy, PartialEq, Eq, Debug, Default)] #[bondrewd(enforce_bytes = 1)] pub struct CollectionFlags { /// Tokens in foreign collections can be transferred, but not burnt @@ -362,12 +372,18 @@ pub struct CollectionFlags { /// External collections can't be managed using `unique` api #[bondrewd(bits = "7..8")] pub external: bool, - - #[bondrewd(reserve, bits = "2..7")] + /// Reserved flags + #[bondrewd(bits = "2..7")] pub reserved: u8, } bondrewd_codec!(CollectionFlags); +impl CollectionFlags { + pub fn is_allowed_for_user(self) -> bool { + !self.foreign && !self.external && self.reserved == 0 + } +} + /// Base structure for represent collection. /// /// Used to provide basic functionality for all types of collections. @@ -545,7 +561,7 @@ impl Deref for RawEncoded { /// All fields are wrapped in [`Option`], where `None` means chain default. #[derive(Encode, Decode, Clone, PartialEq, TypeInfo, Derivative, MaxEncodedLen)] #[derivative(Debug, Default(bound = ""))] -pub struct CreateCollectionData { +pub struct CreateCollectionData { /// Collection mode. #[derivative(Default(value = "CollectionMode::NFT"))] pub mode: CollectionMode, @@ -562,9 +578,6 @@ pub struct CreateCollectionData { /// Token prefix. pub token_prefix: CollectionTokenPrefix, - /// Pending collection sponsor. - pub pending_sponsor: Option, - /// Collection limits. pub limits: Option, @@ -576,6 +589,13 @@ pub struct CreateCollectionData { /// Collection properties. pub properties: CollectionPropertiesVec, + + pub admin_list: Vec, + + /// Pending collection sponsor. + pub pending_sponsor: Option, + + pub flags: CollectionFlags, } /// Bounded vector of properties permissions. Max length is [`MAX_PROPERTIES_PER_ITEM`]. @@ -833,6 +853,14 @@ impl core::ops::DerefMut for OwnerRestrictedSet { } } +impl TryFrom> for OwnerRestrictedSet { + type Error = (); + + fn try_from(value: BTreeSet) -> Result { + Ok(Self(value.try_into()?)) + } +} + /// Part of collection permissions, if set, defines who is able to nest tokens into other tokens. #[derive(Encode, Decode, Clone, PartialEq, TypeInfo, MaxEncodedLen, Derivative)] #[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))] diff --git a/runtime/common/config/ethereum.rs b/runtime/common/config/ethereum.rs index 4a423fdc88..b70e875ccc 100644 --- a/runtime/common/config/ethereum.rs +++ b/runtime/common/config/ethereum.rs @@ -20,6 +20,9 @@ use up_common::constants::*; pub type CrossAccountId = pallet_evm::account::BasicCrossAccountId; +// Assuming PoV size per read is 96 bytes: 16 for twox128(Evm), 16 for twox128(Storage), 32 for storage key, and 32 for storage value +const EVM_SLOAD_PROOF_SIZE: u64 = 96; + // ~~Assuming slowest ethereum opcode is SSTORE, with gas price of 20000 as our worst case~~ // ~~(contract, which only writes a lot of data),~~ // ~~approximating on top of our real store write weight~~ @@ -31,7 +34,10 @@ parameter_types! { pub const GasPerSecond: u64 = ReadsPerSecond::get() * 2100; pub const WeightTimePerGas: u64 = WEIGHT_REF_TIME_PER_SECOND / GasPerSecond::get(); - pub const WeightPerGas: Weight = Weight::from_parts(WeightTimePerGas::get(), 0); + pub const BytesReadPerSecond: u64 = ReadsPerSecond::get() * EVM_SLOAD_PROOF_SIZE; + pub const ProofSizePerGas: u64 = 0; //WEIGHT_REF_TIME_PER_SECOND / GasPerSecond::get(); + + pub const WeightPerGas: Weight = Weight::from_parts(WeightTimePerGas::get(), ProofSizePerGas::get()); } /// Limiting EVM execution to 50% of block for substrate users and management tasks @@ -86,6 +92,7 @@ impl pallet_evm::Config for Runtime { type FindAuthor = EthereumFindAuthor; type Timestamp = crate::Timestamp; type WeightInfo = pallet_evm::weights::SubstrateWeight; + type GasLimitPovSizeRatio = ProofSizePerGas; } impl pallet_evm_migration::Config for Runtime { diff --git a/runtime/common/config/governance/council.rs b/runtime/common/config/governance/council.rs new file mode 100644 index 0000000000..d8b7d5787b --- /dev/null +++ b/runtime/common/config/governance/council.rs @@ -0,0 +1,71 @@ +use super::*; + +parameter_types! { + pub CouncilMaxProposals: u32 = 100; + pub CouncilMaxMembers: u32 = 100; +} + +#[cfg(not(feature = "gov-test-timings"))] +use crate::governance_timings::council as council_timings; + +#[cfg(feature = "gov-test-timings")] +pub mod council_timings { + use super::*; + + parameter_types! { + pub CouncilMotionDuration: BlockNumber = 35; + } +} + +pub type CouncilCollective = pallet_collective::Instance1; +impl pallet_collective::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type MotionDuration = council_timings::CouncilMotionDuration; + type MaxProposals = CouncilMaxProposals; + type MaxMembers = CouncilMaxMembers; + type DefaultVote = pallet_collective::PrimeDefaultVote; + type WeightInfo = pallet_collective::weights::SubstrateWeight; + type SetMembersOrigin = EnsureRoot; + type MaxProposalWeight = MaxCollectivesProposalWeight; +} + +pub type CouncilCollectiveMembership = pallet_membership::Instance1; +impl pallet_membership::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type AddOrigin = EnsureRoot; + type RemoveOrigin = EnsureRoot; + type SwapOrigin = EnsureRoot; + type ResetOrigin = EnsureRoot; + type PrimeOrigin = EnsureRoot; + type MembershipInitialized = Council; + type MembershipChanged = Council; + type MaxMembers = CouncilMaxMembers; + type WeightInfo = pallet_membership::weights::SubstrateWeight; +} + +pub type CouncilMember = pallet_collective::EnsureMember; + +pub type OneThirdsCouncil = + pallet_collective::EnsureProportionAtLeast; + +pub type HalfCouncil = + pallet_collective::EnsureProportionAtLeast; + +pub type MoreThanHalfCouncil = + pallet_collective::EnsureProportionMoreThan; + +pub type ThreeFourthsCouncil = EnsureProportionAtLeast; + +pub type AllCouncil = EnsureProportionAtLeast; + +pub type RootOrOneThirdsCouncil = EitherOfDiverse, OneThirdsCouncil>; + +pub type RootOrHalfCouncil = EitherOfDiverse, HalfCouncil>; + +pub type RootOrMoreThanHalfCouncil = EitherOfDiverse, MoreThanHalfCouncil>; + +pub type RootOrThreeFourthsCouncil = EitherOfDiverse, ThreeFourthsCouncil>; + +pub type RootOrAllCouncil = EitherOfDiverse, AllCouncil>; diff --git a/runtime/common/config/governance/democracy.rs b/runtime/common/config/governance/democracy.rs new file mode 100644 index 0000000000..408fe4d595 --- /dev/null +++ b/runtime/common/config/governance/democracy.rs @@ -0,0 +1,102 @@ +use super::*; + +parameter_types! { + pub MinimumDeposit: Balance = 0; + pub InstantAllowed: bool = false; + pub MaxVotes: u32 = 100; + pub MaxProposals: u32 = 100; +} + +#[cfg(not(feature = "gov-test-timings"))] +use crate::governance_timings::democracy as democracy_timings; + +#[cfg(feature = "gov-test-timings")] +pub mod democracy_timings { + use super::*; + + parameter_types! { + pub LaunchPeriod: BlockNumber = 35; + pub VotingPeriod: BlockNumber = 35; + pub FastTrackVotingPeriod: BlockNumber = 5; + pub EnactmentPeriod: BlockNumber = 40; + pub CooloffPeriod: BlockNumber = 35; + } +} + +impl pallet_democracy::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type Slash = Treasury; + type Scheduler = Scheduler; + type PalletsOrigin = OriginCaller; + type Preimages = Preimage; + type WeightInfo = pallet_democracy::weights::SubstrateWeight; + + /// The period between a proposal being approved and enacted. + type EnactmentPeriod = democracy_timings::EnactmentPeriod; + + /// The minimum period of vote locking. + type VoteLockingPeriod = democracy_timings::EnactmentPeriod; + + /// How often new public referenda are launched. + type LaunchPeriod = democracy_timings::LaunchPeriod; + + /// How long the referendum will last. + type VotingPeriod = democracy_timings::VotingPeriod; + + /// The minimum amount to be used as a deposit for the Fellowship referendum proposal. + type MinimumDeposit = MinimumDeposit; + + type SubmitOrigin = EitherOf< + MapSuccess, Replace>, + EnsureFellowshipProposition, + >; + + type ExternalOrigin = EnsureNever; + type ExternalMajorityOrigin = EnsureNever; + + /// Root (for the initial referendums) + /// or >50% of council can have the next scheduled referendum be a straight default-carries + /// (NTB) vote (SuperMajorityAgainst). + type ExternalDefaultOrigin = RootOrMoreThanHalfCouncil; + + /// A unanimous technical committee can have an ExternalMajority/ExternalDefault vote + /// be tabled immediately and with a shorter voting/enactment period. + type FastTrackOrigin = RootOrAllTechnicalCommittee; + + /// Origin from which the next referendum may be tabled to vote immediately and asynchronously. + /// Can set a faster voting period. + type InstantOrigin = EnsureNever; + type InstantAllowed = InstantAllowed; + + /// Minimum voting period allowed for a fast-track referendum. + type FastTrackVotingPeriod = democracy_timings::FastTrackVotingPeriod; + + /// To cancel a proposal which has been passed, the technical committee must be unanimous or + /// Root must agree. + type CancellationOrigin = RootOrAllTechnicalCommittee; + + /// To cancel a proposal before it has been passed, the technical committee must be unanimous or + /// Root must agree. + type CancelProposalOrigin = RootOrAllTechnicalCommittee; + + /// A unanimous council or Root can blacklist a proposal permanently. + type BlacklistOrigin = RootOrAllCouncil; + + // Any single technical committee member may veto a coming council proposal, however they can + // only do it once and it lasts only for the cooloff period. + type VetoOrigin = TechnicalCommitteeMember; + type CooloffPeriod = democracy_timings::CooloffPeriod; + + /// The maximum number of votes for an account + type MaxVotes = MaxVotes; + + /// The maximum number of public proposals that can exist at any time. + type MaxProposals = MaxProposals; + + /// The maximum number of deposits a public proposal may have at any time. + type MaxDeposits = ConstU32<100>; + + /// The maximum number of items that can be blacklisted. + type MaxBlacklisted = ConstU32<100>; +} diff --git a/runtime/common/config/governance/fellowship.rs b/runtime/common/config/governance/fellowship.rs new file mode 100644 index 0000000000..6274590b06 --- /dev/null +++ b/runtime/common/config/governance/fellowship.rs @@ -0,0 +1,167 @@ +use crate::{Preimage, Treasury, RuntimeCall, RuntimeEvent, Scheduler, FellowshipReferenda, Runtime}; +use super::*; +use pallet_gov_origins::Origin as GovOrigins; +use pallet_ranked_collective::{Config as RankedConfig, Rank, TallyOf}; + +pub const FELLOWSHIP_MODULE_ID: PalletId = PalletId(*b"flowship"); +pub const DEMOCRACY_TRACK_ID: u16 = 10; + +parameter_types! { + pub FellowshipAccountId: ::AccountId = FELLOWSHIP_MODULE_ID.into_account_truncating(); + pub AlarmInterval: BlockNumber = 1; + pub SubmissionDeposit: Balance = 1000; +} + +#[cfg(not(feature = "gov-test-timings"))] +use crate::governance_timings::fellowship as fellowship_timings; + +#[cfg(feature = "gov-test-timings")] +pub mod fellowship_timings { + use super::*; + + parameter_types! { + pub UndecidingTimeout: BlockNumber = 35; + } + + pub mod track { + use super::*; + + pub mod democracy_proposals { + use super::*; + + pub const PREPARE_PERIOD: BlockNumber = 3; + pub const DECISION_PERIOD: BlockNumber = 35; + pub const CONFIRM_PERIOD: BlockNumber = 3; + pub const MIN_ENACTMENT_PERIOD: BlockNumber = 1; + } + } +} + +impl pallet_referenda::Config for Runtime { + type WeightInfo = pallet_referenda::weights::SubstrateWeight; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type Scheduler = Scheduler; + type Currency = Balances; + type SubmitOrigin = pallet_ranked_collective::EnsureMember; + type CancelOrigin = RootOrAllTechnicalCommittee; + type KillOrigin = RootOrAllTechnicalCommittee; + type Slash = Treasury; + type Votes = pallet_ranked_collective::Votes; + type Tally = pallet_ranked_collective::TallyOf; + type SubmissionDeposit = SubmissionDeposit; + type MaxQueued = ConstU32<100>; + type UndecidingTimeout = fellowship_timings::UndecidingTimeout; + type AlarmInterval = AlarmInterval; + type Tracks = TracksInfo; + type Preimages = Preimage; +} + +impl RankedConfig for Runtime { + type WeightInfo = pallet_ranked_collective::weights::SubstrateWeight; + type RuntimeEvent = RuntimeEvent; + // Promotion is by any of: + // - Council member. + // - Technical committee member. + type PromoteOrigin = FellowshipPromoteDemoteOrigin; + // Demotion is by any of: + // - Council member. + // - Technical committee member. + type DemoteOrigin = FellowshipPromoteDemoteOrigin; + type Polls = FellowshipReferenda; + type MinRankOfClass = ClassToRankMapper; + type VoteWeight = pallet_ranked_collective::Geometric; +} + +pub struct EnsureFellowshipProposition; +impl EnsureOrigin for EnsureFellowshipProposition +where + O: Into> + From, +{ + type Success = AccountId; + + fn try_origin(o: O) -> Result { + o.into().and_then(|o| match o { + GovOrigins::FellowshipProposition => Ok(FellowshipAccountId::get()), + o => Err(O::from(o)), + }) + } + + #[cfg(feature = "runtime-benchmarks")] + fn try_successful_origin() -> Result { + Ok(O::from(GovOrigins::FellowshipProposition)) + } +} + +pub type FellowshipPromoteDemoteOrigin = EitherOf< + MapSuccess, Replace>>, + MapSuccess>>, +>; + +pub struct TracksInfo; +impl pallet_referenda::TracksInfo for TracksInfo { + type Id = u16; + type RuntimeOrigin = ::PalletsOrigin; + fn tracks() -> &'static [(Self::Id, pallet_referenda::TrackInfo)] { + static DATA: [(u16, pallet_referenda::TrackInfo); 1] = [( + DEMOCRACY_TRACK_ID, + pallet_referenda::TrackInfo { + name: "democracy_proposals", + max_deciding: 10, + decision_deposit: 10 * UNIQUE, + prepare_period: fellowship_timings::track::democracy_proposals::PREPARE_PERIOD, + decision_period: fellowship_timings::track::democracy_proposals::DECISION_PERIOD, + confirm_period: fellowship_timings::track::democracy_proposals::CONFIRM_PERIOD, + min_enactment_period: + fellowship_timings::track::democracy_proposals::MIN_ENACTMENT_PERIOD, + min_approval: pallet_referenda::Curve::LinearDecreasing { + length: Perbill::from_percent(100), + floor: Perbill::from_percent(50), + ceil: Perbill::from_percent(100), + }, + min_support: pallet_referenda::Curve::LinearDecreasing { + length: Perbill::from_percent(100), + floor: Perbill::from_percent(0), + ceil: Perbill::from_percent(50), + }, + }, + )]; + &DATA[..] + } + fn track_for(id: &Self::RuntimeOrigin) -> Result { + #[cfg(feature = "runtime-benchmarks")] + { + // For benchmarks, we enable a root origin. + // It is important that this is not available in production! + let root: Self::RuntimeOrigin = frame_system::RawOrigin::Root.into(); + if &root == id { + return Ok(9); + } + } + + match GovOrigins::try_from(id.clone()) { + Ok(_) => Ok(DEMOCRACY_TRACK_ID), + _ => Err(()), + } + } +} + +pallet_referenda::impl_tracksinfo_get!(TracksInfo, Balance, BlockNumber); + +pub struct ClassToRankMapper(PhantomData<(T, I)>); + +//TODO: Remove the type when it appears in the release. +pub type ClassOf = <>::Polls as Polling>>::Class; + +impl Convert, Rank> for ClassToRankMapper +where + T: RankedConfig, + ClassOf: Into, +{ + fn convert(track_id: ClassOf) -> Rank { + match track_id.into() { + DEMOCRACY_TRACK_ID => 3, + other => other, + } + } +} diff --git a/runtime/common/config/governance/mod.rs b/runtime/common/config/governance/mod.rs new file mode 100644 index 0000000000..adc3476c53 --- /dev/null +++ b/runtime/common/config/governance/mod.rs @@ -0,0 +1,68 @@ +// Copyright 2019-2022 Unique Network (Gibraltar) Ltd. +// This file is part of Unique Network. + +// Unique Network is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Unique Network is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Unique Network. If not, see . + +use frame_support::{ + PalletId, parameter_types, + traits::{ + EnsureOrigin, EqualPrivilegeOnly, EitherOfDiverse, EitherOf, MapSuccess, ConstU16, Polling, + }, + weights::Weight, + pallet_prelude::*, +}; +use frame_system::{EnsureRoot, EnsureNever}; +use sp_runtime::{ + Perbill, + traits::{AccountIdConversion, ConstU32, Replace, CheckedSub, Convert}, + morph_types, +}; +use crate::{ + Runtime, RuntimeOrigin, RuntimeEvent, RuntimeCall, OriginCaller, Preimage, Balances, Treasury, + Scheduler, Council, TechnicalCommittee, +}; +pub use up_common::{ + constants::{UNIQUE, DAYS, HOURS, MINUTES, CENTIUNIQUE}, + types::{AccountId, Balance, BlockNumber}, +}; +use pallet_collective::EnsureProportionAtLeast; + +pub mod council; +pub use council::*; + +pub mod democracy; +pub use democracy::*; + +pub mod technical_committee; +pub use technical_committee::*; + +pub mod fellowship; +pub use fellowship::*; + +pub mod scheduler; +pub use scheduler::*; + +impl pallet_gov_origins::Config for Runtime {} + +morph_types! { + /// A `TryMorph` implementation to reduce a scalar by a particular amount, checking for + /// underflow. + pub type CheckedReduceBy: TryMorph = |r: N::Type| -> Result { + r.checked_sub(&N::get()).ok_or(()) + } where N::Type: CheckedSub; +} + +parameter_types! { + pub MaxCollectivesProposalWeight: Weight = Perbill::from_percent(80) * ::BlockWeights::get().max_block; +} diff --git a/runtime/common/config/governance/scheduler.rs b/runtime/common/config/governance/scheduler.rs new file mode 100644 index 0000000000..a20461e85b --- /dev/null +++ b/runtime/common/config/governance/scheduler.rs @@ -0,0 +1,24 @@ +use up_common::constants::{MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO}; + +use super::*; + +parameter_types! { + pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) * + ::BlockWeights::get() + .per_class.get(frame_support::pallet_prelude::DispatchClass::Normal).max_total + .unwrap_or(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT); + pub MaxScheduledPerBlock: u32 = 50; +} + +impl pallet_scheduler::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; + type RuntimeEvent = RuntimeEvent; + type PalletsOrigin = OriginCaller; + type RuntimeCall = RuntimeCall; + type MaximumWeight = MaximumSchedulerWeight; + type ScheduleOrigin = EnsureRoot; + type MaxScheduledPerBlock = MaxScheduledPerBlock; + type WeightInfo = pallet_scheduler::weights::SubstrateWeight; + type OriginPrivilegeCmp = EqualPrivilegeOnly; + type Preimages = Preimage; +} diff --git a/runtime/common/config/governance/technical_committee.rs b/runtime/common/config/governance/technical_committee.rs new file mode 100644 index 0000000000..33957316e6 --- /dev/null +++ b/runtime/common/config/governance/technical_committee.rs @@ -0,0 +1,57 @@ +use super::*; + +parameter_types! { + pub TechnicalMaxProposals: u32 = 100; + pub TechnicalMaxMembers: u32 = 100; +} + +#[cfg(not(feature = "gov-test-timings"))] +use crate::governance_timings::technical_committee as technical_committee_timings; + +#[cfg(feature = "gov-test-timings")] +pub mod technical_committee_timings { + use super::*; + + parameter_types! { + pub TechnicalMotionDuration: BlockNumber = 35; + } +} + +pub type TechnicalCollective = pallet_collective::Instance2; +impl pallet_collective::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type MotionDuration = technical_committee_timings::TechnicalMotionDuration; + type MaxProposals = TechnicalMaxProposals; + type MaxMembers = TechnicalMaxMembers; + type DefaultVote = pallet_collective::PrimeDefaultVote; + type WeightInfo = pallet_collective::weights::SubstrateWeight; + type SetMembersOrigin = EnsureRoot; + type MaxProposalWeight = MaxCollectivesProposalWeight; +} + +pub type TechnicalCollectiveMembership = pallet_membership::Instance2; +impl pallet_membership::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type AddOrigin = RootOrMoreThanHalfCouncil; + type RemoveOrigin = RootOrMoreThanHalfCouncil; + type SwapOrigin = RootOrMoreThanHalfCouncil; + type ResetOrigin = EnsureRoot; + type PrimeOrigin = RootOrMoreThanHalfCouncil; + type MembershipInitialized = TechnicalCommittee; + type MembershipChanged = TechnicalCommittee; + type MaxMembers = TechnicalMaxMembers; + type WeightInfo = pallet_membership::weights::SubstrateWeight; +} + +pub type TechnicalCommitteeMember = pallet_collective::EnsureMember; + +pub type RootOrTechnicalCommitteeMember = + EitherOfDiverse, TechnicalCommitteeMember>; + +pub type AllTechnicalCommittee = + pallet_collective::EnsureProportionAtLeast; + +pub type RootOrAllTechnicalCommittee = + EitherOfDiverse, AllTechnicalCommittee>; diff --git a/runtime/common/config/mod.rs b/runtime/common/config/mod.rs index 7a34bb10c8..d4c9ff1e4e 100644 --- a/runtime/common/config/mod.rs +++ b/runtime/common/config/mod.rs @@ -22,5 +22,8 @@ pub mod sponsoring; pub mod substrate; pub mod xcm; +#[cfg(feature = "governance")] +pub mod governance; + #[cfg(feature = "pallet-test-utils")] pub mod test_pallets; diff --git a/runtime/common/config/pallets/collator_selection.rs b/runtime/common/config/pallets/collator_selection.rs index 50754983bd..7d15498e31 100644 --- a/runtime/common/config/pallets/collator_selection.rs +++ b/runtime/common/config/pallets/collator_selection.rs @@ -15,15 +15,24 @@ // along with Unique Network. If not, see . use frame_support::{parameter_types, PalletId}; -use frame_system::EnsureRoot; use crate::{ - AccountId, Balance, Balances, BlockNumber, Runtime, RuntimeEvent, Aura, Session, SessionKeys, + Balance, Balances, BlockNumber, Runtime, RuntimeEvent, Aura, Session, SessionKeys, CollatorSelection, Treasury, config::pallets::{MaxCollators, SessionPeriod, TreasuryAccountId}, }; + +#[cfg(feature = "governance")] +use crate::config::governance; + +#[cfg(not(feature = "governance"))] +use frame_system::EnsureRoot; + use sp_runtime::Perbill; use up_common::constants::{UNIQUE, MILLIUNIQUE}; - +use pallet_configuration::{ + CollatorSelectionKickThresholdOverride, CollatorSelectionLicenseBondOverride, + CollatorSelectionDesiredCollatorsOverride, +}; parameter_types! { pub const SessionOffset: BlockNumber = 0; } @@ -60,6 +69,9 @@ parameter_types! { pub const MaxAdditionalFields: u32 = 100; pub const MaxRegistrars: u32 = 20; pub const LicenceBondIdentifier: [u8; 16] = *b"licenceidentifie"; + pub LicenseBond: Balance = CollatorSelectionLicenseBondOverride::::get(); + pub DesiredCollators: u32 = CollatorSelectionDesiredCollatorsOverride::::get(); + pub KickThreshold: BlockNumber = CollatorSelectionKickThresholdOverride::::get(); } impl pallet_identity::Config for Runtime { @@ -71,8 +83,19 @@ impl pallet_identity::Config for Runtime { type MaxRegistrars = MaxRegistrars; type MaxSubAccounts = MaxSubAccounts; type SubAccountDeposit = SubAccountDeposit; + + #[cfg(feature = "governance")] + type RegistrarOrigin = governance::RootOrTechnicalCommitteeMember; + + #[cfg(feature = "governance")] + type ForceOrigin = governance::RootOrTechnicalCommitteeMember; + + #[cfg(not(feature = "governance"))] type RegistrarOrigin = EnsureRoot<::AccountId>; + + #[cfg(not(feature = "governance"))] type ForceOrigin = EnsureRoot<::AccountId>; + type Slashed = Treasury; type WeightInfo = pallet_identity::weights::SubstrateWeight; } @@ -84,8 +107,19 @@ parameter_types! { impl pallet_collator_selection::Config for Runtime { type RuntimeEvent = RuntimeEvent; + type Currency = Balances; // We allow root only to execute privileged collator selection operations. - type UpdateOrigin = EnsureRoot; + + // We allow root or the unanimous technical committee + // to execute privileged collator selection operations. + #[cfg(feature = "governance")] + type UpdateOrigin = governance::RootOrAllTechnicalCommittee; + + // If there is no governance, + // we allow root only to execute privileged collator selection operations. + #[cfg(not(feature = "governance"))] + type UpdateOrigin = EnsureRoot<::AccountId>; + type TreasuryAccountId = TreasuryAccountId; type PotId = PotId; type MaxCollators = MaxCollators; @@ -95,4 +129,7 @@ impl pallet_collator_selection::Config for Runtime { type ValidatorRegistration = Session; type WeightInfo = pallet_collator_selection::weights::SubstrateWeight; type LicenceBondIdentifier = LicenceBondIdentifier; + type DesiredCollators = DesiredCollators; + type LicenseBond = LicenseBond; + type KickThreshold = KickThreshold; } diff --git a/runtime/common/config/pallets/mod.rs b/runtime/common/config/pallets/mod.rs index 52295407c4..fca5f60010 100644 --- a/runtime/common/config/pallets/mod.rs +++ b/runtime/common/config/pallets/mod.rs @@ -24,8 +24,7 @@ use crate::{ weights::CommonWeights, RelayChainBlockNumberProvider, }, - Runtime, RuntimeEvent, RuntimeCall, RuntimeOrigin, RUNTIME_NAME, TOKEN_SYMBOL, DECIMALS, - Balances, + Runtime, RuntimeEvent, RuntimeCall, VERSION, TOKEN_SYMBOL, DECIMALS, Balances, }; use frame_support::traits::{ConstU32, ConstU64, Currency}; use up_common::{ @@ -37,7 +36,10 @@ use up_data_structs::{ }; use sp_arithmetic::Perbill; -#[cfg(feature = "scheduler")] +#[cfg(feature = "governance")] +use crate::runtime_common::config::governance; + +#[cfg(feature = "unique-scheduler")] pub mod scheduler; #[cfg(feature = "foreign-assets")] @@ -88,7 +90,7 @@ impl pallet_nonfungible::Config for Runtime { parameter_types! { pub const Decimals: u8 = DECIMALS; - pub Name: String = RUNTIME_NAME.to_string(); + pub Name: String = String::from_utf8_lossy(VERSION.impl_name.as_ref()).to_string(); pub Symbol: String = TOKEN_SYMBOL.to_string(); } impl pallet_balances_adapter::Config for Runtime { @@ -123,13 +125,23 @@ parameter_types! { pub AppPromotionDailyRate: Perbill = Perbill::from_rational(5u32, 10_000); pub const MaxCollators: u32 = MAX_COLLATORS; pub const LicenseBond: Balance = GENESIS_LICENSE_BOND; - pub const SessionPeriod: BlockNumber = SESSION_LENGTH; + pub const DayRelayBlocks: BlockNumber = RELAY_DAYS; } +#[cfg(not(feature = "session-test-timings"))] +parameter_types! { + pub const SessionPeriod: BlockNumber = SESSION_LENGTH; +} + +#[cfg(feature = "session-test-timings")] +parameter_types! { + pub const SessionPeriod: BlockNumber = 5 * MINUTES; +} + impl pallet_configuration::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type Currency = Balances; + type Balance = Balance; type DefaultWeightToFeeCoefficient = ConstU64<{ up_common::constants::WEIGHT_TO_FEE_COEFF }>; type DefaultMinGasPrice = ConstU64<{ up_common::constants::MIN_GAS_PRICE }>; type DefaultCollatorSelectionMaxCollators = MaxCollators; @@ -143,8 +155,17 @@ impl pallet_configuration::Config for Runtime { impl pallet_maintenance::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + + #[cfg(feature = "governance")] + type ManagerOrigin = governance::RootOrTechnicalCommitteeMember; + + #[cfg(not(feature = "governance"))] + type ManagerOrigin = frame_system::EnsureRoot; + + type PreimageOrigin = frame_system::EnsureRoot; + #[cfg(feature = "preimage")] type Preimages = crate::Preimage; #[cfg(not(feature = "preimage"))] diff --git a/runtime/common/config/substrate.rs b/runtime/common/config/substrate.rs index 65dfb10eb2..c40a2e33e8 100644 --- a/runtime/common/config/substrate.rs +++ b/runtime/common/config/substrate.rs @@ -35,8 +35,8 @@ use frame_system::{ }; use pallet_transaction_payment::{Multiplier, ConstFeeMultiplier}; use crate::{ - runtime_common::DealWithFees, Runtime, RuntimeEvent, RuntimeCall, RuntimeOrigin, PalletInfo, - System, Balances, SS58Prefix, Version, + runtime_common::DealWithFees, Runtime, RuntimeEvent, RuntimeCall, RuntimeOrigin, OriginCaller, + PalletInfo, System, Balances, SS58Prefix, Version, }; use up_common::{types::*, constants::*}; use sp_std::vec; @@ -236,6 +236,7 @@ impl pallet_treasury::Config for Runtime { impl pallet_sudo::Config for Runtime { type RuntimeEvent = RuntimeEvent; type RuntimeCall = RuntimeCall; + type WeightInfo = pallet_sudo::weights::SubstrateWeight; } parameter_types! { @@ -247,3 +248,10 @@ impl pallet_aura::Config for Runtime { type DisabledValidators = (); type MaxAuthorities = MaxAuthorities; } + +impl pallet_utility::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type PalletsOrigin = OriginCaller; + type WeightInfo = pallet_utility::weights::SubstrateWeight; +} diff --git a/runtime/common/config/xcm/mod.rs b/runtime/common/config/xcm/mod.rs index 9237189d15..1add5d3de6 100644 --- a/runtime/common/config/xcm/mod.rs +++ b/runtime/common/config/xcm/mod.rs @@ -49,6 +49,9 @@ pub use foreignassets as xcm_assets; #[cfg(not(feature = "foreign-assets"))] pub use nativeassets as xcm_assets; +#[cfg(feature = "governance")] +use crate::runtime_common::config::governance; + use xcm_assets::{AssetTransactor, IsReserve, Trader}; parameter_types! { @@ -220,6 +223,8 @@ impl pallet_xcm::Config for Runtime { type MaxLockers = ConstU32<8>; type WeightInfo = crate::weights::xcm::SubstrateWeight; type AdminOrigin = EnsureRoot; + type MaxRemoteLockConsumers = ConstU32<0>; + type RemoteLockConsumerIdentifier = (); #[cfg(feature = "runtime-benchmarks")] type ReachableDest = ReachableDest; } @@ -236,7 +241,13 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type ChannelInfo = ParachainSystem; type VersionWrapper = PolkadotXcm; type ExecuteOverweightOrigin = frame_system::EnsureRoot; - type ControllerOrigin = EnsureRoot; + + #[cfg(feature = "governance")] + type ControllerOrigin = governance::RootOrTechnicalCommitteeMember; + + #[cfg(not(feature = "governance"))] + type ControllerOrigin = frame_system::EnsureRoot; + type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin; type PriceForSiblingDelivery = (); } diff --git a/runtime/common/construct_runtime.rs b/runtime/common/construct_runtime.rs index 02d7f05c1d..f059ccabb1 100644 --- a/runtime/common/construct_runtime.rs +++ b/runtime/common/construct_runtime.rs @@ -60,6 +60,33 @@ macro_rules! construct_runtime { #[cfg(feature = "preimage")] Preimage: pallet_preimage = 41, + #[cfg(feature = "governance")] + Democracy: pallet_democracy = 42, + + #[cfg(feature = "governance")] + Council: pallet_collective:: = 43, + + #[cfg(feature = "governance")] + TechnicalCommittee: pallet_collective:: = 44, + + #[cfg(feature = "governance")] + CouncilMembership: pallet_membership:: = 45, + + #[cfg(feature = "governance")] + TechnicalCommitteeMembership: pallet_membership:: = 46, + + #[cfg(feature = "governance")] + FellowshipCollective: pallet_ranked_collective = 47, + + #[cfg(feature = "governance")] + FellowshipReferenda: pallet_referenda = 48, + + #[cfg(feature = "governance")] + Scheduler: pallet_scheduler = 49, + + #[cfg(feature = "governance")] + Origins: pallet_gov_origins = 99, + // XCM helpers. XcmpQueue: cumulus_pallet_xcmp_queue = 50, PolkadotXcm: pallet_xcm = 51, @@ -71,7 +98,7 @@ macro_rules! construct_runtime { Unique: pallet_unique::{Pallet, Call, Storage} = 61, // #[cfg(feature = "scheduler")] - // Scheduler: pallet_unique_scheduler_v2 = 62, + // UniqueScheduler: pallet_unique_scheduler_v2 = 62, Configuration: pallet_configuration = 63, @@ -109,6 +136,8 @@ macro_rules! construct_runtime { BalancesAdapter: pallet_balances_adapter = 155, + Utility: pallet_utility = 156, + #[cfg(feature = "pallet-test-utils")] TestUtils: pallet_test_utils = 255, } diff --git a/runtime/common/dispatch.rs b/runtime/common/dispatch.rs index 602670f4a9..4f17069bc5 100644 --- a/runtime/common/dispatch.rs +++ b/runtime/common/dispatch.rs @@ -25,14 +25,14 @@ use pallet_common::{ }; pub use pallet_common::dispatch::CollectionDispatch; use pallet_fungible::{Pallet as PalletFungible, FungibleHandle}; -use pallet_balances_adapter::{NativeFungibleHandle}; +use pallet_balances_adapter::NativeFungibleHandle; use pallet_nonfungible::{Pallet as PalletNonfungible, NonfungibleHandle}; use pallet_refungible::{ Pallet as PalletRefungible, RefungibleHandle, erc_token::RefungibleTokenHandle, }; use up_data_structs::{ CollectionMode, CreateCollectionData, MAX_DECIMAL_POINTS, mapping::TokenAddressMapping, - CollectionId, CollectionFlags, + CollectionId, }; #[cfg(not(feature = "refungible"))] @@ -72,26 +72,21 @@ where fn create( sender: T::CrossAccountId, payer: T::CrossAccountId, - data: CreateCollectionData, - flags: CollectionFlags, + data: CreateCollectionData, ) -> Result { let id = match data.mode { - CollectionMode::NFT => { - >::init_collection(sender, payer, data, flags)? - } + CollectionMode::NFT => >::init_collection(sender, payer, data)?, CollectionMode::Fungible(decimal_points) => { // check params ensure!( decimal_points <= MAX_DECIMAL_POINTS, pallet_unique::Error::::CollectionDecimalPointLimitExceeded ); - >::init_collection(sender, payer, data, flags)? + >::init_collection(sender, payer, data)? } #[cfg(feature = "refungible")] - CollectionMode::ReFungible => { - >::init_collection(sender, payer, data, flags)? - } + CollectionMode::ReFungible => >::init_collection(sender, payer, data)?, #[cfg(not(feature = "refungible"))] CollectionMode::ReFungible => return unsupported!(T), diff --git a/runtime/common/ethereum/mod.rs b/runtime/common/ethereum/mod.rs index 086fadf5e7..0539fc22b1 100644 --- a/runtime/common/ethereum/mod.rs +++ b/runtime/common/ethereum/mod.rs @@ -17,4 +17,3 @@ pub mod precompiles; pub mod self_contained_call; pub mod sponsoring; -pub mod transaction_converter; diff --git a/runtime/common/ethereum/precompiles/mod.rs b/runtime/common/ethereum/precompiles/mod.rs index f8ff23e66f..a243a03a0b 100644 --- a/runtime/common/ethereum/precompiles/mod.rs +++ b/runtime/common/ethereum/precompiles/mod.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Unique Network. If not, see . -use pallet_evm::{Precompile, PrecompileHandle, PrecompileResult, PrecompileSet}; +use pallet_evm::{Precompile, PrecompileHandle, PrecompileResult, PrecompileSet, IsPrecompileResult}; use sp_core::H160; use sp_std::marker::PhantomData; @@ -60,8 +60,11 @@ where } } - fn is_precompile(&self, address: H160) -> bool { - Self::used_addresses().contains(&address) + fn is_precompile(&self, address: H160, _gas: u64) -> IsPrecompileResult { + IsPrecompileResult::Answer { + is_precompile: Self::used_addresses().contains(&address), + extra_cost: 0, + } } } diff --git a/runtime/common/ethereum/sponsoring.rs b/runtime/common/ethereum/sponsoring.rs index ec49eaa810..d6c220b8a3 100644 --- a/runtime/common/ethereum/sponsoring.rs +++ b/runtime/common/ethereum/sponsoring.rs @@ -17,12 +17,12 @@ //! Implements EVM sponsoring logic via TransactionValidityHack use core::{convert::TryInto, marker::PhantomData}; -use evm_coder::{Call, abi::AbiReader}; +use evm_coder::{Call}; use pallet_common::{CollectionHandle, eth::map_eth_to_id}; use pallet_evm::account::CrossAccountId; use pallet_evm_transaction_payment::CallContext; use pallet_nonfungible::{ - Config as NonfungibleConfig, + Config as NonfungibleConfig, Pallet as NonfungiblePallet, NonfungibleHandle, erc::{ UniqueNFTCall, ERC721UniqueExtensionsCall, ERC721UniqueMintableCall, ERC721Call, TokenPropertiesCall, @@ -56,6 +56,8 @@ pub type EvmSponsorshipHandler = ( pub struct UniqueEthSponsorshipHandler(PhantomData<*const T>); impl SponsorshipHandler for UniqueEthSponsorshipHandler +where + T::AccountId: From<[u8; 32]>, { fn get_sponsor( who: &T::CrossAccountId, @@ -64,32 +66,74 @@ impl if let Some(collection_id) = map_eth_to_id(&call_context.contract_address) { let collection = >::new(collection_id)?; let sponsor = collection.sponsorship.sponsor()?.clone(); - let (method_id, mut reader) = AbiReader::new_call(&call_context.input).ok()?; + // let (method_id, mut reader) = AbiReader::new_call(&call_context.input).ok()?; Some(T::CrossAccountId::from_sub(match &collection.mode { CollectionMode::NFT => { - let call = >::parse(method_id, &mut reader).ok()??; + let collection = NonfungibleHandle::cast(collection); + let call = >::parse_full(&call_context.input).ok()??; match call { - UniqueNFTCall::TokenProperties(TokenPropertiesCall::SetProperty { - token_id, - key, - value, - .. - }) => { - let token_id: TokenId = token_id.try_into().ok()?; - withdraw_set_token_property::( - &collection, - who, - &token_id, - key.len() + value.len(), - ) - .map(|()| sponsor) - } - UniqueNFTCall::ERC721UniqueExtensions( - ERC721UniqueExtensionsCall::Transfer { token_id, .. }, - ) => { - let token_id: TokenId = token_id.try_into().ok()?; - withdraw_transfer::(&collection, who, &token_id).map(|()| sponsor) - } + UniqueNFTCall::TokenProperties(call) => match call { + TokenPropertiesCall::SetProperty { + token_id, + key, + value, + .. + } => { + let token_id: TokenId = token_id.try_into().ok()?; + withdraw_set_existing_token_property::( + &collection, + who, + &token_id, + key.len() + value.len(), + ) + .map(|()| sponsor) + } + TokenPropertiesCall::SetProperties { + token_id, + properties, + .. + } => { + let token_id: TokenId = token_id.try_into().ok()?; + let data_size = properties + .into_iter() + .map(|p| p.key().len() + p.value().len()) + .sum(); + + withdraw_set_existing_token_property::( + &collection, + who, + &token_id, + data_size, + ) + .map(|()| sponsor) + } + _ => None, + }, + UniqueNFTCall::ERC721UniqueExtensions(call) => match call { + ERC721UniqueExtensionsCall::Transfer { token_id, .. } => { + let token_id: TokenId = token_id.try_into().ok()?; + withdraw_transfer::(&collection, who, &token_id) + .map(|()| sponsor) + } + ERC721UniqueExtensionsCall::MintCross { properties, .. } => { + withdraw_create_item::( + &collection, + who, + &CreateItemData::NFT(CreateNftData::default()), + )?; + + let token_id = + >::next_token_id(&collection).ok()?; + let data_size: usize = properties + .into_iter() + .map(|p| p.key().len() + p.value().len()) + .sum(); + + withdraw_set_token_property::(&collection, &token_id, data_size) + .map(|()| sponsor) + } + _ => None, + }, UniqueNFTCall::ERC721UniqueMintable( ERC721UniqueMintableCall::Mint { .. } | ERC721UniqueMintableCall::MintCheckId { .. } @@ -117,11 +161,12 @@ impl } } CollectionMode::ReFungible => { - let call = >::parse(method_id, &mut reader).ok()??; + let call = + >::parse_full(&call_context.input).ok()??; refungible::call_sponsor(call, collection, who).map(|()| sponsor) } CollectionMode::Fungible(_) => { - let call = >::parse(method_id, &mut reader).ok()??; + let call = >::parse_full(&call_context.input).ok()??; match call { UniqueFungibleCall::ERC20(ERC20Call::Transfer { .. }) => { withdraw_transfer::(&collection, who, &TokenId::default()) @@ -152,8 +197,7 @@ impl // Token existance isn't checked at this point and should be checked in `withdraw` method. let token = RefungibleTokenHandle(rft_collection, token_id); - let (method_id, mut reader) = AbiReader::new_call(&call_context.input).ok()?; - let call = >::parse(method_id, &mut reader).ok()??; + let call = >::parse_full(&call_context.input).ok()??; Some(T::CrossAccountId::from_sub( refungible::token_call_sponsor(call, token, who).map(|()| sponsor)?, )) @@ -190,6 +234,7 @@ mod common { | CollectionOwner | CollectionAdmins | CollectionLimits + | CollectionNesting | CollectionNestingRestrictedIds | CollectionNestingPermissions | UniqueCollectionType => None, @@ -205,6 +250,7 @@ mod common { | RemoveCollectionAdmin { .. } | SetNestingBool { .. } | SetNesting { .. } + | SetNestingCollectionIds { .. } | SetCollectionAccess { .. } | SetCollectionMintMode { .. } | SetOwner { .. } diff --git a/runtime/common/ethereum/sponsoring/refungible.rs b/runtime/common/ethereum/sponsoring/refungible.rs index 07a3615a0b..fd93fbcae3 100644 --- a/runtime/common/ethereum/sponsoring/refungible.rs +++ b/runtime/common/ethereum/sponsoring/refungible.rs @@ -94,7 +94,12 @@ where .. } => { let token_id = TokenId::try_from(token_id).ok()?; - withdraw_set_token_property::(&collection, who, &token_id, key.len() + value.len()) + withdraw_set_existing_token_property::( + &collection, + who, + &token_id, + key.len() + value.len(), + ) } } } diff --git a/runtime/common/ethereum/transaction_converter.rs b/runtime/common/ethereum/transaction_converter.rs deleted file mode 100644 index 9a7e945f85..0000000000 --- a/runtime/common/ethereum/transaction_converter.rs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2019-2022 Unique Network (Gibraltar) Ltd. -// This file is part of Unique Network. - -// Unique Network is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Unique Network is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Unique Network. If not, see . - -use codec::{Encode, Decode}; -use crate::{opaque, Runtime, UncheckedExtrinsic}; - -pub struct TransactionConverter; - -impl fp_rpc::ConvertTransaction for TransactionConverter { - fn convert_transaction(&self, transaction: pallet_ethereum::Transaction) -> UncheckedExtrinsic { - UncheckedExtrinsic::new_unsigned( - pallet_ethereum::Call::::transact { transaction }.into(), - ) - } -} - -impl fp_rpc::ConvertTransaction for TransactionConverter { - fn convert_transaction( - &self, - transaction: pallet_ethereum::Transaction, - ) -> opaque::UncheckedExtrinsic { - let extrinsic = UncheckedExtrinsic::new_unsigned( - pallet_ethereum::Call::::transact { transaction }.into(), - ); - let encoded = extrinsic.encode(); - opaque::UncheckedExtrinsic::decode(&mut &encoded[..]) - .expect("Encoded extrinsic is always valid") - } -} diff --git a/runtime/common/instance.rs b/runtime/common/instance.rs index dd28de5790..50bd42bcb8 100644 --- a/runtime/common/instance.rs +++ b/runtime/common/instance.rs @@ -1,16 +1,9 @@ use crate::{ - runtime_common::{ - config::ethereum::CrossAccountId, ethereum::transaction_converter::TransactionConverter, - }, + runtime_common::{config::ethereum::CrossAccountId}, Runtime, }; use up_common::types::opaque::RuntimeInstance; impl RuntimeInstance for Runtime { type CrossAccountId = CrossAccountId; - type TransactionConverter = TransactionConverter; - - fn get_transaction_converter() -> TransactionConverter { - TransactionConverter - } } diff --git a/runtime/common/maintenance.rs b/runtime/common/maintenance.rs index 8147af4e49..96d206c502 100644 --- a/runtime/common/maintenance.rs +++ b/runtime/common/maintenance.rs @@ -67,7 +67,7 @@ impl SignedExtension for CheckMaintenance { | RuntimeCall::Structure(_) | RuntimeCall::Unique(_) => Err(TransactionValidityError::Invalid(InvalidTransaction::Call)), - #[cfg(feature = "scheduler")] + #[cfg(feature = "unique-scheduler")] RuntimeCall::Scheduler(_) => Err(TransactionValidityError::Invalid(InvalidTransaction::Call)), #[cfg(feature = "app-promotion")] diff --git a/runtime/common/mod.rs b/runtime/common/mod.rs index 9439d13e82..939cc8455c 100644 --- a/runtime/common/mod.rs +++ b/runtime/common/mod.rs @@ -23,7 +23,7 @@ pub mod instance; pub mod maintenance; pub mod runtime_apis; -#[cfg(feature = "scheduler")] +#[cfg(feature = "unique-scheduler")] pub mod scheduler; pub mod sponsoring; diff --git a/runtime/common/runtime_apis.rs b/runtime/common/runtime_apis.rs index a1d963d6e2..a3d9bae08f 100644 --- a/runtime/common/runtime_apis.rs +++ b/runtime/common/runtime_apis.rs @@ -38,11 +38,14 @@ macro_rules! impl_common_runtime_apis { use sp_core::{crypto::KeyTypeId, OpaqueMetadata, H256, U256, H160}; use sp_runtime::{ Permill, - traits::Block as BlockT, + traits::{Block as BlockT}, transaction_validity::{TransactionSource, TransactionValidity}, ApplyExtrinsicResult, DispatchError, }; - use frame_support::pallet_prelude::Weight; + use frame_support::{ + pallet_prelude::Weight, + traits::OnFinalize, + }; use fp_rpc::TransactionStatus; use pallet_transaction_payment::{ FeeDetails, RuntimeDispatchInfo, @@ -367,6 +370,10 @@ macro_rules! impl_common_runtime_apis { access_list.unwrap_or_default(), is_transactional, validate, + // TODO we probably want to support external cost recording in non-transactional calls + None, + None, + config.as_ref().unwrap_or_else(|| ::config()), ).map_err(|err| err.error.into()) } @@ -404,6 +411,10 @@ macro_rules! impl_common_runtime_apis { access_list.unwrap_or_default(), is_transactional, validate, + // TODO we probably want to support external cost recording in non-transactional calls + None, + None, + config.as_ref().unwrap_or_else(|| ::config()), ).map_err(|err| err.error.into()) } @@ -444,6 +455,21 @@ macro_rules! impl_common_runtime_apis { } fn gas_limit_multiplier_support() {} + + fn pending_block( + xts: Vec<::Extrinsic>, + ) -> (Option, Option>) { + for ext in xts.into_iter() { + let _ = Executive::apply_extrinsic(ext); + } + + Ethereum::on_finalize(System::block_number() + 1); + + ( + pallet_ethereum::CurrentBlock::::get(), + pallet_ethereum::CurrentTransactionStatuses::::get() + ) + } } impl fp_rpc::ConvertTransactionRuntimeApi for Runtime { @@ -572,7 +598,7 @@ macro_rules! impl_common_runtime_apis { #[cfg(feature = "refungible")] list_benchmark!(list, extra, pallet_refungible, Refungible); - #[cfg(feature = "scheduler")] + #[cfg(feature = "unique-scheduler")] list_benchmark!(list, extra, pallet_unique_scheduler_v2, Scheduler); #[cfg(feature = "collator-selection")] @@ -638,7 +664,7 @@ macro_rules! impl_common_runtime_apis { #[cfg(feature = "refungible")] add_benchmark!(params, batches, pallet_refungible, Refungible); - #[cfg(feature = "scheduler")] + #[cfg(feature = "unique-scheduler")] add_benchmark!(params, batches, pallet_unique_scheduler_v2, Scheduler); #[cfg(feature = "collator-selection")] diff --git a/runtime/common/sponsoring.rs b/runtime/common/sponsoring.rs index e4ed66a4f7..a5ceb371c6 100644 --- a/runtime/common/sponsoring.rs +++ b/runtime/common/sponsoring.rs @@ -39,7 +39,7 @@ pub trait Config: UniqueConfig + FungibleConfig + NonfungibleConfig + Refungible impl Config for T where T: UniqueConfig + FungibleConfig + NonfungibleConfig + RefungibleConfig {} // TODO: permission check? -pub fn withdraw_set_token_property( +pub fn withdraw_set_existing_token_property( collection: &CollectionHandle, who: &T::CrossAccountId, item_id: &TokenId, @@ -64,6 +64,17 @@ pub fn withdraw_set_token_property( } } + withdraw_set_token_property(collection, item_id, data_size) +} + +pub fn withdraw_set_token_property( + collection: &CollectionHandle, + item_id: &TokenId, + data_size: usize, +) -> Option<()> { + if data_size == 0 { + return Some(()); + } if data_size > collection.limits.sponsored_data_size() as usize { return None; } @@ -173,7 +184,6 @@ pub fn withdraw_create_item( return None; } } - CreateItemBasket::::insert((collection.id, who.as_sub()), block_number); Some(()) @@ -237,7 +247,7 @@ where .. } => { let (sponsor, collection) = load::(*collection_id)?; - withdraw_set_token_property( + withdraw_set_existing_token_property( &collection, &T::CrossAccountId::from_sub(who.clone()), token_id, diff --git a/runtime/common/tests/mod.rs b/runtime/common/tests/mod.rs index cc92ec3c80..44eebea8b4 100644 --- a/runtime/common/tests/mod.rs +++ b/runtime/common/tests/mod.rs @@ -16,7 +16,6 @@ use sp_runtime::{BuildStorage, Storage}; use sp_core::{Public, Pair}; -use sp_std::vec; use up_common::types::AuraId; use crate::{Runtime, GenesisConfig, ParachainInfoConfig, RuntimeEvent, System}; @@ -76,7 +75,7 @@ fn make_basic_storage() -> Storage { AccountPublic::from(get_from_seed::(seed)).into_account() } - let accounts = vec!["Alice", "Bob"]; + let accounts = ["Alice", "Bob"]; let keys = accounts .iter() .map(|&acc| { @@ -104,7 +103,7 @@ fn make_basic_storage() -> Storage { ..GenesisConfig::default() }; - cfg.build_storage().unwrap().into() + cfg.build_storage().unwrap() } #[cfg(not(feature = "collator-selection"))] diff --git a/runtime/common/tests/xcm.rs b/runtime/common/tests/xcm.rs index 821e2f5544..cbe7ef5dbb 100644 --- a/runtime/common/tests/xcm.rs +++ b/runtime/common/tests/xcm.rs @@ -26,7 +26,7 @@ use frame_support::{pallet_prelude::Weight}; const ALICE: AccountId = AccountId::new([0u8; 32]); const BOB: AccountId = AccountId::new([1u8; 32]); -const INITIAL_BALANCE: u128 = 1000000000000000000_0000; // 1000 UNQ +const INITIAL_BALANCE: u128 = 10_000_000_000_000_000_000_000; // 10_000 UNQ #[test] pub fn xcm_transact_is_forbidden() { diff --git a/runtime/opal/Cargo.toml b/runtime/opal/Cargo.toml index 7afd10b659..03ec7e5700 100644 --- a/runtime/opal/Cargo.toml +++ b/runtime/opal/Cargo.toml @@ -17,9 +17,16 @@ targets = ['x86_64-unknown-linux-gnu'] [features] default = ['opal-runtime', 'std'] -state-version-0 = [] limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing'] -opal-runtime = ['app-promotion', 'collator-selection', 'foreign-assets', 'pallet-test-utils', 'preimage', 'refungible'] +opal-runtime = [ + 'app-promotion', + 'collator-selection', + 'foreign-assets', + 'governance', + 'pallet-test-utils', + 'preimage', + 'refungible', +] pov-estimate = [] runtime-benchmarks = [ "pallet-preimage/runtime-benchmarks", @@ -42,9 +49,16 @@ runtime-benchmarks = [ 'pallet-inflation/runtime-benchmarks', 'pallet-maintenance/runtime-benchmarks', 'pallet-nonfungible/runtime-benchmarks', + 'pallet-democracy/runtime-benchmarks', + 'pallet-collective/runtime-benchmarks', + 'pallet-ranked-collective/runtime-benchmarks', + 'pallet-membership/runtime-benchmarks', + 'pallet-referenda/runtime-benchmarks', + 'pallet-scheduler/runtime-benchmarks', 'pallet-refungible/runtime-benchmarks', 'pallet-structure/runtime-benchmarks', 'pallet-timestamp/runtime-benchmarks', + 'pallet-utility/runtime-benchmarks', 'pallet-unique-scheduler-v2/runtime-benchmarks', 'pallet-unique/runtime-benchmarks', 'pallet-xcm/runtime-benchmarks', @@ -66,6 +80,13 @@ std = [ 'frame-try-runtime/std', 'pallet-aura/std', 'pallet-balances/std', + 'pallet-democracy/std', + 'pallet-collective/std', + 'pallet-ranked-collective/std', + 'pallet-membership/std', + 'pallet-referenda/std', + 'pallet-gov-origins/std', + 'pallet-scheduler/std', # 'pallet-contracts/std', # 'pallet-contracts-primitives/std', # 'pallet-contracts-rpc-runtime-api/std', @@ -100,6 +121,7 @@ std = [ 'pallet-structure/std', 'pallet-sudo/std', 'pallet-timestamp/std', + 'pallet-utility/std', 'pallet-transaction-payment-rpc-runtime-api/std', 'pallet-transaction-payment/std', 'pallet-treasury/std', @@ -135,7 +157,7 @@ std = [ "pallet-foreign-assets/std", 'pallet-maintenance/std', - 'pallet-test-utils/std', + 'pallet-test-utils?/std', ] try-runtime = [ "pallet-authorship/try-runtime", @@ -160,12 +182,14 @@ try-runtime = [ 'orml-xtokens/try-runtime', 'pallet-app-promotion/try-runtime', 'pallet-aura/try-runtime', - 'pallet-balances/try-runtime', 'pallet-balances-adapter/try-runtime', + 'pallet-balances/try-runtime', 'pallet-base-fee/try-runtime', 'pallet-charge-transaction/try-runtime', + 'pallet-collective/try-runtime', 'pallet-common/try-runtime', 'pallet-configuration/try-runtime', + 'pallet-democracy/try-runtime', 'pallet-ethereum/try-runtime', 'pallet-evm-coder-substrate/try-runtime', 'pallet-evm-contract-helpers/try-runtime', @@ -176,12 +200,22 @@ try-runtime = [ 'pallet-fungible/try-runtime', 'pallet-inflation/try-runtime', 'pallet-maintenance/try-runtime', + 'pallet-membership/try-runtime', 'pallet-nonfungible/try-runtime', + 'pallet-democracy/try-runtime', + 'pallet-collective/try-runtime', + 'pallet-ranked-collective/try-runtime', + 'pallet-membership/try-runtime', + 'pallet-referenda/try-runtime', + 'pallet-gov-origins/try-runtime', + 'pallet-scheduler/try-runtime', 'pallet-refungible/try-runtime', + 'pallet-scheduler/try-runtime', 'pallet-structure/try-runtime', 'pallet-sudo/try-runtime', - 'pallet-test-utils/try-runtime', + 'pallet-test-utils?/try-runtime', 'pallet-timestamp/try-runtime', + 'pallet-utility/try-runtime', 'pallet-transaction-payment/try-runtime', 'pallet-treasury/try-runtime', 'pallet-unique-scheduler-v2/try-runtime', @@ -193,10 +227,12 @@ try-runtime = [ app-promotion = [] collator-selection = [] foreign-assets = [] -pallet-test-utils = [] +governance = [] +gov-test-timings = [] preimage = [] refungible = [] -scheduler = [] +unique-scheduler = [] +session-test-timings = [] ################################################################################ # local dependencies @@ -230,6 +266,7 @@ pallet-session = { workspace = true } pallet-state-trie-migration = { workspace = true } pallet-sudo = { workspace = true } pallet-timestamp = { workspace = true } +pallet-utility = { workspace = true } pallet-transaction-payment = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } pallet-treasury = { workspace = true } @@ -282,6 +319,13 @@ pallet-identity = { workspace = true } pallet-inflation = { workspace = true } pallet-maintenance = { workspace = true } pallet-nonfungible = { workspace = true } +pallet-democracy = { workspace = true } +pallet-collective = { workspace = true } +pallet-ranked-collective = { workspace = true } +pallet-membership = { workspace = true } +pallet-referenda = { workspace = true } +pallet-gov-origins = { workspace = true } +pallet-scheduler = { workspace = true } pallet-refungible = { workspace = true } pallet-structure = { workspace = true } pallet-unique = { workspace = true } @@ -305,13 +349,13 @@ serde = { workspace = true, optional = true } ################################################################################ # Test dependencies -pallet-test-utils = { workspace = true } +pallet-test-utils = { workspace = true, optional = true } ################################################################################ # Other Dependencies -impl-trait-for-tuples = { workspace = true } hex-literal = { workspace = true } +impl-trait-for-tuples = { workspace = true } [build-dependencies] substrate-wasm-builder = { workspace = true } diff --git a/runtime/opal/src/governance_timings.rs b/runtime/opal/src/governance_timings.rs new file mode 100644 index 0000000000..78baad1682 --- /dev/null +++ b/runtime/opal/src/governance_timings.rs @@ -0,0 +1,54 @@ +use frame_support::parameter_types; +pub use up_common::{ + constants::{DAYS, HOURS, MINUTES}, + types::BlockNumber, +}; + +pub mod council { + use super::*; + + parameter_types! { + pub CouncilMotionDuration: BlockNumber = 1 * HOURS; + } +} + +pub mod democracy { + use super::*; + + parameter_types! { + pub LaunchPeriod: BlockNumber = 1 * HOURS; + pub VotingPeriod: BlockNumber = 1 * HOURS; + pub FastTrackVotingPeriod: BlockNumber = 10 * MINUTES; + pub EnactmentPeriod: BlockNumber = 5 * MINUTES; + pub CooloffPeriod: BlockNumber = 1 * HOURS; + } +} + +pub mod fellowship { + use super::*; + + parameter_types! { + pub UndecidingTimeout: BlockNumber = 1 * HOURS; + } + + pub mod track { + use super::*; + + pub mod democracy_proposals { + use super::*; + + pub const PREPARE_PERIOD: BlockNumber = 5 * MINUTES; + pub const DECISION_PERIOD: BlockNumber = 1 * HOURS; + pub const CONFIRM_PERIOD: BlockNumber = 10 * MINUTES; + pub const MIN_ENACTMENT_PERIOD: BlockNumber = 1 * MINUTES; + } + } +} + +pub mod technical_committee { + use super::*; + + parameter_types! { + pub TechnicalMotionDuration: BlockNumber = 15 * MINUTES; + } +} diff --git a/runtime/opal/src/lib.rs b/runtime/opal/src/lib.rs index 286d27918e..46ff8248a7 100644 --- a/runtime/opal/src/lib.rs +++ b/runtime/opal/src/lib.rs @@ -36,29 +36,26 @@ use up_common::types::*; use ::xcm::latest::NetworkId; -#[path = "../../common/mod.rs"] mod runtime_common; +pub mod governance_timings; pub mod xcm_barrier; pub use runtime_common::*; -pub const RUNTIME_NAME: &str = "opal"; pub const TOKEN_SYMBOL: &str = "OPL"; pub const DECIMALS: u8 = 18; /// This runtime version. +#[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!(RUNTIME_NAME), - impl_name: create_runtime_str!(RUNTIME_NAME), + spec_name: create_runtime_str!("opal"), + impl_name: create_runtime_str!("opal"), authoring_version: 1, - spec_version: 942057, + spec_version: 943061, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 3, - #[cfg(feature = "state-version-0")] - state_version: 0, - #[cfg(not(feature = "state-version-0"))] state_version: 1, }; diff --git a/runtime/opal/src/runtime_common b/runtime/opal/src/runtime_common new file mode 120000 index 0000000000..248927d215 --- /dev/null +++ b/runtime/opal/src/runtime_common @@ -0,0 +1 @@ +../../common/ \ No newline at end of file diff --git a/runtime/quartz/Cargo.toml b/runtime/quartz/Cargo.toml index e5adeec934..8a5ad8012d 100644 --- a/runtime/quartz/Cargo.toml +++ b/runtime/quartz/Cargo.toml @@ -18,10 +18,9 @@ targets = ['x86_64-unknown-linux-gnu'] [features] become-sapphire = [] default = ['quartz-runtime', 'std'] -state-version-0 = [] limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing'] pov-estimate = [] -quartz-runtime = ['app-promotion', 'collator-selection', 'foreign-assets', 'preimage', 'refungible'] +quartz-runtime = ['app-promotion', 'collator-selection', 'foreign-assets', 'governance', 'preimage', 'refungible'] runtime-benchmarks = [ "pallet-preimage/runtime-benchmarks", 'cumulus-pallet-parachain-system/runtime-benchmarks', @@ -32,8 +31,10 @@ runtime-benchmarks = [ 'pallet-app-promotion/runtime-benchmarks', 'pallet-balances/runtime-benchmarks', 'pallet-collator-selection/runtime-benchmarks', + 'pallet-collective/runtime-benchmarks', 'pallet-common/runtime-benchmarks', 'pallet-configuration/runtime-benchmarks', + 'pallet-democracy/runtime-benchmarks', 'pallet-ethereum/runtime-benchmarks', 'pallet-evm-coder-substrate/runtime-benchmarks', 'pallet-evm-migration/runtime-benchmarks', @@ -42,10 +43,19 @@ runtime-benchmarks = [ 'pallet-identity/runtime-benchmarks', 'pallet-inflation/runtime-benchmarks', 'pallet-maintenance/runtime-benchmarks', + 'pallet-membership/runtime-benchmarks', 'pallet-nonfungible/runtime-benchmarks', + 'pallet-democracy/runtime-benchmarks', + 'pallet-collective/runtime-benchmarks', + 'pallet-ranked-collective/runtime-benchmarks', + 'pallet-membership/runtime-benchmarks', + 'pallet-referenda/runtime-benchmarks', + 'pallet-scheduler/runtime-benchmarks', 'pallet-refungible/runtime-benchmarks', + 'pallet-scheduler/runtime-benchmarks', 'pallet-structure/runtime-benchmarks', 'pallet-timestamp/runtime-benchmarks', + 'pallet-utility/runtime-benchmarks', 'pallet-unique/runtime-benchmarks', 'pallet-xcm/runtime-benchmarks', 'sp-runtime/runtime-benchmarks', @@ -65,8 +75,12 @@ std = [ 'frame-system/std', 'frame-try-runtime/std', 'pallet-aura/std', - 'pallet-balances/std', 'pallet-balances-adapter/std', + 'pallet-balances/std', + 'pallet-collective/std', + 'pallet-democracy/std', + 'pallet-membership/std', + 'pallet-scheduler/std', # 'pallet-contracts/std', # 'pallet-contracts-primitives/std', # 'pallet-contracts-rpc-runtime-api/std', @@ -96,10 +110,18 @@ std = [ 'pallet-fungible/std', 'pallet-inflation/std', 'pallet-nonfungible/std', + 'pallet-democracy/std', + 'pallet-collective/std', + 'pallet-ranked-collective/std', + 'pallet-membership/std', + 'pallet-referenda/std', + 'pallet-gov-origins/std', + 'pallet-scheduler/std', 'pallet-refungible/std', 'pallet-structure/std', 'pallet-sudo/std', 'pallet-timestamp/std', + 'pallet-utility/std', 'pallet-transaction-payment-rpc-runtime-api/std', 'pallet-transaction-payment/std', 'pallet-treasury/std', @@ -156,8 +178,8 @@ try-runtime = [ 'orml-xtokens/try-runtime', 'pallet-app-promotion/try-runtime', 'pallet-aura/try-runtime', - 'pallet-balances/try-runtime', 'pallet-balances-adapter/try-runtime', + 'pallet-balances/try-runtime', 'pallet-charge-transaction/try-runtime', 'pallet-common/try-runtime', 'pallet-configuration/try-runtime', @@ -172,10 +194,18 @@ try-runtime = [ 'pallet-inflation/try-runtime', 'pallet-maintenance/try-runtime', 'pallet-nonfungible/try-runtime', + 'pallet-democracy/try-runtime', + 'pallet-collective/try-runtime', + 'pallet-ranked-collective/try-runtime', + 'pallet-membership/try-runtime', + 'pallet-referenda/try-runtime', + 'pallet-gov-origins/try-runtime', + 'pallet-scheduler/try-runtime', 'pallet-refungible/try-runtime', 'pallet-structure/try-runtime', 'pallet-sudo/try-runtime', 'pallet-timestamp/try-runtime', + 'pallet-utility/try-runtime', 'pallet-transaction-payment/try-runtime', 'pallet-treasury/try-runtime', 'pallet-unique/try-runtime', @@ -186,9 +216,12 @@ try-runtime = [ app-promotion = [] collator-selection = [] foreign-assets = [] +governance = [] preimage = [] refungible = [] -scheduler = [] +unique-scheduler = [] +gov-test-timings = [] +session-test-timings = [] ################################################################################ # local dependencies @@ -222,6 +255,7 @@ pallet-session = { workspace = true } pallet-state-trie-migration = { workspace = true } pallet-sudo = { workspace = true } pallet-timestamp = { workspace = true } +pallet-utility = { workspace = true } pallet-transaction-payment = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } pallet-treasury = { workspace = true } @@ -259,6 +293,13 @@ pallet-fungible = { workspace = true } pallet-identity = { workspace = true } pallet-inflation = { workspace = true } pallet-nonfungible = { workspace = true } +pallet-democracy = { workspace = true } +pallet-collective = { workspace = true } +pallet-ranked-collective = { workspace = true } +pallet-membership = { workspace = true } +pallet-referenda = { workspace = true } +pallet-gov-origins = { workspace = true } +pallet-scheduler = { workspace = true } pallet-refungible = { workspace = true } pallet-structure = { workspace = true } pallet-unique = { workspace = true } @@ -303,8 +344,8 @@ pallet-test-utils = { workspace = true } ################################################################################ # Other Dependencies -impl-trait-for-tuples = { workspace = true } hex-literal = { workspace = true } +impl-trait-for-tuples = { workspace = true } [build-dependencies] substrate-wasm-builder = { workspace = true } diff --git a/runtime/quartz/src/governance_timings.rs b/runtime/quartz/src/governance_timings.rs new file mode 100644 index 0000000000..affc0cb2f9 --- /dev/null +++ b/runtime/quartz/src/governance_timings.rs @@ -0,0 +1,54 @@ +use frame_support::parameter_types; +pub use up_common::{ + constants::{DAYS, HOURS, MINUTES}, + types::BlockNumber, +}; + +pub mod council { + use super::*; + + parameter_types! { + pub CouncilMotionDuration: BlockNumber = 7 * DAYS; + } +} + +pub mod democracy { + use super::*; + + parameter_types! { + pub LaunchPeriod: BlockNumber = 7 * DAYS; + pub VotingPeriod: BlockNumber = 7 * DAYS; + pub FastTrackVotingPeriod: BlockNumber = 1 * DAYS; + pub EnactmentPeriod: BlockNumber = 8 * DAYS; + pub CooloffPeriod: BlockNumber = 7 * DAYS; + } +} + +pub mod fellowship { + use super::*; + + parameter_types! { + pub UndecidingTimeout: BlockNumber = 7 * DAYS; + } + + pub mod track { + use super::*; + + pub mod democracy_proposals { + use super::*; + + pub const PREPARE_PERIOD: BlockNumber = 30 * MINUTES; + pub const DECISION_PERIOD: BlockNumber = 7 * DAYS; + pub const CONFIRM_PERIOD: BlockNumber = 2 * DAYS; + pub const MIN_ENACTMENT_PERIOD: BlockNumber = 1 * MINUTES; + } + } +} + +pub mod technical_committee { + use super::*; + + parameter_types! { + pub TechnicalMotionDuration: BlockNumber = 3 * DAYS; + } +} diff --git a/runtime/quartz/src/lib.rs b/runtime/quartz/src/lib.rs index 75e30b479e..37fc4d72be 100644 --- a/runtime/quartz/src/lib.rs +++ b/runtime/quartz/src/lib.rs @@ -36,32 +36,41 @@ use up_common::types::*; use ::xcm::latest::NetworkId; -#[path = "../../common/mod.rs"] mod runtime_common; +pub mod governance_timings; pub mod xcm_barrier; pub use runtime_common::*; -#[cfg(feature = "become-sapphire")] -pub const RUNTIME_NAME: &str = "sapphire"; -#[cfg(not(feature = "become-sapphire"))] -pub const RUNTIME_NAME: &str = "quartz"; pub const TOKEN_SYMBOL: &str = "QTZ"; pub const DECIMALS: u8 = 18; /// This runtime version. +#[cfg(not(feature = "become-sapphire"))] +#[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!(RUNTIME_NAME), - impl_name: create_runtime_str!(RUNTIME_NAME), + spec_name: create_runtime_str!("quartz"), + impl_name: create_runtime_str!("quartz"), + + authoring_version: 1, + spec_version: 943061, + impl_version: 0, + apis: RUNTIME_API_VERSIONS, + transaction_version: 3, + state_version: 1, +}; +#[cfg(feature = "become-sapphire")] +#[sp_version::runtime_version] +pub const VERSION: RuntimeVersion = RuntimeVersion { + spec_name: create_runtime_str!("sapphire"), + impl_name: create_runtime_str!("sapphire"), + authoring_version: 1, - spec_version: 942057, + spec_version: 943061, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 3, - #[cfg(feature = "state-version-0")] - state_version: 0, - #[cfg(not(feature = "state-version-0"))] state_version: 1, }; diff --git a/runtime/quartz/src/runtime_common b/runtime/quartz/src/runtime_common new file mode 120000 index 0000000000..248927d215 --- /dev/null +++ b/runtime/quartz/src/runtime_common @@ -0,0 +1 @@ +../../common/ \ No newline at end of file diff --git a/runtime/tests/Cargo.toml b/runtime/tests/Cargo.toml index 75e89ba80d..98ed01c751 100644 --- a/runtime/tests/Cargo.toml +++ b/runtime/tests/Cargo.toml @@ -43,3 +43,6 @@ scale-info = { workspace = true } evm-coder = { workspace = true } up-sponsorship = { workspace = true } xcm = { workspace = true } + +[dev-dependencies] +pallet-common = { workspace = true, features = ["tests"] } diff --git a/runtime/tests/src/lib.rs b/runtime/tests/src/lib.rs index 962caeac7d..0ec974d0f1 100644 --- a/runtime/tests/src/lib.rs +++ b/runtime/tests/src/lib.rs @@ -209,7 +209,7 @@ impl Default for TestCrossAccountId { parameter_types! { pub BlockGasLimit: U256 = 0u32.into(); - pub WeightPerGas: Weight = Weight::from_ref_time(20); + pub WeightPerGas: Weight = Weight::from_parts(20, 0); pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes; } @@ -244,6 +244,7 @@ impl pallet_evm::Config for Test { type BlockHashMapping = SubstrateBlockHashMapping; type TransactionValidityHack = (); type Timestamp = Timestamp; + type GasLimitPovSizeRatio = ConstU64<0>; } impl pallet_evm_coder_substrate::Config for Test {} diff --git a/runtime/tests/src/tests.rs b/runtime/tests/src/tests.rs index 630803c876..db1d85fd83 100644 --- a/runtime/tests/src/tests.rs +++ b/runtime/tests/src/tests.rs @@ -99,7 +99,7 @@ fn create_test_collection_for_owner( .try_into() .unwrap(); - let data: CreateCollectionData = CreateCollectionData { + let data = CreateCollectionData { name: col_name1.try_into().unwrap(), description: col_desc1.try_into().unwrap(), token_prefix: token_prefix1.try_into().unwrap(), @@ -204,14 +204,13 @@ fn check_not_sufficient_founds() { let description: Vec = "TestDescription1\0".encode_utf16().collect::>(); let token_prefix: Vec = b"token_prefix1\0".to_vec(); - let data: CreateCollectionData<::AccountId> = - CreateCollectionData { - name: name.try_into().unwrap(), - description: description.try_into().unwrap(), - token_prefix: token_prefix.try_into().unwrap(), - mode: CollectionMode::NFT, - ..Default::default() - }; + let data = CreateCollectionData { + name: name.try_into().unwrap(), + description: description.try_into().unwrap(), + token_prefix: token_prefix.try_into().unwrap(), + mode: CollectionMode::NFT, + ..Default::default() + }; let result = Unique::create_collection_ex(RuntimeOrigin::signed(acc), data); assert_err!(result, >::NotSufficientFounds); @@ -225,7 +224,7 @@ fn create_fungible_collection_fails_with_large_decimal_numbers() { let col_desc1: Vec = "TestDescription1\0".encode_utf16().collect::>(); let token_prefix1: Vec = b"token_prefix1\0".to_vec(); - let data: CreateCollectionData = CreateCollectionData { + let data = CreateCollectionData { name: col_name1.try_into().unwrap(), description: col_desc1.try_into().unwrap(), token_prefix: token_prefix1.try_into().unwrap(), @@ -1737,6 +1736,11 @@ fn allow_list_test_1() { let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1)); let origin1 = RuntimeOrigin::signed(1); + assert_ok!(Unique::add_collection_admin( + origin1.clone(), + collection_id, + account(1) + )); let data = default_nft_data(); create_test_item(collection_id, &data.into()); @@ -2359,7 +2363,7 @@ fn total_number_collections_bound_neg() { let col_desc1: Vec = "TestDescription1\0".encode_utf16().collect::>(); let token_prefix1: Vec = b"token_prefix1\0".to_vec(); - let data: CreateCollectionData = CreateCollectionData { + let data = CreateCollectionData { name: col_name1.try_into().unwrap(), description: col_desc1.try_into().unwrap(), token_prefix: token_prefix1.try_into().unwrap(), @@ -2610,3 +2614,65 @@ fn collection_sponsoring() { )); }); } + +mod check_token_permissions { + use super::*; + use pallet_common::LazyValue; + + fn test bool>( + i: usize, + test_case: &pallet_common::tests::TestCase, + check_token_existence: &mut LazyValue, + ) { + let collection_admin = test_case.collection_admin; + let mut is_collection_admin = LazyValue::new(|| test_case.is_collection_admin); + let token_owner = test_case.token_owner; + let mut is_token_owner = LazyValue::new(|| Ok(test_case.is_token_owner)); + let is_no_permission = test_case.no_permission; + + let result = pallet_common::tests::check_token_permissions::( + collection_admin, + token_owner, + &mut is_collection_admin, + &mut is_token_owner, + check_token_existence, + ); + + if is_no_permission { + assert!( + result.is_err(), + "{i}: {test_case:?}, token_exist: {}", + check_token_existence.value() + ); + assert_err!(result, pallet_common::Error::::NoPermission,); + } else if check_token_existence.has_value() && !check_token_existence.value() { + assert!( + result.is_err(), + "{i}: {test_case:?}, token_exist: {}", + check_token_existence.value() + ); + assert_err!(result, pallet_common::Error::::TokenNotFound,); + } + } + + #[test] + fn no_permission_only() { + new_test_ext().execute_with(|| { + let mut check_token_existence = LazyValue::new(|| true); + for (i, row) in pallet_common::tests::TABLE.iter().enumerate() { + test(i, row, &mut check_token_existence); + } + }); + } + + #[test] + fn no_permission_and_token_not_found() { + new_test_ext().execute_with(|| { + for (i, row) in pallet_common::tests::TABLE.iter().enumerate() { + // This is inside the loop to keep track of whether the lambda was called + let mut check_token_existence = LazyValue::new(|| false); + test(i, row, &mut check_token_existence); + } + }); + } +} diff --git a/runtime/unique/Cargo.toml b/runtime/unique/Cargo.toml index 9dc51e7a0b..f39d9d3fde 100644 --- a/runtime/unique/Cargo.toml +++ b/runtime/unique/Cargo.toml @@ -17,7 +17,6 @@ targets = ['x86_64-unknown-linux-gnu'] [features] default = ['std', 'unique-runtime'] -state-version-0 = [] limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing'] pov-estimate = [] runtime-benchmarks = [ @@ -29,8 +28,10 @@ runtime-benchmarks = [ 'pallet-app-promotion/runtime-benchmarks', 'pallet-balances/runtime-benchmarks', 'pallet-collator-selection/runtime-benchmarks', + 'pallet-collective/runtime-benchmarks', 'pallet-common/runtime-benchmarks', 'pallet-configuration/runtime-benchmarks', + 'pallet-democracy/runtime-benchmarks', 'pallet-ethereum/runtime-benchmarks', 'pallet-evm-coder-substrate/runtime-benchmarks', 'pallet-evm-migration/runtime-benchmarks', @@ -39,10 +40,19 @@ runtime-benchmarks = [ 'pallet-identity/runtime-benchmarks', 'pallet-inflation/runtime-benchmarks', 'pallet-maintenance/runtime-benchmarks', + 'pallet-membership/runtime-benchmarks', 'pallet-nonfungible/runtime-benchmarks', + 'pallet-democracy/runtime-benchmarks', + 'pallet-collective/runtime-benchmarks', + 'pallet-ranked-collective/runtime-benchmarks', + 'pallet-membership/runtime-benchmarks', + 'pallet-referenda/runtime-benchmarks', + 'pallet-scheduler/runtime-benchmarks', 'pallet-refungible/runtime-benchmarks', + 'pallet-scheduler/runtime-benchmarks', 'pallet-structure/runtime-benchmarks', 'pallet-timestamp/runtime-benchmarks', + 'pallet-utility/runtime-benchmarks', 'pallet-unique/runtime-benchmarks', 'pallet-xcm/runtime-benchmarks', 'sp-runtime/runtime-benchmarks', @@ -64,6 +74,10 @@ std = [ 'frame-try-runtime/std', 'pallet-aura/std', 'pallet-balances/std', + 'pallet-collective/std', + 'pallet-democracy/std', + 'pallet-membership/std', + 'pallet-scheduler/std', # 'pallet-contracts/std', # 'pallet-contracts-primitives/std', # 'pallet-contracts-rpc-runtime-api/std', @@ -94,10 +108,18 @@ std = [ 'pallet-fungible/std', 'pallet-inflation/std', 'pallet-nonfungible/std', + 'pallet-democracy/std', + 'pallet-collective/std', + 'pallet-ranked-collective/std', + 'pallet-membership/std', + 'pallet-referenda/std', + 'pallet-gov-origins/std', + 'pallet-scheduler/std', 'pallet-refungible/std', 'pallet-structure/std', 'pallet-sudo/std', 'pallet-timestamp/std', + 'pallet-utility/std', 'pallet-transaction-payment-rpc-runtime-api/std', 'pallet-transaction-payment/std', 'pallet-treasury/std', @@ -154,11 +176,13 @@ try-runtime = [ 'orml-xtokens/try-runtime', 'pallet-app-promotion/try-runtime', 'pallet-aura/try-runtime', - 'pallet-balances/try-runtime', 'pallet-balances-adapter/try-runtime', + 'pallet-balances/try-runtime', 'pallet-charge-transaction/try-runtime', + 'pallet-collective/try-runtime', 'pallet-common/try-runtime', 'pallet-configuration/try-runtime', + 'pallet-democracy/try-runtime', 'pallet-ethereum/try-runtime', 'pallet-evm-coder-substrate/try-runtime', 'pallet-evm-contract-helpers/try-runtime', @@ -169,11 +193,21 @@ try-runtime = [ 'pallet-fungible/try-runtime', 'pallet-inflation/try-runtime', 'pallet-maintenance/try-runtime', + 'pallet-membership/try-runtime', 'pallet-nonfungible/try-runtime', + 'pallet-democracy/try-runtime', + 'pallet-collective/try-runtime', + 'pallet-ranked-collective/try-runtime', + 'pallet-membership/try-runtime', + 'pallet-referenda/try-runtime', + 'pallet-gov-origins/try-runtime', + 'pallet-scheduler/try-runtime', 'pallet-refungible/try-runtime', + 'pallet-scheduler/try-runtime', 'pallet-structure/try-runtime', 'pallet-sudo/try-runtime', 'pallet-timestamp/try-runtime', + 'pallet-utility/try-runtime', 'pallet-transaction-payment/try-runtime', 'pallet-treasury/try-runtime', 'pallet-unique/try-runtime', @@ -185,9 +219,12 @@ unique-runtime = ['app-promotion', 'foreign-assets', 'refungible'] app-promotion = [] collator-selection = [] foreign-assets = [] +governance = [] preimage = [] refungible = [] -scheduler = [] +unique-scheduler = [] +gov-test-timings = [] +session-test-timings = [] ################################################################################ # local dependencies @@ -221,6 +258,7 @@ pallet-session = { workspace = true } pallet-state-trie-migration = { workspace = true } pallet-sudo = { workspace = true } pallet-timestamp = { workspace = true } +pallet-utility = { workspace = true } pallet-transaction-payment = { workspace = true } pallet-transaction-payment-rpc-runtime-api = { workspace = true } pallet-treasury = { workspace = true } @@ -257,6 +295,13 @@ pallet-fungible = { workspace = true } pallet-identity = { workspace = true } pallet-inflation = { workspace = true } pallet-nonfungible = { workspace = true } +pallet-democracy = { workspace = true } +pallet-collective = { workspace = true } +pallet-ranked-collective = { workspace = true } +pallet-membership = { workspace = true } +pallet-referenda = { workspace = true } +pallet-gov-origins = { workspace = true } +pallet-scheduler = { workspace = true } pallet-refungible = { workspace = true } pallet-structure = { workspace = true } pallet-unique = { workspace = true } @@ -301,8 +346,8 @@ pallet-test-utils = { workspace = true } ################################################################################ # Other Dependencies -impl-trait-for-tuples = { workspace = true } hex-literal = { workspace = true } +impl-trait-for-tuples = { workspace = true } [build-dependencies] substrate-wasm-builder = { workspace = true } diff --git a/runtime/unique/src/governance_timings.rs b/runtime/unique/src/governance_timings.rs new file mode 100644 index 0000000000..affc0cb2f9 --- /dev/null +++ b/runtime/unique/src/governance_timings.rs @@ -0,0 +1,54 @@ +use frame_support::parameter_types; +pub use up_common::{ + constants::{DAYS, HOURS, MINUTES}, + types::BlockNumber, +}; + +pub mod council { + use super::*; + + parameter_types! { + pub CouncilMotionDuration: BlockNumber = 7 * DAYS; + } +} + +pub mod democracy { + use super::*; + + parameter_types! { + pub LaunchPeriod: BlockNumber = 7 * DAYS; + pub VotingPeriod: BlockNumber = 7 * DAYS; + pub FastTrackVotingPeriod: BlockNumber = 1 * DAYS; + pub EnactmentPeriod: BlockNumber = 8 * DAYS; + pub CooloffPeriod: BlockNumber = 7 * DAYS; + } +} + +pub mod fellowship { + use super::*; + + parameter_types! { + pub UndecidingTimeout: BlockNumber = 7 * DAYS; + } + + pub mod track { + use super::*; + + pub mod democracy_proposals { + use super::*; + + pub const PREPARE_PERIOD: BlockNumber = 30 * MINUTES; + pub const DECISION_PERIOD: BlockNumber = 7 * DAYS; + pub const CONFIRM_PERIOD: BlockNumber = 2 * DAYS; + pub const MIN_ENACTMENT_PERIOD: BlockNumber = 1 * MINUTES; + } + } +} + +pub mod technical_committee { + use super::*; + + parameter_types! { + pub TechnicalMotionDuration: BlockNumber = 3 * DAYS; + } +} diff --git a/runtime/unique/src/lib.rs b/runtime/unique/src/lib.rs index 255516b22d..6ca1f190ce 100644 --- a/runtime/unique/src/lib.rs +++ b/runtime/unique/src/lib.rs @@ -36,29 +36,26 @@ use up_common::types::*; use ::xcm::latest::NetworkId; -#[path = "../../common/mod.rs"] mod runtime_common; +pub mod governance_timings; pub mod xcm_barrier; pub use runtime_common::*; -pub const RUNTIME_NAME: &str = "unique"; pub const TOKEN_SYMBOL: &str = "UNQ"; pub const DECIMALS: u8 = 18; /// This runtime version. +#[sp_version::runtime_version] pub const VERSION: RuntimeVersion = RuntimeVersion { - spec_name: create_runtime_str!(RUNTIME_NAME), - impl_name: create_runtime_str!(RUNTIME_NAME), + spec_name: create_runtime_str!("unique"), + impl_name: create_runtime_str!("unique"), authoring_version: 1, - spec_version: 942057, + spec_version: 943061, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 3, - #[cfg(feature = "state-version-0")] - state_version: 0, - #[cfg(not(feature = "state-version-0"))] state_version: 1, }; diff --git a/runtime/unique/src/runtime_common b/runtime/unique/src/runtime_common new file mode 120000 index 0000000000..248927d215 --- /dev/null +++ b/runtime/unique/src/runtime_common @@ -0,0 +1 @@ +../../common/ \ No newline at end of file diff --git a/tests/.gitignore b/tests/.gitignore index 684132fac3..1ac2bd1ddc 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -1,4 +1,6 @@ /node_modules/ properties.csv erc721.csv -erc20.csv \ No newline at end of file +erc20.csv +.yarn/cache +.yarn/install-state.gz diff --git a/tests/.yarn/releases/yarn-3.6.1.cjs b/tests/.yarn/releases/yarn-3.6.1.cjs new file mode 100755 index 0000000000..5227385a9e --- /dev/null +++ b/tests/.yarn/releases/yarn-3.6.1.cjs @@ -0,0 +1,874 @@ +#!/usr/bin/env node +/* eslint-disable */ +//prettier-ignore +(()=>{var xge=Object.create;var lS=Object.defineProperty;var Pge=Object.getOwnPropertyDescriptor;var Dge=Object.getOwnPropertyNames;var kge=Object.getPrototypeOf,Rge=Object.prototype.hasOwnProperty;var J=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var Fge=(r,e)=>()=>(r&&(e=r(r=0)),e);var w=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),ut=(r,e)=>{for(var t in e)lS(r,t,{get:e[t],enumerable:!0})},Nge=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Dge(e))!Rge.call(r,n)&&n!==t&&lS(r,n,{get:()=>e[n],enumerable:!(i=Pge(e,n))||i.enumerable});return r};var Pe=(r,e,t)=>(t=r!=null?xge(kge(r)):{},Nge(e||!r||!r.__esModule?lS(t,"default",{value:r,enumerable:!0}):t,r));var vK=w((JXe,SK)=>{SK.exports=QK;QK.sync=tfe;var BK=J("fs");function efe(r,e){var t=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var i=0;i{kK.exports=PK;PK.sync=rfe;var xK=J("fs");function PK(r,e,t){xK.stat(r,function(i,n){t(i,i?!1:DK(n,e))})}function rfe(r,e){return DK(xK.statSync(r),e)}function DK(r,e){return r.isFile()&&ife(r,e)}function ife(r,e){var t=r.mode,i=r.uid,n=r.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),c=parseInt("001",8),u=a|l,g=t&c||t&l&&n===o||t&a&&i===s||t&u&&s===0;return g}});var NK=w((VXe,FK)=>{var zXe=J("fs"),lI;process.platform==="win32"||global.TESTING_WINDOWS?lI=vK():lI=RK();FK.exports=SS;SS.sync=nfe;function SS(r,e,t){if(typeof e=="function"&&(t=e,e={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){SS(r,e||{},function(s,o){s?n(s):i(o)})})}lI(r,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),t(i,n)})}function nfe(r,e){try{return lI.sync(r,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var HK=w((XXe,UK)=>{var Dg=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",TK=J("path"),sfe=Dg?";":":",LK=NK(),MK=r=>Object.assign(new Error(`not found: ${r}`),{code:"ENOENT"}),OK=(r,e)=>{let t=e.colon||sfe,i=r.match(/\//)||Dg&&r.match(/\\/)?[""]:[...Dg?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],n=Dg?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=Dg?n.split(t):[""];return Dg&&r.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},KK=(r,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=OK(r,e),o=[],a=c=>new Promise((u,g)=>{if(c===i.length)return e.all&&o.length?u(o):g(MK(r));let f=i[c],h=/^".*"$/.test(f)?f.slice(1,-1):f,p=TK.join(h,r),C=!h&&/^\.[\\\/]/.test(r)?r.slice(0,2)+p:p;u(l(C,c,0))}),l=(c,u,g)=>new Promise((f,h)=>{if(g===n.length)return f(a(u+1));let p=n[g];LK(c+p,{pathExt:s},(C,y)=>{if(!C&&y)if(e.all)o.push(c+p);else return f(c+p);return f(l(c,u,g+1))})});return t?a(0).then(c=>t(null,c),t):a(0)},ofe=(r,e)=>{e=e||{};let{pathEnv:t,pathExt:i,pathExtExe:n}=OK(r,e),s=[];for(let o=0;o{"use strict";var GK=(r={})=>{let e=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};vS.exports=GK;vS.exports.default=GK});var WK=w((_Xe,JK)=>{"use strict";var jK=J("path"),afe=HK(),Afe=YK();function qK(r,e){let t=r.options.env||process.env,i=process.cwd(),n=r.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(r.options.cwd)}catch{}let o;try{o=afe.sync(r.command,{path:t[Afe({env:t})],pathExt:e?jK.delimiter:void 0})}catch{}finally{s&&process.chdir(i)}return o&&(o=jK.resolve(n?r.options.cwd:"",o)),o}function lfe(r){return qK(r)||qK(r,!0)}JK.exports=lfe});var zK=w(($Xe,PS)=>{"use strict";var xS=/([()\][%!^"`<>&|;, *?])/g;function cfe(r){return r=r.replace(xS,"^$1"),r}function ufe(r,e){return r=`${r}`,r=r.replace(/(\\*)"/g,'$1$1\\"'),r=r.replace(/(\\*)$/,"$1$1"),r=`"${r}"`,r=r.replace(xS,"^$1"),e&&(r=r.replace(xS,"^$1")),r}PS.exports.command=cfe;PS.exports.argument=ufe});var XK=w((eZe,VK)=>{"use strict";VK.exports=/^#!(.*)/});var _K=w((tZe,ZK)=>{"use strict";var gfe=XK();ZK.exports=(r="")=>{let e=r.match(gfe);if(!e)return null;let[t,i]=e[0].replace(/#! ?/,"").split(" "),n=t.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var eU=w((rZe,$K)=>{"use strict";var DS=J("fs"),ffe=_K();function hfe(r){let t=Buffer.alloc(150),i;try{i=DS.openSync(r,"r"),DS.readSync(i,t,0,150,0),DS.closeSync(i)}catch{}return ffe(t.toString())}$K.exports=hfe});var nU=w((iZe,iU)=>{"use strict";var pfe=J("path"),tU=WK(),rU=zK(),dfe=eU(),Cfe=process.platform==="win32",mfe=/\.(?:com|exe)$/i,Efe=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function Ife(r){r.file=tU(r);let e=r.file&&dfe(r.file);return e?(r.args.unshift(r.file),r.command=e,tU(r)):r.file}function yfe(r){if(!Cfe)return r;let e=Ife(r),t=!mfe.test(e);if(r.options.forceShell||t){let i=Efe.test(e);r.command=pfe.normalize(r.command),r.command=rU.command(r.command),r.args=r.args.map(s=>rU.argument(s,i));let n=[r.command].concat(r.args).join(" ");r.args=["/d","/s","/c",`"${n}"`],r.command=process.env.comspec||"cmd.exe",r.options.windowsVerbatimArguments=!0}return r}function wfe(r,e,t){e&&!Array.isArray(e)&&(t=e,e=null),e=e?e.slice(0):[],t=Object.assign({},t);let i={command:r,args:e,options:t,file:void 0,original:{command:r,args:e}};return t.shell?i:yfe(i)}iU.exports=wfe});var aU=w((nZe,oU)=>{"use strict";var kS=process.platform==="win32";function RS(r,e){return Object.assign(new Error(`${e} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${r.command}`,path:r.command,spawnargs:r.args})}function Bfe(r,e){if(!kS)return;let t=r.emit;r.emit=function(i,n){if(i==="exit"){let s=sU(n,e,"spawn");if(s)return t.call(r,"error",s)}return t.apply(r,arguments)}}function sU(r,e){return kS&&r===1&&!e.file?RS(e.original,"spawn"):null}function bfe(r,e){return kS&&r===1&&!e.file?RS(e.original,"spawnSync"):null}oU.exports={hookChildProcess:Bfe,verifyENOENT:sU,verifyENOENTSync:bfe,notFoundError:RS}});var TS=w((sZe,kg)=>{"use strict";var AU=J("child_process"),FS=nU(),NS=aU();function lU(r,e,t){let i=FS(r,e,t),n=AU.spawn(i.command,i.args,i.options);return NS.hookChildProcess(n,i),n}function Qfe(r,e,t){let i=FS(r,e,t),n=AU.spawnSync(i.command,i.args,i.options);return n.error=n.error||NS.verifyENOENTSync(n.status,i),n}kg.exports=lU;kg.exports.spawn=lU;kg.exports.sync=Qfe;kg.exports._parse=FS;kg.exports._enoent=NS});var uU=w((oZe,cU)=>{"use strict";function Sfe(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function Zl(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Zl)}Sfe(Zl,Error);Zl.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g>",ie=me(">>",!1),de=">&",_e=me(">&",!1),Pt=">",It=me(">",!1),Mr="<<<",ii=me("<<<",!1),gi="<&",hr=me("<&",!1),fi="<",ni=me("<",!1),Ks=function(m){return{type:"argument",segments:[].concat(...m)}},pr=function(m){return m},Ii="$'",rs=me("$'",!1),fa="'",CA=me("'",!1),cg=function(m){return[{type:"text",text:m}]},is='""',mA=me('""',!1),ha=function(){return{type:"text",text:""}},wp='"',EA=me('"',!1),IA=function(m){return m},wr=function(m){return{type:"arithmetic",arithmetic:m,quoted:!0}},Tl=function(m){return{type:"shell",shell:m,quoted:!0}},ug=function(m){return{type:"variable",...m,quoted:!0}},Io=function(m){return{type:"text",text:m}},gg=function(m){return{type:"arithmetic",arithmetic:m,quoted:!1}},Bp=function(m){return{type:"shell",shell:m,quoted:!1}},bp=function(m){return{type:"variable",...m,quoted:!1}},vr=function(m){return{type:"glob",pattern:m}},se=/^[^']/,yo=Je(["'"],!0,!1),Fn=function(m){return m.join("")},fg=/^[^$"]/,bt=Je(["$",'"'],!0,!1),Ll=`\\ +`,Nn=me(`\\ +`,!1),ns=function(){return""},ss="\\",gt=me("\\",!1),wo=/^[\\$"`]/,At=Je(["\\","$",'"',"`"],!1,!1),ln=function(m){return m},S="\\a",Lt=me("\\a",!1),hg=function(){return"a"},Ml="\\b",Qp=me("\\b",!1),Sp=function(){return"\b"},vp=/^[Ee]/,xp=Je(["E","e"],!1,!1),Pp=function(){return"\x1B"},G="\\f",yt=me("\\f",!1),yA=function(){return"\f"},zi="\\n",Ol=me("\\n",!1),Xe=function(){return` +`},pa="\\r",pg=me("\\r",!1),ME=function(){return"\r"},Dp="\\t",OE=me("\\t",!1),ar=function(){return" "},Tn="\\v",Kl=me("\\v",!1),kp=function(){return"\v"},Us=/^[\\'"?]/,da=Je(["\\","'",'"',"?"],!1,!1),cn=function(m){return String.fromCharCode(parseInt(m,16))},Le="\\x",dg=me("\\x",!1),Ul="\\u",Hs=me("\\u",!1),Hl="\\U",wA=me("\\U",!1),Cg=function(m){return String.fromCodePoint(parseInt(m,16))},mg=/^[0-7]/,Ca=Je([["0","7"]],!1,!1),ma=/^[0-9a-fA-f]/,rt=Je([["0","9"],["a","f"],["A","f"]],!1,!1),Bo=nt(),BA="-",Gl=me("-",!1),Gs="+",Yl=me("+",!1),KE=".",Rp=me(".",!1),Eg=function(m,Q,N){return{type:"number",value:(m==="-"?-1:1)*parseFloat(Q.join("")+"."+N.join(""))}},Fp=function(m,Q){return{type:"number",value:(m==="-"?-1:1)*parseInt(Q.join(""))}},UE=function(m){return{type:"variable",...m}},jl=function(m){return{type:"variable",name:m}},HE=function(m){return m},Ig="*",bA=me("*",!1),Rr="/",GE=me("/",!1),Ys=function(m,Q,N){return{type:Q==="*"?"multiplication":"division",right:N}},js=function(m,Q){return Q.reduce((N,U)=>({left:N,...U}),m)},yg=function(m,Q,N){return{type:Q==="+"?"addition":"subtraction",right:N}},QA="$((",R=me("$((",!1),q="))",Ce=me("))",!1),Ke=function(m){return m},Re="$(",ze=me("$(",!1),dt=function(m){return m},Ft="${",Ln=me("${",!1),JQ=":-",P1=me(":-",!1),D1=function(m,Q){return{name:m,defaultValue:Q}},WQ=":-}",k1=me(":-}",!1),R1=function(m){return{name:m,defaultValue:[]}},zQ=":+",F1=me(":+",!1),N1=function(m,Q){return{name:m,alternativeValue:Q}},VQ=":+}",T1=me(":+}",!1),L1=function(m){return{name:m,alternativeValue:[]}},XQ=function(m){return{name:m}},M1="$",O1=me("$",!1),K1=function(m){return e.isGlobPattern(m)},U1=function(m){return m},ZQ=/^[a-zA-Z0-9_]/,_Q=Je([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),$Q=function(){return L()},eS=/^[$@*?#a-zA-Z0-9_\-]/,tS=Je(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),H1=/^[(){}<>$|&; \t"']/,wg=Je(["(",")","{","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),rS=/^[<>&; \t"']/,iS=Je(["<",">","&",";"," "," ",'"',"'"],!1,!1),YE=/^[ \t]/,jE=Je([" "," "],!1,!1),b=0,Oe=0,SA=[{line:1,column:1}],d=0,E=[],I=0,k;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function L(){return r.substring(Oe,b)}function Z(){return Et(Oe,b)}function te(m,Q){throw Q=Q!==void 0?Q:Et(Oe,b),Ri([lt(m)],r.substring(Oe,b),Q)}function we(m,Q){throw Q=Q!==void 0?Q:Et(Oe,b),Mn(m,Q)}function me(m,Q){return{type:"literal",text:m,ignoreCase:Q}}function Je(m,Q,N){return{type:"class",parts:m,inverted:Q,ignoreCase:N}}function nt(){return{type:"any"}}function wt(){return{type:"end"}}function lt(m){return{type:"other",description:m}}function it(m){var Q=SA[m],N;if(Q)return Q;for(N=m-1;!SA[N];)N--;for(Q=SA[N],Q={line:Q.line,column:Q.column};Nd&&(d=b,E=[]),E.push(m))}function Mn(m,Q){return new Zl(m,null,null,Q)}function Ri(m,Q,N){return new Zl(Zl.buildMessage(m,Q),m,Q,N)}function vA(){var m,Q;return m=b,Q=Or(),Q===t&&(Q=null),Q!==t&&(Oe=m,Q=s(Q)),m=Q,m}function Or(){var m,Q,N,U,ce;if(m=b,Q=Kr(),Q!==t){for(N=[],U=He();U!==t;)N.push(U),U=He();N!==t?(U=Ea(),U!==t?(ce=os(),ce===t&&(ce=null),ce!==t?(Oe=m,Q=o(Q,U,ce),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;if(m===t)if(m=b,Q=Kr(),Q!==t){for(N=[],U=He();U!==t;)N.push(U),U=He();N!==t?(U=Ea(),U===t&&(U=null),U!==t?(Oe=m,Q=a(Q,U),m=Q):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;return m}function os(){var m,Q,N,U,ce;for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();if(Q!==t)if(N=Or(),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();U!==t?(Oe=m,Q=l(N),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t;return m}function Ea(){var m;return r.charCodeAt(b)===59?(m=c,b++):(m=t,I===0&&be(u)),m===t&&(r.charCodeAt(b)===38?(m=g,b++):(m=t,I===0&&be(f))),m}function Kr(){var m,Q,N;return m=b,Q=G1(),Q!==t?(N=uge(),N===t&&(N=null),N!==t?(Oe=m,Q=h(Q,N),m=Q):(b=m,m=t)):(b=m,m=t),m}function uge(){var m,Q,N,U,ce,Se,ht;for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();if(Q!==t)if(N=gge(),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t)if(ce=Kr(),ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();Se!==t?(Oe=m,Q=p(N,ce),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t;return m}function gge(){var m;return r.substr(b,2)===C?(m=C,b+=2):(m=t,I===0&&be(y)),m===t&&(r.substr(b,2)===B?(m=B,b+=2):(m=t,I===0&&be(v))),m}function G1(){var m,Q,N;return m=b,Q=pge(),Q!==t?(N=fge(),N===t&&(N=null),N!==t?(Oe=m,Q=D(Q,N),m=Q):(b=m,m=t)):(b=m,m=t),m}function fge(){var m,Q,N,U,ce,Se,ht;for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();if(Q!==t)if(N=hge(),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t)if(ce=G1(),ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();Se!==t?(Oe=m,Q=T(N,ce),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t;return m}function hge(){var m;return r.substr(b,2)===H?(m=H,b+=2):(m=t,I===0&&be(j)),m===t&&(r.charCodeAt(b)===124?(m=$,b++):(m=t,I===0&&be(V))),m}function qE(){var m,Q,N,U,ce,Se;if(m=b,Q=eK(),Q!==t)if(r.charCodeAt(b)===61?(N=W,b++):(N=t,I===0&&be(_)),N!==t)if(U=q1(),U!==t){for(ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();ce!==t?(Oe=m,Q=A(Q,U),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t;else b=m,m=t;if(m===t)if(m=b,Q=eK(),Q!==t)if(r.charCodeAt(b)===61?(N=W,b++):(N=t,I===0&&be(_)),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();U!==t?(Oe=m,Q=Ae(Q),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t;return m}function pge(){var m,Q,N,U,ce,Se,ht,Bt,Jr,hi,as;for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();if(Q!==t)if(r.charCodeAt(b)===40?(N=ge,b++):(N=t,I===0&&be(re)),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t)if(ce=Or(),ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();if(Se!==t)if(r.charCodeAt(b)===41?(ht=M,b++):(ht=t,I===0&&be(F)),ht!==t){for(Bt=[],Jr=He();Jr!==t;)Bt.push(Jr),Jr=He();if(Bt!==t){for(Jr=[],hi=Np();hi!==t;)Jr.push(hi),hi=Np();if(Jr!==t){for(hi=[],as=He();as!==t;)hi.push(as),as=He();hi!==t?(Oe=m,Q=ue(ce,Jr),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t;if(m===t){for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();if(Q!==t)if(r.charCodeAt(b)===123?(N=pe,b++):(N=t,I===0&&be(ke)),N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t)if(ce=Or(),ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();if(Se!==t)if(r.charCodeAt(b)===125?(ht=Fe,b++):(ht=t,I===0&&be(Ne)),ht!==t){for(Bt=[],Jr=He();Jr!==t;)Bt.push(Jr),Jr=He();if(Bt!==t){for(Jr=[],hi=Np();hi!==t;)Jr.push(hi),hi=Np();if(Jr!==t){for(hi=[],as=He();as!==t;)hi.push(as),as=He();hi!==t?(Oe=m,Q=oe(ce,Jr),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t;if(m===t){for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();if(Q!==t){for(N=[],U=qE();U!==t;)N.push(U),U=qE();if(N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();if(U!==t){if(ce=[],Se=j1(),Se!==t)for(;Se!==t;)ce.push(Se),Se=j1();else ce=t;if(ce!==t){for(Se=[],ht=He();ht!==t;)Se.push(ht),ht=He();Se!==t?(Oe=m,Q=le(N,ce),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t}else b=m,m=t}else b=m,m=t;if(m===t){for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();if(Q!==t){if(N=[],U=qE(),U!==t)for(;U!==t;)N.push(U),U=qE();else N=t;if(N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();U!==t?(Oe=m,Q=Be(N),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t}}}return m}function Y1(){var m,Q,N,U,ce;for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();if(Q!==t){if(N=[],U=JE(),U!==t)for(;U!==t;)N.push(U),U=JE();else N=t;if(N!==t){for(U=[],ce=He();ce!==t;)U.push(ce),ce=He();U!==t?(Oe=m,Q=fe(N),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t;return m}function j1(){var m,Q,N;for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();if(Q!==t?(N=Np(),N!==t?(Oe=m,Q=ae(N),m=Q):(b=m,m=t)):(b=m,m=t),m===t){for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();Q!==t?(N=JE(),N!==t?(Oe=m,Q=ae(N),m=Q):(b=m,m=t)):(b=m,m=t)}return m}function Np(){var m,Q,N,U,ce;for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();return Q!==t?(qe.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(ne)),N===t&&(N=null),N!==t?(U=dge(),U!==t?(ce=JE(),ce!==t?(Oe=m,Q=Y(N,U,ce),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m}function dge(){var m;return r.substr(b,2)===he?(m=he,b+=2):(m=t,I===0&&be(ie)),m===t&&(r.substr(b,2)===de?(m=de,b+=2):(m=t,I===0&&be(_e)),m===t&&(r.charCodeAt(b)===62?(m=Pt,b++):(m=t,I===0&&be(It)),m===t&&(r.substr(b,3)===Mr?(m=Mr,b+=3):(m=t,I===0&&be(ii)),m===t&&(r.substr(b,2)===gi?(m=gi,b+=2):(m=t,I===0&&be(hr)),m===t&&(r.charCodeAt(b)===60?(m=fi,b++):(m=t,I===0&&be(ni))))))),m}function JE(){var m,Q,N;for(m=b,Q=[],N=He();N!==t;)Q.push(N),N=He();return Q!==t?(N=q1(),N!==t?(Oe=m,Q=ae(N),m=Q):(b=m,m=t)):(b=m,m=t),m}function q1(){var m,Q,N;if(m=b,Q=[],N=J1(),N!==t)for(;N!==t;)Q.push(N),N=J1();else Q=t;return Q!==t&&(Oe=m,Q=Ks(Q)),m=Q,m}function J1(){var m,Q;return m=b,Q=Cge(),Q!==t&&(Oe=m,Q=pr(Q)),m=Q,m===t&&(m=b,Q=mge(),Q!==t&&(Oe=m,Q=pr(Q)),m=Q,m===t&&(m=b,Q=Ege(),Q!==t&&(Oe=m,Q=pr(Q)),m=Q,m===t&&(m=b,Q=Ige(),Q!==t&&(Oe=m,Q=pr(Q)),m=Q))),m}function Cge(){var m,Q,N,U;return m=b,r.substr(b,2)===Ii?(Q=Ii,b+=2):(Q=t,I===0&&be(rs)),Q!==t?(N=Bge(),N!==t?(r.charCodeAt(b)===39?(U=fa,b++):(U=t,I===0&&be(CA)),U!==t?(Oe=m,Q=cg(N),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m}function mge(){var m,Q,N,U;return m=b,r.charCodeAt(b)===39?(Q=fa,b++):(Q=t,I===0&&be(CA)),Q!==t?(N=yge(),N!==t?(r.charCodeAt(b)===39?(U=fa,b++):(U=t,I===0&&be(CA)),U!==t?(Oe=m,Q=cg(N),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m}function Ege(){var m,Q,N,U;if(m=b,r.substr(b,2)===is?(Q=is,b+=2):(Q=t,I===0&&be(mA)),Q!==t&&(Oe=m,Q=ha()),m=Q,m===t)if(m=b,r.charCodeAt(b)===34?(Q=wp,b++):(Q=t,I===0&&be(EA)),Q!==t){for(N=[],U=W1();U!==t;)N.push(U),U=W1();N!==t?(r.charCodeAt(b)===34?(U=wp,b++):(U=t,I===0&&be(EA)),U!==t?(Oe=m,Q=IA(N),m=Q):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;return m}function Ige(){var m,Q,N;if(m=b,Q=[],N=z1(),N!==t)for(;N!==t;)Q.push(N),N=z1();else Q=t;return Q!==t&&(Oe=m,Q=IA(Q)),m=Q,m}function W1(){var m,Q;return m=b,Q=_1(),Q!==t&&(Oe=m,Q=wr(Q)),m=Q,m===t&&(m=b,Q=$1(),Q!==t&&(Oe=m,Q=Tl(Q)),m=Q,m===t&&(m=b,Q=aS(),Q!==t&&(Oe=m,Q=ug(Q)),m=Q,m===t&&(m=b,Q=wge(),Q!==t&&(Oe=m,Q=Io(Q)),m=Q))),m}function z1(){var m,Q;return m=b,Q=_1(),Q!==t&&(Oe=m,Q=gg(Q)),m=Q,m===t&&(m=b,Q=$1(),Q!==t&&(Oe=m,Q=Bp(Q)),m=Q,m===t&&(m=b,Q=aS(),Q!==t&&(Oe=m,Q=bp(Q)),m=Q,m===t&&(m=b,Q=Sge(),Q!==t&&(Oe=m,Q=vr(Q)),m=Q,m===t&&(m=b,Q=Qge(),Q!==t&&(Oe=m,Q=Io(Q)),m=Q)))),m}function yge(){var m,Q,N;for(m=b,Q=[],se.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(yo));N!==t;)Q.push(N),se.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(yo));return Q!==t&&(Oe=m,Q=Fn(Q)),m=Q,m}function wge(){var m,Q,N;if(m=b,Q=[],N=V1(),N===t&&(fg.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(bt))),N!==t)for(;N!==t;)Q.push(N),N=V1(),N===t&&(fg.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(bt)));else Q=t;return Q!==t&&(Oe=m,Q=Fn(Q)),m=Q,m}function V1(){var m,Q,N;return m=b,r.substr(b,2)===Ll?(Q=Ll,b+=2):(Q=t,I===0&&be(Nn)),Q!==t&&(Oe=m,Q=ns()),m=Q,m===t&&(m=b,r.charCodeAt(b)===92?(Q=ss,b++):(Q=t,I===0&&be(gt)),Q!==t?(wo.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(At)),N!==t?(Oe=m,Q=ln(N),m=Q):(b=m,m=t)):(b=m,m=t)),m}function Bge(){var m,Q,N;for(m=b,Q=[],N=X1(),N===t&&(se.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(yo)));N!==t;)Q.push(N),N=X1(),N===t&&(se.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(yo)));return Q!==t&&(Oe=m,Q=Fn(Q)),m=Q,m}function X1(){var m,Q,N;return m=b,r.substr(b,2)===S?(Q=S,b+=2):(Q=t,I===0&&be(Lt)),Q!==t&&(Oe=m,Q=hg()),m=Q,m===t&&(m=b,r.substr(b,2)===Ml?(Q=Ml,b+=2):(Q=t,I===0&&be(Qp)),Q!==t&&(Oe=m,Q=Sp()),m=Q,m===t&&(m=b,r.charCodeAt(b)===92?(Q=ss,b++):(Q=t,I===0&&be(gt)),Q!==t?(vp.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(xp)),N!==t?(Oe=m,Q=Pp(),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===G?(Q=G,b+=2):(Q=t,I===0&&be(yt)),Q!==t&&(Oe=m,Q=yA()),m=Q,m===t&&(m=b,r.substr(b,2)===zi?(Q=zi,b+=2):(Q=t,I===0&&be(Ol)),Q!==t&&(Oe=m,Q=Xe()),m=Q,m===t&&(m=b,r.substr(b,2)===pa?(Q=pa,b+=2):(Q=t,I===0&&be(pg)),Q!==t&&(Oe=m,Q=ME()),m=Q,m===t&&(m=b,r.substr(b,2)===Dp?(Q=Dp,b+=2):(Q=t,I===0&&be(OE)),Q!==t&&(Oe=m,Q=ar()),m=Q,m===t&&(m=b,r.substr(b,2)===Tn?(Q=Tn,b+=2):(Q=t,I===0&&be(Kl)),Q!==t&&(Oe=m,Q=kp()),m=Q,m===t&&(m=b,r.charCodeAt(b)===92?(Q=ss,b++):(Q=t,I===0&&be(gt)),Q!==t?(Us.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(da)),N!==t?(Oe=m,Q=ln(N),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=bge()))))))))),m}function bge(){var m,Q,N,U,ce,Se,ht,Bt,Jr,hi,as,AS;return m=b,r.charCodeAt(b)===92?(Q=ss,b++):(Q=t,I===0&&be(gt)),Q!==t?(N=nS(),N!==t?(Oe=m,Q=cn(N),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Le?(Q=Le,b+=2):(Q=t,I===0&&be(dg)),Q!==t?(N=b,U=b,ce=nS(),ce!==t?(Se=On(),Se!==t?(ce=[ce,Se],U=ce):(b=U,U=t)):(b=U,U=t),U===t&&(U=nS()),U!==t?N=r.substring(N,b):N=U,N!==t?(Oe=m,Q=cn(N),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Ul?(Q=Ul,b+=2):(Q=t,I===0&&be(Hs)),Q!==t?(N=b,U=b,ce=On(),ce!==t?(Se=On(),Se!==t?(ht=On(),ht!==t?(Bt=On(),Bt!==t?(ce=[ce,Se,ht,Bt],U=ce):(b=U,U=t)):(b=U,U=t)):(b=U,U=t)):(b=U,U=t),U!==t?N=r.substring(N,b):N=U,N!==t?(Oe=m,Q=cn(N),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Hl?(Q=Hl,b+=2):(Q=t,I===0&&be(wA)),Q!==t?(N=b,U=b,ce=On(),ce!==t?(Se=On(),Se!==t?(ht=On(),ht!==t?(Bt=On(),Bt!==t?(Jr=On(),Jr!==t?(hi=On(),hi!==t?(as=On(),as!==t?(AS=On(),AS!==t?(ce=[ce,Se,ht,Bt,Jr,hi,as,AS],U=ce):(b=U,U=t)):(b=U,U=t)):(b=U,U=t)):(b=U,U=t)):(b=U,U=t)):(b=U,U=t)):(b=U,U=t)):(b=U,U=t),U!==t?N=r.substring(N,b):N=U,N!==t?(Oe=m,Q=Cg(N),m=Q):(b=m,m=t)):(b=m,m=t)))),m}function nS(){var m;return mg.test(r.charAt(b))?(m=r.charAt(b),b++):(m=t,I===0&&be(Ca)),m}function On(){var m;return ma.test(r.charAt(b))?(m=r.charAt(b),b++):(m=t,I===0&&be(rt)),m}function Qge(){var m,Q,N,U,ce;if(m=b,Q=[],N=b,r.charCodeAt(b)===92?(U=ss,b++):(U=t,I===0&&be(gt)),U!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&be(Bo)),ce!==t?(Oe=N,U=ln(ce),N=U):(b=N,N=t)):(b=N,N=t),N===t&&(N=b,U=b,I++,ce=tK(),I--,ce===t?U=void 0:(b=U,U=t),U!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&be(Bo)),ce!==t?(Oe=N,U=ln(ce),N=U):(b=N,N=t)):(b=N,N=t)),N!==t)for(;N!==t;)Q.push(N),N=b,r.charCodeAt(b)===92?(U=ss,b++):(U=t,I===0&&be(gt)),U!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&be(Bo)),ce!==t?(Oe=N,U=ln(ce),N=U):(b=N,N=t)):(b=N,N=t),N===t&&(N=b,U=b,I++,ce=tK(),I--,ce===t?U=void 0:(b=U,U=t),U!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&be(Bo)),ce!==t?(Oe=N,U=ln(ce),N=U):(b=N,N=t)):(b=N,N=t));else Q=t;return Q!==t&&(Oe=m,Q=Fn(Q)),m=Q,m}function sS(){var m,Q,N,U,ce,Se;if(m=b,r.charCodeAt(b)===45?(Q=BA,b++):(Q=t,I===0&&be(Gl)),Q===t&&(r.charCodeAt(b)===43?(Q=Gs,b++):(Q=t,I===0&&be(Yl))),Q===t&&(Q=null),Q!==t){if(N=[],qe.test(r.charAt(b))?(U=r.charAt(b),b++):(U=t,I===0&&be(ne)),U!==t)for(;U!==t;)N.push(U),qe.test(r.charAt(b))?(U=r.charAt(b),b++):(U=t,I===0&&be(ne));else N=t;if(N!==t)if(r.charCodeAt(b)===46?(U=KE,b++):(U=t,I===0&&be(Rp)),U!==t){if(ce=[],qe.test(r.charAt(b))?(Se=r.charAt(b),b++):(Se=t,I===0&&be(ne)),Se!==t)for(;Se!==t;)ce.push(Se),qe.test(r.charAt(b))?(Se=r.charAt(b),b++):(Se=t,I===0&&be(ne));else ce=t;ce!==t?(Oe=m,Q=Eg(Q,N,ce),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t;if(m===t){if(m=b,r.charCodeAt(b)===45?(Q=BA,b++):(Q=t,I===0&&be(Gl)),Q===t&&(r.charCodeAt(b)===43?(Q=Gs,b++):(Q=t,I===0&&be(Yl))),Q===t&&(Q=null),Q!==t){if(N=[],qe.test(r.charAt(b))?(U=r.charAt(b),b++):(U=t,I===0&&be(ne)),U!==t)for(;U!==t;)N.push(U),qe.test(r.charAt(b))?(U=r.charAt(b),b++):(U=t,I===0&&be(ne));else N=t;N!==t?(Oe=m,Q=Fp(Q,N),m=Q):(b=m,m=t)}else b=m,m=t;if(m===t&&(m=b,Q=aS(),Q!==t&&(Oe=m,Q=UE(Q)),m=Q,m===t&&(m=b,Q=ql(),Q!==t&&(Oe=m,Q=jl(Q)),m=Q,m===t)))if(m=b,r.charCodeAt(b)===40?(Q=ge,b++):(Q=t,I===0&&be(re)),Q!==t){for(N=[],U=He();U!==t;)N.push(U),U=He();if(N!==t)if(U=Z1(),U!==t){for(ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();ce!==t?(r.charCodeAt(b)===41?(Se=M,b++):(Se=t,I===0&&be(F)),Se!==t?(Oe=m,Q=HE(U),m=Q):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t}return m}function oS(){var m,Q,N,U,ce,Se,ht,Bt;if(m=b,Q=sS(),Q!==t){for(N=[],U=b,ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();if(ce!==t)if(r.charCodeAt(b)===42?(Se=Ig,b++):(Se=t,I===0&&be(bA)),Se===t&&(r.charCodeAt(b)===47?(Se=Rr,b++):(Se=t,I===0&&be(GE))),Se!==t){for(ht=[],Bt=He();Bt!==t;)ht.push(Bt),Bt=He();ht!==t?(Bt=sS(),Bt!==t?(Oe=U,ce=Ys(Q,Se,Bt),U=ce):(b=U,U=t)):(b=U,U=t)}else b=U,U=t;else b=U,U=t;for(;U!==t;){for(N.push(U),U=b,ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();if(ce!==t)if(r.charCodeAt(b)===42?(Se=Ig,b++):(Se=t,I===0&&be(bA)),Se===t&&(r.charCodeAt(b)===47?(Se=Rr,b++):(Se=t,I===0&&be(GE))),Se!==t){for(ht=[],Bt=He();Bt!==t;)ht.push(Bt),Bt=He();ht!==t?(Bt=sS(),Bt!==t?(Oe=U,ce=Ys(Q,Se,Bt),U=ce):(b=U,U=t)):(b=U,U=t)}else b=U,U=t;else b=U,U=t}N!==t?(Oe=m,Q=js(Q,N),m=Q):(b=m,m=t)}else b=m,m=t;return m}function Z1(){var m,Q,N,U,ce,Se,ht,Bt;if(m=b,Q=oS(),Q!==t){for(N=[],U=b,ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();if(ce!==t)if(r.charCodeAt(b)===43?(Se=Gs,b++):(Se=t,I===0&&be(Yl)),Se===t&&(r.charCodeAt(b)===45?(Se=BA,b++):(Se=t,I===0&&be(Gl))),Se!==t){for(ht=[],Bt=He();Bt!==t;)ht.push(Bt),Bt=He();ht!==t?(Bt=oS(),Bt!==t?(Oe=U,ce=yg(Q,Se,Bt),U=ce):(b=U,U=t)):(b=U,U=t)}else b=U,U=t;else b=U,U=t;for(;U!==t;){for(N.push(U),U=b,ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();if(ce!==t)if(r.charCodeAt(b)===43?(Se=Gs,b++):(Se=t,I===0&&be(Yl)),Se===t&&(r.charCodeAt(b)===45?(Se=BA,b++):(Se=t,I===0&&be(Gl))),Se!==t){for(ht=[],Bt=He();Bt!==t;)ht.push(Bt),Bt=He();ht!==t?(Bt=oS(),Bt!==t?(Oe=U,ce=yg(Q,Se,Bt),U=ce):(b=U,U=t)):(b=U,U=t)}else b=U,U=t;else b=U,U=t}N!==t?(Oe=m,Q=js(Q,N),m=Q):(b=m,m=t)}else b=m,m=t;return m}function _1(){var m,Q,N,U,ce,Se;if(m=b,r.substr(b,3)===QA?(Q=QA,b+=3):(Q=t,I===0&&be(R)),Q!==t){for(N=[],U=He();U!==t;)N.push(U),U=He();if(N!==t)if(U=Z1(),U!==t){for(ce=[],Se=He();Se!==t;)ce.push(Se),Se=He();ce!==t?(r.substr(b,2)===q?(Se=q,b+=2):(Se=t,I===0&&be(Ce)),Se!==t?(Oe=m,Q=Ke(U),m=Q):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t;return m}function $1(){var m,Q,N,U;return m=b,r.substr(b,2)===Re?(Q=Re,b+=2):(Q=t,I===0&&be(ze)),Q!==t?(N=Or(),N!==t?(r.charCodeAt(b)===41?(U=M,b++):(U=t,I===0&&be(F)),U!==t?(Oe=m,Q=dt(N),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m}function aS(){var m,Q,N,U,ce,Se;return m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&be(Ln)),Q!==t?(N=ql(),N!==t?(r.substr(b,2)===JQ?(U=JQ,b+=2):(U=t,I===0&&be(P1)),U!==t?(ce=Y1(),ce!==t?(r.charCodeAt(b)===125?(Se=Fe,b++):(Se=t,I===0&&be(Ne)),Se!==t?(Oe=m,Q=D1(N,ce),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&be(Ln)),Q!==t?(N=ql(),N!==t?(r.substr(b,3)===WQ?(U=WQ,b+=3):(U=t,I===0&&be(k1)),U!==t?(Oe=m,Q=R1(N),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&be(Ln)),Q!==t?(N=ql(),N!==t?(r.substr(b,2)===zQ?(U=zQ,b+=2):(U=t,I===0&&be(F1)),U!==t?(ce=Y1(),ce!==t?(r.charCodeAt(b)===125?(Se=Fe,b++):(Se=t,I===0&&be(Ne)),Se!==t?(Oe=m,Q=N1(N,ce),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&be(Ln)),Q!==t?(N=ql(),N!==t?(r.substr(b,3)===VQ?(U=VQ,b+=3):(U=t,I===0&&be(T1)),U!==t?(Oe=m,Q=L1(N),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&be(Ln)),Q!==t?(N=ql(),N!==t?(r.charCodeAt(b)===125?(U=Fe,b++):(U=t,I===0&&be(Ne)),U!==t?(Oe=m,Q=XQ(N),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.charCodeAt(b)===36?(Q=M1,b++):(Q=t,I===0&&be(O1)),Q!==t?(N=ql(),N!==t?(Oe=m,Q=XQ(N),m=Q):(b=m,m=t)):(b=m,m=t)))))),m}function Sge(){var m,Q,N;return m=b,Q=vge(),Q!==t?(Oe=b,N=K1(Q),N?N=void 0:N=t,N!==t?(Oe=m,Q=U1(Q),m=Q):(b=m,m=t)):(b=m,m=t),m}function vge(){var m,Q,N,U,ce;if(m=b,Q=[],N=b,U=b,I++,ce=rK(),I--,ce===t?U=void 0:(b=U,U=t),U!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&be(Bo)),ce!==t?(Oe=N,U=ln(ce),N=U):(b=N,N=t)):(b=N,N=t),N!==t)for(;N!==t;)Q.push(N),N=b,U=b,I++,ce=rK(),I--,ce===t?U=void 0:(b=U,U=t),U!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&be(Bo)),ce!==t?(Oe=N,U=ln(ce),N=U):(b=N,N=t)):(b=N,N=t);else Q=t;return Q!==t&&(Oe=m,Q=Fn(Q)),m=Q,m}function eK(){var m,Q,N;if(m=b,Q=[],ZQ.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(_Q)),N!==t)for(;N!==t;)Q.push(N),ZQ.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(_Q));else Q=t;return Q!==t&&(Oe=m,Q=$Q()),m=Q,m}function ql(){var m,Q,N;if(m=b,Q=[],eS.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(tS)),N!==t)for(;N!==t;)Q.push(N),eS.test(r.charAt(b))?(N=r.charAt(b),b++):(N=t,I===0&&be(tS));else Q=t;return Q!==t&&(Oe=m,Q=$Q()),m=Q,m}function tK(){var m;return H1.test(r.charAt(b))?(m=r.charAt(b),b++):(m=t,I===0&&be(wg)),m}function rK(){var m;return rS.test(r.charAt(b))?(m=r.charAt(b),b++):(m=t,I===0&&be(iS)),m}function He(){var m,Q;if(m=[],YE.test(r.charAt(b))?(Q=r.charAt(b),b++):(Q=t,I===0&&be(jE)),Q!==t)for(;Q!==t;)m.push(Q),YE.test(r.charAt(b))?(Q=r.charAt(b),b++):(Q=t,I===0&&be(jE));else m=t;return m}if(k=n(),k!==t&&b===r.length)return k;throw k!==t&&b{"use strict";function xfe(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function $l(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,$l)}xfe($l,Error);$l.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;gH&&(H=v,j=[]),j.push(ne))}function Ne(ne,Y){return new $l(ne,null,null,Y)}function oe(ne,Y,he){return new $l($l.buildMessage(ne,Y),ne,Y,he)}function le(){var ne,Y,he,ie;return ne=v,Y=Be(),Y!==t?(r.charCodeAt(v)===47?(he=s,v++):(he=t,$===0&&Fe(o)),he!==t?(ie=Be(),ie!==t?(D=ne,Y=a(Y,ie),ne=Y):(v=ne,ne=t)):(v=ne,ne=t)):(v=ne,ne=t),ne===t&&(ne=v,Y=Be(),Y!==t&&(D=ne,Y=l(Y)),ne=Y),ne}function Be(){var ne,Y,he,ie;return ne=v,Y=fe(),Y!==t?(r.charCodeAt(v)===64?(he=c,v++):(he=t,$===0&&Fe(u)),he!==t?(ie=qe(),ie!==t?(D=ne,Y=g(Y,ie),ne=Y):(v=ne,ne=t)):(v=ne,ne=t)):(v=ne,ne=t),ne===t&&(ne=v,Y=fe(),Y!==t&&(D=ne,Y=f(Y)),ne=Y),ne}function fe(){var ne,Y,he,ie,de;return ne=v,r.charCodeAt(v)===64?(Y=c,v++):(Y=t,$===0&&Fe(u)),Y!==t?(he=ae(),he!==t?(r.charCodeAt(v)===47?(ie=s,v++):(ie=t,$===0&&Fe(o)),ie!==t?(de=ae(),de!==t?(D=ne,Y=h(),ne=Y):(v=ne,ne=t)):(v=ne,ne=t)):(v=ne,ne=t)):(v=ne,ne=t),ne===t&&(ne=v,Y=ae(),Y!==t&&(D=ne,Y=h()),ne=Y),ne}function ae(){var ne,Y,he;if(ne=v,Y=[],p.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Fe(C)),he!==t)for(;he!==t;)Y.push(he),p.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Fe(C));else Y=t;return Y!==t&&(D=ne,Y=h()),ne=Y,ne}function qe(){var ne,Y,he;if(ne=v,Y=[],y.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Fe(B)),he!==t)for(;he!==t;)Y.push(he),y.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Fe(B));else Y=t;return Y!==t&&(D=ne,Y=h()),ne=Y,ne}if(V=n(),V!==t&&v===r.length)return V;throw V!==t&&v{"use strict";function dU(r){return typeof r>"u"||r===null}function Dfe(r){return typeof r=="object"&&r!==null}function kfe(r){return Array.isArray(r)?r:dU(r)?[]:[r]}function Rfe(r,e){var t,i,n,s;if(e)for(s=Object.keys(e),t=0,i=s.length;t{"use strict";function Vp(r,e){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Vp.prototype=Object.create(Error.prototype);Vp.prototype.constructor=Vp;Vp.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t};CU.exports=Vp});var IU=w((bZe,EU)=>{"use strict";var mU=tc();function HS(r,e,t,i,n){this.name=r,this.buffer=e,this.position=t,this.line=i,this.column=n}HS.prototype.getSnippet=function(e,t){var i,n,s,o,a;if(!this.buffer)return null;for(e=e||4,t=t||75,i="",n=this.position;n>0&&`\0\r +\x85\u2028\u2029`.indexOf(this.buffer.charAt(n-1))===-1;)if(n-=1,this.position-n>t/2-1){i=" ... ",n+=5;break}for(s="",o=this.position;ot/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(n,o),mU.repeat(" ",e)+i+a+s+` +`+mU.repeat(" ",e+this.position-n+i.length)+"^"};HS.prototype.toString=function(e){var t,i="";return this.name&&(i+='in "'+this.name+'" '),i+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(i+=`: +`+t)),i};EU.exports=HS});var si=w((QZe,wU)=>{"use strict";var yU=Ng(),Tfe=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],Lfe=["scalar","sequence","mapping"];function Mfe(r){var e={};return r!==null&&Object.keys(r).forEach(function(t){r[t].forEach(function(i){e[String(i)]=t})}),e}function Ofe(r,e){if(e=e||{},Object.keys(e).forEach(function(t){if(Tfe.indexOf(t)===-1)throw new yU('Unknown option "'+t+'" is met in definition of "'+r+'" YAML type.')}),this.tag=r,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=Mfe(e.styleAliases||null),Lfe.indexOf(this.kind)===-1)throw new yU('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')}wU.exports=Ofe});var rc=w((SZe,bU)=>{"use strict";var BU=tc(),dI=Ng(),Kfe=si();function GS(r,e,t){var i=[];return r.include.forEach(function(n){t=GS(n,e,t)}),r[e].forEach(function(n){t.forEach(function(s,o){s.tag===n.tag&&s.kind===n.kind&&i.push(o)}),t.push(n)}),t.filter(function(n,s){return i.indexOf(s)===-1})}function Ufe(){var r={scalar:{},sequence:{},mapping:{},fallback:{}},e,t;function i(n){r[n.kind][n.tag]=r.fallback[n.tag]=n}for(e=0,t=arguments.length;e{"use strict";var Hfe=si();QU.exports=new Hfe("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})});var xU=w((xZe,vU)=>{"use strict";var Gfe=si();vU.exports=new Gfe("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})});var DU=w((PZe,PU)=>{"use strict";var Yfe=si();PU.exports=new Yfe("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})});var CI=w((DZe,kU)=>{"use strict";var jfe=rc();kU.exports=new jfe({explicit:[SU(),xU(),DU()]})});var FU=w((kZe,RU)=>{"use strict";var qfe=si();function Jfe(r){if(r===null)return!0;var e=r.length;return e===1&&r==="~"||e===4&&(r==="null"||r==="Null"||r==="NULL")}function Wfe(){return null}function zfe(r){return r===null}RU.exports=new qfe("tag:yaml.org,2002:null",{kind:"scalar",resolve:Jfe,construct:Wfe,predicate:zfe,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var TU=w((RZe,NU)=>{"use strict";var Vfe=si();function Xfe(r){if(r===null)return!1;var e=r.length;return e===4&&(r==="true"||r==="True"||r==="TRUE")||e===5&&(r==="false"||r==="False"||r==="FALSE")}function Zfe(r){return r==="true"||r==="True"||r==="TRUE"}function _fe(r){return Object.prototype.toString.call(r)==="[object Boolean]"}NU.exports=new Vfe("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Xfe,construct:Zfe,predicate:_fe,represent:{lowercase:function(r){return r?"true":"false"},uppercase:function(r){return r?"TRUE":"FALSE"},camelcase:function(r){return r?"True":"False"}},defaultStyle:"lowercase"})});var MU=w((FZe,LU)=>{"use strict";var $fe=tc(),ehe=si();function the(r){return 48<=r&&r<=57||65<=r&&r<=70||97<=r&&r<=102}function rhe(r){return 48<=r&&r<=55}function ihe(r){return 48<=r&&r<=57}function nhe(r){if(r===null)return!1;var e=r.length,t=0,i=!1,n;if(!e)return!1;if(n=r[t],(n==="-"||n==="+")&&(n=r[++t]),n==="0"){if(t+1===e)return!0;if(n=r[++t],n==="b"){for(t++;t=0?"0b"+r.toString(2):"-0b"+r.toString(2).slice(1)},octal:function(r){return r>=0?"0"+r.toString(8):"-0"+r.toString(8).slice(1)},decimal:function(r){return r.toString(10)},hexadecimal:function(r){return r>=0?"0x"+r.toString(16).toUpperCase():"-0x"+r.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var UU=w((NZe,KU)=>{"use strict";var OU=tc(),ahe=si(),Ahe=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function lhe(r){return!(r===null||!Ahe.test(r)||r[r.length-1]==="_")}function che(r){var e,t,i,n;return e=r.replace(/_/g,"").toLowerCase(),t=e[0]==="-"?-1:1,n=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?t===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:e.indexOf(":")>=0?(e.split(":").forEach(function(s){n.unshift(parseFloat(s,10))}),e=0,i=1,n.forEach(function(s){e+=s*i,i*=60}),t*e):t*parseFloat(e,10)}var uhe=/^[-+]?[0-9]+e/;function ghe(r,e){var t;if(isNaN(r))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===r)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===r)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(OU.isNegativeZero(r))return"-0.0";return t=r.toString(10),uhe.test(t)?t.replace("e",".e"):t}function fhe(r){return Object.prototype.toString.call(r)==="[object Number]"&&(r%1!==0||OU.isNegativeZero(r))}KU.exports=new ahe("tag:yaml.org,2002:float",{kind:"scalar",resolve:lhe,construct:che,predicate:fhe,represent:ghe,defaultStyle:"lowercase"})});var YS=w((TZe,HU)=>{"use strict";var hhe=rc();HU.exports=new hhe({include:[CI()],implicit:[FU(),TU(),MU(),UU()]})});var jS=w((LZe,GU)=>{"use strict";var phe=rc();GU.exports=new phe({include:[YS()]})});var JU=w((MZe,qU)=>{"use strict";var dhe=si(),YU=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),jU=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Che(r){return r===null?!1:YU.exec(r)!==null||jU.exec(r)!==null}function mhe(r){var e,t,i,n,s,o,a,l=0,c=null,u,g,f;if(e=YU.exec(r),e===null&&(e=jU.exec(r)),e===null)throw new Error("Date resolve error");if(t=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(t,i,n));if(s=+e[4],o=+e[5],a=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(u=+e[10],g=+(e[11]||0),c=(u*60+g)*6e4,e[9]==="-"&&(c=-c)),f=new Date(Date.UTC(t,i,n,s,o,a,l)),c&&f.setTime(f.getTime()-c),f}function Ehe(r){return r.toISOString()}qU.exports=new dhe("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Che,construct:mhe,instanceOf:Date,represent:Ehe})});var zU=w((OZe,WU)=>{"use strict";var Ihe=si();function yhe(r){return r==="<<"||r===null}WU.exports=new Ihe("tag:yaml.org,2002:merge",{kind:"scalar",resolve:yhe})});var ZU=w((KZe,XU)=>{"use strict";var ic;try{VU=J,ic=VU("buffer").Buffer}catch{}var VU,whe=si(),qS=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function Bhe(r){if(r===null)return!1;var e,t,i=0,n=r.length,s=qS;for(t=0;t64)){if(e<0)return!1;i+=6}return i%8===0}function bhe(r){var e,t,i=r.replace(/[\r\n=]/g,""),n=i.length,s=qS,o=0,a=[];for(e=0;e>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(i.charAt(e));return t=n%4*6,t===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):t===18?(a.push(o>>10&255),a.push(o>>2&255)):t===12&&a.push(o>>4&255),ic?ic.from?ic.from(a):new ic(a):a}function Qhe(r){var e="",t=0,i,n,s=r.length,o=qS;for(i=0;i>18&63],e+=o[t>>12&63],e+=o[t>>6&63],e+=o[t&63]),t=(t<<8)+r[i];return n=s%3,n===0?(e+=o[t>>18&63],e+=o[t>>12&63],e+=o[t>>6&63],e+=o[t&63]):n===2?(e+=o[t>>10&63],e+=o[t>>4&63],e+=o[t<<2&63],e+=o[64]):n===1&&(e+=o[t>>2&63],e+=o[t<<4&63],e+=o[64],e+=o[64]),e}function She(r){return ic&&ic.isBuffer(r)}XU.exports=new whe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Bhe,construct:bhe,predicate:She,represent:Qhe})});var $U=w((HZe,_U)=>{"use strict";var vhe=si(),xhe=Object.prototype.hasOwnProperty,Phe=Object.prototype.toString;function Dhe(r){if(r===null)return!0;var e=[],t,i,n,s,o,a=r;for(t=0,i=a.length;t{"use strict";var Rhe=si(),Fhe=Object.prototype.toString;function Nhe(r){if(r===null)return!0;var e,t,i,n,s,o=r;for(s=new Array(o.length),e=0,t=o.length;e{"use strict";var Lhe=si(),Mhe=Object.prototype.hasOwnProperty;function Ohe(r){if(r===null)return!0;var e,t=r;for(e in t)if(Mhe.call(t,e)&&t[e]!==null)return!1;return!0}function Khe(r){return r!==null?r:{}}r2.exports=new Lhe("tag:yaml.org,2002:set",{kind:"mapping",resolve:Ohe,construct:Khe})});var Lg=w((jZe,n2)=>{"use strict";var Uhe=rc();n2.exports=new Uhe({include:[jS()],implicit:[JU(),zU()],explicit:[ZU(),$U(),t2(),i2()]})});var o2=w((qZe,s2)=>{"use strict";var Hhe=si();function Ghe(){return!0}function Yhe(){}function jhe(){return""}function qhe(r){return typeof r>"u"}s2.exports=new Hhe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:Ghe,construct:Yhe,predicate:qhe,represent:jhe})});var A2=w((JZe,a2)=>{"use strict";var Jhe=si();function Whe(r){if(r===null||r.length===0)return!1;var e=r,t=/\/([gim]*)$/.exec(r),i="";return!(e[0]==="/"&&(t&&(i=t[1]),i.length>3||e[e.length-i.length-1]!=="/"))}function zhe(r){var e=r,t=/\/([gim]*)$/.exec(r),i="";return e[0]==="/"&&(t&&(i=t[1]),e=e.slice(1,e.length-i.length-1)),new RegExp(e,i)}function Vhe(r){var e="/"+r.source+"/";return r.global&&(e+="g"),r.multiline&&(e+="m"),r.ignoreCase&&(e+="i"),e}function Xhe(r){return Object.prototype.toString.call(r)==="[object RegExp]"}a2.exports=new Jhe("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:Whe,construct:zhe,predicate:Xhe,represent:Vhe})});var u2=w((WZe,c2)=>{"use strict";var mI;try{l2=J,mI=l2("esprima")}catch{typeof window<"u"&&(mI=window.esprima)}var l2,Zhe=si();function _he(r){if(r===null)return!1;try{var e="("+r+")",t=mI.parse(e,{range:!0});return!(t.type!=="Program"||t.body.length!==1||t.body[0].type!=="ExpressionStatement"||t.body[0].expression.type!=="ArrowFunctionExpression"&&t.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function $he(r){var e="("+r+")",t=mI.parse(e,{range:!0}),i=[],n;if(t.type!=="Program"||t.body.length!==1||t.body[0].type!=="ExpressionStatement"||t.body[0].expression.type!=="ArrowFunctionExpression"&&t.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return t.body[0].expression.params.forEach(function(s){i.push(s.name)}),n=t.body[0].expression.body.range,t.body[0].expression.body.type==="BlockStatement"?new Function(i,e.slice(n[0]+1,n[1]-1)):new Function(i,"return "+e.slice(n[0],n[1]))}function epe(r){return r.toString()}function tpe(r){return Object.prototype.toString.call(r)==="[object Function]"}c2.exports=new Zhe("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:_he,construct:$he,predicate:tpe,represent:epe})});var Xp=w((VZe,f2)=>{"use strict";var g2=rc();f2.exports=g2.DEFAULT=new g2({include:[Lg()],explicit:[o2(),A2(),u2()]})});var R2=w((XZe,Zp)=>{"use strict";var Ba=tc(),I2=Ng(),rpe=IU(),y2=Lg(),ipe=Xp(),RA=Object.prototype.hasOwnProperty,EI=1,w2=2,B2=3,II=4,JS=1,npe=2,h2=3,spe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ope=/[\x85\u2028\u2029]/,ape=/[,\[\]\{\}]/,b2=/^(?:!|!!|![a-z\-]+!)$/i,Q2=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function p2(r){return Object.prototype.toString.call(r)}function vo(r){return r===10||r===13}function sc(r){return r===9||r===32}function fn(r){return r===9||r===32||r===10||r===13}function Mg(r){return r===44||r===91||r===93||r===123||r===125}function Ape(r){var e;return 48<=r&&r<=57?r-48:(e=r|32,97<=e&&e<=102?e-97+10:-1)}function lpe(r){return r===120?2:r===117?4:r===85?8:0}function cpe(r){return 48<=r&&r<=57?r-48:-1}function d2(r){return r===48?"\0":r===97?"\x07":r===98?"\b":r===116||r===9?" ":r===110?` +`:r===118?"\v":r===102?"\f":r===114?"\r":r===101?"\x1B":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"\x85":r===95?"\xA0":r===76?"\u2028":r===80?"\u2029":""}function upe(r){return r<=65535?String.fromCharCode(r):String.fromCharCode((r-65536>>10)+55296,(r-65536&1023)+56320)}var S2=new Array(256),v2=new Array(256);for(nc=0;nc<256;nc++)S2[nc]=d2(nc)?1:0,v2[nc]=d2(nc);var nc;function gpe(r,e){this.input=r,this.filename=e.filename||null,this.schema=e.schema||ipe,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=r.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function x2(r,e){return new I2(e,new rpe(r.filename,r.input,r.position,r.line,r.position-r.lineStart))}function ft(r,e){throw x2(r,e)}function yI(r,e){r.onWarning&&r.onWarning.call(null,x2(r,e))}var C2={YAML:function(e,t,i){var n,s,o;e.version!==null&&ft(e,"duplication of %YAML directive"),i.length!==1&&ft(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&ft(e,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),o=parseInt(n[2],10),s!==1&&ft(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&yI(e,"unsupported YAML version of the document")},TAG:function(e,t,i){var n,s;i.length!==2&&ft(e,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],b2.test(n)||ft(e,"ill-formed tag handle (first argument) of the TAG directive"),RA.call(e.tagMap,n)&&ft(e,'there is a previously declared suffix for "'+n+'" tag handle'),Q2.test(s)||ft(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[n]=s}};function kA(r,e,t,i){var n,s,o,a;if(e1&&(r.result+=Ba.repeat(` +`,e-1))}function fpe(r,e,t){var i,n,s,o,a,l,c,u,g=r.kind,f=r.result,h;if(h=r.input.charCodeAt(r.position),fn(h)||Mg(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(n=r.input.charCodeAt(r.position+1),fn(n)||t&&Mg(n)))return!1;for(r.kind="scalar",r.result="",s=o=r.position,a=!1;h!==0;){if(h===58){if(n=r.input.charCodeAt(r.position+1),fn(n)||t&&Mg(n))break}else if(h===35){if(i=r.input.charCodeAt(r.position-1),fn(i))break}else{if(r.position===r.lineStart&&wI(r)||t&&Mg(h))break;if(vo(h))if(l=r.line,c=r.lineStart,u=r.lineIndent,zr(r,!1,-1),r.lineIndent>=e){a=!0,h=r.input.charCodeAt(r.position);continue}else{r.position=o,r.line=l,r.lineStart=c,r.lineIndent=u;break}}a&&(kA(r,s,o,!1),zS(r,r.line-l),s=o=r.position,a=!1),sc(h)||(o=r.position+1),h=r.input.charCodeAt(++r.position)}return kA(r,s,o,!1),r.result?!0:(r.kind=g,r.result=f,!1)}function hpe(r,e){var t,i,n;if(t=r.input.charCodeAt(r.position),t!==39)return!1;for(r.kind="scalar",r.result="",r.position++,i=n=r.position;(t=r.input.charCodeAt(r.position))!==0;)if(t===39)if(kA(r,i,r.position,!0),t=r.input.charCodeAt(++r.position),t===39)i=r.position,r.position++,n=r.position;else return!0;else vo(t)?(kA(r,i,n,!0),zS(r,zr(r,!1,e)),i=n=r.position):r.position===r.lineStart&&wI(r)?ft(r,"unexpected end of the document within a single quoted scalar"):(r.position++,n=r.position);ft(r,"unexpected end of the stream within a single quoted scalar")}function ppe(r,e){var t,i,n,s,o,a;if(a=r.input.charCodeAt(r.position),a!==34)return!1;for(r.kind="scalar",r.result="",r.position++,t=i=r.position;(a=r.input.charCodeAt(r.position))!==0;){if(a===34)return kA(r,t,r.position,!0),r.position++,!0;if(a===92){if(kA(r,t,r.position,!0),a=r.input.charCodeAt(++r.position),vo(a))zr(r,!1,e);else if(a<256&&S2[a])r.result+=v2[a],r.position++;else if((o=lpe(a))>0){for(n=o,s=0;n>0;n--)a=r.input.charCodeAt(++r.position),(o=Ape(a))>=0?s=(s<<4)+o:ft(r,"expected hexadecimal character");r.result+=upe(s),r.position++}else ft(r,"unknown escape sequence");t=i=r.position}else vo(a)?(kA(r,t,i,!0),zS(r,zr(r,!1,e)),t=i=r.position):r.position===r.lineStart&&wI(r)?ft(r,"unexpected end of the document within a double quoted scalar"):(r.position++,i=r.position)}ft(r,"unexpected end of the stream within a double quoted scalar")}function dpe(r,e){var t=!0,i,n=r.tag,s,o=r.anchor,a,l,c,u,g,f={},h,p,C,y;if(y=r.input.charCodeAt(r.position),y===91)l=93,g=!1,s=[];else if(y===123)l=125,g=!0,s={};else return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=s),y=r.input.charCodeAt(++r.position);y!==0;){if(zr(r,!0,e),y=r.input.charCodeAt(r.position),y===l)return r.position++,r.tag=n,r.anchor=o,r.kind=g?"mapping":"sequence",r.result=s,!0;t||ft(r,"missed comma between flow collection entries"),p=h=C=null,c=u=!1,y===63&&(a=r.input.charCodeAt(r.position+1),fn(a)&&(c=u=!0,r.position++,zr(r,!0,e))),i=r.line,Kg(r,e,EI,!1,!0),p=r.tag,h=r.result,zr(r,!0,e),y=r.input.charCodeAt(r.position),(u||r.line===i)&&y===58&&(c=!0,y=r.input.charCodeAt(++r.position),zr(r,!0,e),Kg(r,e,EI,!1,!0),C=r.result),g?Og(r,s,f,p,h,C):c?s.push(Og(r,null,f,p,h,C)):s.push(h),zr(r,!0,e),y=r.input.charCodeAt(r.position),y===44?(t=!0,y=r.input.charCodeAt(++r.position)):t=!1}ft(r,"unexpected end of the stream within a flow collection")}function Cpe(r,e){var t,i,n=JS,s=!1,o=!1,a=e,l=0,c=!1,u,g;if(g=r.input.charCodeAt(r.position),g===124)i=!1;else if(g===62)i=!0;else return!1;for(r.kind="scalar",r.result="";g!==0;)if(g=r.input.charCodeAt(++r.position),g===43||g===45)JS===n?n=g===43?h2:npe:ft(r,"repeat of a chomping mode identifier");else if((u=cpe(g))>=0)u===0?ft(r,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?ft(r,"repeat of an indentation width identifier"):(a=e+u-1,o=!0);else break;if(sc(g)){do g=r.input.charCodeAt(++r.position);while(sc(g));if(g===35)do g=r.input.charCodeAt(++r.position);while(!vo(g)&&g!==0)}for(;g!==0;){for(WS(r),r.lineIndent=0,g=r.input.charCodeAt(r.position);(!o||r.lineIndenta&&(a=r.lineIndent),vo(g)){l++;continue}if(r.lineIndente)&&l!==0)ft(r,"bad indentation of a sequence entry");else if(r.lineIndente)&&(Kg(r,e,II,!0,n)&&(p?f=r.result:h=r.result),p||(Og(r,c,u,g,f,h,s,o),g=f=h=null),zr(r,!0,-1),y=r.input.charCodeAt(r.position)),r.lineIndent>e&&y!==0)ft(r,"bad indentation of a mapping entry");else if(r.lineIndente?l=1:r.lineIndent===e?l=0:r.lineIndente?l=1:r.lineIndent===e?l=0:r.lineIndent tag; it should be "scalar", not "'+r.kind+'"'),g=0,f=r.implicitTypes.length;g tag; it should be "'+h.kind+'", not "'+r.kind+'"'),h.resolve(r.result)?(r.result=h.construct(r.result),r.anchor!==null&&(r.anchorMap[r.anchor]=r.result)):ft(r,"cannot resolve a node with !<"+r.tag+"> explicit tag")):ft(r,"unknown tag !<"+r.tag+">");return r.listener!==null&&r.listener("close",r),r.tag!==null||r.anchor!==null||u}function wpe(r){var e=r.position,t,i,n,s=!1,o;for(r.version=null,r.checkLineBreaks=r.legacy,r.tagMap={},r.anchorMap={};(o=r.input.charCodeAt(r.position))!==0&&(zr(r,!0,-1),o=r.input.charCodeAt(r.position),!(r.lineIndent>0||o!==37));){for(s=!0,o=r.input.charCodeAt(++r.position),t=r.position;o!==0&&!fn(o);)o=r.input.charCodeAt(++r.position);for(i=r.input.slice(t,r.position),n=[],i.length<1&&ft(r,"directive name must not be less than one character in length");o!==0;){for(;sc(o);)o=r.input.charCodeAt(++r.position);if(o===35){do o=r.input.charCodeAt(++r.position);while(o!==0&&!vo(o));break}if(vo(o))break;for(t=r.position;o!==0&&!fn(o);)o=r.input.charCodeAt(++r.position);n.push(r.input.slice(t,r.position))}o!==0&&WS(r),RA.call(C2,i)?C2[i](r,i,n):yI(r,'unknown document directive "'+i+'"')}if(zr(r,!0,-1),r.lineIndent===0&&r.input.charCodeAt(r.position)===45&&r.input.charCodeAt(r.position+1)===45&&r.input.charCodeAt(r.position+2)===45?(r.position+=3,zr(r,!0,-1)):s&&ft(r,"directives end mark is expected"),Kg(r,r.lineIndent-1,II,!1,!0),zr(r,!0,-1),r.checkLineBreaks&&ope.test(r.input.slice(e,r.position))&&yI(r,"non-ASCII line breaks are interpreted as content"),r.documents.push(r.result),r.position===r.lineStart&&wI(r)){r.input.charCodeAt(r.position)===46&&(r.position+=3,zr(r,!0,-1));return}if(r.position"u"&&(t=e,e=null);var i=P2(r,t);if(typeof e!="function")return i;for(var n=0,s=i.length;n"u"&&(t=e,e=null),D2(r,e,Ba.extend({schema:y2},t))}function bpe(r,e){return k2(r,Ba.extend({schema:y2},e))}Zp.exports.loadAll=D2;Zp.exports.load=k2;Zp.exports.safeLoadAll=Bpe;Zp.exports.safeLoad=bpe});var tH=w((ZZe,_S)=>{"use strict";var $p=tc(),ed=Ng(),Qpe=Xp(),Spe=Lg(),U2=Object.prototype.toString,H2=Object.prototype.hasOwnProperty,vpe=9,_p=10,xpe=13,Ppe=32,Dpe=33,kpe=34,G2=35,Rpe=37,Fpe=38,Npe=39,Tpe=42,Y2=44,Lpe=45,j2=58,Mpe=61,Ope=62,Kpe=63,Upe=64,q2=91,J2=93,Hpe=96,W2=123,Gpe=124,z2=125,Ni={};Ni[0]="\\0";Ni[7]="\\a";Ni[8]="\\b";Ni[9]="\\t";Ni[10]="\\n";Ni[11]="\\v";Ni[12]="\\f";Ni[13]="\\r";Ni[27]="\\e";Ni[34]='\\"';Ni[92]="\\\\";Ni[133]="\\N";Ni[160]="\\_";Ni[8232]="\\L";Ni[8233]="\\P";var Ype=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function jpe(r,e){var t,i,n,s,o,a,l;if(e===null)return{};for(t={},i=Object.keys(e),n=0,s=i.length;n0?r.charCodeAt(s-1):null,f=f&&T2(o,a)}else{for(s=0;si&&r[g+1]!==" ",g=s);else if(!Ug(o))return BI;a=s>0?r.charCodeAt(s-1):null,f=f&&T2(o,a)}c=c||u&&s-g-1>i&&r[g+1]!==" "}return!l&&!c?f&&!n(r)?X2:Z2:t>9&&V2(r)?BI:c?$2:_2}function Xpe(r,e,t,i){r.dump=function(){if(e.length===0)return"''";if(!r.noCompatMode&&Ype.indexOf(e)!==-1)return"'"+e+"'";var n=r.indent*Math.max(1,t),s=r.lineWidth===-1?-1:Math.max(Math.min(r.lineWidth,40),r.lineWidth-n),o=i||r.flowLevel>-1&&t>=r.flowLevel;function a(l){return Jpe(r,l)}switch(Vpe(e,o,r.indent,s,a)){case X2:return e;case Z2:return"'"+e.replace(/'/g,"''")+"'";case _2:return"|"+L2(e,r.indent)+M2(N2(e,n));case $2:return">"+L2(e,r.indent)+M2(N2(Zpe(e,s),n));case BI:return'"'+_pe(e,s)+'"';default:throw new ed("impossible error: invalid scalar style")}}()}function L2(r,e){var t=V2(r)?String(e):"",i=r[r.length-1]===` +`,n=i&&(r[r.length-2]===` +`||r===` +`),s=n?"+":i?"":"-";return t+s+` +`}function M2(r){return r[r.length-1]===` +`?r.slice(0,-1):r}function Zpe(r,e){for(var t=/(\n+)([^\n]*)/g,i=function(){var c=r.indexOf(` +`);return c=c!==-1?c:r.length,t.lastIndex=c,O2(r.slice(0,c),e)}(),n=r[0]===` +`||r[0]===" ",s,o;o=t.exec(r);){var a=o[1],l=o[2];s=l[0]===" ",i+=a+(!n&&!s&&l!==""?` +`:"")+O2(l,e),n=s}return i}function O2(r,e){if(r===""||r[0]===" ")return r;for(var t=/ [^ ]/g,i,n=0,s,o=0,a=0,l="";i=t.exec(r);)a=i.index,a-n>e&&(s=o>n?o:a,l+=` +`+r.slice(n,s),n=s+1),o=a;return l+=` +`,r.length-n>e&&o>n?l+=r.slice(n,o)+` +`+r.slice(o+1):l+=r.slice(n),l.slice(1)}function _pe(r){for(var e="",t,i,n,s=0;s=55296&&t<=56319&&(i=r.charCodeAt(s+1),i>=56320&&i<=57343)){e+=F2((t-55296)*1024+i-56320+65536),s++;continue}n=Ni[t],e+=!n&&Ug(t)?r[s]:n||F2(t)}return e}function $pe(r,e,t){var i="",n=r.tag,s,o;for(s=0,o=t.length;s1024&&(u+="? "),u+=r.dump+(r.condenseFlow?'"':"")+":"+(r.condenseFlow?"":" "),oc(r,e,c,!1,!1)&&(u+=r.dump,i+=u));r.tag=n,r.dump="{"+i+"}"}function rde(r,e,t,i){var n="",s=r.tag,o=Object.keys(t),a,l,c,u,g,f;if(r.sortKeys===!0)o.sort();else if(typeof r.sortKeys=="function")o.sort(r.sortKeys);else if(r.sortKeys)throw new ed("sortKeys must be a boolean or a function");for(a=0,l=o.length;a1024,g&&(r.dump&&_p===r.dump.charCodeAt(0)?f+="?":f+="? "),f+=r.dump,g&&(f+=VS(r,e)),oc(r,e+1,u,!0,g)&&(r.dump&&_p===r.dump.charCodeAt(0)?f+=":":f+=": ",f+=r.dump,n+=f));r.tag=s,r.dump=n||"{}"}function K2(r,e,t){var i,n,s,o,a,l;for(n=t?r.explicitTypes:r.implicitTypes,s=0,o=n.length;s tag resolver accepts not "'+l+'" style');r.dump=i}return!0}return!1}function oc(r,e,t,i,n,s){r.tag=null,r.dump=t,K2(r,t,!1)||K2(r,t,!0);var o=U2.call(r.dump);i&&(i=r.flowLevel<0||r.flowLevel>e);var a=o==="[object Object]"||o==="[object Array]",l,c;if(a&&(l=r.duplicates.indexOf(t),c=l!==-1),(r.tag!==null&&r.tag!=="?"||c||r.indent!==2&&e>0)&&(n=!1),c&&r.usedDuplicates[l])r.dump="*ref_"+l;else{if(a&&c&&!r.usedDuplicates[l]&&(r.usedDuplicates[l]=!0),o==="[object Object]")i&&Object.keys(r.dump).length!==0?(rde(r,e,r.dump,n),c&&(r.dump="&ref_"+l+r.dump)):(tde(r,e,r.dump),c&&(r.dump="&ref_"+l+" "+r.dump));else if(o==="[object Array]"){var u=r.noArrayIndent&&e>0?e-1:e;i&&r.dump.length!==0?(ede(r,u,r.dump,n),c&&(r.dump="&ref_"+l+r.dump)):($pe(r,u,r.dump),c&&(r.dump="&ref_"+l+" "+r.dump))}else if(o==="[object String]")r.tag!=="?"&&Xpe(r,r.dump,e,s);else{if(r.skipInvalid)return!1;throw new ed("unacceptable kind of an object to dump "+o)}r.tag!==null&&r.tag!=="?"&&(r.dump="!<"+r.tag+"> "+r.dump)}return!0}function ide(r,e){var t=[],i=[],n,s;for(XS(r,t,i),n=0,s=i.length;n{"use strict";var bI=R2(),rH=tH();function QI(r){return function(){throw new Error("Function "+r+" is deprecated and cannot be used.")}}Fr.exports.Type=si();Fr.exports.Schema=rc();Fr.exports.FAILSAFE_SCHEMA=CI();Fr.exports.JSON_SCHEMA=YS();Fr.exports.CORE_SCHEMA=jS();Fr.exports.DEFAULT_SAFE_SCHEMA=Lg();Fr.exports.DEFAULT_FULL_SCHEMA=Xp();Fr.exports.load=bI.load;Fr.exports.loadAll=bI.loadAll;Fr.exports.safeLoad=bI.safeLoad;Fr.exports.safeLoadAll=bI.safeLoadAll;Fr.exports.dump=rH.dump;Fr.exports.safeDump=rH.safeDump;Fr.exports.YAMLException=Ng();Fr.exports.MINIMAL_SCHEMA=CI();Fr.exports.SAFE_SCHEMA=Lg();Fr.exports.DEFAULT_SCHEMA=Xp();Fr.exports.scan=QI("scan");Fr.exports.parse=QI("parse");Fr.exports.compose=QI("compose");Fr.exports.addConstructor=QI("addConstructor")});var sH=w(($Ze,nH)=>{"use strict";var sde=iH();nH.exports=sde});var aH=w((e_e,oH)=>{"use strict";function ode(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function ac(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ac)}ode(ac,Error);ac.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g({[Ke]:Ce})))},H=function(R){return R},j=function(R){return R},$=Us("correct indentation"),V=" ",W=ar(" ",!1),_=function(R){return R.length===QA*yg},A=function(R){return R.length===(QA+1)*yg},Ae=function(){return QA++,!0},ge=function(){return QA--,!0},re=function(){return pg()},M=Us("pseudostring"),F=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,ue=Tn(["\r",` +`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),pe=/^[^\r\n\t ,\][{}:#"']/,ke=Tn(["\r",` +`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),Fe=function(){return pg().replace(/^ *| *$/g,"")},Ne="--",oe=ar("--",!1),le=/^[a-zA-Z\/0-9]/,Be=Tn([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),fe=/^[^\r\n\t :,]/,ae=Tn(["\r",` +`," "," ",":",","],!0,!1),qe="null",ne=ar("null",!1),Y=function(){return null},he="true",ie=ar("true",!1),de=function(){return!0},_e="false",Pt=ar("false",!1),It=function(){return!1},Mr=Us("string"),ii='"',gi=ar('"',!1),hr=function(){return""},fi=function(R){return R},ni=function(R){return R.join("")},Ks=/^[^"\\\0-\x1F\x7F]/,pr=Tn(['"',"\\",["\0",""],"\x7F"],!0,!1),Ii='\\"',rs=ar('\\"',!1),fa=function(){return'"'},CA="\\\\",cg=ar("\\\\",!1),is=function(){return"\\"},mA="\\/",ha=ar("\\/",!1),wp=function(){return"/"},EA="\\b",IA=ar("\\b",!1),wr=function(){return"\b"},Tl="\\f",ug=ar("\\f",!1),Io=function(){return"\f"},gg="\\n",Bp=ar("\\n",!1),bp=function(){return` +`},vr="\\r",se=ar("\\r",!1),yo=function(){return"\r"},Fn="\\t",fg=ar("\\t",!1),bt=function(){return" "},Ll="\\u",Nn=ar("\\u",!1),ns=function(R,q,Ce,Ke){return String.fromCharCode(parseInt(`0x${R}${q}${Ce}${Ke}`))},ss=/^[0-9a-fA-F]/,gt=Tn([["0","9"],["a","f"],["A","F"]],!1,!1),wo=Us("blank space"),At=/^[ \t]/,ln=Tn([" "," "],!1,!1),S=Us("white space"),Lt=/^[ \t\n\r]/,hg=Tn([" "," ",` +`,"\r"],!1,!1),Ml=`\r +`,Qp=ar(`\r +`,!1),Sp=` +`,vp=ar(` +`,!1),xp="\r",Pp=ar("\r",!1),G=0,yt=0,yA=[{line:1,column:1}],zi=0,Ol=[],Xe=0,pa;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function pg(){return r.substring(yt,G)}function ME(){return cn(yt,G)}function Dp(R,q){throw q=q!==void 0?q:cn(yt,G),Ul([Us(R)],r.substring(yt,G),q)}function OE(R,q){throw q=q!==void 0?q:cn(yt,G),dg(R,q)}function ar(R,q){return{type:"literal",text:R,ignoreCase:q}}function Tn(R,q,Ce){return{type:"class",parts:R,inverted:q,ignoreCase:Ce}}function Kl(){return{type:"any"}}function kp(){return{type:"end"}}function Us(R){return{type:"other",description:R}}function da(R){var q=yA[R],Ce;if(q)return q;for(Ce=R-1;!yA[Ce];)Ce--;for(q=yA[Ce],q={line:q.line,column:q.column};Cezi&&(zi=G,Ol=[]),Ol.push(R))}function dg(R,q){return new ac(R,null,null,q)}function Ul(R,q,Ce){return new ac(ac.buildMessage(R,q),R,q,Ce)}function Hs(){var R;return R=Cg(),R}function Hl(){var R,q,Ce;for(R=G,q=[],Ce=wA();Ce!==t;)q.push(Ce),Ce=wA();return q!==t&&(yt=R,q=s(q)),R=q,R}function wA(){var R,q,Ce,Ke,Re;return R=G,q=ma(),q!==t?(r.charCodeAt(G)===45?(Ce=o,G++):(Ce=t,Xe===0&&Le(a)),Ce!==t?(Ke=Rr(),Ke!==t?(Re=Ca(),Re!==t?(yt=R,q=l(Re),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R}function Cg(){var R,q,Ce;for(R=G,q=[],Ce=mg();Ce!==t;)q.push(Ce),Ce=mg();return q!==t&&(yt=R,q=c(q)),R=q,R}function mg(){var R,q,Ce,Ke,Re,ze,dt,Ft,Ln;if(R=G,q=Rr(),q===t&&(q=null),q!==t){if(Ce=G,r.charCodeAt(G)===35?(Ke=u,G++):(Ke=t,Xe===0&&Le(g)),Ke!==t){if(Re=[],ze=G,dt=G,Xe++,Ft=js(),Xe--,Ft===t?dt=void 0:(G=dt,dt=t),dt!==t?(r.length>G?(Ft=r.charAt(G),G++):(Ft=t,Xe===0&&Le(f)),Ft!==t?(dt=[dt,Ft],ze=dt):(G=ze,ze=t)):(G=ze,ze=t),ze!==t)for(;ze!==t;)Re.push(ze),ze=G,dt=G,Xe++,Ft=js(),Xe--,Ft===t?dt=void 0:(G=dt,dt=t),dt!==t?(r.length>G?(Ft=r.charAt(G),G++):(Ft=t,Xe===0&&Le(f)),Ft!==t?(dt=[dt,Ft],ze=dt):(G=ze,ze=t)):(G=ze,ze=t);else Re=t;Re!==t?(Ke=[Ke,Re],Ce=Ke):(G=Ce,Ce=t)}else G=Ce,Ce=t;if(Ce===t&&(Ce=null),Ce!==t){if(Ke=[],Re=Ys(),Re!==t)for(;Re!==t;)Ke.push(Re),Re=Ys();else Ke=t;Ke!==t?(yt=R,q=h(),R=q):(G=R,R=t)}else G=R,R=t}else G=R,R=t;if(R===t&&(R=G,q=ma(),q!==t?(Ce=Gl(),Ce!==t?(Ke=Rr(),Ke===t&&(Ke=null),Ke!==t?(r.charCodeAt(G)===58?(Re=p,G++):(Re=t,Xe===0&&Le(C)),Re!==t?(ze=Rr(),ze===t&&(ze=null),ze!==t?(dt=Ca(),dt!==t?(yt=R,q=y(Ce,dt),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,q=ma(),q!==t?(Ce=Gs(),Ce!==t?(Ke=Rr(),Ke===t&&(Ke=null),Ke!==t?(r.charCodeAt(G)===58?(Re=p,G++):(Re=t,Xe===0&&Le(C)),Re!==t?(ze=Rr(),ze===t&&(ze=null),ze!==t?(dt=Ca(),dt!==t?(yt=R,q=y(Ce,dt),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t))){if(R=G,q=ma(),q!==t)if(Ce=Gs(),Ce!==t)if(Ke=Rr(),Ke!==t)if(Re=KE(),Re!==t){if(ze=[],dt=Ys(),dt!==t)for(;dt!==t;)ze.push(dt),dt=Ys();else ze=t;ze!==t?(yt=R,q=y(Ce,Re),R=q):(G=R,R=t)}else G=R,R=t;else G=R,R=t;else G=R,R=t;else G=R,R=t;if(R===t)if(R=G,q=ma(),q!==t)if(Ce=Gs(),Ce!==t){if(Ke=[],Re=G,ze=Rr(),ze===t&&(ze=null),ze!==t?(r.charCodeAt(G)===44?(dt=B,G++):(dt=t,Xe===0&&Le(v)),dt!==t?(Ft=Rr(),Ft===t&&(Ft=null),Ft!==t?(Ln=Gs(),Ln!==t?(yt=Re,ze=D(Ce,Ln),Re=ze):(G=Re,Re=t)):(G=Re,Re=t)):(G=Re,Re=t)):(G=Re,Re=t),Re!==t)for(;Re!==t;)Ke.push(Re),Re=G,ze=Rr(),ze===t&&(ze=null),ze!==t?(r.charCodeAt(G)===44?(dt=B,G++):(dt=t,Xe===0&&Le(v)),dt!==t?(Ft=Rr(),Ft===t&&(Ft=null),Ft!==t?(Ln=Gs(),Ln!==t?(yt=Re,ze=D(Ce,Ln),Re=ze):(G=Re,Re=t)):(G=Re,Re=t)):(G=Re,Re=t)):(G=Re,Re=t);else Ke=t;Ke!==t?(Re=Rr(),Re===t&&(Re=null),Re!==t?(r.charCodeAt(G)===58?(ze=p,G++):(ze=t,Xe===0&&Le(C)),ze!==t?(dt=Rr(),dt===t&&(dt=null),dt!==t?(Ft=Ca(),Ft!==t?(yt=R,q=T(Ce,Ke,Ft),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)}else G=R,R=t;else G=R,R=t}return R}function Ca(){var R,q,Ce,Ke,Re,ze,dt;if(R=G,q=G,Xe++,Ce=G,Ke=js(),Ke!==t?(Re=rt(),Re!==t?(r.charCodeAt(G)===45?(ze=o,G++):(ze=t,Xe===0&&Le(a)),ze!==t?(dt=Rr(),dt!==t?(Ke=[Ke,Re,ze,dt],Ce=Ke):(G=Ce,Ce=t)):(G=Ce,Ce=t)):(G=Ce,Ce=t)):(G=Ce,Ce=t),Xe--,Ce!==t?(G=q,q=void 0):q=t,q!==t?(Ce=Ys(),Ce!==t?(Ke=Bo(),Ke!==t?(Re=Hl(),Re!==t?(ze=BA(),ze!==t?(yt=R,q=H(Re),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,q=js(),q!==t?(Ce=Bo(),Ce!==t?(Ke=Cg(),Ke!==t?(Re=BA(),Re!==t?(yt=R,q=H(Ke),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t))if(R=G,q=Yl(),q!==t){if(Ce=[],Ke=Ys(),Ke!==t)for(;Ke!==t;)Ce.push(Ke),Ke=Ys();else Ce=t;Ce!==t?(yt=R,q=j(q),R=q):(G=R,R=t)}else G=R,R=t;return R}function ma(){var R,q,Ce;for(Xe++,R=G,q=[],r.charCodeAt(G)===32?(Ce=V,G++):(Ce=t,Xe===0&&Le(W));Ce!==t;)q.push(Ce),r.charCodeAt(G)===32?(Ce=V,G++):(Ce=t,Xe===0&&Le(W));return q!==t?(yt=G,Ce=_(q),Ce?Ce=void 0:Ce=t,Ce!==t?(q=[q,Ce],R=q):(G=R,R=t)):(G=R,R=t),Xe--,R===t&&(q=t,Xe===0&&Le($)),R}function rt(){var R,q,Ce;for(R=G,q=[],r.charCodeAt(G)===32?(Ce=V,G++):(Ce=t,Xe===0&&Le(W));Ce!==t;)q.push(Ce),r.charCodeAt(G)===32?(Ce=V,G++):(Ce=t,Xe===0&&Le(W));return q!==t?(yt=G,Ce=A(q),Ce?Ce=void 0:Ce=t,Ce!==t?(q=[q,Ce],R=q):(G=R,R=t)):(G=R,R=t),R}function Bo(){var R;return yt=G,R=Ae(),R?R=void 0:R=t,R}function BA(){var R;return yt=G,R=ge(),R?R=void 0:R=t,R}function Gl(){var R;return R=jl(),R===t&&(R=Rp()),R}function Gs(){var R,q,Ce;if(R=jl(),R===t){if(R=G,q=[],Ce=Eg(),Ce!==t)for(;Ce!==t;)q.push(Ce),Ce=Eg();else q=t;q!==t&&(yt=R,q=re()),R=q}return R}function Yl(){var R;return R=Fp(),R===t&&(R=UE(),R===t&&(R=jl(),R===t&&(R=Rp()))),R}function KE(){var R;return R=Fp(),R===t&&(R=jl(),R===t&&(R=Eg())),R}function Rp(){var R,q,Ce,Ke,Re,ze;if(Xe++,R=G,F.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,Xe===0&&Le(ue)),q!==t){for(Ce=[],Ke=G,Re=Rr(),Re===t&&(Re=null),Re!==t?(pe.test(r.charAt(G))?(ze=r.charAt(G),G++):(ze=t,Xe===0&&Le(ke)),ze!==t?(Re=[Re,ze],Ke=Re):(G=Ke,Ke=t)):(G=Ke,Ke=t);Ke!==t;)Ce.push(Ke),Ke=G,Re=Rr(),Re===t&&(Re=null),Re!==t?(pe.test(r.charAt(G))?(ze=r.charAt(G),G++):(ze=t,Xe===0&&Le(ke)),ze!==t?(Re=[Re,ze],Ke=Re):(G=Ke,Ke=t)):(G=Ke,Ke=t);Ce!==t?(yt=R,q=Fe(),R=q):(G=R,R=t)}else G=R,R=t;return Xe--,R===t&&(q=t,Xe===0&&Le(M)),R}function Eg(){var R,q,Ce,Ke,Re;if(R=G,r.substr(G,2)===Ne?(q=Ne,G+=2):(q=t,Xe===0&&Le(oe)),q===t&&(q=null),q!==t)if(le.test(r.charAt(G))?(Ce=r.charAt(G),G++):(Ce=t,Xe===0&&Le(Be)),Ce!==t){for(Ke=[],fe.test(r.charAt(G))?(Re=r.charAt(G),G++):(Re=t,Xe===0&&Le(ae));Re!==t;)Ke.push(Re),fe.test(r.charAt(G))?(Re=r.charAt(G),G++):(Re=t,Xe===0&&Le(ae));Ke!==t?(yt=R,q=Fe(),R=q):(G=R,R=t)}else G=R,R=t;else G=R,R=t;return R}function Fp(){var R,q;return R=G,r.substr(G,4)===qe?(q=qe,G+=4):(q=t,Xe===0&&Le(ne)),q!==t&&(yt=R,q=Y()),R=q,R}function UE(){var R,q;return R=G,r.substr(G,4)===he?(q=he,G+=4):(q=t,Xe===0&&Le(ie)),q!==t&&(yt=R,q=de()),R=q,R===t&&(R=G,r.substr(G,5)===_e?(q=_e,G+=5):(q=t,Xe===0&&Le(Pt)),q!==t&&(yt=R,q=It()),R=q),R}function jl(){var R,q,Ce,Ke;return Xe++,R=G,r.charCodeAt(G)===34?(q=ii,G++):(q=t,Xe===0&&Le(gi)),q!==t?(r.charCodeAt(G)===34?(Ce=ii,G++):(Ce=t,Xe===0&&Le(gi)),Ce!==t?(yt=R,q=hr(),R=q):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,r.charCodeAt(G)===34?(q=ii,G++):(q=t,Xe===0&&Le(gi)),q!==t?(Ce=HE(),Ce!==t?(r.charCodeAt(G)===34?(Ke=ii,G++):(Ke=t,Xe===0&&Le(gi)),Ke!==t?(yt=R,q=fi(Ce),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)),Xe--,R===t&&(q=t,Xe===0&&Le(Mr)),R}function HE(){var R,q,Ce;if(R=G,q=[],Ce=Ig(),Ce!==t)for(;Ce!==t;)q.push(Ce),Ce=Ig();else q=t;return q!==t&&(yt=R,q=ni(q)),R=q,R}function Ig(){var R,q,Ce,Ke,Re,ze;return Ks.test(r.charAt(G))?(R=r.charAt(G),G++):(R=t,Xe===0&&Le(pr)),R===t&&(R=G,r.substr(G,2)===Ii?(q=Ii,G+=2):(q=t,Xe===0&&Le(rs)),q!==t&&(yt=R,q=fa()),R=q,R===t&&(R=G,r.substr(G,2)===CA?(q=CA,G+=2):(q=t,Xe===0&&Le(cg)),q!==t&&(yt=R,q=is()),R=q,R===t&&(R=G,r.substr(G,2)===mA?(q=mA,G+=2):(q=t,Xe===0&&Le(ha)),q!==t&&(yt=R,q=wp()),R=q,R===t&&(R=G,r.substr(G,2)===EA?(q=EA,G+=2):(q=t,Xe===0&&Le(IA)),q!==t&&(yt=R,q=wr()),R=q,R===t&&(R=G,r.substr(G,2)===Tl?(q=Tl,G+=2):(q=t,Xe===0&&Le(ug)),q!==t&&(yt=R,q=Io()),R=q,R===t&&(R=G,r.substr(G,2)===gg?(q=gg,G+=2):(q=t,Xe===0&&Le(Bp)),q!==t&&(yt=R,q=bp()),R=q,R===t&&(R=G,r.substr(G,2)===vr?(q=vr,G+=2):(q=t,Xe===0&&Le(se)),q!==t&&(yt=R,q=yo()),R=q,R===t&&(R=G,r.substr(G,2)===Fn?(q=Fn,G+=2):(q=t,Xe===0&&Le(fg)),q!==t&&(yt=R,q=bt()),R=q,R===t&&(R=G,r.substr(G,2)===Ll?(q=Ll,G+=2):(q=t,Xe===0&&Le(Nn)),q!==t?(Ce=bA(),Ce!==t?(Ke=bA(),Ke!==t?(Re=bA(),Re!==t?(ze=bA(),ze!==t?(yt=R,q=ns(Ce,Ke,Re,ze),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)))))))))),R}function bA(){var R;return ss.test(r.charAt(G))?(R=r.charAt(G),G++):(R=t,Xe===0&&Le(gt)),R}function Rr(){var R,q;if(Xe++,R=[],At.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,Xe===0&&Le(ln)),q!==t)for(;q!==t;)R.push(q),At.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,Xe===0&&Le(ln));else R=t;return Xe--,R===t&&(q=t,Xe===0&&Le(wo)),R}function GE(){var R,q;if(Xe++,R=[],Lt.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,Xe===0&&Le(hg)),q!==t)for(;q!==t;)R.push(q),Lt.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,Xe===0&&Le(hg));else R=t;return Xe--,R===t&&(q=t,Xe===0&&Le(S)),R}function Ys(){var R,q,Ce,Ke,Re,ze;if(R=G,q=js(),q!==t){for(Ce=[],Ke=G,Re=Rr(),Re===t&&(Re=null),Re!==t?(ze=js(),ze!==t?(Re=[Re,ze],Ke=Re):(G=Ke,Ke=t)):(G=Ke,Ke=t);Ke!==t;)Ce.push(Ke),Ke=G,Re=Rr(),Re===t&&(Re=null),Re!==t?(ze=js(),ze!==t?(Re=[Re,ze],Ke=Re):(G=Ke,Ke=t)):(G=Ke,Ke=t);Ce!==t?(q=[q,Ce],R=q):(G=R,R=t)}else G=R,R=t;return R}function js(){var R;return r.substr(G,2)===Ml?(R=Ml,G+=2):(R=t,Xe===0&&Le(Qp)),R===t&&(r.charCodeAt(G)===10?(R=Sp,G++):(R=t,Xe===0&&Le(vp)),R===t&&(r.charCodeAt(G)===13?(R=xp,G++):(R=t,Xe===0&&Le(Pp)))),R}let yg=2,QA=0;if(pa=n(),pa!==t&&G===r.length)return pa;throw pa!==t&&G{"use strict";var gde=r=>{let e=!1,t=!1,i=!1;for(let n=0;n{if(!(typeof r=="string"||Array.isArray(r)))throw new TypeError("Expected the input to be `string | string[]`");e=Object.assign({pascalCase:!1},e);let t=n=>e.pascalCase?n.charAt(0).toUpperCase()+n.slice(1):n;return Array.isArray(r)?r=r.map(n=>n.trim()).filter(n=>n.length).join("-"):r=r.trim(),r.length===0?"":r.length===1?e.pascalCase?r.toUpperCase():r.toLowerCase():(r!==r.toLowerCase()&&(r=gde(r)),r=r.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(n,s)=>s.toUpperCase()).replace(/\d+(\w|$)/g,n=>n.toUpperCase()),t(r))};ev.exports=gH;ev.exports.default=gH});var hH=w((o_e,fde)=>{fde.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vercel",constant:"VERCEL",env:"NOW_BUILDER"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"}]});var Ac=w(Un=>{"use strict";var dH=hH(),xo=process.env;Object.defineProperty(Un,"_vendors",{value:dH.map(function(r){return r.constant})});Un.name=null;Un.isPR=null;dH.forEach(function(r){let t=(Array.isArray(r.env)?r.env:[r.env]).every(function(i){return pH(i)});if(Un[r.constant]=t,t)switch(Un.name=r.name,typeof r.pr){case"string":Un.isPR=!!xo[r.pr];break;case"object":"env"in r.pr?Un.isPR=r.pr.env in xo&&xo[r.pr.env]!==r.pr.ne:"any"in r.pr?Un.isPR=r.pr.any.some(function(i){return!!xo[i]}):Un.isPR=pH(r.pr);break;default:Un.isPR=null}});Un.isCI=!!(xo.CI||xo.CONTINUOUS_INTEGRATION||xo.BUILD_NUMBER||xo.RUN_ID||Un.name);function pH(r){return typeof r=="string"?!!xo[r]:Object.keys(r).every(function(e){return xo[e]===r[e]})}});var hn={};ut(hn,{KeyRelationship:()=>lc,applyCascade:()=>od,base64RegExp:()=>yH,colorStringAlphaRegExp:()=>IH,colorStringRegExp:()=>EH,computeKey:()=>FA,getPrintable:()=>Vr,hasExactLength:()=>SH,hasForbiddenKeys:()=>qde,hasKeyRelationship:()=>av,hasMaxLength:()=>xde,hasMinLength:()=>vde,hasMutuallyExclusiveKeys:()=>Jde,hasRequiredKeys:()=>jde,hasUniqueItems:()=>Pde,isArray:()=>Ede,isAtLeast:()=>Rde,isAtMost:()=>Fde,isBase64:()=>Gde,isBoolean:()=>dde,isDate:()=>mde,isDict:()=>yde,isEnum:()=>Zi,isHexColor:()=>Hde,isISO8601:()=>Ude,isInExclusiveRange:()=>Tde,isInInclusiveRange:()=>Nde,isInstanceOf:()=>Bde,isInteger:()=>Lde,isJSON:()=>Yde,isLiteral:()=>hde,isLowerCase:()=>Mde,isNegative:()=>Dde,isNullable:()=>Sde,isNumber:()=>Cde,isObject:()=>wde,isOneOf:()=>bde,isOptional:()=>Qde,isPositive:()=>kde,isString:()=>sd,isTuple:()=>Ide,isUUID4:()=>Kde,isUnknown:()=>QH,isUpperCase:()=>Ode,iso8601RegExp:()=>ov,makeCoercionFn:()=>cc,makeSetter:()=>bH,makeTrait:()=>BH,makeValidator:()=>Qt,matchesRegExp:()=>ad,plural:()=>kI,pushError:()=>pt,simpleKeyRegExp:()=>mH,uuid4RegExp:()=>wH});function Qt({test:r}){return BH(r)()}function Vr(r){return r===null?"null":r===void 0?"undefined":r===""?"an empty string":JSON.stringify(r)}function FA(r,e){var t,i,n;return typeof e=="number"?`${(t=r==null?void 0:r.p)!==null&&t!==void 0?t:"."}[${e}]`:mH.test(e)?`${(i=r==null?void 0:r.p)!==null&&i!==void 0?i:""}.${e}`:`${(n=r==null?void 0:r.p)!==null&&n!==void 0?n:"."}[${JSON.stringify(e)}]`}function cc(r,e){return t=>{let i=r[e];return r[e]=t,cc(r,e).bind(null,i)}}function bH(r,e){return t=>{r[e]=t}}function kI(r,e,t){return r===1?e:t}function pt({errors:r,p:e}={},t){return r==null||r.push(`${e!=null?e:"."}: ${t}`),!1}function hde(r){return Qt({test:(e,t)=>e!==r?pt(t,`Expected a literal (got ${Vr(r)})`):!0})}function Zi(r){let e=Array.isArray(r)?r:Object.values(r),t=new Set(e);return Qt({test:(i,n)=>t.has(i)?!0:pt(n,`Expected a valid enumeration value (got ${Vr(i)})`)})}var mH,EH,IH,yH,wH,ov,BH,QH,sd,pde,dde,Cde,mde,Ede,Ide,yde,wde,Bde,bde,od,Qde,Sde,vde,xde,SH,Pde,Dde,kde,Rde,Fde,Nde,Tde,Lde,ad,Mde,Ode,Kde,Ude,Hde,Gde,Yde,jde,qde,Jde,lc,Wde,av,ls=Fge(()=>{mH=/^[a-zA-Z_][a-zA-Z0-9_]*$/,EH=/^#[0-9a-f]{6}$/i,IH=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,yH=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,wH=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,ov=/^(?:[1-9]\d{3}(-?)(?:(?:0[1-9]|1[0-2])\1(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])\1(?:29|30)|(?:0[13578]|1[02])(?:\1)31|00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[0-5]))|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\2)29|-?366))T(?:[01]\d|2[0-3])(:?)[0-5]\d(?:\3[0-5]\d)?(?:Z|[+-][01]\d(?:\3[0-5]\d)?)$/,BH=r=>()=>r;QH=()=>Qt({test:(r,e)=>!0});sd=()=>Qt({test:(r,e)=>typeof r!="string"?pt(e,`Expected a string (got ${Vr(r)})`):!0});pde=new Map([["true",!0],["True",!0],["1",!0],[1,!0],["false",!1],["False",!1],["0",!1],[0,!1]]),dde=()=>Qt({test:(r,e)=>{var t;if(typeof r!="boolean"){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i=pde.get(r);if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a boolean (got ${Vr(r)})`)}return!0}}),Cde=()=>Qt({test:(r,e)=>{var t;if(typeof r!="number"){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i;if(typeof r=="string"){let n;try{n=JSON.parse(r)}catch{}if(typeof n=="number")if(JSON.stringify(n)===r)i=n;else return pt(e,`Received a number that can't be safely represented by the runtime (${r})`)}if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a number (got ${Vr(r)})`)}return!0}}),mde=()=>Qt({test:(r,e)=>{var t;if(!(r instanceof Date)){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i;if(typeof r=="string"&&ov.test(r))i=new Date(r);else{let n;if(typeof r=="string"){let s;try{s=JSON.parse(r)}catch{}typeof s=="number"&&(n=s)}else typeof r=="number"&&(n=r);if(typeof n<"u")if(Number.isSafeInteger(n)||!Number.isSafeInteger(n*1e3))i=new Date(n*1e3);else return pt(e,`Received a timestamp that can't be safely represented by the runtime (${r})`)}if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a date (got ${Vr(r)})`)}return!0}}),Ede=(r,{delimiter:e}={})=>Qt({test:(t,i)=>{var n;if(typeof t=="string"&&typeof e<"u"&&typeof(i==null?void 0:i.coercions)<"u"){if(typeof(i==null?void 0:i.coercion)>"u")return pt(i,"Unbound coercion result");t=t.split(e),i.coercions.push([(n=i.p)!==null&&n!==void 0?n:".",i.coercion.bind(null,t)])}if(!Array.isArray(t))return pt(i,`Expected an array (got ${Vr(t)})`);let s=!0;for(let o=0,a=t.length;o{let t=SH(r.length);return Qt({test:(i,n)=>{var s;if(typeof i=="string"&&typeof e<"u"&&typeof(n==null?void 0:n.coercions)<"u"){if(typeof(n==null?void 0:n.coercion)>"u")return pt(n,"Unbound coercion result");i=i.split(e),n.coercions.push([(s=n.p)!==null&&s!==void 0?s:".",n.coercion.bind(null,i)])}if(!Array.isArray(i))return pt(n,`Expected a tuple (got ${Vr(i)})`);let o=t(i,Object.assign({},n));for(let a=0,l=i.length;aQt({test:(t,i)=>{if(typeof t!="object"||t===null)return pt(i,`Expected an object (got ${Vr(t)})`);let n=Object.keys(t),s=!0;for(let o=0,a=n.length;o{let t=Object.keys(r);return Qt({test:(i,n)=>{if(typeof i!="object"||i===null)return pt(n,`Expected an object (got ${Vr(i)})`);let s=new Set([...t,...Object.keys(i)]),o={},a=!0;for(let l of s){if(l==="constructor"||l==="__proto__")a=pt(Object.assign(Object.assign({},n),{p:FA(n,l)}),"Unsafe property name");else{let c=Object.prototype.hasOwnProperty.call(r,l)?r[l]:void 0,u=Object.prototype.hasOwnProperty.call(i,l)?i[l]:void 0;typeof c<"u"?a=c(u,Object.assign(Object.assign({},n),{p:FA(n,l),coercion:cc(i,l)}))&&a:e===null?a=pt(Object.assign(Object.assign({},n),{p:FA(n,l)}),`Extraneous property (got ${Vr(u)})`):Object.defineProperty(o,l,{enumerable:!0,get:()=>u,set:bH(i,l)})}if(!a&&(n==null?void 0:n.errors)==null)break}return e!==null&&(a||(n==null?void 0:n.errors)!=null)&&(a=e(o,n)&&a),a}})},Bde=r=>Qt({test:(e,t)=>e instanceof r?!0:pt(t,`Expected an instance of ${r.name} (got ${Vr(e)})`)}),bde=(r,{exclusive:e=!1}={})=>Qt({test:(t,i)=>{var n,s,o;let a=[],l=typeof(i==null?void 0:i.errors)<"u"?[]:void 0;for(let c=0,u=r.length;c1?pt(i,`Expected to match exactly a single predicate (matched ${a.join(", ")})`):(o=i==null?void 0:i.errors)===null||o===void 0||o.push(...l),!1}}),od=(r,e)=>Qt({test:(t,i)=>{var n,s;let o={value:t},a=typeof(i==null?void 0:i.coercions)<"u"?cc(o,"value"):void 0,l=typeof(i==null?void 0:i.coercions)<"u"?[]:void 0;if(!r(t,Object.assign(Object.assign({},i),{coercion:a,coercions:l})))return!1;let c=[];if(typeof l<"u")for(let[,u]of l)c.push(u());try{if(typeof(i==null?void 0:i.coercions)<"u"){if(o.value!==t){if(typeof(i==null?void 0:i.coercion)>"u")return pt(i,"Unbound coercion result");i.coercions.push([(n=i.p)!==null&&n!==void 0?n:".",i.coercion.bind(null,o.value)])}(s=i==null?void 0:i.coercions)===null||s===void 0||s.push(...l)}return e.every(u=>u(o.value,i))}finally{for(let u of c)u()}}}),Qde=r=>Qt({test:(e,t)=>typeof e>"u"?!0:r(e,t)}),Sde=r=>Qt({test:(e,t)=>e===null?!0:r(e,t)}),vde=r=>Qt({test:(e,t)=>e.length>=r?!0:pt(t,`Expected to have a length of at least ${r} elements (got ${e.length})`)}),xde=r=>Qt({test:(e,t)=>e.length<=r?!0:pt(t,`Expected to have a length of at most ${r} elements (got ${e.length})`)}),SH=r=>Qt({test:(e,t)=>e.length!==r?pt(t,`Expected to have a length of exactly ${r} elements (got ${e.length})`):!0}),Pde=({map:r}={})=>Qt({test:(e,t)=>{let i=new Set,n=new Set;for(let s=0,o=e.length;sQt({test:(r,e)=>r<=0?!0:pt(e,`Expected to be negative (got ${r})`)}),kde=()=>Qt({test:(r,e)=>r>=0?!0:pt(e,`Expected to be positive (got ${r})`)}),Rde=r=>Qt({test:(e,t)=>e>=r?!0:pt(t,`Expected to be at least ${r} (got ${e})`)}),Fde=r=>Qt({test:(e,t)=>e<=r?!0:pt(t,`Expected to be at most ${r} (got ${e})`)}),Nde=(r,e)=>Qt({test:(t,i)=>t>=r&&t<=e?!0:pt(i,`Expected to be in the [${r}; ${e}] range (got ${t})`)}),Tde=(r,e)=>Qt({test:(t,i)=>t>=r&&tQt({test:(e,t)=>e!==Math.round(e)?pt(t,`Expected to be an integer (got ${e})`):Number.isSafeInteger(e)?!0:pt(t,`Expected to be a safe integer (got ${e})`)}),ad=r=>Qt({test:(e,t)=>r.test(e)?!0:pt(t,`Expected to match the pattern ${r.toString()} (got ${Vr(e)})`)}),Mde=()=>Qt({test:(r,e)=>r!==r.toLowerCase()?pt(e,`Expected to be all-lowercase (got ${r})`):!0}),Ode=()=>Qt({test:(r,e)=>r!==r.toUpperCase()?pt(e,`Expected to be all-uppercase (got ${r})`):!0}),Kde=()=>Qt({test:(r,e)=>wH.test(r)?!0:pt(e,`Expected to be a valid UUID v4 (got ${Vr(r)})`)}),Ude=()=>Qt({test:(r,e)=>ov.test(r)?!1:pt(e,`Expected to be a valid ISO 8601 date string (got ${Vr(r)})`)}),Hde=({alpha:r=!1})=>Qt({test:(e,t)=>(r?EH.test(e):IH.test(e))?!0:pt(t,`Expected to be a valid hexadecimal color string (got ${Vr(e)})`)}),Gde=()=>Qt({test:(r,e)=>yH.test(r)?!0:pt(e,`Expected to be a valid base 64 string (got ${Vr(r)})`)}),Yde=(r=QH())=>Qt({test:(e,t)=>{let i;try{i=JSON.parse(e)}catch{return pt(t,`Expected to be a valid JSON string (got ${Vr(e)})`)}return r(i,t)}}),jde=r=>{let e=new Set(r);return Qt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)||s.push(o);return s.length>0?pt(i,`Missing required ${kI(s.length,"property","properties")} ${s.map(o=>`"${o}"`).join(", ")}`):!0}})},qde=r=>{let e=new Set(r);return Qt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)&&s.push(o);return s.length>0?pt(i,`Forbidden ${kI(s.length,"property","properties")} ${s.map(o=>`"${o}"`).join(", ")}`):!0}})},Jde=r=>{let e=new Set(r);return Qt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)&&s.push(o);return s.length>1?pt(i,`Mutually exclusive properties ${s.map(o=>`"${o}"`).join(", ")}`):!0}})};(function(r){r.Forbids="Forbids",r.Requires="Requires"})(lc||(lc={}));Wde={[lc.Forbids]:{expect:!1,message:"forbids using"},[lc.Requires]:{expect:!0,message:"requires using"}},av=(r,e,t,{ignore:i=[]}={})=>{let n=new Set(i),s=new Set(t),o=Wde[e];return Qt({test:(a,l)=>{let c=new Set(Object.keys(a));if(!c.has(r)||n.has(a[r]))return!0;let u=[];for(let g of s)(c.has(g)&&!n.has(a[g]))!==o.expect&&u.push(g);return u.length>=1?pt(l,`Property "${r}" ${o.message} ${kI(u.length,"property","properties")} ${u.map(g=>`"${g}"`).join(", ")}`):!0}})}});var YH=w((o$e,GH)=>{"use strict";GH.exports=(r,...e)=>new Promise(t=>{t(r(...e))})});var Jg=w((a$e,pv)=>{"use strict";var cCe=YH(),jH=r=>{if(r<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=[],t=0,i=()=>{t--,e.length>0&&e.shift()()},n=(a,l,...c)=>{t++;let u=cCe(a,...c);l(u),u.then(i,i)},s=(a,l,...c)=>{tnew Promise(c=>s(a,c,...l));return Object.defineProperties(o,{activeCount:{get:()=>t},pendingCount:{get:()=>e.length}}),o};pv.exports=jH;pv.exports.default=jH});var gd=w((l$e,qH)=>{var uCe="2.0.0",gCe=Number.MAX_SAFE_INTEGER||9007199254740991,fCe=16;qH.exports={SEMVER_SPEC_VERSION:uCe,MAX_LENGTH:256,MAX_SAFE_INTEGER:gCe,MAX_SAFE_COMPONENT_LENGTH:fCe}});var fd=w((c$e,JH)=>{var hCe=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};JH.exports=hCe});var uc=w((TA,WH)=>{var{MAX_SAFE_COMPONENT_LENGTH:dv}=gd(),pCe=fd();TA=WH.exports={};var dCe=TA.re=[],et=TA.src=[],tt=TA.t={},CCe=0,St=(r,e,t)=>{let i=CCe++;pCe(i,e),tt[r]=i,et[i]=e,dCe[i]=new RegExp(e,t?"g":void 0)};St("NUMERICIDENTIFIER","0|[1-9]\\d*");St("NUMERICIDENTIFIERLOOSE","[0-9]+");St("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");St("MAINVERSION",`(${et[tt.NUMERICIDENTIFIER]})\\.(${et[tt.NUMERICIDENTIFIER]})\\.(${et[tt.NUMERICIDENTIFIER]})`);St("MAINVERSIONLOOSE",`(${et[tt.NUMERICIDENTIFIERLOOSE]})\\.(${et[tt.NUMERICIDENTIFIERLOOSE]})\\.(${et[tt.NUMERICIDENTIFIERLOOSE]})`);St("PRERELEASEIDENTIFIER",`(?:${et[tt.NUMERICIDENTIFIER]}|${et[tt.NONNUMERICIDENTIFIER]})`);St("PRERELEASEIDENTIFIERLOOSE",`(?:${et[tt.NUMERICIDENTIFIERLOOSE]}|${et[tt.NONNUMERICIDENTIFIER]})`);St("PRERELEASE",`(?:-(${et[tt.PRERELEASEIDENTIFIER]}(?:\\.${et[tt.PRERELEASEIDENTIFIER]})*))`);St("PRERELEASELOOSE",`(?:-?(${et[tt.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${et[tt.PRERELEASEIDENTIFIERLOOSE]})*))`);St("BUILDIDENTIFIER","[0-9A-Za-z-]+");St("BUILD",`(?:\\+(${et[tt.BUILDIDENTIFIER]}(?:\\.${et[tt.BUILDIDENTIFIER]})*))`);St("FULLPLAIN",`v?${et[tt.MAINVERSION]}${et[tt.PRERELEASE]}?${et[tt.BUILD]}?`);St("FULL",`^${et[tt.FULLPLAIN]}$`);St("LOOSEPLAIN",`[v=\\s]*${et[tt.MAINVERSIONLOOSE]}${et[tt.PRERELEASELOOSE]}?${et[tt.BUILD]}?`);St("LOOSE",`^${et[tt.LOOSEPLAIN]}$`);St("GTLT","((?:<|>)?=?)");St("XRANGEIDENTIFIERLOOSE",`${et[tt.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);St("XRANGEIDENTIFIER",`${et[tt.NUMERICIDENTIFIER]}|x|X|\\*`);St("XRANGEPLAIN",`[v=\\s]*(${et[tt.XRANGEIDENTIFIER]})(?:\\.(${et[tt.XRANGEIDENTIFIER]})(?:\\.(${et[tt.XRANGEIDENTIFIER]})(?:${et[tt.PRERELEASE]})?${et[tt.BUILD]}?)?)?`);St("XRANGEPLAINLOOSE",`[v=\\s]*(${et[tt.XRANGEIDENTIFIERLOOSE]})(?:\\.(${et[tt.XRANGEIDENTIFIERLOOSE]})(?:\\.(${et[tt.XRANGEIDENTIFIERLOOSE]})(?:${et[tt.PRERELEASELOOSE]})?${et[tt.BUILD]}?)?)?`);St("XRANGE",`^${et[tt.GTLT]}\\s*${et[tt.XRANGEPLAIN]}$`);St("XRANGELOOSE",`^${et[tt.GTLT]}\\s*${et[tt.XRANGEPLAINLOOSE]}$`);St("COERCE",`(^|[^\\d])(\\d{1,${dv}})(?:\\.(\\d{1,${dv}}))?(?:\\.(\\d{1,${dv}}))?(?:$|[^\\d])`);St("COERCERTL",et[tt.COERCE],!0);St("LONETILDE","(?:~>?)");St("TILDETRIM",`(\\s*)${et[tt.LONETILDE]}\\s+`,!0);TA.tildeTrimReplace="$1~";St("TILDE",`^${et[tt.LONETILDE]}${et[tt.XRANGEPLAIN]}$`);St("TILDELOOSE",`^${et[tt.LONETILDE]}${et[tt.XRANGEPLAINLOOSE]}$`);St("LONECARET","(?:\\^)");St("CARETTRIM",`(\\s*)${et[tt.LONECARET]}\\s+`,!0);TA.caretTrimReplace="$1^";St("CARET",`^${et[tt.LONECARET]}${et[tt.XRANGEPLAIN]}$`);St("CARETLOOSE",`^${et[tt.LONECARET]}${et[tt.XRANGEPLAINLOOSE]}$`);St("COMPARATORLOOSE",`^${et[tt.GTLT]}\\s*(${et[tt.LOOSEPLAIN]})$|^$`);St("COMPARATOR",`^${et[tt.GTLT]}\\s*(${et[tt.FULLPLAIN]})$|^$`);St("COMPARATORTRIM",`(\\s*)${et[tt.GTLT]}\\s*(${et[tt.LOOSEPLAIN]}|${et[tt.XRANGEPLAIN]})`,!0);TA.comparatorTrimReplace="$1$2$3";St("HYPHENRANGE",`^\\s*(${et[tt.XRANGEPLAIN]})\\s+-\\s+(${et[tt.XRANGEPLAIN]})\\s*$`);St("HYPHENRANGELOOSE",`^\\s*(${et[tt.XRANGEPLAINLOOSE]})\\s+-\\s+(${et[tt.XRANGEPLAINLOOSE]})\\s*$`);St("STAR","(<|>)?=?\\s*\\*");St("GTE0","^\\s*>=\\s*0.0.0\\s*$");St("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")});var hd=w((u$e,zH)=>{var mCe=["includePrerelease","loose","rtl"],ECe=r=>r?typeof r!="object"?{loose:!0}:mCe.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};zH.exports=ECe});var MI=w((g$e,ZH)=>{var VH=/^[0-9]+$/,XH=(r,e)=>{let t=VH.test(r),i=VH.test(e);return t&&i&&(r=+r,e=+e),r===e?0:t&&!i?-1:i&&!t?1:rXH(e,r);ZH.exports={compareIdentifiers:XH,rcompareIdentifiers:ICe}});var Li=w((f$e,tG)=>{var OI=fd(),{MAX_LENGTH:_H,MAX_SAFE_INTEGER:KI}=gd(),{re:$H,t:eG}=uc(),yCe=hd(),{compareIdentifiers:pd}=MI(),Yn=class{constructor(e,t){if(t=yCe(t),e instanceof Yn){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>_H)throw new TypeError(`version is longer than ${_H} characters`);OI("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let i=e.trim().match(t.loose?$H[eG.LOOSE]:$H[eG.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>KI||this.major<0)throw new TypeError("Invalid major version");if(this.minor>KI||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>KI||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let s=+n;if(s>=0&&s=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);i===-1&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};tG.exports=Yn});var gc=w((h$e,sG)=>{var{MAX_LENGTH:wCe}=gd(),{re:rG,t:iG}=uc(),nG=Li(),BCe=hd(),bCe=(r,e)=>{if(e=BCe(e),r instanceof nG)return r;if(typeof r!="string"||r.length>wCe||!(e.loose?rG[iG.LOOSE]:rG[iG.FULL]).test(r))return null;try{return new nG(r,e)}catch{return null}};sG.exports=bCe});var aG=w((p$e,oG)=>{var QCe=gc(),SCe=(r,e)=>{let t=QCe(r,e);return t?t.version:null};oG.exports=SCe});var lG=w((d$e,AG)=>{var vCe=gc(),xCe=(r,e)=>{let t=vCe(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};AG.exports=xCe});var uG=w((C$e,cG)=>{var PCe=Li(),DCe=(r,e,t,i)=>{typeof t=="string"&&(i=t,t=void 0);try{return new PCe(r,t).inc(e,i).version}catch{return null}};cG.exports=DCe});var cs=w((m$e,fG)=>{var gG=Li(),kCe=(r,e,t)=>new gG(r,t).compare(new gG(e,t));fG.exports=kCe});var UI=w((E$e,hG)=>{var RCe=cs(),FCe=(r,e,t)=>RCe(r,e,t)===0;hG.exports=FCe});var CG=w((I$e,dG)=>{var pG=gc(),NCe=UI(),TCe=(r,e)=>{if(NCe(r,e))return null;{let t=pG(r),i=pG(e),n=t.prerelease.length||i.prerelease.length,s=n?"pre":"",o=n?"prerelease":"";for(let a in t)if((a==="major"||a==="minor"||a==="patch")&&t[a]!==i[a])return s+a;return o}};dG.exports=TCe});var EG=w((y$e,mG)=>{var LCe=Li(),MCe=(r,e)=>new LCe(r,e).major;mG.exports=MCe});var yG=w((w$e,IG)=>{var OCe=Li(),KCe=(r,e)=>new OCe(r,e).minor;IG.exports=KCe});var BG=w((B$e,wG)=>{var UCe=Li(),HCe=(r,e)=>new UCe(r,e).patch;wG.exports=HCe});var QG=w((b$e,bG)=>{var GCe=gc(),YCe=(r,e)=>{let t=GCe(r,e);return t&&t.prerelease.length?t.prerelease:null};bG.exports=YCe});var vG=w((Q$e,SG)=>{var jCe=cs(),qCe=(r,e,t)=>jCe(e,r,t);SG.exports=qCe});var PG=w((S$e,xG)=>{var JCe=cs(),WCe=(r,e)=>JCe(r,e,!0);xG.exports=WCe});var HI=w((v$e,kG)=>{var DG=Li(),zCe=(r,e,t)=>{let i=new DG(r,t),n=new DG(e,t);return i.compare(n)||i.compareBuild(n)};kG.exports=zCe});var FG=w((x$e,RG)=>{var VCe=HI(),XCe=(r,e)=>r.sort((t,i)=>VCe(t,i,e));RG.exports=XCe});var TG=w((P$e,NG)=>{var ZCe=HI(),_Ce=(r,e)=>r.sort((t,i)=>ZCe(i,t,e));NG.exports=_Ce});var dd=w((D$e,LG)=>{var $Ce=cs(),eme=(r,e,t)=>$Ce(r,e,t)>0;LG.exports=eme});var GI=w((k$e,MG)=>{var tme=cs(),rme=(r,e,t)=>tme(r,e,t)<0;MG.exports=rme});var Cv=w((R$e,OG)=>{var ime=cs(),nme=(r,e,t)=>ime(r,e,t)!==0;OG.exports=nme});var YI=w((F$e,KG)=>{var sme=cs(),ome=(r,e,t)=>sme(r,e,t)>=0;KG.exports=ome});var jI=w((N$e,UG)=>{var ame=cs(),Ame=(r,e,t)=>ame(r,e,t)<=0;UG.exports=Ame});var mv=w((T$e,HG)=>{var lme=UI(),cme=Cv(),ume=dd(),gme=YI(),fme=GI(),hme=jI(),pme=(r,e,t,i)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return lme(r,t,i);case"!=":return cme(r,t,i);case">":return ume(r,t,i);case">=":return gme(r,t,i);case"<":return fme(r,t,i);case"<=":return hme(r,t,i);default:throw new TypeError(`Invalid operator: ${e}`)}};HG.exports=pme});var YG=w((L$e,GG)=>{var dme=Li(),Cme=gc(),{re:qI,t:JI}=uc(),mme=(r,e)=>{if(r instanceof dme)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(qI[JI.COERCE]);else{let i;for(;(i=qI[JI.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||i.index+i[0].length!==t.index+t[0].length)&&(t=i),qI[JI.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;qI[JI.COERCERTL].lastIndex=-1}return t===null?null:Cme(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};GG.exports=mme});var qG=w((M$e,jG)=>{"use strict";jG.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var WI=w((O$e,JG)=>{"use strict";JG.exports=Ht;Ht.Node=fc;Ht.create=Ht;function Ht(r){var e=this;if(e instanceof Ht||(e=new Ht),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(n){e.push(n)});else if(arguments.length>0)for(var t=0,i=arguments.length;t1)t=e;else if(this.head)i=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;i!==null;n++)t=r(t,i.value,n),i=i.next;return t};Ht.prototype.reduceReverse=function(r,e){var t,i=this.tail;if(arguments.length>1)t=e;else if(this.tail)i=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=this.length-1;i!==null;n--)t=r(t,i.value,n),i=i.prev;return t};Ht.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};Ht.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};Ht.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new Ht;if(ethis.length&&(e=this.length);for(var i=0,n=this.head;n!==null&&ithis.length&&(e=this.length);for(var i=this.length,n=this.tail;n!==null&&i>e;i--)n=n.prev;for(;n!==null&&i>r;i--,n=n.prev)t.push(n.value);return t};Ht.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var i=0,n=this.head;n!==null&&i{"use strict";var wme=WI(),hc=Symbol("max"),va=Symbol("length"),Wg=Symbol("lengthCalculator"),md=Symbol("allowStale"),pc=Symbol("maxAge"),Sa=Symbol("dispose"),WG=Symbol("noDisposeOnSet"),di=Symbol("lruList"),Zs=Symbol("cache"),VG=Symbol("updateAgeOnGet"),Ev=()=>1,yv=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[hc]=e.max||1/0,i=e.length||Ev;if(this[Wg]=typeof i!="function"?Ev:i,this[md]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[pc]=e.maxAge||0,this[Sa]=e.dispose,this[WG]=e.noDisposeOnSet||!1,this[VG]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[hc]=e||1/0,Cd(this)}get max(){return this[hc]}set allowStale(e){this[md]=!!e}get allowStale(){return this[md]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[pc]=e,Cd(this)}get maxAge(){return this[pc]}set lengthCalculator(e){typeof e!="function"&&(e=Ev),e!==this[Wg]&&(this[Wg]=e,this[va]=0,this[di].forEach(t=>{t.length=this[Wg](t.value,t.key),this[va]+=t.length})),Cd(this)}get lengthCalculator(){return this[Wg]}get length(){return this[va]}get itemCount(){return this[di].length}rforEach(e,t){t=t||this;for(let i=this[di].tail;i!==null;){let n=i.prev;zG(this,e,i,t),i=n}}forEach(e,t){t=t||this;for(let i=this[di].head;i!==null;){let n=i.next;zG(this,e,i,t),i=n}}keys(){return this[di].toArray().map(e=>e.key)}values(){return this[di].toArray().map(e=>e.value)}reset(){this[Sa]&&this[di]&&this[di].length&&this[di].forEach(e=>this[Sa](e.key,e.value)),this[Zs]=new Map,this[di]=new wme,this[va]=0}dump(){return this[di].map(e=>zI(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[di]}set(e,t,i){if(i=i||this[pc],i&&typeof i!="number")throw new TypeError("maxAge must be a number");let n=i?Date.now():0,s=this[Wg](t,e);if(this[Zs].has(e)){if(s>this[hc])return zg(this,this[Zs].get(e)),!1;let l=this[Zs].get(e).value;return this[Sa]&&(this[WG]||this[Sa](e,l.value)),l.now=n,l.maxAge=i,l.value=t,this[va]+=s-l.length,l.length=s,this.get(e),Cd(this),!0}let o=new wv(e,t,s,n,i);return o.length>this[hc]?(this[Sa]&&this[Sa](e,t),!1):(this[va]+=o.length,this[di].unshift(o),this[Zs].set(e,this[di].head),Cd(this),!0)}has(e){if(!this[Zs].has(e))return!1;let t=this[Zs].get(e).value;return!zI(this,t)}get(e){return Iv(this,e,!0)}peek(e){return Iv(this,e,!1)}pop(){let e=this[di].tail;return e?(zg(this,e),e.value):null}del(e){zg(this,this[Zs].get(e))}load(e){this.reset();let t=Date.now();for(let i=e.length-1;i>=0;i--){let n=e[i],s=n.e||0;if(s===0)this.set(n.k,n.v);else{let o=s-t;o>0&&this.set(n.k,n.v,o)}}}prune(){this[Zs].forEach((e,t)=>Iv(this,t,!1))}},Iv=(r,e,t)=>{let i=r[Zs].get(e);if(i){let n=i.value;if(zI(r,n)){if(zg(r,i),!r[md])return}else t&&(r[VG]&&(i.value.now=Date.now()),r[di].unshiftNode(i));return n.value}},zI=(r,e)=>{if(!e||!e.maxAge&&!r[pc])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[pc]&&t>r[pc]},Cd=r=>{if(r[va]>r[hc])for(let e=r[di].tail;r[va]>r[hc]&&e!==null;){let t=e.prev;zg(r,e),e=t}},zg=(r,e)=>{if(e){let t=e.value;r[Sa]&&r[Sa](t.key,t.value),r[va]-=t.length,r[Zs].delete(t.key),r[di].removeNode(e)}},wv=class{constructor(e,t,i,n,s){this.key=e,this.value=t,this.length=i,this.now=n,this.maxAge=s||0}},zG=(r,e,t,i)=>{let n=t.value;zI(r,n)&&(zg(r,t),r[md]||(n=void 0)),n&&e.call(i,n.value,n.key,r)};XG.exports=yv});var us=w((U$e,tY)=>{var dc=class{constructor(e,t){if(t=bme(t),e instanceof dc)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new dc(e.raw,t);if(e instanceof Bv)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(n=>!$G(n[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&Pme(n[0])){this.set=[n];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let i=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=_G.get(i);if(n)return n;let s=this.options.loose,o=s?Mi[bi.HYPHENRANGELOOSE]:Mi[bi.HYPHENRANGE];e=e.replace(o,Kme(this.options.includePrerelease)),Gr("hyphen replace",e),e=e.replace(Mi[bi.COMPARATORTRIM],Sme),Gr("comparator trim",e,Mi[bi.COMPARATORTRIM]),e=e.replace(Mi[bi.TILDETRIM],vme),e=e.replace(Mi[bi.CARETTRIM],xme),e=e.split(/\s+/).join(" ");let a=s?Mi[bi.COMPARATORLOOSE]:Mi[bi.COMPARATOR],l=e.split(" ").map(f=>Dme(f,this.options)).join(" ").split(/\s+/).map(f=>Ome(f,this.options)).filter(this.options.loose?f=>!!f.match(a):()=>!0).map(f=>new Bv(f,this.options)),c=l.length,u=new Map;for(let f of l){if($G(f))return[f];u.set(f.value,f)}u.size>1&&u.has("")&&u.delete("");let g=[...u.values()];return _G.set(i,g),g}intersects(e,t){if(!(e instanceof dc))throw new TypeError("a Range is required");return this.set.some(i=>eY(i,t)&&e.set.some(n=>eY(n,t)&&i.every(s=>n.every(o=>s.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Qme(e,this.options)}catch{return!1}for(let t=0;tr.value==="<0.0.0-0",Pme=r=>r.value==="",eY=(r,e)=>{let t=!0,i=r.slice(),n=i.pop();for(;t&&i.length;)t=i.every(s=>n.intersects(s,e)),n=i.pop();return t},Dme=(r,e)=>(Gr("comp",r,e),r=Fme(r,e),Gr("caret",r),r=kme(r,e),Gr("tildes",r),r=Tme(r,e),Gr("xrange",r),r=Mme(r,e),Gr("stars",r),r),$i=r=>!r||r.toLowerCase()==="x"||r==="*",kme=(r,e)=>r.trim().split(/\s+/).map(t=>Rme(t,e)).join(" "),Rme=(r,e)=>{let t=e.loose?Mi[bi.TILDELOOSE]:Mi[bi.TILDE];return r.replace(t,(i,n,s,o,a)=>{Gr("tilde",r,i,n,s,o,a);let l;return $i(n)?l="":$i(s)?l=`>=${n}.0.0 <${+n+1}.0.0-0`:$i(o)?l=`>=${n}.${s}.0 <${n}.${+s+1}.0-0`:a?(Gr("replaceTilde pr",a),l=`>=${n}.${s}.${o}-${a} <${n}.${+s+1}.0-0`):l=`>=${n}.${s}.${o} <${n}.${+s+1}.0-0`,Gr("tilde return",l),l})},Fme=(r,e)=>r.trim().split(/\s+/).map(t=>Nme(t,e)).join(" "),Nme=(r,e)=>{Gr("caret",r,e);let t=e.loose?Mi[bi.CARETLOOSE]:Mi[bi.CARET],i=e.includePrerelease?"-0":"";return r.replace(t,(n,s,o,a,l)=>{Gr("caret",r,n,s,o,a,l);let c;return $i(s)?c="":$i(o)?c=`>=${s}.0.0${i} <${+s+1}.0.0-0`:$i(a)?s==="0"?c=`>=${s}.${o}.0${i} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.0${i} <${+s+1}.0.0-0`:l?(Gr("replaceCaret pr",l),s==="0"?o==="0"?c=`>=${s}.${o}.${a}-${l} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}-${l} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a}-${l} <${+s+1}.0.0-0`):(Gr("no pr"),s==="0"?o==="0"?c=`>=${s}.${o}.${a}${i} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}${i} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),Gr("caret return",c),c})},Tme=(r,e)=>(Gr("replaceXRanges",r,e),r.split(/\s+/).map(t=>Lme(t,e)).join(" ")),Lme=(r,e)=>{r=r.trim();let t=e.loose?Mi[bi.XRANGELOOSE]:Mi[bi.XRANGE];return r.replace(t,(i,n,s,o,a,l)=>{Gr("xRange",r,i,n,s,o,a,l);let c=$i(s),u=c||$i(o),g=u||$i(a),f=g;return n==="="&&f&&(n=""),l=e.includePrerelease?"-0":"",c?n===">"||n==="<"?i="<0.0.0-0":i="*":n&&f?(u&&(o=0),a=0,n===">"?(n=">=",u?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):n==="<="&&(n="<",u?s=+s+1:o=+o+1),n==="<"&&(l="-0"),i=`${n+s}.${o}.${a}${l}`):u?i=`>=${s}.0.0${l} <${+s+1}.0.0-0`:g&&(i=`>=${s}.${o}.0${l} <${s}.${+o+1}.0-0`),Gr("xRange return",i),i})},Mme=(r,e)=>(Gr("replaceStars",r,e),r.trim().replace(Mi[bi.STAR],"")),Ome=(r,e)=>(Gr("replaceGTE0",r,e),r.trim().replace(Mi[e.includePrerelease?bi.GTE0PRE:bi.GTE0],"")),Kme=r=>(e,t,i,n,s,o,a,l,c,u,g,f,h)=>($i(i)?t="":$i(n)?t=`>=${i}.0.0${r?"-0":""}`:$i(s)?t=`>=${i}.${n}.0${r?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,$i(c)?l="":$i(u)?l=`<${+c+1}.0.0-0`:$i(g)?l=`<${c}.${+u+1}.0-0`:f?l=`<=${c}.${u}.${g}-${f}`:r?l=`<${c}.${u}.${+g+1}-0`:l=`<=${l}`,`${t} ${l}`.trim()),Ume=(r,e,t)=>{for(let i=0;i0){let n=r[i].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var Ed=w((H$e,oY)=>{var Id=Symbol("SemVer ANY"),Vg=class{static get ANY(){return Id}constructor(e,t){if(t=Hme(t),e instanceof Vg){if(e.loose===!!t.loose)return e;e=e.value}Qv("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Id?this.value="":this.value=this.operator+this.semver.version,Qv("comp",this)}parse(e){let t=this.options.loose?rY[iY.COMPARATORLOOSE]:rY[iY.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new nY(i[2],this.options.loose):this.semver=Id}toString(){return this.value}test(e){if(Qv("Comparator.test",e,this.options.loose),this.semver===Id||e===Id)return!0;if(typeof e=="string")try{e=new nY(e,this.options)}catch{return!1}return bv(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Vg))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new sY(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new sY(this.value,t).test(e.semver);let i=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),n=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),s=this.semver.version===e.semver.version,o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),a=bv(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),l=bv(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return i||n||s&&o||a||l}};oY.exports=Vg;var Hme=hd(),{re:rY,t:iY}=uc(),bv=mv(),Qv=fd(),nY=Li(),sY=us()});var yd=w((G$e,aY)=>{var Gme=us(),Yme=(r,e,t)=>{try{e=new Gme(e,t)}catch{return!1}return e.test(r)};aY.exports=Yme});var lY=w((Y$e,AY)=>{var jme=us(),qme=(r,e)=>new jme(r,e).set.map(t=>t.map(i=>i.value).join(" ").trim().split(" "));AY.exports=qme});var uY=w((j$e,cY)=>{var Jme=Li(),Wme=us(),zme=(r,e,t)=>{let i=null,n=null,s=null;try{s=new Wme(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!i||n.compare(o)===-1)&&(i=o,n=new Jme(i,t))}),i};cY.exports=zme});var fY=w((q$e,gY)=>{var Vme=Li(),Xme=us(),Zme=(r,e,t)=>{let i=null,n=null,s=null;try{s=new Xme(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!i||n.compare(o)===1)&&(i=o,n=new Vme(i,t))}),i};gY.exports=Zme});var dY=w((J$e,pY)=>{var Sv=Li(),_me=us(),hY=dd(),$me=(r,e)=>{r=new _me(r,e);let t=new Sv("0.0.0");if(r.test(t)||(t=new Sv("0.0.0-0"),r.test(t)))return t;t=null;for(let i=0;i{let a=new Sv(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||hY(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!t||hY(t,s))&&(t=s)}return t&&r.test(t)?t:null};pY.exports=$me});var mY=w((W$e,CY)=>{var eEe=us(),tEe=(r,e)=>{try{return new eEe(r,e).range||"*"}catch{return null}};CY.exports=tEe});var VI=w((z$e,wY)=>{var rEe=Li(),yY=Ed(),{ANY:iEe}=yY,nEe=us(),sEe=yd(),EY=dd(),IY=GI(),oEe=jI(),aEe=YI(),AEe=(r,e,t,i)=>{r=new rEe(r,i),e=new nEe(e,i);let n,s,o,a,l;switch(t){case">":n=EY,s=oEe,o=IY,a=">",l=">=";break;case"<":n=IY,s=aEe,o=EY,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(sEe(r,e,i))return!1;for(let c=0;c{h.semver===iEe&&(h=new yY(">=0.0.0")),g=g||h,f=f||h,n(h.semver,g.semver,i)?g=h:o(h.semver,f.semver,i)&&(f=h)}),g.operator===a||g.operator===l||(!f.operator||f.operator===a)&&s(r,f.semver))return!1;if(f.operator===l&&o(r,f.semver))return!1}return!0};wY.exports=AEe});var bY=w((V$e,BY)=>{var lEe=VI(),cEe=(r,e,t)=>lEe(r,e,">",t);BY.exports=cEe});var SY=w((X$e,QY)=>{var uEe=VI(),gEe=(r,e,t)=>uEe(r,e,"<",t);QY.exports=gEe});var PY=w((Z$e,xY)=>{var vY=us(),fEe=(r,e,t)=>(r=new vY(r,t),e=new vY(e,t),r.intersects(e));xY.exports=fEe});var kY=w((_$e,DY)=>{var hEe=yd(),pEe=cs();DY.exports=(r,e,t)=>{let i=[],n=null,s=null,o=r.sort((u,g)=>pEe(u,g,t));for(let u of o)hEe(u,e,t)?(s=u,n||(n=u)):(s&&i.push([n,s]),s=null,n=null);n&&i.push([n,null]);let a=[];for(let[u,g]of i)u===g?a.push(u):!g&&u===o[0]?a.push("*"):g?u===o[0]?a.push(`<=${g}`):a.push(`${u} - ${g}`):a.push(`>=${u}`);let l=a.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return l.length{var RY=us(),XI=Ed(),{ANY:vv}=XI,wd=yd(),xv=cs(),dEe=(r,e,t={})=>{if(r===e)return!0;r=new RY(r,t),e=new RY(e,t);let i=!1;e:for(let n of r.set){for(let s of e.set){let o=CEe(n,s,t);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},CEe=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===vv){if(e.length===1&&e[0].semver===vv)return!0;t.includePrerelease?r=[new XI(">=0.0.0-0")]:r=[new XI(">=0.0.0")]}if(e.length===1&&e[0].semver===vv){if(t.includePrerelease)return!0;e=[new XI(">=0.0.0")]}let i=new Set,n,s;for(let h of r)h.operator===">"||h.operator===">="?n=FY(n,h,t):h.operator==="<"||h.operator==="<="?s=NY(s,h,t):i.add(h.semver);if(i.size>1)return null;let o;if(n&&s){if(o=xv(n.semver,s.semver,t),o>0)return null;if(o===0&&(n.operator!==">="||s.operator!=="<="))return null}for(let h of i){if(n&&!wd(h,String(n),t)||s&&!wd(h,String(s),t))return null;for(let p of e)if(!wd(h,String(p),t))return!1;return!0}let a,l,c,u,g=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1,f=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1;g&&g.prerelease.length===1&&s.operator==="<"&&g.prerelease[0]===0&&(g=!1);for(let h of e){if(u=u||h.operator===">"||h.operator===">=",c=c||h.operator==="<"||h.operator==="<=",n){if(f&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch&&(f=!1),h.operator===">"||h.operator===">="){if(a=FY(n,h,t),a===h&&a!==n)return!1}else if(n.operator===">="&&!wd(n.semver,String(h),t))return!1}if(s){if(g&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===g.major&&h.semver.minor===g.minor&&h.semver.patch===g.patch&&(g=!1),h.operator==="<"||h.operator==="<="){if(l=NY(s,h,t),l===h&&l!==s)return!1}else if(s.operator==="<="&&!wd(s.semver,String(h),t))return!1}if(!h.operator&&(s||n)&&o!==0)return!1}return!(n&&c&&!s&&o!==0||s&&u&&!n&&o!==0||f||g)},FY=(r,e,t)=>{if(!r)return e;let i=xv(r.semver,e.semver,t);return i>0?r:i<0||e.operator===">"&&r.operator===">="?e:r},NY=(r,e,t)=>{if(!r)return e;let i=xv(r.semver,e.semver,t);return i<0?r:i>0||e.operator==="<"&&r.operator==="<="?e:r};TY.exports=dEe});var Xr=w((eet,MY)=>{var Pv=uc();MY.exports={re:Pv.re,src:Pv.src,tokens:Pv.t,SEMVER_SPEC_VERSION:gd().SEMVER_SPEC_VERSION,SemVer:Li(),compareIdentifiers:MI().compareIdentifiers,rcompareIdentifiers:MI().rcompareIdentifiers,parse:gc(),valid:aG(),clean:lG(),inc:uG(),diff:CG(),major:EG(),minor:yG(),patch:BG(),prerelease:QG(),compare:cs(),rcompare:vG(),compareLoose:PG(),compareBuild:HI(),sort:FG(),rsort:TG(),gt:dd(),lt:GI(),eq:UI(),neq:Cv(),gte:YI(),lte:jI(),cmp:mv(),coerce:YG(),Comparator:Ed(),Range:us(),satisfies:yd(),toComparators:lY(),maxSatisfying:uY(),minSatisfying:fY(),minVersion:dY(),validRange:mY(),outside:VI(),gtr:bY(),ltr:SY(),intersects:PY(),simplifyRange:kY(),subset:LY()}});var Dv=w(ZI=>{"use strict";Object.defineProperty(ZI,"__esModule",{value:!0});ZI.VERSION=void 0;ZI.VERSION="9.1.0"});var Gt=w((exports,module)=>{"use strict";var __spreadArray=exports&&exports.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var i=0,n=e.length,s;i{(function(r,e){typeof define=="function"&&define.amd?define([],e):typeof _I=="object"&&_I.exports?_I.exports=e():r.regexpToAst=e()})(typeof self<"u"?self:OY,function(){function r(){}r.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},r.prototype.restoreState=function(p){this.idx=p.idx,this.input=p.input,this.groupIdx=p.groupIdx},r.prototype.pattern=function(p){this.idx=0,this.input=p,this.groupIdx=0,this.consumeChar("/");var C=this.disjunction();this.consumeChar("/");for(var y={type:"Flags",loc:{begin:this.idx,end:p.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":o(y,"global");break;case"i":o(y,"ignoreCase");break;case"m":o(y,"multiLine");break;case"u":o(y,"unicode");break;case"y":o(y,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:y,value:C,loc:this.loc(0)}},r.prototype.disjunction=function(){var p=[],C=this.idx;for(p.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),p.push(this.alternative());return{type:"Disjunction",value:p,loc:this.loc(C)}},r.prototype.alternative=function(){for(var p=[],C=this.idx;this.isTerm();)p.push(this.term());return{type:"Alternative",value:p,loc:this.loc(C)}},r.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},r.prototype.assertion=function(){var p=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(p)};case"$":return{type:"EndAnchor",loc:this.loc(p)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(p)};case"B":return{type:"NonWordBoundary",loc:this.loc(p)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");var C;switch(this.popChar()){case"=":C="Lookahead";break;case"!":C="NegativeLookahead";break}a(C);var y=this.disjunction();return this.consumeChar(")"),{type:C,value:y,loc:this.loc(p)}}l()},r.prototype.quantifier=function(p){var C,y=this.idx;switch(this.popChar()){case"*":C={atLeast:0,atMost:1/0};break;case"+":C={atLeast:1,atMost:1/0};break;case"?":C={atLeast:0,atMost:1};break;case"{":var B=this.integerIncludingZero();switch(this.popChar()){case"}":C={atLeast:B,atMost:B};break;case",":var v;this.isDigit()?(v=this.integerIncludingZero(),C={atLeast:B,atMost:v}):C={atLeast:B,atMost:1/0},this.consumeChar("}");break}if(p===!0&&C===void 0)return;a(C);break}if(!(p===!0&&C===void 0))return a(C),this.peekChar(0)==="?"?(this.consumeChar("?"),C.greedy=!1):C.greedy=!0,C.type="Quantifier",C.loc=this.loc(y),C},r.prototype.atom=function(){var p,C=this.idx;switch(this.peekChar()){case".":p=this.dotAll();break;case"\\":p=this.atomEscape();break;case"[":p=this.characterClass();break;case"(":p=this.group();break}return p===void 0&&this.isPatternCharacter()&&(p=this.patternCharacter()),a(p),p.loc=this.loc(C),this.isQuantifier()&&(p.quantifier=this.quantifier()),p},r.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[n(` +`),n("\r"),n("\u2028"),n("\u2029")]}},r.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},r.prototype.decimalEscapeAtom=function(){var p=this.positiveInteger();return{type:"GroupBackReference",value:p}},r.prototype.characterClassEscape=function(){var p,C=!1;switch(this.popChar()){case"d":p=u;break;case"D":p=u,C=!0;break;case"s":p=f;break;case"S":p=f,C=!0;break;case"w":p=g;break;case"W":p=g,C=!0;break}return a(p),{type:"Set",value:p,complement:C}},r.prototype.controlEscapeAtom=function(){var p;switch(this.popChar()){case"f":p=n("\f");break;case"n":p=n(` +`);break;case"r":p=n("\r");break;case"t":p=n(" ");break;case"v":p=n("\v");break}return a(p),{type:"Character",value:p}},r.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var p=this.popChar();if(/[a-zA-Z]/.test(p)===!1)throw Error("Invalid ");var C=p.toUpperCase().charCodeAt(0)-64;return{type:"Character",value:C}},r.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:n("\0")}},r.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},r.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},r.prototype.identityEscapeAtom=function(){var p=this.popChar();return{type:"Character",value:n(p)}},r.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case` +`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:var p=this.popChar();return{type:"Character",value:n(p)}}},r.prototype.characterClass=function(){var p=[],C=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),C=!0);this.isClassAtom();){var y=this.classAtom(),B=y.type==="Character";if(B&&this.isRangeDash()){this.consumeChar("-");var v=this.classAtom(),D=v.type==="Character";if(D){if(v.value=this.input.length)throw Error("Unexpected end of input");this.idx++},r.prototype.loc=function(p){return{begin:p,end:this.idx}};var e=/[0-9a-fA-F]/,t=/[0-9]/,i=/[1-9]/;function n(p){return p.charCodeAt(0)}function s(p,C){p.length!==void 0?p.forEach(function(y){C.push(y)}):C.push(p)}function o(p,C){if(p[C]===!0)throw"duplicate flag "+C;p[C]=!0}function a(p){if(p===void 0)throw Error("Internal Error - Should never get here!")}function l(){throw Error("Internal Error - Should never get here!")}var c,u=[];for(c=n("0");c<=n("9");c++)u.push(c);var g=[n("_")].concat(u);for(c=n("a");c<=n("z");c++)g.push(c);for(c=n("A");c<=n("Z");c++)g.push(c);var f=[n(" "),n("\f"),n(` +`),n("\r"),n(" "),n("\v"),n(" "),n("\xA0"),n("\u1680"),n("\u2000"),n("\u2001"),n("\u2002"),n("\u2003"),n("\u2004"),n("\u2005"),n("\u2006"),n("\u2007"),n("\u2008"),n("\u2009"),n("\u200A"),n("\u2028"),n("\u2029"),n("\u202F"),n("\u205F"),n("\u3000"),n("\uFEFF")];function h(){}return h.prototype.visitChildren=function(p){for(var C in p){var y=p[C];p.hasOwnProperty(C)&&(y.type!==void 0?this.visit(y):Array.isArray(y)&&y.forEach(function(B){this.visit(B)},this))}},h.prototype.visit=function(p){switch(p.type){case"Pattern":this.visitPattern(p);break;case"Flags":this.visitFlags(p);break;case"Disjunction":this.visitDisjunction(p);break;case"Alternative":this.visitAlternative(p);break;case"StartAnchor":this.visitStartAnchor(p);break;case"EndAnchor":this.visitEndAnchor(p);break;case"WordBoundary":this.visitWordBoundary(p);break;case"NonWordBoundary":this.visitNonWordBoundary(p);break;case"Lookahead":this.visitLookahead(p);break;case"NegativeLookahead":this.visitNegativeLookahead(p);break;case"Character":this.visitCharacter(p);break;case"Set":this.visitSet(p);break;case"Group":this.visitGroup(p);break;case"GroupBackReference":this.visitGroupBackReference(p);break;case"Quantifier":this.visitQuantifier(p);break}this.visitChildren(p)},h.prototype.visitPattern=function(p){},h.prototype.visitFlags=function(p){},h.prototype.visitDisjunction=function(p){},h.prototype.visitAlternative=function(p){},h.prototype.visitStartAnchor=function(p){},h.prototype.visitEndAnchor=function(p){},h.prototype.visitWordBoundary=function(p){},h.prototype.visitNonWordBoundary=function(p){},h.prototype.visitLookahead=function(p){},h.prototype.visitNegativeLookahead=function(p){},h.prototype.visitCharacter=function(p){},h.prototype.visitSet=function(p){},h.prototype.visitGroup=function(p){},h.prototype.visitGroupBackReference=function(p){},h.prototype.visitQuantifier=function(p){},{RegExpParser:r,BaseRegExpVisitor:h,VERSION:"0.5.0"}})});var ty=w(Xg=>{"use strict";Object.defineProperty(Xg,"__esModule",{value:!0});Xg.clearRegExpParserCache=Xg.getRegExpAst=void 0;var mEe=$I(),ey={},EEe=new mEe.RegExpParser;function IEe(r){var e=r.toString();if(ey.hasOwnProperty(e))return ey[e];var t=EEe.pattern(e);return ey[e]=t,t}Xg.getRegExpAst=IEe;function yEe(){ey={}}Xg.clearRegExpParserCache=yEe});var YY=w(Cn=>{"use strict";var wEe=Cn&&Cn.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Cn,"__esModule",{value:!0});Cn.canMatchCharCode=Cn.firstCharOptimizedIndices=Cn.getOptimizedStartCodesIndices=Cn.failedOptimizationPrefixMsg=void 0;var UY=$I(),gs=Gt(),HY=ty(),xa=Rv(),GY="Complement Sets are not supported for first char optimization";Cn.failedOptimizationPrefixMsg=`Unable to use "first char" lexer optimizations: +`;function BEe(r,e){e===void 0&&(e=!1);try{var t=(0,HY.getRegExpAst)(r),i=iy(t.value,{},t.flags.ignoreCase);return i}catch(s){if(s.message===GY)e&&(0,gs.PRINT_WARNING)(""+Cn.failedOptimizationPrefixMsg+(" Unable to optimize: < "+r.toString()+` > +`)+` Complement Sets cannot be automatically optimized. + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{var n="";e&&(n=` + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),(0,gs.PRINT_ERROR)(Cn.failedOptimizationPrefixMsg+` +`+(" Failed parsing: < "+r.toString()+` > +`)+(" Using the regexp-to-ast library version: "+UY.VERSION+` +`)+" Please open an issue at: https://github.com/bd82/regexp-to-ast/issues"+n)}}return[]}Cn.getOptimizedStartCodesIndices=BEe;function iy(r,e,t){switch(r.type){case"Disjunction":for(var i=0;i=xa.minOptimizationVal)for(var f=u.from>=xa.minOptimizationVal?u.from:xa.minOptimizationVal,h=u.to,p=(0,xa.charCodeToOptimizedIndex)(f),C=(0,xa.charCodeToOptimizedIndex)(h),y=p;y<=C;y++)e[y]=y}}});break;case"Group":iy(o.value,e,t);break;default:throw Error("Non Exhaustive Match")}var a=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&kv(o)===!1||o.type!=="Group"&&a===!1)break}break;default:throw Error("non exhaustive match!")}return(0,gs.values)(e)}Cn.firstCharOptimizedIndices=iy;function ry(r,e,t){var i=(0,xa.charCodeToOptimizedIndex)(r);e[i]=i,t===!0&&bEe(r,e)}function bEe(r,e){var t=String.fromCharCode(r),i=t.toUpperCase();if(i!==t){var n=(0,xa.charCodeToOptimizedIndex)(i.charCodeAt(0));e[n]=n}else{var s=t.toLowerCase();if(s!==t){var n=(0,xa.charCodeToOptimizedIndex)(s.charCodeAt(0));e[n]=n}}}function KY(r,e){return(0,gs.find)(r.value,function(t){if(typeof t=="number")return(0,gs.contains)(e,t);var i=t;return(0,gs.find)(e,function(n){return i.from<=n&&n<=i.to})!==void 0})}function kv(r){return r.quantifier&&r.quantifier.atLeast===0?!0:r.value?(0,gs.isArray)(r.value)?(0,gs.every)(r.value,kv):kv(r.value):!1}var QEe=function(r){wEe(e,r);function e(t){var i=r.call(this)||this;return i.targetCharCodes=t,i.found=!1,i}return e.prototype.visitChildren=function(t){if(this.found!==!0){switch(t.type){case"Lookahead":this.visitLookahead(t);return;case"NegativeLookahead":this.visitNegativeLookahead(t);return}r.prototype.visitChildren.call(this,t)}},e.prototype.visitCharacter=function(t){(0,gs.contains)(this.targetCharCodes,t.value)&&(this.found=!0)},e.prototype.visitSet=function(t){t.complement?KY(t,this.targetCharCodes)===void 0&&(this.found=!0):KY(t,this.targetCharCodes)!==void 0&&(this.found=!0)},e}(UY.BaseRegExpVisitor);function SEe(r,e){if(e instanceof RegExp){var t=(0,HY.getRegExpAst)(e),i=new QEe(r);return i.visit(t),i.found}else return(0,gs.find)(e,function(n){return(0,gs.contains)(r,n.charCodeAt(0))})!==void 0}Cn.canMatchCharCode=SEe});var Rv=w(Ve=>{"use strict";var jY=Ve&&Ve.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Ve,"__esModule",{value:!0});Ve.charCodeToOptimizedIndex=Ve.minOptimizationVal=Ve.buildLineBreakIssueMessage=Ve.LineTerminatorOptimizedTester=Ve.isShortPattern=Ve.isCustomPattern=Ve.cloneEmptyGroups=Ve.performWarningRuntimeChecks=Ve.performRuntimeChecks=Ve.addStickyFlag=Ve.addStartOfInput=Ve.findUnreachablePatterns=Ve.findModesThatDoNotExist=Ve.findInvalidGroupType=Ve.findDuplicatePatterns=Ve.findUnsupportedFlags=Ve.findStartOfInputAnchor=Ve.findEmptyMatchRegExps=Ve.findEndOfInputAnchor=Ve.findInvalidPatterns=Ve.findMissingPatterns=Ve.validatePatterns=Ve.analyzeTokenTypes=Ve.enableSticky=Ve.disableSticky=Ve.SUPPORT_STICKY=Ve.MODES=Ve.DEFAULT_MODE=void 0;var qY=$I(),ir=Bd(),xe=Gt(),Zg=YY(),JY=ty(),Do="PATTERN";Ve.DEFAULT_MODE="defaultMode";Ve.MODES="modes";Ve.SUPPORT_STICKY=typeof new RegExp("(?:)").sticky=="boolean";function vEe(){Ve.SUPPORT_STICKY=!1}Ve.disableSticky=vEe;function xEe(){Ve.SUPPORT_STICKY=!0}Ve.enableSticky=xEe;function PEe(r,e){e=(0,xe.defaults)(e,{useSticky:Ve.SUPPORT_STICKY,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:function(v,D){return D()}});var t=e.tracer;t("initCharCodeToOptimizedIndexMap",function(){KEe()});var i;t("Reject Lexer.NA",function(){i=(0,xe.reject)(r,function(v){return v[Do]===ir.Lexer.NA})});var n=!1,s;t("Transform Patterns",function(){n=!1,s=(0,xe.map)(i,function(v){var D=v[Do];if((0,xe.isRegExp)(D)){var T=D.source;return T.length===1&&T!=="^"&&T!=="$"&&T!=="."&&!D.ignoreCase?T:T.length===2&&T[0]==="\\"&&!(0,xe.contains)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],T[1])?T[1]:e.useSticky?Tv(D):Nv(D)}else{if((0,xe.isFunction)(D))return n=!0,{exec:D};if((0,xe.has)(D,"exec"))return n=!0,D;if(typeof D=="string"){if(D.length===1)return D;var H=D.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),j=new RegExp(H);return e.useSticky?Tv(j):Nv(j)}else throw Error("non exhaustive match")}})});var o,a,l,c,u;t("misc mapping",function(){o=(0,xe.map)(i,function(v){return v.tokenTypeIdx}),a=(0,xe.map)(i,function(v){var D=v.GROUP;if(D!==ir.Lexer.SKIPPED){if((0,xe.isString)(D))return D;if((0,xe.isUndefined)(D))return!1;throw Error("non exhaustive match")}}),l=(0,xe.map)(i,function(v){var D=v.LONGER_ALT;if(D){var T=(0,xe.isArray)(D)?(0,xe.map)(D,function(H){return(0,xe.indexOf)(i,H)}):[(0,xe.indexOf)(i,D)];return T}}),c=(0,xe.map)(i,function(v){return v.PUSH_MODE}),u=(0,xe.map)(i,function(v){return(0,xe.has)(v,"POP_MODE")})});var g;t("Line Terminator Handling",function(){var v=oj(e.lineTerminatorCharacters);g=(0,xe.map)(i,function(D){return!1}),e.positionTracking!=="onlyOffset"&&(g=(0,xe.map)(i,function(D){if((0,xe.has)(D,"LINE_BREAKS"))return D.LINE_BREAKS;if(nj(D,v)===!1)return(0,Zg.canMatchCharCode)(v,D.PATTERN)}))});var f,h,p,C;t("Misc Mapping #2",function(){f=(0,xe.map)(i,Mv),h=(0,xe.map)(s,ij),p=(0,xe.reduce)(i,function(v,D){var T=D.GROUP;return(0,xe.isString)(T)&&T!==ir.Lexer.SKIPPED&&(v[T]=[]),v},{}),C=(0,xe.map)(s,function(v,D){return{pattern:s[D],longerAlt:l[D],canLineTerminator:g[D],isCustom:f[D],short:h[D],group:a[D],push:c[D],pop:u[D],tokenTypeIdx:o[D],tokenType:i[D]}})});var y=!0,B=[];return e.safeMode||t("First Char Optimization",function(){B=(0,xe.reduce)(i,function(v,D,T){if(typeof D.PATTERN=="string"){var H=D.PATTERN.charCodeAt(0),j=Lv(H);Fv(v,j,C[T])}else if((0,xe.isArray)(D.START_CHARS_HINT)){var $;(0,xe.forEach)(D.START_CHARS_HINT,function(W){var _=typeof W=="string"?W.charCodeAt(0):W,A=Lv(_);$!==A&&($=A,Fv(v,A,C[T]))})}else if((0,xe.isRegExp)(D.PATTERN))if(D.PATTERN.unicode)y=!1,e.ensureOptimizations&&(0,xe.PRINT_ERROR)(""+Zg.failedOptimizationPrefixMsg+(" Unable to analyze < "+D.PATTERN.toString()+` > pattern. +`)+` The regexp unicode flag is not currently supported by the regexp-to-ast library. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{var V=(0,Zg.getOptimizedStartCodesIndices)(D.PATTERN,e.ensureOptimizations);(0,xe.isEmpty)(V)&&(y=!1),(0,xe.forEach)(V,function(W){Fv(v,W,C[T])})}else e.ensureOptimizations&&(0,xe.PRINT_ERROR)(""+Zg.failedOptimizationPrefixMsg+(" TokenType: <"+D.name+`> is using a custom token pattern without providing parameter. +`)+` This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),y=!1;return v},[])}),t("ArrayPacking",function(){B=(0,xe.packArray)(B)}),{emptyGroups:p,patternIdxToConfig:C,charCodeToPatternIdxToConfig:B,hasCustom:n,canBeOptimized:y}}Ve.analyzeTokenTypes=PEe;function DEe(r,e){var t=[],i=WY(r);t=t.concat(i.errors);var n=zY(i.valid),s=n.valid;return t=t.concat(n.errors),t=t.concat(kEe(s)),t=t.concat(ej(s)),t=t.concat(tj(s,e)),t=t.concat(rj(s)),t}Ve.validatePatterns=DEe;function kEe(r){var e=[],t=(0,xe.filter)(r,function(i){return(0,xe.isRegExp)(i[Do])});return e=e.concat(VY(t)),e=e.concat(ZY(t)),e=e.concat(_Y(t)),e=e.concat($Y(t)),e=e.concat(XY(t)),e}function WY(r){var e=(0,xe.filter)(r,function(n){return!(0,xe.has)(n,Do)}),t=(0,xe.map)(e,function(n){return{message:"Token Type: ->"+n.name+"<- missing static 'PATTERN' property",type:ir.LexerDefinitionErrorType.MISSING_PATTERN,tokenTypes:[n]}}),i=(0,xe.difference)(r,e);return{errors:t,valid:i}}Ve.findMissingPatterns=WY;function zY(r){var e=(0,xe.filter)(r,function(n){var s=n[Do];return!(0,xe.isRegExp)(s)&&!(0,xe.isFunction)(s)&&!(0,xe.has)(s,"exec")&&!(0,xe.isString)(s)}),t=(0,xe.map)(e,function(n){return{message:"Token Type: ->"+n.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:ir.LexerDefinitionErrorType.INVALID_PATTERN,tokenTypes:[n]}}),i=(0,xe.difference)(r,e);return{errors:t,valid:i}}Ve.findInvalidPatterns=zY;var REe=/[^\\][\$]/;function VY(r){var e=function(n){jY(s,n);function s(){var o=n!==null&&n.apply(this,arguments)||this;return o.found=!1,o}return s.prototype.visitEndAnchor=function(o){this.found=!0},s}(qY.BaseRegExpVisitor),t=(0,xe.filter)(r,function(n){var s=n[Do];try{var o=(0,JY.getRegExpAst)(s),a=new e;return a.visit(o),a.found}catch{return REe.test(s.source)}}),i=(0,xe.map)(t,function(n){return{message:`Unexpected RegExp Anchor Error: + Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain end of input anchor '$' + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ir.LexerDefinitionErrorType.EOI_ANCHOR_FOUND,tokenTypes:[n]}});return i}Ve.findEndOfInputAnchor=VY;function XY(r){var e=(0,xe.filter)(r,function(i){var n=i[Do];return n.test("")}),t=(0,xe.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' must not match an empty string",type:ir.LexerDefinitionErrorType.EMPTY_MATCH_PATTERN,tokenTypes:[i]}});return t}Ve.findEmptyMatchRegExps=XY;var FEe=/[^\\[][\^]|^\^/;function ZY(r){var e=function(n){jY(s,n);function s(){var o=n!==null&&n.apply(this,arguments)||this;return o.found=!1,o}return s.prototype.visitStartAnchor=function(o){this.found=!0},s}(qY.BaseRegExpVisitor),t=(0,xe.filter)(r,function(n){var s=n[Do];try{var o=(0,JY.getRegExpAst)(s),a=new e;return a.visit(o),a.found}catch{return FEe.test(s.source)}}),i=(0,xe.map)(t,function(n){return{message:`Unexpected RegExp Anchor Error: + Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain start of input anchor '^' + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ir.LexerDefinitionErrorType.SOI_ANCHOR_FOUND,tokenTypes:[n]}});return i}Ve.findStartOfInputAnchor=ZY;function _Y(r){var e=(0,xe.filter)(r,function(i){var n=i[Do];return n instanceof RegExp&&(n.multiline||n.global)}),t=(0,xe.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:ir.LexerDefinitionErrorType.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[i]}});return t}Ve.findUnsupportedFlags=_Y;function $Y(r){var e=[],t=(0,xe.map)(r,function(s){return(0,xe.reduce)(r,function(o,a){return s.PATTERN.source===a.PATTERN.source&&!(0,xe.contains)(e,a)&&a.PATTERN!==ir.Lexer.NA&&(e.push(a),o.push(a)),o},[])});t=(0,xe.compact)(t);var i=(0,xe.filter)(t,function(s){return s.length>1}),n=(0,xe.map)(i,function(s){var o=(0,xe.map)(s,function(l){return l.name}),a=(0,xe.first)(s).PATTERN;return{message:"The same RegExp pattern ->"+a+"<-"+("has been used in all of the following Token Types: "+o.join(", ")+" <-"),type:ir.LexerDefinitionErrorType.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}});return n}Ve.findDuplicatePatterns=$Y;function ej(r){var e=(0,xe.filter)(r,function(i){if(!(0,xe.has)(i,"GROUP"))return!1;var n=i.GROUP;return n!==ir.Lexer.SKIPPED&&n!==ir.Lexer.NA&&!(0,xe.isString)(n)}),t=(0,xe.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:ir.LexerDefinitionErrorType.INVALID_GROUP_TYPE_FOUND,tokenTypes:[i]}});return t}Ve.findInvalidGroupType=ej;function tj(r,e){var t=(0,xe.filter)(r,function(n){return n.PUSH_MODE!==void 0&&!(0,xe.contains)(e,n.PUSH_MODE)}),i=(0,xe.map)(t,function(n){var s="Token Type: ->"+n.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+n.PUSH_MODE+"<-which does not exist";return{message:s,type:ir.LexerDefinitionErrorType.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[n]}});return i}Ve.findModesThatDoNotExist=tj;function rj(r){var e=[],t=(0,xe.reduce)(r,function(i,n,s){var o=n.PATTERN;return o===ir.Lexer.NA||((0,xe.isString)(o)?i.push({str:o,idx:s,tokenType:n}):(0,xe.isRegExp)(o)&&TEe(o)&&i.push({str:o.source,idx:s,tokenType:n})),i},[]);return(0,xe.forEach)(r,function(i,n){(0,xe.forEach)(t,function(s){var o=s.str,a=s.idx,l=s.tokenType;if(n"+i.name+"<-")+`in the lexer's definition. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:c,type:ir.LexerDefinitionErrorType.UNREACHABLE_PATTERN,tokenTypes:[i,l]})}})}),e}Ve.findUnreachablePatterns=rj;function NEe(r,e){if((0,xe.isRegExp)(e)){var t=e.exec(r);return t!==null&&t.index===0}else{if((0,xe.isFunction)(e))return e(r,0,[],{});if((0,xe.has)(e,"exec"))return e.exec(r,0,[],{});if(typeof e=="string")return e===r;throw Error("non exhaustive match")}}function TEe(r){var e=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return(0,xe.find)(e,function(t){return r.source.indexOf(t)!==-1})===void 0}function Nv(r){var e=r.ignoreCase?"i":"";return new RegExp("^(?:"+r.source+")",e)}Ve.addStartOfInput=Nv;function Tv(r){var e=r.ignoreCase?"iy":"y";return new RegExp(""+r.source,e)}Ve.addStickyFlag=Tv;function LEe(r,e,t){var i=[];return(0,xe.has)(r,Ve.DEFAULT_MODE)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Ve.DEFAULT_MODE+`> property in its definition +`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,xe.has)(r,Ve.MODES)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Ve.MODES+`> property in its definition +`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,xe.has)(r,Ve.MODES)&&(0,xe.has)(r,Ve.DEFAULT_MODE)&&!(0,xe.has)(r.modes,r.defaultMode)&&i.push({message:"A MultiMode Lexer cannot be initialized with a "+Ve.DEFAULT_MODE+": <"+r.defaultMode+`>which does not exist +`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,xe.has)(r,Ve.MODES)&&(0,xe.forEach)(r.modes,function(n,s){(0,xe.forEach)(n,function(o,a){(0,xe.isUndefined)(o)&&i.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:"+("<"+s+"> at index: <"+a+`> +`),type:ir.LexerDefinitionErrorType.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})})}),i}Ve.performRuntimeChecks=LEe;function MEe(r,e,t){var i=[],n=!1,s=(0,xe.compact)((0,xe.flatten)((0,xe.mapValues)(r.modes,function(l){return l}))),o=(0,xe.reject)(s,function(l){return l[Do]===ir.Lexer.NA}),a=oj(t);return e&&(0,xe.forEach)(o,function(l){var c=nj(l,a);if(c!==!1){var u=sj(l,c),g={message:u,type:c.issue,tokenType:l};i.push(g)}else(0,xe.has)(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(n=!0):(0,Zg.canMatchCharCode)(a,l.PATTERN)&&(n=!0)}),e&&!n&&i.push({message:`Warning: No LINE_BREAKS Found. + This Lexer has been defined to track line and column information, + But none of the Token Types can be identified as matching a line terminator. + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS + for details.`,type:ir.LexerDefinitionErrorType.NO_LINE_BREAKS_FLAGS}),i}Ve.performWarningRuntimeChecks=MEe;function OEe(r){var e={},t=(0,xe.keys)(r);return(0,xe.forEach)(t,function(i){var n=r[i];if((0,xe.isArray)(n))e[i]=[];else throw Error("non exhaustive match")}),e}Ve.cloneEmptyGroups=OEe;function Mv(r){var e=r.PATTERN;if((0,xe.isRegExp)(e))return!1;if((0,xe.isFunction)(e))return!0;if((0,xe.has)(e,"exec"))return!0;if((0,xe.isString)(e))return!1;throw Error("non exhaustive match")}Ve.isCustomPattern=Mv;function ij(r){return(0,xe.isString)(r)&&r.length===1?r.charCodeAt(0):!1}Ve.isShortPattern=ij;Ve.LineTerminatorOptimizedTester={test:function(r){for(var e=r.length,t=this.lastIndex;t Token Type +`)+(" Root cause: "+e.errMsg+`. +`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(e.issue===ir.LexerDefinitionErrorType.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. +`+(" The problem is in the <"+r.name+`> Token Type +`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}Ve.buildLineBreakIssueMessage=sj;function oj(r){var e=(0,xe.map)(r,function(t){return(0,xe.isString)(t)&&t.length>0?t.charCodeAt(0):t});return e}function Fv(r,e,t){r[e]===void 0?r[e]=[t]:r[e].push(t)}Ve.minOptimizationVal=256;var ny=[];function Lv(r){return r255?255+~~(r/255):r}}});var _g=w(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.isTokenType=Nt.hasExtendingTokensTypesMapProperty=Nt.hasExtendingTokensTypesProperty=Nt.hasCategoriesProperty=Nt.hasShortKeyProperty=Nt.singleAssignCategoriesToksMap=Nt.assignCategoriesMapProp=Nt.assignCategoriesTokensProp=Nt.assignTokenDefaultProps=Nt.expandCategories=Nt.augmentTokenTypes=Nt.tokenIdxToClass=Nt.tokenShortNameIdx=Nt.tokenStructuredMatcherNoCategories=Nt.tokenStructuredMatcher=void 0;var Zr=Gt();function UEe(r,e){var t=r.tokenTypeIdx;return t===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[t]===!0}Nt.tokenStructuredMatcher=UEe;function HEe(r,e){return r.tokenTypeIdx===e.tokenTypeIdx}Nt.tokenStructuredMatcherNoCategories=HEe;Nt.tokenShortNameIdx=1;Nt.tokenIdxToClass={};function GEe(r){var e=aj(r);Aj(e),cj(e),lj(e),(0,Zr.forEach)(e,function(t){t.isParent=t.categoryMatches.length>0})}Nt.augmentTokenTypes=GEe;function aj(r){for(var e=(0,Zr.cloneArr)(r),t=r,i=!0;i;){t=(0,Zr.compact)((0,Zr.flatten)((0,Zr.map)(t,function(s){return s.CATEGORIES})));var n=(0,Zr.difference)(t,e);e=e.concat(n),(0,Zr.isEmpty)(n)?i=!1:t=n}return e}Nt.expandCategories=aj;function Aj(r){(0,Zr.forEach)(r,function(e){uj(e)||(Nt.tokenIdxToClass[Nt.tokenShortNameIdx]=e,e.tokenTypeIdx=Nt.tokenShortNameIdx++),Ov(e)&&!(0,Zr.isArray)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Ov(e)||(e.CATEGORIES=[]),gj(e)||(e.categoryMatches=[]),fj(e)||(e.categoryMatchesMap={})})}Nt.assignTokenDefaultProps=Aj;function lj(r){(0,Zr.forEach)(r,function(e){e.categoryMatches=[],(0,Zr.forEach)(e.categoryMatchesMap,function(t,i){e.categoryMatches.push(Nt.tokenIdxToClass[i].tokenTypeIdx)})})}Nt.assignCategoriesTokensProp=lj;function cj(r){(0,Zr.forEach)(r,function(e){Kv([],e)})}Nt.assignCategoriesMapProp=cj;function Kv(r,e){(0,Zr.forEach)(r,function(t){e.categoryMatchesMap[t.tokenTypeIdx]=!0}),(0,Zr.forEach)(e.CATEGORIES,function(t){var i=r.concat(e);(0,Zr.contains)(i,t)||Kv(i,t)})}Nt.singleAssignCategoriesToksMap=Kv;function uj(r){return(0,Zr.has)(r,"tokenTypeIdx")}Nt.hasShortKeyProperty=uj;function Ov(r){return(0,Zr.has)(r,"CATEGORIES")}Nt.hasCategoriesProperty=Ov;function gj(r){return(0,Zr.has)(r,"categoryMatches")}Nt.hasExtendingTokensTypesProperty=gj;function fj(r){return(0,Zr.has)(r,"categoryMatchesMap")}Nt.hasExtendingTokensTypesMapProperty=fj;function YEe(r){return(0,Zr.has)(r,"tokenTypeIdx")}Nt.isTokenType=YEe});var Uv=w(sy=>{"use strict";Object.defineProperty(sy,"__esModule",{value:!0});sy.defaultLexerErrorProvider=void 0;sy.defaultLexerErrorProvider={buildUnableToPopLexerModeMessage:function(r){return"Unable to pop Lexer Mode after encountering Token ->"+r.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(r,e,t,i,n){return"unexpected character: ->"+r.charAt(e)+"<- at offset: "+e+","+(" skipped "+t+" characters.")}}});var Bd=w(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});Cc.Lexer=Cc.LexerDefinitionErrorType=void 0;var _s=Rv(),nr=Gt(),jEe=_g(),qEe=Uv(),JEe=ty(),WEe;(function(r){r[r.MISSING_PATTERN=0]="MISSING_PATTERN",r[r.INVALID_PATTERN=1]="INVALID_PATTERN",r[r.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",r[r.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",r[r.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",r[r.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",r[r.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",r[r.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",r[r.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",r[r.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",r[r.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",r[r.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",r[r.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",r[r.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",r[r.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",r[r.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",r[r.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"})(WEe=Cc.LexerDefinitionErrorType||(Cc.LexerDefinitionErrorType={}));var bd={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:qEe.defaultLexerErrorProvider,traceInitPerf:!1,skipValidations:!1};Object.freeze(bd);var zEe=function(){function r(e,t){var i=this;if(t===void 0&&(t=bd),this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},typeof t=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. +a boolean 2nd argument is no longer supported`);this.config=(0,nr.merge)(bd,t);var n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",function(){var s,o=!0;i.TRACE_INIT("Lexer Config handling",function(){if(i.config.lineTerminatorsPattern===bd.lineTerminatorsPattern)i.config.lineTerminatorsPattern=_s.LineTerminatorOptimizedTester;else if(i.config.lineTerminatorCharacters===bd.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');i.trackStartLines=/full|onlyStart/i.test(i.config.positionTracking),i.trackEndLines=/full/i.test(i.config.positionTracking),(0,nr.isArray)(e)?(s={modes:{}},s.modes[_s.DEFAULT_MODE]=(0,nr.cloneArr)(e),s[_s.DEFAULT_MODE]=_s.DEFAULT_MODE):(o=!1,s=(0,nr.cloneObj)(e))}),i.config.skipValidations===!1&&(i.TRACE_INIT("performRuntimeChecks",function(){i.lexerDefinitionErrors=i.lexerDefinitionErrors.concat((0,_s.performRuntimeChecks)(s,i.trackStartLines,i.config.lineTerminatorCharacters))}),i.TRACE_INIT("performWarningRuntimeChecks",function(){i.lexerDefinitionWarning=i.lexerDefinitionWarning.concat((0,_s.performWarningRuntimeChecks)(s,i.trackStartLines,i.config.lineTerminatorCharacters))})),s.modes=s.modes?s.modes:{},(0,nr.forEach)(s.modes,function(u,g){s.modes[g]=(0,nr.reject)(u,function(f){return(0,nr.isUndefined)(f)})});var a=(0,nr.keys)(s.modes);if((0,nr.forEach)(s.modes,function(u,g){i.TRACE_INIT("Mode: <"+g+"> processing",function(){if(i.modes.push(g),i.config.skipValidations===!1&&i.TRACE_INIT("validatePatterns",function(){i.lexerDefinitionErrors=i.lexerDefinitionErrors.concat((0,_s.validatePatterns)(u,a))}),(0,nr.isEmpty)(i.lexerDefinitionErrors)){(0,jEe.augmentTokenTypes)(u);var f;i.TRACE_INIT("analyzeTokenTypes",function(){f=(0,_s.analyzeTokenTypes)(u,{lineTerminatorCharacters:i.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:i.TRACE_INIT.bind(i)})}),i.patternIdxToConfig[g]=f.patternIdxToConfig,i.charCodeToPatternIdxToConfig[g]=f.charCodeToPatternIdxToConfig,i.emptyGroups=(0,nr.merge)(i.emptyGroups,f.emptyGroups),i.hasCustom=f.hasCustom||i.hasCustom,i.canModeBeOptimized[g]=f.canBeOptimized}})}),i.defaultMode=s.defaultMode,!(0,nr.isEmpty)(i.lexerDefinitionErrors)&&!i.config.deferDefinitionErrorsHandling){var l=(0,nr.map)(i.lexerDefinitionErrors,function(u){return u.message}),c=l.join(`----------------------- +`);throw new Error(`Errors detected in definition of Lexer: +`+c)}(0,nr.forEach)(i.lexerDefinitionWarning,function(u){(0,nr.PRINT_WARNING)(u.message)}),i.TRACE_INIT("Choosing sub-methods implementations",function(){if(_s.SUPPORT_STICKY?(i.chopInput=nr.IDENTITY,i.match=i.matchWithTest):(i.updateLastIndex=nr.NOOP,i.match=i.matchWithExec),o&&(i.handleModes=nr.NOOP),i.trackStartLines===!1&&(i.computeNewColumn=nr.IDENTITY),i.trackEndLines===!1&&(i.updateTokenEndLineColumnLocation=nr.NOOP),/full/i.test(i.config.positionTracking))i.createTokenInstance=i.createFullToken;else if(/onlyStart/i.test(i.config.positionTracking))i.createTokenInstance=i.createStartOnlyToken;else if(/onlyOffset/i.test(i.config.positionTracking))i.createTokenInstance=i.createOffsetOnlyToken;else throw Error('Invalid config option: "'+i.config.positionTracking+'"');i.hasCustom?(i.addToken=i.addTokenUsingPush,i.handlePayload=i.handlePayloadWithCustom):(i.addToken=i.addTokenUsingMemberAccess,i.handlePayload=i.handlePayloadNoCustom)}),i.TRACE_INIT("Failed Optimization Warnings",function(){var u=(0,nr.reduce)(i.canModeBeOptimized,function(g,f,h){return f===!1&&g.push(h),g},[]);if(t.ensureOptimizations&&!(0,nr.isEmpty)(u))throw Error("Lexer Modes: < "+u.join(", ")+` > cannot be optimized. + Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. + Or inspect the console log for details on how to resolve these issues.`)}),i.TRACE_INIT("clearRegExpParserCache",function(){(0,JEe.clearRegExpParserCache)()}),i.TRACE_INIT("toFastProperties",function(){(0,nr.toFastProperties)(i)})})}return r.prototype.tokenize=function(e,t){if(t===void 0&&(t=this.defaultMode),!(0,nr.isEmpty)(this.lexerDefinitionErrors)){var i=(0,nr.map)(this.lexerDefinitionErrors,function(o){return o.message}),n=i.join(`----------------------- +`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: +`+n)}var s=this.tokenizeInternal(e,t);return s},r.prototype.tokenizeInternal=function(e,t){var i=this,n,s,o,a,l,c,u,g,f,h,p,C,y,B,v,D,T=e,H=T.length,j=0,$=0,V=this.hasCustom?0:Math.floor(e.length/10),W=new Array(V),_=[],A=this.trackStartLines?1:void 0,Ae=this.trackStartLines?1:void 0,ge=(0,_s.cloneEmptyGroups)(this.emptyGroups),re=this.trackStartLines,M=this.config.lineTerminatorsPattern,F=0,ue=[],pe=[],ke=[],Fe=[];Object.freeze(Fe);var Ne=void 0;function oe(){return ue}function le(pr){var Ii=(0,_s.charCodeToOptimizedIndex)(pr),rs=pe[Ii];return rs===void 0?Fe:rs}var Be=function(pr){if(ke.length===1&&pr.tokenType.PUSH_MODE===void 0){var Ii=i.config.errorMessageProvider.buildUnableToPopLexerModeMessage(pr);_.push({offset:pr.startOffset,line:pr.startLine!==void 0?pr.startLine:void 0,column:pr.startColumn!==void 0?pr.startColumn:void 0,length:pr.image.length,message:Ii})}else{ke.pop();var rs=(0,nr.last)(ke);ue=i.patternIdxToConfig[rs],pe=i.charCodeToPatternIdxToConfig[rs],F=ue.length;var fa=i.canModeBeOptimized[rs]&&i.config.safeMode===!1;pe&&fa?Ne=le:Ne=oe}};function fe(pr){ke.push(pr),pe=this.charCodeToPatternIdxToConfig[pr],ue=this.patternIdxToConfig[pr],F=ue.length,F=ue.length;var Ii=this.canModeBeOptimized[pr]&&this.config.safeMode===!1;pe&&Ii?Ne=le:Ne=oe}fe.call(this,t);for(var ae;jc.length){c=a,u=g,ae=_e;break}}}break}}if(c!==null){if(f=c.length,h=ae.group,h!==void 0&&(p=ae.tokenTypeIdx,C=this.createTokenInstance(c,j,p,ae.tokenType,A,Ae,f),this.handlePayload(C,u),h===!1?$=this.addToken(W,$,C):ge[h].push(C)),e=this.chopInput(e,f),j=j+f,Ae=this.computeNewColumn(Ae,f),re===!0&&ae.canLineTerminator===!0){var It=0,Mr=void 0,ii=void 0;M.lastIndex=0;do Mr=M.test(c),Mr===!0&&(ii=M.lastIndex-1,It++);while(Mr===!0);It!==0&&(A=A+It,Ae=f-ii,this.updateTokenEndLineColumnLocation(C,h,ii,It,A,Ae,f))}this.handleModes(ae,Be,fe,C)}else{for(var gi=j,hr=A,fi=Ae,ni=!1;!ni&&j <"+e+">");var n=(0,nr.timer)(t),s=n.time,o=n.value,a=s>10?console.warn:console.log;return this.traceInitIndent time: "+s+"ms"),this.traceInitIndent--,o}else return t()},r.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",r.NA=/NOT_APPLICABLE/,r}();Cc.Lexer=zEe});var LA=w(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});Qi.tokenMatcher=Qi.createTokenInstance=Qi.EOF=Qi.createToken=Qi.hasTokenLabel=Qi.tokenName=Qi.tokenLabel=void 0;var $s=Gt(),VEe=Bd(),Hv=_g();function XEe(r){return wj(r)?r.LABEL:r.name}Qi.tokenLabel=XEe;function ZEe(r){return r.name}Qi.tokenName=ZEe;function wj(r){return(0,$s.isString)(r.LABEL)&&r.LABEL!==""}Qi.hasTokenLabel=wj;var _Ee="parent",hj="categories",pj="label",dj="group",Cj="push_mode",mj="pop_mode",Ej="longer_alt",Ij="line_breaks",yj="start_chars_hint";function Bj(r){return $Ee(r)}Qi.createToken=Bj;function $Ee(r){var e=r.pattern,t={};if(t.name=r.name,(0,$s.isUndefined)(e)||(t.PATTERN=e),(0,$s.has)(r,_Ee))throw`The parent property is no longer supported. +See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return(0,$s.has)(r,hj)&&(t.CATEGORIES=r[hj]),(0,Hv.augmentTokenTypes)([t]),(0,$s.has)(r,pj)&&(t.LABEL=r[pj]),(0,$s.has)(r,dj)&&(t.GROUP=r[dj]),(0,$s.has)(r,mj)&&(t.POP_MODE=r[mj]),(0,$s.has)(r,Cj)&&(t.PUSH_MODE=r[Cj]),(0,$s.has)(r,Ej)&&(t.LONGER_ALT=r[Ej]),(0,$s.has)(r,Ij)&&(t.LINE_BREAKS=r[Ij]),(0,$s.has)(r,yj)&&(t.START_CHARS_HINT=r[yj]),t}Qi.EOF=Bj({name:"EOF",pattern:VEe.Lexer.NA});(0,Hv.augmentTokenTypes)([Qi.EOF]);function eIe(r,e,t,i,n,s,o,a){return{image:e,startOffset:t,endOffset:i,startLine:n,endLine:s,startColumn:o,endColumn:a,tokenTypeIdx:r.tokenTypeIdx,tokenType:r}}Qi.createTokenInstance=eIe;function tIe(r,e){return(0,Hv.tokenStructuredMatcher)(r,e)}Qi.tokenMatcher=tIe});var mn=w(zt=>{"use strict";var Pa=zt&&zt.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(zt,"__esModule",{value:!0});zt.serializeProduction=zt.serializeGrammar=zt.Terminal=zt.Alternation=zt.RepetitionWithSeparator=zt.Repetition=zt.RepetitionMandatoryWithSeparator=zt.RepetitionMandatory=zt.Option=zt.Alternative=zt.Rule=zt.NonTerminal=zt.AbstractProduction=void 0;var Ar=Gt(),rIe=LA(),ko=function(){function r(e){this._definition=e}return Object.defineProperty(r.prototype,"definition",{get:function(){return this._definition},set:function(e){this._definition=e},enumerable:!1,configurable:!0}),r.prototype.accept=function(e){e.visit(this),(0,Ar.forEach)(this.definition,function(t){t.accept(e)})},r}();zt.AbstractProduction=ko;var bj=function(r){Pa(e,r);function e(t){var i=r.call(this,[])||this;return i.idx=1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return Object.defineProperty(e.prototype,"definition",{get:function(){return this.referencedRule!==void 0?this.referencedRule.definition:[]},set:function(t){},enumerable:!1,configurable:!0}),e.prototype.accept=function(t){t.visit(this)},e}(ko);zt.NonTerminal=bj;var Qj=function(r){Pa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.orgText="",(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return e}(ko);zt.Rule=Qj;var Sj=function(r){Pa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.ignoreAmbiguities=!1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return e}(ko);zt.Alternative=Sj;var vj=function(r){Pa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return e}(ko);zt.Option=vj;var xj=function(r){Pa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return e}(ko);zt.RepetitionMandatory=xj;var Pj=function(r){Pa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return e}(ko);zt.RepetitionMandatoryWithSeparator=Pj;var Dj=function(r){Pa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return e}(ko);zt.Repetition=Dj;var kj=function(r){Pa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return e}(ko);zt.RepetitionWithSeparator=kj;var Rj=function(r){Pa(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,i.ignoreAmbiguities=!1,i.hasPredicates=!1,(0,Ar.assign)(i,(0,Ar.pick)(t,function(n){return n!==void 0})),i}return Object.defineProperty(e.prototype,"definition",{get:function(){return this._definition},set:function(t){this._definition=t},enumerable:!1,configurable:!0}),e}(ko);zt.Alternation=Rj;var oy=function(){function r(e){this.idx=1,(0,Ar.assign)(this,(0,Ar.pick)(e,function(t){return t!==void 0}))}return r.prototype.accept=function(e){e.visit(this)},r}();zt.Terminal=oy;function iIe(r){return(0,Ar.map)(r,Qd)}zt.serializeGrammar=iIe;function Qd(r){function e(s){return(0,Ar.map)(s,Qd)}if(r instanceof bj){var t={type:"NonTerminal",name:r.nonTerminalName,idx:r.idx};return(0,Ar.isString)(r.label)&&(t.label=r.label),t}else{if(r instanceof Sj)return{type:"Alternative",definition:e(r.definition)};if(r instanceof vj)return{type:"Option",idx:r.idx,definition:e(r.definition)};if(r instanceof xj)return{type:"RepetitionMandatory",idx:r.idx,definition:e(r.definition)};if(r instanceof Pj)return{type:"RepetitionMandatoryWithSeparator",idx:r.idx,separator:Qd(new oy({terminalType:r.separator})),definition:e(r.definition)};if(r instanceof kj)return{type:"RepetitionWithSeparator",idx:r.idx,separator:Qd(new oy({terminalType:r.separator})),definition:e(r.definition)};if(r instanceof Dj)return{type:"Repetition",idx:r.idx,definition:e(r.definition)};if(r instanceof Rj)return{type:"Alternation",idx:r.idx,definition:e(r.definition)};if(r instanceof oy){var i={type:"Terminal",name:r.terminalType.name,label:(0,rIe.tokenLabel)(r.terminalType),idx:r.idx};(0,Ar.isString)(r.label)&&(i.terminalLabel=r.label);var n=r.terminalType.PATTERN;return r.terminalType.PATTERN&&(i.pattern=(0,Ar.isRegExp)(n)?n.source:n),i}else{if(r instanceof Qj)return{type:"Rule",name:r.name,orgText:r.orgText,definition:e(r.definition)};throw Error("non exhaustive match")}}}zt.serializeProduction=Qd});var Ay=w(ay=>{"use strict";Object.defineProperty(ay,"__esModule",{value:!0});ay.RestWalker=void 0;var Gv=Gt(),En=mn(),nIe=function(){function r(){}return r.prototype.walk=function(e,t){var i=this;t===void 0&&(t=[]),(0,Gv.forEach)(e.definition,function(n,s){var o=(0,Gv.drop)(e.definition,s+1);if(n instanceof En.NonTerminal)i.walkProdRef(n,o,t);else if(n instanceof En.Terminal)i.walkTerminal(n,o,t);else if(n instanceof En.Alternative)i.walkFlat(n,o,t);else if(n instanceof En.Option)i.walkOption(n,o,t);else if(n instanceof En.RepetitionMandatory)i.walkAtLeastOne(n,o,t);else if(n instanceof En.RepetitionMandatoryWithSeparator)i.walkAtLeastOneSep(n,o,t);else if(n instanceof En.RepetitionWithSeparator)i.walkManySep(n,o,t);else if(n instanceof En.Repetition)i.walkMany(n,o,t);else if(n instanceof En.Alternation)i.walkOr(n,o,t);else throw Error("non exhaustive match")})},r.prototype.walkTerminal=function(e,t,i){},r.prototype.walkProdRef=function(e,t,i){},r.prototype.walkFlat=function(e,t,i){var n=t.concat(i);this.walk(e,n)},r.prototype.walkOption=function(e,t,i){var n=t.concat(i);this.walk(e,n)},r.prototype.walkAtLeastOne=function(e,t,i){var n=[new En.Option({definition:e.definition})].concat(t,i);this.walk(e,n)},r.prototype.walkAtLeastOneSep=function(e,t,i){var n=Fj(e,t,i);this.walk(e,n)},r.prototype.walkMany=function(e,t,i){var n=[new En.Option({definition:e.definition})].concat(t,i);this.walk(e,n)},r.prototype.walkManySep=function(e,t,i){var n=Fj(e,t,i);this.walk(e,n)},r.prototype.walkOr=function(e,t,i){var n=this,s=t.concat(i);(0,Gv.forEach)(e.definition,function(o){var a=new En.Alternative({definition:[o]});n.walk(a,s)})},r}();ay.RestWalker=nIe;function Fj(r,e,t){var i=[new En.Option({definition:[new En.Terminal({terminalType:r.separator})].concat(r.definition)})],n=i.concat(e,t);return n}});var $g=w(ly=>{"use strict";Object.defineProperty(ly,"__esModule",{value:!0});ly.GAstVisitor=void 0;var Ro=mn(),sIe=function(){function r(){}return r.prototype.visit=function(e){var t=e;switch(t.constructor){case Ro.NonTerminal:return this.visitNonTerminal(t);case Ro.Alternative:return this.visitAlternative(t);case Ro.Option:return this.visitOption(t);case Ro.RepetitionMandatory:return this.visitRepetitionMandatory(t);case Ro.RepetitionMandatoryWithSeparator:return this.visitRepetitionMandatoryWithSeparator(t);case Ro.RepetitionWithSeparator:return this.visitRepetitionWithSeparator(t);case Ro.Repetition:return this.visitRepetition(t);case Ro.Alternation:return this.visitAlternation(t);case Ro.Terminal:return this.visitTerminal(t);case Ro.Rule:return this.visitRule(t);default:throw Error("non exhaustive match")}},r.prototype.visitNonTerminal=function(e){},r.prototype.visitAlternative=function(e){},r.prototype.visitOption=function(e){},r.prototype.visitRepetition=function(e){},r.prototype.visitRepetitionMandatory=function(e){},r.prototype.visitRepetitionMandatoryWithSeparator=function(e){},r.prototype.visitRepetitionWithSeparator=function(e){},r.prototype.visitAlternation=function(e){},r.prototype.visitTerminal=function(e){},r.prototype.visitRule=function(e){},r}();ly.GAstVisitor=sIe});var vd=w(Oi=>{"use strict";var oIe=Oi&&Oi.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Oi,"__esModule",{value:!0});Oi.collectMethods=Oi.DslMethodsCollectorVisitor=Oi.getProductionDslName=Oi.isBranchingProd=Oi.isOptionalProd=Oi.isSequenceProd=void 0;var Sd=Gt(),br=mn(),aIe=$g();function AIe(r){return r instanceof br.Alternative||r instanceof br.Option||r instanceof br.Repetition||r instanceof br.RepetitionMandatory||r instanceof br.RepetitionMandatoryWithSeparator||r instanceof br.RepetitionWithSeparator||r instanceof br.Terminal||r instanceof br.Rule}Oi.isSequenceProd=AIe;function Yv(r,e){e===void 0&&(e=[]);var t=r instanceof br.Option||r instanceof br.Repetition||r instanceof br.RepetitionWithSeparator;return t?!0:r instanceof br.Alternation?(0,Sd.some)(r.definition,function(i){return Yv(i,e)}):r instanceof br.NonTerminal&&(0,Sd.contains)(e,r)?!1:r instanceof br.AbstractProduction?(r instanceof br.NonTerminal&&e.push(r),(0,Sd.every)(r.definition,function(i){return Yv(i,e)})):!1}Oi.isOptionalProd=Yv;function lIe(r){return r instanceof br.Alternation}Oi.isBranchingProd=lIe;function cIe(r){if(r instanceof br.NonTerminal)return"SUBRULE";if(r instanceof br.Option)return"OPTION";if(r instanceof br.Alternation)return"OR";if(r instanceof br.RepetitionMandatory)return"AT_LEAST_ONE";if(r instanceof br.RepetitionMandatoryWithSeparator)return"AT_LEAST_ONE_SEP";if(r instanceof br.RepetitionWithSeparator)return"MANY_SEP";if(r instanceof br.Repetition)return"MANY";if(r instanceof br.Terminal)return"CONSUME";throw Error("non exhaustive match")}Oi.getProductionDslName=cIe;var Nj=function(r){oIe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.separator="-",t.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},t}return e.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},e.prototype.visitTerminal=function(t){var i=t.terminalType.name+this.separator+"Terminal";(0,Sd.has)(this.dslMethods,i)||(this.dslMethods[i]=[]),this.dslMethods[i].push(t)},e.prototype.visitNonTerminal=function(t){var i=t.nonTerminalName+this.separator+"Terminal";(0,Sd.has)(this.dslMethods,i)||(this.dslMethods[i]=[]),this.dslMethods[i].push(t)},e.prototype.visitOption=function(t){this.dslMethods.option.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.dslMethods.repetitionWithSeparator.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.dslMethods.repetitionMandatory.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)},e.prototype.visitRepetition=function(t){this.dslMethods.repetition.push(t)},e.prototype.visitAlternation=function(t){this.dslMethods.alternation.push(t)},e}(aIe.GAstVisitor);Oi.DslMethodsCollectorVisitor=Nj;var cy=new Nj;function uIe(r){cy.reset(),r.accept(cy);var e=cy.dslMethods;return cy.reset(),e}Oi.collectMethods=uIe});var qv=w(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.firstForTerminal=Fo.firstForBranching=Fo.firstForSequence=Fo.first=void 0;var uy=Gt(),Tj=mn(),jv=vd();function gy(r){if(r instanceof Tj.NonTerminal)return gy(r.referencedRule);if(r instanceof Tj.Terminal)return Oj(r);if((0,jv.isSequenceProd)(r))return Lj(r);if((0,jv.isBranchingProd)(r))return Mj(r);throw Error("non exhaustive match")}Fo.first=gy;function Lj(r){for(var e=[],t=r.definition,i=0,n=t.length>i,s,o=!0;n&&o;)s=t[i],o=(0,jv.isOptionalProd)(s),e=e.concat(gy(s)),i=i+1,n=t.length>i;return(0,uy.uniq)(e)}Fo.firstForSequence=Lj;function Mj(r){var e=(0,uy.map)(r.definition,function(t){return gy(t)});return(0,uy.uniq)((0,uy.flatten)(e))}Fo.firstForBranching=Mj;function Oj(r){return[r.terminalType]}Fo.firstForTerminal=Oj});var Jv=w(fy=>{"use strict";Object.defineProperty(fy,"__esModule",{value:!0});fy.IN=void 0;fy.IN="_~IN~_"});var Yj=w(fs=>{"use strict";var gIe=fs&&fs.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(fs,"__esModule",{value:!0});fs.buildInProdFollowPrefix=fs.buildBetweenProdsFollowPrefix=fs.computeAllProdsFollows=fs.ResyncFollowsWalker=void 0;var fIe=Ay(),hIe=qv(),Kj=Gt(),Uj=Jv(),pIe=mn(),Hj=function(r){gIe(e,r);function e(t){var i=r.call(this)||this;return i.topProd=t,i.follows={},i}return e.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},e.prototype.walkTerminal=function(t,i,n){},e.prototype.walkProdRef=function(t,i,n){var s=Gj(t.referencedRule,t.idx)+this.topProd.name,o=i.concat(n),a=new pIe.Alternative({definition:o}),l=(0,hIe.first)(a);this.follows[s]=l},e}(fIe.RestWalker);fs.ResyncFollowsWalker=Hj;function dIe(r){var e={};return(0,Kj.forEach)(r,function(t){var i=new Hj(t).startWalking();(0,Kj.assign)(e,i)}),e}fs.computeAllProdsFollows=dIe;function Gj(r,e){return r.name+e+Uj.IN}fs.buildBetweenProdsFollowPrefix=Gj;function CIe(r){var e=r.terminalType.name;return e+r.idx+Uj.IN}fs.buildInProdFollowPrefix=CIe});var xd=w(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});Da.defaultGrammarValidatorErrorProvider=Da.defaultGrammarResolverErrorProvider=Da.defaultParserErrorProvider=void 0;var ef=LA(),mIe=Gt(),eo=Gt(),Wv=mn(),jj=vd();Da.defaultParserErrorProvider={buildMismatchTokenMessage:function(r){var e=r.expected,t=r.actual,i=r.previous,n=r.ruleName,s=(0,ef.hasTokenLabel)(e),o=s?"--> "+(0,ef.tokenLabel)(e)+" <--":"token of type --> "+e.name+" <--",a="Expecting "+o+" but found --> '"+t.image+"' <--";return a},buildNotAllInputParsedMessage:function(r){var e=r.firstRedundant,t=r.ruleName;return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage:function(r){var e=r.expectedPathsPerAlt,t=r.actual,i=r.previous,n=r.customUserDescription,s=r.ruleName,o="Expecting: ",a=(0,eo.first)(t).image,l=` +but found: '`+a+"'";if(n)return o+n+l;var c=(0,eo.reduce)(e,function(h,p){return h.concat(p)},[]),u=(0,eo.map)(c,function(h){return"["+(0,eo.map)(h,function(p){return(0,ef.tokenLabel)(p)}).join(", ")+"]"}),g=(0,eo.map)(u,function(h,p){return" "+(p+1)+". "+h}),f=`one of these possible Token sequences: +`+g.join(` +`);return o+f+l},buildEarlyExitMessage:function(r){var e=r.expectedIterationPaths,t=r.actual,i=r.customUserDescription,n=r.ruleName,s="Expecting: ",o=(0,eo.first)(t).image,a=` +but found: '`+o+"'";if(i)return s+i+a;var l=(0,eo.map)(e,function(u){return"["+(0,eo.map)(u,function(g){return(0,ef.tokenLabel)(g)}).join(",")+"]"}),c=`expecting at least one iteration which starts with one of these possible Token sequences:: + `+("<"+l.join(" ,")+">");return s+c+a}};Object.freeze(Da.defaultParserErrorProvider);Da.defaultGrammarResolverErrorProvider={buildRuleNotFoundError:function(r,e){var t="Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- +inside top level rule: ->`+r.name+"<-";return t}};Da.defaultGrammarValidatorErrorProvider={buildDuplicateFoundError:function(r,e){function t(u){return u instanceof Wv.Terminal?u.terminalType.name:u instanceof Wv.NonTerminal?u.nonTerminalName:""}var i=r.name,n=(0,eo.first)(e),s=n.idx,o=(0,jj.getProductionDslName)(n),a=t(n),l=s>0,c="->"+o+(l?s:"")+"<- "+(a?"with argument: ->"+a+"<-":"")+` + appears more than once (`+e.length+" times) in the top level rule: ->"+i+`<-. + For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES + `;return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,` +`),c},buildNamespaceConflictError:function(r){var e=`Namespace conflict found in grammar. +`+("The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+r.name+`>. +`)+`To resolve this make sure each Terminal and Non-Terminal names are unique +This is easy to accomplish by using the convention that Terminal names start with an uppercase letter +and Non-Terminal names start with a lower case letter.`;return e},buildAlternationPrefixAmbiguityError:function(r){var e=(0,eo.map)(r.prefixPath,function(n){return(0,ef.tokenLabel)(n)}).join(", "),t=r.alternation.idx===0?"":r.alternation.idx,i="Ambiguous alternatives: <"+r.ambiguityIndices.join(" ,")+`> due to common lookahead prefix +`+("in inside <"+r.topLevelRule.name+`> Rule, +`)+("<"+e+`> may appears as a prefix path in all these alternatives. +`)+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX +For Further details.`;return i},buildAlternationAmbiguityError:function(r){var e=(0,eo.map)(r.prefixPath,function(n){return(0,ef.tokenLabel)(n)}).join(", "),t=r.alternation.idx===0?"":r.alternation.idx,i="Ambiguous Alternatives Detected: <"+r.ambiguityIndices.join(" ,")+"> in "+(" inside <"+r.topLevelRule.name+`> Rule, +`)+("<"+e+`> may appears as a prefix path in all these alternatives. +`);return i=i+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,i},buildEmptyRepetitionError:function(r){var e=(0,jj.getProductionDslName)(r.repetition);r.repetition.idx!==0&&(e+=r.repetition.idx);var t="The repetition <"+e+"> within Rule <"+r.topLevelRule.name+`> can never consume any tokens. +This could lead to an infinite loop.`;return t},buildTokenNameError:function(r){return"deprecated"},buildEmptyAlternationError:function(r){var e="Ambiguous empty alternative: <"+(r.emptyChoiceIdx+1)+">"+(" in inside <"+r.topLevelRule.name+`> Rule. +`)+"Only the last alternative may be an empty alternative.";return e},buildTooManyAlternativesError:function(r){var e=`An Alternation cannot have more than 256 alternatives: +`+(" inside <"+r.topLevelRule.name+`> Rule. + has `+(r.alternation.definition.length+1)+" alternatives.");return e},buildLeftRecursionError:function(r){var e=r.topLevelRule.name,t=mIe.map(r.leftRecursionPath,function(s){return s.name}),i=e+" --> "+t.concat([e]).join(" --> "),n=`Left Recursion found in grammar. +`+("rule: <"+e+`> can be invoked from itself (directly or indirectly) +`)+(`without consuming any Tokens. The grammar path that causes this is: + `+i+` +`)+` To fix this refactor your grammar to remove the left recursion. +see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;return n},buildInvalidRuleNameError:function(r){return"deprecated"},buildDuplicateRuleNameError:function(r){var e;r.topLevelRule instanceof Wv.Rule?e=r.topLevelRule.name:e=r.topLevelRule;var t="Duplicate definition, rule: ->"+e+"<- is already defined in the grammar: ->"+r.grammarName+"<-";return t}}});var Wj=w(MA=>{"use strict";var EIe=MA&&MA.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(MA,"__esModule",{value:!0});MA.GastRefResolverVisitor=MA.resolveGrammar=void 0;var IIe=jn(),qj=Gt(),yIe=$g();function wIe(r,e){var t=new Jj(r,e);return t.resolveRefs(),t.errors}MA.resolveGrammar=wIe;var Jj=function(r){EIe(e,r);function e(t,i){var n=r.call(this)||this;return n.nameToTopRule=t,n.errMsgProvider=i,n.errors=[],n}return e.prototype.resolveRefs=function(){var t=this;(0,qj.forEach)((0,qj.values)(this.nameToTopRule),function(i){t.currTopLevel=i,i.accept(t)})},e.prototype.visitNonTerminal=function(t){var i=this.nameToTopRule[t.nonTerminalName];if(i)t.referencedRule=i;else{var n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:IIe.ParserDefinitionErrorType.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}},e}(yIe.GAstVisitor);MA.GastRefResolverVisitor=Jj});var Dd=w(Nr=>{"use strict";var mc=Nr&&Nr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Nr,"__esModule",{value:!0});Nr.nextPossibleTokensAfter=Nr.possiblePathsFrom=Nr.NextTerminalAfterAtLeastOneSepWalker=Nr.NextTerminalAfterAtLeastOneWalker=Nr.NextTerminalAfterManySepWalker=Nr.NextTerminalAfterManyWalker=Nr.AbstractNextTerminalAfterProductionWalker=Nr.NextAfterTokenWalker=Nr.AbstractNextPossibleTokensWalker=void 0;var zj=Ay(),Kt=Gt(),BIe=qv(),kt=mn(),Vj=function(r){mc(e,r);function e(t,i){var n=r.call(this)||this;return n.topProd=t,n.path=i,n.possibleTokTypes=[],n.nextProductionName="",n.nextProductionOccurrence=0,n.found=!1,n.isAtEndOfPath=!1,n}return e.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=(0,Kt.cloneArr)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,Kt.cloneArr)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},e.prototype.walk=function(t,i){i===void 0&&(i=[]),this.found||r.prototype.walk.call(this,t,i)},e.prototype.walkProdRef=function(t,i,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){var s=i.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,s)}},e.prototype.updateExpectedNext=function(){(0,Kt.isEmpty)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},e}(zj.RestWalker);Nr.AbstractNextPossibleTokensWalker=Vj;var bIe=function(r){mc(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.path=i,n.nextTerminalName="",n.nextTerminalOccurrence=0,n.nextTerminalName=n.path.lastTok.name,n.nextTerminalOccurrence=n.path.lastTokOccurrence,n}return e.prototype.walkTerminal=function(t,i,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){var s=i.concat(n),o=new kt.Alternative({definition:s});this.possibleTokTypes=(0,BIe.first)(o),this.found=!0}},e}(Vj);Nr.NextAfterTokenWalker=bIe;var Pd=function(r){mc(e,r);function e(t,i){var n=r.call(this)||this;return n.topRule=t,n.occurrence=i,n.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},n}return e.prototype.startWalking=function(){return this.walk(this.topRule),this.result},e}(zj.RestWalker);Nr.AbstractNextTerminalAfterProductionWalker=Pd;var QIe=function(r){mc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkMany=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof kt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkMany.call(this,t,i,n)},e}(Pd);Nr.NextTerminalAfterManyWalker=QIe;var SIe=function(r){mc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkManySep=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof kt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkManySep.call(this,t,i,n)},e}(Pd);Nr.NextTerminalAfterManySepWalker=SIe;var vIe=function(r){mc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkAtLeastOne=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof kt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkAtLeastOne.call(this,t,i,n)},e}(Pd);Nr.NextTerminalAfterAtLeastOneWalker=vIe;var xIe=function(r){mc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkAtLeastOneSep=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof kt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkAtLeastOneSep.call(this,t,i,n)},e}(Pd);Nr.NextTerminalAfterAtLeastOneSepWalker=xIe;function Xj(r,e,t){t===void 0&&(t=[]),t=(0,Kt.cloneArr)(t);var i=[],n=0;function s(c){return c.concat((0,Kt.drop)(r,n+1))}function o(c){var u=Xj(s(c),e,t);return i.concat(u)}for(;t.length=0;ge--){var re=B.definition[ge],M={idx:p,def:re.definition.concat((0,Kt.drop)(h)),ruleStack:C,occurrenceStack:y};g.push(M),g.push(o)}else if(B instanceof kt.Alternative)g.push({idx:p,def:B.definition.concat((0,Kt.drop)(h)),ruleStack:C,occurrenceStack:y});else if(B instanceof kt.Rule)g.push(DIe(B,p,C,y));else throw Error("non exhaustive match")}}return u}Nr.nextPossibleTokensAfter=PIe;function DIe(r,e,t,i){var n=(0,Kt.cloneArr)(t);n.push(r.name);var s=(0,Kt.cloneArr)(i);return s.push(1),{idx:e,def:r.definition,ruleStack:n,occurrenceStack:s}}});var kd=w(Zt=>{"use strict";var $j=Zt&&Zt.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Zt,"__esModule",{value:!0});Zt.areTokenCategoriesNotUsed=Zt.isStrictPrefixOfPath=Zt.containsPath=Zt.getLookaheadPathsForOptionalProd=Zt.getLookaheadPathsForOr=Zt.lookAheadSequenceFromAlternatives=Zt.buildSingleAlternativeLookaheadFunction=Zt.buildAlternativesLookAheadFunc=Zt.buildLookaheadFuncForOptionalProd=Zt.buildLookaheadFuncForOr=Zt.getProdType=Zt.PROD_TYPE=void 0;var sr=Gt(),Zj=Dd(),kIe=Ay(),hy=_g(),OA=mn(),RIe=$g(),oi;(function(r){r[r.OPTION=0]="OPTION",r[r.REPETITION=1]="REPETITION",r[r.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",r[r.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",r[r.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",r[r.ALTERNATION=5]="ALTERNATION"})(oi=Zt.PROD_TYPE||(Zt.PROD_TYPE={}));function FIe(r){if(r instanceof OA.Option)return oi.OPTION;if(r instanceof OA.Repetition)return oi.REPETITION;if(r instanceof OA.RepetitionMandatory)return oi.REPETITION_MANDATORY;if(r instanceof OA.RepetitionMandatoryWithSeparator)return oi.REPETITION_MANDATORY_WITH_SEPARATOR;if(r instanceof OA.RepetitionWithSeparator)return oi.REPETITION_WITH_SEPARATOR;if(r instanceof OA.Alternation)return oi.ALTERNATION;throw Error("non exhaustive match")}Zt.getProdType=FIe;function NIe(r,e,t,i,n,s){var o=tq(r,e,t),a=Xv(o)?hy.tokenStructuredMatcherNoCategories:hy.tokenStructuredMatcher;return s(o,i,a,n)}Zt.buildLookaheadFuncForOr=NIe;function TIe(r,e,t,i,n,s){var o=rq(r,e,n,t),a=Xv(o)?hy.tokenStructuredMatcherNoCategories:hy.tokenStructuredMatcher;return s(o[0],a,i)}Zt.buildLookaheadFuncForOptionalProd=TIe;function LIe(r,e,t,i){var n=r.length,s=(0,sr.every)(r,function(l){return(0,sr.every)(l,function(c){return c.length===1})});if(e)return function(l){for(var c=(0,sr.map)(l,function(D){return D.GATE}),u=0;u{"use strict";var Zv=Vt&&Vt.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Vt,"__esModule",{value:!0});Vt.checkPrefixAlternativesAmbiguities=Vt.validateSomeNonEmptyLookaheadPath=Vt.validateTooManyAlts=Vt.RepetionCollector=Vt.validateAmbiguousAlternationAlternatives=Vt.validateEmptyOrAlternative=Vt.getFirstNoneTerminal=Vt.validateNoLeftRecursion=Vt.validateRuleIsOverridden=Vt.validateRuleDoesNotAlreadyExist=Vt.OccurrenceValidationCollector=Vt.identifyProductionForDuplicates=Vt.validateGrammar=void 0;var er=Gt(),Qr=Gt(),No=jn(),_v=vd(),tf=kd(),HIe=Dd(),to=mn(),$v=$g();function GIe(r,e,t,i,n){var s=er.map(r,function(h){return YIe(h,i)}),o=er.map(r,function(h){return ex(h,h,i)}),a=[],l=[],c=[];(0,Qr.every)(o,Qr.isEmpty)&&(a=(0,Qr.map)(r,function(h){return Aq(h,i)}),l=(0,Qr.map)(r,function(h){return lq(h,e,i)}),c=gq(r,e,i));var u=JIe(r,t,i),g=(0,Qr.map)(r,function(h){return uq(h,i)}),f=(0,Qr.map)(r,function(h){return aq(h,r,n,i)});return er.flatten(s.concat(c,o,a,l,u,g,f))}Vt.validateGrammar=GIe;function YIe(r,e){var t=new oq;r.accept(t);var i=t.allProductions,n=er.groupBy(i,nq),s=er.pick(n,function(a){return a.length>1}),o=er.map(er.values(s),function(a){var l=er.first(a),c=e.buildDuplicateFoundError(r,a),u=(0,_v.getProductionDslName)(l),g={message:c,type:No.ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS,ruleName:r.name,dslName:u,occurrence:l.idx},f=sq(l);return f&&(g.parameter=f),g});return o}function nq(r){return(0,_v.getProductionDslName)(r)+"_#_"+r.idx+"_#_"+sq(r)}Vt.identifyProductionForDuplicates=nq;function sq(r){return r instanceof to.Terminal?r.terminalType.name:r instanceof to.NonTerminal?r.nonTerminalName:""}var oq=function(r){Zv(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.allProductions=[],t}return e.prototype.visitNonTerminal=function(t){this.allProductions.push(t)},e.prototype.visitOption=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e.prototype.visitAlternation=function(t){this.allProductions.push(t)},e.prototype.visitTerminal=function(t){this.allProductions.push(t)},e}($v.GAstVisitor);Vt.OccurrenceValidationCollector=oq;function aq(r,e,t,i){var n=[],s=(0,Qr.reduce)(e,function(a,l){return l.name===r.name?a+1:a},0);if(s>1){var o=i.buildDuplicateRuleNameError({topLevelRule:r,grammarName:t});n.push({message:o,type:No.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:r.name})}return n}Vt.validateRuleDoesNotAlreadyExist=aq;function jIe(r,e,t){var i=[],n;return er.contains(e,r)||(n="Invalid rule override, rule: ->"+r+"<- cannot be overridden in the grammar: ->"+t+"<-as it is not defined in any of the super grammars ",i.push({message:n,type:No.ParserDefinitionErrorType.INVALID_RULE_OVERRIDE,ruleName:r})),i}Vt.validateRuleIsOverridden=jIe;function ex(r,e,t,i){i===void 0&&(i=[]);var n=[],s=Rd(e.definition);if(er.isEmpty(s))return[];var o=r.name,a=er.contains(s,r);a&&n.push({message:t.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:i}),type:No.ParserDefinitionErrorType.LEFT_RECURSION,ruleName:o});var l=er.difference(s,i.concat([r])),c=er.map(l,function(u){var g=er.cloneArr(i);return g.push(u),ex(r,u,t,g)});return n.concat(er.flatten(c))}Vt.validateNoLeftRecursion=ex;function Rd(r){var e=[];if(er.isEmpty(r))return e;var t=er.first(r);if(t instanceof to.NonTerminal)e.push(t.referencedRule);else if(t instanceof to.Alternative||t instanceof to.Option||t instanceof to.RepetitionMandatory||t instanceof to.RepetitionMandatoryWithSeparator||t instanceof to.RepetitionWithSeparator||t instanceof to.Repetition)e=e.concat(Rd(t.definition));else if(t instanceof to.Alternation)e=er.flatten(er.map(t.definition,function(o){return Rd(o.definition)}));else if(!(t instanceof to.Terminal))throw Error("non exhaustive match");var i=(0,_v.isOptionalProd)(t),n=r.length>1;if(i&&n){var s=er.drop(r);return e.concat(Rd(s))}else return e}Vt.getFirstNoneTerminal=Rd;var tx=function(r){Zv(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.alternations=[],t}return e.prototype.visitAlternation=function(t){this.alternations.push(t)},e}($v.GAstVisitor);function Aq(r,e){var t=new tx;r.accept(t);var i=t.alternations,n=er.reduce(i,function(s,o){var a=er.dropRight(o.definition),l=er.map(a,function(c,u){var g=(0,HIe.nextPossibleTokensAfter)([c],[],null,1);return er.isEmpty(g)?{message:e.buildEmptyAlternationError({topLevelRule:r,alternation:o,emptyChoiceIdx:u}),type:No.ParserDefinitionErrorType.NONE_LAST_EMPTY_ALT,ruleName:r.name,occurrence:o.idx,alternative:u+1}:null});return s.concat(er.compact(l))},[]);return n}Vt.validateEmptyOrAlternative=Aq;function lq(r,e,t){var i=new tx;r.accept(i);var n=i.alternations;n=(0,Qr.reject)(n,function(o){return o.ignoreAmbiguities===!0});var s=er.reduce(n,function(o,a){var l=a.idx,c=a.maxLookahead||e,u=(0,tf.getLookaheadPathsForOr)(l,r,c,a),g=qIe(u,a,r,t),f=fq(u,a,r,t);return o.concat(g,f)},[]);return s}Vt.validateAmbiguousAlternationAlternatives=lq;var cq=function(r){Zv(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.allProductions=[],t}return e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e}($v.GAstVisitor);Vt.RepetionCollector=cq;function uq(r,e){var t=new tx;r.accept(t);var i=t.alternations,n=er.reduce(i,function(s,o){return o.definition.length>255&&s.push({message:e.buildTooManyAlternativesError({topLevelRule:r,alternation:o}),type:No.ParserDefinitionErrorType.TOO_MANY_ALTS,ruleName:r.name,occurrence:o.idx}),s},[]);return n}Vt.validateTooManyAlts=uq;function gq(r,e,t){var i=[];return(0,Qr.forEach)(r,function(n){var s=new cq;n.accept(s);var o=s.allProductions;(0,Qr.forEach)(o,function(a){var l=(0,tf.getProdType)(a),c=a.maxLookahead||e,u=a.idx,g=(0,tf.getLookaheadPathsForOptionalProd)(u,n,l,c),f=g[0];if((0,Qr.isEmpty)((0,Qr.flatten)(f))){var h=t.buildEmptyRepetitionError({topLevelRule:n,repetition:a});i.push({message:h,type:No.ParserDefinitionErrorType.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name})}})}),i}Vt.validateSomeNonEmptyLookaheadPath=gq;function qIe(r,e,t,i){var n=[],s=(0,Qr.reduce)(r,function(a,l,c){return e.definition[c].ignoreAmbiguities===!0||(0,Qr.forEach)(l,function(u){var g=[c];(0,Qr.forEach)(r,function(f,h){c!==h&&(0,tf.containsPath)(f,u)&&e.definition[h].ignoreAmbiguities!==!0&&g.push(h)}),g.length>1&&!(0,tf.containsPath)(n,u)&&(n.push(u),a.push({alts:g,path:u}))}),a},[]),o=er.map(s,function(a){var l=(0,Qr.map)(a.alts,function(u){return u+1}),c=i.buildAlternationAmbiguityError({topLevelRule:t,alternation:e,ambiguityIndices:l,prefixPath:a.path});return{message:c,type:No.ParserDefinitionErrorType.AMBIGUOUS_ALTS,ruleName:t.name,occurrence:e.idx,alternatives:[a.alts]}});return o}function fq(r,e,t,i){var n=[],s=(0,Qr.reduce)(r,function(o,a,l){var c=(0,Qr.map)(a,function(u){return{idx:l,path:u}});return o.concat(c)},[]);return(0,Qr.forEach)(s,function(o){var a=e.definition[o.idx];if(a.ignoreAmbiguities!==!0){var l=o.idx,c=o.path,u=(0,Qr.findAll)(s,function(f){return e.definition[f.idx].ignoreAmbiguities!==!0&&f.idx{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});rf.validateGrammar=rf.resolveGrammar=void 0;var ix=Gt(),WIe=Wj(),zIe=rx(),hq=xd();function VIe(r){r=(0,ix.defaults)(r,{errMsgProvider:hq.defaultGrammarResolverErrorProvider});var e={};return(0,ix.forEach)(r.rules,function(t){e[t.name]=t}),(0,WIe.resolveGrammar)(e,r.errMsgProvider)}rf.resolveGrammar=VIe;function XIe(r){return r=(0,ix.defaults)(r,{errMsgProvider:hq.defaultGrammarValidatorErrorProvider}),(0,zIe.validateGrammar)(r.rules,r.maxLookahead,r.tokenTypes,r.errMsgProvider,r.grammarName)}rf.validateGrammar=XIe});var nf=w(In=>{"use strict";var Fd=In&&In.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(In,"__esModule",{value:!0});In.EarlyExitException=In.NotAllInputParsedException=In.NoViableAltException=In.MismatchedTokenException=In.isRecognitionException=void 0;var ZIe=Gt(),dq="MismatchedTokenException",Cq="NoViableAltException",mq="EarlyExitException",Eq="NotAllInputParsedException",Iq=[dq,Cq,mq,Eq];Object.freeze(Iq);function _Ie(r){return(0,ZIe.contains)(Iq,r.name)}In.isRecognitionException=_Ie;var py=function(r){Fd(e,r);function e(t,i){var n=this.constructor,s=r.call(this,t)||this;return s.token=i,s.resyncedTokens=[],Object.setPrototypeOf(s,n.prototype),Error.captureStackTrace&&Error.captureStackTrace(s,s.constructor),s}return e}(Error),$Ie=function(r){Fd(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=dq,s}return e}(py);In.MismatchedTokenException=$Ie;var eye=function(r){Fd(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=Cq,s}return e}(py);In.NoViableAltException=eye;var tye=function(r){Fd(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.name=Eq,n}return e}(py);In.NotAllInputParsedException=tye;var rye=function(r){Fd(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=mq,s}return e}(py);In.EarlyExitException=rye});var sx=w(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.attemptInRepetitionRecovery=Ki.Recoverable=Ki.InRuleRecoveryException=Ki.IN_RULE_RECOVERY_EXCEPTION=Ki.EOF_FOLLOW_KEY=void 0;var dy=LA(),hs=Gt(),iye=nf(),nye=Jv(),sye=jn();Ki.EOF_FOLLOW_KEY={};Ki.IN_RULE_RECOVERY_EXCEPTION="InRuleRecoveryException";function nx(r){this.name=Ki.IN_RULE_RECOVERY_EXCEPTION,this.message=r}Ki.InRuleRecoveryException=nx;nx.prototype=Error.prototype;var oye=function(){function r(){}return r.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,hs.has)(e,"recoveryEnabled")?e.recoveryEnabled:sye.DEFAULT_PARSER_CONFIG.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=yq)},r.prototype.getTokenToInsert=function(e){var t=(0,dy.createTokenInstance)(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t},r.prototype.canTokenTypeBeInsertedInRecovery=function(e){return!0},r.prototype.tryInRepetitionRecovery=function(e,t,i,n){for(var s=this,o=this.findReSyncTokenType(),a=this.exportLexerState(),l=[],c=!1,u=this.LA(1),g=this.LA(1),f=function(){var h=s.LA(0),p=s.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:u,previous:h,ruleName:s.getCurrRuleFullName()}),C=new iye.MismatchedTokenException(p,u,s.LA(0));C.resyncedTokens=(0,hs.dropRight)(l),s.SAVE_ERROR(C)};!c;)if(this.tokenMatcher(g,n)){f();return}else if(i.call(this)){f(),e.apply(this,t);return}else this.tokenMatcher(g,o)?c=!0:(g=this.SKIP_TOKEN(),this.addToResyncTokens(g,l));this.importLexerState(a)},r.prototype.shouldInRepetitionRecoveryBeTried=function(e,t,i){return!(i===!1||e===void 0||t===void 0||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))},r.prototype.getFollowsForInRuleRecovery=function(e,t){var i=this.getCurrentGrammarPath(e,t),n=this.getNextPossibleTokenTypes(i);return n},r.prototype.tryInRuleRecovery=function(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t)){var i=this.getTokenToInsert(e);return i}if(this.canRecoverWithSingleTokenDeletion(e)){var n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new nx("sad sad panda")},r.prototype.canPerformInRuleRecovery=function(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)},r.prototype.canRecoverWithSingleTokenInsertion=function(e,t){var i=this;if(!this.canTokenTypeBeInsertedInRecovery(e)||(0,hs.isEmpty)(t))return!1;var n=this.LA(1),s=(0,hs.find)(t,function(o){return i.tokenMatcher(n,o)})!==void 0;return s},r.prototype.canRecoverWithSingleTokenDeletion=function(e){var t=this.tokenMatcher(this.LA(2),e);return t},r.prototype.isInCurrentRuleReSyncSet=function(e){var t=this.getCurrFollowKey(),i=this.getFollowSetFromFollowKey(t);return(0,hs.contains)(i,e)},r.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),t=this.LA(1),i=2;;){var n=t.tokenType;if((0,hs.contains)(e,n))return n;t=this.LA(i),i++}},r.prototype.getCurrFollowKey=function(){if(this.RULE_STACK.length===1)return Ki.EOF_FOLLOW_KEY;var e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),i=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(i)}},r.prototype.buildFullFollowKeyStack=function(){var e=this,t=this.RULE_STACK,i=this.RULE_OCCURRENCE_STACK;return(0,hs.map)(t,function(n,s){return s===0?Ki.EOF_FOLLOW_KEY:{ruleName:e.shortRuleNameToFullName(n),idxInCallingRule:i[s],inRule:e.shortRuleNameToFullName(t[s-1])}})},r.prototype.flattenFollowSet=function(){var e=this,t=(0,hs.map)(this.buildFullFollowKeyStack(),function(i){return e.getFollowSetFromFollowKey(i)});return(0,hs.flatten)(t)},r.prototype.getFollowSetFromFollowKey=function(e){if(e===Ki.EOF_FOLLOW_KEY)return[dy.EOF];var t=e.ruleName+e.idxInCallingRule+nye.IN+e.inRule;return this.resyncFollows[t]},r.prototype.addToResyncTokens=function(e,t){return this.tokenMatcher(e,dy.EOF)||t.push(e),t},r.prototype.reSyncTo=function(e){for(var t=[],i=this.LA(1);this.tokenMatcher(i,e)===!1;)i=this.SKIP_TOKEN(),this.addToResyncTokens(i,t);return(0,hs.dropRight)(t)},r.prototype.attemptInRepetitionRecovery=function(e,t,i,n,s,o,a){},r.prototype.getCurrentGrammarPath=function(e,t){var i=this.getHumanReadableRuleStack(),n=(0,hs.cloneArr)(this.RULE_OCCURRENCE_STACK),s={ruleStack:i,occurrenceStack:n,lastTok:e,lastTokOccurrence:t};return s},r.prototype.getHumanReadableRuleStack=function(){var e=this;return(0,hs.map)(this.RULE_STACK,function(t){return e.shortRuleNameToFullName(t)})},r}();Ki.Recoverable=oye;function yq(r,e,t,i,n,s,o){var a=this.getKeyForAutomaticLookahead(i,n),l=this.firstAfterRepMap[a];if(l===void 0){var c=this.getCurrRuleFullName(),u=this.getGAstProductions()[c],g=new s(u,n);l=g.startWalking(),this.firstAfterRepMap[a]=l}var f=l.token,h=l.occurrence,p=l.isEndOfRule;this.RULE_STACK.length===1&&p&&f===void 0&&(f=dy.EOF,h=1),this.shouldInRepetitionRecoveryBeTried(f,h,o)&&this.tryInRepetitionRecovery(r,e,t,f)}Ki.attemptInRepetitionRecovery=yq});var Cy=w(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.getKeyForAutomaticLookahead=Jt.AT_LEAST_ONE_SEP_IDX=Jt.MANY_SEP_IDX=Jt.AT_LEAST_ONE_IDX=Jt.MANY_IDX=Jt.OPTION_IDX=Jt.OR_IDX=Jt.BITS_FOR_ALT_IDX=Jt.BITS_FOR_RULE_IDX=Jt.BITS_FOR_OCCURRENCE_IDX=Jt.BITS_FOR_METHOD_TYPE=void 0;Jt.BITS_FOR_METHOD_TYPE=4;Jt.BITS_FOR_OCCURRENCE_IDX=8;Jt.BITS_FOR_RULE_IDX=12;Jt.BITS_FOR_ALT_IDX=8;Jt.OR_IDX=1<{"use strict";Object.defineProperty(my,"__esModule",{value:!0});my.LooksAhead=void 0;var ka=kd(),ro=Gt(),wq=jn(),Ra=Cy(),Ec=vd(),Aye=function(){function r(){}return r.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=(0,ro.has)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:wq.DEFAULT_PARSER_CONFIG.dynamicTokensEnabled,this.maxLookahead=(0,ro.has)(e,"maxLookahead")?e.maxLookahead:wq.DEFAULT_PARSER_CONFIG.maxLookahead,this.lookAheadFuncsCache=(0,ro.isES2015MapSupported)()?new Map:[],(0,ro.isES2015MapSupported)()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},r.prototype.preComputeLookaheadFunctions=function(e){var t=this;(0,ro.forEach)(e,function(i){t.TRACE_INIT(i.name+" Rule Lookahead",function(){var n=(0,Ec.collectMethods)(i),s=n.alternation,o=n.repetition,a=n.option,l=n.repetitionMandatory,c=n.repetitionMandatoryWithSeparator,u=n.repetitionWithSeparator;(0,ro.forEach)(s,function(g){var f=g.idx===0?"":g.idx;t.TRACE_INIT(""+(0,Ec.getProductionDslName)(g)+f,function(){var h=(0,ka.buildLookaheadFuncForOr)(g.idx,i,g.maxLookahead||t.maxLookahead,g.hasPredicates,t.dynamicTokensEnabled,t.lookAheadBuilderForAlternatives),p=(0,Ra.getKeyForAutomaticLookahead)(t.fullRuleNameToShort[i.name],Ra.OR_IDX,g.idx);t.setLaFuncCache(p,h)})}),(0,ro.forEach)(o,function(g){t.computeLookaheadFunc(i,g.idx,Ra.MANY_IDX,ka.PROD_TYPE.REPETITION,g.maxLookahead,(0,Ec.getProductionDslName)(g))}),(0,ro.forEach)(a,function(g){t.computeLookaheadFunc(i,g.idx,Ra.OPTION_IDX,ka.PROD_TYPE.OPTION,g.maxLookahead,(0,Ec.getProductionDslName)(g))}),(0,ro.forEach)(l,function(g){t.computeLookaheadFunc(i,g.idx,Ra.AT_LEAST_ONE_IDX,ka.PROD_TYPE.REPETITION_MANDATORY,g.maxLookahead,(0,Ec.getProductionDslName)(g))}),(0,ro.forEach)(c,function(g){t.computeLookaheadFunc(i,g.idx,Ra.AT_LEAST_ONE_SEP_IDX,ka.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,g.maxLookahead,(0,Ec.getProductionDslName)(g))}),(0,ro.forEach)(u,function(g){t.computeLookaheadFunc(i,g.idx,Ra.MANY_SEP_IDX,ka.PROD_TYPE.REPETITION_WITH_SEPARATOR,g.maxLookahead,(0,Ec.getProductionDslName)(g))})})})},r.prototype.computeLookaheadFunc=function(e,t,i,n,s,o){var a=this;this.TRACE_INIT(""+o+(t===0?"":t),function(){var l=(0,ka.buildLookaheadFuncForOptionalProd)(t,e,s||a.maxLookahead,a.dynamicTokensEnabled,n,a.lookAheadBuilderForOptional),c=(0,Ra.getKeyForAutomaticLookahead)(a.fullRuleNameToShort[e.name],i,t);a.setLaFuncCache(c,l)})},r.prototype.lookAheadBuilderForOptional=function(e,t,i){return(0,ka.buildSingleAlternativeLookaheadFunction)(e,t,i)},r.prototype.lookAheadBuilderForAlternatives=function(e,t,i,n){return(0,ka.buildAlternativesLookAheadFunc)(e,t,i,n)},r.prototype.getKeyForAutomaticLookahead=function(e,t){var i=this.getLastExplicitRuleShortName();return(0,Ra.getKeyForAutomaticLookahead)(i,e,t)},r.prototype.getLaFuncFromCache=function(e){},r.prototype.getLaFuncFromMap=function(e){return this.lookAheadFuncsCache.get(e)},r.prototype.getLaFuncFromObj=function(e){return this.lookAheadFuncsCache[e]},r.prototype.setLaFuncCache=function(e,t){},r.prototype.setLaFuncCacheUsingMap=function(e,t){this.lookAheadFuncsCache.set(e,t)},r.prototype.setLaFuncUsingObj=function(e,t){this.lookAheadFuncsCache[e]=t},r}();my.LooksAhead=Aye});var bq=w(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.addNoneTerminalToCst=To.addTerminalToCst=To.setNodeLocationFull=To.setNodeLocationOnlyOffset=void 0;function lye(r,e){isNaN(r.startOffset)===!0?(r.startOffset=e.startOffset,r.endOffset=e.endOffset):r.endOffset{"use strict";Object.defineProperty(KA,"__esModule",{value:!0});KA.defineNameProp=KA.functionName=KA.classNameFromInstance=void 0;var fye=Gt();function hye(r){return Sq(r.constructor)}KA.classNameFromInstance=hye;var Qq="name";function Sq(r){var e=r.name;return e||"anonymous"}KA.functionName=Sq;function pye(r,e){var t=Object.getOwnPropertyDescriptor(r,Qq);return(0,fye.isUndefined)(t)||t.configurable?(Object.defineProperty(r,Qq,{enumerable:!1,configurable:!0,writable:!1,value:e}),!0):!1}KA.defineNameProp=pye});var kq=w(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.validateRedundantMethods=Si.validateMissingCstMethods=Si.validateVisitor=Si.CstVisitorDefinitionError=Si.createBaseVisitorConstructorWithDefaults=Si.createBaseSemanticVisitorConstructor=Si.defaultVisit=void 0;var ps=Gt(),Nd=ox();function vq(r,e){for(var t=(0,ps.keys)(r),i=t.length,n=0;n: + `+(""+s.join(` + +`).replace(/\n/g,` + `)))}}};return t.prototype=i,t.prototype.constructor=t,t._RULE_NAMES=e,t}Si.createBaseSemanticVisitorConstructor=dye;function Cye(r,e,t){var i=function(){};(0,Nd.defineNameProp)(i,r+"BaseSemanticsWithDefaults");var n=Object.create(t.prototype);return(0,ps.forEach)(e,function(s){n[s]=vq}),i.prototype=n,i.prototype.constructor=i,i}Si.createBaseVisitorConstructorWithDefaults=Cye;var ax;(function(r){r[r.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",r[r.MISSING_METHOD=1]="MISSING_METHOD"})(ax=Si.CstVisitorDefinitionError||(Si.CstVisitorDefinitionError={}));function xq(r,e){var t=Pq(r,e),i=Dq(r,e);return t.concat(i)}Si.validateVisitor=xq;function Pq(r,e){var t=(0,ps.map)(e,function(i){if(!(0,ps.isFunction)(r[i]))return{msg:"Missing visitor method: <"+i+"> on "+(0,Nd.functionName)(r.constructor)+" CST Visitor.",type:ax.MISSING_METHOD,methodName:i}});return(0,ps.compact)(t)}Si.validateMissingCstMethods=Pq;var mye=["constructor","visit","validateVisitor"];function Dq(r,e){var t=[];for(var i in r)(0,ps.isFunction)(r[i])&&!(0,ps.contains)(mye,i)&&!(0,ps.contains)(e,i)&&t.push({msg:"Redundant visitor method: <"+i+"> on "+(0,Nd.functionName)(r.constructor)+` CST Visitor +There is no Grammar Rule corresponding to this method's name. +`,type:ax.REDUNDANT_METHOD,methodName:i});return t}Si.validateRedundantMethods=Dq});var Fq=w(Ey=>{"use strict";Object.defineProperty(Ey,"__esModule",{value:!0});Ey.TreeBuilder=void 0;var sf=bq(),_r=Gt(),Rq=kq(),Eye=jn(),Iye=function(){function r(){}return r.prototype.initTreeBuilder=function(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(0,_r.has)(e,"nodeLocationTracking")?e.nodeLocationTracking:Eye.DEFAULT_PARSER_CONFIG.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=_r.NOOP,this.cstFinallyStateUpdate=_r.NOOP,this.cstPostTerminal=_r.NOOP,this.cstPostNonTerminal=_r.NOOP,this.cstPostRule=_r.NOOP;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=sf.setNodeLocationFull,this.setNodeLocationFromNode=sf.setNodeLocationFull,this.cstPostRule=_r.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=_r.NOOP,this.setNodeLocationFromNode=_r.NOOP,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=sf.setNodeLocationOnlyOffset,this.setNodeLocationFromNode=sf.setNodeLocationOnlyOffset,this.cstPostRule=_r.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=_r.NOOP,this.setNodeLocationFromNode=_r.NOOP,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=_r.NOOP,this.setNodeLocationFromNode=_r.NOOP,this.cstPostRule=_r.NOOP,this.setInitialNodeLocation=_r.NOOP;else throw Error('Invalid config option: "'+e.nodeLocationTracking+'"')},r.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(e){e.location={startOffset:NaN,endOffset:NaN}},r.prototype.setInitialNodeLocationOnlyOffsetRegular=function(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},r.prototype.setInitialNodeLocationFullRecovery=function(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},r.prototype.setInitialNodeLocationFullRegular=function(e){var t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},r.prototype.cstInvocationStateUpdate=function(e,t){var i={name:e,children:{}};this.setInitialNodeLocation(i),this.CST_STACK.push(i)},r.prototype.cstFinallyStateUpdate=function(){this.CST_STACK.pop()},r.prototype.cstPostRuleFull=function(e){var t=this.LA(0),i=e.location;i.startOffset<=t.startOffset?(i.endOffset=t.endOffset,i.endLine=t.endLine,i.endColumn=t.endColumn):(i.startOffset=NaN,i.startLine=NaN,i.startColumn=NaN)},r.prototype.cstPostRuleOnlyOffset=function(e){var t=this.LA(0),i=e.location;i.startOffset<=t.startOffset?i.endOffset=t.endOffset:i.startOffset=NaN},r.prototype.cstPostTerminal=function(e,t){var i=this.CST_STACK[this.CST_STACK.length-1];(0,sf.addTerminalToCst)(i,t,e),this.setNodeLocationFromToken(i.location,t)},r.prototype.cstPostNonTerminal=function(e,t){var i=this.CST_STACK[this.CST_STACK.length-1];(0,sf.addNoneTerminalToCst)(i,t,e),this.setNodeLocationFromNode(i.location,e.location)},r.prototype.getBaseCstVisitorConstructor=function(){if((0,_r.isUndefined)(this.baseCstVisitorConstructor)){var e=(0,Rq.createBaseSemanticVisitorConstructor)(this.className,(0,_r.keys)(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor},r.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if((0,_r.isUndefined)(this.baseCstVisitorWithDefaultsConstructor)){var e=(0,Rq.createBaseVisitorConstructorWithDefaults)(this.className,(0,_r.keys)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor},r.prototype.getLastExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-1]},r.prototype.getPreviousExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-2]},r.prototype.getLastExplicitRuleOccurrenceIndex=function(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]},r}();Ey.TreeBuilder=Iye});var Tq=w(Iy=>{"use strict";Object.defineProperty(Iy,"__esModule",{value:!0});Iy.LexerAdapter=void 0;var Nq=jn(),yye=function(){function r(){}return r.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(r.prototype,"input",{get:function(){return this.tokVector},set:function(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length},enumerable:!1,configurable:!0}),r.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Nq.END_OF_FILE},r.prototype.LA=function(e){var t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Nq.END_OF_FILE:this.tokVector[t]},r.prototype.consumeToken=function(){this.currIdx++},r.prototype.exportLexerState=function(){return this.currIdx},r.prototype.importLexerState=function(e){this.currIdx=e},r.prototype.resetLexerState=function(){this.currIdx=-1},r.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},r.prototype.getLexerPosition=function(){return this.exportLexerState()},r}();Iy.LexerAdapter=yye});var Mq=w(yy=>{"use strict";Object.defineProperty(yy,"__esModule",{value:!0});yy.RecognizerApi=void 0;var Lq=Gt(),wye=nf(),Ax=jn(),Bye=xd(),bye=rx(),Qye=mn(),Sye=function(){function r(){}return r.prototype.ACTION=function(e){return e.call(this)},r.prototype.consume=function(e,t,i){return this.consumeInternal(t,e,i)},r.prototype.subrule=function(e,t,i){return this.subruleInternal(t,e,i)},r.prototype.option=function(e,t){return this.optionInternal(t,e)},r.prototype.or=function(e,t){return this.orInternal(t,e)},r.prototype.many=function(e,t){return this.manyInternal(e,t)},r.prototype.atLeastOne=function(e,t){return this.atLeastOneInternal(e,t)},r.prototype.CONSUME=function(e,t){return this.consumeInternal(e,0,t)},r.prototype.CONSUME1=function(e,t){return this.consumeInternal(e,1,t)},r.prototype.CONSUME2=function(e,t){return this.consumeInternal(e,2,t)},r.prototype.CONSUME3=function(e,t){return this.consumeInternal(e,3,t)},r.prototype.CONSUME4=function(e,t){return this.consumeInternal(e,4,t)},r.prototype.CONSUME5=function(e,t){return this.consumeInternal(e,5,t)},r.prototype.CONSUME6=function(e,t){return this.consumeInternal(e,6,t)},r.prototype.CONSUME7=function(e,t){return this.consumeInternal(e,7,t)},r.prototype.CONSUME8=function(e,t){return this.consumeInternal(e,8,t)},r.prototype.CONSUME9=function(e,t){return this.consumeInternal(e,9,t)},r.prototype.SUBRULE=function(e,t){return this.subruleInternal(e,0,t)},r.prototype.SUBRULE1=function(e,t){return this.subruleInternal(e,1,t)},r.prototype.SUBRULE2=function(e,t){return this.subruleInternal(e,2,t)},r.prototype.SUBRULE3=function(e,t){return this.subruleInternal(e,3,t)},r.prototype.SUBRULE4=function(e,t){return this.subruleInternal(e,4,t)},r.prototype.SUBRULE5=function(e,t){return this.subruleInternal(e,5,t)},r.prototype.SUBRULE6=function(e,t){return this.subruleInternal(e,6,t)},r.prototype.SUBRULE7=function(e,t){return this.subruleInternal(e,7,t)},r.prototype.SUBRULE8=function(e,t){return this.subruleInternal(e,8,t)},r.prototype.SUBRULE9=function(e,t){return this.subruleInternal(e,9,t)},r.prototype.OPTION=function(e){return this.optionInternal(e,0)},r.prototype.OPTION1=function(e){return this.optionInternal(e,1)},r.prototype.OPTION2=function(e){return this.optionInternal(e,2)},r.prototype.OPTION3=function(e){return this.optionInternal(e,3)},r.prototype.OPTION4=function(e){return this.optionInternal(e,4)},r.prototype.OPTION5=function(e){return this.optionInternal(e,5)},r.prototype.OPTION6=function(e){return this.optionInternal(e,6)},r.prototype.OPTION7=function(e){return this.optionInternal(e,7)},r.prototype.OPTION8=function(e){return this.optionInternal(e,8)},r.prototype.OPTION9=function(e){return this.optionInternal(e,9)},r.prototype.OR=function(e){return this.orInternal(e,0)},r.prototype.OR1=function(e){return this.orInternal(e,1)},r.prototype.OR2=function(e){return this.orInternal(e,2)},r.prototype.OR3=function(e){return this.orInternal(e,3)},r.prototype.OR4=function(e){return this.orInternal(e,4)},r.prototype.OR5=function(e){return this.orInternal(e,5)},r.prototype.OR6=function(e){return this.orInternal(e,6)},r.prototype.OR7=function(e){return this.orInternal(e,7)},r.prototype.OR8=function(e){return this.orInternal(e,8)},r.prototype.OR9=function(e){return this.orInternal(e,9)},r.prototype.MANY=function(e){this.manyInternal(0,e)},r.prototype.MANY1=function(e){this.manyInternal(1,e)},r.prototype.MANY2=function(e){this.manyInternal(2,e)},r.prototype.MANY3=function(e){this.manyInternal(3,e)},r.prototype.MANY4=function(e){this.manyInternal(4,e)},r.prototype.MANY5=function(e){this.manyInternal(5,e)},r.prototype.MANY6=function(e){this.manyInternal(6,e)},r.prototype.MANY7=function(e){this.manyInternal(7,e)},r.prototype.MANY8=function(e){this.manyInternal(8,e)},r.prototype.MANY9=function(e){this.manyInternal(9,e)},r.prototype.MANY_SEP=function(e){this.manySepFirstInternal(0,e)},r.prototype.MANY_SEP1=function(e){this.manySepFirstInternal(1,e)},r.prototype.MANY_SEP2=function(e){this.manySepFirstInternal(2,e)},r.prototype.MANY_SEP3=function(e){this.manySepFirstInternal(3,e)},r.prototype.MANY_SEP4=function(e){this.manySepFirstInternal(4,e)},r.prototype.MANY_SEP5=function(e){this.manySepFirstInternal(5,e)},r.prototype.MANY_SEP6=function(e){this.manySepFirstInternal(6,e)},r.prototype.MANY_SEP7=function(e){this.manySepFirstInternal(7,e)},r.prototype.MANY_SEP8=function(e){this.manySepFirstInternal(8,e)},r.prototype.MANY_SEP9=function(e){this.manySepFirstInternal(9,e)},r.prototype.AT_LEAST_ONE=function(e){this.atLeastOneInternal(0,e)},r.prototype.AT_LEAST_ONE1=function(e){return this.atLeastOneInternal(1,e)},r.prototype.AT_LEAST_ONE2=function(e){this.atLeastOneInternal(2,e)},r.prototype.AT_LEAST_ONE3=function(e){this.atLeastOneInternal(3,e)},r.prototype.AT_LEAST_ONE4=function(e){this.atLeastOneInternal(4,e)},r.prototype.AT_LEAST_ONE5=function(e){this.atLeastOneInternal(5,e)},r.prototype.AT_LEAST_ONE6=function(e){this.atLeastOneInternal(6,e)},r.prototype.AT_LEAST_ONE7=function(e){this.atLeastOneInternal(7,e)},r.prototype.AT_LEAST_ONE8=function(e){this.atLeastOneInternal(8,e)},r.prototype.AT_LEAST_ONE9=function(e){this.atLeastOneInternal(9,e)},r.prototype.AT_LEAST_ONE_SEP=function(e){this.atLeastOneSepFirstInternal(0,e)},r.prototype.AT_LEAST_ONE_SEP1=function(e){this.atLeastOneSepFirstInternal(1,e)},r.prototype.AT_LEAST_ONE_SEP2=function(e){this.atLeastOneSepFirstInternal(2,e)},r.prototype.AT_LEAST_ONE_SEP3=function(e){this.atLeastOneSepFirstInternal(3,e)},r.prototype.AT_LEAST_ONE_SEP4=function(e){this.atLeastOneSepFirstInternal(4,e)},r.prototype.AT_LEAST_ONE_SEP5=function(e){this.atLeastOneSepFirstInternal(5,e)},r.prototype.AT_LEAST_ONE_SEP6=function(e){this.atLeastOneSepFirstInternal(6,e)},r.prototype.AT_LEAST_ONE_SEP7=function(e){this.atLeastOneSepFirstInternal(7,e)},r.prototype.AT_LEAST_ONE_SEP8=function(e){this.atLeastOneSepFirstInternal(8,e)},r.prototype.AT_LEAST_ONE_SEP9=function(e){this.atLeastOneSepFirstInternal(9,e)},r.prototype.RULE=function(e,t,i){if(i===void 0&&(i=Ax.DEFAULT_RULE_CONFIG),(0,Lq.contains)(this.definedRulesNames,e)){var n=Bye.defaultGrammarValidatorErrorProvider.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),s={message:n,type:Ax.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);var o=this.defineRule(e,t,i);return this[e]=o,o},r.prototype.OVERRIDE_RULE=function(e,t,i){i===void 0&&(i=Ax.DEFAULT_RULE_CONFIG);var n=[];n=n.concat((0,bye.validateRuleIsOverridden)(e,this.definedRulesNames,this.className)),this.definitionErrors=this.definitionErrors.concat(n);var s=this.defineRule(e,t,i);return this[e]=s,s},r.prototype.BACKTRACK=function(e,t){return function(){this.isBackTrackingStack.push(1);var i=this.saveRecogState();try{return e.apply(this,t),!0}catch(n){if((0,wye.isRecognitionException)(n))return!1;throw n}finally{this.reloadRecogState(i),this.isBackTrackingStack.pop()}}},r.prototype.getGAstProductions=function(){return this.gastProductionsCache},r.prototype.getSerializedGastProductions=function(){return(0,Qye.serializeGrammar)((0,Lq.values)(this.gastProductionsCache))},r}();yy.RecognizerApi=Sye});var Hq=w(By=>{"use strict";Object.defineProperty(By,"__esModule",{value:!0});By.RecognizerEngine=void 0;var Pr=Gt(),qn=Cy(),wy=nf(),Oq=kd(),of=Dd(),Kq=jn(),vye=sx(),Uq=LA(),Td=_g(),xye=ox(),Pye=function(){function r(){}return r.prototype.initRecognizerEngine=function(e,t){if(this.className=(0,xye.classNameFromInstance)(this),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Td.tokenStructuredMatcherNoCategories,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,Pr.has)(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 + For Further details.`);if((0,Pr.isArray)(e)){if((0,Pr.isEmpty)(e))throw Error(`A Token Vocabulary cannot be empty. + Note that the first argument for the parser constructor + is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 + For Further details.`)}if((0,Pr.isArray)(e))this.tokensMap=(0,Pr.reduce)(e,function(o,a){return o[a.name]=a,o},{});else if((0,Pr.has)(e,"modes")&&(0,Pr.every)((0,Pr.flatten)((0,Pr.values)(e.modes)),Td.isTokenType)){var i=(0,Pr.flatten)((0,Pr.values)(e.modes)),n=(0,Pr.uniq)(i);this.tokensMap=(0,Pr.reduce)(n,function(o,a){return o[a.name]=a,o},{})}else if((0,Pr.isObject)(e))this.tokensMap=(0,Pr.cloneObj)(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Uq.EOF;var s=(0,Pr.every)((0,Pr.values)(e),function(o){return(0,Pr.isEmpty)(o.categoryMatches)});this.tokenMatcher=s?Td.tokenStructuredMatcherNoCategories:Td.tokenStructuredMatcher,(0,Td.augmentTokenTypes)((0,Pr.values)(this.tokensMap))},r.prototype.defineRule=function(e,t,i){if(this.selfAnalysisDone)throw Error("Grammar rule <"+e+`> may not be defined after the 'performSelfAnalysis' method has been called' +Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);var n=(0,Pr.has)(i,"resyncEnabled")?i.resyncEnabled:Kq.DEFAULT_RULE_CONFIG.resyncEnabled,s=(0,Pr.has)(i,"recoveryValueFunc")?i.recoveryValueFunc:Kq.DEFAULT_RULE_CONFIG.recoveryValueFunc,o=this.ruleShortNameIdx<t},r.prototype.orInternal=function(e,t){var i=this.getKeyForAutomaticLookahead(qn.OR_IDX,t),n=(0,Pr.isArray)(e)?e:e.DEF,s=this.getLaFuncFromCache(i),o=s.call(this,n);if(o!==void 0){var a=n[o];return a.ALT.call(this)}this.raiseNoAltException(t,e.ERR_MSG)},r.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){var e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new wy.NotAllInputParsedException(t,e))}},r.prototype.subruleInternal=function(e,t,i){var n;try{var s=i!==void 0?i.ARGS:void 0;return n=e.call(this,t,s),this.cstPostNonTerminal(n,i!==void 0&&i.LABEL!==void 0?i.LABEL:e.ruleName),n}catch(o){this.subruleInternalError(o,i,e.ruleName)}},r.prototype.subruleInternalError=function(e,t,i){throw(0,wy.isRecognitionException)(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:i),delete e.partialCstResult),e},r.prototype.consumeInternal=function(e,t,i){var n;try{var s=this.LA(1);this.tokenMatcher(s,e)===!0?(this.consumeToken(),n=s):this.consumeInternalError(e,s,i)}catch(o){n=this.consumeInternalRecovery(e,t,o)}return this.cstPostTerminal(i!==void 0&&i.LABEL!==void 0?i.LABEL:e.name,n),n},r.prototype.consumeInternalError=function(e,t,i){var n,s=this.LA(0);throw i!==void 0&&i.ERR_MSG?n=i.ERR_MSG:n=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new wy.MismatchedTokenException(n,t,s))},r.prototype.consumeInternalRecovery=function(e,t,i){if(this.recoveryEnabled&&i.name==="MismatchedTokenException"&&!this.isBackTracking()){var n=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,n)}catch(s){throw s.name===vye.IN_RULE_RECOVERY_EXCEPTION?i:s}}else throw i},r.prototype.saveRecogState=function(){var e=this.errors,t=(0,Pr.cloneArr)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}},r.prototype.reloadRecogState=function(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK},r.prototype.ruleInvocationStateUpdate=function(e,t,i){this.RULE_OCCURRENCE_STACK.push(i),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t,e)},r.prototype.isBackTracking=function(){return this.isBackTrackingStack.length!==0},r.prototype.getCurrRuleFullName=function(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]},r.prototype.shortRuleNameToFullName=function(e){return this.shortRuleNameToFull[e]},r.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),Uq.EOF)},r.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},r}();By.RecognizerEngine=Pye});var Yq=w(by=>{"use strict";Object.defineProperty(by,"__esModule",{value:!0});by.ErrorHandler=void 0;var lx=nf(),cx=Gt(),Gq=kd(),Dye=jn(),kye=function(){function r(){}return r.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=(0,cx.has)(e,"errorMessageProvider")?e.errorMessageProvider:Dye.DEFAULT_PARSER_CONFIG.errorMessageProvider},r.prototype.SAVE_ERROR=function(e){if((0,lx.isRecognitionException)(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,cx.cloneArr)(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(r.prototype,"errors",{get:function(){return(0,cx.cloneArr)(this._errors)},set:function(e){this._errors=e},enumerable:!1,configurable:!0}),r.prototype.raiseEarlyExitException=function(e,t,i){for(var n=this.getCurrRuleFullName(),s=this.getGAstProductions()[n],o=(0,Gq.getLookaheadPathsForOptionalProd)(e,s,t,this.maxLookahead),a=o[0],l=[],c=1;c<=this.maxLookahead;c++)l.push(this.LA(c));var u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:l,previous:this.LA(0),customUserDescription:i,ruleName:n});throw this.SAVE_ERROR(new lx.EarlyExitException(u,this.LA(1),this.LA(0)))},r.prototype.raiseNoAltException=function(e,t){for(var i=this.getCurrRuleFullName(),n=this.getGAstProductions()[i],s=(0,Gq.getLookaheadPathsForOr)(e,n,this.maxLookahead),o=[],a=1;a<=this.maxLookahead;a++)o.push(this.LA(a));var l=this.LA(0),c=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:s,actual:o,previous:l,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new lx.NoViableAltException(c,this.LA(1),l))},r}();by.ErrorHandler=kye});var Jq=w(Qy=>{"use strict";Object.defineProperty(Qy,"__esModule",{value:!0});Qy.ContentAssist=void 0;var jq=Dd(),qq=Gt(),Rye=function(){function r(){}return r.prototype.initContentAssist=function(){},r.prototype.computeContentAssist=function(e,t){var i=this.gastProductionsCache[e];if((0,qq.isUndefined)(i))throw Error("Rule ->"+e+"<- does not exist in this grammar.");return(0,jq.nextPossibleTokensAfter)([i],t,this.tokenMatcher,this.maxLookahead)},r.prototype.getNextPossibleTokenTypes=function(e){var t=(0,qq.first)(e.ruleStack),i=this.getGAstProductions(),n=i[t],s=new jq.NextAfterTokenWalker(n,e).startWalking();return s},r}();Qy.ContentAssist=Rye});var eJ=w(xy=>{"use strict";Object.defineProperty(xy,"__esModule",{value:!0});xy.GastRecorder=void 0;var yn=Gt(),Lo=mn(),Fye=Bd(),Xq=_g(),Zq=LA(),Nye=jn(),Tye=Cy(),vy={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(vy);var Wq=!0,zq=Math.pow(2,Tye.BITS_FOR_OCCURRENCE_IDX)-1,_q=(0,Zq.createToken)({name:"RECORDING_PHASE_TOKEN",pattern:Fye.Lexer.NA});(0,Xq.augmentTokenTypes)([_q]);var $q=(0,Zq.createTokenInstance)(_q,`This IToken indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze($q);var Lye={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Mye=function(){function r(){}return r.prototype.initGastRecorder=function(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1},r.prototype.enableRecording=function(){var e=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",function(){for(var t=function(n){var s=n>0?n:"";e["CONSUME"+s]=function(o,a){return this.consumeInternalRecord(o,n,a)},e["SUBRULE"+s]=function(o,a){return this.subruleInternalRecord(o,n,a)},e["OPTION"+s]=function(o){return this.optionInternalRecord(o,n)},e["OR"+s]=function(o){return this.orInternalRecord(o,n)},e["MANY"+s]=function(o){this.manyInternalRecord(n,o)},e["MANY_SEP"+s]=function(o){this.manySepFirstInternalRecord(n,o)},e["AT_LEAST_ONE"+s]=function(o){this.atLeastOneInternalRecord(n,o)},e["AT_LEAST_ONE_SEP"+s]=function(o){this.atLeastOneSepFirstInternalRecord(n,o)}},i=0;i<10;i++)t(i);e.consume=function(n,s,o){return this.consumeInternalRecord(s,n,o)},e.subrule=function(n,s,o){return this.subruleInternalRecord(s,n,o)},e.option=function(n,s){return this.optionInternalRecord(s,n)},e.or=function(n,s){return this.orInternalRecord(s,n)},e.many=function(n,s){this.manyInternalRecord(n,s)},e.atLeastOne=function(n,s){this.atLeastOneInternalRecord(n,s)},e.ACTION=e.ACTION_RECORD,e.BACKTRACK=e.BACKTRACK_RECORD,e.LA=e.LA_RECORD})},r.prototype.disableRecording=function(){var e=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",function(){for(var t=0;t<10;t++){var i=t>0?t:"";delete e["CONSUME"+i],delete e["SUBRULE"+i],delete e["OPTION"+i],delete e["OR"+i],delete e["MANY"+i],delete e["MANY_SEP"+i],delete e["AT_LEAST_ONE"+i],delete e["AT_LEAST_ONE_SEP"+i]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})},r.prototype.ACTION_RECORD=function(e){},r.prototype.BACKTRACK_RECORD=function(e,t){return function(){return!0}},r.prototype.LA_RECORD=function(e){return Nye.END_OF_FILE},r.prototype.topLevelRuleRecord=function(e,t){try{var i=new Lo.Rule({definition:[],name:e});return i.name=e,this.recordingProdStack.push(i),t.call(this),this.recordingProdStack.pop(),i}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+` + This error was thrown during the "grammar recording phase" For more info see: + https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}},r.prototype.optionInternalRecord=function(e,t){return Ld.call(this,Lo.Option,e,t)},r.prototype.atLeastOneInternalRecord=function(e,t){Ld.call(this,Lo.RepetitionMandatory,t,e)},r.prototype.atLeastOneSepFirstInternalRecord=function(e,t){Ld.call(this,Lo.RepetitionMandatoryWithSeparator,t,e,Wq)},r.prototype.manyInternalRecord=function(e,t){Ld.call(this,Lo.Repetition,t,e)},r.prototype.manySepFirstInternalRecord=function(e,t){Ld.call(this,Lo.RepetitionWithSeparator,t,e,Wq)},r.prototype.orInternalRecord=function(e,t){return Oye.call(this,e,t)},r.prototype.subruleInternalRecord=function(e,t,i){if(Sy(t),!e||(0,yn.has)(e,"ruleName")===!1){var n=new Error(" argument is invalid"+(" expecting a Parser method reference but got: <"+JSON.stringify(e)+">")+(` + inside top level rule: <`+this.recordingProdStack[0].name+">"));throw n.KNOWN_RECORDER_ERROR=!0,n}var s=(0,yn.peek)(this.recordingProdStack),o=e.ruleName,a=new Lo.NonTerminal({idx:t,nonTerminalName:o,label:i==null?void 0:i.LABEL,referencedRule:void 0});return s.definition.push(a),this.outputCst?Lye:vy},r.prototype.consumeInternalRecord=function(e,t,i){if(Sy(t),!(0,Xq.hasShortKeyProperty)(e)){var n=new Error(" argument is invalid"+(" expecting a TokenType reference but got: <"+JSON.stringify(e)+">")+(` + inside top level rule: <`+this.recordingProdStack[0].name+">"));throw n.KNOWN_RECORDER_ERROR=!0,n}var s=(0,yn.peek)(this.recordingProdStack),o=new Lo.Terminal({idx:t,terminalType:e,label:i==null?void 0:i.LABEL});return s.definition.push(o),$q},r}();xy.GastRecorder=Mye;function Ld(r,e,t,i){i===void 0&&(i=!1),Sy(t);var n=(0,yn.peek)(this.recordingProdStack),s=(0,yn.isFunction)(e)?e:e.DEF,o=new r({definition:[],idx:t});return i&&(o.separator=e.SEP),(0,yn.has)(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(o),s.call(this),n.definition.push(o),this.recordingProdStack.pop(),vy}function Oye(r,e){var t=this;Sy(e);var i=(0,yn.peek)(this.recordingProdStack),n=(0,yn.isArray)(r)===!1,s=n===!1?r:r.DEF,o=new Lo.Alternation({definition:[],idx:e,ignoreAmbiguities:n&&r.IGNORE_AMBIGUITIES===!0});(0,yn.has)(r,"MAX_LOOKAHEAD")&&(o.maxLookahead=r.MAX_LOOKAHEAD);var a=(0,yn.some)(s,function(l){return(0,yn.isFunction)(l.GATE)});return o.hasPredicates=a,i.definition.push(o),(0,yn.forEach)(s,function(l){var c=new Lo.Alternative({definition:[]});o.definition.push(c),(0,yn.has)(l,"IGNORE_AMBIGUITIES")?c.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:(0,yn.has)(l,"GATE")&&(c.ignoreAmbiguities=!0),t.recordingProdStack.push(c),l.ALT.call(t),t.recordingProdStack.pop()}),vy}function Vq(r){return r===0?"":""+r}function Sy(r){if(r<0||r>zq){var e=new Error("Invalid DSL Method idx value: <"+r+`> + `+("Idx value must be a none negative value smaller than "+(zq+1)));throw e.KNOWN_RECORDER_ERROR=!0,e}}});var rJ=w(Py=>{"use strict";Object.defineProperty(Py,"__esModule",{value:!0});Py.PerformanceTracer=void 0;var tJ=Gt(),Kye=jn(),Uye=function(){function r(){}return r.prototype.initPerformanceTracer=function(e){if((0,tJ.has)(e,"traceInitPerf")){var t=e.traceInitPerf,i=typeof t=="number";this.traceInitMaxIdent=i?t:1/0,this.traceInitPerf=i?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Kye.DEFAULT_PARSER_CONFIG.traceInitPerf;this.traceInitIndent=-1},r.prototype.TRACE_INIT=function(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;var i=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <"+e+">");var n=(0,tJ.timer)(t),s=n.time,o=n.value,a=s>10?console.warn:console.log;return this.traceInitIndent time: "+s+"ms"),this.traceInitIndent--,o}else return t()},r}();Py.PerformanceTracer=Uye});var iJ=w(Dy=>{"use strict";Object.defineProperty(Dy,"__esModule",{value:!0});Dy.applyMixins=void 0;function Hye(r,e){e.forEach(function(t){var i=t.prototype;Object.getOwnPropertyNames(i).forEach(function(n){if(n!=="constructor"){var s=Object.getOwnPropertyDescriptor(i,n);s&&(s.get||s.set)?Object.defineProperty(r.prototype,n,s):r.prototype[n]=t.prototype[n]}})})}Dy.applyMixins=Hye});var jn=w(dr=>{"use strict";var oJ=dr&&dr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(dr,"__esModule",{value:!0});dr.EmbeddedActionsParser=dr.CstParser=dr.Parser=dr.EMPTY_ALT=dr.ParserDefinitionErrorType=dr.DEFAULT_RULE_CONFIG=dr.DEFAULT_PARSER_CONFIG=dr.END_OF_FILE=void 0;var en=Gt(),Gye=Yj(),nJ=LA(),aJ=xd(),sJ=pq(),Yye=sx(),jye=Bq(),qye=Fq(),Jye=Tq(),Wye=Mq(),zye=Hq(),Vye=Yq(),Xye=Jq(),Zye=eJ(),_ye=rJ(),$ye=iJ();dr.END_OF_FILE=(0,nJ.createTokenInstance)(nJ.EOF,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(dr.END_OF_FILE);dr.DEFAULT_PARSER_CONFIG=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:aJ.defaultParserErrorProvider,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1});dr.DEFAULT_RULE_CONFIG=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});var ewe;(function(r){r[r.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",r[r.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",r[r.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",r[r.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",r[r.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",r[r.LEFT_RECURSION=5]="LEFT_RECURSION",r[r.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",r[r.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",r[r.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",r[r.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",r[r.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",r[r.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",r[r.TOO_MANY_ALTS=12]="TOO_MANY_ALTS"})(ewe=dr.ParserDefinitionErrorType||(dr.ParserDefinitionErrorType={}));function twe(r){return r===void 0&&(r=void 0),function(){return r}}dr.EMPTY_ALT=twe;var ky=function(){function r(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;var i=this;if(i.initErrorHandler(t),i.initLexerAdapter(),i.initLooksAhead(t),i.initRecognizerEngine(e,t),i.initRecoverable(t),i.initTreeBuilder(t),i.initContentAssist(),i.initGastRecorder(t),i.initPerformanceTracer(t),(0,en.has)(t,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. + Please use the flag on the relevant DSL method instead. + See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES + For further details.`);this.skipValidations=(0,en.has)(t,"skipValidations")?t.skipValidations:dr.DEFAULT_PARSER_CONFIG.skipValidations}return r.performSelfAnalysis=function(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")},r.prototype.performSelfAnalysis=function(){var e=this;this.TRACE_INIT("performSelfAnalysis",function(){var t;e.selfAnalysisDone=!0;var i=e.className;e.TRACE_INIT("toFastProps",function(){(0,en.toFastProperties)(e)}),e.TRACE_INIT("Grammar Recording",function(){try{e.enableRecording(),(0,en.forEach)(e.definedRulesNames,function(s){var o=e[s],a=o.originalGrammarAction,l=void 0;e.TRACE_INIT(s+" Rule",function(){l=e.topLevelRuleRecord(s,a)}),e.gastProductionsCache[s]=l})}finally{e.disableRecording()}});var n=[];if(e.TRACE_INIT("Grammar Resolving",function(){n=(0,sJ.resolveGrammar)({rules:(0,en.values)(e.gastProductionsCache)}),e.definitionErrors=e.definitionErrors.concat(n)}),e.TRACE_INIT("Grammar Validations",function(){if((0,en.isEmpty)(n)&&e.skipValidations===!1){var s=(0,sJ.validateGrammar)({rules:(0,en.values)(e.gastProductionsCache),maxLookahead:e.maxLookahead,tokenTypes:(0,en.values)(e.tokensMap),errMsgProvider:aJ.defaultGrammarValidatorErrorProvider,grammarName:i});e.definitionErrors=e.definitionErrors.concat(s)}}),(0,en.isEmpty)(e.definitionErrors)&&(e.recoveryEnabled&&e.TRACE_INIT("computeAllProdsFollows",function(){var s=(0,Gye.computeAllProdsFollows)((0,en.values)(e.gastProductionsCache));e.resyncFollows=s}),e.TRACE_INIT("ComputeLookaheadFunctions",function(){e.preComputeLookaheadFunctions((0,en.values)(e.gastProductionsCache))})),!r.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,en.isEmpty)(e.definitionErrors))throw t=(0,en.map)(e.definitionErrors,function(s){return s.message}),new Error(`Parser Definition Errors detected: + `+t.join(` +------------------------------- +`))})},r.DEFER_DEFINITION_ERRORS_HANDLING=!1,r}();dr.Parser=ky;(0,$ye.applyMixins)(ky,[Yye.Recoverable,jye.LooksAhead,qye.TreeBuilder,Jye.LexerAdapter,zye.RecognizerEngine,Wye.RecognizerApi,Vye.ErrorHandler,Xye.ContentAssist,Zye.GastRecorder,_ye.PerformanceTracer]);var rwe=function(r){oJ(e,r);function e(t,i){i===void 0&&(i=dr.DEFAULT_PARSER_CONFIG);var n=this,s=(0,en.cloneObj)(i);return s.outputCst=!0,n=r.call(this,t,s)||this,n}return e}(ky);dr.CstParser=rwe;var iwe=function(r){oJ(e,r);function e(t,i){i===void 0&&(i=dr.DEFAULT_PARSER_CONFIG);var n=this,s=(0,en.cloneObj)(i);return s.outputCst=!1,n=r.call(this,t,s)||this,n}return e}(ky);dr.EmbeddedActionsParser=iwe});var lJ=w(Ry=>{"use strict";Object.defineProperty(Ry,"__esModule",{value:!0});Ry.createSyntaxDiagramsCode=void 0;var AJ=Dv();function nwe(r,e){var t=e===void 0?{}:e,i=t.resourceBase,n=i===void 0?"https://unpkg.com/chevrotain@"+AJ.VERSION+"/diagrams/":i,s=t.css,o=s===void 0?"https://unpkg.com/chevrotain@"+AJ.VERSION+"/diagrams/diagrams.css":s,a=` + + + + + +`,l=` + +`,c=` +