Skip to content

Commit

Permalink
Merge branch 'main' into use-blobstream-repo
Browse files Browse the repository at this point in the history
# Conflicts:
#	x/blobstream/client/verify.go
  • Loading branch information
rach-id committed Oct 18, 2023
2 parents c4de13b + eedb371 commit f20f706
Show file tree
Hide file tree
Showing 68 changed files with 577 additions and 572 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|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
BlobstreamKeeper 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.BlobstreamKeeper = *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.BlobstreamKeeper)

// 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.BlobstreamKeeper.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
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
// 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/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 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 f20f706

Please sign in to comment.