Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimistic Project Funding #5162

Open
wants to merge 253 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
253 commits
Select commit Hold shift + click to select a range
527787b
Types, Storages, and naming
ndkazu Jul 27, 2024
f6b8fa8
Basic pallet structure
ndkazu Jul 27, 2024
c1c442d
Update
ndkazu Jul 27, 2024
674c5f1
Helper functions
ndkazu Jul 27, 2024
8f42432
Spnedings creation from projects list
ndkazu Jul 28, 2024
8667321
Spending status change
ndkazu Jul 28, 2024
5fb830e
Funds unlock and transfer
ndkazu Jul 30, 2024
08a56f5
Added an Event
ndkazu Jul 30, 2024
100c26b
Preparation for testing and minor corrections
ndkazu Jul 30, 2024
2be7fb9
Update substrate/frame/distribution/src/lib.rs
ndkazu Jul 30, 2024
76fe14b
Update substrate/frame/distribution/src/lib.rs
ndkazu Jul 30, 2024
5d0f7ba
Update substrate/frame/distribution/src/lib.rs
ndkazu Jul 30, 2024
503f3d3
Update substrate/frame/distribution/src/lib.rs
ndkazu Jul 30, 2024
aaea1fe
Update substrate/frame/distribution/src/types.rs
ndkazu Jul 30, 2024
01c826c
Update umbrella/Cargo.toml
ndkazu Jul 30, 2024
a305d80
Made some corrections
ndkazu Jul 30, 2024
c4e6ae4
First test
ndkazu Jul 30, 2024
9ba1083
Additional event & testing
ndkazu Jul 30, 2024
0268623
Merge branch 'paritytech:master' into Optimist
ndkazu Jul 30, 2024
dab155d
Update branch
ndkazu Jul 30, 2024
990a2f6
Second test: funds locked
ndkazu Jul 30, 2024
119206a
Minor corrections
ndkazu Jul 30, 2024
c9c9c4f
More tests...
ndkazu Jul 30, 2024
d11cbc1
Corrected some terms
ndkazu Jul 31, 2024
fb73b68
Pallet OPF basic structure. No storage yet.
ndkazu Aug 1, 2024
aa7b249
WhiteListed Projects storage
ndkazu Aug 1, 2024
2406b8f
Helper function for voting
ndkazu Aug 1, 2024
26f3958
modified storage
ndkazu Aug 1, 2024
8e10f21
Adding type for freeze
ndkazu Aug 1, 2024
abde432
Voting action + voter funds hold/release
ndkazu Aug 1, 2024
ad4d675
Merge branch 'paritytech:master' into Optimist
ndkazu Aug 1, 2024
114e430
Merge branch 'paritytech:master' into Optimist
ndkazu Aug 2, 2024
245cf90
New constant added
ndkazu Aug 2, 2024
617ee5e
Helper for rewards calculation & distribution
ndkazu Aug 3, 2024
93e3b31
Updated pallet-distribution tests
ndkazu Aug 3, 2024
5fc4beb
In-code documention, extrinsics, and a few corrections
ndkazu Aug 4, 2024
27524ed
Merge branch 'paritytech:master' into Optimist
ndkazu Aug 4, 2024
3ba0121
Documentation for pallet distribution
ndkazu Aug 4, 2024
82bf13d
Merge branch 'Optimist' of github.com:ndkazu/polkadot-sdk into Optimist
ndkazu Aug 4, 2024
f21ba3c
Documentation edit
ndkazu Aug 4, 2024
8cedc42
Restricted some storages visibility
ndkazu Aug 4, 2024
f95b070
Used checked_add instead of saturating_add
ndkazu Aug 4, 2024
2699fd2
Some corrections
ndkazu Aug 4, 2024
843f558
Logic to be used in pallet-opf hook added
ndkazu Aug 5, 2024
b69cfff
Distribution pallet README
ndkazu Aug 5, 2024
9faf586
README corrections
ndkazu Aug 5, 2024
758e681
README corrections
ndkazu Aug 5, 2024
00fe62b
Remove unfunded projects from whitelist
ndkazu Aug 6, 2024
46ea061
Use on_idle hook in OPF Pallet
ndkazu Aug 6, 2024
876db00
Correction
ndkazu Aug 6, 2024
7445d0f
Merge branch 'paritytech:master' into Optimist
ndkazu Aug 7, 2024
442df1e
Update README.md
ndkazu Aug 7, 2024
238bae5
Update lib.rs
ndkazu Aug 7, 2024
76f31b3
Create README.md
ndkazu Aug 7, 2024
fa8f9c2
User's funds release after rewards calculation
ndkazu Aug 7, 2024
145858c
Benchmarking_begin
ndkazu Aug 8, 2024
1db8e95
Changed Sepnding(s) to Spend(s)
ndkazu Aug 8, 2024
c3ba04e
Changed VotingRoundsNumber to VotingRoundNumber
ndkazu Aug 8, 2024
92eabcd
Correction
ndkazu Aug 8, 2024
6216b5e
Preparing OPF testing
ndkazu Aug 9, 2024
b5c02ab
Merge branch 'paritytech:master' into Optimist
ndkazu Aug 9, 2024
fb76ceb
Stopped using the system block number
ndkazu Aug 10, 2024
945fbb2
corrected block numbers for tests
ndkazu Aug 10, 2024
04c0646
Added events
ndkazu Aug 11, 2024
bdd88c1
First tests and corresponding corrections
ndkazu Aug 11, 2024
6742a58
Merge branch 'paritytech:master' into Optimist
ndkazu Aug 11, 2024
0eb2e5c
Rewards distribution test
ndkazu Aug 11, 2024
d1fac2f
Tests and corrections
ndkazu Aug 11, 2024
7bf608a
Removed dev-mode and some warnings
ndkazu Aug 12, 2024
ba869d6
More OPF testing
ndkazu Aug 12, 2024
bc4c6de
Added benchmarking test suite
ndkazu Aug 12, 2024
32a2296
Extrinsic call not executed in benchmark???
ndkazu Aug 12, 2024
065039e
some corrections
ndkazu Aug 12, 2024
48d5d62
Tests are passing
ndkazu Aug 12, 2024
08c7518
Removed dev mode + clippy & fmt
ndkazu Aug 13, 2024
7b874a1
Merge branch 'paritytech:master' into Optimist
ndkazu Aug 13, 2024
3389e6a
Benchmarking is now working for pallet distribution
ndkazu Aug 13, 2024
0592915
Pallet distribution ready for review
ndkazu Aug 13, 2024
e7956af
Re-wrote distribution benchmark and started opf benchmark
ndkazu Aug 14, 2024
5c25742
Benchmarking done
ndkazu Aug 15, 2024
a8f6d0c
Merge branch 'paritytech:master' into Optimist
ndkazu Aug 15, 2024
ec08801
Fixing CLI errors
ndkazu Aug 15, 2024
d723478
Fixing errors
ndkazu Aug 15, 2024
67ddbb8
Fixing errors
ndkazu Aug 15, 2024
b960b3c
PRdoc
ndkazu Aug 15, 2024
53c31aa
Merge branch 'paritytech:master' into Optimist
ndkazu Aug 15, 2024
ca65abb
Editing the prdoc
ndkazu Aug 15, 2024
b94e3f9
Merge branch 'Optimist' of github.com:ndkazu/polkadot-sdk into Optimist
ndkazu Aug 15, 2024
6a918ad
Editing the prdoc
ndkazu Aug 15, 2024
8ed0b87
Editing the prdoc
ndkazu Aug 15, 2024
2878e5e
Editing the prdoc
ndkazu Aug 15, 2024
ab2ab73
Editing the prdoc->patch instead of minor
ndkazu Aug 15, 2024
40bdd68
Editing the prdoc
ndkazu Aug 15, 2024
d0dac4b
Editing the prdoc
ndkazu Aug 15, 2024
eb1ba63
Merge branch 'paritytech:master' into Optimist
ndkazu Aug 15, 2024
a3be78b
Update prdoc/pr_5162.prdoc
ndkazu Aug 15, 2024
a5f0018
Fix prdoc
ndkazu Aug 15, 2024
39214cc
Merge branch 'Optimist' of github.com:ndkazu/polkadot-sdk into Optimist
ndkazu Aug 15, 2024
fd40298
Fix semver
ndkazu Aug 15, 2024
79a29cc
Fix semver
ndkazu Aug 15, 2024
0c24a47
Corrected README
ndkazu Aug 16, 2024
b5c86d6
Use take instead of get & remove
ndkazu Aug 16, 2024
a3a59a2
Some suggested changes implemented.
ndkazu Aug 16, 2024
1a2139c
Merge branch 'paritytech:master' into Optimist
ndkazu Aug 16, 2024
6bab58b
More OPF tests
ndkazu Aug 17, 2024
bf22c86
Merge branch 'paritytech:master' into Optimist
ndkazu Aug 17, 2024
18fce0f
More tests and some in-code comments
ndkazu Aug 19, 2024
9718231
Merge branch 'Optimist' of github.com:ndkazu/polkadot-sdk into Optimist
ndkazu Aug 19, 2024
1546392
Merge branch 'paritytech:master' into Optimist
ndkazu Aug 19, 2024
8e76dd7
Merge branch 'master' into Optimist
Ank4n Aug 21, 2024
704c2fe
Conviction implemented, and funds unlock extrinsic added. New extrins…
ndkazu Aug 23, 2024
5695675
License added
ndkazu Aug 23, 2024
24cd606
Merge branch 'paritytech:master' into Optimist
ndkazu Aug 23, 2024
7d80bfb
Review related corrections
ndkazu Aug 23, 2024
d9fc656
Merge branch 'Optimist' of github.com:ndkazu/polkadot-sdk into Optimist
ndkazu Aug 23, 2024
baedd94
fix failing benchmark
ndkazu Aug 23, 2024
0d4a587
cargo fmt
ndkazu Aug 23, 2024
0cd321a
New extrinsic benchmark added
ndkazu Aug 23, 2024
73d0f5f
update
ndkazu Aug 23, 2024
1e38a51
Merge branch 'paritytech:master' into Optimist
ndkazu Aug 24, 2024
4bec5f4
Type miss in ReadMe
ndkazu Aug 24, 2024
e1580cd
Merge branch 'paritytech:master' into Optimist
ndkazu Aug 25, 2024
df41d42
Merge branch 'paritytech:master' into Optimist
ndkazu Aug 26, 2024
304a76d
Corrected Distribution pallet based on reviews
ndkazu Aug 27, 2024
bf8ba94
Error handling correction in Distribution pallet
ndkazu Aug 27, 2024
19dc1d9
added some corrections to the OPF pallet
ndkazu Aug 27, 2024
a2ff644
Removed unbounded map iter
ndkazu Aug 27, 2024
980226e
Further improvements in Distribution pallet
ndkazu Aug 27, 2024
ecbf739
Removing use of iter()
ndkazu Aug 28, 2024
b7ab820
Refactored try_vote function and removed iter()
ndkazu Aug 29, 2024
c29ffe8
cargo fmt
ndkazu Aug 29, 2024
c9dcc86
resolving conflict
ndkazu Aug 30, 2024
492a0d3
Merge branch 'master' into Optimist
ndkazu Aug 30, 2024
87d1c1e
Merge branch 'master' into Optimist
ndkazu Aug 31, 2024
8d4657d
Merge branch 'master' into Optimist
ndkazu Sep 3, 2024
5c5b8ad
opf-test correction
ndkazu Sep 3, 2024
98a0ae4
Merge branch 'paritytech:master' into Optimist
ndkazu Sep 5, 2024
98217d9
Renamed variable & removed some unecessary code
ndkazu Sep 6, 2024
77ae32e
Renamed some variables in pallet-opf
ndkazu Sep 6, 2024
8cb1b18
Updates vote_removal and corresponding tests
ndkazu Sep 6, 2024
ed56b2e
Clearing storages after a voting round ended in pallet-opf
ndkazu Sep 6, 2024
47fe97f
Debugging and additional tests
ndkazu Sep 6, 2024
3e2f2a1
cargo +nightly fmt
ndkazu Sep 6, 2024
8dfbcf3
Merge branch 'master' into Optimist
ndkazu Sep 6, 2024
556551d
Merge branch 'master' into Optimist
ndkazu Sep 7, 2024
effa3d9
Merge branch 'master' into Optimist
ndkazu Sep 8, 2024
2b5e0cd
Comments correction
ndkazu Sep 8, 2024
6942a86
Merge branch 'master' into Optimist
ndkazu Sep 9, 2024
1849512
Merge branch 'master' into Optimist
ndkazu Sep 11, 2024
72a8085
Merge branch 'master' into Optimist
ndkazu Sep 12, 2024
bb82af4
Merge branch 'master' into Optimist
ndkazu Sep 13, 2024
d2804b7
Merge branch 'master' into Optimist
ndkazu Sep 13, 2024
c847381
Reverted unwanted changes from cargo fmt
ndkazu Sep 13, 2024
2c0aa9b
Removed last unwanted format change
ndkazu Sep 13, 2024
511e8bc
Merge branch 'master' into Optimist
ndkazu Sep 13, 2024
bddabc8
Merge branch 'master' into Optimist
ndkazu Sep 14, 2024
5a13c98
Merge branch 'master' into Optimist
ndkazu Sep 16, 2024
e02fe4b
Correct import
ndkazu Sep 17, 2024
576a5b3
Merge branch 'master' into Optimist
ndkazu Sep 18, 2024
5760f9b
Merge branch 'master' into Optimist
ndkazu Sep 18, 2024
6e1c9ab
Merge branch 'master' into Optimist
ndkazu Sep 18, 2024
989be08
Corrected the respectives README's
ndkazu Sep 18, 2024
c62e265
toml format
ndkazu Sep 18, 2024
56e8676
rust-feature-propagation
ndkazu Sep 18, 2024
db2506b
Merge branch 'master' into Optimist
ndkazu Sep 18, 2024
12fbf3c
Rust features propagation
ndkazu Sep 18, 2024
c59b159
Merge branch 'master' into Optimist
ndkazu Sep 18, 2024
7412d46
Rust features propagation
ndkazu Sep 18, 2024
18f92fc
toml format
ndkazu Sep 19, 2024
840d64a
toml format
ndkazu Sep 19, 2024
cac2449
format toml
ndkazu Sep 19, 2024
8f0fd86
format toml
ndkazu Sep 19, 2024
4507209
fix umbrella error
ndkazu Sep 19, 2024
fb51be2
Fix Wasm error
ndkazu Sep 19, 2024
eef451c
Merge branch 'master' into Optimist
ndkazu Sep 19, 2024
f38806c
Merge branch 'master' into Optimist
ndkazu Sep 20, 2024
d21f4d8
Update Cargo.toml
ndkazu Sep 20, 2024
936cfd7
Update Cargo.toml
ndkazu Sep 20, 2024
7728824
Update Cargo.toml
ndkazu Sep 20, 2024
38718e5
Update cargo.toml
ndkazu Sep 20, 2024
99b3be4
Merge branch 'master' into Optimist
ndkazu Sep 20, 2024
f079db6
First round of corrections
ndkazu Sep 20, 2024
b61ddc6
Merge branch 'Optimist' of github.com:ndkazu/polkadot-sdk into Optimist
ndkazu Sep 20, 2024
a4edbac
Second round of corrections
ndkazu Sep 20, 2024
635526e
Fix umbrella
ndkazu Sep 20, 2024
fa30adb
Revert some modifications
ndkazu Sep 20, 2024
2cf44db
changed max_weight in opf
ndkazu Sep 20, 2024
fa6a553
Fix format
ndkazu Sep 20, 2024
44fa41a
pallet-distribution corrections
ndkazu Sep 22, 2024
1ea2682
Merge branch 'master' into Optimist
ndkazu Sep 22, 2024
c1014fa
Removed unnecessary condition
ndkazu Sep 22, 2024
94496d1
cargo fmt
ndkazu Sep 23, 2024
e11002a
Merge branch 'master' into Optimist
ndkazu Sep 23, 2024
03b59e0
Updated weight.rs files
ndkazu Sep 23, 2024
b26a798
licenses
ndkazu Sep 23, 2024
37d1bca
Merge branch 'master' into Optimist
ndkazu Sep 23, 2024
96d1731
Merge branch 'master' into Optimist
ndkazu Sep 23, 2024
80cc666
Merge branch 'master' into Optimist
ndkazu Sep 25, 2024
10e9df8
Update substrate/frame/opf/src/lib.rs
ndkazu Sep 25, 2024
064b177
Merge branch 'master' into Optimist
ndkazu Sep 25, 2024
8586c18
Merge branch 'master' into Optimist
ndkazu Sep 26, 2024
93a9e9f
Merge branch 'master' into Optimist
ndkazu Sep 26, 2024
3ea2749
Merge branch 'master' into Optimist
ndkazu Sep 28, 2024
2d17a4e
cargo fmt
ndkazu Sep 28, 2024
5be0c9e
Merge branch 'master' into Optimist
ndkazu Sep 28, 2024
5b9f059
Merge branch 'master' into Optimist
ndkazu Sep 29, 2024
8cb632f
Merge branch 'master' into Optimist
ndkazu Oct 1, 2024
2b5d0e2
Merge branch 'master' into Optimist
ndkazu Oct 2, 2024
9b0a5f4
try to Fix failing benchmark test
ndkazu Oct 3, 2024
e201c53
Merge branch 'Optimist' of github.com:ndkazu/polkadot-sdk into Optimist
ndkazu Oct 3, 2024
228da0a
Use calculated weight instead of max weight in on_idle_function
ndkazu Oct 3, 2024
e8ebcfc
Revert weight changes & limit block consumption to 1/10th
ndkazu Oct 3, 2024
f26d01c
cargo fmt
ndkazu Oct 3, 2024
0aa2708
Merge branch 'master' into Optimist
ndkazu Oct 4, 2024
0dbe4c9
Merge branch 'master' into Optimist
ndkazu Oct 5, 2024
25a3716
Merge branch 'master' into Optimist
ndkazu Oct 6, 2024
7821c10
Merge branch 'master' into Optimist
ndkazu Oct 8, 2024
d8934ad
Merge branch 'master' into Optimist
ndkazu Oct 8, 2024
3816547
Merge branch 'master' into Optimist
ndkazu Oct 9, 2024
8bddb52
Merge branch 'master' into Optimist
ndkazu Oct 10, 2024
48c58ad
Merge branch 'master' into Optimist
ndkazu Oct 13, 2024
65654a5
Merge branch 'master' into Optimist
ndkazu Oct 16, 2024
742544e
Merge branch 'master' into Optimist
ndkazu Oct 18, 2024
63b7eb4
Merge branch 'master' into Optimist
ndkazu Oct 20, 2024
d06fd28
cargo fmt
ndkazu Oct 20, 2024
b2cfb12
License
ndkazu Oct 20, 2024
6babd82
Weights & benchmarking
ndkazu Oct 20, 2024
1572c9a
Merge branch 'master' into Optimist
ndkazu Oct 22, 2024
4b94347
weights
ndkazu Oct 22, 2024
d4f865c
Merge branch 'master' into Optimist
ndkazu Oct 23, 2024
b8f19f2
try to fix feature-propagation error
ndkazu Oct 23, 2024
576c530
Merge branch 'master' into Optimist
ndkazu Oct 24, 2024
aea7890
fix CI errors
ndkazu Oct 24, 2024
0b9977c
Merge branch 'Optimist' of github.com:ndkazu/polkadot-sdk into Optimist
ndkazu Oct 24, 2024
673e991
Merge branch 'master' into Optimist
ndkazu Oct 25, 2024
597d6b5
Update substrate/frame/distribution/src/functions.rs
ndkazu Oct 26, 2024
4d177b3
Preparation for scheduler use instead of on_initialize
ndkazu Oct 27, 2024
78848a1
Added RuntimeCall to distribution Config
ndkazu Oct 29, 2024
76175ab
Replaced on_initialize, need to re-write tests
ndkazu Oct 29, 2024
75dda7b
Some code clean up
ndkazu Oct 29, 2024
7678a81
Merge branch 'master' into Optimist
ndkazu Oct 29, 2024
4f3962a
Fixing tests
ndkazu Oct 31, 2024
5d11ffe
2 more tests to fix
ndkazu Oct 31, 2024
e494e5a
Merge branch 'master' into Optimist
ndkazu Oct 31, 2024
1ee6123
Merge branch 'master' into Optimist
ndkazu Nov 1, 2024
895e4c1
Revert "Merge branch 'master' into Optimist"
ndkazu Nov 1, 2024
170fe2b
Reapply "Merge branch 'master' into Optimist"
ndkazu Nov 1, 2024
99fd93e
Revert "Reapply "Merge branch 'master' into Optimist""
ndkazu Nov 1, 2024
d90ac79
Revert "Merge branch 'master' into Optimist"
ndkazu Nov 1, 2024
1fbd622
Use .retain instead of .filter
ndkazu Nov 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/zepter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ workflows:
]
# The umbrella crate uses more features, so we to check those too:
check_umbrella:
- [ $check.0, '--features=serde,experimental,runtime,with-tracing,tuples-96,with-tracing', '-p=polkadot-sdk' ]
- [ $check.0, '--features=serde,experimental,riscv,runtime,with-tracing,tuples-96,with-tracing', '-p=polkadot-sdk' ]
# Same as `check_*`, but with the `--fix` flag.
default:
- [ $check.0, '--fix' ]
Expand Down
25 changes: 8 additions & 17 deletions .github/scripts/cmd/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import argparse
import _help
import importlib.util
import re

_HelpAction = _help._HelpAction

Expand Down Expand Up @@ -41,20 +40,20 @@ def setup_logging():
setup_logging()

"""
BENCH
BENCH
"""

bench_example = '''**Examples**:
Runs all benchmarks
Runs all benchmarks
%(prog)s

Runs benchmarks for pallet_balances and pallet_multisig for all runtimes which have these pallets. **--quiet** makes it to output nothing to PR but reactions
%(prog)s --pallet pallet_balances pallet_xcm_benchmarks::generic --quiet

Runs bench for all pallets for westend runtime and fails fast on first failed benchmark
%(prog)s --runtime westend --fail-fast

Does not output anything and cleans up the previous bot's & author command triggering comments in PR
Does not output anything and cleans up the previous bot's & author command triggering comments in PR
%(prog)s --runtime westend rococo --pallet pallet_balances pallet_multisig --quiet --clean
'''

Expand All @@ -68,14 +67,14 @@ def setup_logging():
parser_bench.add_argument('--fail-fast', help='Fail fast on first failed benchmark', action='store_true')

"""
FMT
FMT
"""
parser_fmt = subparsers.add_parser('fmt', help='Formats code (cargo +nightly-VERSION fmt) and configs (taplo format)')
for arg, config in common_args.items():
parser_fmt.add_argument(arg, **config)

"""
Update UI
Update UI
"""
parser_ui = subparsers.add_parser('update-ui', help='Updates UI tests')
for arg, config in common_args.items():
Expand Down Expand Up @@ -176,15 +175,7 @@ def main():
print(f'-- package_dir: {package_dir}')
print(f'-- manifest_path: {manifest_path}')
output_path = os.path.join(package_dir, "src", "weights.rs")
# TODO: we can remove once all pallets in dev runtime are migrated to polkadot-sdk-frame
try:
uses_polkadot_sdk_frame = "true" in os.popen(f"cargo metadata --locked --format-version 1 --no-deps | jq -r '.packages[] | select(.name == \"{pallet.replace('_', '-')}\") | .dependencies | any(.name == \"polkadot-sdk-frame\")'").read()
# Empty output from the previous os.popen command
except StopIteration:
uses_polkadot_sdk_frame = False
template = config['template']
if uses_polkadot_sdk_frame and re.match(r"frame-(:?umbrella-)?weight-template\.hbs", os.path.normpath(template).split(os.path.sep)[-1]):
template = "substrate/.maintain/frame-umbrella-weight-template.hbs"
else:
default_path = f"./{config['path']}/src/weights"
xcm_path = f"./{config['path']}/src/weights/xcm"
Expand Down Expand Up @@ -260,4 +251,4 @@ def main():
print('🚀 Done')

if __name__ == '__main__':
main()
main()
26 changes: 13 additions & 13 deletions .github/scripts/cmd/test_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"path": "substrate/frame",
"header": "substrate/HEADER-APACHE2",
"template": "substrate/.maintain/frame-weight-template.hbs",
"bench_features": "runtime-benchmarks",
"bench_features": "runtime-benchmarks,riscv",
"bench_flags": "--flag1 --flag2"
},
{
Expand Down Expand Up @@ -67,7 +67,7 @@ def setUp(self):
self.patcher6 = patch('importlib.util.spec_from_file_location', return_value=MagicMock())
self.patcher7 = patch('importlib.util.module_from_spec', return_value=MagicMock())
self.patcher8 = patch('cmd.generate_prdoc.main', return_value=0)

self.mock_open = self.patcher1.start()
self.mock_json_load = self.patcher2.start()
self.mock_parse_args = self.patcher3.start()
Expand Down Expand Up @@ -101,27 +101,27 @@ def test_bench_command_normal_execution_all_runtimes(self):
clean=False,
image=None
), [])

self.mock_popen.return_value.read.side_effect = [
"pallet_balances\npallet_staking\npallet_something\n", # Output for dev runtime
"pallet_balances\npallet_staking\npallet_something\n", # Output for westend runtime
"pallet_staking\npallet_something\n", # Output for rococo runtime - no pallet here
"pallet_balances\npallet_staking\npallet_something\n", # Output for asset-hub-westend runtime
"./substrate/frame/balances/Cargo.toml\n", # Mock manifest path for dev -> pallet_balances
]

with patch('sys.exit') as mock_exit:
import cmd
cmd.main()
mock_exit.assert_not_called()

expected_calls = [
# Build calls
call("forklift cargo build -p kitchensink-runtime --profile release --features=runtime-benchmarks"),
call("forklift cargo build -p kitchensink-runtime --profile release --features=runtime-benchmarks,riscv"),
call("forklift cargo build -p westend-runtime --profile release --features=runtime-benchmarks"),
call("forklift cargo build -p rococo-runtime --profile release --features=runtime-benchmarks"),
call("forklift cargo build -p asset-hub-westend-runtime --profile release --features=runtime-benchmarks"),

call(get_mock_bench_output(
runtime='kitchensink',
pallets='pallet_balances',
Expand Down Expand Up @@ -162,7 +162,7 @@ def test_bench_command_normal_execution(self):
self.mock_popen.return_value.read.side_effect = [
"pallet_balances\npallet_staking\npallet_something\n", # Output for westend runtime
]

with patch('sys.exit') as mock_exit:
import cmd
cmd.main()
Expand All @@ -171,7 +171,7 @@ def test_bench_command_normal_execution(self):
expected_calls = [
# Build calls
call("forklift cargo build -p westend-runtime --profile release --features=runtime-benchmarks"),

# Westend runtime calls
call(get_mock_bench_output(
runtime='westend',
Expand Down Expand Up @@ -205,7 +205,7 @@ def test_bench_command_normal_execution_xcm(self):
self.mock_popen.return_value.read.side_effect = [
"pallet_balances\npallet_staking\npallet_something\npallet_xcm_benchmarks::generic\n", # Output for westend runtime
]

with patch('sys.exit') as mock_exit:
import cmd
cmd.main()
Expand All @@ -214,7 +214,7 @@ def test_bench_command_normal_execution_xcm(self):
expected_calls = [
# Build calls
call("forklift cargo build -p westend-runtime --profile release --features=runtime-benchmarks"),

# Westend runtime calls
call(get_mock_bench_output(
runtime='westend',
Expand All @@ -241,7 +241,7 @@ def test_bench_command_two_runtimes_two_pallets(self):
"pallet_staking\npallet_balances\n", # Output for westend runtime
"pallet_staking\npallet_balances\n", # Output for rococo runtime
]

with patch('sys.exit') as mock_exit:
import cmd
cmd.main()
Expand Down Expand Up @@ -309,7 +309,7 @@ def test_bench_command_one_dev_runtime(self):

expected_calls = [
# Build calls
call("forklift cargo build -p kitchensink-runtime --profile release --features=runtime-benchmarks"),
call("forklift cargo build -p kitchensink-runtime --profile release --features=runtime-benchmarks,riscv"),
# Westend runtime calls
call(get_mock_bench_output(
runtime='kitchensink',
Expand Down Expand Up @@ -429,4 +429,4 @@ def test_prdoc_command(self, mock_system, mock_parse_args):
self.mock_generate_prdoc_main.assert_called_with(mock_parse_args.return_value[0])

if __name__ == '__main__':
unittest.main()
unittest.main()
79 changes: 0 additions & 79 deletions .github/workflows/build-publish-eth-rpc.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/release-30_publish_release_draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ jobs:
build-runtimes:
uses: "./.github/workflows/release-srtool.yml"
with:
excluded_runtimes: "asset-hub-rococo bridge-hub-rococo contracts-rococo coretime-rococo people-rococo rococo rococo-parachain substrate-test bp cumulus-test kitchensink minimal-template parachain-template penpal polkadot-test seedling shell frame-try sp solochain-template polkadot-sdk-docs-first"
excluded_runtimes: "asset-hub-rococo bridge-hub-rococo contracts-rococo coretime-rococo people-rococo rococo rococo-parachain substrate-test bp cumulus-test kitchensink minimal-template parachain-template penpal polkadot-test seedling shell frame-try sp solochain-template"
build_opts: "--features on-chain-release-build"

build-binaries:
runs-on: ubuntu-latest
strategy:
matrix:
# Tuples of [package, binary-name]
binary: [ [frame-omni-bencher, frame-omni-bencher], [staging-chain-spec-builder, chain-spec-builder], [polkadot-omni-node, polkadot-omni-node] ]
binary: [ [frame-omni-bencher, frame-omni-bencher], [staging-chain-spec-builder, chain-spec-builder] ]
steps:
- name: Checkout sources
uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.0.0
Expand Down Expand Up @@ -161,7 +161,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
binary: [frame-omni-bencher, chain-spec-builder, polkadot-omni-node]
binary: [frame-omni-bencher, chain-spec-builder]

steps:
- name: Download artifacts
Expand Down
Loading
Loading