Commits on Source (10)
-
Noah Jelich authored
The solochain template links to parachain template instead of solochain.
-
Oliver Tale-Yazdi authored
There are some accounts that do not have a consumer ref while having a reserve. This adds a fail-safe mechanism to trigger in the case that `does_consume` is true, but the assumption of `consumer>0` is not. This should prevent those accounts from loosing balance and the TI from getting messed up even more, but is not an "ideal" fix. TBH an ideal fix is not possible, since on-chain data is in an invalid state. --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]>
-
Svyatoslav Nikolsky authored
TODOs: - [x] wait and see if test `1` works; - [x] ~think of whether we need remaining tests.~ I think we should keep it - will try to revive and update it
-
Javyer authored
This PR includes two changes: - added `workflow_dispatch` to review bot - reverted #4271 ### Added `workflow_dispatch` to review bot This allows us, in the case that review-bot fails for some fork reasons, to trigger it manually ensuring that we can overcame the problem with the multiple actions while we look for a solution. <img width="342" alt="image" src="https://github.com/paritytech/polkadot-sdk/assets/8524599/f432f91b-829a-4da4-b4ca-54cc4fe280c8"> ### Reverted #4271 Unfortunately, the changes added in #4271 do not work in forks. Here is a lengthy discussion of many individuals facing the same problem as me: - [GitHub Action `pull_request` attribute empty in `workflow_run` event object for PR from forked repo #25220](https://github.com/orgs/community/discussions/25220) So I had to revert it (but I updated the dependencies to latest). #### Miscellaneous changes I added a debug log at the end of review bot in case it fails so we can easily debug it without having to make a lot of boilerplate and forks to duplicate the environment.
-
Svyatoslav Nikolsky authored
related to https://github.com/paritytech/parity-bridges-common/issues/2962 silent, because the actual code for subcommand is added in the `parity-bridges-common` repo, where binary lives --------- Co-authored-by: Adrian Catangiu <[email protected]>
-
thiolliere authored
Currently we discard errors content We should at least log it. Code now is more similar to what is written in try_on_runtime_upgrade. label should be R0 --------- Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Liam Aharon <[email protected]> Co-authored-by: Javier Bullrich <[email protected]>
-
Tsvetomir Dimitrov authored
Closes https://github.com/paritytech/polkadot-sdk/issues/1966, https://github.com/paritytech/polkadot-sdk/issues/1963 and https://github.com/paritytech/polkadot-sdk/issues/1962. Disabling strategy specification [here](https://github.com/paritytech/polkadot-sdk/pull/2955). (Updated 13/02/2024) Implements: * validator disabling for a whole era instead of just a session * no more than 1/3 of the validators in the active set are disabled Removes: * `DisableStrategy` enum - now each validator committing an offence is disabled. * New era is not forced if too many validators are disabled. Before this PR not all offenders were disabled. A decision was made based on [`enum DisableStrategy`](https://github.com/paritytech/polkadot-sdk/blob/bbb6631641f9adba30c0ee6f4d11023a424dd362/substrate/primitives/staking/src/offence.rs#L54). Some offenders were disabled for a whole era, some just for a session, some were not disabled at all. This PR changes the disabling behaviour. Now a validator committing an offense is disabled immediately till the end of the current era. Some implementation notes: * `OffendingValidators` in pallet session keeps all offenders (this is not changed). However its type is changed from `Vec<(u32, bool)>` to `Vec<u32>`. The reason is simple - each offender is getting disabled so the bool doesn't make sense anymore. * When a validator is disabled it is first added to `OffendingValidators` and then to `DisabledValidators`. This is done in [`add_offending_validator`](https://github.com/paritytech/polkadot-sdk/blob/bbb6631641f9adba30c0ee6f4d11023a424dd362/substrate/frame/staking/src/slashing.rs#L325) from staking pallet. * In [`rotate_session`](https://github.com/paritytech/polkadot-sdk/blob/bdbe98297032e21a553bf191c530690b1d591405/substrate/frame/session/src/lib.rs#L623) the `end_session` also calls [`end_era`](https://github.com/paritytech/polkadot-sdk/blob/bbb6631641f9adba30c0ee6f4d11023a424dd362/substrate/frame/staking/src/pallet/impls.rs#L490) when an era ends. In this case `OffendingValidators` are cleared **(1)**. * Then in [`rotate_session`](https://github.com/paritytech/polkadot-sdk/blob/bdbe98297032e21a553bf191c530690b1d591405/substrate/frame/session/src/lib.rs#L623) `DisabledValidators` are cleared **(2)** * And finally (still in `rotate_session`) a call to [`start_session`](https://github.com/paritytech/polkadot-sdk/blob/bbb6631641f9adba30c0ee6f4d11023a424dd362/substrate/frame/staking/src/pallet/impls.rs#L430 ) repopulates the disabled validators **(3)**. * The reason for this complication is that session pallet knows nothing abut eras. To overcome this on each new session the disabled list is repopulated (points 2 and 3). Staking pallet knows when a new era starts so with point 1 it ensures that the offenders list is cleared. --------- Co-authored-by: ordian <[email protected]> Co-authored-by: ordian <[email protected]> Co-authored-by: Maciej <[email protected]> Co-authored-by: Gonçalo Pestana <[email protected]> Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Ankan <[email protected]>
-
Ron authored
Just the upper-stream for https://github.com/Snowfork/polkadot-sdk/pull/137 and more context there. --------- Co-authored-by: Clara van Staden <[email protected]> Co-authored-by: Adrian Catangiu <[email protected]>
-
antiyro authored
-
Ankan authored
... | ... | @@ -5,6 +5,12 @@ on: |
- Review-Trigger | ||
types: | ||
- completed | ||
workflow_dispatch: | ||
inputs: | ||
pr-number: | ||
description: "Number of the PR to evaluate" | ||
required: true | ||
type: number | ||
jobs: | ||
review-approvals: | ||
... | ... | @@ -17,6 +23,12 @@ jobs: |
with: | ||
app-id: ${{ secrets.REVIEW_APP_ID }} | ||
private-key: ${{ secrets.REVIEW_APP_KEY }} | ||
- name: Extract content of artifact | ||
if: ${{ !inputs.pr-number }} | ||
id: number | ||
uses: Bullrich/[email protected] | ||
with: | ||
artifact-name: pr_number | ||
- name: "Evaluates PR reviews and assigns reviewers" | ||
uses: paritytech/[email protected] | ||
with: | ||
... | ... | @@ -24,5 +36,10 @@ jobs: |
team-token: ${{ steps.app_token.outputs.token }} | ||
checks-token: ${{ steps.app_token.outputs.token }} | ||
# This is extracted from the triggering event | ||
pr-number: ${{ github.event.workflow_run.pull_requests[0].number }} | ||
pr-number: ${{ inputs.pr-number || steps.number.outputs.content }} | ||
request-reviewers: true | ||
- name: Log payload | ||
if: ${{ failure() || runner.debug }} | ||
run: echo "::debug::$payload" | ||
env: | ||
payload: ${{ toJson(github.event) }} |
prdoc/pr_2226.prdoc
0 → 100644