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

[SessionManager] Implement off-chain proof params usage #765

Merged
merged 16 commits into from
Sep 6, 2024

Conversation

red-0ne
Copy link
Contributor

@red-0ne red-0ne commented Aug 27, 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.

Type of change

Select one or more:

  • 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
  • Unit Tests: make go_develop_and_test
  • LocalNet E2E Tests: make test_e2e
  • DevNet E2E Tests: Add the devnet-test-e2e label to the PR.

Sanity Checklist

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

@red-0ne red-0ne added relayminer Changes related to the Relayminer off-chain Off-chain business logic labels Aug 27, 2024
@red-0ne red-0ne self-assigned this Aug 27, 2024
Copy link
Contributor

@bryanchriswhite bryanchriswhite left a comment

Choose a reason for hiding this comment

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

🙌 Nice one @red-0ne!

e2e/tests/session_steps_test.go Outdated Show resolved Hide resolved
e2e/tests/0_settlement.feature Outdated Show resolved Hide resolved
e2e/tests/0_settlement.feature Outdated Show resolved Hide resolved
e2e/tests/0_settlement.feature Outdated Show resolved Hide resolved
e2e/tests/session.feature Outdated Show resolved Hide resolved
pkg/relayer/session/claim.go Outdated Show resolved Hide resolved
pkg/relayer/session/claim.go Outdated Show resolved Hide resolved
pkg/relayer/session/claim.go Outdated Show resolved Hide resolved
pkg/relayer/session/session_test.go Show resolved Hide resolved
pkg/relayer/session/session.go Outdated Show resolved Hide resolved
testutil/testclient/testsupplier/client.go Show resolved Hide resolved
pkg/relayer/session/session_test.go Show resolved Hide resolved
pkg/relayer/session/session_test.go Outdated Show resolved Hide resolved
e2e/tests/0_settlement.feature Outdated Show resolved Hide resolved
pkg/relayer/session/claim.go Outdated Show resolved Hide resolved
pkg/relayer/session/claim.go Outdated Show resolved Hide resolved
pkg/relayer/session/claim.go Outdated Show resolved Hide resolved
pkg/relayer/session/claim.go Outdated Show resolved Hide resolved
pkg/relayer/session/claim.go Outdated Show resolved Hide resolved
@red-0ne red-0ne requested a review from Olshansk August 30, 2024 04:58
@Olshansk Olshansk added this to the Shannon Beta TestNet Launch milestone Sep 3, 2024
Copy link
Member

@Olshansk Olshansk left a comment

Choose a reason for hiding this comment

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

Great job. Let's get this in!

x/proof/types/params.go Outdated Show resolved Hide resolved
testutil/testclient/testsupplier/client.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/settle_pending_claims.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/settle_pending_claims.go Outdated Show resolved Hide resolved
pkg/relayer/session/claim.go Outdated Show resolved Hide resolved
pkg/relayer/session/proof.go Show resolved Hide resolved
pkg/relayer/session/proof.go Outdated Show resolved Hide resolved
pkg/relayer/session/session_test.go Show resolved Hide resolved
pkg/relayer/session/session_test.go Show resolved Hide resolved
pkg/relayer/session/session_test.go Show resolved Hide resolved
Copy link

github-actions bot commented Sep 5, 2024

The CI will now also run the e2e tests on devnet, which increases the time it takes to complete all CI checks.

You may need to run make trigger_ci to submit an empty commit that'll trigger the tests.

GCP workloads (requires changing the namespace to 765)
Grafana network dashboard for devnet-issue-765

@github-actions github-actions bot added devnet push-image CI related - pushes images to ghcr.io labels Sep 5, 2024
e2e/tests/0_settlement.feature Show resolved Hide resolved
pkg/relayer/session/proof.go Outdated Show resolved Hide resolved

// isProofRequired determines whether a proof is required for the given session's
// claim based on the current proof module governance parameters.
// TODO_TECHDEBT: Once the on/off-chain loggers are unified, move this logic to
Copy link
Member

Choose a reason for hiding this comment

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

Is it overkill to just pass a logger, unify it now, and add a TECHDEBT explaining why we pas sin a logger?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The on-chain logger cosmossdk.io/log and off-chain one github.com/pokt-network/poktroll/pkg/polylog seem to be incompatible.

I'm maybe missing something but we can't pass in a logger in both on/off-chain.

Copy link
Member

Choose a reason for hiding this comment

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

Did you confirm that this doesn't work?

I believe this is the problem polylog was meant to solve. cc @bryanchriswhite

Screenshot 2024-09-06 at 3 38 18 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried, but had the following:
image

Will sync-up with @bryanchriswhite on this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the comments to include investigation.

Copy link
Contributor

Choose a reason for hiding this comment

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

x/proof/types/params.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/settle_pending_claims.go Outdated Show resolved Hide resolved
x/tokenomics/keeper/settle_pending_claims.go Show resolved Hide resolved
x/proof/types/claim.go Outdated Show resolved Hide resolved
x/proof/types/claim.go Outdated Show resolved Hide resolved
x/proof/types/claim.go Outdated Show resolved Hide resolved
Copy link
Member

@Olshansk Olshansk left a comment

Choose a reason for hiding this comment

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

@red-0ne Left a couple more comments. Please review and update TODOs accordingly. Feel free to merge in after.

Approving pre-emtively.

@red-0ne red-0ne dismissed bryanchriswhite’s stale review September 6, 2024 23:13

Already discussed with Bryan about the changes that came after his last review.

@red-0ne red-0ne merged commit 893e181 into main Sep 6, 2024
10 checks passed
bryanchriswhite added a commit that referenced this pull request Sep 16, 2024
…ke-transfer

* pokt/main:
  [Tooling, Code Health] refactor: split Makefile into multiple files (#816)
  [Tooling] fix and add makefile targets (#814)
  [Docs] Add a debugging tip: using transaction hashes (#786)
  [Refactor] Replace embedded Service with ServiceId (#802)
  [Session,Service] Ensure SessionHeader and Service basic validation. (#782)
  [Tokenomics] Preparation for Global Mint Reimbursement Request (#755)
  [Quick PR][LocalNet] Turn off minimum-gas-prices (#805)
  [GATEWAY POC] A couple helpers to help deploy a PATH gateway (#801)
  [Documentation] Cosmovisor  (#768)
  [CI] Add cosmovisor to container images (#796)
  Use a descriptive error if service ID is not found (#787)
  [SessionManager] Implement off-chain proof params usage (#765)
  [SDK] Update shannon sdk dependency (#800)
  [E2E Test] Remove redundant logging (#798)
bryanchriswhite added a commit that referenced this pull request Sep 16, 2024
…actor/transfer-msg_period-param

* issues/657/feat/app-stake-transfer:
  [Tooling, Code Health] refactor: split Makefile into multiple files (#816)
  [Tooling] fix and add makefile targets (#814)
  [Docs] Add a debugging tip: using transaction hashes (#786)
  [Refactor] Replace embedded Service with ServiceId (#802)
  [Session,Service] Ensure SessionHeader and Service basic validation. (#782)
  [Tokenomics] Preparation for Global Mint Reimbursement Request (#755)
  [Quick PR][LocalNet] Turn off minimum-gas-prices (#805)
  [GATEWAY POC] A couple helpers to help deploy a PATH gateway (#801)
  [Documentation] Cosmovisor  (#768)
  [CI] Add cosmovisor to container images (#796)
  Use a descriptive error if service ID is not found (#787)
  [SessionManager] Implement off-chain proof params usage (#765)
  [SDK] Update shannon sdk dependency (#800)
  [E2E Test] Remove redundant logging (#798)
bryanchriswhite added a commit that referenced this pull request Sep 16, 2024
…ues/657/chore/app-transfer-period

* issues/657/refactor/transfer-msg_period-param:
  [Tooling, Code Health] refactor: split Makefile into multiple files (#816)
  [Tooling] fix and add makefile targets (#814)
  [Docs] Add a debugging tip: using transaction hashes (#786)
  [Refactor] Replace embedded Service with ServiceId (#802)
  [Session,Service] Ensure SessionHeader and Service basic validation. (#782)
  [Tokenomics] Preparation for Global Mint Reimbursement Request (#755)
  [Quick PR][LocalNet] Turn off minimum-gas-prices (#805)
  [GATEWAY POC] A couple helpers to help deploy a PATH gateway (#801)
  [Documentation] Cosmovisor  (#768)
  [CI] Add cosmovisor to container images (#796)
  Use a descriptive error if service ID is not found (#787)
  [SessionManager] Implement off-chain proof params usage (#765)
  [SDK] Update shannon sdk dependency (#800)
  [E2E Test] Remove redundant logging (#798)
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devnet devnet-test-e2e off-chain Off-chain business logic push-image CI related - pushes images to ghcr.io relayminer Changes related to the Relayminer
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants