Skip to content

Commit efbd28a

Browse files
authored
Merge branch 'master' into muharem-meta-tx
2 parents fc161a7 + 38d2fa8 commit efbd28a

10 files changed

+72
-51
lines changed

.github/workflows/checks-quick.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ jobs:
202202
echo "RUST_VERSION=${RUST_VERSION}" >> $GITHUB_ENV
203203
204204
- name: Install Rust
205-
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1
205+
uses: actions-rust-lang/setup-rust-toolchain@9399c7bb15d4c7d47b27263d024f0a4978346ba4 # v1.11.0
206206
with:
207207
cache: false
208208
toolchain: ${{ env.RUST_VERSION }}

.github/workflows/misc-sync-templates.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ jobs:
259259
timeout-minutes: 90
260260
- name: Create PR on failure
261261
if: failure() && steps.check-compilation.outcome == 'failure'
262-
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v5
262+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v5
263263
with:
264264
path: "${{ env.template-path }}"
265265
token: ${{ steps.app_token.outputs.token }}
@@ -269,7 +269,7 @@ jobs:
269269
body: "The template has NOT been successfully built and needs to be inspected."
270270
branch: "update-template/${{ github.event.inputs.stable_release_branch }}"
271271
- name: Create PR on success
272-
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v5
272+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v5
273273
with:
274274
path: "${{ env.template-path }}"
275275
token: ${{ steps.app_token.outputs.token }}

.github/workflows/release-50_publish-docker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ jobs:
278278
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
279279

280280
- name: Set up Docker Buildx
281-
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0
281+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
282282

283283
- name: Cache Docker layers
284284
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2

.github/workflows/release-reusable-rc-buid.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
./.github/scripts/release/build-linux-release.sh ${{ matrix.binaries }} ${{ inputs.package }}
105105
106106
- name: Generate artifact attestation
107-
uses: actions/attest-build-provenance@520d128f165991a6c774bcb264f323e3d70747f4 # v2.2.0
107+
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.2.3
108108
with:
109109
subject-path: /artifacts/${{ matrix.binaries }}/${{ matrix.binaries }}
110110

@@ -173,7 +173,7 @@ jobs:
173173
run: echo "/opt/homebrew/bin" >> $GITHUB_PATH
174174

175175
- name: Install rust ${{ env.RUST_VERSION }}
176-
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1
176+
uses: actions-rust-lang/setup-rust-toolchain@9399c7bb15d4c7d47b27263d024f0a4978346ba4 # v1.11.0
177177
with:
178178
cache: false
179179
toolchain: ${{ env.RUST_VERSION }}
@@ -219,7 +219,7 @@ jobs:
219219
./.github/scripts/release/build-macos-release.sh ${{ matrix.binaries }} ${{ inputs.package }}
220220
221221
- name: Generate artifact attestation
222-
uses: actions/attest-build-provenance@520d128f165991a6c774bcb264f323e3d70747f4 # v2.2.0
222+
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.2.3
223223
with:
224224
subject-path: ${{ env.ARTIFACTS_PATH }}/${{ matrix.binaries }}
225225

@@ -292,7 +292,7 @@ jobs:
292292
. "${GITHUB_WORKSPACE}"/.github/scripts/release/build-deb.sh ${{ inputs.package }} ${VERSION}
293293
294294
- name: Generate artifact attestation
295-
uses: actions/attest-build-provenance@520d128f165991a6c774bcb264f323e3d70747f4 # v2.2.0
295+
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.2.3
296296
with:
297297
subject-path: target/production/*.deb
298298

.github/workflows/release-srtool.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
echo "Compressed Runtime: ${{ steps.srtool_build.outputs.wasm_compressed }}"
8888
8989
- name: Generate artifact attestation
90-
uses: actions/attest-build-provenance@520d128f165991a6c774bcb264f323e3d70747f4 # v2.2.0
90+
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.2.3
9191
with:
9292
subject-path: ${{ steps.srtool_build.outputs.wasm }}
9393

.github/workflows/reusable-preflight.yml

+16-16
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ jobs:
7878
preflight:
7979
runs-on: ubuntu-latest
8080
outputs:
81-
changes_rust: ${{ steps.set_changes.outputs.rust_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }}
82-
changes_currentWorkflow: ${{ steps.set_changes.outputs.currentWorkflow_any_changed }}
81+
changes_rust: true
82+
changes_currentWorkflow: true
8383

8484
IMAGE: ${{ steps.set_image.outputs.IMAGE }}
8585

@@ -112,19 +112,20 @@ jobs:
112112
echo "currentWorkflowFile=$(echo ${{ github.workflow_ref }} | sed -nE "s/.*(\.github\/workflows\/[a-zA-Z0-9_-]*\.y[a]?ml)@refs.*/\1/p")" >> $GITHUB_OUTPUT
113113
echo "currentActionDir=$(echo ${{ github.action_path }} | sed -nE "s/.*(\.github\/actions\/[a-zA-Z0-9_-]*)/\1/p")" >> $GITHUB_OUTPUT
114114
115-
- name: Set changes
116-
id: set_changes
117-
uses: tj-actions/changed-files@v45
118-
with:
119-
files_yaml: |
120-
rust:
121-
- '**/*'
122-
- '!.github/**/*'
123-
- '!prdoc/**/*'
124-
- '!docs/**/*'
125-
currentWorkflow:
126-
- '${{ steps.current_file.outputs.currentWorkflowFile }}'
127-
- '.github/workflows/reusable-preflight.yml'
115+
# removed due to https://news.ycombinator.com/item?id=43368870
116+
#- name: Set changes
117+
# id: set_changes
118+
# uses: tj-actions/changed-files@v45
119+
# with:
120+
# files_yaml: |
121+
# rust:
122+
# - '**/*'
123+
# - '!.github/**/*'
124+
# - '!prdoc/**/*'
125+
# - '!docs/**/*'
126+
# currentWorkflow:
127+
# - '${{ steps.current_file.outputs.currentWorkflowFile }}'
128+
# - '.github/workflows/reusable-preflight.yml'
128129

129130
#
130131
# Set image
@@ -180,7 +181,6 @@ jobs:
180181
shell: bash
181182
run: |
182183
echo "workflow file: ${{ steps.current_file.outputs.currentWorkflowFile }}"
183-
echo "Modified: ${{ steps.set_changes.outputs.modified_keys }}"
184184
185185
#
186186
#

.github/workflows/tests-misc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ jobs:
359359
- name: Set up Homebrew
360360
uses: Homebrew/actions/setup-homebrew@1ccc07ccd54b6048295516a3eb89b192c35057dc # master from 12.09.2024
361361
- name: Install rust ${{ env.RUST_VERSION }}
362-
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1
362+
uses: actions-rust-lang/setup-rust-toolchain@9399c7bb15d4c7d47b27263d024f0a4978346ba4 # v1.11.0
363363
with:
364364
cache: false
365365
toolchain: ${{ env.RUST_VERSION }}

.github/workflows/zombienet-reusable-preflight.yml

+25-25
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,11 @@ jobs:
102102
preflight:
103103
runs-on: ubuntu-latest
104104
outputs:
105-
changes_substrate: ${{ steps.set_changes.outputs.substrate_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }}
106-
changes_cumulus: ${{ steps.set_changes.outputs.cumulus_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }}
107-
changes_polkadot: ${{ steps.set_changes.outputs.polkadot_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }}
108-
changes_bridges: ${{ steps.set_changes.outputs.bridges_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }}
109-
changes_templates: ${{ steps.set_changes.outputs.templates_any_changed || steps.set_changes.outputs.currentWorkflow_any_changed }}
105+
changes_substrate: true
106+
changes_cumulus: true
107+
changes_polkadot: true
108+
changes_bridges: true
109+
changes_templates: true
110110

111111
ZOMBIENET_IMAGE: ${{ steps.set_vars.outputs.ZOMBIENET_IMAGE }}
112112
ZOMBIENET_RUNNER: ${{ steps.set_vars.outputs.ZOMBIENET_RUNNER }}
@@ -139,25 +139,26 @@ jobs:
139139
echo "currentWorkflowFile=$(echo ${{ github.workflow_ref }} | sed -nE "s/.*(\.github\/workflows\/[a-zA-Z0-9_-]*\.y[a]?ml)@refs.*/\1/p")" >> $GITHUB_OUTPUT
140140
echo "currentActionDir=$(echo ${{ github.action_path }} | sed -nE "s/.*(\.github\/actions\/[a-zA-Z0-9_-]*)/\1/p")" >> $GITHUB_OUTPUT
141141
142-
- name: Set changes
143-
id: set_changes
144-
uses: tj-actions/changed-files@v45
145-
with:
146-
files_yaml: |
147-
substrate:
148-
- 'substrate/**/*'
149-
cumulus:
150-
- 'cumulus/**/*'
151-
polkadot:
152-
- 'polkadot/**/*'
153-
bridges:
154-
- 'bridges/**/*'
155-
templates:
156-
- 'templates/**/*'
157-
currentWorkflow:
158-
- '${{ steps.current_file.outputs.currentWorkflowFile }}'
159-
- '.github/workflows/zombienet-reusable-preflight.yml'
160-
- '.github/zombienet-env'
142+
# removed due to https://news.ycombinator.com/item?id=43368870
143+
#- name: Set changes
144+
# id: set_changes
145+
# uses: tj-actions/changed-files@v45
146+
# with:
147+
# files_yaml: |
148+
# substrate:
149+
# - 'substrate/**/*'
150+
# cumulus:
151+
# - 'cumulus/**/*'
152+
# polkadot:
153+
# - 'polkadot/**/*'
154+
# bridges:
155+
# - 'bridges/**/*'
156+
# templates:
157+
# - 'templates/**/*'
158+
# currentWorkflow:
159+
# - '${{ steps.current_file.outputs.currentWorkflowFile }}'
160+
# - '.github/workflows/zombienet-reusable-preflight.yml'
161+
# - '.github/zombienet-env'
161162

162163
#
163164
# Set environment vars (including runner/image)
@@ -187,7 +188,6 @@ jobs:
187188
shell: bash
188189
run: |
189190
echo "workflow file: ${{ steps.current_file.outputs.currentWorkflowFile }}"
190-
echo "Modified: ${{ steps.set_changes.outputs.modified_keys }}"
191191
echo "ZOMBIENET_IMAGE: ${{ steps.set_vars.outputs.ZOMBIENET_IMAGE }}"
192192
193193
#

prdoc/pr_7918.prdoc

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
2+
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json
3+
4+
title: "Add an extra_constant to pallet-treasury"
5+
6+
doc:
7+
- audience: Runtime Dev
8+
description: |
9+
- Allows to query pallet-treasury's pot account via extra constant.
10+
11+
crates:
12+
- name: pallet-treasury
13+
bump: minor

substrate/frame/treasury/src/lib.rs

+8
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,14 @@ pub mod pallet {
289289
type BlockNumberProvider: BlockNumberProvider;
290290
}
291291

292+
#[pallet::extra_constants]
293+
impl<T: Config<I>, I: 'static> Pallet<T, I> {
294+
/// Gets this pallet's derived pot account.
295+
fn pot_account() -> T::AccountId {
296+
Self::account_id()
297+
}
298+
}
299+
292300
/// DEPRECATED: associated with `spend_local` call and will be removed in May 2025.
293301
/// Refer to <https://github.com/paritytech/polkadot-sdk/pull/5961> for migration to `spend`.
294302
///

0 commit comments

Comments
 (0)