Skip to content

Commit

Permalink
fix(kreivo-runtime): allow signed requests from dispatch as (communit…
Browse files Browse the repository at this point in the history
…y) account for kreivo collective referenda
  • Loading branch information
pandres95 committed Apr 9, 2024
1 parent a9ca1ca commit ba18406
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
build:
name: Build node
runs-on: self-hosted
runs-on: [self-hosted, builder]
steps:
- uses: actions/checkout@v4

Expand All @@ -18,7 +18,7 @@ jobs:
release:
name: Create GH Release
needs: build
runs-on: self-hosted
runs-on: [self-hosted, builder]
steps:
- name: Build collator artifacts
run: just release-artifacts
Expand All @@ -35,7 +35,7 @@ jobs:
container:
name: Containerize & Publish
needs: build
runs-on: self-hosted
runs-on: [self-hosted, builder]
steps:
- name: Login to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | podman login ghcr.io -u ${{ github.actor }} --password-stdin
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "virto-node"
version = "0.9.0"
version = "0.9.1"
authors = ['Virto Team <[email protected]>']
license = "GPL-3.0-only"
homepage = 'https://github.com/virto-network/virto-node'
Expand Down
2 changes: 1 addition & 1 deletion runtime/kreivo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "kreivo-runtime"
description = "Kreivo Runtime"
version = "0.9.0"
version = "0.9.1"
authors = ['Virto Team <[email protected]>']
license = "GPL-3.0-only"
homepage = 'https://github.com/virto-network/virto-node'
Expand Down
8 changes: 5 additions & 3 deletions runtime/kreivo/src/collective/governance.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use super::*;

use pallet_communities::origin::AsSignedByCommunity;
use pallet_ranked_collective::{EnsureMember, TallyOf, Votes};
use parachains_common::kusama::currency::QUID;
use sp_core::ConstU128;

Expand All @@ -20,12 +21,13 @@ impl pallet_referenda::Config<KreivoReferendaInstance> for Runtime {
type Scheduler = Scheduler;
type Currency = Balances;
// Communities can submit proposals.
type SubmitOrigin = AsEnsureOriginWithArg<AsSignedByCommunity<Self>>;
type SubmitOrigin =
AsEnsureOriginWithArg<EitherOf<EnsureMember<Runtime, KreivoCollectiveInstance, 1>, AsSignedByCommunity<Self>>>;
type CancelOrigin = EnsureRoot<AccountId>;
type KillOrigin = EnsureRoot<AccountId>;
type Slash = ();
type Votes = pallet_ranked_collective::Votes;
type Tally = pallet_ranked_collective::TallyOf<Runtime, KreivoCollectiveInstance>;
type Votes = Votes;
type Tally = TallyOf<Runtime, KreivoCollectiveInstance>;
type SubmissionDeposit = ConstU128<0>;
type MaxQueued = ConstU32<10>;
type UndecidingTimeout = ConstU32<{ 2 * DAYS }>;
Expand Down
2 changes: 1 addition & 1 deletion runtime/kreivo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("kreivo-parachain"),
impl_name: create_runtime_str!("kreivo-parachain"),
authoring_version: 1,
spec_version: 103,
spec_version: 104,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 4,
Expand Down

0 comments on commit ba18406

Please sign in to comment.