Skip to content

Commit

Permalink
Disable all calls for migration (#118)
Browse files Browse the repository at this point in the history
* Bump version: spec version = 9
Disable all calls for migration

* Disable system call remark

* forgotten : bump node and runtime package versions

* Filte all system calls

Co-authored-by: echevrier <edith.chevrier@scs.ch>
  • Loading branch information
echevrier and echevrier authored Apr 7, 2022
1 parent 6e789e0 commit 1e8b065
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 7 deletions.
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
Expand Up @@ -8,7 +8,7 @@ license = 'Apache2'
name = 'integritee-node'
repository = 'https://github.com/integritee-network/integritee-node'
#keep with runtime version
version = '1.0.8'
version = '1.0.9'

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
2 changes: 1 addition & 1 deletion runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license = 'Apache2'
name = 'integritee-node-runtime'
repository = 'https://github.com/integritee-network/integritee-node'
# keep patch revision with spec_version of runtime
version = '1.0.8'
version = '1.0.9'

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
30 changes: 27 additions & 3 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ use sp_std::prelude::*;
use sp_version::NativeVersion;
use sp_version::RuntimeVersion;
// A few exports that help ease life for downstream crates.
use frame_support::traits::{EqualPrivilegeOnly, Imbalance, InstanceFilter, OnUnbalanced};
use frame_support::traits::{
Contains, EqualPrivilegeOnly, Imbalance, InstanceFilter, OnUnbalanced,
};
pub use frame_support::{
construct_runtime, parameter_types,
traits::{KeyOwnerProofSystem, Randomness, StorageInfo},
Expand Down Expand Up @@ -126,7 +128,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
/// Version of the runtime specification. A full-node will not attempt to use its native
/// runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`,
/// `spec_version` and `authoring_version` are the same between Wasm and native.
spec_version: 8,
spec_version: 9,

/// Version of the implementation of the specification. Nodes are free to ignore this; it
/// serves only as an indication that the code is different; as long as the other two versions
Expand Down Expand Up @@ -220,10 +222,32 @@ parameter_types! {
pub const SS58Prefix: u8 = 13;
}

pub struct BaseFilter;
#[rustfmt::skip]
impl Contains<Call> for BaseFilter {
// Block send extrinsics for mainnent before official token generation event
fn contains(call: &Call) -> bool {
!matches!(
call,
Call::Balances(..) |
Call::Claims(..) |
Call::Multisig(_) |
Call::Proxy(_) |
Call::Teeracle(_) |
Call::Teerex(_) |
Call::Treasury(..) |
Call::Scheduler(_) |
Call::Utility(_) |
Call::Vesting(_) |
Call::System(_)
)
}
}

// Configure FRAME pallets to include in runtime.

impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything;
type BaseCallFilter = BaseFilter;
/// Block & extrinsics weights: base values and limits.
type BlockWeights = BlockWeights;
/// The maximum length of a block (in bytes).
Expand Down

0 comments on commit 1e8b065

Please sign in to comment.