Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Reorganising the repository - external renames and moves #4074

Merged
merged 75 commits into from
Nov 14, 2019
Merged
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
fa071ff
Adding first rough ouline of the repository structure
gnunicorn Nov 10, 2019
b2b48ed
Remove old CI stuff
gnunicorn Nov 10, 2019
c0556ea
add title
gnunicorn Nov 10, 2019
425814d
formatting fixes
gnunicorn Nov 10, 2019
4f7d22e
move node-exits job's script to scripts dir
TriplEight Nov 10, 2019
b3c4d8b
Move docs into subdir
gnunicorn Nov 10, 2019
7887f7b
move to bin
gnunicorn Nov 10, 2019
09000f3
move maintainence scripts, configs and helpers into its own dir
gnunicorn Nov 10, 2019
eea9398
add .local to ignore
gnunicorn Nov 10, 2019
a4e451c
move core->client
gnunicorn Nov 10, 2019
bd9cee1
start up 'test' area
gnunicorn Nov 11, 2019
b18dac0
move test client
gnunicorn Nov 11, 2019
a925eea
move test runtime
gnunicorn Nov 11, 2019
8c10e12
make test move compile
gnunicorn Nov 11, 2019
95d9981
Add dependencies rule enforcement.
tomusdrw Nov 11, 2019
0c1814e
Merge branch 'the-big-reorg' of github.com:paritytech/substrate into …
tomusdrw Nov 11, 2019
c1eb318
Fix indexing.
tomusdrw Nov 11, 2019
26004a7
Update docs to reflect latest changes
gnunicorn Nov 11, 2019
72e690e
Merge remote-tracking branch 'origin/master' into the-big-reorg
gnunicorn Nov 11, 2019
d9ffec8
Moving /srml->/paint
gnunicorn Nov 11, 2019
3266289
update docs
gnunicorn Nov 11, 2019
e04b4fc
move client/sr-* -> primitives/
gnunicorn Nov 11, 2019
ddd0ffb
clean old readme
gnunicorn Nov 11, 2019
83de634
remove old broken code in rhd
gnunicorn Nov 11, 2019
1fd17a8
update lock
gnunicorn Nov 11, 2019
733c0f6
Step 1.
tomusdrw Nov 11, 2019
6adf9af
Merge branch 'the-big-reorg' of github.com:paritytech/substrate into …
tomusdrw Nov 11, 2019
5080d91
Merge branch 'master' into the-big-reorg
tomusdrw Nov 11, 2019
367819e
starting to untangle client
gnunicorn Nov 11, 2019
1b28184
Fix after merge.
tomusdrw Nov 11, 2019
1a64595
start splitting out client interfaces
gnunicorn Nov 11, 2019
c82823c
Fix the fix.
tomusdrw Nov 11, 2019
8964125
Merge branch 'the-big-reorg' of github.com:paritytech/substrate into …
gnunicorn Nov 11, 2019
c103b78
move children and blockchain interfaces
gnunicorn Nov 11, 2019
a60c537
Move trie and state-machine to primitives.
tomusdrw Nov 11, 2019
a1984de
Fix WASM builds.
tomusdrw Nov 11, 2019
1ab7ac7
fixing broken imports
gnunicorn Nov 11, 2019
5cbd18d
Merge branch 'the-big-reorg' of github.com:paritytech/substrate into …
gnunicorn Nov 11, 2019
bc02c35
more interface moves
gnunicorn Nov 11, 2019
f75cfba
move backend and light to interfaces
gnunicorn Nov 12, 2019
f10ee92
move CallExecutor
gnunicorn Nov 12, 2019
224f318
move cli off client
gnunicorn Nov 12, 2019
9c3752d
moving around more interfaces
gnunicorn Nov 12, 2019
4738b9d
re-add consensus crates into the mix
gnunicorn Nov 12, 2019
2cd3316
fix subkey path
gnunicorn Nov 12, 2019
cab5727
relieve client from executor
gnunicorn Nov 12, 2019
ee8bed2
starting to pull out client from grandpa
gnunicorn Nov 12, 2019
2285766
move is_decendent_of out of client
gnunicorn Nov 12, 2019
7376b51
grandpa still depends on client directly
gnunicorn Nov 12, 2019
d288ec0
lemme tests pass
gnunicorn Nov 13, 2019
f0d7d20
Merge branch 'master' into the-big-reorg
tomusdrw Nov 13, 2019
5e60373
rename srml->paint
gnunicorn Nov 13, 2019
9fe4663
Make it compile.
tomusdrw Nov 13, 2019
87c8a75
rename interfaces->client-api
gnunicorn Nov 13, 2019
9b27c66
Merge branch 'the-big-reorg' of github.com:paritytech/substrate into …
gnunicorn Nov 13, 2019
1feec16
Move keyring to primitives.
tomusdrw Nov 13, 2019
9fab2ba
fixup libp2p dep
gnunicorn Nov 13, 2019
946b624
Merge branch 'the-big-reorg' of github.com:paritytech/substrate into …
tomusdrw Nov 13, 2019
0c7a49d
fix broken use
gnunicorn Nov 13, 2019
97d78bb
Merge branch 'the-big-reorg' of github.com:paritytech/substrate into …
tomusdrw Nov 13, 2019
58a3fe1
allow dependency enforcement to fail
gnunicorn Nov 13, 2019
c32b70d
Merge branch 'the-big-reorg' of github.com:paritytech/substrate into …
tomusdrw Nov 13, 2019
48dba8f
Merge branch 'master' into the-big-reorg
tomusdrw Nov 14, 2019
62edb89
move fork-tree
gnunicorn Nov 14, 2019
44effe4
Moving wasm-builder
gnunicorn Nov 14, 2019
191fa20
make env
gnunicorn Nov 14, 2019
b3a7e1f
move build-script-utils
gnunicorn Nov 14, 2019
fb5fc06
Merge branch 'master' into the-big-reorg
tomusdrw Nov 14, 2019
8fb157e
fixup broken crate depdencies and names
gnunicorn Nov 14, 2019
444d41e
fix imports for authority discovery
gnunicorn Nov 14, 2019
be9be03
fix typo
gnunicorn Nov 14, 2019
7b68eda
update cargo.lock
gnunicorn Nov 14, 2019
cc85b0b
fixing imports
gnunicorn Nov 14, 2019
9e849bc
Fix paths and add missing crates
bkchr Nov 14, 2019
a94ed57
re-add missing crates
gnunicorn Nov 14, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ doc
.idea/
Dockerfile
.dockerignore
.local
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ rls*.log
*.orig
*.rej
**/wip/*.stderr
.local
46 changes: 27 additions & 19 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ check-runtime:
GITLAB_API: "https://gitlab.parity.io/api/v4"
GITHUB_API_PROJECT: "parity%2Finfrastructure%2Fgithub-api"
script:
- ./scripts/gitlab/check_runtime.sh
- ./.maintain/gitlab/check_runtime.sh
allow_failure: true


Expand All @@ -89,7 +89,7 @@ check-line-width:
only:
- /^[0-9]+$/
script:
- ./scripts/gitlab/check_line_width.sh
- ./.maintain/gitlab/check_line_width.sh
allow_failure: true


Expand Down Expand Up @@ -117,7 +117,7 @@ cargo-check-subkey:
except:
- /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
script:
- cd ./subkey
- cd ./bin/subkey
- BUILD_DUMMY_WASM_BINARY=1 time cargo check --release
- sccache -s

Expand Down Expand Up @@ -145,8 +145,16 @@ test-linux-stable: &test-linux
paths:
- ${CI_COMMIT_SHORT_SHA}_warnings.log

test-dependency-rules: &test-linux
stage: test
<<: *docker-env
except:
variables:
- $DEPLOY_TAG
script:
- .maintain/ensure-deps.sh

test-srml-staking: &test-srml-staking
test-paint-staking: &test-paint-staking
stage: test
<<: *docker-env
variables:
Expand All @@ -158,7 +166,7 @@ test-srml-staking: &test-srml-staking
variables:
- $DEPLOY_TAG
script:
- cd srml/staking/
- cd paint/staking/
- WASM_BUILD_NO_COLOR=1 time cargo test --release --verbose --no-default-features --features std
- sccache -s

Expand All @@ -174,7 +182,7 @@ test-wasmtime: &test-wasmtime
variables:
- $DEPLOY_TAG
script:
- cd core/executor
- cd client/executor
- WASM_BUILD_NO_COLOR=1 time cargo test --release --verbose --features wasmtime
- sccache -s

Expand Down Expand Up @@ -219,7 +227,7 @@ check-web-wasm:
- time cargo web build -p substrate-consensus-common
- time cargo web build -p substrate-telemetry
# Note: the command below is a bit weird because several Cargo issues prevent us from compiling the node in a more straight-forward way.
- time cargo build --manifest-path=node/cli/Cargo.toml --no-default-features --features "browser" --target=wasm32-unknown-unknown
- time cargo build --manifest-path=bin/node/cli/Cargo.toml --no-default-features --features "browser" --target=wasm32-unknown-unknown
- sccache -s

node-exits:
Expand All @@ -228,7 +236,7 @@ node-exits:
except:
- /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
script:
- ./ci/check_for_exit.sh
- ./.maintain/check_for_exit.sh


test-full-crypto-feature: &test-full-crypto-feature
Expand All @@ -243,7 +251,7 @@ test-full-crypto-feature: &test-full-crypto-feature
variables:
- $DEPLOY_TAG
script:
- cd core/primitives/
- cd primitives/core/
- time cargo +nightly build --verbose --no-default-features --features full_crypto
- cd ../application-crypto
- time cargo +nightly build --verbose --no-default-features --features full_crypto
Expand Down Expand Up @@ -274,8 +282,8 @@ build-linux-substrate:
fi
- sha256sum ./artifacts/substrate/substrate | tee ./artifacts/substrate/substrate.sha256
- printf '\n# building node-template\n\n'
- ./scripts/node-template-release.sh ./artifacts/substrate/substrate-node-template.tar.gz
- cp -r scripts/docker/substrate.Dockerfile ./artifacts/substrate/
- ./.maintain/node-template-release.sh ./artifacts/substrate/substrate-node-template.tar.gz
- cp -r .maintain/docker/substrate.Dockerfile ./artifacts/substrate/
- sccache -s

build-linux-subkey:
Expand All @@ -298,7 +306,7 @@ build-linux-subkey:
sed -n -r 's/^subkey ([0-9.]+.*)/\1/p' |
tee ./artifacts/subkey/VERSION;
- sha256sum ./artifacts/subkey/subkey | tee ./artifacts/subkey/subkey.sha256
- cp -r scripts/docker/subkey.Dockerfile ./artifacts/subkey/
- cp -r .maintain/docker/subkey.Dockerfile ./artifacts/subkey/
- sccache -s

build-rust-doc-release:
Expand All @@ -314,7 +322,7 @@ build-rust-doc-release:
<<: *build-only
script:
- rm -f ./crate-docs/index.html # use it as an indicator if the job succeeds
- BUILD_DUMMY_WASM_BINARY=1 RUSTDOCFLAGS="--html-in-header $(pwd)/rustdoc-header.html" time cargo +nightly doc --release --all --verbose
- BUILD_DUMMY_WASM_BINARY=1 RUSTDOCFLAGS="--html-in-header $(pwd).maintain/rustdoc-header.html" time cargo +nightly doc --release --all --verbose
- cp -R ./target/doc ./crate-docs
- echo "<meta http-equiv=refresh content=0;url=substrate_service/index.html>" > ./crate-docs/index.html
- sccache -s
Expand Down Expand Up @@ -533,10 +541,10 @@ publish-gh-doc:
- echo "Substrate version = ${DEPLOY_TAG}"
# or use helm to render the template
- helm template
--values ./scripts/kubernetes/values.yaml
--values ./.maintain/kubernetes/values.yaml
--set image.tag=${DEPLOY_TAG}
--set validator.keys=${VALIDATOR_KEYS}
./scripts/kubernetes | kubectl apply -f - --dry-run=false
./.maintain/kubernetes | kubectl apply -f - --dry-run=false
- echo "# substrate namespace ${KUBE_NAMESPACE}"
- kubectl -n ${KUBE_NAMESPACE} get all
- echo "# substrate's nodes' external ip addresses:"
Expand Down Expand Up @@ -598,16 +606,16 @@ deploy-ue1-tag:
validator 1 4:
<<: *validator-deploy
script:
- ./scripts/flamingfir-deploy.sh flamingfir-validator1
- ./.maintain/flamingfir-deploy.sh flamingfir-validator1
validator 2 4:
<<: *validator-deploy
script:
- ./scripts/flamingfir-deploy.sh flamingfir-validator2
- ./.maintain/flamingfir-deploy.sh flamingfir-validator2
validator 3 4:
<<: *validator-deploy
script:
- ./scripts/flamingfir-deploy.sh flamingfir-validator3
- ./.maintain/flamingfir-deploy.sh flamingfir-validator3
validator 4 4:
<<: *validator-deploy
script:
- ./scripts/flamingfir-deploy.sh flamingfir-validator4
- ./.maintain/flamingfir-deploy.sh flamingfir-validator4
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LABEL io.parity.image.authors="devops-team@parity.io" \
io.parity.image.vendor="Parity Technologies" \
io.parity.image.title="parity/subkey" \
io.parity.image.description="Subkey: key generating utility for Substrate." \
io.parity.image.source="https://github.com/paritytech/substrate/blob/${VCS_REF}/scripts/docker/subkey.Dockerfile" \
io.parity.image.source="https://github.com/paritytech/substrate/blob/${VCS_REF}/.maintain/docker/subkey.Dockerfile" \
io.parity.image.revision="${VCS_REF}" \
io.parity.image.created="${BUILD_DATE}" \
io.parity.image.documentation="https://github.com/paritytech/substrate/tree/${VCS_REF}/subkey"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LABEL io.parity.image.authors="devops-team@parity.io" \
io.parity.image.vendor="Parity Technologies" \
io.parity.image.title="parity/substrate" \
io.parity.image.description="Substrate: The platform for blockchain innovators." \
io.parity.image.source="https://github.com/paritytech/substrate/blob/${VCS_REF}/scripts/docker/Dockerfile" \
io.parity.image.source="https://github.com/paritytech/substrate/blob/${VCS_REF}/.maintain/docker/Dockerfile" \
io.parity.image.revision="${VCS_REF}" \
io.parity.image.created="${BUILD_DATE}" \
io.parity.image.documentation="https://wiki.parity.io/Parity-Substrate"
Expand Down
61 changes: 61 additions & 0 deletions .maintain/ensure-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/bin/bash
gnunicorn marked this conversation as resolved.
Show resolved Hide resolved

# The script is meant to check if the rules regarding packages
# dependencies are satisfied.
# The general format is:
# [top-lvl-dir]<[crate-name-prefix]

# For instance no crate within `./client` directory
# is allowed to import any crate with a directory path containing `paint`.
# Such rule is just: `client<paint`.

# The script should be run from the main repo directory!

set -u

PLEASE_DONT=(
"client<paint"
gnunicorn marked this conversation as resolved.
Show resolved Hide resolved
"client<node"
"paint<node"
"paint<client"
"primitives<paint"
"primitives<client"
)

VIOLATIONS=()
PACKAGES=()

for rule in "${PLEASE_DONT[@]}"
do
from=$(echo $rule | cut -f1 -d\<)
to=$(echo $rule | cut -f2 -d\<)

cd $from
echo "Checking rule $rule"
packages=$(find -name Cargo.toml | xargs grep -wn "path.*$to")
has_references=$(echo -n $packages | wc -c)
if [ "$has_references" != "0" ]; then
VIOLATIONS+=("$rule")
# Find packages that violate:
PACKAGES+=("$packages")
fi
cd - > /dev/null
done

# Display violations and fail
I=0
for v in "${VIOLATIONS[@]}"
do
cat << EOF

===========================================
======= Violation of rule: $v
===========================================
${PACKAGES[$I]}


EOF
I=$I+1
done

exit ${#VIOLATIONS[@]}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
#
#
# check for any changes in the node/src/runtime, srml/ and core/sr_* trees. if
# check for any changes in the node/src/runtime, paint/ and core/sr_* trees. if
# there are any changes found, it should mark the PR breaksconsensus and
# "auto-fail" the PR if there isn't a change in the runtime/src/lib.rs file
# that alters the version.
Expand Down Expand Up @@ -32,7 +32,7 @@ github_label () {

# check if the wasm sources changed
if ! git diff --name-only origin/master...${CI_COMMIT_SHA} \
| grep -q -e '^node/src/runtime' -e '^srml/' -e '^core/sr-' | grep -v -e '^core/sr-arithmetic/fuzzer'
| grep -q -e '^node/src/runtime' -e '^paint/' -e '^core/sr-' | grep -v -e '^core/sr-arithmetic/fuzzer'
then
cat <<-EOT

Expand Down Expand Up @@ -102,7 +102,7 @@ else

source file directories:
- node/src/runtime
- srml
- paint
- core/sr-*

versions file: ${VERSIONS_FILE}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ if [ "$#" -ne 1 ]; then
fi

PATH_TO_ARCHIVE=$(pwd)/$1
cd $PROJECT_ROOT/scripts/node-template-release
cd $PROJECT_ROOT/.maintain/node-template-release

cargo run $PROJECT_ROOT/node-template $PATH_TO_ARCHIVE
2 changes: 1 addition & 1 deletion scripts/runtime-dep.py → .maintain/runtime-dep.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# pip install toml
# sudo apt-get install graphviz
# the first parameter is the runtime folder
# python ./scripts/runtime-dep.py ./substrate/runtime | dot -Tpng -o output.png
# python ./.maintain/runtime-dep.py ./substrate/runtime | dot -Tpng -o output.png
import sys
import os
import toml
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#
# 1. Build `target/release/substrate` binary: `cargo build --release`
#
# 2. Start networks and containers: `sudo docker-compose -f scripts/sentry-node/docker-compose.yml up`
# 2. Start networks and containers: `sudo docker-compose -f .maintain/sentry-node/docker-compose.yml up`
#
# 3. Reach:
# - polkadot/apps on localhost:3000
Expand Down
File renamed without changes.
File renamed without changes.
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

Loading