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

Feat/payable proof submission #780

Merged
merged 11 commits into from
Sep 6, 2024
Merged

Feat/payable proof submission #780

merged 11 commits into from
Sep 6, 2024

Conversation

red-0ne
Copy link
Contributor

@red-0ne red-0ne commented Sep 2, 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.

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 on-chain On-chain business logic proof Claim & Proof life cycle labels Sep 2, 2024
@red-0ne red-0ne self-assigned this Sep 2, 2024
@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.

Just a couple small changes but approving pre-emtively. Great work again!

e2e/tests/session_steps_test.go Show resolved Hide resolved
e2e/tests/session_steps_test.go Outdated Show resolved Hide resolved
// an adjustment the current balance to account for the proof submission fee
// is needed so validateAmountChange can assert on the reward change with the
// given condition.
if msgType == "SubmitProof" {
Copy link
Member

Choose a reason for hiding this comment

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

I see what you're doing here, but this is a "hidden side effect".

I think you should just either:

  1. Add a step call EnsureBalanceIsHighEnoughForProofSubmission
    OR
  2. Update the default configs of LocalNet to give everyone high enough balances that this doesn't matter

My preference is (2).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is actually not about having enough funds.

It is to make the step Then the account balance of "supplier1" should be "420" uPOKT "more" than before succeed without making it more complicated

  • fee > reward -> lower balance
  • proof not required -> no fee
  • step needing to know about previous ones
  • ...

There's actually an elegant solution without side effect.
Take a snapshot of the balance after the proof submission.

e2e/tests/session_steps_test.go Outdated Show resolved Hide resolved
testutil/integration/app.go Outdated Show resolved Hide resolved
x/proof/keeper/msg_server_submit_proof.go Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Sep 6, 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 780)
Grafana network dashboard for devnet-issue-780

@github-actions github-actions bot added devnet push-image CI related - pushes images to ghcr.io labels Sep 6, 2024
@red-0ne red-0ne changed the base branch from feat/proof-submission-fee-param to main September 6, 2024 02:22
@red-0ne red-0ne merged commit dc0b35f into main Sep 6, 2024
10 checks passed
bryanchriswhite added a commit that referenced this pull request Sep 9, 2024
…eriod-param' into issues/657/chore/app-transfer-period

* pokt/issues/657/refactor/transfer-msg_period-param:
  chore: review feedback improvements
  Feat/payable proof submission (#780)
  [Proof] Proof submission fee param (#779)
  [Service] Align add service fee param with other params implementation (#778)
  [Docs] how to create a new release (#783)
  [Dependencies] Bump go and cosmos-sdk (#797)
  [Small PR][CI] Add check for stable marshalers (#784)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devnet devnet-test-e2e on-chain On-chain business logic proof Claim & Proof life cycle push-image CI related - pushes images to ghcr.io
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants