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

[Load Testing] Permissionless Demand Implementation Umbrella Ticket #758

Open
9 of 23 tasks
Olshansk opened this issue Aug 23, 2024 · 0 comments
Open
9 of 23 tasks
Assignees
Labels
on-chain On-chain business logic scalability

Comments

@Olshansk
Copy link
Member

Olshansk commented Aug 23, 2024

Objective

Ensure there will not be any scalability issues in Shannon.

This is done by:

  • Avoiding free loaders (suppliers that don't submit proofs for claims)
  • Keeping blocks size small
  • Creating incentives & disincentives to submit proofs
  • Enabling unlimited number of services & apps

Origin Document

Screenshot 2024-08-23 at 10 02 45 PM Screenshot 2024-08-23 at 9 53 06 PM

Goals

  • Understand missing gaps in the implementation of probabilistic proofs on both the supply (relayer) side & consensus (validator) side
  • Implement everything necessary to make sure Shannon demand side scales scales
  • Identify MUST have TODO for mainnet
  • Come up with new ideas to improve the overall design while keeping things simple
  • Update the documentation so all readers and ecosystem participants understand how things work
  • Keep iterations and PRs small because the scope of this can get out of hand

Deliverables

  • Ensure the ProofParams is used and reflected in the RelayMiner. It doesn't seem these are being used:

     type ProofParams interface {
     	GetRelayDifficultyTargetHash() []byte
     	GetProofRequestProbability() float32
     	GetProofRequirementThreshold() uint64
     	GetProofMissingPenalty() *cosmostypes.Coin
     }
  • Increase the tx fee of the SubmitProof msg so it's larger than a simple send

  • @Olshansk to build documentation for this. Specifically:

    • Probabilistic proofs in the Shannon. Tokenomics and incentives.
    • All the slashing conditions. Specifically, missing proofs.
    • Design & document feedback loop between Relay Mining & Probabilistic Proofs
    • Research & document whether proof_requirement_threshold needs to be a function of supplier stake. Look into x/tokenomics/keeper/settle_pending_claims.go
    • Penalize / slash the supplier if a proof is required but not available. Note: you need to determine what the slashing amount should be.
  • Implement the Relay Mining & Probabilistic Proof multiplier + closed loop systems

  • Implement the supplier stake <> proof requirement threshold closed loop system

  • Implement slashing for missing proofs [Supplier] Initial slashing implementation #795

  • Look for TODOs in the code that call out SparseCompactClosestProof

  • Exploratory: Review all the probabilistic proof parameters and make sure they adjust dynamically based on the volume, similar to relay mining.

Non-goals / Non-deliverables

  • The following are requirements of [LoadTesting] Permissionless Demand Load Testing #711 being built by @okdas
    • Build the tooling for these load tests
    • Building observability tools for these tests
    • Gain an understanding into the block size
    • Get visibility
  • Diagrams that will be needed but outside of the scope:
    • Line charts showing:
      • Block size (in MB)
      • Num proofs per block
      • Total number of relays in network
    • Double bar chart showing average number of proof per application AND per service
    • Relay mining difficulty per service (already have this but make it more accessible)
      • Same chart needs to show what the multiplier looks like

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

@Olshansk Olshansk added on-chain On-chain business logic scalability labels Aug 23, 2024
@Olshansk Olshansk added this to the Shannon Beta TestNet Launch milestone Aug 23, 2024
@Olshansk Olshansk changed the title [Load Testing] Permissionless Demand Implementation Umbrella Ticket [WIP][Load Testing] Permissionless Demand Implementation Umbrella Ticket Aug 23, 2024
@Olshansk Olshansk changed the title [WIP][Load Testing] Permissionless Demand Implementation Umbrella Ticket [Load Testing] Permissionless Demand Implementation Umbrella Ticket Aug 24, 2024
@Olshansk Olshansk self-assigned this Aug 26, 2024
@Olshansk Olshansk removed their assignment Sep 3, 2024
red-0ne added a commit that referenced this issue Sep 6, 2024
## Summary

This PR adds `ProofSubmissionFee` governance param as a `Coin` type.

It is based on PR #778 

## Issue

Proof messages take up a lot of block space. We need to deter submitting
unnecessary ones by making their submission payable by a governance
adjusted parameter.

The current PR is only about adding the governance param. The feature
itself will be submitted as a follow-up PR.

- #758 

## Type of change

Select one or more:

- [x] New feature, functionality or library
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Testing

- [ ] **Documentation**: `make docusaurus_start`; only needed if you
make doc changes
- [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
red-0ne added a commit that referenced this issue Sep 6, 2024
## Summary

This PR implements payable proof submission given the proof submission
governance param.

This is a follow-up feature PR to #779 which adds the proof submission
governance param.

## Issue

Proof messages take up significant block space. We need to deter
submitting non-required ones by making proof submission payable by a
governance adjusted parameter.

- #758 

## Type of change

Select one or more:

- [x] New feature, functionality or library
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Testing

- [ ] **Documentation**: `make docusaurus_start`; only needed if you
make doc changes
- [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
red-0ne added a commit that referenced this issue Sep 6, 2024
## Summary

This PR introduces the proof params to the `RelayMiner` so it does not
submit proofs when not required.

The E2E and `SessionManager` tests have been updated to account for
proof requirement.

## Issue

The `RelayMiner`'s `SessionManager` was systematically submitting proofs
on-chain whether they were required or not.

This led to a state chain bloat since proofs are what takes most for the
block space.

Given the permissionless nature of the protocol, this causing
scalability issues.

- #758 

## Type of change

Select one or more:

- [x] New feature, functionality or library
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Testing

- [ ] **Documentation**: `make docusaurus_start`; only needed if you
make doc changes
- [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: Daniel Olshansky <olshansky.daniel@gmail.com>
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
Projects
Status: 🏗 In progress
Development

No branches or pull requests

2 participants