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

Promotion Fund workspace #866

Merged
merged 5 commits into from
Sep 30, 2024
Merged

Promotion Fund workspace #866

merged 5 commits into from
Sep 30, 2024

Conversation

michaeldjeffrey
Copy link
Contributor

Wait What? To keep the PRs from being absolute giant behemoths of reviewing, this PR is setting the stage for a re-shuffling of #856.

proto: helium/proto#413

New promotion_fund workspace

This workspace is all about dealing with Service Provider Promotion Fund allocation.

HIP-114
https://github.com/helium/HIP/blob/main/0114-incentive-escrow-fund-for-subscriber-referrals.md

Service Provider Promotions are stored in CarrierV0 on Solana.
To keep the mobile-verifier from talking to a chain, this service will
periodically check Solana and compare Service Providers allocations to
what is stored in S3.

If the values have changed, a new file will be output to a bucket for
the mobile-verifier rewarder to read from.

NOTE: Allocation Values are stored in Bps (Basis Points)
https://www.investopedia.com/terms/b/basispoint.asp

Supporting updates

  • Add ingesting promotions
  • Dumping reward files with promotions
  • Add to reward indexer

This workspace is all about dealing with Service Provider Promotion Fund
allocation.

HIP-114
https://github.com/helium/HIP/blob/main/0114-incentive-escrow-fund-for-subscriber-referrals.md

Service Provider Promotions are stored in CarrierV0 on Solana.
To keep the mobile-verifier from talking to a chain, this service will
periodically check Solana and compare Service Providers allocations to
what is stored in S3.

If the values have changed, a new file will be output to a bucket for
the mobile-verifier rewarder to read from.

NOTE: Allocation Values are stored in Bps (Basis Points)
https://www.investopedia.com/terms/b/basispoint.asp

** Commands

*** ./promotion_fund write-solana

Fetch Allocation values from Solana and write them to S3.
This command _always_ writes an S3 file.

*** ./promotion_fund print-s3

Using the lookback time in the provided settings file, show the
Allocation values this service would start up with.

*** ./promotion_fund server

Start a server that reads from S3, then checks with Solana periodically
for updated Allocatino values. Writing new files when needed.
@michaeldjeffrey michaeldjeffrey changed the title Mj/promotion fund Promotion Fund workspace Sep 20, 2024
- ingest promotion rewards, nothing will be done with them until the
  processor is added into mobile-verifier.
- dump reward files
- add sp_allocations dummy field to rewarder output
- reward indexer mobile promotion type added
Otherwise inserting a new reward would match on the address and
continually change the reward_type column for no reason.
We may not always want to read from the beginning of time in s3 to get
the latest values
@michaeldjeffrey michaeldjeffrey merged commit ac73044 into main Sep 30, 2024
17 checks passed
@michaeldjeffrey michaeldjeffrey deleted the mj/promotion-fund branch September 30, 2024 21:50
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.

3 participants