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

[Migration] Supplier module #373

Closed

Conversation

bryanchriswhite
Copy link
Contributor

@bryanchriswhite bryanchriswhite commented Feb 8, 2024

Summary

Human Summary

This branch applies the steps outlined in the migration guide notion doc under the "Module Bootstrapping > Supplier Module" section. To be merged after #385 has been approved.

Issue

Type of change

Select one or more:

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Documentation
  • Other (specify): Module migration to rollkit/cosmos-sdk v0.50.x

Testing

  • Run all unit tests: make go_develop_and_test
  • Run E2E tests locally: make test_e2e
  • Run E2E tests on DevNet: Add the devnet-test-e2e label to the PR. This is VERY expensive, only do it after all the reviews are complete.

Sanity Checklist

  • I have tested my changes using the available tooling
  • I have performed a self-review of my own code
  • I have commented my code, updated documentation and left TODOs throughout the codebase

@bryanchriswhite bryanchriswhite added supplier Changes related to the Supplier actor code health Cleans up some code labels Feb 8, 2024
@bryanchriswhite bryanchriswhite added this to the Shannon TestNet milestone Feb 8, 2024
@bryanchriswhite bryanchriswhite self-assigned this Feb 8, 2024
@bryanchriswhite bryanchriswhite force-pushed the migration/supplier-module branch 2 times, most recently from d5c8df4 to a9915b4 Compare February 9, 2024 04:35
@bryanchriswhite bryanchriswhite force-pushed the migration/mock/session-module branch from 6363e86 to 6569969 Compare February 9, 2024 06:16
@bryanchriswhite bryanchriswhite force-pushed the migration/supplier-module branch from a9915b4 to 1fd29b1 Compare February 9, 2024 06:16
@bryanchriswhite bryanchriswhite mentioned this pull request Feb 12, 2024
11 tasks
@bryanchriswhite bryanchriswhite force-pushed the migration/supplier-module branch from 1fd29b1 to ea17505 Compare February 12, 2024 09:20
@bryanchriswhite bryanchriswhite force-pushed the migration/supplier-module branch 2 times, most recently from 356dbdc to f891ac8 Compare February 14, 2024 12:34
@bryanchriswhite bryanchriswhite changed the base branch from migration/mock/session-module to migration/service-module February 14, 2024 12:34
@bryanchriswhite bryanchriswhite force-pushed the migration/supplier-module branch from 45763f2 to 4396b69 Compare February 14, 2024 12:43
@bryanchriswhite bryanchriswhite marked this pull request as ready for review February 14, 2024 12:51
proto/poktroll/shared/supplier.proto Show resolved Hide resolved
proto/poktroll/shared/supplier.proto Outdated Show resolved Hide resolved
proto/poktroll/supplier/genesis.proto Outdated Show resolved Hide resolved
proto/poktroll/supplier/genesis.proto Outdated Show resolved Hide resolved
import "amino/amino.proto";
import "gogoproto/gogo.proto";

option go_package = "github.com/pokt-network/poktroll/x/supplier/types";
Copy link
Contributor

Choose a reason for hiding this comment

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

We should be consistent and decide to whether put go_package above or below imports

"github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
"github.com/pokt-network/poktroll/x/supplier/keeper"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"github.com/pokt-network/poktroll/x/supplier/keeper"
"github.com/pokt-network/poktroll/x/supplier/keeper"


// x/supplier module sentinel errors
var (
ErrSupplierInvalidStake = sdkerrors.Register(ModuleName, 1, "invalid supplier stake")
Copy link
Contributor

Choose a reason for hiding this comment

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

Align with the module's error numbers as low numbers may be reserved.

ErrSupplierProofNotFound = sdkerrors.Register(ModuleName, 13, "proof not found")
ErrSupplierInvalidProof = sdkerrors.Register(ModuleName, 14, "invalid proof")
ErrSupplierInvalidClosestMerkleProof = sdkerrors.Register(ModuleName, 15, "invalid closest merkle proof")
ErrInvalidSigner = sdkerrors.Register(ModuleName, 1100, "expected gov account as only signer for proposal message")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ErrInvalidSigner = sdkerrors.Register(ModuleName, 1100, "expected gov account as only signer for proposal message")
ErrSupplierInvalidSigner = sdkerrors.Register(ModuleName, 1100, "expected gov account as only signer for proposal message")

@@ -0,0 +1,21 @@
package types
Copy link
Contributor

Choose a reason for hiding this comment

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

We should rename to message_update_params.go for consistency.

@@ -0,0 +1 @@
package types
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
package types
package types
// This file is in place to declare the package for dynamically generated protobufs

@red-0ne red-0ne force-pushed the migration/supplier-module branch from 13fae74 to 91be215 Compare February 21, 2024 18:49
@red-0ne red-0ne force-pushed the migration/supplier-module branch from 91be215 to d5cb487 Compare February 21, 2024 19:13
@red-0ne red-0ne force-pushed the migration/supplier-module branch from d5cb487 to 62feb1d Compare February 21, 2024 19:26
@red-0ne red-0ne changed the base branch from migration/service-module to migration/service-x-gateway February 21, 2024 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code health Cleans up some code supplier Changes related to the Supplier actor
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants