Skip to content

Commit

Permalink
Merge branch 'master' into dz/3
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmitry-lahoda committed Dec 3, 2023
2 parents f898ef7 + f5051c8 commit d3bc419
Show file tree
Hide file tree
Showing 810 changed files with 13,646 additions and 47,771 deletions.
52 changes: 26 additions & 26 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build]
rustdocflags = [
"-Dwarnings",
"-Arustdoc::redundant_explicit_links", # stylistic
"-Dwarnings",
"-Arustdoc::redundant_explicit_links", # stylistic
]

# An auto defined `clippy` feature was introduced,
Expand All @@ -12,30 +12,30 @@ rustdocflags = [
# RUSTFLAGS= cargo clippy
[target.'cfg(feature = "cargo-clippy")']
rustflags = [
"-Aclippy::all",
"-Dclippy::correctness",
"-Aclippy::if-same-then-else",
"-Asuspicious_double_ref_op",
"-Dclippy::complexity",
"-Aclippy::zero-prefixed-literal", # 00_1000_000
"-Aclippy::type_complexity", # raison d'etre
"-Aclippy::nonminimal-bool", # maybe
"-Aclippy::borrowed-box", # Reasonable to fix this one
"-Aclippy::too-many-arguments", # (Turning this on would lead to)
"-Aclippy::unnecessary_cast", # Types may change
"-Aclippy::identity-op", # One case where we do 0 +
"-Aclippy::useless_conversion", # Types may change
"-Aclippy::unit_arg", # styalistic.
"-Aclippy::option-map-unit-fn", # styalistic
"-Aclippy::bind_instead_of_map", # styalistic
"-Aclippy::erasing_op", # E.g. 0 * DOLLARS
"-Aclippy::eq_op", # In tests we test equality.
"-Aclippy::while_immutable_condition", # false positives
"-Aclippy::needless_option_as_deref", # false positives
"-Aclippy::derivable_impls", # false positives
"-Aclippy::stable_sort_primitive", # prefer stable sort
"-Aclippy::extra-unused-type-parameters", # stylistic
"-Aclippy::default_constructed_unit_structs", # stylistic
"-Aclippy::all",
"-Dclippy::correctness",
"-Aclippy::if-same-then-else",
"-Asuspicious_double_ref_op",
"-Dclippy::complexity",
"-Aclippy::zero-prefixed-literal", # 00_1000_000
"-Aclippy::type_complexity", # raison d'etre
"-Aclippy::nonminimal-bool", # maybe
"-Aclippy::borrowed-box", # Reasonable to fix this one
"-Aclippy::too-many-arguments", # (Turning this on would lead to)
"-Aclippy::unnecessary_cast", # Types may change
"-Aclippy::identity-op", # One case where we do 0 +
"-Aclippy::useless_conversion", # Types may change
"-Aclippy::unit_arg", # styalistic.
"-Aclippy::option-map-unit-fn", # styalistic
"-Aclippy::bind_instead_of_map", # styalistic
"-Aclippy::erasing_op", # E.g. 0 * DOLLARS
"-Aclippy::eq_op", # In tests we test equality.
"-Aclippy::while_immutable_condition", # false positives
"-Aclippy::needless_option_as_deref", # false positives
"-Aclippy::derivable_impls", # false positives
"-Aclippy::stable_sort_primitive", # prefer stable sort
"-Aclippy::extra-unused-type-parameters", # stylistic
"-Aclippy::default_constructed_unit_structs", # stylistic
]

[env]
Expand Down
56 changes: 28 additions & 28 deletions .config/lychee.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,36 @@ accept = [
200,

# Rate limited - GitHub likes to throw this.
429
429,
]

exclude_path = [ "./target" ]
exclude_path = ["./target"]

exclude = [
# Place holders (no need to fix these):
"http://visitme/",
"https://visitme/",
# TODO <https://github.com/paritytech/polkadot-sdk/issues/134>
"https://docs.substrate.io/main-docs/build/custom-rpc/#public-rpcs",
"https://docs.substrate.io/rustdocs/latest/sp_api/macro.decl_runtime_apis.html",
"https://github.com/ipfs/js-ipfs-bitswap/blob/",
"https://github.com/paritytech/polkadot-sdk/substrate/frame/timestamp",
"https://github.com/paritytech/substrate/frame/fast-unstake",
"https://github.com/zkcrypto/bls12_381/blob/e224ad4ea1babfc582ccd751c2bf128611d10936/src/test-data/mod.rs",
"https://polkadot.network/the-path-of-a-parachain-block/",
"https://research.web3.foundation/en/latest/polkadot/BABE/Babe/#6-practical-results",
"https://research.web3.foundation/en/latest/polkadot/block-production/Babe.html",
"https://research.web3.foundation/en/latest/polkadot/block-production/Babe.html#-6.-practical-results",
"https://research.web3.foundation/en/latest/polkadot/networking/3-avail-valid.html#topology",
"https://research.web3.foundation/en/latest/polkadot/NPoS/3.%20Balancing.html",
"https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html",
"https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html#inflation-model",
"https://research.web3.foundation/en/latest/polkadot/slashing/npos.html",
"https://research.web3.foundation/en/latest/polkadot/Token%20Economics.html#inflation-model",
"https://rpc.polkadot.io/",
"https://w3f.github.io/parachain-implementers-guide/node/approval/approval-distribution.html",
"https://w3f.github.io/parachain-implementers-guide/node/index.html",
"https://w3f.github.io/parachain-implementers-guide/protocol-chain-selection.html",
"https://w3f.github.io/parachain-implementers-guide/runtime/session_info.html",
# Place holders (no need to fix these):
"http://visitme/",
"https://visitme/",

# TODO <https://github.com/paritytech/polkadot-sdk/issues/134>
"https://docs.substrate.io/main-docs/build/custom-rpc/#public-rpcs",
"https://docs.substrate.io/rustdocs/latest/sp_api/macro.decl_runtime_apis.html",
"https://github.com/ipfs/js-ipfs-bitswap/blob/",
"https://github.com/paritytech/polkadot-sdk/substrate/frame/timestamp",
"https://github.com/paritytech/substrate/frame/fast-unstake",
"https://github.com/zkcrypto/bls12_381/blob/e224ad4ea1babfc582ccd751c2bf128611d10936/src/test-data/mod.rs",
"https://polkadot.network/the-path-of-a-parachain-block/",
"https://research.web3.foundation/en/latest/polkadot/BABE/Babe/#6-practical-results",
"https://research.web3.foundation/en/latest/polkadot/NPoS/3.%20Balancing.html",
"https://research.web3.foundation/en/latest/polkadot/Token%20Economics.html#inflation-model",
"https://research.web3.foundation/en/latest/polkadot/block-production/Babe.html",
"https://research.web3.foundation/en/latest/polkadot/block-production/Babe.html#-6.-practical-results",
"https://research.web3.foundation/en/latest/polkadot/networking/3-avail-valid.html#topology",
"https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html",
"https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html#inflation-model",
"https://research.web3.foundation/en/latest/polkadot/slashing/npos.html",
"https://rpc.polkadot.io/",
"https://w3f.github.io/parachain-implementers-guide/node/approval/approval-distribution.html",
"https://w3f.github.io/parachain-implementers-guide/node/index.html",
"https://w3f.github.io/parachain-implementers-guide/protocol-chain-selection.html",
"https://w3f.github.io/parachain-implementers-guide/runtime/session_info.html",
]
33 changes: 33 additions & 0 deletions .config/taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# all options https://taplo.tamasfe.dev/configuration/formatter-options.html

# ignore zombienet as they do some deliberate custom toml stuff
exclude = [
"cumulus/zombienet/**",
"polkadot/node/malus/integrationtests/**",
"polkadot/zombienet_tests/**",
"substrate/zombienet/**",
]

# global rules
[formatting]
reorder_arrays = true
inline_table_expand = false
array_auto_expand = false
array_auto_collapse = false
indent_string = " " # tab

# don't re-order order-dependent deb package metadata
[[rule]]
include = ["polkadot/Cargo.toml"]
keys = ["package.metadata.deb"]

[rule.formatting]
reorder_arrays = false

# don't re-order order-dependent rustflags
[[rule]]
include = [".cargo/config.toml"]
keys = ["build", "target.'cfg(feature = \"cargo-clippy\")'"]

[rule.formatting]
reorder_arrays = false
5 changes: 1 addition & 4 deletions .config/zepter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,15 @@ workflows:
'--left-side-outside-workspace=ignore',
# Some features imply that they activate a specific dependency as non-optional. Otherwise the default behaviour with a `?` is used.
'--feature-enables-dep=try-runtime:frame-try-runtime,runtime-benchmarks:frame-benchmarking',
# Actually modify the files and not just report the issues:
# Auxillary flags:
'--offline',
'--locked',
'--show-path',
'--quiet',
]
# Format the features into canonical format:
- ['format', 'features', '--offline', '--locked', '--quiet']
# Same as `check`, but with the `--fix` flag.
default:
- [ $check.0, '--fix' ]
- [ $check.1, '--fix' ]

# Will be displayed when any workflow fails:
help:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/review-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
app_id: ${{ secrets.REVIEW_APP_ID }}
private_key: ${{ secrets.REVIEW_APP_KEY }}
- name: "Evaluates PR reviews and assigns reviewers"
uses: paritytech/review-bot@v2.2.0
uses: paritytech/review-bot@v2.3.0
with:
repo-token: ${{ steps.app_token.outputs.token }}
team-token: ${{ steps.app_token.outputs.token }}
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/pipeline/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ build-rustdoc:
find "$path" -name '*.html' | xargs -I {} -P "$(nproc)" bash -c 'process_file "$@"' _ {}
}
inject_simple_analytics "./crate-docs"
- echo "<meta http-equiv=refresh content=0;url=polkadot_service/index.html>" > ./crate-docs/index.html
- echo "<meta http-equiv=refresh content=0;url=developer_hub/index.html>" > ./crate-docs/index.html

build-implementers-guide:
stage: build
Expand Down
10 changes: 10 additions & 0 deletions .gitlab/pipeline/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ check-rust-feature-propagation:
- cargo install --locked --version 0.13.3 -q -f zepter && zepter --version
- zepter run check

check-toml-format:
stage: check
extends:
- .kubernetes-env
- .common-refs
script:
- cargo install taplo-cli --locked --version 0.8.1
- taplo format --check --config .config/taplo.toml
- echo "Please run `taplo format --config .config/taplo.toml` to fix any toml formatting issues"

# More info can be found here: https://github.com/paritytech/polkadot/pull/5865
.check-runtime-migration:
stage: check
Expand Down
30 changes: 0 additions & 30 deletions .gitlab/pipeline/short-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,6 @@ short-benchmark-westend: &short-bench
script:
- ./artifacts/polkadot-parachain benchmark pallet --chain $RUNTIME_CHAIN --pallet "*" --extrinsic "*" --steps 2 --repeat 1

short-benchmark-asset-hub-polkadot:
<<: *short-bench-cumulus
variables:
RUNTIME_CHAIN: asset-hub-polkadot-dev

short-benchmark-asset-hub-kusama:
<<: *short-bench-cumulus
variables:
RUNTIME_CHAIN: asset-hub-kusama-dev

short-benchmark-asset-hub-rococo:
<<: *short-bench-cumulus
variables:
Expand All @@ -69,16 +59,6 @@ short-benchmark-asset-hub-westend:
variables:
RUNTIME_CHAIN: asset-hub-westend-dev

short-benchmark-bridge-hub-polkadot:
<<: *short-bench-cumulus
variables:
RUNTIME_CHAIN: bridge-hub-polkadot-dev

short-benchmark-bridge-hub-kusama:
<<: *short-bench-cumulus
variables:
RUNTIME_CHAIN: bridge-hub-kusama-dev

short-benchmark-bridge-hub-rococo:
<<: *short-bench-cumulus
variables:
Expand All @@ -89,21 +69,11 @@ short-benchmark-bridge-hub-westend:
variables:
RUNTIME_CHAIN: bridge-hub-westend-dev

short-benchmark-collectives-polkadot:
<<: *short-bench-cumulus
variables:
RUNTIME_CHAIN: collectives-polkadot-dev

short-benchmark-collectives-westend:
<<: *short-bench-cumulus
variables:
RUNTIME_CHAIN: collectives-westend-dev

short-benchmark-glutton-kusama:
<<: *short-bench-cumulus
variables:
RUNTIME_CHAIN: glutton-kusama-dev-1300

short-benchmark-glutton-westend:
<<: *short-bench-cumulus
variables:
Expand Down
1 change: 0 additions & 1 deletion .gitlab/pipeline/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ test-linux-stable-int:
RUN_UI_TESTS: 1
script:
- WASM_BUILD_NO_COLOR=1
RUST_LOG=sync=trace,consensus=trace,client=trace,state-db=trace,db=trace,forks=trace,state_db=trace,storage_cache=trace
time cargo test -p staging-node-cli --release --locked -- --ignored

# more information about this job can be found here:
Expand Down
18 changes: 9 additions & 9 deletions .gitlab/spellcheck.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ use_builtin = true
[hunspell.quirks]
# He tagged it as 'TheGreatestOfAllTimes'
transform_regex = [
# `Type`'s
# `Type`'s
"^'([^\\s])'$",
# 5x
# 10.7%
# 5x
# 10.7%
"^[0-9_]+(?:\\.[0-9]*)?(x|%)$",
# Transforms'
# Transforms'
"^(.*)'$",
# backslashes
"^\\+$",
# backslashes
"^[0-9]*+k|MB|Mb|ms|Mbit|nd|th|rd$",
# single char `=` `>` `%` ..
"^\\+$",
# single char `=` `>` `%` ..
"^=|>|<|%$",
# 22_100
"^(?:[0-9]+_)+[0-9]+$"
# 22_100
"^(?:[0-9]+_)+[0-9]+$",
]
allow_concatenation = true
allow_dashes = true
Loading

0 comments on commit d3bc419

Please sign in to comment.