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
@@ -0,0 +1,74 @@
// This file is part of Substrate.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use frame_benchmarking::v2::*;
use frame_support_test::Config;
#[benchmarks]
mod benches {
use super::*;
#[benchmark(skip_meta, extra, pov_mode = Measured)]
fn bench1() {
#[block]
{}
}
#[benchmark(pov_mode = Measured, extra, skip_meta)]
fn bench2() {
#[block]
{}
}
#[benchmark(extra, pov_mode = Measured {
Pallet: Measured,
Pallet::Storage: MaxEncodedLen,
}, skip_meta)]
fn bench3() {
#[block]
{}
}
#[benchmark(skip_meta, extra, pov_mode = Measured {
Pallet::Storage: MaxEncodedLen,
Pallet::StorageSubKey: Measured,
})]
fn bench4() {
#[block]
{}
}
#[benchmark(pov_mode = MaxEncodedLen {
Pallet::Storage: Measured,
Pallet::StorageSubKey: Measured
}, extra, skip_meta)]
fn bench5() {
#[block]
{}
}
#[benchmark(pov_mode = MaxEncodedLen {
Pallet::Storage: Measured,
Pallet::Storage::Nested: Ignored
}, extra, skip_meta)]
fn bench6() {
#[block]
{}
}
}
fn main() {}
@@ -0,0 +1,34 @@
// This file is part of Substrate.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use frame_benchmarking::v2::*;
use frame_support_test::Config;
#[benchmarks]
mod benches {
use super::*;
#[benchmark(skip_meta, pov_mode = Measured, extra)]
fn bench() {
let a = 2 + 2;
#[block]
{}
assert_eq!(a, 4);
}
}
fn main() {}
@@ -0,0 +1,34 @@
// This file is part of Substrate.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use frame_benchmarking::v2::*;
#[allow(unused_imports)]
use frame_support_test::Config;
#[benchmarks]
mod benches {
use super::*;
#[benchmark]
fn bench() -> Result<(), frame_benchmarking::v2::BenchmarkError> {
#[block]
{}
Ok(())
}
}
fn main() {}
@@ -0,0 +1,46 @@
// This file is part of Substrate.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use frame_benchmarking::v2::*;
use frame_support_test::Config;
use frame_support::parameter_types;
#[benchmarks]
mod benches {
use super::*;
const MY_CONST: u32 = 100;
#[allow(dead_code)]
const fn my_fn() -> u32 {
200
}
parameter_types! {
const MyConst: u32 = MY_CONST;
}
#[benchmark(skip_meta, extra)]
fn bench(a: Linear<{MY_CONST * 2}, {my_fn() + MyConst::get()}>) {
let a = 2 + 2;
#[block]
{}
assert_eq!(a, 4);
}
}
fn main() {}
@@ -0,0 +1,33 @@
// This file is part of Substrate.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use frame_benchmarking::v2::*;
#[allow(unused_imports)]
use frame_support_test::Config;
#[benchmarks]
mod benches {
use super::*;
#[benchmark]
fn bench() {
#[block]
{}
}
}
fn main() {}
@@ -0,0 +1,34 @@
// This file is part of Substrate.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use frame_benchmarking::v2::*;
#[allow(unused_imports)]
use frame_support_test::Config;
#[benchmarks]
mod benches {
use super::*;
#[benchmark]
fn bench() -> Result<(), frame_benchmarking::v2::BenchmarkError> {
#[block]
{}
Ok(())
}
}
fn main() {}
@@ -0,0 +1,35 @@
// This file is part of Substrate.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use frame_benchmarking::v2::*;
use frame_support_test::Config;
#[benchmarks]
mod benches {
use super::*;
#[benchmark]
fn bench() -> Result<(), BenchmarkError> {
let a = 2 + 2;
#[block]
{}
assert_eq!(a, 4);
Ok(())
}
}
fn main() {}