Skip to content

Commit

Permalink
Merge branch 'unique-polkadot-1.14' into feature/foreign-assets-reset…
Browse files Browse the repository at this point in the history
…-location
  • Loading branch information
mrshiposha authored Nov 22, 2024
2 parents 5262c4b + 8ee9f3d commit 4b782ad
Show file tree
Hide file tree
Showing 133 changed files with 12,699 additions and 7,880 deletions.
14 changes: 7 additions & 7 deletions .baedeker/rewrites.example.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ 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 },
'bin/hydradx': { dockerImage: 'uniquenetwork/builder-hydraDx:%s' % dotenv.HYDRADX_BUILD_BRANCH },
'bin/polkadot': { dockerImage: 'parity/polkadot:%s' % dotenv.POLKADOT_MAINNET_BRANCH },
'bin/acala': { dockerImage: 'acala/acala-node:%s' % dotenv.ACALA_BUILD_BRANCH },
'bin/moonbeam': { dockerImage: 'moonbeamfoundation/moonbeam:%s' % dotenv.MOONBEAM_BUILD_BRANCH },
'bin/assethub': { dockerImage: 'parity/polkadot-parachain:%s' % dotenv.STATEMINE_BUILD_BRANCH },
'bin/astar': { dockerImage: 'staketechnologies/astar-collator:%s' % dotenv.ASTAR_BUILD_BRANCH },
'bin/polkadex': { dockerImage: 'polkadex/mainnet:%s' % dotenv.POLKADEX_BUILD_BRANCH },
'bin/hydradx': { dockerImage: 'galacticcouncil/hydra-dx:%s' % dotenv.HYDRADX_BUILD_BRANCH },
},
extra_node_mixin={
extraArgs+: [
Expand Down
2 changes: 1 addition & 1 deletion .baedeker/up.sh
Original file line number Diff line number Diff line change
@@ -1,6 +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
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=westend-local --tla-code=assethub_spec="import 'assethub-spec.json'" --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
11 changes: 6 additions & 5 deletions .baedeker/xcm-opal.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,20 @@ local unique = {
},
};

local westmint = {
name: 'westmint',
local assethub = {
name: 'assethub',
bin: 'bin/assethub',
paraId: 1002,
spec: {Genesis:{
chain: 'westmint-local',
chain: 'asset-hub-westend-local',
modify:: m.genericPara($),
}},
nodes: {
[name]: {
bin: $.bin,
wantedKeys: 'para',
expectedDataPath: '/parity',
parentConnection: 'internal-samedir',
expectedDataPath: '/parity',
},
for name in ['alice', 'bob']
},
Expand All @@ -65,6 +66,6 @@ local westmint = {
relay + {
parachains: {
[para.name]: para,
for para in [unique, westmint]
for para in [unique, assethub]
},
}
28 changes: 18 additions & 10 deletions .baedeker/xcm-quartz.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local
m = import 'baedeker-library/mixin/spec.libsonnet',
;

function(relay_spec)
function(relay_spec, assethub_spec)

local relay = {
name: 'relay',
Expand All @@ -26,7 +26,7 @@ local relay = {
wantedKeys: 'relay',
expectedDataPath: '/parity',
},
for name in ['alice', 'bob', 'charlie', 'dave', 'eve', 'ferdie']
for name in ['alice', 'bob', 'charlie', 'dave', 'eve', 'ferdie', 'gregory', 'holly', 'iggy', 'john', 'kurt']
},
};

Expand Down Expand Up @@ -64,6 +64,8 @@ local karura = {
[name]: {
bin: $.bin,
wantedKeys: 'para',
parentConnection: 'internal-samedir',
expectedDataPath: '/acala/data',
},
for name in ['alice', 'bob']
},
Expand All @@ -83,24 +85,28 @@ local moonriver = {
[name]: {
bin: $.bin,
wantedKeys: 'para-nimbus',
parentConnection: 'internal-samedir',
expectedDataPath: '/data',
},
for name in ['alith', 'baltathar']
},
};

local statemine = {
name: 'statemine',
local assethub = {
name: 'assethub',
bin: 'bin/assethub',
paraId: 1004,
spec: {Genesis:{
chain: 'statemine-local',
modify:: m.genericPara($),
}},
spec: {
FromScratchGenesis: {
spec: m.genericPara($)(assethub_spec),
}
},
nodes: {
[name]: {
bin: $.bin,
wantedKeys: 'para',
expectedDataPath: '/parity',
parentConnection: 'internal-samedir',
expectedDataPath: '/parity',
},
for name in ['alice', 'bob']
},
Expand All @@ -118,6 +124,8 @@ local shiden = {
[name]: {
bin: $.bin,
wantedKeys: 'para',
parentConnection: 'internal-samedir',
expectedDataPath: '/data',
},
for name in ['alice', 'bob']
},
Expand All @@ -126,6 +134,6 @@ local shiden = {
relay + {
parachains: {
[para.name]: para,
for para in [unique, karura, moonriver, statemine, shiden]
for para in [unique, karura, moonriver, assethub, shiden]
},
}
34 changes: 23 additions & 11 deletions .baedeker/xcm-unique.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local
m = import 'baedeker-library/mixin/spec.libsonnet',
;

function(relay_spec)
function(relay_spec, assethub_spec)

local relay = {
name: 'relay',
Expand All @@ -27,7 +27,7 @@ local relay = {
wantedKeys: 'relay',
expectedDataPath: '/parity',
},
for name in ['alice', 'bob', 'charlie', 'dave', 'eve', 'ferdie', 'gregory', 'holly']
for name in ['alice', 'bob', 'charlie', 'dave', 'eve', 'ferdie', 'gregory', 'holly', 'iggy', 'john', 'kurt', 'larry', 'mike', 'norman', 'osvald']
},
};

Expand Down Expand Up @@ -65,6 +65,8 @@ local acala = {
[name]: {
bin: $.bin,
wantedKeys: 'para',
parentConnection: 'internal-samedir',
expectedDataPath: '/acala/data',
},
for name in ['alice', 'bob']
},
Expand All @@ -84,24 +86,28 @@ local moonbeam = {
[name]: {
bin: $.bin,
wantedKeys: 'para-nimbus',
parentConnection: 'internal-samedir',
expectedDataPath: '/data',
},
for name in ['alith', 'baltathar']
},
};

local statemint = {
name: 'statemint',
local assethub = {
name: 'assethub',
bin: 'bin/assethub',
paraId: 1004,
spec: {Genesis:{
chain: 'statemint-local',
modify:: m.genericPara($),
}},
spec: {
FromScratchGenesis: {
spec: m.genericPara($)(assethub_spec),
}
},
nodes: {
[name]: {
bin: $.bin,
wantedKeys: 'para-ed',
expectedDataPath: '/parity',
parentConnection: 'internal-samedir',
expectedDataPath: '/parity',
},
for name in ['alice', 'bob']
},
Expand All @@ -119,6 +125,8 @@ local astar = {
[name]: {
bin: $.bin,
wantedKeys: 'para',
parentConnection: 'internal-samedir',
expectedDataPath: '/data',
},
for name in ['alice', 'bob']
},
Expand All @@ -136,6 +144,9 @@ local polkadex = {
[name]: {
bin: $.bin,
wantedKeys: 'para',
parentConnection: 'internal-samedir',
expectedDataPath: '/data',

},
for name in ['alice', 'bob']
},
Expand All @@ -153,7 +164,8 @@ local hydraDx = {
[name]: {
bin: $.bin,
wantedKeys: 'para',
legacyRpc: true,
parentConnection: 'internal-samedir',
expectedDataPath: '/hydra',
},
for name in ['alice', 'bob']
},
Expand All @@ -163,6 +175,6 @@ local hydraDx = {
relay + {
parachains: {
[para.name]: para,
for para in [unique, acala, moonbeam, statemint, astar, polkadex, hydraDx]
for para in [unique, acala, moonbeam, assethub, astar, polkadex, hydraDx]
},
}
15 changes: 3 additions & 12 deletions .docker/Dockerfile-chain-dev
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
FROM uniquenetwork/services:latest
FROM uniquenetwork/services:base-stable-1.77.0

ARG NETWORK

ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
ENV NETWORK=$NETWORK
ENV CARGO_HOME="/cargo-home"
ENV PATH="/cargo-home/bin:$PATH"

RUN mkdir /dev_chain
COPY . /dev_chain

WORKDIR /dev_chain
COPY . /workdir
WORKDIR /workdir

RUN cargo build --profile integration-tests --features=${NETWORK}-runtime,fast-inflation
RUN echo "$NETWORK"

CMD cargo run --profile integration-tests --features=${NETWORK}-runtime,fast-inflation -- --dev -linfo --rpc-cors=all --unsafe-rpc-external
11 changes: 3 additions & 8 deletions .docker/Dockerfile-chain-dev-unit
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
FROM uniquenetwork/services:latest

ENV DEBIAN_FRONTEND=noninteractive
ENV CARGO_HOME="/cargo-home"
ENV PATH="/cargo-home/bin:$PATH"
FROM uniquenetwork/services:base-stable-1.77.0

ARG NETWORK

RUN mkdir /dev_chain
COPY . /dev_chain
COPY . /workdir

WORKDIR /dev_chain
WORKDIR /workdir

CMD cargo test --features=limit-testing,tests --workspace
38 changes: 38 additions & 0 deletions .docker/Dockerfile-try-runtime
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# ===== 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

RUN cargo install --git https://github.com/paritytech/try-runtime-cli --tag v0.8.0 --locked

RUN mkdir /unique_parachain
WORKDIR /unique_parachain

# ===== BUILD ======
FROM rust-builder AS builder-unique

ARG NETWORK
ARG REPLICA_FROM

ENV NETWORK=${NETWORK}
ENV REPLICA_FROM=${REPLICA_FROM}

COPY . /unique_parachain
WORKDIR /unique_parachain

RUN echo "Requested features: ${NETWORK}-runtime\n" && \
echo "Fork from: ${REPLICA_FROM}\n" && \
cargo build --features=try-runtime,${NETWORK}-runtime --profile=production

CMD try-runtime --runtime target/production/wbuild/${NETWORK}-runtime/${NETWORK}_runtime.compact.compressed.wasm on-runtime-upgrade --blocktime 6000 --checks all live --uri ${REPLICA_FROM}
33 changes: 0 additions & 33 deletions .docker/Dockerfile-try-runtime.j2

This file was deleted.

Loading

0 comments on commit 4b782ad

Please sign in to comment.