Skip to content

Commit

Permalink
Tee staking (#310)
Browse files Browse the repository at this point in the history
* tee staking changes

* fix version

* pallet id and rewards amount config

* reward pool config added

* weight todos added

* new weights added

* weights todo

* weights todo

* history depth added

* dev-1

* dev-1 config

* epoch duration reverted

* config changes

* try-runtime test

* mainnet config changes
  • Loading branch information
Immanuel-john authored Aug 31, 2023
1 parent 809e6ef commit 522b733
Show file tree
Hide file tree
Showing 12 changed files with 310 additions and 131 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "ternoa-pallets"]
path = ternoa-pallets
url = https://github.com/capsule-corp-ternoa/ternoa-pallets

branch = tee-staking
47 changes: 42 additions & 5 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 runtime/alphanet/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "alphanet-runtime"
authors = [ "Ternoa" ]
version = "1.3.1"
version = "1.3.2"
edition = "2021"
build = "build.rs"

Expand Down
13 changes: 11 additions & 2 deletions runtime/alphanet/src/pallets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -766,15 +766,24 @@ parameter_types! {
pub const ClusterSize: u32 = 5;
pub const MaxUriLen: u32 = 150;
pub const ListSizeLimit: u32 = 10;
pub const TeeBondingDuration: u32 = 200;
pub const InitialStakingAmount: Balance = 250_000_000_000_000_000_000_000;
pub const InitalDailyRewardPool: Balance = 3082_000_000_000_000_000_000;
pub const TeePalletId: PalletId = PalletId(*b"teepalet");
pub const TeeHistoryDepth: u32 = 10;
}

impl ternoa_tee::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type WeightInfo = weights::ternoa_tee::WeightInfo<Runtime>;
type TeeWeightInfo = weights::ternoa_tee::WeightInfo<Runtime>;
type ClusterSize = ClusterSize;
type MaxUriLen = MaxUriLen;
type ListSizeLimit = ListSizeLimit;
type TeeBondingDuration = TeeBondingDuration;
type InitialStakingAmount = InitialStakingAmount;
type InitalDailyRewardPool = InitalDailyRewardPool;
type PalletId = TeePalletId;
type TeeHistoryDepth = TeeHistoryDepth;
}

parameter_types! {
Expand Down
2 changes: 1 addition & 1 deletion runtime/alphanet/src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,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: 15,
spec_version: 16,

/// 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
Loading

0 comments on commit 522b733

Please sign in to comment.