Skip to content

Commit

Permalink
chore: rename qgb to blobstream
Browse files Browse the repository at this point in the history
  • Loading branch information
rach-id committed Oct 9, 2023
1 parent 44be82a commit cf0e30e
Show file tree
Hide file tree
Showing 70 changed files with 697 additions and 691 deletions.
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"
.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 @@ -149,7 +149,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 @@ -94,9 +94,9 @@ import (
"github.com/celestiaorg/celestia-app/x/tokenfilter"
appupgrade "github.com/celestiaorg/celestia-app/x/upgrade"

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 @@ -155,7 +155,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 @@ -230,8 +230,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 @@ -265,7 +265,7 @@ func New(
govtypes.StoreKey, paramstypes.StoreKey, sdkupgradetypes.StoreKey, feegrant.StoreKey,
evidencetypes.StoreKey, capabilitytypes.StoreKey,
blobmoduletypes.StoreKey,
qgbmoduletypes.StoreKey,
bsmoduletypes.StoreKey,
ibctransfertypes.StoreKey,
ibchost.StoreKey,
)
Expand Down Expand Up @@ -330,20 +330,20 @@ func New(
app.FeeGrantKeeper = feegrantkeeper.NewKeeper(appCodec, keys[feegrant.StoreKey], app.AccountKeeper)
app.UpgradeKeeper = sdkupgradekeeper.NewKeeper(skipUpgradeHeights, keys[sdkupgradetypes.StoreKey], appCodec, homePath, app.BaseApp, authtypes.NewModuleAddress(govtypes.ModuleName).String())

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 @@ -436,7 +436,7 @@ func New(
params.NewAppModule(app.ParamsKeeper),
transferModule,
blobmod,
qgbmod,
bsmod,
)

// During begin block slashing happens after distr.BeginBlocker so that
Expand All @@ -459,7 +459,7 @@ func New(
govtypes.ModuleName,
genutiltypes.ModuleName,
blobmoduletypes.ModuleName,
qgbmoduletypes.ModuleName,
bsmoduletypes.ModuleName,
paramstypes.ModuleName,
authz.ModuleName,
vestingtypes.ModuleName,
Expand All @@ -481,7 +481,7 @@ func New(
banktypes.ModuleName,
genutiltypes.ModuleName,
blobmoduletypes.ModuleName,
qgbmoduletypes.ModuleName,
bsmoduletypes.ModuleName,
paramstypes.ModuleName,
authz.ModuleName,
vestingtypes.ModuleName,
Expand All @@ -507,7 +507,7 @@ func New(
evidencetypes.ModuleName,
ibctransfertypes.ModuleName,
blobmoduletypes.ModuleName,
qgbmoduletypes.ModuleName,
bsmoduletypes.ModuleName,
vestingtypes.ModuleName,
feegrant.ModuleName,
paramstypes.ModuleName,
Expand Down Expand Up @@ -739,7 +739,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 @@ -6,14 +6,14 @@ import (
"time"

"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 blob stream integration test in short mode.")
}
cfg := testnode.DefaultConfig()

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 @@ -6,7 +6,7 @@ import (
"path/filepath"

"github.com/celestiaorg/celestia-app/pkg/appconsts"
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 @@ -146,7 +146,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig encoding.Config) {
queryCommand(),
txCommand(),
keys.Commands(app.DefaultNodeHome),
qgbcmd.VerifyCmd(),
bscmd.VerifyCmd(),
)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
syntax = "proto3";
package celestia.qgb.v1;
package celestia.blobstream.v1;

import "gogoproto/gogo.proto";
import "celestia/qgb/v1/types.proto";
import "celestia/blobstream/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 the 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; }
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
syntax = "proto3";
package celestia.qgb.v1;
package celestia.blobstream.v1;

import "celestia/qgb/v1/genesis.proto";
import "celestia/qgb/v1/types.proto";
import "celestia/blobstream/v1/genesis.proto";
import "celestia/blobstream/v1/types.proto";
import "google/api/annotations.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
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
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/qgb/v1/params";
option (google.api.http).get = "/blobstream/v1/params";
}

// queries for attestations requests waiting to be signed by an orchestrator
Expand All @@ -24,12 +24,12 @@ service Query {
// Returns nil if not found.
rpc AttestationRequestByNonce(QueryAttestationRequestByNonceRequest)
returns (QueryAttestationRequestByNonceResponse) {
option (google.api.http).get = "/qgb/v1/attestations/requests/{nonce}";
option (google.api.http).get = "/blobstream/v1/attestations/requests/{nonce}";
}
// LatestAttestationNonce queries latest attestation nonce.
rpc LatestAttestationNonce(QueryLatestAttestationNonceRequest)
returns (QueryLatestAttestationNonceResponse) {
option (google.api.http).get = "/qgb/v1/attestations/nonce/latest";
option (google.api.http).get = "/blobstream/v1/attestations/nonce/latest";
}
// LatestValsetRequestBeforeNonce Queries latest Valset request before nonce.
// And, even if the current nonce is a valset, it will return the previous
Expand All @@ -38,34 +38,34 @@ service Query {
// no valset before nonce 1.
rpc LatestValsetRequestBeforeNonce(QueryLatestValsetRequestBeforeNonceRequest)
returns (QueryLatestValsetRequestBeforeNonceResponse) {
option (google.api.http).get = "/qgb/v1/valset/request/before/{nonce}";
option (google.api.http).get = "/blobstream/v1/valset/request/before/{nonce}";
}

// misc

// LatestUnbondingHeight returns the latest unbonding height
rpc LatestUnbondingHeight(QueryLatestUnbondingHeightRequest)
returns (QueryLatestUnbondingHeightResponse) {
option (google.api.http).get = "/qgb/v1/unbonding";
option (google.api.http).get = "/blobstream/v1/unbonding";
}

// DataCommitmentRangeForHeight returns the data commitment window
// that includes the provided height
rpc DataCommitmentRangeForHeight(QueryDataCommitmentRangeForHeightRequest)
returns (QueryDataCommitmentRangeForHeightResponse) {
option (google.api.http).get = "/qgb/v1/data_commitment/range/height";
option (google.api.http).get = "/blobstream/v1/data_commitment/range/height";
}

// LatestDataCommitment returns the latest data commitment in store
rpc LatestDataCommitment(QueryLatestDataCommitmentRequest)
returns (QueryLatestDataCommitmentResponse) {
option (google.api.http).get = "/qgb/v1/data_commitment/latest";
option (google.api.http).get = "/blobstream/v1/data_commitment/latest";
}

// EVMAddress returns the evm address associated with a supplied
// validator address
rpc EVMAddress(QueryEVMAddressRequest) returns (QueryEVMAddressResponse) {
option (google.api.http).get = "/qgb/v1/evm_address";
option (google.api.http).get = "/blobstream/v1/evm_address";
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
syntax = "proto3";
package celestia.qgb.v1;
package celestia.blobstream.v1;

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 All @@ -16,7 +16,7 @@ service Msg {
// state machine.
rpc RegisterEVMAddress(MsgRegisterEVMAddress)
returns (MsgRegisterEVMAddressResponse) {
option (google.api.http).get = "/qgb/v1/register_evm_address";
option (google.api.http).get = "/blobstream/v1/register_evm_address";
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
syntax = "proto3";
package celestia.qgb.v1;
package celestia.blobstream.v1;

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
// 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 \
"$(${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 \
${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

0 comments on commit cf0e30e

Please sign in to comment.