feat: initialize Kurdistan SDK - independent fork of Polkadot SDK

This commit is contained in:
2025-12-13 15:44:15 +03:00
commit e4778b4576
6838 changed files with 1847450 additions and 0 deletions
+75
View File
@@ -0,0 +1,75 @@
# Config file for lychee link checker: <https://github.com/lycheeverse/lychee>
# Run with `lychee -c .config/lychee.toml ./**/*.rs ./**/*.prdoc`
cache = true
max_cache_age = "10d"
max_redirects = 10
max_retries = 3
# User agent to send with each request.
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0"
# Exclude localhost et.al.
exclude_all_private = true
# Treat these codes as success condition:
accept = [
# Ok
"200",
# Rate limited - GitHub likes to throw this.
"429",
]
exclude_path = ["./prdoc", "./target"]
exclude = [
# Place holders (no need to fix these):
"http://visitme/",
"https://some.com/",
"https://visitme/",
# Zombienet test placeholders:
"http://test.com/",
"https://mycloudstorage.com/",
"https://storage.com/",
"https://www.backupsite.com/",
"https://www.urltomysnapshot.com/",
# TODO meta issue: <https://github.com/pezkuwichain/pezkuwi-sdk/issues/134>
"https://github.com/ipfs/js-ipfs-bitswap/blob/",
"https://github.com/paritytech/substrate/frame/fast-unstake",
# Exclude wiki.network.pezkuwichain.io - SSL certificate hostname mismatch
"https://github.com/pezkuwichain/pezkuwi-sdk/substrate/frame/timestamp",
"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/NPoS/3.%20Balancing.html",
"https://research.web3.foundation/en/latest/polkadot/Token%20Economics.html#inflation-model",
"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://try-runtime.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",
"https://wiki.network.pezkuwichain.io/*",
# Genuinely broken, but exist as part of a signed statement. Rarely used, will be
# removed at some point.
"statement.polkadot.network",
# Behind a captcha (code 403):
"https://chainlist.org/chain/*",
"https://dl.acm.org",
"https://iohk.io/en/blog/posts/2023/11/03/partner-chains-are-coming-to-cardano/",
"https://polymesh.network",
"https://www.reddit.com/r/rust/comments/3spfh1/does_collect_allocate_more_than_once_while/",
# 403 rate limited:
"https://etherscan.io/block/11090290",
"https://exchange.pezkuwichain.app/.*",
"https://subscan.io/",
# Broken for link-checker CI, but works in browser and local machine
"http://www.gnu.org/licenses/",
"https://www.gnu.org/licenses/",
# Exclude strings which contain templates like {} and {:?}
"%7B%7D",
"%7B:\\?}",
]
+125
View File
@@ -0,0 +1,125 @@
# This is the default config used by nextest. It is embedded in the binary at
# build time. It may be used as a template for .config/nextest.toml.
[store]
# The directory under the workspace root at which nextest-related files are
# written. Profile-specific storage is currently written to dir/<profile-name>.
dir = "target/nextest"
# This section defines the default nextest profile. Custom profiles are layered
# on top of the default profile.
[profile.default]
# "retries" defines the number of times a test should be retried. If set to a
# non-zero value, tests that succeed on a subsequent attempt will be marked as
# non-flaky. Can be overridden through the `--retries` option.
# Examples
# * retries = 3
# * retries = { backoff = "fixed", count = 2, delay = "1s" }
# * retries = { backoff = "exponential", count = 10, delay = "1s", jitter = true, max-delay = "10s" }
retries = 5
# The number of threads to run tests with. Supported values are either an integer or
# the string "num-cpus". Can be overridden through the `--test-threads` option.
# test-threads = "num-cpus"
test-threads = "num-cpus"
# The number of threads required for each test. This is generally used in overrides to
# mark certain tests as heavier than others. However, it can also be set as a global parameter.
threads-required = 1
# Show these test statuses in the output.
#
# The possible values this can take are:
# * none: no output
# * fail: show failed (including exec-failed) tests
# * retry: show flaky and retried tests
# * slow: show slow tests
# * pass: show passed tests
# * skip: show skipped tests (most useful for CI)
# * all: all of the above
#
# Each value includes all the values above it; for example, "slow" includes
# failed and retried tests.
#
# Can be overridden through the `--status-level` flag.
status-level = "pass"
# Similar to status-level, show these test statuses at the end of the run.
final-status-level = "flaky"
# "failure-output" defines when standard output and standard error for failing tests are produced.
# Accepted values are
# * "immediate": output failures as soon as they happen
# * "final": output failures at the end of the test run
# * "immediate-final": output failures as soon as they happen and at the end of
# the test run; combination of "immediate" and "final"
# * "never": don't output failures at all
#
# For large test suites and CI it is generally useful to use "immediate-final".
#
# Can be overridden through the `--failure-output` option.
failure-output = "immediate"
# "success-output" controls production of standard output and standard error on success. This should
# generally be set to "never".
success-output = "never"
# Cancel the test run on the first failure. For CI runs, consider setting this
# to false.
fail-fast = true
# Treat a test that takes longer than the configured 'period' as slow, and print a message.
# See <https://nexte.st/book/slow-tests> for more information.
#
# Optional: specify the parameter 'terminate-after' with a non-zero integer,
# which will cause slow tests to be terminated after the specified number of
# periods have passed.
# Example: slow-timeout = { period = "60s", terminate-after = 2 }
slow-timeout = { period = "60s" }
# Treat a test as leaky if after the process is shut down, standard output and standard error
# aren't closed within this duration.
#
# This usually happens in case of a test that creates a child process and lets it inherit those
# handles, but doesn't clean the child process up (especially when it fails).
#
# See <https://nexte.st/book/leaky-tests> for more information.
leak-timeout = "100ms"
[profile.default.junit]
# Output a JUnit report into the given file inside 'store.dir/<profile-name>'.
# If unspecified, JUnit is not written out.
path = "junit.xml"
# The name of the top-level "report" element in JUnit report. If aggregating
# reports across different test runs, it may be useful to provide separate names
# for each report.
report-name = "substrate"
# Whether standard output and standard error for passing tests should be stored in the JUnit report.
# Output is stored in the <system-out> and <system-err> elements of the <testcase> element.
store-success-output = false
# Whether standard output and standard error for failing tests should be stored in the JUnit report.
# Output is stored in the <system-out> and <system-err> elements of the <testcase> element.
#
# Note that if a description can be extracted from the output, it is always stored in the
# <description> element.
store-failure-output = true
# This profile is activated if MIRI_SYSROOT is set.
[profile.default-miri]
# Miri tests take up a lot of memory, so only run 1 test at a time by default.
test-threads = 1
# Mutual exclusion of tests with `cargo build` invocation as a lock to avoid multiple
# simultaneous invocations clobbering each other.
[test-groups]
serial-integration = { max-threads = 1 }
# Running UI tests sequentially
# More info can be found here: https://github.com/paritytech/ci_cd/issues/754
[[profile.default.overrides]]
filter = 'test(/(^ui$|_ui|ui_)/)'
test-group = 'serial-integration'
+50
View File
@@ -0,0 +1,50 @@
# all options https://taplo.tamasfe.dev/configuration/formatter-options.html
# ignore zombienet as they do some deliberate custom toml stuff
exclude = [
"bridges/testing/**",
"cumulus/zombienet/**",
"pezkuwi/node/malus/integrationtests/**",
"pezkuwi/zombienet_tests/**",
"substrate/client/transaction-pool/tests/zombienet/**",
"substrate/zombienet/**",
"target/**",
]
# global rules
[formatting]
reorder_arrays = true
inline_table_expand = false
array_auto_expand = true
array_auto_collapse = false
indent_string = " " # tab
# don't re-order order-dependent deb package metadata
[[rule]]
include = ["pezkuwi/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"]
[rule.formatting]
reorder_arrays = false
[[rule]]
include = ["Cargo.toml"]
keys = ["workspace.dependencies"]
[rule.formatting]
reorder_keys = true
[[rule]]
include = ["**/Cargo.toml"]
keys = ["build-dependencies", "dependencies", "dev-dependencies"]
[rule.formatting]
reorder_keys = true
+58
View File
@@ -0,0 +1,58 @@
version:
format: 1
# Minimum version of the binary that is expected to work. This is just for printing a nice error
# message when someone tries to use an older version.
binary: 1.82.1
# The examples in this file assume crate `A` to have a dependency on crate `B`.
workflows:
check:
- [
'lint',
# Check that `A` activates the features of `B`.
'propagate-feature',
# These are the features to check:
'--features=try-runtime,runtime-benchmarks,std,bandersnatch-experimental',
# Do not try to add a new section into `[features]` of `A` only because `B` exposes that feature.
# There are edge-cases where this is still needed, but we can add them manually.
'--left-side-feature-missing=ignore',
# Ignore the case that `A` is outside of the workspace. Otherwise it will report errors
# in external dependencies that we have no influence on.
'--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',
# Do not propagate std feature from sp-wasm-interface down to wasmtime dependency.
'--ignore-missing-propagate=sp-wasm-interface/std:wasmtime/std',
# Auxiliary flags:
'--offline',
'--locked',
'--show-path',
'--quiet',
]
- [
'lint',
# Check that dependencies are not duplicated between normal and dev sections.
'duplicate-deps',
'--offline',
'--locked',
'--quiet',
]
# The umbrella crate uses more features, so we need to check those too:
check_umbrella:
- [ $check.0, '--features=serde,experimental,runtime,with-tracing,tuples-96,with-tracing', '-p=pezkuwi-sdk' ]
# Same as `check_*`, but with the `--fix` flag.
default:
- [ $check.0, '--fix' ]
- [ $check_umbrella.0, '--fix' ]
# Will be displayed when any workflow fails:
help:
text: |
Polkadot-SDK uses the Zepter CLI to detect abnormalities in the feature configuration.
It looks like one or more checks failed; please check the console output. You can try to automatically address them by running `zepter`.
Otherwise please ask directly in the Merge Request, GitHub Discussions or on Matrix Chat, thank you.
links:
- "https://github.com/pezkuwichain/pezkuwi-sdk/issues/1831"
- "https://github.com/ggwpez/zepter"