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 qgb to blobstream #2639

Merged
merged 18 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from 14 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 .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# owner is fully deferring ownership to the directory owner
docs @liamsi @adlerjohn @evan-forbes @rootulp @cmwaters
specs @liamsi @adlerjohn @evan-forbes @rootulp @cmwaters
x/qgb @SweeXordious @evan-forbes
x/blobstream @SweeXordious @evan-forbes
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ test-race:
# TODO: Remove the -skip flag once the following tests no longer contain data races.
# https://github.com/celestiaorg/celestia-app/issues/1369
@echo "--> Running tests in race mode"
@go test ./... -v -race -skip "TestPrepareProposalConsistency|TestIntegrationTestSuite|TestQGBRPCQueries|TestSquareSizeIntegrationTest|TestStandardSDKIntegrationTestSuite|TestTxsimCommandFlags|TestTxsimCommandEnvVar|TestMintIntegrationTestSuite|TestQGBCLI|TestUpgrade|TestMaliciousTestNode|TestMaxTotalBlobSizeSuite|TestQGBIntegrationSuite|TestSignerTestSuite|TestPriorityTestSuite|TestTimeInPrepareProposalContext"
@go test ./... -v -race -skip "TestPrepareProposalConsistency|TestIntegrationTestSuite|TestBlobstreamRPCQueries|TestSquareSizeIntegrationTest|TestStandardSDKIntegrationTestSuite|TestTxsimCommandFlags|TestTxsimCommandEnvVar|TestMintIntegrationTestSuite|TestBlobstreamCLI|TestUpgrade|TestMaliciousTestNode|TestMaxTotalBlobSizeSuite|TestQGBIntegrationSuite|TestSignerTestSuite|TestPriorityTestSuite|TestTimeInPrepareProposalContext|TestBlobstream"
.PHONY: test-race

## test-bench: Run unit tests in bench mode.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ Package-specific READMEs aim to explain implementation details for developers th
- [pkg/shares](./pkg/shares/README.md)
- [pkg/wrapper](./pkg/wrapper/README.md)
- [x/blob](./x/blob/README.md)
- [x/qgb](./x/qgb/README.md)
- [x/blobstream](./x/blobstream/README.md)

## Audits

Expand Down
34 changes: 17 additions & 17 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ import (
"github.com/celestiaorg/celestia-app/x/paramfilter"
"github.com/celestiaorg/celestia-app/x/tokenfilter"

qgbmodule "github.com/celestiaorg/celestia-app/x/qgb"
qgbmodulekeeper "github.com/celestiaorg/celestia-app/x/qgb/keeper"
qgbmoduletypes "github.com/celestiaorg/celestia-app/x/qgb/types"
bsmodule "github.com/celestiaorg/celestia-app/x/blobstream"
bsmodulekeeper "github.com/celestiaorg/celestia-app/x/blobstream/keeper"
bsmoduletypes "github.com/celestiaorg/celestia-app/x/blobstream/types"
ibctestingtypes "github.com/cosmos/ibc-go/v6/testing/types"
)

Expand Down Expand Up @@ -153,7 +153,7 @@ var (
transfer.AppModuleBasic{},
vesting.AppModuleBasic{},
blobmodule.AppModuleBasic{},
qgbmodule.AppModuleBasic{},
bsmodule.AppModuleBasic{},
)

// ModuleEncodingRegisters keeps track of all the module methods needed to
Expand Down Expand Up @@ -228,8 +228,8 @@ type App struct {
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
ScopedTransferKeeper capabilitykeeper.ScopedKeeper

BlobKeeper blobmodulekeeper.Keeper
QgbKeeper qgbmodulekeeper.Keeper
BlobKeeper blobmodulekeeper.Keeper
BStreamKeeper bsmodulekeeper.Keeper

// the module manager
mm *module.Manager
Expand Down Expand Up @@ -271,7 +271,7 @@ func New(
govtypes.StoreKey, paramstypes.StoreKey, upgrade.StoreKey, feegrant.StoreKey,
evidencetypes.StoreKey, capabilitytypes.StoreKey,
blobmoduletypes.StoreKey,
qgbmoduletypes.StoreKey,
bsmoduletypes.StoreKey,
ibctransfertypes.StoreKey,
ibchost.StoreKey,
)
Expand Down Expand Up @@ -336,20 +336,20 @@ func New(
app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, keys[feegrant.StoreKey], app.AccountKeeper)
app.UpgradeKeeper = upgrade.NewKeeper(keys[upgrade.StoreKey], upgradeSchedule)

app.QgbKeeper = *qgbmodulekeeper.NewKeeper(
app.BStreamKeeper = *bsmodulekeeper.NewKeeper(
appCodec,
keys[qgbmoduletypes.StoreKey],
app.GetSubspace(qgbmoduletypes.ModuleName),
keys[bsmoduletypes.StoreKey],
app.GetSubspace(bsmoduletypes.ModuleName),
&stakingKeeper,
)
qgbmod := qgbmodule.NewAppModule(appCodec, app.QgbKeeper)
bsmod := bsmodule.NewAppModule(appCodec, app.BStreamKeeper)

// register the staking hooks
// NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks
app.StakingKeeper = *stakingKeeper.SetHooks(
stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(),
app.SlashingKeeper.Hooks(),
app.QgbKeeper.Hooks(),
app.BStreamKeeper.Hooks(),
),
)

Expand Down Expand Up @@ -442,7 +442,7 @@ func New(
params.NewAppModule(app.ParamsKeeper),
transferModule,
blobmod,
qgbmod,
bsmod,
)

// During begin block slashing happens after distr.BeginBlocker so that
Expand All @@ -465,7 +465,7 @@ func New(
govtypes.ModuleName,
genutiltypes.ModuleName,
blobmoduletypes.ModuleName,
qgbmoduletypes.ModuleName,
bsmoduletypes.ModuleName,
paramstypes.ModuleName,
authz.ModuleName,
vestingtypes.ModuleName,
Expand All @@ -488,7 +488,7 @@ func New(
banktypes.ModuleName,
genutiltypes.ModuleName,
blobmoduletypes.ModuleName,
qgbmoduletypes.ModuleName,
bsmoduletypes.ModuleName,
paramstypes.ModuleName,
authz.ModuleName,
vestingtypes.ModuleName,
Expand All @@ -515,7 +515,7 @@ func New(
evidencetypes.ModuleName,
ibctransfertypes.ModuleName,
blobmoduletypes.ModuleName,
qgbmoduletypes.ModuleName,
bsmoduletypes.ModuleName,
vestingtypes.ModuleName,
feegrant.ModuleName,
paramstypes.ModuleName,
Expand Down Expand Up @@ -759,7 +759,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
paramsKeeper.Subspace(ibchost.ModuleName)
paramsKeeper.Subspace(blobmoduletypes.ModuleName)
paramsKeeper.Subspace(qgbmoduletypes.ModuleName)
paramsKeeper.Subspace(bsmoduletypes.ModuleName)

return paramsKeeper
}
Expand Down
6 changes: 3 additions & 3 deletions app/test/qgb_rpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import (
"github.com/celestiaorg/celestia-app/app/encoding"
"github.com/celestiaorg/celestia-app/test/util/genesis"
"github.com/celestiaorg/celestia-app/test/util/testnode"
"github.com/celestiaorg/celestia-app/x/qgb/types"
"github.com/celestiaorg/celestia-app/x/blobstream/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

func TestQGBRPCQueries(t *testing.T) {
func TestBlobstreamRPCQueries(t *testing.T) {
if testing.Short() {
t.Skip("skipping QGB integration test in short mode.")
t.Skip("skipping blobstream integration test in short mode.")
}
ecfg := encoding.MakeConfig(app.ModuleEncodingRegisters...)
cfg := testnode.DefaultConfig().WithModifiers(genesis.SetDataCommitmentWindow(ecfg.Codec, 100))
Expand Down
4 changes: 2 additions & 2 deletions app/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
v1 "github.com/celestiaorg/celestia-app/pkg/appconsts/v1"
v2 "github.com/celestiaorg/celestia-app/pkg/appconsts/v2"
"github.com/celestiaorg/celestia-app/x/blob"
"github.com/celestiaorg/celestia-app/x/blobstream"
"github.com/celestiaorg/celestia-app/x/mint"
"github.com/celestiaorg/celestia-app/x/qgb"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/x/auth"
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
Expand Down Expand Up @@ -48,7 +48,7 @@ var (
"genutil": genutil.AppModule{}.ConsensusVersion(),
"capability": capability.AppModule{}.ConsensusVersion(),
"blob": blob.AppModule{}.ConsensusVersion(),
"qgb": qgb.AppModule{}.ConsensusVersion(),
"qgb": blobstream.AppModule{}.ConsensusVersion(),
"ibc": ibc.AppModule{}.ConsensusVersion(),
"transfer": transfer.AppModule{}.ConsensusVersion(),
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/celestia-appd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"path/filepath"

qgbcmd "github.com/celestiaorg/celestia-app/x/qgb/client"
bscmd "github.com/celestiaorg/celestia-app/x/blobstream/client"

"github.com/celestiaorg/celestia-app/app"
"github.com/celestiaorg/celestia-app/app/encoding"
Expand Down Expand Up @@ -145,7 +145,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig encoding.Config) {
queryCommand(),
txCommand(),
keys.Commands(app.DefaultNodeHome),
qgbcmd.VerifyCmd(),
bscmd.VerifyCmd(),
)
}

Expand Down
6 changes: 3 additions & 3 deletions proto/celestia/qgb/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ package celestia.qgb.v1;
import "gogoproto/gogo.proto";
import "celestia/qgb/v1/types.proto";

option go_package = "github.com/celestiaorg/celestia-app/x/qgb/types";
option go_package = "github.com/celestiaorg/celestia-app/x/blobstream/types";

// Params represent the Quantum Gravity Bridge genesis and store parameters.
// Params represent Blobstream genesis and store parameters.
message Params {
option (gogoproto.stringer) = false;

uint64 data_commitment_window = 1;
}

// GenesisState struct, containing all persistent data required by the QGB
// GenesisState struct, containing all persistent data required by Blobstream
// module
message GenesisState { Params params = 1; }
4 changes: 2 additions & 2 deletions proto/celestia/qgb/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "google/protobuf/any.proto";

option go_package = "github.com/celestiaorg/celestia-app/x/qgb/types";
option go_package = "github.com/celestiaorg/celestia-app/x/blobstream/types";

// Query defines the gRPC querier service.
service Query {
// Params queries the current parameters for the qgb module
// Params queries the current parameters for the blobstream module
rach-id marked this conversation as resolved.
Show resolved Hide resolved
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/qgb/v1/params";
}
Expand Down
4 changes: 2 additions & 2 deletions proto/celestia/qgb/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "google/api/annotations.proto";

option go_package = "github.com/celestiaorg/celestia-app/x/qgb/types";
option go_package = "github.com/celestiaorg/celestia-app/x/blobstream/types";

// Msg is the message server for receiving qgb transactions
// Msg is the message server for receiving Blobstream transactions
service Msg {
// RegisterEVMAddress records an evm address for the validator which is used
// by the relayer to aggregate signatures. A validator can only register a
Expand Down
4 changes: 2 additions & 2 deletions proto/celestia/qgb/v1/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/celestiaorg/celestia-app/x/qgb/types";
option go_package = "github.com/celestiaorg/celestia-app/x/blobstream/types";

// BridgeValidator represents a validator's ETH address and its power
message BridgeValidator {
Expand All @@ -15,7 +15,7 @@ message BridgeValidator {
string evm_address = 2;
}

// Valset is the EVM Bridge Multsig Set, each qgb validator also
// Valset is the EVM Bridge Multsig Set, each Blobstream validator also
staheri14 marked this conversation as resolved.
Show resolved Hide resolved
// maintains an ETH key to sign messages, these are used to check signatures on
// ETH because of the significant gas savings
message Valset {
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-run-single-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ sed -i'.bak' 's#"null"#"kv"#g' ${HOME_DIR}/config/config.toml
sleep 20

# private key: da6ed55cb2894ac2c9c10209c09de8e8b9d109b910338d5bf3d747a7e1fc9eb9
${BIN_PATH} tx qgb register \
${BIN_PATH} tx blobstream register \
rach-id marked this conversation as resolved.
Show resolved Hide resolved
"$(${BIN_PATH} keys show validator --home "${HOME_DIR}" --bech val -a)" \
0x966e6f22781EF6a6A82BBB4DB3df8E225DfD9488 \
--from validator \
Expand Down
2 changes: 1 addition & 1 deletion scripts/protocgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ cd ..
# temporary import hack to use cosmos-sdk implementation of Any type.
# check https://github.com/celestiaorg/celestia-app/issues/507 for more information.
sed -i 's/types "github.com\/celestiaorg\/celestia-app\/codec\/types"/types "github.com\/cosmos\/cosmos-sdk\/codec\/types"/g' \
github.com/celestiaorg/celestia-app/x/qgb/types/query.pb.go
github.com/celestiaorg/celestia-app/x/blobstream/types/query.pb.go

# move proto files to the right places
cp -r github.com/celestiaorg/celestia-app/* ./
Expand Down
2 changes: 1 addition & 1 deletion scripts/single-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ sed -i'.bak' 's#"tcp://127.0.0.1:26657"#"tcp://0.0.0.0:26657"#g' "${CELESTIA_APP
VALIDATOR_ADDRESS=$(celestia-appd keys show ${KEY_NAME} --home "${CELESTIA_APP_HOME}" --bech val --address)
EVM_ADDRESS=0x966e6f22781EF6a6A82BBB4DB3df8E225DfD9488 # private key: da6ed55cb2894ac2c9c10209c09de8e8b9d109b910338d5bf3d747a7e1fc9eb9
echo "Registering an EVM address for validator..."
celestia-appd tx qgb register \
celestia-appd tx blobstream register \
rach-id marked this conversation as resolved.
Show resolved Hide resolved
${VALIDATOR_ADDRESS} \
${EVM_ADDRESS} \
--from ${KEY_NAME} \
Expand Down
2 changes: 1 addition & 1 deletion specs/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
- [Resource Pricing](./specs/resource_pricing.md)
- [State Machine Modules](./specs/state_machine_modules.md)
- [blob](https://github.com/celestiaorg/celestia-app/blob/main/x/blob/README.md)
- [qgb](https://github.com/celestiaorg/celestia-app/blob/main/x/qgb/README.md)
- [blobstream](https://github.com/celestiaorg/celestia-app/blob/main/x/blobstream/README.md)
- [mint](https://github.com/celestiaorg/celestia-app/blob/main/x/mint/README.md)
- [paramfilter](https://github.com/celestiaorg/celestia-app/blob/main/x/paramfilter/README.md)
- [upgrade](https://github.com/celestiaorg/celestia-app/blob/main/x/upgrade/README.md)
Expand Down
2 changes: 1 addition & 1 deletion specs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- [Resource Pricing](./specs/resource_pricing.md)
- [State Machine Modules](./specs/state_machine_modules.md)
- [blob](https://github.com/celestiaorg/celestia-app/blob/main/x/blob/README.md)
- [qgb](https://github.com/celestiaorg/celestia-app/blob/main/x/qgb/README.md)
- [blobstream](https://github.com/celestiaorg/celestia-app/blob/main/x/blobstream/README.md)
- [mint](https://github.com/celestiaorg/celestia-app/blob/main/x/mint/README.md)
- [paramfilter](https://github.com/celestiaorg/celestia-app/blob/main/x/paramfilter/README.md)
- [upgrade](https://github.com/celestiaorg/celestia-app/blob/main/x/upgrade/README.md)
Expand Down
2 changes: 1 addition & 1 deletion specs/src/specs/params.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ are blocked by the `x/paramfilter` module.
| mint.InitialInflationRate | 0.08 (8%) | The inflation rate the network starts at. | False |
| mint.DisinflationRate | 0.10 (10%) | The rate at which the inflation rate decreases each year. | False |
| mint.TargetInflationRate | 0.015 (1.5%) | The inflation rate that the network aims to stabalize at. | False |
| qgb.DataCommitmentWindow | 400 | Number of blocks that are included in a signed batch (DataCommitment). | True |
| blobstream.DataCommitmentWindow | 400 | Number of blocks that are included in a signed batch (DataCommitment). | True |
2 changes: 1 addition & 1 deletion specs/src/specs/state_machine_modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Celestia app is built using the cosmos-sdk, and follows standard cosmos-sdk modu
## `celestia-app` Specific Modules

- [blob](https://github.com/celestiaorg/celestia-app/blob/main/x/blob/README.md)
- [qgb](https://github.com/celestiaorg/celestia-app/blob/main/x/qgb/README.md)
- [blobstream](https://github.com/celestiaorg/celestia-app/blob/main/x/blobstream/README.md)
- [mint](https://github.com/celestiaorg/celestia-app/blob/main/x/mint/README.md)
- [paramfilter](https://github.com/celestiaorg/celestia-app/blob/main/x/paramfilter/README.md)
- [upgrade](https://github.com/celestiaorg/celestia-app/blob/main/x/upgrade/README.md)
Expand Down
Loading
Loading