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

[Relay Mining] Probabilistic Proofs <> Relay Mining Feedback Loop (i.e. Proportional Rewards) #781

Closed
2 of 7 tasks
Olshansk opened this issue Sep 3, 2024 · 1 comment
Closed
2 of 7 tasks
Assignees
Labels
on-chain On-chain business logic scalability tokenomics Token Economics - what else do you need?

Comments

@Olshansk
Copy link
Member

Olshansk commented Sep 3, 2024

Objective

Ensure off-chain relays serviced will have proportional rewards based on the relay difficulty.

Origin Document

Goals

  • Fix critical missing gaps in the Relay Mining algorithm
  • Ensure the protocol correctly rewards suppliers based on the work done (estimated), and not just the work committed

Deliverables

Non-goals / Non-deliverables

  • Updating the Relay Mining paper

General deliverables

  • Comments: Add/update TODOs and comments alongside the source code so it is easier to follow.
  • Testing: Add new tests (unit and/or E2E) to the test suite.
  • Makefile: Add new targets to the Makefile to make the new functionality easier to use.
  • Documentation: Update architectural or development READMEs; use mermaid diagrams where appropriate.

Creator: @Olshansk
Co-Owners: @red-0ne @adshmh

@Olshansk Olshansk added on-chain On-chain business logic tokenomics Token Economics - what else do you need? scalability labels Sep 3, 2024
@Olshansk Olshansk added this to the Shannon Beta TestNet Launch milestone Sep 3, 2024
@Olshansk Olshansk self-assigned this Sep 3, 2024
@Olshansk Olshansk added this to Shannon Sep 3, 2024
@Olshansk Olshansk moved this to 👀 In review in Shannon Sep 3, 2024
@Olshansk Olshansk moved this from 👀 In review to 🏗 In progress in Shannon Sep 11, 2024
@red-0ne red-0ne self-assigned this Sep 18, 2024
Olshansk added a commit that referenced this issue Sep 21, 2024
…on difficulty (#771)

## Summary

No real business logic changes, but preparation + tests + helpesr + TODOs for #781.

## Issue

- Preparation for #781
- Pre-requisite for #818

---------

Co-authored-by: Bryan White <[email protected]>
Co-authored-by: Redouane Lakrache <[email protected]>
red-0ne added a commit that referenced this issue Oct 11, 2024
## Summary

This PR incorporated the mining difficulty into the claim reward
calculation.
* Encapsulates the claimed tokens into a `claim.GetClaimeduPOKT(params,
difficulty)`
* Implements a test to assert that the difficulty based rewards are
proportional to the off-chain relays served.
* Removes unused `min_relay_difficulty_bits` gov. param.

It is based on the preparation work of PR #836.

## Issue

- #781 
- #758 

## Type of change

Select one or more from the following:

- [x] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Testing

- [x] **Unit Tests**: `make go_develop_and_test`
- [x] **LocalNet E2E Tests**: `make test_e2e`
- [ ] **DevNet E2E Tests**: Add the `devnet-test-e2e` label to the PR.

## Sanity Checklist

- [x] I have tested my changes using the available tooling
- [x] I have commented my code
- [x] I have performed a self-review of my own code; both comments &
source code
- [ ] I create and reference any new tickets, if applicable
- [x] I have left TODOs throughout the codebase, if applicable

---------

Co-authored-by: Bryan White <[email protected]>
Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: red-0ne <[email protected]>
@red-0ne
Copy link
Contributor

red-0ne commented Oct 11, 2024

Closing as per #840

@red-0ne red-0ne closed this as completed Oct 11, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Shannon Oct 11, 2024
red-0ne added a commit that referenced this issue Oct 14, 2024
**This is a repost of PR #840 which did not get merged into main**

## Summary

This PR incorporated the mining difficulty into the claim reward
calculation.
* Encapsulates the claimed tokens into a `claim.GetClaimeduPOKT(params,
difficulty)`
* Implements a test to assert that the difficulty based rewards are
proportional to the off-chain relays served.
* Removes unused `min_relay_difficulty_bits` gov. param.

It is based on the preparation work of PR #836.

## Issue

- #781 
- #758 

## Type of change

Select one or more from the following:

- [x] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Testing

- [x] **Unit Tests**: `make go_develop_and_test`
- [x] **LocalNet E2E Tests**: `make test_e2e`
- [ ] **DevNet E2E Tests**: Add the `devnet-test-e2e` label to the PR.

## Sanity Checklist

- [x] I have tested my changes using the available tooling
- [x] I have commented my code
- [x] I have performed a self-review of my own code; both comments &
source code
- [ ] I create and reference any new tickets, if applicable
- [x] I have left TODOs throughout the codebase, if applicable
okdas pushed a commit that referenced this issue Nov 14, 2024
…on difficulty (#771)

## Summary

No real business logic changes, but preparation + tests + helpesr + TODOs for #781.

## Issue

- Preparation for #781
- Pre-requisite for #818

---------

Co-authored-by: Bryan White <[email protected]>
Co-authored-by: Redouane Lakrache <[email protected]>
okdas pushed a commit that referenced this issue Nov 14, 2024
**This is a repost of PR #840 which did not get merged into main**

## Summary

This PR incorporated the mining difficulty into the claim reward
calculation.
* Encapsulates the claimed tokens into a `claim.GetClaimeduPOKT(params,
difficulty)`
* Implements a test to assert that the difficulty based rewards are
proportional to the off-chain relays served.
* Removes unused `min_relay_difficulty_bits` gov. param.

It is based on the preparation work of PR #836.

## Issue

- #781 
- #758 

## Type of change

Select one or more from the following:

- [x] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Testing

- [x] **Unit Tests**: `make go_develop_and_test`
- [x] **LocalNet E2E Tests**: `make test_e2e`
- [ ] **DevNet E2E Tests**: Add the `devnet-test-e2e` label to the PR.

## Sanity Checklist

- [x] I have tested my changes using the available tooling
- [x] I have commented my code
- [x] I have performed a self-review of my own code; both comments &
source code
- [ ] I create and reference any new tickets, if applicable
- [x] I have left TODOs throughout the codebase, if applicable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on-chain On-chain business logic scalability tokenomics Token Economics - what else do you need?
Projects
Status: ✅ Done
Development

No branches or pull requests

2 participants