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

Service Provider Promotions again #877

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

michaeldjeffrey
Copy link
Contributor

@michaeldjeffrey michaeldjeffrey commented Oct 17, 2024

Proto PR :: helium/proto#424
Please scrutinize the names.

Previously

  • incentive_escrow_fund_bps was stored in Solana, and written to s3.
  • Promotions were submitted daily, and could point at a Subscriber or Gateway.

Now

  • incentive_escrow_fund_bps and promotions are stored in the metadata_db.
  • Promotions are pointed to by special NFTs.
  • Share logic works the same
  • PromotionDaemon has been removed

Temporary metadata_db table creation

I am testing with a local table until incentive programs make it into the metadata_db proper.
Using the Column mapping and Account Structure I have the following table.

CREATE TABLE incentive_escrow_programs (
  carrier VARCHAR(255) NOT NULL,    -- Pubkey (usually base58 encoded, max length 44)
  start_ts BIGINT NOT NULL,         -- i64 mapped to BIGINT
  stop_ts BIGINT NOT NULL,          -- i64 mapped to BIGINT
  shares INTEGER NOT NULL,          -- u32 mapped to INTEGER
  bump_seed SMALLINT NOT NULL,      -- u8 mapped to SMALLINT
  name VARCHAR NOT NULL             -- string mapped to VARCHAR
);

@michaeldjeffrey michaeldjeffrey force-pushed the mj/service-provider-promotions-v2 branch from 8d519bd to 4fbc63a Compare October 17, 2024 22:12
}

#[derive(Debug, Default, Clone)]
pub struct ServiceProviderPromotions(Vec<proto::ServiceProviderPromotions>);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i kinda like this wrapper and also dont

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. The plural works at both levels. I was hoping someone might help with a better name for the proto, and the wrapper name would become clearer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants