Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Soft disable Service Provider promotions #873

Merged
merged 3 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 25 additions & 41 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ helium-lib = { git = "https://github.com/helium/helium-wallet-rs.git", branch =
hextree = { git = "https://github.com/jaykickliter/HexTree", branch = "main", features = [
"disktree",
] }
helium-proto = { git = "https://github.com/helium/proto", branch = "mj/verified-data-transfer", features = [
helium-proto = { git = "https://github.com/helium/proto", branch = "master", features = [
"services",
] }
beacon = { git = "https://github.com/helium/proto", branch = "mj/verified-data-transfer" }
beacon = { git = "https://github.com/helium/proto", branch = "master" }
solana-client = "1.18"
solana-sdk = "1.18"
solana-program = "1.18"
Expand Down
36 changes: 18 additions & 18 deletions file_store/src/cli/dump_mobile_rewards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::{file_source, Result, Settings};
use futures::stream::StreamExt;
use helium_crypto::PublicKey;
use helium_proto::services::poc_mobile::mobile_reward_share::Reward::*;
use helium_proto::services::poc_mobile::promotion_reward::Entity;
// use helium_proto::services::poc_mobile::promotion_reward::Entity;
use helium_proto::services::poc_mobile::MobileRewardShare;
use prost::Message;
use serde_json::json;
Expand All @@ -24,7 +24,7 @@ impl Cmd {
let mut subscriber_reward = vec![];
let mut service_provider_reward = vec![];
let mut unallocated_reward = vec![];
let mut promotion_reward = vec![];
// let mut promotion_reward = vec![];

while let Some(result) = file_stream.next().await {
let msg = result?;
Expand Down Expand Up @@ -62,21 +62,21 @@ impl Cmd {
"unallocated_reward_type": reward.reward_type,
"amount": reward.amount,
})),
PromotionReward(reward) => {
let entity = reward.entity.unwrap();
match entity {
Entity::SubscriberId(id) => promotion_reward.push(json!({
"subscriber_id": uuid::Uuid::from_slice(&id).unwrap(),
"service_provider_amount": reward.service_provider_amount,
"matched_amount": reward.matched_amount,
})),
Entity::GatewayKey(key) => promotion_reward.push(json!({
"gateway_key": PublicKey::try_from(key)?.to_string(),
"service_provider_amount": reward.service_provider_amount,
"matched_amount": reward.matched_amount,
})),
}
}
// PromotionReward(reward) => {
// let entity = reward.entity.unwrap();
// match entity {
// Entity::SubscriberId(id) => promotion_reward.push(json!({
// "subscriber_id": uuid::Uuid::from_slice(&id).unwrap(),
// "service_provider_amount": reward.service_provider_amount,
// "matched_amount": reward.matched_amount,
// })),
// Entity::GatewayKey(key) => promotion_reward.push(json!({
// "gateway_key": PublicKey::try_from(key)?.to_string(),
// "service_provider_amount": reward.service_provider_amount,
// "matched_amount": reward.matched_amount,
// })),
// }
// }
},
None => todo!(),
}
Expand All @@ -88,7 +88,7 @@ impl Cmd {
"gateway_reward": gateway_reward,
"subscriber_reward": subscriber_reward,
"service_provider_reward": service_provider_reward,
"promotion_reward": promotion_reward,
// "promotion_reward": promotion_reward,
"unallocated_reward": unallocated_reward,
}))?;

Expand Down
2 changes: 1 addition & 1 deletion mobile_verifier/src/rewarder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ where
boosted_poc_bones_per_reward_share: Some(helium_proto::Decimal {
value: poc_dc_shares.boost.to_string(),
}),
sp_allocations: service_provider::reward_data_sp_allocations(&self.pool).await?,
// sp_allocations: service_provider::reward_data_sp_allocations(&self.pool).await?,
};
self.reward_manifests
.write(
Expand Down
Loading