Skip to content

Commit

Permalink
chore: BlobStream => Blobstream
Browse files Browse the repository at this point in the history
  • Loading branch information
rach-id committed Oct 11, 2023
1 parent a27b5a0 commit e4c369e
Show file tree
Hide file tree
Showing 29 changed files with 177 additions and 177 deletions.
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|TestBlobStreamRPCQueries|TestSquareSizeIntegrationTest|TestStandardSDKIntegrationTestSuite|TestTxsimCommandFlags|TestTxsimCommandEnvVar|TestMintIntegrationTestSuite|TestBlobStreamCLI|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 app/test/qgb_rpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestBlobStreamRPCQueries(t *testing.T) {
func TestBlobstreamRPCQueries(t *testing.T) {
if testing.Short() {
t.Skip("skipping blob stream integration test in short mode.")
}
Expand Down
4 changes: 2 additions & 2 deletions proto/celestia/qgb/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import "celestia/qgb/v1/types.proto";

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

// Params represent the BlobStream 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 BlobStream
// GenesisState struct, containing all persistent data required by Blobstream
// module
message GenesisState { Params params = 1; }
2 changes: 1 addition & 1 deletion proto/celestia/qgb/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "google/api/annotations.proto";

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

// Msg is the message server for receiving BlobStream 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
2 changes: 1 addition & 1 deletion proto/celestia/qgb/v1/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ message BridgeValidator {
string evm_address = 2;
}

// Valset is the EVM Bridge Multsig Set, each BlobStream 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
38 changes: 19 additions & 19 deletions test/util/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ func initEVMAddrs(count int) []gethcommon.Address {
return addresses
}

// TestInput stores the various keepers required to test BlobStream
// TestInput stores the various keepers required to test Blobstream
type TestInput struct {
BStreamKeeper keeper.Keeper
BstreamKeeper keeper.Keeper
AccountKeeper authkeeper.AccountKeeper
StakingKeeper stakingkeeper.Keeper
SlashingKeeper slashingkeeper.Keeper
Expand All @@ -148,8 +148,8 @@ type TestInput struct {
LegacyAmino *codec.LegacyAmino
}

// CreateTestEnvWithoutBlobStreamKeysInit creates the keeper testing environment for BlobStream
func CreateTestEnvWithoutBlobStreamKeysInit(t *testing.T) TestInput {
// CreateTestEnvWithoutBlobstreamKeysInit creates the keeper testing environment for Blobstream
func CreateTestEnvWithoutBlobstreamKeysInit(t *testing.T) TestInput {
t.Helper()

// Initialize store keys
Expand Down Expand Up @@ -294,8 +294,8 @@ func CreateTestEnvWithoutBlobStreamKeysInit(t *testing.T) TestInput {
)

k := keeper.NewKeeper(marshaler, bsKey, getSubspace(paramsKeeper, bstypes.DefaultParamspace), &stakingKeeper)
testBlobStreamParams := bstypes.DefaultGenesis().Params
k.SetParams(ctx, *testBlobStreamParams)
testBlobstreamParams := bstypes.DefaultGenesis().Params
k.SetParams(ctx, *testBlobstreamParams)

stakingKeeper = *stakingKeeper.SetHooks(
stakingtypes.NewMultiStakingHooks(
Expand All @@ -305,7 +305,7 @@ func CreateTestEnvWithoutBlobStreamKeysInit(t *testing.T) TestInput {
),
)
return TestInput{
BStreamKeeper: *k,
BstreamKeeper: *k,
AccountKeeper: accountKeeper,
BankKeeper: bankKeeper,
StakingKeeper: stakingKeeper,
Expand All @@ -317,11 +317,11 @@ func CreateTestEnvWithoutBlobStreamKeysInit(t *testing.T) TestInput {
}
}

// CreateTestEnv creates the keeper testing environment for BlobStream
// CreateTestEnv creates the keeper testing environment for Blobstream
func CreateTestEnv(t *testing.T) TestInput {
input := CreateTestEnvWithoutBlobStreamKeysInit(t)
input.BStreamKeeper.SetLatestAttestationNonce(input.Context, blobstream.InitialLatestAttestationNonce)
input.BStreamKeeper.SetEarliestAvailableAttestationNonce(input.Context, blobstream.InitialEarliestAvailableAttestationNonce)
input := CreateTestEnvWithoutBlobstreamKeysInit(t)
input.BstreamKeeper.SetLatestAttestationNonce(input.Context, blobstream.InitialLatestAttestationNonce)
input.BstreamKeeper.SetEarliestAvailableAttestationNonce(input.Context, blobstream.InitialEarliestAvailableAttestationNonce)
return input
}

Expand Down Expand Up @@ -412,7 +412,7 @@ func RegisterEVMAddress(
valAddr sdk.ValAddress,
evmAddr gethcommon.Address,
) {
bsMsgServer := keeper.NewMsgServerImpl(input.BStreamKeeper)
bsMsgServer := keeper.NewMsgServerImpl(input.BstreamKeeper)
registerMsg := bstypes.NewMsgRegisterEVMAddress(valAddr, evmAddr)
_, err := bsMsgServer.RegisterEVMAddress(input.Context, registerMsg)
require.NoError(t, err)
Expand Down Expand Up @@ -451,7 +451,7 @@ func SetupTestChain(t *testing.T, weights []uint64) (TestInput, sdk.Context) {

// Initialize each of the validators
stakingMsgServer := stakingkeeper.NewMsgServerImpl(input.StakingKeeper)
bsMsgServer := keeper.NewMsgServerImpl(input.BStreamKeeper)
bsMsgServer := keeper.NewMsgServerImpl(input.BstreamKeeper)
for i, weight := range weights {
consPrivKey := ed25519.GenPrivKey()
consPubKey := consPrivKey.PubKey()
Expand Down Expand Up @@ -504,21 +504,21 @@ func NewTestMsgUnDelegateValidator(address sdk.ValAddress, amt cosmosmath.Int) *
return msg
}

// ExecuteBlobStreamHeights executes the end exclusive range of heights specified by beginHeight and endHeight
// along with the BlobStream abci.EndBlocker on each one of them.
// ExecuteBlobstreamHeights executes the end exclusive range of heights specified by beginHeight and endHeight
// along with the Blobstream abci.EndBlocker on each one of them.
// Returns the updated context with block height advanced to endHeight.
func ExecuteBlobStreamHeights(ctx sdk.Context, bsKeeper keeper.Keeper, beginHeight int64, endHeight int64) sdk.Context {
func ExecuteBlobstreamHeights(ctx sdk.Context, bsKeeper keeper.Keeper, beginHeight int64, endHeight int64) sdk.Context {
for i := beginHeight; i < endHeight; i++ {
ctx = ctx.WithBlockHeight(i)
blobstream.EndBlocker(ctx, bsKeeper)
}
return ctx
}

// ExecuteBlobStreamHeightsWithTime executes the end exclusive range of heights specified by beginHeight and endHeight
// along with the BlobStream abci.EndBlocker on each one of them.
// ExecuteBlobstreamHeightsWithTime executes the end exclusive range of heights specified by beginHeight and endHeight
// along with the Blobstream abci.EndBlocker on each one of them.
// Uses the interval to calculate the block header time.
func ExecuteBlobStreamHeightsWithTime(ctx sdk.Context, bsKeeper keeper.Keeper, beginHeight int64, endHeight int64, blockInterval time.Duration) sdk.Context {
func ExecuteBlobstreamHeightsWithTime(ctx sdk.Context, bsKeeper keeper.Keeper, beginHeight int64, endHeight int64, blockInterval time.Duration) sdk.Context {
blockTime := ctx.BlockTime()
for i := beginHeight; i < endHeight; i++ {
ctx = ctx.WithBlockHeight(i).WithBlockTime(blockTime)
Expand Down
Loading

0 comments on commit e4c369e

Please sign in to comment.