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

chore!: rename payment module -> blob #972

Merged
merged 2 commits into from
Nov 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ rm -r ~/.celestia-app
./scripts/single-node.sh

# Post data to the local devnet
celestia-appd tx payment payForData [hexNamespace] [hexMessage] [flags]
celestia-appd tx blob payForData [hexNamespace] [hexMessage] [flags]
```

<!-- markdown-link-check-disable -->
Expand Down
28 changes: 14 additions & 14 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ import (

"github.com/celestiaorg/celestia-app/app/encoding"
"github.com/celestiaorg/celestia-app/pkg/prove"
paymentmodule "github.com/celestiaorg/celestia-app/x/payment"
paymentmodulekeeper "github.com/celestiaorg/celestia-app/x/payment/keeper"
paymentmoduletypes "github.com/celestiaorg/celestia-app/x/payment/types"
blobmodule "github.com/celestiaorg/celestia-app/x/blob"
blobmodulekeeper "github.com/celestiaorg/celestia-app/x/blob/keeper"
blobmoduletypes "github.com/celestiaorg/celestia-app/x/blob/types"

qgbmodule "github.com/celestiaorg/celestia-app/x/qgb"
qgbmodulekeeper "github.com/celestiaorg/celestia-app/x/qgb/keeper"
Expand Down Expand Up @@ -144,7 +144,7 @@ var (
evidence.AppModuleBasic{},
// transfer.AppModuleBasic{},
vesting.AppModuleBasic{},
paymentmodule.AppModuleBasic{},
blobmodule.AppModuleBasic{},
qgbmodule.AppModuleBasic{},
)

Expand Down Expand Up @@ -217,8 +217,8 @@ type App struct {
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
ScopedTransferKeeper capabilitykeeper.ScopedKeeper

PaymentKeeper paymentmodulekeeper.Keeper
QgbKeeper qgbmodulekeeper.Keeper
BlobKeeper blobmodulekeeper.Keeper
QgbKeeper qgbmodulekeeper.Keeper

// the module manager
mm *module.Manager
Expand Down Expand Up @@ -251,7 +251,7 @@ func New(
minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey,
govtypes.StoreKey, paramstypes.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey,
evidencetypes.StoreKey, capabilitytypes.StoreKey,
paymentmoduletypes.StoreKey,
blobmoduletypes.StoreKey,
qgbmoduletypes.StoreKey,
// ibctransfertypes.StoreKey,
// ibchost.StoreKey,
Expand Down Expand Up @@ -365,10 +365,10 @@ func New(
&stakingKeeper, govRouter, app.msgSvcRouter, govConfig,
)

app.PaymentKeeper = *paymentmodulekeeper.NewKeeper(
app.BlobKeeper = *blobmodulekeeper.NewKeeper(
appCodec,
)
paymentmod := paymentmodule.NewAppModule(appCodec, app.PaymentKeeper)
blobmod := blobmodule.NewAppModule(appCodec, app.BlobKeeper)

// // Create static IBC router, add transfer route, then set and seal it
// ibcRouter := ibcporttypes.NewRouter()
Expand Down Expand Up @@ -405,7 +405,7 @@ func New(
// ibc.NewAppModule(app.IBCKeeper),
params.NewAppModule(app.ParamsKeeper),
// transferModule,
paymentmod,
blobmod,
qgbmod,
)

Expand All @@ -428,7 +428,7 @@ func New(
crisistypes.ModuleName,
govtypes.ModuleName,
genutiltypes.ModuleName,
paymentmoduletypes.ModuleName,
blobmoduletypes.ModuleName,
qgbmoduletypes.ModuleName,
paramstypes.ModuleName,
vestingtypes.ModuleName,
Expand All @@ -449,7 +449,7 @@ func New(
authtypes.ModuleName,
banktypes.ModuleName,
genutiltypes.ModuleName,
paymentmoduletypes.ModuleName,
blobmoduletypes.ModuleName,
qgbmoduletypes.ModuleName,
paramstypes.ModuleName,
vestingtypes.ModuleName,
Expand All @@ -474,7 +474,7 @@ func New(
genutiltypes.ModuleName,
evidencetypes.ModuleName,
// ibctransfertypes.ModuleName,
paymentmoduletypes.ModuleName,
blobmoduletypes.ModuleName,
qgbmoduletypes.ModuleName,
vestingtypes.ModuleName,
feegrant.ModuleName,
Expand Down Expand Up @@ -670,7 +670,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(crisistypes.ModuleName)
// paramsKeeper.Subspace(ibctransfertypes.ModuleName)
// paramsKeeper.Subspace(ibchost.ModuleName)
paramsKeeper.Subspace(paymentmoduletypes.ModuleName)
paramsKeeper.Subspace(blobmoduletypes.ModuleName)
paramsKeeper.Subspace(qgbmoduletypes.ModuleName)

return paramsKeeper
Expand Down
2 changes: 1 addition & 1 deletion app/estimate_square_size_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/celestiaorg/celestia-app/pkg/appconsts"
"github.com/celestiaorg/celestia-app/pkg/shares"
"github.com/celestiaorg/celestia-app/testutil/namespace"
"github.com/celestiaorg/celestia-app/x/payment/types"
"github.com/celestiaorg/celestia-app/x/blob/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion app/malleate_txs.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sort"

"github.com/celestiaorg/celestia-app/pkg/shares"
"github.com/celestiaorg/celestia-app/x/payment/types"
"github.com/celestiaorg/celestia-app/x/blob/types"
"github.com/cosmos/cosmos-sdk/client"
core "github.com/tendermint/tendermint/proto/tendermint/types"
)
Expand Down
2 changes: 1 addition & 1 deletion app/parse_txs.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"errors"

"github.com/celestiaorg/celestia-app/app/encoding"
"github.com/celestiaorg/celestia-app/x/payment/types"
"github.com/celestiaorg/celestia-app/x/blob/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/x/auth/signing"
core "github.com/tendermint/tendermint/proto/tendermint/types"
Expand Down
2 changes: 1 addition & 1 deletion app/process_proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/celestiaorg/celestia-app/pkg/da"
"github.com/celestiaorg/celestia-app/pkg/inclusion"
"github.com/celestiaorg/celestia-app/pkg/shares"
"github.com/celestiaorg/celestia-app/x/payment/types"
"github.com/celestiaorg/celestia-app/x/blob/types"
"github.com/celestiaorg/rsmt2d"
sdk "github.com/cosmos/cosmos-sdk/types"
abci "github.com/tendermint/tendermint/abci/types"
Expand Down
6 changes: 3 additions & 3 deletions app/test/block_size_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"github.com/celestiaorg/celestia-app/pkg/appconsts"
"github.com/celestiaorg/celestia-app/testutil/namespace"
"github.com/celestiaorg/celestia-app/testutil/network"
"github.com/celestiaorg/celestia-app/x/payment"
"github.com/celestiaorg/celestia-app/x/payment/types"
blob "github.com/celestiaorg/celestia-app/x/blob"
"github.com/celestiaorg/celestia-app/x/blob/types"
abci "github.com/tendermint/tendermint/abci/types"
tmrand "github.com/tendermint/tendermint/libs/rand"
rpctypes "github.com/tendermint/tendermint/rpc/core/types"
Expand Down Expand Up @@ -219,7 +219,7 @@ func (s *IntegrationTestSuite) TestSubmitWirePayForData() {
for _, tc := range tests {
s.Run(tc.name, func() {
signer := types.NewKeyringSigner(s.kr, s.accounts[0], val.ClientCtx.ChainID)
res, err := payment.SubmitPayForData(context.TODO(), signer, val.ClientCtx.GRPCClient, tc.ns, tc.message, 10000000, tc.opts...)
res, err := blob.SubmitPayForData(context.TODO(), signer, val.ClientCtx.GRPCClient, tc.ns, tc.message, 10000000, tc.opts...)
require.NoError(err)
require.NotNil(res)
assert.Equal(abci.CodeTypeOK, res.Code)
Expand Down
2 changes: 1 addition & 1 deletion app/test/fuzz_abci_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/celestiaorg/celestia-app/app"
"github.com/celestiaorg/celestia-app/app/encoding"
"github.com/celestiaorg/celestia-app/testutil"
paytestutil "github.com/celestiaorg/celestia-app/testutil/payment"
paytestutil "github.com/celestiaorg/celestia-app/testutil/blob"
"github.com/stretchr/testify/require"
abci "github.com/tendermint/tendermint/abci/types"
tmrand "github.com/tendermint/tendermint/libs/rand"
Expand Down
2 changes: 1 addition & 1 deletion app/test/prepare_proposal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/celestiaorg/celestia-app/app/encoding"
"github.com/celestiaorg/celestia-app/pkg/appconsts"
"github.com/celestiaorg/celestia-app/testutil"
"github.com/celestiaorg/celestia-app/x/payment/types"
"github.com/celestiaorg/celestia-app/x/blob/types"
)

func TestPrepareProposal(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions app/test/process_proposal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
"github.com/celestiaorg/celestia-app/app/encoding"
"github.com/celestiaorg/celestia-app/pkg/appconsts"
"github.com/celestiaorg/celestia-app/testutil"
paytestutil "github.com/celestiaorg/celestia-app/testutil/payment"
"github.com/celestiaorg/celestia-app/x/payment/types"
paytestutil "github.com/celestiaorg/celestia-app/testutil/blob"
"github.com/celestiaorg/celestia-app/x/blob/types"
"github.com/celestiaorg/nmt/namespace"
sdk "github.com/cosmos/cosmos-sdk/types"
)
Expand Down
2 changes: 1 addition & 1 deletion app/test_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/celestiaorg/celestia-app/app/encoding"
"github.com/celestiaorg/celestia-app/testutil/namespace"
"github.com/celestiaorg/celestia-app/x/payment/types"
"github.com/celestiaorg/celestia-app/x/blob/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/crypto/hd"
Expand Down
4 changes: 2 additions & 2 deletions proto/payment/genesis.proto → proto/blob/genesis.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package payment;
package blob;

option go_package = "github.com/celestiaorg/celestia-app/x/payment/types";
option go_package = "github.com/celestiaorg/celestia-app/x/blob/types";

// GenesisState defines the capability module's genesis state.
message GenesisState {}
4 changes: 2 additions & 2 deletions proto/payment/query.proto → proto/blob/query.proto
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
syntax = "proto3";
package payment;
package blob;

import "google/api/annotations.proto";
import "cosmos/base/query/v1beta1/pagination.proto";

option go_package = "github.com/celestiaorg/celestia-app/x/payment/types";
option go_package = "github.com/celestiaorg/celestia-app/x/blob/types";

// Query defines the gRPC querier service.
service Query {}
8 changes: 4 additions & 4 deletions proto/payment/tx.proto → proto/blob/tx.proto
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
syntax = "proto3";
package payment;
package blob;

import "gogoproto/gogo.proto";
import "google/api/annotations.proto";

option go_package = "github.com/celestiaorg/celestia-app/x/payment/types";
option go_package = "github.com/celestiaorg/celestia-app/x/blob/types";

// Msg defines the payment Msg service.
// Msg defines the blob Msg service.
service Msg {
// PayForData allows the user to pay for the inclusion of a message
rpc PayForData(MsgPayForData) returns (MsgPayForDataResponse) {
option (google.api.http).get = "/celestia/payment/payfordata";
option (google.api.http).get = "/celestia/blob/payfordata";
}
}

Expand Down
4 changes: 2 additions & 2 deletions testutil/payment/testutil.go → testutil/blob/testutil.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package paytestutil
package blobtestutil

import (
"testing"

"github.com/celestiaorg/celestia-app/app"
"github.com/celestiaorg/celestia-app/testutil/namespace"
"github.com/celestiaorg/celestia-app/x/payment/types"
"github.com/celestiaorg/celestia-app/x/blob/types"
"github.com/cosmos/cosmos-sdk/client"
sdk "github.com/cosmos/cosmos-sdk/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
Expand Down
2 changes: 1 addition & 1 deletion testutil/test_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/celestiaorg/celestia-app/app"
"github.com/celestiaorg/celestia-app/app/encoding"
"github.com/celestiaorg/celestia-app/x/payment/types"
"github.com/celestiaorg/celestia-app/x/blob/types"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/codec"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
Expand Down
8 changes: 4 additions & 4 deletions testutil/testnode/node_interaction_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

"github.com/celestiaorg/celestia-app/pkg/appconsts"
"github.com/celestiaorg/celestia-app/testutil/namespace"
"github.com/celestiaorg/celestia-app/x/payment"
"github.com/celestiaorg/celestia-app/x/payment/types"
blob "github.com/celestiaorg/celestia-app/x/blob"
"github.com/celestiaorg/celestia-app/x/blob/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -113,7 +113,7 @@ func (c *Context) PostData(account, broadcastMode string, ns, msg []byte) (*sdk.
signer.SetSequence(seq)

// create a random msg per row
pfd, err := payment.BuildPayForData(
pfd, err := blob.BuildPayForData(
c.rootCtx,
signer,
c.GRPCClient,
Expand All @@ -125,7 +125,7 @@ func (c *Context) PostData(account, broadcastMode string, ns, msg []byte) (*sdk.
return nil, err
}

signed, err := payment.SignPayForData(signer, pfd, opts...)
signed, err := blob.SignPayForData(signer, pfd, opts...)
if err != nil {
return nil, err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package cli
import (
"fmt"

"github.com/celestiaorg/celestia-app/x/payment/types"
"github.com/celestiaorg/celestia-app/x/blob/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/spf13/cobra"
)

// GetQueryCmd returns the CLI query commands for this module
func GetQueryCmd(queryRoute string) *cobra.Command {
// Group payment queries under a subcommand
// Group blob queries under a subcommand
cmd := &cobra.Command{
Use: types.ModuleName,
Short: fmt.Sprintf("Querying commands for the %s module", types.ModuleName),
Expand Down
2 changes: 1 addition & 1 deletion x/payment/client/cli/tx.go → x/blob/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"time"

"github.com/celestiaorg/celestia-app/x/payment/types"
"github.com/celestiaorg/celestia-app/x/blob/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/spf13/cobra"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/spf13/cobra"

"github.com/celestiaorg/celestia-app/x/payment/types"
"github.com/celestiaorg/celestia-app/x/blob/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/tx"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
cosmosnet "github.com/cosmos/cosmos-sdk/testutil/network"
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/celestiaorg/celestia-app/x/payment/types"
"github.com/celestiaorg/celestia-app/x/blob/types"

"github.com/celestiaorg/celestia-app/testutil/network"
paycli "github.com/celestiaorg/celestia-app/x/payment/client/cli"
paycli "github.com/celestiaorg/celestia-app/x/blob/client/cli"
authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli"
)

Expand Down
4 changes: 2 additions & 2 deletions x/payment/doc.go → x/blob/doc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// payment is a Cosmos SDK module that enables users to pay for data to be
// blob is a Cosmos SDK module that enables users to pay for data to be
// published to the Celestia blockchain. Please see ./specs/docs.md for the full
// specification of this module.
package payment
package blob
6 changes: 3 additions & 3 deletions x/payment/genesis.go → x/blob/genesis.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package payment
package blob

import (
"github.com/celestiaorg/celestia-app/x/payment/keeper"
"github.com/celestiaorg/celestia-app/x/payment/types"
"github.com/celestiaorg/celestia-app/x/blob/keeper"
"github.com/celestiaorg/celestia-app/x/blob/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)

Expand Down
8 changes: 4 additions & 4 deletions x/payment/handler.go → x/blob/handler.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package payment
package blob

import (
"fmt"

"github.com/celestiaorg/celestia-app/x/payment/keeper"
"github.com/celestiaorg/celestia-app/x/payment/types"
"github.com/celestiaorg/celestia-app/x/blob/keeper"
"github.com/celestiaorg/celestia-app/x/blob/types"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)

// NewHandler uses the provided payment keeper to create an sdk.Handler
// NewHandler uses the provided blob keeper to create an sdk.Handler
func NewHandler(k keeper.Keeper) sdk.Handler {
msgServer := keeper.NewMsgServerImpl(k)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package keeper
import (
"testing"

"github.com/celestiaorg/celestia-app/x/payment/types"
"github.com/celestiaorg/celestia-app/x/blob/types"
"github.com/cosmos/cosmos-sdk/simapp"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/require"
Expand Down
Loading