Skip to content

Commit

Permalink
Merge pull request #451 from opentensor/patch/delegate_take
Browse files Browse the repository at this point in the history
feat: min take 9%
  • Loading branch information
distributedstatemachine authored May 22, 2024
2 parents 65d8367 + 8aa14d9 commit 8153831
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 208 deletions.
102 changes: 0 additions & 102 deletions .github/workflows/publish-tag.yml

This file was deleted.

2 changes: 1 addition & 1 deletion pallets/admin-utils/tests/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ parameter_types! {
pub const InitialStakePruningMin: u16 = 0;
pub const InitialFoundationDistribution: u64 = 0;
pub const InitialDefaultTake: u16 = 11_796; // 18% honest number.
pub const InitialMinTake: u16 = 0;
pub const InitialMinTake: u16 = 5_898; // 9%;
pub const InitialWeightsVersionKey: u16 = 0;
pub const InitialServingRateLimit: u64 = 0; // No limit.
pub const InitialTxRateLimit: u64 = 0; // Disable rate limit for testing
Expand Down
4 changes: 2 additions & 2 deletions pallets/admin-utils/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ mod sudo_set_nominator_min_required_stake {
assert_ok!(SubtensorModule::do_become_delegate(
<<Test as Config>::RuntimeOrigin>::signed(cold1),
hot1,
0
u16::MAX / 10
));
assert_eq!(SubtensorModule::get_owning_coldkey_for_hotkey(&hot1), cold1);

Expand All @@ -954,7 +954,7 @@ mod sudo_set_nominator_min_required_stake {
assert_ok!(SubtensorModule::do_become_delegate(
<<Test as Config>::RuntimeOrigin>::signed(cold2),
hot2,
0
u16::MAX / 10
));
assert_eq!(SubtensorModule::get_owning_coldkey_for_hotkey(&hot2), cold2);

Expand Down
2 changes: 1 addition & 1 deletion pallets/subtensor/tests/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ parameter_types! {
pub const InitialStakePruningMin: u16 = 0;
pub const InitialFoundationDistribution: u64 = 0;
pub const InitialDefaultTake: u16 = 11_796; // 18%, same as in production
pub const InitialMinTake: u16 = 0;
pub const InitialMinTake: u16 =5_898; // 9%;
pub const InitialWeightsVersionKey: u16 = 0;
pub const InitialServingRateLimit: u64 = 0; // No limit.
pub const InitialTxRateLimit: u64 = 0; // Disable rate limit for testing
Expand Down
Loading

0 comments on commit 8153831

Please sign in to comment.