Skip to content

Commit 04d2623

Browse files
committed
Merge remote-tracking branch 'origin/master' into girazoki-worst-case-buy-execution-weight
2 parents c982b26 + 38d2fa8 commit 04d2623

File tree

5,983 files changed

+579528
-223545
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

5,983 files changed

+579528
-223545
lines changed

.cargo/config.toml

+6
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ rustdocflags = [
88
# Needed for musl builds so user doesn't have to install musl-tools.
99
CC_x86_64_unknown_linux_musl = { value = ".cargo/musl-gcc", force = true, relative = true }
1010
CXX_x86_64_unknown_linux_musl = { value = ".cargo/musl-g++", force = true, relative = true }
11+
CARGO_WORKSPACE_ROOT_DIR = { value = "", relative = true }
12+
SQLX_OFFLINE = "true"
13+
14+
[net]
15+
retry = 5
16+
# git-fetch-with-cli = true # commented because there is a risk that a runner can be banned by github

.config/lychee.toml

+19-7
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# Run with `lychee -c .config/lychee.toml ./**/*.rs ./**/*.prdoc`
33

44
cache = true
5-
max_cache_age = "1d"
5+
max_cache_age = "10d"
66
max_redirects = 10
7-
max_retries = 6
7+
max_retries = 3
88

99
# Exclude localhost et.al.
1010
exclude_all_private = true
@@ -18,37 +18,49 @@ accept = [
1818
"429",
1919
]
2020

21-
exclude_path = ["./target"]
21+
exclude_path = [
22+
"./prdoc",
23+
"./target",
24+
]
2225

2326
exclude = [
2427
# Place holders (no need to fix these):
2528
"http://visitme/",
2629
"https://visitme/",
2730

28-
# TODO <https://github.com/paritytech/polkadot-sdk/issues/134>
31+
# TODO meta issue: <https://github.com/paritytech/polkadot-sdk/issues/134>
2932
"https://docs.substrate.io/main-docs/build/custom-rpc/#public-rpcs",
3033
"https://docs.substrate.io/rustdocs/latest/sp_api/macro.decl_runtime_apis.html",
3134
"https://github.com/ipfs/js-ipfs-bitswap/blob/",
3235
"https://github.com/paritytech/polkadot-sdk/substrate/frame/timestamp",
3336
"https://github.com/paritytech/substrate/frame/fast-unstake",
3437
"https://github.com/zkcrypto/bls12_381/blob/e224ad4ea1babfc582ccd751c2bf128611d10936/src/test-data/mod.rs",
3538
"https://polkadot.network/the-path-of-a-parachain-block/",
36-
"https://research.web3.foundation/en/latest/polkadot/BABE/Babe/#6-practical-results",
3739
"https://research.web3.foundation/en/latest/polkadot/NPoS/3.%20Balancing.html",
3840
"https://research.web3.foundation/en/latest/polkadot/Token%20Economics.html#inflation-model",
39-
"https://research.web3.foundation/en/latest/polkadot/block-production/Babe.html",
40-
"https://research.web3.foundation/en/latest/polkadot/block-production/Babe.html#-6.-practical-results",
4141
"https://research.web3.foundation/en/latest/polkadot/networking/3-avail-valid.html#topology",
4242
"https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html",
4343
"https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html#inflation-model",
4444
"https://research.web3.foundation/en/latest/polkadot/slashing/npos.html",
4545
"https://rpc.polkadot.io/",
46+
"https://try-runtime.polkadot.io/",
4647
"https://w3f.github.io/parachain-implementers-guide/node/approval/approval-distribution.html",
4748
"https://w3f.github.io/parachain-implementers-guide/node/index.html",
4849
"https://w3f.github.io/parachain-implementers-guide/protocol-chain-selection.html",
4950
"https://w3f.github.io/parachain-implementers-guide/runtime/session_info.html",
5051

5152
# Behind a captcha (code 403):
53+
"https://chainlist.org/chain/*",
5254
"https://iohk.io/en/blog/posts/2023/11/03/partner-chains-are-coming-to-cardano/",
55+
"https://polymesh.network",
5356
"https://www.reddit.com/r/rust/comments/3spfh1/does_collect_allocate_more_than_once_while/",
57+
58+
# 403 rate limited:
59+
"https://etherscan.io/block/11090290",
60+
"https://subscan.io/",
61+
"https://substrate.stackexchange.com/.*",
62+
63+
# Exclude strings which contain templates like {} and {:?}
64+
"%7B%7D",
65+
"%7B:\\?}",
5466
]

.config/nextest.toml

+7-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ retries = 5
2121
# The number of threads to run tests with. Supported values are either an integer or
2222
# the string "num-cpus". Can be overridden through the `--test-threads` option.
2323
# test-threads = "num-cpus"
24-
2524
test-threads = 20
2625

2726
# The number of threads required for each test. This is generally used in overrides to
@@ -124,3 +123,10 @@ serial-integration = { max-threads = 1 }
124123
[[profile.default.overrides]]
125124
filter = 'test(/(^ui$|_ui|ui_)/)'
126125
test-group = 'serial-integration'
126+
127+
# Running eth-rpc tests sequentially
128+
# These tests rely on a shared resource (the RPC and Node)
129+
# and would cause race conditions due to transaction nonces if run in parallel.
130+
[[profile.default.overrides]]
131+
filter = 'package(pallet-revive-eth-rpc) and test(/^tests::/)'
132+
test-group = 'serial-integration'

.config/taplo.toml

+17-1
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@ exclude = [
66
"cumulus/zombienet/**",
77
"polkadot/node/malus/integrationtests/**",
88
"polkadot/zombienet_tests/**",
9+
"substrate/client/transaction-pool/tests/zombienet/**",
910
"substrate/zombienet/**",
11+
"target/**",
1012
]
1113

1214
# global rules
1315
[formatting]
1416
reorder_arrays = true
1517
inline_table_expand = false
16-
array_auto_expand = false
18+
array_auto_expand = true
1719
array_auto_collapse = false
1820
indent_string = " " # tab
1921

@@ -32,3 +34,17 @@ keys = ["build"]
3234

3335
[rule.formatting]
3436
reorder_arrays = false
37+
38+
[[rule]]
39+
include = ["Cargo.toml"]
40+
keys = ["workspace.dependencies"]
41+
42+
[rule.formatting]
43+
reorder_keys = true
44+
45+
[[rule]]
46+
include = ["**/Cargo.toml"]
47+
keys = ["build-dependencies", "dependencies", "dev-dependencies"]
48+
49+
[rule.formatting]
50+
reorder_keys = true

.config/zepter.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,13 @@ workflows:
2525
'--show-path',
2626
'--quiet',
2727
]
28-
# Same as `check`, but with the `--fix` flag.
28+
# The umbrella crate uses more features, so we to check those too:
29+
check_umbrella:
30+
- [ $check.0, '--features=serde,experimental,runtime,with-tracing,tuples-96,with-tracing', '-p=polkadot-sdk' ]
31+
# Same as `check_*`, but with the `--fix` flag.
2932
default:
3033
- [ $check.0, '--fix' ]
34+
- [ $check_umbrella.0, '--fix' ]
3135

3236
# Will be displayed when any workflow fails:
3337
help:

.forklift/config-gitlab.toml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[compression]
2+
type = "zstd"
3+
4+
[compression.zstd]
5+
compressionLevel = 3
6+
7+
[general]
8+
jobNameVariable = "CI_JOB_NAME"
9+
jobsBlackList = []
10+
logLevel = "warn"
11+
threadsCount = 6
12+
13+
[cache]
14+
extraEnv = ["RUNTIME_METADATA_HASH"]
15+
16+
[metrics]
17+
enabled = true
18+
pushEndpoint = "placeholder"
19+
20+
[metrics.extraLabels]
21+
environment = "production"
22+
job_name = "$CI_JOB_NAME"
23+
project_name = "$CI_PROJECT_PATH"
24+
25+
[storage]
26+
type = "s3"
27+
28+
[storage.s3]
29+
accessKeyId = "placeholder"
30+
bucketName = "placeholder"
31+
concurrency = 10
32+
endpointUrl = "placeholder"
33+
secretAccessKey = "placeholder"

.forklift/config.toml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[compression]
2+
type = "zstd"
3+
4+
[compression.zstd]
5+
compressionLevel = 3
6+
7+
[general]
8+
jobNameVariable = "CI_JOB_NAME"
9+
jobsBlackList = []
10+
logLevel = "warn"
11+
threadsCount = 6
12+
13+
[cache]
14+
extraEnv = ["RUNTIME_METADATA_HASH"]
15+
16+
[metrics]
17+
enabled = true
18+
pushEndpoint = "placeholder"
19+
20+
[metrics.extraLabels]
21+
environment = "production"
22+
job_name = "$CI_JOB_NAME"
23+
project_name = "$CI_PROJECT_PATH"
24+
25+
[storage]
26+
type = "gcs"
27+
28+
[storage.gcs]
29+
bucketName = "parity-ci-forklift-regional"

.github/CODEOWNERS

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# - Multiple owners are supported.
1414
# - Either handle (e.g, @github_user or @github/team) or email can be used. Keep in mind,
1515
# that handles might work better because they are more recognizable on GitHub,
16-
# eyou can use them for mentioning unlike an email.
16+
# you can use them for mentioning unlike an email.
1717
# - The latest matching rule, if multiple, takes precedence.
1818

1919
# CI
@@ -64,7 +64,8 @@
6464
/substrate/primitives/merkle-mountain-range/ @acatangiu
6565

6666
# Contracts
67-
/substrate/frame/contracts/ @athei @paritytech/docs-audit
67+
/substrate/frame/contracts/ @paritytech/smart-contracts @paritytech/docs-audit
68+
/substrate/frame/revive/ @paritytech/smart-contracts @paritytech/docs-audit
6869

6970
# NPoS and election
7071
/substrate/frame/election-provider-multi-phase/ @paritytech/staking-core @paritytech/docs-audit
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: "build and push image"
2+
inputs:
3+
dockerfile:
4+
description: "dockerfile to build"
5+
required: true
6+
image-name:
7+
description: ""
8+
required: true
9+
outputs:
10+
branch:
11+
description: "Branch name for the PR"
12+
value: ${{ steps.branch.outputs.branch }}
13+
14+
runs:
15+
using: "composite"
16+
steps:
17+
# gcloud
18+
# https://github.com/paritytech/ci_cd/wiki/GitHub:-Push-Docker-image-to-GCP-Registry
19+
- name: "Set up Cloud SDK"
20+
uses: "google-github-actions/setup-gcloud@v2"
21+
- name: "gcloud info"
22+
shell: bash
23+
run: "gcloud info"
24+
- name: "Auth in gcloud registry"
25+
shell: bash
26+
run: "gcloud auth configure-docker europe-docker.pkg.dev --quiet"
27+
28+
- name: build
29+
shell: bash
30+
env:
31+
ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.105"
32+
run: |
33+
export DOCKER_IMAGES_VERSION=${{ github.event.pull_request.head.sha }}
34+
if [[ ${{ github.event_name }} == "merge_group" ]]; then export DOCKER_IMAGES_VERSION="${GITHUB_SHA::8}"; fi
35+
docker build \
36+
--build-arg VCS_REF="${GITHUB_SHA}" \
37+
--build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')" \
38+
--build-arg IMAGE_NAME="${{ inputs.image-name }}" \
39+
--build-arg ZOMBIENET_IMAGE="${ZOMBIENET_IMAGE}" \
40+
-t "${{ inputs.image-name }}:$DOCKER_IMAGES_VERSION" \
41+
-f ${{ inputs.dockerfile }} \
42+
.
43+
docker push "${{ inputs.image-name }}:$DOCKER_IMAGES_VERSION"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: 'cargo check runtimes'
2+
description: 'Runs `cargo check` for every directory in provided root.'
3+
inputs:
4+
root:
5+
description: "Root directory. Expected to contain several cargo packages inside."
6+
required: true
7+
runs:
8+
using: "composite"
9+
steps:
10+
- name: Check
11+
shell: bash
12+
run: |
13+
mkdir -p ~/.forklift
14+
cp .forklift/config.toml ~/.forklift/config.toml
15+
cd ${{ inputs.root }}
16+
for directory in $(echo */); do
17+
echo "_____Running cargo check for ${directory} ______";
18+
cd ${directory};
19+
pwd;
20+
SKIP_WASM_BUILD=1 forklift cargo check --locked;
21+
cd ..;
22+
done

.github/actions/set-up-gh/action.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: "install gh"
2+
description: "Install the gh cli in a debian based distro and switches to the PR branch."
3+
inputs:
4+
pr-number:
5+
description: "Number of the PR"
6+
required: true
7+
GH_TOKEN:
8+
description: "GitHub token"
9+
required: true
10+
outputs:
11+
branch:
12+
description: "Branch name for the PR"
13+
value: ${{ steps.branch.outputs.branch }}
14+
runs:
15+
using: "composite"
16+
steps:
17+
- name: Set up git
18+
shell: bash
19+
# Here it would get the script from previous step
20+
run: git config --global --add safe.directory '*'
21+
- run: gh pr checkout ${{ inputs.pr-number }}
22+
shell: bash
23+
env:
24+
GITHUB_TOKEN: ${{ inputs.GH_TOKEN }}
25+
- name: Export branch name
26+
shell: bash
27+
run: echo "branch=$(git rev-parse --abbrev-ref HEAD)" >> "$GITHUB_OUTPUT"
28+
id: branch
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: "stop all workflows"
2+
description: "Action stops all workflows in a PR to save compute resources."
3+
inputs:
4+
app-id:
5+
description: "App id"
6+
required: true
7+
app-key:
8+
description: "App token"
9+
required: true
10+
runs:
11+
using: "composite"
12+
steps:
13+
- name: Worfklow stopper - Generate token
14+
uses: actions/create-github-app-token@v1
15+
id: app-token
16+
with:
17+
app-id: ${{ inputs.app-id }}
18+
private-key: ${{ inputs.app-key }}
19+
owner: "paritytech"
20+
repositories: "workflow-stopper"
21+
- name: Workflow stopper - Stop all workflows
22+
uses: octokit/[email protected]
23+
with:
24+
route: POST /repos/paritytech/workflow-stopper/actions/workflows/stopper.yml/dispatches
25+
ref: main
26+
inputs: '${{ format(''{{ "github_sha": "{0}", "github_repository": "{1}", "github_ref_name": "{2}", "github_workflow_id": "{3}", "github_job_name": "{4}" }}'', github.event.pull_request.head.sha, github.repository, github.ref_name, github.run_id, github.job) }}'
27+
env:
28+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

.github/codecov.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
coverage:
2+
precision: 2
3+
round: down
4+
range: "1...100"
5+
status:
6+
project:
7+
default:
8+
target: 1.0
9+
threshold: 2.0
10+
11+
comment:
12+
behavior: new
13+
14+
fixes:
15+
- "/__w/polkadot-sdk/polkadot-sdk/::"

.github/dependabot.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@ updates:
55
directory: '/'
66
labels: ["A1-insubstantial", "R0-silent"]
77
schedule:
8-
interval: daily
8+
interval: weekly
9+
groups:
10+
ci_dependencies:
11+
patterns:
12+
- "*"
913
# Update Rust dependencies:
1014
- package-ecosystem: "cargo"
1115
directory: "/"
1216
labels: ["A1-insubstantial", "R0-silent"]
1317
schedule:
14-
interval: "daily"
18+
interval: "weekly"
1519
groups:
1620
# We assume these crates to be semver abiding and can therefore group them together.
1721
known_good_semver:

.github/env

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
IMAGE="docker.io/paritytech/ci-unified:bullseye-1.84.1-2025-01-28-v202502131220"

.github/pull_request_template.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../docs/contributor/PULL_REQUEST_TEMPLATE.md

0 commit comments

Comments
 (0)