Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
195 commits
Select commit Hold shift + click to select a range
3d1c62e
chore: initial statistics subsystem
EclesioMeloJunior Sep 8, 2025
c70e648
Merge branch 'master' into statistics-collector
EclesioMeloJunior Sep 9, 2025
4e8f90a
chore: account votes that approved candidate
EclesioMeloJunior Sep 9, 2025
0bc38d0
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Sep 9, 2025
a6feab9
chore: remove unneeded file
EclesioMeloJunior Sep 11, 2025
788bf44
Merge branch 'master' into statistics-collector
EclesioMeloJunior Sep 15, 2025
9f9d2f4
chore: add docs, get useful votes, change subsystem name
EclesioMeloJunior Sep 15, 2025
f4d1365
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Sep 15, 2025
8637ad7
chore: start getting chunks downloads metrics
EclesioMeloJunior Sep 17, 2025
0ee9a03
Merge branch 'master' into statistics-collector
EclesioMeloJunior Sep 17, 2025
8bae0a8
chore: include `handle_chunks_downloaded` per session and candidate
EclesioMeloJunior Sep 17, 2025
b7c47ac
address comments
EclesioMeloJunior Sep 18, 2025
d83075a
chore: revert changes in chunks.rs
EclesioMeloJunior Sep 19, 2025
2084903
Merge branch 'master' into statistics-collector
EclesioMeloJunior Sep 19, 2025
fac0526
Merge branch 'master' of github.com:paritytech/polkadot-sdk into stat…
EclesioMeloJunior Sep 19, 2025
803ae6d
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Sep 19, 2025
e4e00dc
chore: fix approval voting tests
EclesioMeloJunior Sep 24, 2025
a5dbccf
fix approval voting tests
EclesioMeloJunior Sep 25, 2025
4f77b87
chore: fixing approval tests
EclesioMeloJunior Sep 25, 2025
f9f4d71
chore: include tests for collectorstats subsytem
EclesioMeloJunior Sep 29, 2025
6282094
chore: include no-shows tests
EclesioMeloJunior Sep 30, 2025
c0f969d
include tests for chunks downloaded
EclesioMeloJunior Sep 30, 2025
b846ced
chore: wip using auth discovery to get peer authority id
EclesioMeloJunior Oct 2, 2025
92119bf
Merge branch 'master' into statistics-collector
EclesioMeloJunior Oct 3, 2025
0b186a1
deprecate macro was failing to build in recent rust versions
EclesioMeloJunior Oct 3, 2025
2b2c4fa
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Oct 3, 2025
7dfe19d
Merge branch 'master' into statistics-collector
EclesioMeloJunior Oct 6, 2025
caea9a8
feat: collect upload metrics
EclesioMeloJunior Oct 6, 2025
e6dcf11
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Oct 6, 2025
6b7504c
chore: finish handle_chunk_upload
EclesioMeloJunior Oct 7, 2025
ea150e1
Merge branch 'master' into statistics-collector
EclesioMeloJunior Oct 8, 2025
796f044
Merge branch 'master' into statistics-collector
EclesioMeloJunior Oct 8, 2025
9ae0211
chore: including prunning based on block finalisation
EclesioMeloJunior Oct 15, 2025
63e379d
chore: include tests for uploaded chunk
EclesioMeloJunior Oct 15, 2025
848ba5a
chore: remove unnecessary mapping
EclesioMeloJunior Oct 15, 2025
23c0512
Merge branch 'master' into statistics-collector
EclesioMeloJunior Oct 16, 2025
00c661f
chore: prune when session is finalized
EclesioMeloJunior Oct 16, 2025
e25e99a
Merge branch 'master' into statistics-collector
EclesioMeloJunior Oct 16, 2025
564e0e5
Merge branch 'master' into statistics-collector
EclesioMeloJunior Oct 17, 2025
bbab27b
chore: fix tests
EclesioMeloJunior Oct 17, 2025
2dae7cb
chore: improve metrics collection
EclesioMeloJunior Oct 20, 2025
554cd6e
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Oct 20, 2025
aa00e1b
chore: testing pruning capabilities
EclesioMeloJunior Oct 20, 2025
3d3686e
chore: assert collected stats for pruned are discarded
EclesioMeloJunior Oct 20, 2025
3ebd9c6
Merge branch 'master' into statistics-collector
EclesioMeloJunior Oct 21, 2025
27d8061
Merge branch 'master' into statistics-collector
EclesioMeloJunior Oct 21, 2025
ec2d55d
chore: include zombienet happy-path test
EclesioMeloJunior Oct 22, 2025
91230d2
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Oct 22, 2025
f3bc3d9
Merge branch 'master' into statistics-collector
EclesioMeloJunior Oct 24, 2025
0994734
Merge branch 'master' into statistics-collector
EclesioMeloJunior Oct 27, 2025
e90fb75
addressing comments
EclesioMeloJunior Oct 28, 2025
5e33f9a
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Oct 28, 2025
7671486
chore: implemented new pruning based on finalized blocks
EclesioMeloJunior Oct 28, 2025
e2e7b80
Merge branch 'master' into statistics-collector
EclesioMeloJunior Oct 28, 2025
e986951
chore: aggregate on tallies
EclesioMeloJunior Oct 29, 2025
0a82d3f
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Oct 29, 2025
4dc3efb
Merge branch 'master' into statistics-collector
EclesioMeloJunior Oct 29, 2025
2016c0c
chore: including on bench + debug logs for session collected stats
EclesioMeloJunior Oct 30, 2025
569176b
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Oct 30, 2025
2161ced
make per validator prometheus metrics optional
EclesioMeloJunior Oct 30, 2025
496c7ed
Merge branch 'master' into statistics-collector
EclesioMeloJunior Oct 30, 2025
ebc2f2e
Merge branch 'master' into statistics-collector
EclesioMeloJunior Nov 1, 2025
5d6a592
Merge branch 'master' into statistics-collector
EclesioMeloJunior Nov 3, 2025
880feab
chore: make publish_per_validator_approval_metrics a cli flag
EclesioMeloJunior Nov 3, 2025
5d59954
Merge branch 'master' into statistics-collector
EclesioMeloJunior Nov 4, 2025
5c166d3
Merge branch 'master' into statistics-collector
EclesioMeloJunior Nov 5, 2025
67a9cb3
Merge branch 'master' into statistics-collector
EclesioMeloJunior Nov 6, 2025
87b3ccc
chore: renaming subsystem
EclesioMeloJunior Nov 10, 2025
55da39e
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Nov 10, 2025
8aecc01
chore: including approval stats submission
EclesioMeloJunior Nov 11, 2025
e3f757f
Merge branch 'master' into statistics-collector
EclesioMeloJunior Nov 12, 2025
e27fc23
chore: remove onchain impl
EclesioMeloJunior Nov 17, 2025
49f783e
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Nov 17, 2025
f5352e2
chore: addressing comments
EclesioMeloJunior Nov 19, 2025
28ce1ef
chore: addressing comments
EclesioMeloJunior Nov 19, 2025
cbdc2bc
chore: removing unused imports
EclesioMeloJunior Nov 19, 2025
88596c2
Merge branch 'master' into statistics-collector
EclesioMeloJunior Nov 19, 2025
9ffa52c
Merge branch 'master' into statistics-collector
EclesioMeloJunior Nov 19, 2025
91305d9
Merge branch 'master' into statistics-collector
EclesioMeloJunior Nov 24, 2025
f339452
chore: fix `pre_covers_dont_stall_approval` test
EclesioMeloJunior Nov 24, 2025
96494b5
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Nov 24, 2025
9a37b2a
chore: solved zombienet tests
EclesioMeloJunior Nov 25, 2025
34e74fc
Merge branch 'master' into statistics-collector
EclesioMeloJunior Nov 25, 2025
ea5eeae
chore: include rewards-statistics-collector on benchmark
EclesioMeloJunior Nov 25, 2025
7b83139
Merge branch 'master' into statistics-collector
EclesioMeloJunior Nov 25, 2025
d26b8d5
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Nov 25, 2025
963ecb5
Merge branch 'master' into statistics-collector
EclesioMeloJunior Nov 26, 2025
200e615
Merge branch 'master' into statistics-collector
EclesioMeloJunior Dec 1, 2025
2293e70
chore: remove charts
EclesioMeloJunior Dec 1, 2025
c06eb92
Merge branch 'master' into statistics-collector
EclesioMeloJunior Dec 8, 2025
f1e2ed7
chore: update benchmark assert values
EclesioMeloJunior Dec 8, 2025
b60c6ee
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Dec 8, 2025
49453cb
chore: run `cargo +nightly fmt`
EclesioMeloJunior Dec 8, 2025
2972131
Merge branch 'master' of github.com:paritytech/polkadot-sdk into stat…
EclesioMeloJunior Dec 11, 2025
56ab9a3
Merge branch 'master' into statistics-collector
EclesioMeloJunior Dec 11, 2025
7ab0893
chore: address comment
EclesioMeloJunior Dec 11, 2025
24a7212
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Dec 11, 2025
0f21f12
Merge branch 'master' into statistics-collector
EclesioMeloJunior Dec 15, 2025
6a3dbae
Merge branch 'master' into statistics-collector
EclesioMeloJunior Dec 16, 2025
43bdc6c
chore: addressing comments
EclesioMeloJunior Dec 17, 2025
cf1d22e
Merge branch 'master' into statistics-collector
EclesioMeloJunior Dec 17, 2025
089a11f
accumulate stats w/o candidate hash
EclesioMeloJunior Jan 6, 2026
7b17b6e
Merge branch 'master' into statistics-collector
EclesioMeloJunior Jan 6, 2026
a7d75c0
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Jan 6, 2026
ad7130c
chore: fix tests
EclesioMeloJunior Jan 6, 2026
b9873ab
Merge branch 'master' into statistics-collector
EclesioMeloJunior Jan 6, 2026
c47f2bc
chore: prune availability chunks stats with session with old session …
EclesioMeloJunior Jan 7, 2026
f809b59
chore: changes on av-distri metrics
EclesioMeloJunior Jan 7, 2026
b4b8586
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Jan 7, 2026
318a3cb
chore: clean up active leaves retrieve header
EclesioMeloJunior Jan 7, 2026
4561d52
chore: changes to pruning
EclesioMeloJunior Jan 8, 2026
629fa49
Merge branch 'master' into statistics-collector
EclesioMeloJunior Jan 8, 2026
fea4944
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Jan 8, 2026
ff2bc65
chore: all tests passed
EclesioMeloJunior Jan 8, 2026
6f5c5a8
Merge branch 'master' into statistics-collector
EclesioMeloJunior Jan 9, 2026
11857eb
Merge branch 'master' into statistics-collector
EclesioMeloJunior Jan 12, 2026
8e98857
chore: use chunk session index from candidate metadata from av-store
EclesioMeloJunior Jan 13, 2026
27aaa6d
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Jan 13, 2026
54b9fdf
chore: small changes
EclesioMeloJunior Jan 13, 2026
3b753a7
Merge branch 'master' into statistics-collector
EclesioMeloJunior Jan 13, 2026
7f23347
Merge branch 'master' into statistics-collector
EclesioMeloJunior Jan 14, 2026
73a4e07
compilation successful
EclesioMeloJunior Jan 14, 2026
c2f0a0d
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Jan 14, 2026
dacbd86
Merge branch 'master' into statistics-collector
EclesioMeloJunior Jan 16, 2026
e41fe7a
fix cargo fmt
EclesioMeloJunior Jan 16, 2026
6acce36
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Jan 16, 2026
ef840b4
Merge branch 'master' into statistics-collector
EclesioMeloJunior Jan 16, 2026
d723e64
chore: provide comments to subsystem-types `RewardsStatisticsCollecto…
EclesioMeloJunior Jan 16, 2026
367e57e
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Jan 16, 2026
1916ecb
chore: fix toml
EclesioMeloJunior Jan 17, 2026
979f031
chore: added crate to umbrella
EclesioMeloJunior Jan 17, 2026
1aae955
chore: fix error on subsystem-test-helpers
EclesioMeloJunior Jan 17, 2026
c6e1aaa
Merge branch 'master' into statistics-collector
EclesioMeloJunior Jan 19, 2026
134e246
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Jan 19, 2026
4e55909
Merge branch 'master' into statistics-collector
EclesioMeloJunior Jan 20, 2026
03bbc32
chore: fixing CI
EclesioMeloJunior Jan 20, 2026
2a4a942
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Jan 20, 2026
78918df
Merge branch 'master' into statistics-collector
EclesioMeloJunior Jan 20, 2026
9bf6559
chore: removing unused imports
EclesioMeloJunior Jan 20, 2026
637960e
chore: trying to fix CI
EclesioMeloJunior Jan 20, 2026
91b4544
chore: rollback umbrella cargo toml adding only the new crate
EclesioMeloJunior Jan 20, 2026
b05c552
chore: left cargo lock untouched
EclesioMeloJunior Jan 20, 2026
10bdf98
chore: finally found the problem
EclesioMeloJunior Jan 20, 2026
0cbb374
Merge branch 'master' into statistics-collector
EclesioMeloJunior Jan 21, 2026
70a5444
Merge branch 'master' into statistics-collector
EclesioMeloJunior Jan 21, 2026
6ea5b1a
chore: include prdoc
EclesioMeloJunior Jan 21, 2026
95ac8e6
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Jan 21, 2026
819cf86
chore: update prdoc, update tests
EclesioMeloJunior Jan 21, 2026
88a21a5
chore: check fixes
EclesioMeloJunior Jan 21, 2026
0c75d4f
chore: fmt fixed
EclesioMeloJunior Jan 21, 2026
e8e7b62
chore: fixed more CI
EclesioMeloJunior Jan 21, 2026
9b192ea
chore: fix clippy
EclesioMeloJunior Jan 21, 2026
9b1777d
Merge branch 'master' into statistics-collector
EclesioMeloJunior Jan 21, 2026
93af71c
chore: fix CI
EclesioMeloJunior Jan 22, 2026
aa11c4a
Merge branch 'master' into statistics-collector
EclesioMeloJunior Jan 22, 2026
67d4c98
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Jan 22, 2026
d945715
chore: useless SessionIndex import
EclesioMeloJunior Jan 22, 2026
07f9abd
chore: fix cargo fmt diffs
EclesioMeloJunior Jan 22, 2026
0bdc7e1
chore: fix toml simple formatting
EclesioMeloJunior Jan 22, 2026
295017a
chore: unused imports
EclesioMeloJunior Jan 23, 2026
4a54f0e
Merge branch 'master' into statistics-collector
EclesioMeloJunior Jan 23, 2026
44a7265
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Jan 23, 2026
8379297
fix `availability_is_recovered_from_chunks_even_if_backing_group_supp…
EclesioMeloJunior Jan 26, 2026
2691ccb
fix `recovers_from_only_chunks_if_pov_large`
EclesioMeloJunior Jan 26, 2026
5f185b1
chore: fixed `collating_using_undying_collator`
EclesioMeloJunior Jan 27, 2026
6ad3fb3
Merge branch 'master' into statistics-collector
EclesioMeloJunior Jan 27, 2026
afae188
chore: fix clippy diffs
EclesioMeloJunior Jan 27, 2026
4ec7716
chore: fix `overseer_all_subsystems_receive_signals_and_messages`
EclesioMeloJunior Jan 27, 2026
d7c8645
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Jan 27, 2026
b4131d5
chore: fix clippy + fmt
EclesioMeloJunior Jan 27, 2026
a4a71c7
Merge branch 'master' into statistics-collector
EclesioMeloJunior Jan 30, 2026
f892f0c
Merge branch 'master' into statistics-collector
EclesioMeloJunior Feb 2, 2026
5d68c21
Merge branch 'master' into statistics-collector
EclesioMeloJunior Feb 5, 2026
cf2da0d
use mem::take instead of cloning
EclesioMeloJunior Feb 5, 2026
365bd52
chore: improve handle_chunk_uploaded
EclesioMeloJunior Feb 5, 2026
18d2b65
chore: addressing comments
EclesioMeloJunior Feb 5, 2026
5eddb3a
Merge branch 'statistics-collector' of github.com:ChainSafe/polkadot-…
EclesioMeloJunior Feb 5, 2026
7f79914
Merge branch 'master' into statistics-collector
EclesioMeloJunior Feb 5, 2026
f50a75e
Merge branch 'master' into statistics-collector
EclesioMeloJunior Feb 6, 2026
39a26a8
Merge branch 'master' into statistics-collector
EclesioMeloJunior Feb 9, 2026
1b9ea1c
[pallet-revive] Fix storage deposit refunds in nested contract calls …
0xRVE Feb 10, 2026
e3d097a
Merge branch 'master' into statistics-collector
EclesioMeloJunior Feb 10, 2026
bf54e1f
chore: fix fmt diffs
EclesioMeloJunior Feb 10, 2026
a20ac9b
xcm-emulator: advance relay block number by relay_blocks_per_para_blo…
sigurpol Feb 10, 2026
fbddee8
Add `DecodeWithMemTracking` derive to `CompactProof` (#11028)
snowmead Feb 10, 2026
b5de070
Fix link-checker CI job (#11038)
skunert Feb 10, 2026
9c44781
Snowbridge: Remove unused proof fields (#10955)
yrong Feb 11, 2026
000698a
Merge branch 'master' into statistics-collector
EclesioMeloJunior Feb 11, 2026
822c6f6
[FRAME] Omni bencher run each benchmark at least 10 secs (#10794)
ggwpez Feb 11, 2026
c673673
Merge branch 'master' into statistics-collector
EclesioMeloJunior Feb 11, 2026
b44a93e
[Release|CI/CD] Automate publishing crates (#10913)
BDevParity Feb 11, 2026
1e793fe
Fix link-checker job: I am not giving up (#11049)
skunert Feb 12, 2026
890e5eb
tracing-subscriber: Pin version to prevent ANSI colour code issues (#…
bkchr Feb 12, 2026
3512a73
staking-async/ah-client: emit event when session key update from Asse…
sigurpol Feb 12, 2026
cd98fb4
Merge branch 'master' into statistics-collector
EclesioMeloJunior Feb 12, 2026
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
1 change: 1 addition & 0 deletions .config/lychee.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ exclude = [
"http://visitme/",
"https://visitme/",
# TODO meta issue: <https://github.com/paritytech/polkadot-sdk/issues/134>
"http://try-runtime.polkadot.io:443",
"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/",
Expand Down
1 change: 1 addition & 0 deletions .github/scripts/cmd/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ def main():
f"--no-storage-info --no-min-squares --no-median-slopes " \
f"{config['bench_flags']}"
print(f'-- Running: {cmd} \n')
os.environ['RUNTIME_LOG'] = 'off' # Turn off annoying logs during benchmarking
status = os.system(cmd)

if status != 0 and args.fail_fast:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-frame-omni-bencher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
id: required
run: |
forklift cargo build --locked --quiet --release -p asset-hub-westend-runtime --features runtime-benchmarks
forklift cargo run --locked --release -p frame-omni-bencher --quiet -- v1 benchmark pallet --runtime target/release/wbuild/asset-hub-westend-runtime/asset_hub_westend_runtime.compact.compressed.wasm --all --steps 2 --repeat 1 --quiet
forklift cargo run --locked --release -p frame-omni-bencher --quiet -- v1 benchmark pallet --runtime target/release/wbuild/asset-hub-westend-runtime/asset_hub_westend_runtime.compact.compressed.wasm --all --steps 2 --repeat 1 --quiet --min-duration 0
- name: Stop all workflows if failed
if: ${{ failure() && steps.required.conclusion == 'failure' && !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/workflow-stopper
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
ls -lrt $RUNTIME_BLOB_PATH

if [[ "$BENCH_CMD" == "pallet" ]]; then
cmd="./target/release/frame-omni-bencher v1 benchmark pallet --runtime $RUNTIME_BLOB_PATH --all --steps 2 --repeat 1 $FLAGS"
cmd="./target/release/frame-omni-bencher v1 benchmark pallet --runtime $RUNTIME_BLOB_PATH --all --steps 2 --repeat 1 --min-duration 0 $FLAGS"
elif [[ "$BENCH_CMD" == "overhead" ]]; then
cmd="./target/release/frame-omni-bencher v1 benchmark overhead --runtime $RUNTIME_BLOB_PATH"
else
Expand Down
248 changes: 248 additions & 0 deletions .github/workflows/release-80_publish-crates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@
name: Release - Publish Crates

on:
workflow_dispatch:
inputs:
release_name:
description: 'Release name (e.g., stable2509-3). Base branch is derived by removing the last -N suffix.'
required: true
type: string
registry:
description: 'Registry to publish crates to'
required: true
type: choice
options:
- staging.crates.io
- crates.io
default: staging.crates.io
is_patch:
description: 'Is this a patch release? (Set to false for new stable releases)'
required: true
type: boolean
default: true
dry_run:
description: 'Dry run - do not actually publish crates'
required: true
type: boolean
default: true

permissions:
contents: write

jobs:
set-image:
runs-on: ubuntu-latest
outputs:
IMAGE: ${{ steps.set_image.outputs.IMAGE }}
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- id: set_image
run: cat .github/env >> $GITHUB_OUTPUT

publish-crates:
needs: set-image
runs-on: ubuntu-latest
environment: release
env:
PGP_KMS_KEY: ${{ secrets.PGP_KMS_SIGN_COMMITS_KEY }}
PGP_KMS_HASH: ${{ secrets.PGP_KMS_HASH }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
container:
image: ${{ needs.set-image.outputs.IMAGE }}

steps:
- name: Install pgpkms
run: |
# Install pgpkms that is used to sign commits
pip install git+https://github.com/paritytech-release/pgpkms.git@6cb1cecce1268412189b77e4b130f4fa248c4151

- name: Derive stable branch from release name
id: derive_branch
run: |
RELEASE_NAME="${{ inputs.release_name }}"
echo "Release name: $RELEASE_NAME"

# Extract stable branch by removing the last -N suffix
# e.g., stable2509-3 -> stable2509
if [[ "$RELEASE_NAME" =~ ^(.+)-[0-9]+$ ]]; then
STABLE_BRANCH="${BASH_REMATCH[1]}"
else
# If no suffix, use the release name as-is (first release)
STABLE_BRANCH="$RELEASE_NAME"
fi

echo "Stable branch: $STABLE_BRANCH"
echo "STABLE_BRANCH=$STABLE_BRANCH" >> $GITHUB_OUTPUT

echo "CRATES_RELEASE_BRANCH=post-crates-release-$RELEASE_NAME" >> $GITHUB_OUTPUT

- name: Checkout stable branch
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
ref: ${{ steps.derive_branch.outputs.STABLE_BRANCH }}
fetch-depth: 0

- name: Import GPG keys
shell: bash
run: |
. ./.github/scripts/common/lib.sh
import_gpg_keys

- name: Configure git
shell: bash
run: |
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
git config --global commit.gpgsign true
PGPKMS_PATH=$(which pgpkms-git)
echo "Using pgpkms-git at: $PGPKMS_PATH"
git config --global gpg.program "$PGPKMS_PATH"
git config --global user.name "ParityReleases"
git config --global user.email "release-team@parity.io"
git config --global user.signingKey "D8018FBB3F534D866A45998293C5FB5F6A367B51"

- name: Create or switch to release branch
run: |
CRATES_RELEASE_BRANCH="${{ steps.derive_branch.outputs.CRATES_RELEASE_BRANCH }}"

if git rev-parse --verify -q "$CRATES_RELEASE_BRANCH" &>/dev/null; then
echo "Branch $CRATES_RELEASE_BRANCH already exists, switching to it"
git checkout "$CRATES_RELEASE_BRANCH"
else
echo "Creating branch: $CRATES_RELEASE_BRANCH"
git checkout -b "$CRATES_RELEASE_BRANCH"
fi
echo "On branch $CRATES_RELEASE_BRANCH"

- name: Install Rust 1.93
run: |
rustup install 1.93
rustup default 1.93
echo "Rust version:"
rustc --version
cargo --version

- name: Rust Cache
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
with:
cache-on-failure: true

- name: Install parity-publish
run: cargo install parity-publish@0.10.9 --locked -q

- name: Run parity-publish plan
run: |
echo "Running parity-publish plan..."
parity-publish plan --prdoc prdoc

- name: Save Plan.toml diff
if: inputs.is_patch
run: |
RELEASE_NAME="${{ inputs.release_name }}"
mkdir -p release-artifacts

echo "Saving Plan.toml diff..."
git diff Plan.toml > "release-artifacts/changed_crates_${RELEASE_NAME}.txt"

echo "Plan.toml changes:"
cat "release-artifacts/changed_crates_${RELEASE_NAME}.txt"

- name: Parse crate names for release notes
if: inputs.is_patch
run: |
RELEASE_NAME="${{ inputs.release_name }}"

echo "Parsing crate names..."
python3 scripts/release/parse-crates-names.py \
"release-artifacts/changed_crates_${RELEASE_NAME}.txt" \
scripts/release/templates/crates_list.md.tera

echo "Crates list:"
cat scripts/release/templates/crates_list.md.tera

- name: Commit Plan.toml and crates list
shell: bash
run: |
. ./.github/scripts/release/release_lib.sh

git add Plan.toml
if [ "${{ inputs.is_patch }}" = true ]; then
git add scripts/release/templates/crates_list.md.tera
fi

if [[ -n $(git status --porcelain) ]]; then
commit_with_message "chore: update Plan.toml and crates list for ${{ inputs.release_name }}"
echo "Committed Plan.toml and crates list"
else
echo "No changes to commit"
fi

- name: Run parity-publish apply
run: |
echo "Running parity-publish apply..."
parity-publish apply

- name: Update Cargo.lock
run: |
echo "Updating Cargo.lock..."
cargo update --workspace --offline || cargo update --workspace
echo "Cargo.lock updated"

- name: Commit version bumps
shell: bash
run: |
. ./.github/scripts/release/release_lib.sh

git add -A

if [[ -n $(git status --porcelain) ]]; then
commit_with_message "chore: apply version bumps for ${{ inputs.release_name }}"
echo "Committed version bumps"
else
echo "No changes to commit"
fi

- name: Push release branch
run: |
CRATES_RELEASE_BRANCH="${{ steps.derive_branch.outputs.CRATES_RELEASE_BRANCH }}"
echo "Pushing branch $CRATES_RELEASE_BRANCH..."
git push origin "$CRATES_RELEASE_BRANCH"
echo "Successfully pushed $CRATES_RELEASE_BRANCH"

- name: Configure cargo registry
run: |
REGISTRY="${{ inputs.registry }}"
echo "Configuring cargo for $REGISTRY..."
mkdir -p ~/.cargo

if [ "$REGISTRY" = "staging.crates.io" ]; then
cat >> ~/.cargo/config.toml << 'EOF'
[registries.crates-io]
index = "sparse+https://index.staging.crates.io/"
EOF
else
echo "Using default crates.io registry"
fi

echo "Cargo config:"
cat ~/.cargo/config.toml || echo "(using defaults)"

- name: Publish crates
env:
PARITY_PUBLISH_CRATESIO_TOKEN: ${{ inputs.registry == 'staging.crates.io' && secrets.STAGING_CRATES_IO_API_TOKEN || secrets.CRATES_IO_API_TOKEN }}
run: |
DRY_RUN="${{ inputs.dry_run }}"
REGISTRY="${{ inputs.registry }}"

if [ "$DRY_RUN" = true ]; then
echo "DRY RUN - Not actually publishing crates"
echo "Target registry: $REGISTRY"
parity-publish apply -p -d
else
echo "Publishing crates to $REGISTRY..."
parity-publish apply -p
echo "Crates published successfully to $REGISTRY!"
fi
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: script
run: forklift cargo run --locked --release -p staging-node-cli --bin substrate-node --features runtime-benchmarks --quiet -- benchmark pallet --chain dev --pallet "*" --extrinsic "*" --steps 2 --repeat 1 --quiet
run: forklift cargo run --locked --release -p staging-node-cli --bin substrate-node --features runtime-benchmarks --quiet -- benchmark pallet --chain dev --pallet "*" --extrinsic "*" --steps 2 --repeat 1 --min-duration 0 --quiet

# cf https://github.com/paritytech/polkadot-sdk/issues/1652
test-syscalls:
Expand Down
Loading
Loading