From cf0e30ef2233ffb74d22c37eafc0dbddb65d7b29 Mon Sep 17 00:00:00 2001 From: rachid Date: Mon, 9 Oct 2023 14:25:17 +0200 Subject: [PATCH 01/14] chore: rename qgb to blobstream --- .github/CODEOWNERS | 2 +- Makefile | 2 +- README.md | 2 +- app/app.go | 34 +-- app/test/qgb_rpc_test.go | 6 +- cmd/celestia-appd/cmd/root.go | 4 +- .../{qgb => blobstream}/v1/genesis.proto | 10 +- .../{qgb => blobstream}/v1/query.proto | 26 +- .../celestia/{qgb => blobstream}/v1/tx.proto | 8 +- .../{qgb => blobstream}/v1/types.proto | 6 +- scripts/build-run-single-node.sh | 2 +- scripts/protocgen.sh | 2 +- scripts/single-node.sh | 2 +- specs/src/README.md | 2 +- specs/src/SUMMARY.md | 2 +- specs/src/specs/params.md | 2 +- specs/src/specs/state_machine_modules.md | 2 +- test/util/common.go | 86 +++---- test/util/testnode/full_node.go | 10 +- x/{qgb => blobstream}/README.md | 74 +++--- x/{qgb => blobstream}/abci.go | 8 +- x/{qgb => blobstream}/abci_test.go | 92 +++---- x/{qgb => blobstream}/client/config.go | 2 +- x/{qgb => blobstream}/client/query.go | 8 +- x/{qgb => blobstream}/client/query_test.go | 2 +- x/{qgb => blobstream}/client/suite_test.go | 8 +- x/{qgb => blobstream}/client/tx.go | 4 +- x/{qgb => blobstream}/client/verify.go | 40 +-- x/{qgb => blobstream}/genesis.go | 6 +- x/{qgb => blobstream}/handler.go | 6 +- x/{qgb => blobstream}/integration_test.go | 24 +- x/{qgb => blobstream}/keeper/hooks.go | 6 +- x/{qgb => blobstream}/keeper/keeper.go | 6 +- .../keeper/keeper_attestation.go | 2 +- .../keeper/keeper_attestation_test.go | 41 ++++ .../keeper/keeper_data_commitment.go | 2 +- .../keeper/keeper_data_commitment_test.go | 18 +- x/{qgb => blobstream}/keeper/keeper_valset.go | 2 +- .../keeper/keeper_valset_test.go | 21 +- x/{qgb => blobstream}/keeper/msg_server.go | 4 +- .../keeper/msg_server_test.go | 4 +- .../keeper/query_attestation.go | 2 +- .../keeper/query_data_commitment.go | 2 +- x/{qgb => blobstream}/keeper/query_general.go | 2 +- x/{qgb => blobstream}/keeper/query_valset.go | 2 +- x/{qgb => blobstream}/module.go | 12 +- x/blobstream/overview.md | 116 +++++++++ x/{qgb => blobstream}/types/abi_consts.go | 18 +- x/{qgb => blobstream}/types/attestation.go | 0 x/{qgb => blobstream}/types/codec.go | 0 .../types/data_commitment.go | 0 x/{qgb => blobstream}/types/errors.go | 0 x/{qgb => blobstream}/types/events.go | 0 x/{qgb => blobstream}/types/genesis.go | 6 +- x/{qgb => blobstream}/types/genesis.pb.go | 52 ++-- x/{qgb => blobstream}/types/genesis_test.go | 2 +- x/{qgb => blobstream}/types/keys.go | 0 x/{qgb => blobstream}/types/msgs.go | 0 x/{qgb => blobstream}/types/msgs_test.go | 0 x/{qgb => blobstream}/types/query.pb.go | 230 +++++++++--------- x/{qgb => blobstream}/types/query.pb.gw.go | 18 +- x/{qgb => blobstream}/types/tx.pb.go | 73 +++--- x/{qgb => blobstream}/types/tx.pb.gw.go | 4 +- x/{qgb => blobstream}/types/types.go | 0 x/{qgb => blobstream}/types/types.pb.go | 84 +++---- x/{qgb => blobstream}/types/types_test.go | 2 +- x/{qgb => blobstream}/types/validator.go | 10 +- x/{qgb => blobstream}/types/valset.go | 6 +- x/qgb/keeper/keeper_attestation_test.go | 41 ---- x/qgb/overview.md | 116 --------- 70 files changed, 697 insertions(+), 691 deletions(-) rename proto/celestia/{qgb => blobstream}/v1/genesis.proto (53%) rename proto/celestia/{qgb => blobstream}/v1/query.proto (82%) rename proto/celestia/{qgb => blobstream}/v1/tx.proto (80%) rename proto/celestia/{qgb => blobstream}/v1/types.proto (91%) rename x/{qgb => blobstream}/README.md (75%) rename x/{qgb => blobstream}/abci.go (97%) rename x/{qgb => blobstream}/abci_test.go (86%) rename x/{qgb => blobstream}/client/config.go (98%) rename x/{qgb => blobstream}/client/query.go (94%) rename x/{qgb => blobstream}/client/query_test.go (95%) rename x/{qgb => blobstream}/client/suite_test.go (83%) rename x/{qgb => blobstream}/client/tx.go (91%) rename x/{qgb => blobstream}/client/verify.go (88%) rename x/{qgb => blobstream}/genesis.go (90%) rename x/{qgb => blobstream}/handler.go (82%) rename x/{qgb => blobstream}/integration_test.go (74%) rename x/{qgb => blobstream}/keeper/hooks.go (94%) rename x/{qgb => blobstream}/keeper/keeper.go (93%) rename x/{qgb => blobstream}/keeper/keeper_attestation.go (98%) create mode 100644 x/blobstream/keeper/keeper_attestation_test.go rename x/{qgb => blobstream}/keeper/keeper_data_commitment.go (98%) rename x/{qgb => blobstream}/keeper/keeper_data_commitment_test.go (93%) rename x/{qgb => blobstream}/keeper/keeper_valset.go (99%) rename x/{qgb => blobstream}/keeper/keeper_valset_test.go (92%) rename x/{qgb => blobstream}/keeper/msg_server.go (89%) rename x/{qgb => blobstream}/keeper/msg_server_test.go (93%) rename x/{qgb => blobstream}/keeper/query_attestation.go (95%) rename x/{qgb => blobstream}/keeper/query_data_commitment.go (93%) rename x/{qgb => blobstream}/keeper/query_general.go (95%) rename x/{qgb => blobstream}/keeper/query_valset.go (91%) rename x/{qgb => blobstream}/module.go (95%) create mode 100644 x/blobstream/overview.md rename x/{qgb => blobstream}/types/abi_consts.go (86%) rename x/{qgb => blobstream}/types/attestation.go (100%) rename x/{qgb => blobstream}/types/codec.go (100%) rename x/{qgb => blobstream}/types/data_commitment.go (100%) rename x/{qgb => blobstream}/types/errors.go (100%) rename x/{qgb => blobstream}/types/events.go (100%) rename x/{qgb => blobstream}/types/genesis.go (93%) rename x/{qgb => blobstream}/types/genesis.pb.go (83%) rename x/{qgb => blobstream}/types/genesis_test.go (96%) rename x/{qgb => blobstream}/types/keys.go (100%) rename x/{qgb => blobstream}/types/msgs.go (100%) rename x/{qgb => blobstream}/types/msgs_test.go (100%) rename x/{qgb => blobstream}/types/query.pb.go (89%) rename x/{qgb => blobstream}/types/query.pb.gw.go (96%) rename x/{qgb => blobstream}/types/tx.pb.go (84%) rename x/{qgb => blobstream}/types/tx.pb.gw.go (97%) rename x/{qgb => blobstream}/types/types.go (100%) rename x/{qgb => blobstream}/types/types.pb.go (87%) rename x/{qgb => blobstream}/types/types_test.go (99%) rename x/{qgb => blobstream}/types/validator.go (94%) rename x/{qgb => blobstream}/types/valset.go (91%) delete mode 100644 x/qgb/keeper/keeper_attestation_test.go delete mode 100644 x/qgb/overview.md diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index dc5a946948..982f6b94e8 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -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 diff --git a/Makefile b/Makefile index 8ce978b864..a2cc0f3159 100644 --- a/Makefile +++ b/Makefile @@ -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. diff --git a/README.md b/README.md index 828021db9c..1dce4bde02 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/app/app.go b/app/app.go index 128aabc4af..1630b0173f 100644 --- a/app/app.go +++ b/app/app.go @@ -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" ) @@ -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 @@ -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 @@ -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, ) @@ -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(), ), ) @@ -436,7 +436,7 @@ func New( params.NewAppModule(app.ParamsKeeper), transferModule, blobmod, - qgbmod, + bsmod, ) // During begin block slashing happens after distr.BeginBlocker so that @@ -459,7 +459,7 @@ func New( govtypes.ModuleName, genutiltypes.ModuleName, blobmoduletypes.ModuleName, - qgbmoduletypes.ModuleName, + bsmoduletypes.ModuleName, paramstypes.ModuleName, authz.ModuleName, vestingtypes.ModuleName, @@ -481,7 +481,7 @@ func New( banktypes.ModuleName, genutiltypes.ModuleName, blobmoduletypes.ModuleName, - qgbmoduletypes.ModuleName, + bsmoduletypes.ModuleName, paramstypes.ModuleName, authz.ModuleName, vestingtypes.ModuleName, @@ -507,7 +507,7 @@ func New( evidencetypes.ModuleName, ibctransfertypes.ModuleName, blobmoduletypes.ModuleName, - qgbmoduletypes.ModuleName, + bsmoduletypes.ModuleName, vestingtypes.ModuleName, feegrant.ModuleName, paramstypes.ModuleName, @@ -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 } diff --git a/app/test/qgb_rpc_test.go b/app/test/qgb_rpc_test.go index f385328759..9d2ffe72ef 100644 --- a/app/test/qgb_rpc_test.go +++ b/app/test/qgb_rpc_test.go @@ -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() diff --git a/cmd/celestia-appd/cmd/root.go b/cmd/celestia-appd/cmd/root.go index 91c86dc787..00c2c8faaf 100644 --- a/cmd/celestia-appd/cmd/root.go +++ b/cmd/celestia-appd/cmd/root.go @@ -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" @@ -146,7 +146,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig encoding.Config) { queryCommand(), txCommand(), keys.Commands(app.DefaultNodeHome), - qgbcmd.VerifyCmd(), + bscmd.VerifyCmd(), ) } diff --git a/proto/celestia/qgb/v1/genesis.proto b/proto/celestia/blobstream/v1/genesis.proto similarity index 53% rename from proto/celestia/qgb/v1/genesis.proto rename to proto/celestia/blobstream/v1/genesis.proto index 623c5e71b0..eccae21bb8 100644 --- a/proto/celestia/qgb/v1/genesis.proto +++ b/proto/celestia/blobstream/v1/genesis.proto @@ -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; } diff --git a/proto/celestia/qgb/v1/query.proto b/proto/celestia/blobstream/v1/query.proto similarity index 82% rename from proto/celestia/qgb/v1/query.proto rename to proto/celestia/blobstream/v1/query.proto index f3ac2a4474..3be9457088 100644 --- a/proto/celestia/qgb/v1/query.proto +++ b/proto/celestia/blobstream/v1/query.proto @@ -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 @@ -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 @@ -38,7 +38,7 @@ 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 @@ -46,26 +46,26 @@ service Query { // 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"; } } diff --git a/proto/celestia/qgb/v1/tx.proto b/proto/celestia/blobstream/v1/tx.proto similarity index 80% rename from proto/celestia/qgb/v1/tx.proto rename to proto/celestia/blobstream/v1/tx.proto index 62c808ba63..60dc687c48 100644 --- a/proto/celestia/qgb/v1/tx.proto +++ b/proto/celestia/blobstream/v1/tx.proto @@ -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 @@ -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"; } } diff --git a/proto/celestia/qgb/v1/types.proto b/proto/celestia/blobstream/v1/types.proto similarity index 91% rename from proto/celestia/qgb/v1/types.proto rename to proto/celestia/blobstream/v1/types.proto index 386c278eae..ef6a6917dd 100644 --- a/proto/celestia/qgb/v1/types.proto +++ b/proto/celestia/blobstream/v1/types.proto @@ -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 { @@ -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 { diff --git a/scripts/build-run-single-node.sh b/scripts/build-run-single-node.sh index 7af3124053..fd92ccf013 100755 --- a/scripts/build-run-single-node.sh +++ b/scripts/build-run-single-node.sh @@ -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 \ diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 3d2f937082..670da62783 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -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/* ./ diff --git a/scripts/single-node.sh b/scripts/single-node.sh index d2ffbe40dd..e0085a7565 100755 --- a/scripts/single-node.sh +++ b/scripts/single-node.sh @@ -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} \ diff --git a/specs/src/README.md b/specs/src/README.md index 9b2a20f47d..13a04c2c25 100644 --- a/specs/src/README.md +++ b/specs/src/README.md @@ -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) diff --git a/specs/src/SUMMARY.md b/specs/src/SUMMARY.md index 1f11797ed1..655f7509c6 100644 --- a/specs/src/SUMMARY.md +++ b/specs/src/SUMMARY.md @@ -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) diff --git a/specs/src/specs/params.md b/specs/src/specs/params.md index 71fc28d0ea..c94eff4c49 100644 --- a/specs/src/specs/params.md +++ b/specs/src/specs/params.md @@ -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 | diff --git a/specs/src/specs/state_machine_modules.md b/specs/src/specs/state_machine_modules.md index d42f844cb9..8f81cca0f8 100644 --- a/specs/src/specs/state_machine_modules.md +++ b/specs/src/specs/state_machine_modules.md @@ -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) diff --git a/test/util/common.go b/test/util/common.go index fcd657744d..7b528dea67 100644 --- a/test/util/common.go +++ b/test/util/common.go @@ -2,14 +2,14 @@ package util import ( "bytes" + "github.com/celestiaorg/celestia-app/x/blobstream" "testing" "time" cosmosmath "cosmossdk.io/math" "github.com/celestiaorg/celestia-app/app" - "github.com/celestiaorg/celestia-app/x/qgb" - "github.com/celestiaorg/celestia-app/x/qgb/keeper" - qgbtypes "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/keeper" + bstypes "github.com/celestiaorg/celestia-app/x/blobstream/types" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" ccodec "github.com/cosmos/cosmos-sdk/crypto/codec" @@ -134,9 +134,9 @@ func initEVMAddrs(count int) []gethcommon.Address { return addresses } -// TestInput stores the various keepers required to test the QGB +// TestInput stores the various keepers required to test BlobStream type TestInput struct { - QgbKeeper keeper.Keeper + BStreamKeeper keeper.Keeper AccountKeeper authkeeper.AccountKeeper StakingKeeper stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper @@ -147,12 +147,12 @@ type TestInput struct { LegacyAmino *codec.LegacyAmino } -// CreateTestEnvWithoutQGBKeysInit creates the keeper testing environment for the QGB -func CreateTestEnvWithoutQGBKeysInit(t *testing.T) TestInput { +// CreateTestEnvWithoutBlobStreamKeysInit creates the keeper testing environment for BlobStream +func CreateTestEnvWithoutBlobStreamKeysInit(t *testing.T) TestInput { t.Helper() // Initialize store keys - qgbKey := sdk.NewKVStoreKey(qgbtypes.StoreKey) + bsKey := sdk.NewKVStoreKey(bstypes.StoreKey) keyAcc := sdk.NewKVStoreKey(authtypes.StoreKey) keyStaking := sdk.NewKVStoreKey(stakingtypes.StoreKey) keyBank := sdk.NewKVStoreKey(banktypes.StoreKey) @@ -164,7 +164,7 @@ func CreateTestEnvWithoutQGBKeysInit(t *testing.T) TestInput { // Initialize memory database and mount stores on it db := dbm.NewMemDB() ms := store.NewCommitMultiStore(db) - ms.MountStoreWithDB(qgbKey, storetypes.StoreTypeIAVL, db) + ms.MountStoreWithDB(bsKey, storetypes.StoreTypeIAVL, db) ms.MountStoreWithDB(keyAcc, storetypes.StoreTypeIAVL, db) ms.MountStoreWithDB(keyParams, storetypes.StoreTypeIAVL, db) ms.MountStoreWithDB(keyStaking, storetypes.StoreTypeIAVL, db) @@ -210,7 +210,7 @@ func CreateTestEnvWithoutQGBKeysInit(t *testing.T) TestInput { paramsKeeper.Subspace(banktypes.ModuleName) paramsKeeper.Subspace(stakingtypes.ModuleName) paramsKeeper.Subspace(distrtypes.ModuleName) - paramsKeeper.Subspace(qgbtypes.DefaultParamspace) + paramsKeeper.Subspace(bstypes.DefaultParamspace) paramsKeeper.Subspace(slashingtypes.ModuleName) // this is also used to initialize module accounts for all the map keys @@ -219,7 +219,7 @@ func CreateTestEnvWithoutQGBKeysInit(t *testing.T) TestInput { distrtypes.ModuleName: nil, stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, - qgbtypes.ModuleName: {authtypes.Minter, authtypes.Burner}, + bstypes.ModuleName: {authtypes.Minter, authtypes.Burner}, } accountKeeper := authkeeper.NewAccountKeeper( @@ -266,16 +266,16 @@ func CreateTestEnvWithoutQGBKeysInit(t *testing.T) TestInput { for name, perms := range maccPerms { mod := authtypes.NewEmptyModuleAccount(name, perms...) if name == stakingtypes.NotBondedPoolName { - err = bankKeeper.MintCoins(ctx, qgbtypes.ModuleName, totalSupply) + err = bankKeeper.MintCoins(ctx, bstypes.ModuleName, totalSupply) require.NoError(t, err) - err = bankKeeper.SendCoinsFromModuleToModule(ctx, qgbtypes.ModuleName, mod.Name, totalSupply) + err = bankKeeper.SendCoinsFromModuleToModule(ctx, bstypes.ModuleName, mod.Name, totalSupply) require.NoError(t, err) } else if name == distrtypes.ModuleName { // some big pot to pay out amt := sdk.NewCoins(sdk.NewInt64Coin("stake", 500000)) - err = bankKeeper.MintCoins(ctx, qgbtypes.ModuleName, amt) + err = bankKeeper.MintCoins(ctx, bstypes.ModuleName, amt) require.NoError(t, err) - err = bankKeeper.SendCoinsFromModuleToModule(ctx, qgbtypes.ModuleName, mod.Name, amt) + err = bankKeeper.SendCoinsFromModuleToModule(ctx, bstypes.ModuleName, mod.Name, amt) require.NoError(t, err) } accountKeeper.SetModuleAccount(ctx, mod) @@ -292,9 +292,9 @@ func CreateTestEnvWithoutQGBKeysInit(t *testing.T) TestInput { getSubspace(paramsKeeper, slashingtypes.ModuleName).WithKeyTable(slashingtypes.ParamKeyTable()), ) - k := keeper.NewKeeper(marshaler, qgbKey, getSubspace(paramsKeeper, qgbtypes.DefaultParamspace), &stakingKeeper) - testQGBParams := qgbtypes.DefaultGenesis().Params - k.SetParams(ctx, *testQGBParams) + k := keeper.NewKeeper(marshaler, bsKey, getSubspace(paramsKeeper, bstypes.DefaultParamspace), &stakingKeeper) + testBlobStreamParams := bstypes.DefaultGenesis().Params + k.SetParams(ctx, *testBlobStreamParams) stakingKeeper = *stakingKeeper.SetHooks( stakingtypes.NewMultiStakingHooks( @@ -304,7 +304,7 @@ func CreateTestEnvWithoutQGBKeysInit(t *testing.T) TestInput { ), ) return TestInput{ - QgbKeeper: *k, + BStreamKeeper: *k, AccountKeeper: accountKeeper, BankKeeper: bankKeeper, StakingKeeper: stakingKeeper, @@ -316,11 +316,11 @@ func CreateTestEnvWithoutQGBKeysInit(t *testing.T) TestInput { } } -// CreateTestEnv creates the keeper testing environment for QGB +// CreateTestEnv creates the keeper testing environment for BlobStream func CreateTestEnv(t *testing.T) TestInput { - input := CreateTestEnvWithoutQGBKeysInit(t) - input.QgbKeeper.SetLatestAttestationNonce(input.Context, qgb.InitialLatestAttestationNonce) - input.QgbKeeper.SetEarliestAvailableAttestationNonce(input.Context, qgb.InitialEarliestAvailableAttestationNonce) + input := CreateTestEnvWithoutBlobStreamKeysInit(t) + input.BStreamKeeper.SetLatestAttestationNonce(input.Context, blobstream.InitialLatestAttestationNonce) + input.BStreamKeeper.SetEarliestAvailableAttestationNonce(input.Context, blobstream.InitialEarliestAvailableAttestationNonce) return input } @@ -334,7 +334,7 @@ func MakeTestCodec() *codec.LegacyAmino { sdk.RegisterLegacyAminoCodec(cdc) ccodec.RegisterCrypto(cdc) params.AppModuleBasic{}.RegisterLegacyAminoCodec(cdc) - qgbtypes.RegisterLegacyAminoCodec(cdc) + bstypes.RegisterLegacyAminoCodec(cdc) return cdc } @@ -349,7 +349,7 @@ func MakeTestMarshaler() codec.Codec { interfaceRegistry := codectypes.NewInterfaceRegistry() std.RegisterInterfaces(interfaceRegistry) ModuleBasics.RegisterInterfaces(interfaceRegistry) - qgbtypes.RegisterInterfaces(interfaceRegistry) + bstypes.RegisterInterfaces(interfaceRegistry) return codec.NewProtoCodec(interfaceRegistry) } @@ -391,8 +391,8 @@ func CreateValidator( ) // Set the balance for the account - require.NoError(t, input.BankKeeper.MintCoins(input.Context, qgbtypes.ModuleName, InitCoins)) - err := input.BankKeeper.SendCoinsFromModuleToAccount(input.Context, qgbtypes.ModuleName, acc.GetAddress(), InitCoins) + require.NoError(t, input.BankKeeper.MintCoins(input.Context, bstypes.ModuleName, InitCoins)) + err := input.BankKeeper.SendCoinsFromModuleToAccount(input.Context, bstypes.ModuleName, acc.GetAddress(), InitCoins) require.NoError(t, err) // Set the account in state @@ -411,9 +411,9 @@ func RegisterEVMAddress( valAddr sdk.ValAddress, evmAddr gethcommon.Address, ) { - qgbMsgServer := keeper.NewMsgServerImpl(input.QgbKeeper) - registerMsg := qgbtypes.NewMsgRegisterEVMAddress(valAddr, evmAddr) - _, err := qgbMsgServer.RegisterEVMAddress(input.Context, registerMsg) + bsMsgServer := keeper.NewMsgServerImpl(input.BStreamKeeper) + registerMsg := bstypes.NewMsgRegisterEVMAddress(valAddr, evmAddr) + _, err := bsMsgServer.RegisterEVMAddress(input.Context, registerMsg) require.NoError(t, err) } @@ -450,7 +450,7 @@ func SetupTestChain(t *testing.T, weights []uint64) (TestInput, sdk.Context) { // Initialize each of the validators stakingMsgServer := stakingkeeper.NewMsgServerImpl(input.StakingKeeper) - qgbMsgServer := keeper.NewMsgServerImpl(input.QgbKeeper) + bsMsgServer := keeper.NewMsgServerImpl(input.BStreamKeeper) for i, weight := range weights { consPrivKey := ed25519.GenPrivKey() consPubKey := consPrivKey.PubKey() @@ -467,8 +467,8 @@ func SetupTestChain(t *testing.T, weights []uint64) (TestInput, sdk.Context) { // Set the balance for the account weightCoins := sdk.NewCoins(sdk.NewInt64Coin(TestingStakeParams.BondDenom, int64(weight))) - require.NoError(t, input.BankKeeper.MintCoins(input.Context, qgbtypes.ModuleName, weightCoins)) - require.NoError(t, input.BankKeeper.SendCoinsFromModuleToAccount(input.Context, qgbtypes.ModuleName, accAddr, weightCoins)) + require.NoError(t, input.BankKeeper.MintCoins(input.Context, bstypes.ModuleName, weightCoins)) + require.NoError(t, input.BankKeeper.SendCoinsFromModuleToAccount(input.Context, bstypes.ModuleName, accAddr, weightCoins)) // Set the account in state input.AccountKeeper.SetAccount(input.Context, acc) @@ -481,8 +481,8 @@ func SetupTestChain(t *testing.T, weights []uint64) (TestInput, sdk.Context) { ) require.NoError(t, err) - registerMsg := qgbtypes.NewMsgRegisterEVMAddress(valAddr, EVMAddrs[i]) - _, err = qgbMsgServer.RegisterEVMAddress(input.Context, registerMsg) + registerMsg := bstypes.NewMsgRegisterEVMAddress(valAddr, EVMAddrs[i]) + _, err = bsMsgServer.RegisterEVMAddress(input.Context, registerMsg) require.NoError(t, err) // Run the staking endblocker to ensure valset is correct in state @@ -503,25 +503,25 @@ func NewTestMsgUnDelegateValidator(address sdk.ValAddress, amt cosmosmath.Int) * return msg } -// ExecuteQGBHeights executes the end exclusive range of heights specified by beginHeight and endHeight -// along with the QGB 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 ExecuteQGBHeights(ctx sdk.Context, qgbKeeper 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) - qgb.EndBlocker(ctx, qgbKeeper) + blobstream.EndBlocker(ctx, bsKeeper) } return ctx } -// ExecuteQGBHeightsWithTime executes the end exclusive range of heights specified by beginHeight and endHeight -// along with the QGB 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 ExecuteQGBHeightsWithTime(ctx sdk.Context, qgbKeeper 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) - qgb.EndBlocker(ctx, qgbKeeper) + blobstream.EndBlocker(ctx, bsKeeper) blockTime = blockTime.Add(blockInterval) } return ctx diff --git a/test/util/testnode/full_node.go b/test/util/testnode/full_node.go index 18391ca17b..738b646716 100644 --- a/test/util/testnode/full_node.go +++ b/test/util/testnode/full_node.go @@ -28,7 +28,7 @@ import ( "github.com/celestiaorg/celestia-app/app" "github.com/celestiaorg/celestia-app/app/encoding" - qgbtypes "github.com/celestiaorg/celestia-app/x/qgb/types" + bstypes "github.com/celestiaorg/celestia-app/x/blobstream/types" ) // NewCometNode creates a ready to use comet node that operates a single @@ -138,10 +138,10 @@ func DefaultGenesisState(fundedAccounts ...string) (map[string]json.RawMessage, state[banktypes.ModuleName] = encCfg.Codec.MustMarshalJSON(&bankGenState) // use the minimum data commitment window (100) - var qgbGenState qgbtypes.GenesisState - encCfg.Codec.MustUnmarshalJSON(state[qgbtypes.ModuleName], &qgbGenState) - qgbGenState.Params.DataCommitmentWindow = qgbtypes.MinimumDataCommitmentWindow - state[qgbtypes.ModuleName] = encCfg.Codec.MustMarshalJSON(&qgbGenState) + var bsGenState bstypes.GenesisState + encCfg.Codec.MustUnmarshalJSON(state[bstypes.ModuleName], &bsGenState) + bsGenState.Params.DataCommitmentWindow = bstypes.MinimumDataCommitmentWindow + state[bstypes.ModuleName] = encCfg.Codec.MustMarshalJSON(&bsGenState) return state, kr, nil } diff --git a/x/qgb/README.md b/x/blobstream/README.md similarity index 75% rename from x/qgb/README.md rename to x/blobstream/README.md index 8cf791c16f..89511ec587 100644 --- a/x/qgb/README.md +++ b/x/blobstream/README.md @@ -1,14 +1,14 @@ -# `x/qgb` +# `x/blobstream` ## Concepts -This module contains the [Quantum Gravity Bridge](https://blog.celestia.org/celestiums/) (QGB) state machine implementation. +This module contains the [BlobStream](https://blog.celestia.org/celestiums/) state machine implementation. -The QGB state machine is responsible for creating attestations which are signed by [orchestrators](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/orchestrator.md), and submitted to EVM chains by [relayers](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md). +The BlobStream state machine is responsible for creating attestations which are signed by [orchestrators](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/orchestrator.md), and submitted to EVM chains by [relayers](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md). ### Attestations types -[Attestations](https://github.com/celestiaorg/celestia-app/blob/main/x/qgb/types/attestation.go#L10-L18) are requests for signatures generated by the state machine during the `EndBlock` phase. They facilitate alignment between orchestrators and relayers on which data to sign, and when to relay it. +[Attestations](https://github.com/celestiaorg/celestia-app/blob/main/x/blobstream/types/attestation.go#L10-L18) are requests for signatures generated by the state machine during the `EndBlock` phase. They facilitate alignment between orchestrators and relayers on which data to sign, and when to relay it. There are two types of attestations, [valsets](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/proto/celestia/qgb/v1/types.proto#L18-L33) and [data commitments](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/proto/celestia/qgb/v1/types.proto#L35-L55). @@ -16,12 +16,12 @@ There are two types of attestations, [valsets](https://github.com/celestiaorg/ce A valset is an attestation type representing a validator set change. It allows for the validator set to change over heights which in turn defines which orchestrator should sign the attestations. -When an orchestrator sees a newly generated valset published by the Celestia state machine, it queries the previous valset and checks whether it's part of its validator set. Then, the orchestrator signs the new valset and submits that signature to the [QGB P2P network](https://github.com/celestiaorg/orchestrator-relayer/pull/66). Otherwise, it ignores it and waits for new attestations. +When an orchestrator sees a newly generated valset published by the Celestia state machine, it queries the previous valset and checks whether it's part of its validator set. Then, the orchestrator signs the new valset and submits that signature to the [BlobStream P2P network](https://github.com/celestiaorg/orchestrator-relayer/pull/66). Otherwise, it ignores it and waits for new attestations. A valset is comprised of the following fields: ```protobuf -// 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 { @@ -51,16 +51,16 @@ message BridgeValidator { } ``` -1. `nonce`: is the universal nonce of the attestation. It is used to prevent front running attacks in the QGB smart contract. More details can be found in [ADR-004](https://github.com/celestiaorg/celestia-app/blob/main/docs/architecture/adr-004-qgb-relayer-security.md). +1. `nonce`: is the universal nonce of the attestation. It is used to prevent front running attacks in the BlobStream smart contract. More details can be found in [ADR-004](https://github.com/celestiaorg/celestia-app/blob/main/docs/architecture/adr-004-qgb-relayer-security.md). 2. `members`: contains the current validator set. 3. `height`: is the height at which the valset was created. 4. `time`: is the timestamp of the height at which the valset was created. #### Validator power normalization -The [QGB bridge power](https://github.com/celestiaorg/celestia-app/blob/6243f26fc419c32940d5dc4eb60b0e0aaf08eaa7/proto/celestia/qgb/v1/types.proto#L12-L13) is obtained by [normalizing](https://github.com/celestiaorg/celestia-app/blob/6243f26fc419c32940d5dc4eb60b0e0aaf08eaa7/x/qgb/keeper/keeper_valset.go#L125-L150) the validators' voting power using the [min-max normalization](https://en.wikipedia.org/wiki/Feature_scaling) formula. This formula takes into account the ratio of each validator's voting power to the total voting power in the block and scales it to a value between `0` and `2^32`. +The [BlobStream bridge power](https://github.com/celestiaorg/celestia-app/blob/6243f26fc419c32940d5dc4eb60b0e0aaf08eaa7/proto/celestia/qgb/v1/types.proto#L12-L13) is obtained by [normalizing](https://github.com/celestiaorg/celestia-app/blob/6243f26fc419c32940d5dc4eb60b0e0aaf08eaa7/x/qgb/keeper/keeper_valset.go#L125-L150) the validators' voting power using the [min-max normalization](https://en.wikipedia.org/wiki/Feature_scaling) formula. This formula takes into account the ratio of each validator's voting power to the total voting power in the block and scales it to a value between `0` and `2^32`. -By normalizing the voting power, we can significantly reduce the frequency of generating new validator set updates. For example, if there is a small increase in the total on-chain voting power due to inflation, there is no need to create a new validator set. This is because the relative proportions of the validators remain the same, and the normalized QGB power doesn't show any significant difference. +By normalizing the voting power, we can significantly reduce the frequency of generating new validator set updates. For example, if there is a small increase in the total on-chain voting power due to inflation, there is no need to create a new validator set. This is because the relative proportions of the validators remain the same, and the normalized BlobStream power doesn't show any significant difference. To ensure that the normalization process doesn't encounter overflow errors, the function normalizeValidatorPower uses [`BigInt`](https://github.com/celestiaorg/celestia-app/blob/6243f26fc419c32940d5dc4eb60b0e0aaf08eaa7/x/qgb/keeper/keeper_valset.go#LL142C1-L142C1) operations. It scales the raw power value with respect to the total validator power, making sure the result falls within the range of 0 to `2^32`. @@ -68,13 +68,13 @@ This mechanism allows to increase/decrease the frequency at which validator set #### Power diff -[`PowerDiff(...)`](https://github.com/celestiaorg/celestia-app/blob/6243f26fc419c32940d5dc4eb60b0e0aaf08eaa7/x/qgb/types/validator.go#L100-L141) is a function that calculates the difference in power between two sets of bridge validators. It's important to note that the power being compared is not the regular voting power in the Celestia consensus network, but a specific type called QGB bridge power (explained above). +[`PowerDiff(...)`](https://github.com/celestiaorg/celestia-app/blob/6243f26fc419c32940d5dc4eb60b0e0aaf08eaa7/x/qgb/types/validator.go#L100-L141) is a function that calculates the difference in power between two sets of bridge validators. It's important to note that the power being compared is not the regular voting power in the Celestia consensus network, but a specific type called BlobStream bridge power (explained above). ### Data commitments -A data commitment is an attestation type representing a request to commit over a set of blocks. It provides an end exclusive range of blocks for orchestrators to sign over and propagate in the QGB P2P network. The range is defined by the param [`DataCommitmentWindow`](https://github.com/celestiaorg/celestia-app/blob/fc83b04c3a5638ac8d415770e38a4046b84fa128/x/qgb/keeper/keeper_data_commitment.go#L44-L50), more on this below. +A data commitment is an attestation type representing a request to commit over a set of blocks. It provides an end exclusive range of blocks for orchestrators to sign over and propagate in the BlobStream P2P network. The range is defined by the param [`DataCommitmentWindow`](https://github.com/celestiaorg/celestia-app/blob/fc83b04c3a5638ac8d415770e38a4046b84fa128/x/qgb/keeper/keeper_data_commitment.go#L44-L50), more on this below. -When an orchestrator sees a newly generated data commitment, it queries the previous valset and checks whether it's part of its validator set. Then, the orchestrator signs the new data commitment and submits that signature to the [QGB P2P network](https://github.com/celestiaorg/orchestrator-relayer/pull/66). Otherwise, it ignores it and waits for new attestations. +When an orchestrator sees a newly generated data commitment, it queries the previous valset and checks whether it's part of its validator set. Then, the orchestrator signs the new data commitment and submits that signature to the [BlobStream P2P network](https://github.com/celestiaorg/orchestrator-relayer/pull/66). Otherwise, it ignores it and waits for new attestations. A data commitment is comprised of the following fields: @@ -102,7 +102,7 @@ message DataCommitment { } ``` -1. `nonce`: is the universal nonce of the attestation. It is used to prevent front running attacks in the QGB smart contract. More details can be found in [ADR-004](https://github.com/celestiaorg/celestia-app/blob/main/docs/architecture/adr-004-qgb-relayer-security.md). +1. `nonce`: is the universal nonce of the attestation. It is used to prevent front running attacks in the BlobStream smart contract. More details can be found in [ADR-004](https://github.com/celestiaorg/celestia-app/blob/main/docs/architecture/adr-004-qgb-relayer-security.md). 2. `begin_block`: the data commitment range first block. 3. `end_block`: the data commitment range last block. The range is end exclusive. Thus, the commitment will be over the set of blocks defined by `[begin_block, end_block)`. 4. `time`: is the timestamp of the height at which the data commitment was created. @@ -132,7 +132,7 @@ struct DataRootTuple { 2. `dataRoot`: the data root, aka data hash, of the block. 3. `squareSize`: the [square](https://celestiaorg.github.io/celestia-app/specs/data_structures.html#arranging-available-data-into-shares) size of the block. -These commitments are queried by orchestrators from [Celestia-core](https://github.com/celestiaorg/celestia-core/blob/d280f37a8376ed54ae03b10896fa25a4cbbc6d5b/rpc/core/blocks.go#L178-L195), signed, then submitted to the QGB P2P network as described [here](https://github.com/celestiaorg/orchestrator-relayer/blob/35b5df94c1602eb5e93a32d1bc6e5c8a4b5861e5/orchestrator/orchestrator.go#L331-L357). +These commitments are queried by orchestrators from [Celestia-core](https://github.com/celestiaorg/celestia-core/blob/d280f37a8376ed54ae03b10896fa25a4cbbc6d5b/rpc/core/blocks.go#L178-L195), signed, then submitted to the BlobStream P2P network as described [here](https://github.com/celestiaorg/orchestrator-relayer/blob/35b5df94c1602eb5e93a32d1bc6e5c8a4b5861e5/orchestrator/orchestrator.go#L331-L357). ## State @@ -147,13 +147,13 @@ Both types of attestations are set using the [`SetAttestationRequest(...)`](http ### Latest attestation nonce -The latest attestation nonce represents the most recently generated nonce in the QGB state machine store. It is [initialized to 0](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/x/qgb/genesis.go#L12) in genesis, and gets incremented at block 1. +The latest attestation nonce represents the most recently generated nonce in the BlobStream state machine store. It is [initialized to 0](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/x/qgb/genesis.go#L12) in genesis, and gets incremented at block 1. | Name | Key | |------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------| | LatestAttestationNonce | [`[LatestAttestationNonce]`](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/x/qgb/types/keys.go#L32-L33) | -The latest attestation nonce can be set to the QGB state machine store using the [`SetLatestAttestationNonce(...)`](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/x/qgb/keeper/keeper_attestation.go#L44-L57) method and retrieved using the [`GetLatestAttestationNonce(...)`](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/x/qgb/keeper/keeper_attestation.go#L67-L79). +The latest attestation nonce can be set to the BlobStream state machine store using the [`SetLatestAttestationNonce(...)`](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/x/qgb/keeper/keeper_attestation.go#L44-L57) method and retrieved using the [`GetLatestAttestationNonce(...)`](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/x/qgb/keeper/keeper_attestation.go#L67-L79). To check if the latest attestation nonce is defined in store, use the [`CheckLatestAttestationNonce(...)`](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/x/qgb/keeper/keeper_attestation.go#L59-L65) method. @@ -166,17 +166,17 @@ The latest unbonding height indicates the most recent height at which some valid |------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------| | LatestUnBondingBlockHeight | [`[LatestUnBondingBlockHeight]`](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/types/keys.go#L28-L30) | -The latest unbonding height can be set to the QGB state machine store using the [`SetLatestUnBondingBlockHeight(...)`](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/keeper/keeper_valset.go#L58-L64) method, and it is called in a `hook` when a validator starts unbonding. More details on hooks are below. +The latest unbonding height can be set to the BlobStream state machine store using the [`SetLatestUnBondingBlockHeight(...)`](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/keeper/keeper_valset.go#L58-L64) method, and it is called in a `hook` when a validator starts unbonding. More details on hooks are below. ### Earliest attestation nonce -The earliest attestation nonce corresponds to the nonce of the earliest generated attestation in the QGB state machine store. It is [initialized to 1](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/genesis.go#L13-L17) in genesis, and gets incremented updated when [pruning](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/abci.go#L184-L185). +The earliest attestation nonce corresponds to the nonce of the earliest generated attestation in the BlobStream state machine store. It is [initialized to 1](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/genesis.go#L13-L17) in genesis, and gets incremented updated when [pruning](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/abci.go#L184-L185). | Name | Key | |------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------| | EarliestAvailableAttestationNonce | [`[EarliestAvailableAttestationNonce]`](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/types/keys.go#L35-L37) | -The earliest attestation nonce can be set to the QGB state machine store using the [`SetEarliestAvailableAttestationNonce(...)`](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/keeper/keeper_attestation.go#L104-L110) method, and retrieved using the [`GetEarliestAvailableAttestationNonce(...)`](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/keeper/keeper_attestation.go#L89-L102). +The earliest attestation nonce can be set to the BlobStream state machine store using the [`SetEarliestAvailableAttestationNonce(...)`](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/keeper/keeper_attestation.go#L104-L110) method, and retrieved using the [`GetEarliestAvailableAttestationNonce(...)`](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/keeper/keeper_attestation.go#L89-L102). To check if the earliest attestation nonce is defined in store, use the [`CheckEarliestAvailableAttestationNonce(...)`](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/keeper/keeper_attestation.go#L81-L87) method. @@ -216,13 +216,13 @@ After a range update, the [`handler`](https://github.com/celestiaorg/celestia-ap ### Pruning -The third action done during the QGB [`EndBlock`](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/abci.go#L28-L35) step is pruning. +The third action done during the BlobStream [`EndBlock`](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/abci.go#L28-L35) step is pruning. -The QGB state machine prunes old attestations up to the specified [`AttestationExpiryTime`](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/abci.go#L22-L25), which is currently set to 3 weeks, matching the consensus unbonding time. +The BlobStream state machine prunes old attestations up to the specified [`AttestationExpiryTime`](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/abci.go#L22-L25), which is currently set to 3 weeks, matching the consensus unbonding time. So, on every block height, the state machine [checks](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/abci.go#L140-L157) whether there are any [`expired`](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/abci.go#L22-L25) attestations. Then, it starts [pruning](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/abci.go#L161-L182) via calling the [`DeleteAttestation(...)`](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/keeper/keeper_attestation.go#L128-L139) method. Then, it [`prints`](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/abci.go#L186-L194) a log message specifying the number of pruned attestations. -If the all the attestations in store are expired, which is an edge case that should never occur, the QGB state machine [doesn't prune](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/abci.go#L161) the latest attestation. +If the all the attestations in store are expired, which is an edge case that should never occur, the BlobStream state machine [doesn't prune](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/abci.go#L161) the latest attestation. ### Hooks @@ -234,20 +234,20 @@ When a validator starts unbonding, a [hook](https://github.com/celestiaorg/celes ### New attestation event -After creating a new attestation, and adding it to the QGB store, an event is [emitted](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/keeper/keeper_attestation.go#L16-L22) containing its nonce. +After creating a new attestation, and adding it to the BlobStream store, an event is [emitted](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/keeper/keeper_attestation.go#L16-L22) containing its nonce. ## Client ### Query attestation command -The QGB query attestation command is part of the `celestia-appd` binary. It allows the user to query specific attestations by their corresponding nonce. +The BlobStream query attestation command is part of the `celestia-appd` binary. It allows the user to query specific attestations by their corresponding nonce. ```shell -$ celestia-appd query qgb attestation --help +$ celestia-appd query blobstream attestation --help query an attestation by nonce Usage: - celestia-appd query qgb attestation [flags] + celestia-appd query blobstream attestation [flags] Aliases: attestation, att @@ -255,20 +255,20 @@ Aliases: ### Verification command -The QGB verification command is part of the `celestia-appd` binary. It allows the user to verify that a set of shares has been posted to a specific QGB contract. +The BlobStream verification command is part of the `celestia-appd` binary. It allows the user to verify that a set of shares has been posted to a specific BlobStream contract. ```shell $ celestia-appd verify --help -Verifies that a transaction hash, a range of shares, or a blob referenced by its transaction hash were committed to by the QGB contract +Verifies that a transaction hash, a range of shares, or a blob referenced by its transaction hash were committed to by the BlobStream contract Usage: celestia-appd verify [command] Available Commands: - blob Verifies that a blob, referenced by its transaction hash, in hex format, has been committed to by the QGB contract. - shares Verifies that a range of shares has been committed to by the QGB contract - tx Verifies that a transaction hash, in hex format, has been committed to by the QGB contract + blob Verifies that a blob, referenced by its transaction hash, in hex format, has been committed to by the BlobStream contract. + shares Verifies that a range of shares has been committed to by the BlobStream contract + tx Verifies that a transaction hash, in hex format, has been committed to by the BlobStream contract Flags: -h, --help help for verify @@ -278,9 +278,9 @@ Use "celestia-appd verify [command] --help" for more information about a command It currently supports three sub-commands: -- `blob`: Takes a transaction hash, in hex format, and verifies that the blob paid for by the transaction has been committed to by the QGB contract. It only supports one blob for now. -- `shares`: Takes a range of shares and a height, and verifies that these shares have been committed to by the QGB contract. -- `tx`: Takes a transaction hash, in hex format, and verifies that it has been committed to by the QGB contract. +- `blob`: Takes a transaction hash, in hex format, and verifies that the blob paid for by the transaction has been committed to by the BlobStream contract. It only supports one blob for now. +- `shares`: Takes a range of shares and a height, and verifies that these shares have been committed to by the BlobStream contract. +- `tx`: Takes a transaction hash, in hex format, and verifies that it has been committed to by the BlobStream contract. ## Params @@ -370,13 +370,13 @@ if k.CheckLatestAttestationNonce(ctx) && k.GetLatestAttestationNonce(ctx)+1 != n ### Hooks initialization panic -When initializing the QGB hooks, if the QGB store key is not setup correctly, the state machine will [panic](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/keeper/hooks.go#L14-L19): +When initializing the BlobStream hooks, if the BlobStream store key is not setup correctly, the state machine will [panic](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/keeper/hooks.go#L14-L19): ```golang // if startup is mis-ordered in app.go this hook will halt the chain when // called. Keep this check to make such a mistake obvious if k.storeKey == nil { - panic("hooks initialized before QGBKeeper") + panic("hooks initialized before BlobStreamKeeper") } ``` @@ -386,4 +386,4 @@ The smart contract implementation is in [quantum-gravity-bridge](https://github. The orchestrator and relayer implementations are in the [orchestrator-relayer](https://github.com/celestiaorg/orchestrator-relayer) repo. -QGB ADRs are in the [docs](https://github.com/celestiaorg/celestia-app/tree/main/docs/architecture). +BlobStream ADRs are in the [docs](https://github.com/celestiaorg/celestia-app/tree/main/docs/architecture). diff --git a/x/qgb/abci.go b/x/blobstream/abci.go similarity index 97% rename from x/qgb/abci.go rename to x/blobstream/abci.go index b37457a446..e7c42a5d55 100644 --- a/x/qgb/abci.go +++ b/x/blobstream/abci.go @@ -1,4 +1,4 @@ -package qgb +package blobstream import ( "errors" @@ -6,8 +6,8 @@ import ( sdkerrors "cosmossdk.io/errors" - "github.com/celestiaorg/celestia-app/x/qgb/keeper" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/keeper" + "github.com/celestiaorg/celestia-app/x/blobstream/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -184,7 +184,7 @@ func pruneAttestations(ctx sdk.Context, k keeper.Keeper) { // some attestations were pruned and we need to update the state for it k.SetEarliestAvailableAttestationNonce(ctx, newEarliestAvailableNonce) ctx.Logger().Debug( - "pruned attestations from QGB store", + "pruned attestations from BlobStream store", "count", newEarliestAvailableNonce-earliestAttestation.GetNonce(), "new_earliest_available_nonce", diff --git a/x/qgb/abci_test.go b/x/blobstream/abci_test.go similarity index 86% rename from x/qgb/abci_test.go rename to x/blobstream/abci_test.go index 4ff2e21efb..0a3598f7fd 100644 --- a/x/qgb/abci_test.go +++ b/x/blobstream/abci_test.go @@ -1,15 +1,15 @@ -package qgb_test +package blobstream_test import ( + "github.com/celestiaorg/celestia-app/x/blobstream" "testing" "time" - "github.com/celestiaorg/celestia-app/x/qgb/keeper" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/keeper" + "github.com/celestiaorg/celestia-app/x/blobstream/types" testutil "github.com/celestiaorg/celestia-app/test/util" "github.com/celestiaorg/celestia-app/test/util/testfactory" - "github.com/celestiaorg/celestia-app/x/qgb" "github.com/cosmos/cosmos-sdk/x/staking" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" "github.com/stretchr/testify/assert" @@ -18,12 +18,12 @@ import ( func TestFirstAttestationIsValset(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - pk := input.QgbKeeper + pk := input.BStreamKeeper ctx = ctx.WithBlockHeight(1) expectedTime := ctx.BlockTime() // EndBlocker should set a new validator set - qgb.EndBlocker(ctx, pk) + blobstream.EndBlocker(ctx, pk) require.Equal(t, uint64(1), pk.GetLatestAttestationNonce(ctx)) attestation, found, err := pk.GetAttestationByNonce(ctx, 1) @@ -41,12 +41,12 @@ func TestFirstAttestationIsValset(t *testing.T) { func TestValsetCreationWhenValidatorUnbonds(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - pk := input.QgbKeeper + pk := input.BStreamKeeper ctx = ctx.WithBlockHeight(1) // run abci methods after chain init staking.EndBlocker(ctx, input.StakingKeeper) - qgb.EndBlocker(ctx, pk) + blobstream.EndBlocker(ctx, pk) // current attestation expectedNonce should be 1 because a valset has been emitted upon chain init. currentAttestationNonce := pk.GetLatestAttestationNonce(ctx) @@ -59,7 +59,7 @@ func TestValsetCreationWhenValidatorUnbonds(t *testing.T) { _, err := msgServer.Undelegate(ctx, undelegateMsg) require.NoError(t, err) staking.EndBlocker(ctx, input.StakingKeeper) - qgb.EndBlocker(ctx, pk) + blobstream.EndBlocker(ctx, pk) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 10) assert.Equal(t, currentAttestationNonce+1, pk.GetLatestAttestationNonce(ctx)) @@ -67,20 +67,20 @@ func TestValsetCreationWhenValidatorUnbonds(t *testing.T) { func TestValsetCreationWhenEditingEVMAddr(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - pk := input.QgbKeeper + pk := input.BStreamKeeper ctx = ctx.WithBlockHeight(1) // run abci methods after chain init staking.EndBlocker(ctx, input.StakingKeeper) - qgb.EndBlocker(ctx, pk) + blobstream.EndBlocker(ctx, pk) // current attestation expectedNonce should be 1 because a valset has been emitted upon chain init. currentAttestationNonce := pk.GetLatestAttestationNonce(ctx) require.Equal(t, uint64(1), currentAttestationNonce) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) - msgServer := keeper.NewMsgServerImpl(input.QgbKeeper) + msgServer := keeper.NewMsgServerImpl(input.BStreamKeeper) newEVMAddr := testfactory.RandomEVMAddress() registerMsg := types.NewMsgRegisterEVMAddress( @@ -90,7 +90,7 @@ func TestValsetCreationWhenEditingEVMAddr(t *testing.T) { _, err := msgServer.RegisterEVMAddress(ctx, registerMsg) require.NoError(t, err) staking.EndBlocker(ctx, input.StakingKeeper) - qgb.EndBlocker(ctx, pk) + blobstream.EndBlocker(ctx, pk) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 10) assert.Equal(t, currentAttestationNonce+1, pk.GetLatestAttestationNonce(ctx)) @@ -98,7 +98,7 @@ func TestValsetCreationWhenEditingEVMAddr(t *testing.T) { func TestSetValset(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - pk := input.QgbKeeper + pk := input.BStreamKeeper vs, err := pk.GetCurrentValset(ctx) require.Nil(t, err) @@ -110,7 +110,7 @@ func TestSetValset(t *testing.T) { func TestSetDataCommitment(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - qk := input.QgbKeeper + qk := input.BStreamKeeper ctx = ctx.WithBlockHeight(int64(qk.GetDataCommitmentWindowParam(ctx))) expectedTime := ctx.BlockTime() @@ -148,7 +148,7 @@ func TestSetDataCommitment(t *testing.T) { // table structure is to make it easy to understand the test flow. func TestGetDataCommitment(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - qk := input.QgbKeeper + qk := input.BStreamKeeper tests := []struct { name string @@ -223,13 +223,13 @@ func TestGetDataCommitment(t *testing.T) { func TestDataCommitmentCreation(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - qk := input.QgbKeeper + qk := input.BStreamKeeper ctx = ctx.WithBlockHeight(1) // run abci methods after chain init staking.EndBlocker(ctx, input.StakingKeeper) - qgb.EndBlocker(ctx, qk) + blobstream.EndBlocker(ctx, qk) // current attestation nonce should be 1 because a valset has been emitted // upon chain init. @@ -239,7 +239,7 @@ func TestDataCommitmentCreation(t *testing.T) { // increment height to be the same as the data commitment window newHeight := int64(qk.GetDataCommitmentWindowParam(ctx)) ctx = ctx.WithBlockHeight(newHeight) - qgb.EndBlocker(ctx, qk) + blobstream.EndBlocker(ctx, qk) require.LessOrEqual(t, newHeight, ctx.BlockHeight()) assert.Equal(t, uint64(2), qk.GetLatestAttestationNonce(ctx)) @@ -247,12 +247,12 @@ func TestDataCommitmentCreation(t *testing.T) { func TestDataCommitmentRange(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - qk := input.QgbKeeper + qk := input.BStreamKeeper ctx = ctx.WithBlockHeight(1) // run abci methods after chain init staking.EndBlocker(ctx, input.StakingKeeper) - qgb.EndBlocker(ctx, qk) + blobstream.EndBlocker(ctx, qk) // current attestation nonce should be 1 because a valset has been emitted // upon chain init. @@ -262,7 +262,7 @@ func TestDataCommitmentRange(t *testing.T) { // increment height to be the same as the data commitment window newHeight := int64(qk.GetDataCommitmentWindowParam(ctx)) + 1 ctx = ctx.WithBlockHeight(newHeight) - qgb.EndBlocker(ctx, qk) + blobstream.EndBlocker(ctx, qk) require.LessOrEqual(t, newHeight, ctx.BlockHeight()) assert.Equal(t, uint64(2), qk.GetLatestAttestationNonce(ctx)) @@ -279,7 +279,7 @@ func TestDataCommitmentRange(t *testing.T) { // increment height to 2*data commitment window newHeight = int64(qk.GetDataCommitmentWindowParam(ctx))*2 + 1 ctx = ctx.WithBlockHeight(newHeight) - qgb.EndBlocker(ctx, qk) + blobstream.EndBlocker(ctx, qk) att2, found, err := qk.GetAttestationByNonce(ctx, 3) require.NoError(t, err) @@ -293,7 +293,7 @@ func TestDataCommitmentRange(t *testing.T) { func TestHasDataCommitmentInStore(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - qk := input.QgbKeeper + qk := input.BStreamKeeper // set the data commitment window qk.SetParams(ctx, types.Params{DataCommitmentWindow: 400}) require.Equal(t, uint64(400), qk.GetDataCommitmentWindowParam(ctx)) @@ -356,24 +356,24 @@ func TestHasDataCommitmentInStore(t *testing.T) { // end of the test, the data commitments cover all the needed ranges. func TestDataCommitmentCreationCatchup(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - qk := input.QgbKeeper + qk := input.BStreamKeeper ctx = ctx.WithBlockHeight(1) // from height 1 to 1500 with a window of 400 qk.SetParams(ctx, types.Params{DataCommitmentWindow: 400}) - ctx = testutil.ExecuteQGBHeights(ctx, qk, 1, 1501) + ctx = testutil.ExecuteBlobStreamHeights(ctx, qk, 1, 1501) // change window to 100 and execute up to 1920 qk.SetParams(ctx, types.Params{DataCommitmentWindow: 100}) - ctx = testutil.ExecuteQGBHeights(ctx, qk, 1501, 1921) + ctx = testutil.ExecuteBlobStreamHeights(ctx, qk, 1501, 1921) // change window to 1000 and execute up to 3500 qk.SetParams(ctx, types.Params{DataCommitmentWindow: 1000}) - ctx = testutil.ExecuteQGBHeights(ctx, qk, 1921, 3501) + ctx = testutil.ExecuteBlobStreamHeights(ctx, qk, 1921, 3501) // change window to 111 and execute up to 3800 qk.SetParams(ctx, types.Params{DataCommitmentWindow: 111}) - ctx = testutil.ExecuteQGBHeights(ctx, qk, 3501, 3801) + ctx = testutil.ExecuteBlobStreamHeights(ctx, qk, 3501, 3801) // check if a data commitment was created hasDataCommitment, err := qk.HasDataCommitmentInStore(ctx) @@ -516,53 +516,53 @@ func TestDataCommitmentCreationCatchup(t *testing.T) { } // TestPruning tests the pruning mechanism by: 1. Generating a set of -// attestations 2. Running the QGB EndBlocker 3. Verifying that the expired +// attestations 2. Running the BlobStream EndBlocker 3. Verifying that the expired // attestations are pruned func TestPruning(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - qgbKeeper := input.QgbKeeper + bsKeeper := input.BStreamKeeper // set the data commitment window window := uint64(101) - qgbKeeper.SetParams(ctx, types.Params{DataCommitmentWindow: window}) + bsKeeper.SetParams(ctx, types.Params{DataCommitmentWindow: window}) initialBlockTime := ctx.BlockTime() blockInterval := 10 * time.Minute - ctx = testutil.ExecuteQGBHeightsWithTime(ctx, qgbKeeper, 1, 1626, blockInterval) + ctx = testutil.ExecuteBlobStreamHeightsWithTime(ctx, bsKeeper, 1, 1626, blockInterval) // check that we created a number of attestations - assert.Equal(t, uint64(17), qgbKeeper.GetLatestAttestationNonce(ctx)) + assert.Equal(t, uint64(17), bsKeeper.GetLatestAttestationNonce(ctx)) // check that no pruning occurs if no attestations expired - for nonce := uint64(1); nonce <= qgbKeeper.GetLatestAttestationNonce(ctx); nonce++ { - _, found, err := qgbKeeper.GetAttestationByNonce(ctx, nonce) + for nonce := uint64(1); nonce <= bsKeeper.GetLatestAttestationNonce(ctx); nonce++ { + _, found, err := bsKeeper.GetAttestationByNonce(ctx, nonce) assert.NoError(t, err) assert.True(t, found) } // continue executing heights - ctx = testutil.ExecuteQGBHeightsWithTime(ctx, qgbKeeper, 1626, 5000, blockInterval) + ctx = testutil.ExecuteBlobStreamHeightsWithTime(ctx, bsKeeper, 1626, 5000, blockInterval) - earliestAttestationNonce := qgbKeeper.GetEarliestAvailableAttestationNonce(ctx) + earliestAttestationNonce := bsKeeper.GetEarliestAvailableAttestationNonce(ctx) assert.Equal(t, uint64(21), earliestAttestationNonce) // check that the first attestations were pruned for nonce := uint64(1); nonce < earliestAttestationNonce; nonce++ { - _, found, err := qgbKeeper.GetAttestationByNonce(ctx, nonce) + _, found, err := bsKeeper.GetAttestationByNonce(ctx, nonce) assert.NoError(t, err) assert.False(t, found) } // check that the attestations after those still exist - for nonce := qgbKeeper.GetEarliestAvailableAttestationNonce(ctx); nonce <= qgbKeeper.GetLatestAttestationNonce(ctx); nonce++ { - at, found, err := qgbKeeper.GetAttestationByNonce(ctx, nonce) + for nonce := bsKeeper.GetEarliestAvailableAttestationNonce(ctx); nonce <= bsKeeper.GetLatestAttestationNonce(ctx); nonce++ { + at, found, err := bsKeeper.GetAttestationByNonce(ctx, nonce) assert.NoError(t, err) assert.True(t, found) // make sure the remaining attestations have not expired yet - assert.True(t, initialBlockTime.Before(at.BlockTime().Add(qgb.AttestationExpiryTime))) + assert.True(t, initialBlockTime.Before(at.BlockTime().Add(blobstream.AttestationExpiryTime))) } // check that no valset exists in store - for nonce := qgbKeeper.GetEarliestAvailableAttestationNonce(ctx); nonce <= qgbKeeper.GetLatestAttestationNonce(ctx); nonce++ { - at, found, err := qgbKeeper.GetAttestationByNonce(ctx, nonce) + for nonce := bsKeeper.GetEarliestAvailableAttestationNonce(ctx); nonce <= bsKeeper.GetLatestAttestationNonce(ctx); nonce++ { + at, found, err := bsKeeper.GetAttestationByNonce(ctx, nonce) assert.NoError(t, err) assert.True(t, found) _, ok := at.(*types.DataCommitment) @@ -570,11 +570,11 @@ func TestPruning(t *testing.T) { } // check that we still can get a valset even after pruning all of them - vs, err := qgbKeeper.GetLatestValset(ctx) + vs, err := bsKeeper.GetLatestValset(ctx) assert.NoError(t, err) assert.NotNil(t, vs) // continue running the chain for a few more blocks to be sure no // inconsistency happens after pruning - testutil.ExecuteQGBHeightsWithTime(ctx, qgbKeeper, 5000, 6000, blockInterval) + testutil.ExecuteBlobStreamHeightsWithTime(ctx, bsKeeper, 5000, 6000, blockInterval) } diff --git a/x/qgb/client/config.go b/x/blobstream/client/config.go similarity index 98% rename from x/qgb/client/config.go rename to x/blobstream/client/config.go index d8fd26cfc0..0f67258d7b 100644 --- a/x/qgb/client/config.go +++ b/x/blobstream/client/config.go @@ -21,7 +21,7 @@ func addVerifyFlags(cmd *cobra.Command) *cobra.Command { cmd.Flags().Uint64P(evmChainIDFlag, "z", 5, "The EVM chain ID") cmd.Flags().StringP(flags.FlagNode, "t", "http://localhost:26657", ": to Tendermint RPC interface for this chain") cmd.Flags().StringP(evmRPCFlag, "e", "http://localhost:8545", "The EVM RPC address") - cmd.Flags().StringP(contractAddressFlag, "a", "", "The contract address at which the QGB is deployed") + cmd.Flags().StringP(contractAddressFlag, "a", "", "The contract address at which the BlobStream is deployed") cmd.Flags().StringP(celesGRPCFlag, "c", "localhost:9090", ": To Celestia GRPC address") return cmd diff --git a/x/qgb/client/query.go b/x/blobstream/client/query.go similarity index 94% rename from x/qgb/client/query.go rename to x/blobstream/client/query.go index 5a45b6d1b7..95ab18c81f 100644 --- a/x/qgb/client/query.go +++ b/x/blobstream/client/query.go @@ -5,7 +5,7 @@ import ( "fmt" "strconv" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" codectypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -15,7 +15,7 @@ import ( // GetQueryCmd returns the CLI query commands for this module func GetQueryCmd() *cobra.Command { - // Group qgb queries under a subcommand + // Group BlobStream queries under a subcommand cmd := &cobra.Command{ Use: types.ModuleName, Short: fmt.Sprintf("Querying commands for the %s module", types.ModuleName), @@ -115,7 +115,7 @@ func unmarshallAttestation(attestation *codectypes.Any) (types.AttestationReques return unmarshalledAttestation, nil } -// makeInterfaceRegistry creates the interface registry containing the QGB interfaces +// makeInterfaceRegistry creates the interface registry containing the BlobStream interfaces func makeInterfaceRegistry() codectypes.InterfaceRegistry { // create the codec interfaceRegistry := codectypes.NewInterfaceRegistry() @@ -123,7 +123,7 @@ func makeInterfaceRegistry() codectypes.InterfaceRegistry { // register the standard types from the sdk std.RegisterInterfaces(interfaceRegistry) - // register the qgb module interfaces + // register the blobstream module interfaces types.RegisterInterfaces(interfaceRegistry) return interfaceRegistry diff --git a/x/qgb/client/query_test.go b/x/blobstream/client/query_test.go similarity index 95% rename from x/qgb/client/query_test.go rename to x/blobstream/client/query_test.go index 65789ba989..8f9d87a7b8 100644 --- a/x/qgb/client/query_test.go +++ b/x/blobstream/client/query_test.go @@ -3,7 +3,7 @@ package client_test import ( "testing" - "github.com/celestiaorg/celestia-app/x/qgb/client" + "github.com/celestiaorg/celestia-app/x/blobstream/client" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" ) diff --git a/x/qgb/client/suite_test.go b/x/blobstream/client/suite_test.go similarity index 83% rename from x/qgb/client/suite_test.go rename to x/blobstream/client/suite_test.go index d504908174..4ab7f4f24f 100644 --- a/x/qgb/client/suite_test.go +++ b/x/blobstream/client/suite_test.go @@ -20,9 +20,9 @@ type CLITestSuite struct { func (s *CLITestSuite) SetupSuite() { if testing.Short() { - s.T().Skip("skipping QGB CLI tests in short mode.") + s.T().Skip("skipping BlobStream CLI tests in short mode.") } - s.T().Log("setting up QGB CLI test suite") + s.T().Log("setting up BlobStream CLI test suite") cfg := network.DefaultConfig() cfg.EnableTMLogging = false @@ -46,10 +46,10 @@ func (s *CLITestSuite) SetupSuite() { } func (s *CLITestSuite) TearDownSuite() { - s.T().Log("tearing down QGB CLI test suite") + s.T().Log("tearing down BlobStream CLI test suite") s.network.Cleanup() } -func TestQGBCLI(t *testing.T) { +func TestBlobStreamCLI(t *testing.T) { suite.Run(t, new(CLITestSuite)) } diff --git a/x/qgb/client/tx.go b/x/blobstream/client/tx.go similarity index 91% rename from x/qgb/client/tx.go rename to x/blobstream/client/tx.go index 585b737910..38672cd85c 100644 --- a/x/qgb/client/tx.go +++ b/x/blobstream/client/tx.go @@ -3,7 +3,7 @@ package client import ( "fmt" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" @@ -30,7 +30,7 @@ func CmdRegisterEVMAddress() *cobra.Command { Use: "register [valAddress] [evmAddress]", Short: "Register an EVM address for a validator", Long: `Registers an EVM address for a validator. This address will be used to -sign attestations as part of the QGB protocol. Only the validator, as the signer, +sign attestations as part of the BlobStream protocol. Only the validator, as the signer, can register an EVM address. To change the EVM address, the validator can simply send a new message overriding the previous one. `, diff --git a/x/qgb/client/verify.go b/x/blobstream/client/verify.go similarity index 88% rename from x/qgb/client/verify.go rename to x/blobstream/client/verify.go index ea31793fcf..42f845c565 100644 --- a/x/qgb/client/verify.go +++ b/x/blobstream/client/verify.go @@ -11,7 +11,7 @@ import ( "github.com/tendermint/tendermint/crypto/merkle" "github.com/celestiaorg/celestia-app/pkg/square" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/types" wrapper "github.com/celestiaorg/quantum-gravity-bridge/v2/wrappers/QuantumGravityBridge.sol" "github.com/ethereum/go-ethereum/ethclient" "github.com/spf13/cobra" @@ -24,7 +24,7 @@ import ( func VerifyCmd() *cobra.Command { command := &cobra.Command{ Use: "verify", - Short: "Verifies that a transaction hash, a range of shares, or a blob referenced by its transaction hash were committed to by the QGB contract", + Short: "Verifies that a transaction hash, a range of shares, or a blob referenced by its transaction hash were committed to by the BlobStream contract", } command.AddCommand( txCmd(), @@ -38,7 +38,7 @@ func txCmd() *cobra.Command { command := &cobra.Command{ Use: "tx ", Args: cobra.ExactArgs(1), - Short: "Verifies that a transaction hash, in hex format, has been committed to by the QGB contract", + Short: "Verifies that a transaction hash, in hex format, has been committed to by the BlobStream contract", RunE: func(cmd *cobra.Command, args []string) error { txHash, err := hex.DecodeString(args[0]) if err != nil { @@ -72,7 +72,7 @@ func txCmd() *cobra.Command { return err } - logger.Info("verifying that the transaction was committed to by the QGB", "tx_hash", args[0], "height", tx.Height) + logger.Info("verifying that the transaction was committed to by the BlobStream", "tx_hash", args[0], "height", tx.Height) blockRes, err := trpc.Block(cmd.Context(), &tx.Height) if err != nil { @@ -95,7 +95,7 @@ func blobCmd() *cobra.Command { command := &cobra.Command{ Use: "blob ", Args: cobra.ExactArgs(2), - Short: "Verifies that a blob, referenced by its transaction hash, in hex format, has been committed to by the QGB contract", + Short: "Verifies that a blob, referenced by its transaction hash, in hex format, has been committed to by the BlobStream contract", RunE: func(cmd *cobra.Command, args []string) error { txHash, err := hex.DecodeString(args[0]) if err != nil { @@ -134,7 +134,7 @@ func blobCmd() *cobra.Command { return err } - logger.Info("verifying that the blob was committed to by the QGB", "tx_hash", args[0], "height", tx.Height) + logger.Info("verifying that the blob was committed to by the BlobStream", "tx_hash", args[0], "height", tx.Height) blockRes, err := trpc.Block(cmd.Context(), &tx.Height) if err != nil { @@ -157,7 +157,7 @@ func sharesCmd() *cobra.Command { command := &cobra.Command{ Use: "shares ", Args: cobra.ExactArgs(3), - Short: "Verifies that a range of shares has been committed to by the QGB contract. The range should be end exclusive.", + Short: "Verifies that a range of shares has been committed to by the BlobStream contract. The range should be end exclusive.", RunE: func(cmd *cobra.Command, args []string) error { height, err := strconv.ParseUint(args[0], 10, 0) if err != nil { @@ -229,18 +229,18 @@ func VerifyShares(ctx context.Context, logger tmlog.Logger, config VerifyConfig, logger.Info("proofs from shares to data root are valid") - qgbGRPC, err := grpc.Dial(config.CelesGRPC, grpc.WithTransportCredentials(insecure.NewCredentials())) + bsGRPC, err := grpc.Dial(config.CelesGRPC, grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { return false, err } - defer func(qgbGRPC *grpc.ClientConn) { - err := qgbGRPC.Close() + defer func(bsGRPC *grpc.ClientConn) { + err := bsGRPC.Close() if err != nil { logger.Debug("error closing connection", "err", err.Error()) } - }(qgbGRPC) + }(bsGRPC) - queryClient := types.NewQueryClient(qgbGRPC) + queryClient := types.NewQueryClient(bsGRPC) resp, err := queryClient.DataCommitmentRangeForHeight( ctx, @@ -251,7 +251,7 @@ func VerifyShares(ctx context.Context, logger tmlog.Logger, config VerifyConfig, } logger.Info( - "proving that the data root was committed to in the QGB contract", + "proving that the data root was committed to in the BlobStream contract", "contract_address", config.ContractAddr, "fist_block", @@ -280,15 +280,15 @@ func VerifyShares(ctx context.Context, logger tmlog.Logger, config VerifyConfig, } defer ethClient.Close() - qgbWrapper, err := wrapper.NewWrappers(config.ContractAddr, ethClient) + bsWrapper, err := wrapper.NewWrappers(config.ContractAddr, ethClient) if err != nil { return false, err } - logger.Info("verifying that the data root was committed to in the QGB contract") + logger.Info("verifying that the data root was committed to in the BlobStream contract") isCommittedTo, err = VerifyDataRootInclusion( ctx, - qgbWrapper, + bsWrapper, resp.DataCommitment.Nonce, height, block.Block.DataHash, @@ -299,9 +299,9 @@ func VerifyShares(ctx context.Context, logger tmlog.Logger, config VerifyConfig, } if isCommittedTo { - logger.Info("the QGB contract has committed to the provided shares") + logger.Info("the BlobStream contract has committed to the provided shares") } else { - logger.Info("the QGB contract didn't commit to the provided shares") + logger.Info("the BlobStream contract didn't commit to the provided shares") } return isCommittedTo, nil @@ -309,7 +309,7 @@ func VerifyShares(ctx context.Context, logger tmlog.Logger, config VerifyConfig, func VerifyDataRootInclusion( _ context.Context, - qgbWrapper *wrapper.Wrappers, + bsWrapper *wrapper.Wrappers, nonce uint64, height uint64, dataRoot []byte, @@ -330,7 +330,7 @@ func VerifyDataRootInclusion( NumLeaves: big.NewInt(proof.Total), } - valid, err := qgbWrapper.VerifyAttestation( + valid, err := bsWrapper.VerifyAttestation( &bind.CallOpts{}, big.NewInt(int64(nonce)), tuple, diff --git a/x/qgb/genesis.go b/x/blobstream/genesis.go similarity index 90% rename from x/qgb/genesis.go rename to x/blobstream/genesis.go index 4d0e67f607..c44798f4dd 100644 --- a/x/qgb/genesis.go +++ b/x/blobstream/genesis.go @@ -1,8 +1,8 @@ -package qgb +package blobstream import ( - "github.com/celestiaorg/celestia-app/x/qgb/keeper" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/keeper" + "github.com/celestiaorg/celestia-app/x/blobstream/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/qgb/handler.go b/x/blobstream/handler.go similarity index 82% rename from x/qgb/handler.go rename to x/blobstream/handler.go index 3ea398b4fd..12c099679c 100644 --- a/x/qgb/handler.go +++ b/x/blobstream/handler.go @@ -1,11 +1,11 @@ -package qgb +package blobstream import ( "fmt" "cosmossdk.io/errors" - "github.com/celestiaorg/celestia-app/x/qgb/keeper" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/keeper" + "github.com/celestiaorg/celestia-app/x/blobstream/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) diff --git a/x/qgb/integration_test.go b/x/blobstream/integration_test.go similarity index 74% rename from x/qgb/integration_test.go rename to x/blobstream/integration_test.go index 6beb7f1739..4cc4786520 100644 --- a/x/qgb/integration_test.go +++ b/x/blobstream/integration_test.go @@ -1,4 +1,4 @@ -package qgb_test +package blobstream_test import ( "testing" @@ -9,7 +9,7 @@ import ( "github.com/celestiaorg/celestia-app/test/util/blobfactory" "github.com/celestiaorg/celestia-app/test/util/testfactory" "github.com/celestiaorg/celestia-app/test/util/testnode" - qgbtypes "github.com/celestiaorg/celestia-app/x/qgb/types" + blobstreamtypes "github.com/celestiaorg/celestia-app/x/blobstream/types" sdk "github.com/cosmos/cosmos-sdk/types" staking "github.com/cosmos/cosmos-sdk/x/staking/types" gethcommon "github.com/ethereum/go-ethereum/common" @@ -18,14 +18,14 @@ import ( abci "github.com/tendermint/tendermint/abci/types" ) -func TestQGBIntegrationSuite(t *testing.T) { +func TestBlobStreamIntegrationSuite(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.") } - suite.Run(t, new(QGBIntegrationSuite)) + suite.Run(t, new(BlobStreamIntegrationSuite)) } -type QGBIntegrationSuite struct { +type BlobStreamIntegrationSuite struct { suite.Suite accounts []string @@ -33,7 +33,7 @@ type QGBIntegrationSuite struct { ecfg encoding.Config } -func (s *QGBIntegrationSuite) SetupSuite() { +func (s *BlobStreamIntegrationSuite) SetupSuite() { t := s.T() t.Log("setting up integration test suite") @@ -45,7 +45,7 @@ func (s *QGBIntegrationSuite) SetupSuite() { s.cctx = cctx } -func (s *QGBIntegrationSuite) TestQGB() { +func (s *BlobStreamIntegrationSuite) TestBlobStream() { t := s.T() type test struct { name string @@ -54,21 +54,21 @@ func (s *QGBIntegrationSuite) TestQGB() { } tests := []test{ { - name: "edit a qgb validator address", + name: "edit a blobstream validator address", msgFunc: func() ([]sdk.Msg, sdk.AccAddress) { addr := testfactory.GetAddress(s.cctx.Keyring, "validator") valAddr := sdk.ValAddress(addr) - msg := qgbtypes.NewMsgRegisterEVMAddress(valAddr, gethcommon.HexToAddress("0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5")) + msg := blobstreamtypes.NewMsgRegisterEVMAddress(valAddr, gethcommon.HexToAddress("0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5")) return []sdk.Msg{msg}, addr }, expectedTxCode: abci.CodeTypeOK, }, { - name: "edit a non qgb validator address", + name: "edit a non blobstream validator address", msgFunc: func() ([]sdk.Msg, sdk.AccAddress) { addr := testfactory.GetAddress(s.cctx.Keyring, s.accounts[0]) valAddr := sdk.ValAddress(addr) - msg := qgbtypes.NewMsgRegisterEVMAddress(valAddr, gethcommon.HexToAddress("0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5")) + msg := blobstreamtypes.NewMsgRegisterEVMAddress(valAddr, gethcommon.HexToAddress("0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5")) return []sdk.Msg{msg}, addr }, expectedTxCode: staking.ErrNoValidatorFound.ABCICode(), diff --git a/x/qgb/keeper/hooks.go b/x/blobstream/keeper/hooks.go similarity index 94% rename from x/qgb/keeper/hooks.go rename to x/blobstream/keeper/hooks.go index 4ab6872598..5e9199d5bc 100644 --- a/x/qgb/keeper/hooks.go +++ b/x/blobstream/keeper/hooks.go @@ -2,7 +2,7 @@ package keeper import ( "cosmossdk.io/errors" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -11,12 +11,12 @@ type Hooks struct { k Keeper } -// Create new QGB hooks +// Create new BlobStream hooks func (k Keeper) Hooks() Hooks { // if startup is mis-ordered in app.go this hook will halt the chain when // called. Keep this check to make such a mistake obvious if k.storeKey == nil { - panic("hooks initialized before QGBKeeper") + panic("hooks initialized before BlobStreamKeeper") } return Hooks{k} } diff --git a/x/qgb/keeper/keeper.go b/x/blobstream/keeper/keeper.go similarity index 93% rename from x/qgb/keeper/keeper.go rename to x/blobstream/keeper/keeper.go index bf4dab86ec..2de1bb8fa2 100644 --- a/x/qgb/keeper/keeper.go +++ b/x/blobstream/keeper/keeper.go @@ -4,7 +4,7 @@ import ( "encoding/binary" "fmt" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/types" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -47,7 +47,7 @@ func (k Keeper) SetParams(ctx sdk.Context, ps types.Params) { } // DeserializeValidatorIterator returns validators from the validator iterator. -// Adding here in QGB keeper as cdc is not available inside endblocker. +// Adding here in BlobStream keeper as cdc is not available inside endblocker. func (k Keeper) DeserializeValidatorIterator(vals []byte) stakingtypes.ValAddresses { validators := stakingtypes.ValAddresses{ Addresses: []string{}, @@ -56,7 +56,7 @@ func (k Keeper) DeserializeValidatorIterator(vals []byte) stakingtypes.ValAddres return validators } -// StakingKeeper restricts the functionality of the bank keeper used in the qgb +// StakingKeeper restricts the functionality of the bank keeper used in the BlobStream // keeper type StakingKeeper interface { GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, found bool) diff --git a/x/qgb/keeper/keeper_attestation.go b/x/blobstream/keeper/keeper_attestation.go similarity index 98% rename from x/qgb/keeper/keeper_attestation.go rename to x/blobstream/keeper/keeper_attestation.go index 51c3f1b21d..880c7c3cff 100644 --- a/x/qgb/keeper/keeper_attestation.go +++ b/x/blobstream/keeper/keeper_attestation.go @@ -3,7 +3,7 @@ package keeper import ( "fmt" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/blobstream/keeper/keeper_attestation_test.go b/x/blobstream/keeper/keeper_attestation_test.go new file mode 100644 index 0000000000..dccd02038a --- /dev/null +++ b/x/blobstream/keeper/keeper_attestation_test.go @@ -0,0 +1,41 @@ +package keeper_test + +import ( + "testing" + + testutil "github.com/celestiaorg/celestia-app/test/util" + "github.com/celestiaorg/celestia-app/x/blobstream" + "github.com/stretchr/testify/assert" +) + +func TestCheckLatestAttestationNonce(t *testing.T) { + input := testutil.CreateTestEnvWithoutBlobStreamKeysInit(t) + k := input.BStreamKeeper + + // check if the latest attestation nonce is init + exists := k.CheckLatestAttestationNonce(input.Context) + assert.False(t, exists) + + // init the latest attestation nonce + input.BStreamKeeper.SetLatestAttestationNonce(input.Context, blobstream.InitialLatestAttestationNonce) + + // check if the latest attestation nonce value was initialized correctly + input.BStreamKeeper.CheckLatestAttestationNonce(input.Context) + assert.Equal(t, blobstream.InitialLatestAttestationNonce, input.BStreamKeeper.GetLatestAttestationNonce(input.Context)) +} + +func TestCheckEarliestAvailableAttestationNonce(t *testing.T) { + input := testutil.CreateTestEnvWithoutBlobStreamKeysInit(t) + k := input.BStreamKeeper + + // check if the earliest available attestation nonce is init + exists := k.CheckEarliestAvailableAttestationNonce(input.Context) + assert.False(t, exists) + + // init the earliest available attestation nonce + input.BStreamKeeper.SetEarliestAvailableAttestationNonce(input.Context, blobstream.InitialEarliestAvailableAttestationNonce) + + // check if the earliest attestation nonce value was initialized correctly + input.BStreamKeeper.CheckEarliestAvailableAttestationNonce(input.Context) + assert.Equal(t, blobstream.InitialEarliestAvailableAttestationNonce, input.BStreamKeeper.GetEarliestAvailableAttestationNonce(input.Context)) +} diff --git a/x/qgb/keeper/keeper_data_commitment.go b/x/blobstream/keeper/keeper_data_commitment.go similarity index 98% rename from x/qgb/keeper/keeper_data_commitment.go rename to x/blobstream/keeper/keeper_data_commitment.go index 541fad51b4..2348106928 100644 --- a/x/qgb/keeper/keeper_data_commitment.go +++ b/x/blobstream/keeper/keeper_data_commitment.go @@ -4,7 +4,7 @@ import ( "fmt" "cosmossdk.io/errors" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/qgb/keeper/keeper_data_commitment_test.go b/x/blobstream/keeper/keeper_data_commitment_test.go similarity index 93% rename from x/qgb/keeper/keeper_data_commitment_test.go rename to x/blobstream/keeper/keeper_data_commitment_test.go index a46489f61e..cb246b6e73 100644 --- a/x/qgb/keeper/keeper_data_commitment_test.go +++ b/x/blobstream/keeper/keeper_data_commitment_test.go @@ -3,17 +3,17 @@ package keeper_test import ( "testing" - "github.com/celestiaorg/celestia-app/x/qgb" + "github.com/celestiaorg/celestia-app/x/blobstream" testutil "github.com/celestiaorg/celestia-app/test/util" - "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 TestGetDataCommitmentForHeight(t *testing.T) { input, sdkCtx := testutil.SetupFiveValChain(t) - k := input.QgbKeeper + k := input.BStreamKeeper initialValset, err := k.GetCurrentValset(sdkCtx) require.NoError(t, err) @@ -111,7 +111,7 @@ func TestGetDataCommitmentForHeight(t *testing.T) { func TestLatestDataCommitment(t *testing.T) { input, sdkCtx := testutil.SetupFiveValChain(t) - k := input.QgbKeeper + k := input.BStreamKeeper initialValset, err := k.GetCurrentValset(sdkCtx) require.NoError(t, err) @@ -148,8 +148,8 @@ func TestLatestDataCommitment(t *testing.T) { } func TestCheckingLatestAttestationNonceInDataCommitments(t *testing.T) { - input := testutil.CreateTestEnvWithoutQGBKeysInit(t) - k := input.QgbKeeper + input := testutil.CreateTestEnvWithoutBlobStreamKeysInit(t) + k := input.BStreamKeeper tests := []struct { name string @@ -190,11 +190,11 @@ func TestCheckingLatestAttestationNonceInDataCommitments(t *testing.T) { } func TestCheckingEarliestAvailableAttestationNonceInDataCommitments(t *testing.T) { - input := testutil.CreateTestEnvWithoutQGBKeysInit(t) - k := input.QgbKeeper + input := testutil.CreateTestEnvWithoutBlobStreamKeysInit(t) + k := input.BStreamKeeper // init the latest attestation nonce - input.QgbKeeper.SetLatestAttestationNonce(input.Context, qgb.InitialLatestAttestationNonce) + input.BStreamKeeper.SetLatestAttestationNonce(input.Context, blobstream.InitialLatestAttestationNonce) tests := []struct { name string diff --git a/x/qgb/keeper/keeper_valset.go b/x/blobstream/keeper/keeper_valset.go similarity index 99% rename from x/qgb/keeper/keeper_valset.go rename to x/blobstream/keeper/keeper_valset.go index a98159da4c..bdb8506ee8 100644 --- a/x/qgb/keeper/keeper_valset.go +++ b/x/blobstream/keeper/keeper_valset.go @@ -7,7 +7,7 @@ import ( "cosmossdk.io/errors" cosmosmath "cosmossdk.io/math" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" gethcommon "github.com/ethereum/go-ethereum/common" diff --git a/x/qgb/keeper/keeper_valset_test.go b/x/blobstream/keeper/keeper_valset_test.go similarity index 92% rename from x/qgb/keeper/keeper_valset_test.go rename to x/blobstream/keeper/keeper_valset_test.go index 6408033d90..4034868df8 100644 --- a/x/qgb/keeper/keeper_valset_test.go +++ b/x/blobstream/keeper/keeper_valset_test.go @@ -3,12 +3,11 @@ package keeper_test import ( "bytes" "errors" + "github.com/celestiaorg/celestia-app/x/blobstream" "testing" - "github.com/celestiaorg/celestia-app/x/qgb" - testutil "github.com/celestiaorg/celestia-app/test/util" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/types" "github.com/cosmos/cosmos-sdk/x/staking" stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" gethcommon "github.com/ethereum/go-ethereum/common" @@ -60,7 +59,7 @@ func TestCurrentValsetNormalization(t *testing.T) { spec := spec t.Run(msg, func(t *testing.T) { input, ctx := testutil.SetupTestChain(t, spec.srcPowers) - r, err := input.QgbKeeper.GetCurrentValset(ctx) + r, err := input.BStreamKeeper.GetCurrentValset(ctx) require.NoError(t, err) rMembers, err := types.BridgeValidators(r.Members).ToInternal() require.NoError(t, err) @@ -70,8 +69,8 @@ func TestCurrentValsetNormalization(t *testing.T) { } func TestCheckingEarliestAvailableAttestationNonceInValsets(t *testing.T) { - input := testutil.CreateTestEnvWithoutQGBKeysInit(t) - k := input.QgbKeeper + input := testutil.CreateTestEnvWithoutBlobStreamKeysInit(t) + k := input.BStreamKeeper // create a validator to have a realistic scenario testutil.CreateValidator( t, @@ -87,7 +86,7 @@ func TestCheckingEarliestAvailableAttestationNonceInValsets(t *testing.T) { staking.EndBlocker(input.Context, input.StakingKeeper) // init the latest attestation nonce - input.QgbKeeper.SetLatestAttestationNonce(input.Context, qgb.InitialLatestAttestationNonce) + input.BStreamKeeper.SetLatestAttestationNonce(input.Context, blobstream.InitialLatestAttestationNonce) tests := []struct { name string @@ -120,8 +119,8 @@ func TestCheckingEarliestAvailableAttestationNonceInValsets(t *testing.T) { } func TestCheckingAttestationNonceInValsets(t *testing.T) { - input := testutil.CreateTestEnvWithoutQGBKeysInit(t) - k := input.QgbKeeper + input := testutil.CreateTestEnvWithoutBlobStreamKeysInit(t) + k := input.BStreamKeeper // create a validator to have a realistic scenario testutil.CreateValidator( t, @@ -174,8 +173,8 @@ func TestCheckingAttestationNonceInValsets(t *testing.T) { } func TestEVMAddresses(t *testing.T) { - input := testutil.CreateTestEnvWithoutQGBKeysInit(t) - k := input.QgbKeeper + input := testutil.CreateTestEnvWithoutBlobStreamKeysInit(t) + k := input.BStreamKeeper _, exists := k.GetEVMAddress(input.Context, testutil.ValAddrs[0]) require.False(t, exists) diff --git a/x/qgb/keeper/msg_server.go b/x/blobstream/keeper/msg_server.go similarity index 89% rename from x/qgb/keeper/msg_server.go rename to x/blobstream/keeper/msg_server.go index 6e11a6125e..7cdda965c7 100644 --- a/x/qgb/keeper/msg_server.go +++ b/x/blobstream/keeper/msg_server.go @@ -4,7 +4,7 @@ import ( "context" "cosmossdk.io/errors" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/types" sdk "github.com/cosmos/cosmos-sdk/types" staking "github.com/cosmos/cosmos-sdk/x/staking/types" gethcommon "github.com/ethereum/go-ethereum/common" @@ -16,7 +16,7 @@ type msgServer struct { Keeper } -// NewMsgServerImpl returns an implementation of the QGB MsgServer interface +// NewMsgServerImpl returns an implementation of the BlobStream MsgServer interface // for the provided Keeper. func NewMsgServerImpl(keeper Keeper) types.MsgServer { return &msgServer{Keeper: keeper} diff --git a/x/qgb/keeper/msg_server_test.go b/x/blobstream/keeper/msg_server_test.go similarity index 93% rename from x/qgb/keeper/msg_server_test.go rename to x/blobstream/keeper/msg_server_test.go index b927e6f7af..dc25127e57 100644 --- a/x/qgb/keeper/msg_server_test.go +++ b/x/blobstream/keeper/msg_server_test.go @@ -4,7 +4,7 @@ import ( "testing" testutil "github.com/celestiaorg/celestia-app/test/util" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" @@ -12,7 +12,7 @@ import ( func TestRegisterEVMAddress(t *testing.T) { input, sdkCtx := testutil.SetupFiveValChain(t) - k := input.QgbKeeper + k := input.BStreamKeeper vals := input.StakingKeeper.GetValidators(sdkCtx, 100) require.GreaterOrEqual(t, len(vals), 1) val := vals[0] diff --git a/x/qgb/keeper/query_attestation.go b/x/blobstream/keeper/query_attestation.go similarity index 95% rename from x/qgb/keeper/query_attestation.go rename to x/blobstream/keeper/query_attestation.go index 8d7939fac3..ddabf0435c 100644 --- a/x/qgb/keeper/query_attestation.go +++ b/x/blobstream/keeper/query_attestation.go @@ -5,7 +5,7 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/qgb/keeper/query_data_commitment.go b/x/blobstream/keeper/query_data_commitment.go similarity index 93% rename from x/qgb/keeper/query_data_commitment.go rename to x/blobstream/keeper/query_data_commitment.go index 53f0d3b147..531869f94b 100644 --- a/x/qgb/keeper/query_data_commitment.go +++ b/x/blobstream/keeper/query_data_commitment.go @@ -3,7 +3,7 @@ package keeper import ( "context" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/qgb/keeper/query_general.go b/x/blobstream/keeper/query_general.go similarity index 95% rename from x/qgb/keeper/query_general.go rename to x/blobstream/keeper/query_general.go index 9dc4378822..f035153f07 100644 --- a/x/qgb/keeper/query_general.go +++ b/x/blobstream/keeper/query_general.go @@ -3,7 +3,7 @@ package keeper import ( "context" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/qgb/keeper/query_valset.go b/x/blobstream/keeper/query_valset.go similarity index 91% rename from x/qgb/keeper/query_valset.go rename to x/blobstream/keeper/query_valset.go index 2ad58998f9..fc58ea9f04 100644 --- a/x/qgb/keeper/query_valset.go +++ b/x/blobstream/keeper/query_valset.go @@ -3,7 +3,7 @@ package keeper import ( "context" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/qgb/module.go b/x/blobstream/module.go similarity index 95% rename from x/qgb/module.go rename to x/blobstream/module.go index 877d12af9b..f42264bf2e 100644 --- a/x/qgb/module.go +++ b/x/blobstream/module.go @@ -1,10 +1,10 @@ -package qgb +package blobstream import ( "encoding/json" "fmt" - qgbcmd "github.com/celestiaorg/celestia-app/x/qgb/client" + bscmd "github.com/celestiaorg/celestia-app/x/blobstream/client" "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" @@ -12,8 +12,8 @@ import ( abci "github.com/tendermint/tendermint/abci/types" - "github.com/celestiaorg/celestia-app/x/qgb/keeper" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/keeper" + "github.com/celestiaorg/celestia-app/x/blobstream/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" @@ -81,12 +81,12 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(_ client.Context, _ *runtime.Ser // GetTxCmd returns the capability module's root tx command. func (a AppModuleBasic) GetTxCmd() *cobra.Command { - return qgbcmd.GetTxCmd() + return bscmd.GetTxCmd() } // GetQueryCmd returns the capability module's root query command. func (AppModuleBasic) GetQueryCmd() *cobra.Command { - return qgbcmd.GetQueryCmd() + return bscmd.GetQueryCmd() } // ---------------------------------------------------------------------------- diff --git a/x/blobstream/overview.md b/x/blobstream/overview.md new file mode 100644 index 0000000000..808d4233e4 --- /dev/null +++ b/x/blobstream/overview.md @@ -0,0 +1,116 @@ +# Overview + +BlobStream is a one way bridge from Celestia to EVM chains. It provides a way for rollups using Celestia for Data Availability (DA), and an EVM chain as a settlement layer, to prove on-chain that the rollup data was correctly posted to Celestia and verify fraud proofs otherwise. These types of rollups are discussed in the [Quantum Gravity Bridge: Secure Off-Chain Data Availability for Ethereum L2s with Celestia](https://blog.celestia.org/celestiums) blog post. + +BlobStream implementation consists of three components: The [state machine](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream), the [orchestrator-relayer](https://github.com/celestiaorg/orchestrator-relayer), and the [BlobStream smart contract](https://github.com/celestiaorg/blobstream-contracts). + +## [State machine](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream) + +The state machine is the `blobstream` module implementation. It is responsible for creating [attestations](https://github.com/celestiaorg/celestia-app/blob/main/x/blobstream/types/attestation.go#L10-L18) which are signed by [orchestrators](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/orchestrator.md). Each Celestia validator is expected to also run an orchestrator. [Relayers](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md) periodically query the Celestia state for attestations and submit them to the BlobStream smart contract deployed on some EVM chain. + +There are two types of [attestations](https://github.com/celestiaorg/celestia-app/blob/main/x/blobstream/types/attestation.go#L10-L18): [valsets](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/proto/celestia/qgb/v1/types.proto#L18-L33) and [data commitments](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/proto/celestia/qgb/v1/types.proto#L35-L55). + +All attestations have a [`nonce`](https://github.com/celestiaorg/celestia-app/blob/8ae6a84b2c99e55625bbe99f70db1e5a985c9675/x/qgb/types/attestation.go#L16) field that defines the order in which the attestations are generated. This nonce is stored in the BlobStream smart contract as per [ADR-004](https://github.com/celestiaorg/celestia-app/blob/main/docs/architecture/adr-004-qgb-relayer-security.md#decision), and is used to order attestation submissions on the EVM chain. + +### [Valsets](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream#valsets) + +A [valset](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream#valsets) represents a validator set snapshot. It contains a list of validators' EVM addresses along with their [BlobStream staking power](https://github.com/celestiaorg/celestia-app/tree/main/x/qgb#validator-power-normalization). It enables the BlobStream smart contract to track the state of the Celestia validator set. This is necessary so that the BlobStream smart contract can determine when a 2/3 threshold has signed that a particular data hash has been made available on Celestia. + +A valset is [generated](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream#valset-handler) inside the state machine. It is then queried, signed, and submitted to the [BlobStream P2P network](https://github.com/celestiaorg/orchestrator-relayer/pull/66) by orchestrators. After more than 2/3rds of the Celestia validator set have submitted their signatures, [relayers](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md) relay the attestation to the BlobStream smart contract along with the signatures to be [verified](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L172-L211) and eventually [stored](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L266-L268). + +The BlobStream smart contract keeps track of the [last validator set hash](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L44-L45) and its corresponding [power threshold](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L46-L47). This way, the contract will always be able to verify if attestations were signed using the correct Celestia validator set, and if the provided signatures represent a majority. + +### [Data commitments](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream#data-commitments) + +A [data commitment](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream#data-commitments) is an attestation type representing a request to commit over a set of blocks. It provides an end exclusive range of blocks for orchestrators to sign over and propagate in the BlobStream P2P network. The range is defined by the param [`DataCommitmentWindow`](https://github.com/celestiaorg/celestia-app/blob/fc83b04c3a5638ac8d415770e38a4046b84fa128/x/qgb/keeper/keeper_data_commitment.go#L44-L50). + +The data commitment is a Merkle tree over a sequential set of blocks. These blocks are represented as a tuple of the [data root](https://github.com/celestiaorg/celestia-core/blob/6933af1ead0ddf4a8c7516690e3674c6cdfa7bd8/rpc/core/blocks.go#L549), and the [height](https://github.com/celestiaorg/celestia-core/blob/6933af1ead0ddf4a8c7516690e3674c6cdfa7bd8/rpc/core/blocks.go#L548). This commitment can be queried from core using the [`DataCommitment`](https://github.com/celestiaorg/celestia-core/blob/6933af1ead0ddf4a8c7516690e3674c6cdfa7bd8/rpc/core/blocks.go#L210-L227) query and allows generating Merkle inclusion proofs for any blob in any block in the set. + +When an orchestrator sees a newly generated data commitment, it queries the previous valset and checks whether it's part of its validator set. Then, the orchestrator signs the new data commitment and submits that signature to the [BlobStream P2P network](https://github.com/celestiaorg/orchestrator-relayer/pull/66). Otherwise, it ignores it and waits for new attestations. + +After the relayer finds more than 2/3rd signatures of that data commitment, it relays the commitment along with the signatures to the BlobStream smart contract where they get [verified](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L172-L211). Then, the smart contract [saves](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L331-L332) the commitment to the [state](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L50-L51) thus allowing for Merkle-based inclusion proof verification for any blob posted to any committed block. + +## [Orchestrator-relayer](https://github.com/celestiaorg/orchestrator-relayer) + +The [orchestrator-relayer](https://github.com/celestiaorg/orchestrator-relayer) contains the implementation of the BlobStream orchestrator and relayer. + +### [Orchestrator](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/orchestrator.md) + +An [orchestrator](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/orchestrator.md) is the software responsible for querying the state machine for new attestations, signs them, and then submits them to the BlobStream P2P network. + +At startup, it [loads](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/orchestrator.md#evm-key) the EVM private key corresponding to the address used when creating the validator. Then, it uses it to sign the attestations digests before submitting them to the P2P network. + +An attestation digest is a bytes array containing a digest of the attestation relevant information. More on this in the [hashes format](#hashes-format) section. + +The orchestrator generally needs access to the validator's RPC/gRPC endpoints. However, it still can use public ones if needed. Its only hard requirement is having access to the specific private key for the target validator. Otherwise, the signatures will be invalid and the validator could get slashed in future versions. + +### [Relayer](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md) + +A [relayer](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md) is the software responsible for querying the signatures of a validator set from the P2P network and aggregating them into a format that the [BlobStream smart contract](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol) understands. + +It uses the previous valset to that attestation to know which validators should sign. Then, it looks for all of those signatures. + +When the relayer finds more than 2/3rds of the signatures, it immediately relays them to the BlobStream smart contract to be persisted, and starts again. + +For a [BlobStream smart contract](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol) to not halt, it needs at least one relayer relaying signatures to it regularly. Otherwise, the BlobStream contract will be out of sync and will not be able to commit to new data. + +## [BlobStream smart contract](https://github.com/celestiaorg/blobstream-contracts) + +The [BlobStream smart contract](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol) is the source of truth for the rollups using Celestia as DA. It allows proving/verifying that data was posted to the Celestia blockchain. + +In order to reflect the Celestia chain data, the [BlobStream smart contract](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol) keeps track of the validator set changes, via valset updates, and commits to batches of block information, via data commitments. + +### Validator set changes + +In order to submit a validator set change, the BlobStream smart contract provides the [`updateValidatorSet()`](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L213-L273) `external` method that takes the previous valset nonce, the new one's nonce, its power threshold and its hash, along with the actual validator set and the corresponding signatures, as `calldata` to be verified. Then, it [persists](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L266-L268) the nonce, the valset hash and the threshold in state so they can be used for future valset and data commitment updates. + +### Batches + +The batches in the BlobStream smart contract refer to the `data root tuple root`s described above. These are submitted using the [`submitDataRootTupleRoot()`](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L275-L337) `external` method. This latter takes the new batch nonce, its corresponding valset, the `data root tuple root`, along with the actual validator set and their corresponding signatures as `calldata`. Then, it verifies the signature and [persists](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L331-L332) the new data root tuple root to the state along with the new nonce. + +### Hashes format + +The digest created/verified in the BlobStream smart contract follow the [EIP-712](https://eips.ethereum.org/EIPS/eip-712) standard for hashing data. + +#### Valset digest + +A valset digest is created inside the [`domainSeparateValidatorSetHash()`](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L137-L154) method. It is the `keccak256` hash of the concatenation of the following fields: + +- `VALIDATOR_SET_HASH_DOMAIN_SEPARATOR`: which is defined as a [constant](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/Constants.sol#L4-L6). +- The valset nonce: the [universal nonce](https://github.com/celestiaorg/celestia-app/blob/main/docs/architecture/adr-004-qgb-relayer-security.md#decision) of the attestation representing that validator set change. +- The power threshold: the threshold defining 2/3rds of the validator set. +- The validator set hash: The keccak256 hash of the validator set which is calculated using the [`computeValidatorSetHash()`](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L131-L135) method. + +#### Data commitment digest + +A data commitment digest is created inside the [`domainSeparateDataRootTupleRoot()`](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L156-L170) method. It is the `keccak256` hash of the concatenation of the following fields: + +- `DATA_ROOT_TUPLE_ROOT_DOMAIN_SEPARATOR`: which is defined as a [constant](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/Constants.sol#L8-L10). +- The data commitment nonce: the [universal nonce](https://github.com/celestiaorg/celestia-app/blob/main/docs/architecture/adr-004-qgb-relayer-security.md#decision) of the attestation representing that data commitment. +- The data root tuple root: which is the commitment over the set of blocks defined [above](#data-commitments). + +### Signatures + +The signature scheme used for signing the above hashes follow the [EIP-191](https://eips.ethereum.org/EIPS/eip-191) signing standard. It uses the `ECDSA` algorithm with the `secp256k1` curve. So, the orchestrator uses the keystore to [generate](https://github.com/celestiaorg/orchestrator-relayer/blob/09ebfdc312c0d9e08856fb98cfd089e956ab7f3a/evm/ethereum_signature.go#L18-L28) these signatures. + +The output signature is in the `[R || S || V]` format where `V` is `0` or `1`. This is defined in the BlobStream smart contract using the [Signature](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L17-L21) struct. + +These signatures are then verified in the smart contract using the [`verifySig()`](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L124-L129) method. + +## Security assumptions + +The security of the BlobStream relies on an honest majority of the Celestia validator set. This assumption indicates that more than 2/3s of the voting power follows each [block validity rule](../../specs/src/specs/block_validity_rules.md). Additionally, over 2/3s of the voting power sign valid validator set updates and data commitments, as outlined above. + +If more than 1/3rd of the validator set stops running their orchestrators, then the BlobStream halts. And, if more than 2/3rds sign invalid data, then the BlobStream contract will commit to invalid data. The only recovery from such a state is to revert to social consensus, potentially slashing the guilty validators and redeploying the smart contracts. + +## Slashing + +We still don't support slashing for equivocation, liveness or invalid signatures. However, if anything were to happen to the bridge, we would be able to social slash the corrupt validators and redeploy the contract. + +Future versions of the BlobStream will support slashing. It will be enforced via the use of [vote extensions](https://github.com/cometbft/cometbft/blob/v0.38.0/spec/abci/abci%2B%2B_methods.md#extendvote). + +## Proofs + +To prove that data was posted to an EVM chain, we have the following method: [`verifyAttestation()`](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L339-L358). This allows to verify that a data root tuple was committed to by the BlobStream smart contract. + +For the remaining proofs, i.e. shares to data root tuples proofs, the app is currently able to generate and verify them. However, these are still not supported at the smart contract level. Future works will focus on this. diff --git a/x/qgb/types/abi_consts.go b/x/blobstream/types/abi_consts.go similarity index 86% rename from x/qgb/types/abi_consts.go rename to x/blobstream/types/abi_consts.go index d1e3171480..f8072c28cc 100644 --- a/x/qgb/types/abi_consts.go +++ b/x/blobstream/types/abi_consts.go @@ -10,10 +10,10 @@ import ( ) const ( - // InternalQGBabiJSON is the json encoded abi for private functions in the - // qgb contract. This is needed to encode data that is signed over in a way + // InternalBlobStreamABIJSON is the json encoded abi for private functions in the + // BlobStream contract. This is needed to encode data that is signed over in a way // that the contracts can easily verify. - InternalQGBabiJSON = `[ + InternalBlobStreamABIJSON = `[ { "inputs": [ { @@ -116,9 +116,9 @@ const ( ) var ( - ExternalQGBabi abi.ABI - InternalQGBabi abi.ABI - BridgeValidatorAbi abi.Arguments + ExternalBlobStreamABI abi.ABI + InternalBlobStreamABI abi.ABI + BridgeValidatorAbi abi.Arguments VsDomainSeparator ethcmn.Hash DcDomainSeparator ethcmn.Hash @@ -129,13 +129,13 @@ func init() { if err != nil { log.Fatalln("bad ABI constant", err) } - ExternalQGBabi = contractAbi + ExternalBlobStreamABI = contractAbi - internalABI, err := abi.JSON(strings.NewReader(InternalQGBabiJSON)) + internalABI, err := abi.JSON(strings.NewReader(InternalBlobStreamABIJSON)) if err != nil { log.Fatalln("bad internal ABI constant", err) } - InternalQGBabi = internalABI + InternalBlobStreamABI = internalABI solValidatorType, err := abi.NewType("tuple", "validator", []abi.ArgumentMarshaling{ {Name: "Addr", Type: "address"}, diff --git a/x/qgb/types/attestation.go b/x/blobstream/types/attestation.go similarity index 100% rename from x/qgb/types/attestation.go rename to x/blobstream/types/attestation.go diff --git a/x/qgb/types/codec.go b/x/blobstream/types/codec.go similarity index 100% rename from x/qgb/types/codec.go rename to x/blobstream/types/codec.go diff --git a/x/qgb/types/data_commitment.go b/x/blobstream/types/data_commitment.go similarity index 100% rename from x/qgb/types/data_commitment.go rename to x/blobstream/types/data_commitment.go diff --git a/x/qgb/types/errors.go b/x/blobstream/types/errors.go similarity index 100% rename from x/qgb/types/errors.go rename to x/blobstream/types/errors.go diff --git a/x/qgb/types/events.go b/x/blobstream/types/events.go similarity index 100% rename from x/qgb/types/events.go rename to x/blobstream/types/events.go diff --git a/x/qgb/types/genesis.go b/x/blobstream/types/genesis.go similarity index 93% rename from x/qgb/types/genesis.go rename to x/blobstream/types/genesis.go index 945856f58e..5bc84959b9 100644 --- a/x/qgb/types/genesis.go +++ b/x/blobstream/types/genesis.go @@ -9,12 +9,12 @@ import ( paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) -// DefaultParamspace defines the default qgb module parameter subspace +// DefaultParamspace defines the default blobstream module parameter subspace const ( DefaultParamspace = ModuleName // MinimumDataCommitmentWindow is a constant that defines the minimum - // allowable window for the QGB data commitments. + // allowable window for the BlobStream data commitments. MinimumDataCommitmentWindow = 100 ) @@ -41,7 +41,7 @@ func (gs GenesisState) Validate() error { return nil } -// ParamKeyTable for qgb module +// ParamKeyTable for blobstream module func ParamKeyTable() paramtypes.KeyTable { return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) } diff --git a/x/qgb/types/genesis.pb.go b/x/blobstream/types/genesis.pb.go similarity index 83% rename from x/qgb/types/genesis.pb.go rename to x/blobstream/types/genesis.pb.go index 0a831973b5..5dd4ed48fa 100644 --- a/x/qgb/types/genesis.pb.go +++ b/x/blobstream/types/genesis.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: celestia/qgb/v1/genesis.proto +// source: celestia/blobstream/v1/genesis.proto package types @@ -32,7 +32,7 @@ func (m *Params) Reset() { *m = Params{} } func (m *Params) String() string { return proto.CompactTextString(m) } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_10da5f8e88ce2856, []int{0} + return fileDescriptor_0af10765b619b991, []int{0} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -68,7 +68,7 @@ func (m *Params) GetDataCommitmentWindow() uint64 { return 0 } -// GenesisState struct, containing all persistent data required by the QGB +// GenesisState struct, containing all persistent data required by BlobStream // module type GenesisState struct { Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` @@ -78,7 +78,7 @@ func (m *GenesisState) Reset() { *m = GenesisState{} } func (m *GenesisState) String() string { return proto.CompactTextString(m) } func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_10da5f8e88ce2856, []int{1} + return fileDescriptor_0af10765b619b991, []int{1} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -115,30 +115,32 @@ func (m *GenesisState) GetParams() *Params { } func init() { - proto.RegisterType((*Params)(nil), "celestia.qgb.v1.Params") - proto.RegisterType((*GenesisState)(nil), "celestia.qgb.v1.GenesisState") + proto.RegisterType((*Params)(nil), "celestia.blobstream.v1.Params") + proto.RegisterType((*GenesisState)(nil), "celestia.blobstream.v1.GenesisState") } -func init() { proto.RegisterFile("celestia/qgb/v1/genesis.proto", fileDescriptor_10da5f8e88ce2856) } +func init() { + proto.RegisterFile("celestia/blobstream/v1/genesis.proto", fileDescriptor_0af10765b619b991) +} -var fileDescriptor_10da5f8e88ce2856 = []byte{ - // 244 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4d, 0x4e, 0xcd, 0x49, - 0x2d, 0x2e, 0xc9, 0x4c, 0xd4, 0x2f, 0x4c, 0x4f, 0xd2, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, - 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x87, 0x49, 0xeb, 0x15, 0xa6, - 0x27, 0xe9, 0x95, 0x19, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0xe5, 0xf4, 0x41, 0x2c, 0x88, - 0x32, 0x29, 0x69, 0x74, 0x53, 0x4a, 0x2a, 0x0b, 0x52, 0xa1, 0x66, 0x28, 0xb9, 0x70, 0xb1, 0x05, - 0x24, 0x16, 0x25, 0xe6, 0x16, 0x0b, 0x99, 0x70, 0x89, 0xa5, 0x24, 0x96, 0x24, 0xc6, 0x27, 0xe7, - 0xe7, 0xe6, 0x66, 0x96, 0xe4, 0xa6, 0xe6, 0x95, 0xc4, 0x97, 0x67, 0xe6, 0xa5, 0xe4, 0x97, 0x4b, - 0x30, 0x2a, 0x30, 0x6a, 0xb0, 0x04, 0x89, 0x80, 0x64, 0x9d, 0xe1, 0x92, 0xe1, 0x60, 0x39, 0x2b, - 0x96, 0x86, 0x3b, 0x0a, 0x0c, 0x4a, 0xf6, 0x5c, 0x3c, 0xee, 0x10, 0xa7, 0x05, 0x97, 0x24, 0x96, - 0xa4, 0x0a, 0xe9, 0x73, 0xb1, 0x15, 0x80, 0x4d, 0x05, 0xeb, 0xe5, 0x36, 0x12, 0xd7, 0x43, 0x73, - 0xaa, 0x1e, 0xc4, 0xd2, 0x20, 0xa8, 0x32, 0x27, 0xcf, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, - 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, - 0x96, 0x63, 0x88, 0xd2, 0x4f, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x87, - 0x19, 0x92, 0x5f, 0x94, 0x0e, 0x67, 0xeb, 0x26, 0x16, 0x14, 0xe8, 0x57, 0x80, 0xbd, 0x06, 0xf6, - 0x57, 0x12, 0x1b, 0xd8, 0x63, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x65, 0x44, 0x29, - 0x3d, 0x01, 0x00, 0x00, +var fileDescriptor_0af10765b619b991 = []byte{ + // 250 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0x4e, 0xcd, 0x49, + 0x2d, 0x2e, 0xc9, 0x4c, 0xd4, 0x4f, 0xca, 0xc9, 0x4f, 0x2a, 0x2e, 0x29, 0x4a, 0x4d, 0xcc, 0xd5, + 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0x12, 0x83, 0xa9, 0xd2, 0x43, 0xa8, 0xd2, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf, + 0x07, 0x2b, 0xd1, 0x07, 0xb1, 0x20, 0xaa, 0xa5, 0x94, 0x70, 0x98, 0x59, 0x52, 0x59, 0x90, 0x0a, + 0x35, 0x51, 0xc9, 0x85, 0x8b, 0x2d, 0x20, 0xb1, 0x28, 0x31, 0xb7, 0x58, 0xc8, 0x84, 0x4b, 0x2c, + 0x25, 0xb1, 0x24, 0x31, 0x3e, 0x39, 0x3f, 0x37, 0x37, 0xb3, 0x24, 0x37, 0x35, 0xaf, 0x24, 0xbe, + 0x3c, 0x33, 0x2f, 0x25, 0xbf, 0x5c, 0x82, 0x51, 0x81, 0x51, 0x83, 0x25, 0x48, 0x04, 0x24, 0xeb, + 0x0c, 0x97, 0x0c, 0x07, 0xcb, 0x59, 0xb1, 0x34, 0xdc, 0x51, 0x60, 0x50, 0x72, 0xe3, 0xe2, 0x71, + 0x87, 0x38, 0x34, 0xb8, 0x24, 0xb1, 0x24, 0x55, 0xc8, 0x8c, 0x8b, 0xad, 0x00, 0x6c, 0x2a, 0x58, + 0x2f, 0xb7, 0x91, 0x9c, 0x1e, 0x76, 0x87, 0xeb, 0x41, 0xec, 0x0e, 0x82, 0xaa, 0x76, 0x0a, 0x38, + 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, + 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xb3, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, + 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0x98, 0x59, 0xf9, 0x45, 0xe9, 0x70, 0xb6, 0x6e, 0x62, 0x41, + 0x81, 0x7e, 0x05, 0xb2, 0x47, 0xc1, 0xbe, 0x4c, 0x62, 0x03, 0x7b, 0xd3, 0x18, 0x10, 0x00, 0x00, + 0xff, 0xff, 0xa6, 0x14, 0x6a, 0xc0, 0x60, 0x01, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/x/qgb/types/genesis_test.go b/x/blobstream/types/genesis_test.go similarity index 96% rename from x/qgb/types/genesis_test.go rename to x/blobstream/types/genesis_test.go index 7dd262f939..478c787a0f 100644 --- a/x/qgb/types/genesis_test.go +++ b/x/blobstream/types/genesis_test.go @@ -5,7 +5,7 @@ import ( "github.com/celestiaorg/celestia-app/pkg/appconsts" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/types" "github.com/stretchr/testify/require" ) diff --git a/x/qgb/types/keys.go b/x/blobstream/types/keys.go similarity index 100% rename from x/qgb/types/keys.go rename to x/blobstream/types/keys.go diff --git a/x/qgb/types/msgs.go b/x/blobstream/types/msgs.go similarity index 100% rename from x/qgb/types/msgs.go rename to x/blobstream/types/msgs.go diff --git a/x/qgb/types/msgs_test.go b/x/blobstream/types/msgs_test.go similarity index 100% rename from x/qgb/types/msgs_test.go rename to x/blobstream/types/msgs_test.go diff --git a/x/qgb/types/query.pb.go b/x/blobstream/types/query.pb.go similarity index 89% rename from x/qgb/types/query.pb.go rename to x/blobstream/types/query.pb.go index c5e8f7c4c0..15c56467ed 100644 --- a/x/qgb/types/query.pb.go +++ b/x/blobstream/types/query.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: celestia/qgb/v1/query.proto +// source: celestia/blobstream/v1/query.proto package types @@ -40,7 +40,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{0} + return fileDescriptor_a3db8161895874a4, []int{0} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +78,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{1} + return fileDescriptor_a3db8161895874a4, []int{1} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -123,7 +123,7 @@ func (m *QueryAttestationRequestByNonceRequest) Reset() { *m = QueryAtte func (m *QueryAttestationRequestByNonceRequest) String() string { return proto.CompactTextString(m) } func (*QueryAttestationRequestByNonceRequest) ProtoMessage() {} func (*QueryAttestationRequestByNonceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{2} + return fileDescriptor_a3db8161895874a4, []int{2} } func (m *QueryAttestationRequestByNonceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -173,7 +173,7 @@ func (m *QueryAttestationRequestByNonceResponse) Reset() { func (m *QueryAttestationRequestByNonceResponse) String() string { return proto.CompactTextString(m) } func (*QueryAttestationRequestByNonceResponse) ProtoMessage() {} func (*QueryAttestationRequestByNonceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{3} + return fileDescriptor_a3db8161895874a4, []int{3} } func (m *QueryAttestationRequestByNonceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -217,7 +217,7 @@ func (m *QueryLatestAttestationNonceRequest) Reset() { *m = QueryLatestA func (m *QueryLatestAttestationNonceRequest) String() string { return proto.CompactTextString(m) } func (*QueryLatestAttestationNonceRequest) ProtoMessage() {} func (*QueryLatestAttestationNonceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{4} + return fileDescriptor_a3db8161895874a4, []int{4} } func (m *QueryLatestAttestationNonceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -255,7 +255,7 @@ func (m *QueryLatestAttestationNonceResponse) Reset() { *m = QueryLatest func (m *QueryLatestAttestationNonceResponse) String() string { return proto.CompactTextString(m) } func (*QueryLatestAttestationNonceResponse) ProtoMessage() {} func (*QueryLatestAttestationNonceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{5} + return fileDescriptor_a3db8161895874a4, []int{5} } func (m *QueryLatestAttestationNonceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -305,7 +305,7 @@ func (m *QueryLatestValsetRequestBeforeNonceRequest) String() string { } func (*QueryLatestValsetRequestBeforeNonceRequest) ProtoMessage() {} func (*QueryLatestValsetRequestBeforeNonceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{6} + return fileDescriptor_a3db8161895874a4, []int{6} } func (m *QueryLatestValsetRequestBeforeNonceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -355,7 +355,7 @@ func (m *QueryLatestValsetRequestBeforeNonceResponse) String() string { } func (*QueryLatestValsetRequestBeforeNonceResponse) ProtoMessage() {} func (*QueryLatestValsetRequestBeforeNonceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{7} + return fileDescriptor_a3db8161895874a4, []int{7} } func (m *QueryLatestValsetRequestBeforeNonceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -399,7 +399,7 @@ func (m *QueryLatestUnbondingHeightRequest) Reset() { *m = QueryLatestUn func (m *QueryLatestUnbondingHeightRequest) String() string { return proto.CompactTextString(m) } func (*QueryLatestUnbondingHeightRequest) ProtoMessage() {} func (*QueryLatestUnbondingHeightRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{8} + return fileDescriptor_a3db8161895874a4, []int{8} } func (m *QueryLatestUnbondingHeightRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -437,7 +437,7 @@ func (m *QueryLatestUnbondingHeightResponse) Reset() { *m = QueryLatestU func (m *QueryLatestUnbondingHeightResponse) String() string { return proto.CompactTextString(m) } func (*QueryLatestUnbondingHeightResponse) ProtoMessage() {} func (*QueryLatestUnbondingHeightResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{9} + return fileDescriptor_a3db8161895874a4, []int{9} } func (m *QueryLatestUnbondingHeightResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -481,7 +481,7 @@ func (m *QueryLatestDataCommitmentRequest) Reset() { *m = QueryLatestDat func (m *QueryLatestDataCommitmentRequest) String() string { return proto.CompactTextString(m) } func (*QueryLatestDataCommitmentRequest) ProtoMessage() {} func (*QueryLatestDataCommitmentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{10} + return fileDescriptor_a3db8161895874a4, []int{10} } func (m *QueryLatestDataCommitmentRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -519,7 +519,7 @@ func (m *QueryLatestDataCommitmentResponse) Reset() { *m = QueryLatestDa func (m *QueryLatestDataCommitmentResponse) String() string { return proto.CompactTextString(m) } func (*QueryLatestDataCommitmentResponse) ProtoMessage() {} func (*QueryLatestDataCommitmentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{11} + return fileDescriptor_a3db8161895874a4, []int{11} } func (m *QueryLatestDataCommitmentResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -566,7 +566,7 @@ func (m *QueryDataCommitmentRangeForHeightRequest) Reset() { func (m *QueryDataCommitmentRangeForHeightRequest) String() string { return proto.CompactTextString(m) } func (*QueryDataCommitmentRangeForHeightRequest) ProtoMessage() {} func (*QueryDataCommitmentRangeForHeightRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{12} + return fileDescriptor_a3db8161895874a4, []int{12} } func (m *QueryDataCommitmentRangeForHeightRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -615,7 +615,7 @@ func (m *QueryDataCommitmentRangeForHeightResponse) String() string { } func (*QueryDataCommitmentRangeForHeightResponse) ProtoMessage() {} func (*QueryDataCommitmentRangeForHeightResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{13} + return fileDescriptor_a3db8161895874a4, []int{13} } func (m *QueryDataCommitmentRangeForHeightResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -660,7 +660,7 @@ func (m *QueryEVMAddressRequest) Reset() { *m = QueryEVMAddressRequest{} func (m *QueryEVMAddressRequest) String() string { return proto.CompactTextString(m) } func (*QueryEVMAddressRequest) ProtoMessage() {} func (*QueryEVMAddressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{14} + return fileDescriptor_a3db8161895874a4, []int{14} } func (m *QueryEVMAddressRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -705,7 +705,7 @@ func (m *QueryEVMAddressResponse) Reset() { *m = QueryEVMAddressResponse func (m *QueryEVMAddressResponse) String() string { return proto.CompactTextString(m) } func (*QueryEVMAddressResponse) ProtoMessage() {} func (*QueryEVMAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c8535c57355a2b91, []int{15} + return fileDescriptor_a3db8161895874a4, []int{15} } func (m *QueryEVMAddressResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -742,83 +742,85 @@ func (m *QueryEVMAddressResponse) GetEvmAddress() string { } func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "celestia.qgb.v1.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "celestia.qgb.v1.QueryParamsResponse") - proto.RegisterType((*QueryAttestationRequestByNonceRequest)(nil), "celestia.qgb.v1.QueryAttestationRequestByNonceRequest") - proto.RegisterType((*QueryAttestationRequestByNonceResponse)(nil), "celestia.qgb.v1.QueryAttestationRequestByNonceResponse") - proto.RegisterType((*QueryLatestAttestationNonceRequest)(nil), "celestia.qgb.v1.QueryLatestAttestationNonceRequest") - proto.RegisterType((*QueryLatestAttestationNonceResponse)(nil), "celestia.qgb.v1.QueryLatestAttestationNonceResponse") - proto.RegisterType((*QueryLatestValsetRequestBeforeNonceRequest)(nil), "celestia.qgb.v1.QueryLatestValsetRequestBeforeNonceRequest") - proto.RegisterType((*QueryLatestValsetRequestBeforeNonceResponse)(nil), "celestia.qgb.v1.QueryLatestValsetRequestBeforeNonceResponse") - proto.RegisterType((*QueryLatestUnbondingHeightRequest)(nil), "celestia.qgb.v1.QueryLatestUnbondingHeightRequest") - proto.RegisterType((*QueryLatestUnbondingHeightResponse)(nil), "celestia.qgb.v1.QueryLatestUnbondingHeightResponse") - proto.RegisterType((*QueryLatestDataCommitmentRequest)(nil), "celestia.qgb.v1.QueryLatestDataCommitmentRequest") - proto.RegisterType((*QueryLatestDataCommitmentResponse)(nil), "celestia.qgb.v1.QueryLatestDataCommitmentResponse") - proto.RegisterType((*QueryDataCommitmentRangeForHeightRequest)(nil), "celestia.qgb.v1.QueryDataCommitmentRangeForHeightRequest") - proto.RegisterType((*QueryDataCommitmentRangeForHeightResponse)(nil), "celestia.qgb.v1.QueryDataCommitmentRangeForHeightResponse") - proto.RegisterType((*QueryEVMAddressRequest)(nil), "celestia.qgb.v1.QueryEVMAddressRequest") - proto.RegisterType((*QueryEVMAddressResponse)(nil), "celestia.qgb.v1.QueryEVMAddressResponse") -} - -func init() { proto.RegisterFile("celestia/qgb/v1/query.proto", fileDescriptor_c8535c57355a2b91) } - -var fileDescriptor_c8535c57355a2b91 = []byte{ - // 873 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcd, 0x6f, 0xe3, 0x44, - 0x18, 0xc6, 0x63, 0xb4, 0x1b, 0x89, 0xb7, 0xd2, 0x7e, 0x4c, 0xb2, 0x29, 0xf5, 0x2e, 0x6e, 0xd7, - 0xe9, 0x76, 0xbb, 0xbb, 0xd4, 0xa3, 0xa4, 0x7c, 0x88, 0xdd, 0xe5, 0xd0, 0x40, 0x51, 0x2b, 0x95, - 0xaf, 0x48, 0xf4, 0xc0, 0x81, 0x6a, 0x9c, 0x4c, 0x5d, 0x8b, 0xd8, 0xe3, 0xd8, 0x4e, 0x44, 0x04, - 0x5c, 0xf8, 0x0b, 0x90, 0x38, 0x72, 0xe6, 0xca, 0x89, 0x13, 0x1c, 0xb9, 0x54, 0x3d, 0x55, 0xe2, - 0xc2, 0x09, 0xa1, 0x96, 0x3f, 0x04, 0x65, 0x3e, 0x52, 0x27, 0x76, 0x9c, 0xa4, 0xe2, 0xe6, 0x99, - 0x79, 0xde, 0xe7, 0xfd, 0xbd, 0xd3, 0xfa, 0x89, 0xe1, 0x7e, 0x8b, 0x76, 0x68, 0x14, 0xbb, 0x04, - 0x77, 0x1d, 0x1b, 0xf7, 0x6b, 0xb8, 0xdb, 0xa3, 0xe1, 0xc0, 0x0a, 0x42, 0x16, 0x33, 0x74, 0x5b, - 0x1d, 0x5a, 0x5d, 0xc7, 0xb6, 0xfa, 0x35, 0xfd, 0xf5, 0x49, 0xb5, 0x43, 0x7d, 0x1a, 0xb9,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a, 0x00, 0x00, + proto.RegisterType((*QueryParamsRequest)(nil), "celestia.blobstream.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "celestia.blobstream.v1.QueryParamsResponse") + proto.RegisterType((*QueryAttestationRequestByNonceRequest)(nil), "celestia.blobstream.v1.QueryAttestationRequestByNonceRequest") + proto.RegisterType((*QueryAttestationRequestByNonceResponse)(nil), "celestia.blobstream.v1.QueryAttestationRequestByNonceResponse") + proto.RegisterType((*QueryLatestAttestationNonceRequest)(nil), "celestia.blobstream.v1.QueryLatestAttestationNonceRequest") + proto.RegisterType((*QueryLatestAttestationNonceResponse)(nil), "celestia.blobstream.v1.QueryLatestAttestationNonceResponse") + proto.RegisterType((*QueryLatestValsetRequestBeforeNonceRequest)(nil), "celestia.blobstream.v1.QueryLatestValsetRequestBeforeNonceRequest") + proto.RegisterType((*QueryLatestValsetRequestBeforeNonceResponse)(nil), "celestia.blobstream.v1.QueryLatestValsetRequestBeforeNonceResponse") + proto.RegisterType((*QueryLatestUnbondingHeightRequest)(nil), "celestia.blobstream.v1.QueryLatestUnbondingHeightRequest") + proto.RegisterType((*QueryLatestUnbondingHeightResponse)(nil), "celestia.blobstream.v1.QueryLatestUnbondingHeightResponse") + proto.RegisterType((*QueryLatestDataCommitmentRequest)(nil), "celestia.blobstream.v1.QueryLatestDataCommitmentRequest") + proto.RegisterType((*QueryLatestDataCommitmentResponse)(nil), "celestia.blobstream.v1.QueryLatestDataCommitmentResponse") + proto.RegisterType((*QueryDataCommitmentRangeForHeightRequest)(nil), "celestia.blobstream.v1.QueryDataCommitmentRangeForHeightRequest") + proto.RegisterType((*QueryDataCommitmentRangeForHeightResponse)(nil), "celestia.blobstream.v1.QueryDataCommitmentRangeForHeightResponse") + proto.RegisterType((*QueryEVMAddressRequest)(nil), "celestia.blobstream.v1.QueryEVMAddressRequest") + proto.RegisterType((*QueryEVMAddressResponse)(nil), "celestia.blobstream.v1.QueryEVMAddressResponse") +} + +func init() { + proto.RegisterFile("celestia/blobstream/v1/query.proto", fileDescriptor_a3db8161895874a4) +} + +var fileDescriptor_a3db8161895874a4 = []byte{ + // 879 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4f, 0x8f, 0xdb, 0x44, + 0x1c, 0x5d, 0xa3, 0x36, 0x12, 0xbf, 0x48, 0xfc, 0x99, 0xa6, 0xd9, 0xd6, 0x5a, 0xdc, 0x65, 0xfa, + 0x87, 0x25, 0x21, 0x1e, 0xd2, 0xa2, 0x8a, 0x6e, 0x5b, 0x44, 0x52, 0x8a, 0x40, 0xe2, 0x4f, 0x09, + 0xa2, 0x07, 0x2e, 0xab, 0x71, 0x32, 0xf5, 0x5a, 0x8a, 0x3d, 0xae, 0x67, 0x12, 0x11, 0x01, 0x12, + 0xe2, 0x13, 0x80, 0xf8, 0x22, 0x1c, 0x38, 0x71, 0xe5, 0x52, 0x71, 0x5a, 0x89, 0x4b, 0x4f, 0x80, + 0x76, 0xfb, 0x41, 0x50, 0x66, 0xc6, 0x59, 0xc7, 0x49, 0x1c, 0x2b, 0x15, 0x37, 0xcf, 0xcc, 0x7b, + 0xbf, 0xf7, 0xde, 0x38, 0x79, 0x09, 0xe0, 0x3e, 0x1b, 0x32, 0x21, 0x03, 0x4a, 0xbc, 0x21, 0xf7, + 0x84, 0x4c, 0x18, 0x0d, 0xc9, 0xb8, 0x4d, 0x1e, 0x8f, 0x58, 0x32, 0x71, 0xe3, 0x84, 0x4b, 0x8e, + 0xea, 0x29, 0xc6, 0x3d, 0xc5, 0xb8, 0xe3, 0xb6, 0x7d, 0x65, 0x05, 0xd7, 0x67, 0x11, 0x13, 0x81, + 0xd0, 0x6c, 0x7b, 0x95, 0x82, 0x9c, 0xc4, 0x2c, 0xc5, 0xec, 0xf8, 0x9c, 0xfb, 0x43, 0x46, 0x68, + 0x1c, 0x10, 0x1a, 0x45, 0x5c, 0x52, 0x19, 0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dd, 0xcb, 0xc0, 0xb3, 0xb6, + 0xf1, 0x6d, 0xb8, 0x5c, 0x88, 0x32, 0xee, 0x96, 0xa7, 0xeb, 0x42, 0x23, 0x43, 0x7e, 0x48, 0x87, + 0x82, 0xc9, 0x34, 0x1e, 0x7b, 0xc4, 0x13, 0x56, 0xe2, 0x86, 0x18, 0x34, 0x4b, 0xcd, 0x30, 0x46, + 0x6e, 0x42, 0x65, 0xac, 0x30, 0xeb, 0xde, 0xa6, 0x99, 0x64, 0xd0, 0xf8, 0x32, 0xbc, 0x9e, 0x91, + 0xf9, 0x2a, 0xf2, 0x78, 0x34, 0x08, 0x22, 0xff, 0x23, 0x16, 0xf8, 0x87, 0xa9, 0x1e, 0xbe, 0x33, + 0x77, 0x65, 0x0b, 0x20, 0x63, 0xa1, 0x0e, 0x95, 0x43, 0xb5, 0x63, 0x82, 0x98, 0x15, 0xc6, 0xb0, + 0x9b, 0x61, 0x7f, 0x40, 0x25, 0xbd, 0xc7, 0xc3, 0x30, 0x90, 0x21, 0x8b, 0x66, 0x0a, 0x72, 0xce, + 0x46, 0x1e, 0x33, 0xfb, 0x28, 0xbc, 0x3c, 0xa0, 0x92, 0x1e, 0xf4, 0x67, 0x47, 0x26, 0xec, 0xb5, + 0x55, 0x61, 0x73, 0x83, 0x5e, 0x1a, 0xcc, 0xad, 0x71, 0x17, 0xf6, 0x94, 0x6a, 0x0e, 0x46, 0x23, + 0x9f, 0x7d, 0xc8, 0x93, 0xb9, 0x3b, 0x58, 0x99, 0xee, 0x3b, 0x78, 0xb3, 0xc4, 0x8c, 0xff, 0x2b, + 0xc1, 0x7d, 0xa8, 0x2b, 0xf5, 0xfb, 0x0f, 0x3f, 0xed, 0x0c, 0x06, 0x09, 0x13, 0xe9, 0xb7, 0x1e, + 0x35, 0xe1, 0xd5, 0x31, 0x1d, 0x06, 0x03, 0x2a, 0x79, 0x72, 0x40, 0xf5, 0x99, 0x12, 0x7b, 0xb1, + 0xf7, 0xca, 0xec, 0xc0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90, 0x8b, 0x31, 0x4a, 0xf1, 0xe8, 0xa9, + 0x05, 0x3b, 0x45, 0xbd, 0x85, 0xde, 0x2f, 0x94, 0x2f, 0x51, 0x9b, 0x76, 0xe7, 0x39, 0x26, 0x98, + 0x1c, 0x37, 0x54, 0x8e, 0x16, 0x6a, 0xe6, 0x72, 0xe4, 0x9a, 0x94, 0x24, 0x53, 0x3a, 0xd1, 0xb5, + 0x8c, 0x7e, 0xb7, 0xa0, 0xb6, 0xec, 0xc7, 0x04, 0xbd, 0x5b, 0xe2, 0x46, 0x97, 0xfe, 0x46, 0xd9, + 0xb7, 0x36, 0x60, 0x9a, 0x08, 0x2d, 0x15, 0xe1, 0x0d, 0x74, 0x75, 0x4d, 0x04, 0xf3, 0x65, 0xf9, + 0xd9, 0x02, 0x38, 0xad, 0x62, 0xe4, 0x16, 0x0a, 0x2f, 0x54, 0xbf, 0x4d, 0x4a, 0xe3, 0x8d, 0x3d, + 0xac, 0xec, 0xed, 0x20, 0x3b, 0x67, 0x2f, 0x53, 0xfc, 0xdd, 0x07, 0x4f, 0x8e, 0x1d, 0xeb, 0xe8, + 0xd8, 0xb1, 0xfe, 0x3d, 0x76, 0xac, 0x9f, 0x4e, 0x9c, 0xad, 0xa3, 0x13, 0x67, 0xeb, 0xe9, 0x89, + 0xb3, 0xf5, 0xf5, 0x4d, 0x3f, 0x90, 0x87, 0x23, 0xcf, 0xed, 0xf3, 0x90, 0xa4, 0xc2, 0x3c, 0xf1, + 0x67, 0xcf, 0x2d, 0x1a, 0xc7, 0xe4, 0x9b, 0xec, 0x68, 0xf5, 0x4f, 0xda, 0xab, 0xa8, 0x3f, 0x6f, + 0x37, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x4a, 0x6a, 0xa7, 0xb0, 0xd2, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -833,7 +835,7 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryClient interface { - // Params queries the current parameters for the qgb module + // Params queries the current parameters for the blobstream module Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // AttestationRequestByNonce queries attestation request by nonce. // Returns nil if not found. @@ -868,7 +870,7 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/celestia.qgb.v1.Query/Params", in, out, opts...) + err := c.cc.Invoke(ctx, "/celestia.blobstream.v1.Query/Params", in, out, opts...) if err != nil { return nil, err } @@ -877,7 +879,7 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . func (c *queryClient) AttestationRequestByNonce(ctx context.Context, in *QueryAttestationRequestByNonceRequest, opts ...grpc.CallOption) (*QueryAttestationRequestByNonceResponse, error) { out := new(QueryAttestationRequestByNonceResponse) - err := c.cc.Invoke(ctx, "/celestia.qgb.v1.Query/AttestationRequestByNonce", in, out, opts...) + err := c.cc.Invoke(ctx, "/celestia.blobstream.v1.Query/AttestationRequestByNonce", in, out, opts...) if err != nil { return nil, err } @@ -886,7 +888,7 @@ func (c *queryClient) AttestationRequestByNonce(ctx context.Context, in *QueryAt func (c *queryClient) LatestAttestationNonce(ctx context.Context, in *QueryLatestAttestationNonceRequest, opts ...grpc.CallOption) (*QueryLatestAttestationNonceResponse, error) { out := new(QueryLatestAttestationNonceResponse) - err := c.cc.Invoke(ctx, "/celestia.qgb.v1.Query/LatestAttestationNonce", in, out, opts...) + err := c.cc.Invoke(ctx, "/celestia.blobstream.v1.Query/LatestAttestationNonce", in, out, opts...) if err != nil { return nil, err } @@ -895,7 +897,7 @@ func (c *queryClient) LatestAttestationNonce(ctx context.Context, in *QueryLates func (c *queryClient) LatestValsetRequestBeforeNonce(ctx context.Context, in *QueryLatestValsetRequestBeforeNonceRequest, opts ...grpc.CallOption) (*QueryLatestValsetRequestBeforeNonceResponse, error) { out := new(QueryLatestValsetRequestBeforeNonceResponse) - err := c.cc.Invoke(ctx, "/celestia.qgb.v1.Query/LatestValsetRequestBeforeNonce", in, out, opts...) + err := c.cc.Invoke(ctx, "/celestia.blobstream.v1.Query/LatestValsetRequestBeforeNonce", in, out, opts...) if err != nil { return nil, err } @@ -904,7 +906,7 @@ func (c *queryClient) LatestValsetRequestBeforeNonce(ctx context.Context, in *Qu func (c *queryClient) LatestUnbondingHeight(ctx context.Context, in *QueryLatestUnbondingHeightRequest, opts ...grpc.CallOption) (*QueryLatestUnbondingHeightResponse, error) { out := new(QueryLatestUnbondingHeightResponse) - err := c.cc.Invoke(ctx, "/celestia.qgb.v1.Query/LatestUnbondingHeight", in, out, opts...) + err := c.cc.Invoke(ctx, "/celestia.blobstream.v1.Query/LatestUnbondingHeight", in, out, opts...) if err != nil { return nil, err } @@ -913,7 +915,7 @@ func (c *queryClient) LatestUnbondingHeight(ctx context.Context, in *QueryLatest func (c *queryClient) DataCommitmentRangeForHeight(ctx context.Context, in *QueryDataCommitmentRangeForHeightRequest, opts ...grpc.CallOption) (*QueryDataCommitmentRangeForHeightResponse, error) { out := new(QueryDataCommitmentRangeForHeightResponse) - err := c.cc.Invoke(ctx, "/celestia.qgb.v1.Query/DataCommitmentRangeForHeight", in, out, opts...) + err := c.cc.Invoke(ctx, "/celestia.blobstream.v1.Query/DataCommitmentRangeForHeight", in, out, opts...) if err != nil { return nil, err } @@ -922,7 +924,7 @@ func (c *queryClient) DataCommitmentRangeForHeight(ctx context.Context, in *Quer func (c *queryClient) LatestDataCommitment(ctx context.Context, in *QueryLatestDataCommitmentRequest, opts ...grpc.CallOption) (*QueryLatestDataCommitmentResponse, error) { out := new(QueryLatestDataCommitmentResponse) - err := c.cc.Invoke(ctx, "/celestia.qgb.v1.Query/LatestDataCommitment", in, out, opts...) + err := c.cc.Invoke(ctx, "/celestia.blobstream.v1.Query/LatestDataCommitment", in, out, opts...) if err != nil { return nil, err } @@ -931,7 +933,7 @@ func (c *queryClient) LatestDataCommitment(ctx context.Context, in *QueryLatestD func (c *queryClient) EVMAddress(ctx context.Context, in *QueryEVMAddressRequest, opts ...grpc.CallOption) (*QueryEVMAddressResponse, error) { out := new(QueryEVMAddressResponse) - err := c.cc.Invoke(ctx, "/celestia.qgb.v1.Query/EVMAddress", in, out, opts...) + err := c.cc.Invoke(ctx, "/celestia.blobstream.v1.Query/EVMAddress", in, out, opts...) if err != nil { return nil, err } @@ -940,7 +942,7 @@ func (c *queryClient) EVMAddress(ctx context.Context, in *QueryEVMAddressRequest // QueryServer is the server API for Query service. type QueryServer interface { - // Params queries the current parameters for the qgb module + // Params queries the current parameters for the blobstream module Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // AttestationRequestByNonce queries attestation request by nonce. // Returns nil if not found. @@ -1008,7 +1010,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/celestia.qgb.v1.Query/Params", + FullMethod: "/celestia.blobstream.v1.Query/Params", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) @@ -1026,7 +1028,7 @@ func _Query_AttestationRequestByNonce_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/celestia.qgb.v1.Query/AttestationRequestByNonce", + FullMethod: "/celestia.blobstream.v1.Query/AttestationRequestByNonce", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).AttestationRequestByNonce(ctx, req.(*QueryAttestationRequestByNonceRequest)) @@ -1044,7 +1046,7 @@ func _Query_LatestAttestationNonce_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/celestia.qgb.v1.Query/LatestAttestationNonce", + FullMethod: "/celestia.blobstream.v1.Query/LatestAttestationNonce", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).LatestAttestationNonce(ctx, req.(*QueryLatestAttestationNonceRequest)) @@ -1062,7 +1064,7 @@ func _Query_LatestValsetRequestBeforeNonce_Handler(srv interface{}, ctx context. } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/celestia.qgb.v1.Query/LatestValsetRequestBeforeNonce", + FullMethod: "/celestia.blobstream.v1.Query/LatestValsetRequestBeforeNonce", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).LatestValsetRequestBeforeNonce(ctx, req.(*QueryLatestValsetRequestBeforeNonceRequest)) @@ -1080,7 +1082,7 @@ func _Query_LatestUnbondingHeight_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/celestia.qgb.v1.Query/LatestUnbondingHeight", + FullMethod: "/celestia.blobstream.v1.Query/LatestUnbondingHeight", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).LatestUnbondingHeight(ctx, req.(*QueryLatestUnbondingHeightRequest)) @@ -1098,7 +1100,7 @@ func _Query_DataCommitmentRangeForHeight_Handler(srv interface{}, ctx context.Co } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/celestia.qgb.v1.Query/DataCommitmentRangeForHeight", + FullMethod: "/celestia.blobstream.v1.Query/DataCommitmentRangeForHeight", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).DataCommitmentRangeForHeight(ctx, req.(*QueryDataCommitmentRangeForHeightRequest)) @@ -1116,7 +1118,7 @@ func _Query_LatestDataCommitment_Handler(srv interface{}, ctx context.Context, d } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/celestia.qgb.v1.Query/LatestDataCommitment", + FullMethod: "/celestia.blobstream.v1.Query/LatestDataCommitment", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).LatestDataCommitment(ctx, req.(*QueryLatestDataCommitmentRequest)) @@ -1134,7 +1136,7 @@ func _Query_EVMAddress_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/celestia.qgb.v1.Query/EVMAddress", + FullMethod: "/celestia.blobstream.v1.Query/EVMAddress", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).EVMAddress(ctx, req.(*QueryEVMAddressRequest)) @@ -1143,7 +1145,7 @@ func _Query_EVMAddress_Handler(srv interface{}, ctx context.Context, dec func(in } var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "celestia.qgb.v1.Query", + ServiceName: "celestia.blobstream.v1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { @@ -1180,7 +1182,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "celestia/qgb/v1/query.proto", + Metadata: "celestia/blobstream/v1/query.proto", } func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { diff --git a/x/qgb/types/query.pb.gw.go b/x/blobstream/types/query.pb.gw.go similarity index 96% rename from x/qgb/types/query.pb.gw.go rename to x/blobstream/types/query.pb.gw.go index c7da4ad3a6..5e4d005d84 100644 --- a/x/qgb/types/query.pb.gw.go +++ b/x/blobstream/types/query.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: celestia/qgb/v1/query.proto +// source: celestia/blobstream/v1/query.proto /* Package types is a reverse proxy. @@ -680,21 +680,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"qgb", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"blobstream", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_AttestationRequestByNonce_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"qgb", "v1", "attestations", "requests", "nonce"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_AttestationRequestByNonce_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"blobstream", "v1", "attestations", "requests", "nonce"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_LatestAttestationNonce_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"qgb", "v1", "attestations", "nonce", "latest"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_LatestAttestationNonce_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"blobstream", "v1", "attestations", "nonce", "latest"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_LatestValsetRequestBeforeNonce_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"qgb", "v1", "valset", "request", "before", "nonce"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_LatestValsetRequestBeforeNonce_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"blobstream", "v1", "valset", "request", "before", "nonce"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_LatestUnbondingHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"qgb", "v1", "unbonding"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_LatestUnbondingHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"blobstream", "v1", "unbonding"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_DataCommitmentRangeForHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"qgb", "v1", "data_commitment", "range", "height"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_DataCommitmentRangeForHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"blobstream", "v1", "data_commitment", "range", "height"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_LatestDataCommitment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"qgb", "v1", "data_commitment", "latest"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_LatestDataCommitment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"blobstream", "v1", "data_commitment", "latest"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_EVMAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"qgb", "v1", "evm_address"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_EVMAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"blobstream", "v1", "evm_address"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/x/qgb/types/tx.pb.go b/x/blobstream/types/tx.pb.go similarity index 84% rename from x/qgb/types/tx.pb.go rename to x/blobstream/types/tx.pb.go index 156e6da216..2c591ea56b 100644 --- a/x/qgb/types/tx.pb.go +++ b/x/blobstream/types/tx.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: celestia/qgb/v1/tx.proto +// source: celestia/blobstream/v1/tx.proto package types @@ -42,7 +42,7 @@ func (m *MsgRegisterEVMAddress) Reset() { *m = MsgRegisterEVMAddress{} } func (m *MsgRegisterEVMAddress) String() string { return proto.CompactTextString(m) } func (*MsgRegisterEVMAddress) ProtoMessage() {} func (*MsgRegisterEVMAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_85ed1095628e2204, []int{0} + return fileDescriptor_044858489439fd7e, []int{0} } func (m *MsgRegisterEVMAddress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -93,7 +93,7 @@ func (m *MsgRegisterEVMAddressResponse) Reset() { *m = MsgRegisterEVMAdd func (m *MsgRegisterEVMAddressResponse) String() string { return proto.CompactTextString(m) } func (*MsgRegisterEVMAddressResponse) ProtoMessage() {} func (*MsgRegisterEVMAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_85ed1095628e2204, []int{1} + return fileDescriptor_044858489439fd7e, []int{1} } func (m *MsgRegisterEVMAddressResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -123,35 +123,36 @@ func (m *MsgRegisterEVMAddressResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRegisterEVMAddressResponse proto.InternalMessageInfo func init() { - proto.RegisterType((*MsgRegisterEVMAddress)(nil), "celestia.qgb.v1.MsgRegisterEVMAddress") - proto.RegisterType((*MsgRegisterEVMAddressResponse)(nil), "celestia.qgb.v1.MsgRegisterEVMAddressResponse") -} - -func init() { proto.RegisterFile("celestia/qgb/v1/tx.proto", fileDescriptor_85ed1095628e2204) } - -var fileDescriptor_85ed1095628e2204 = []byte{ - // 330 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x48, 0x4e, 0xcd, 0x49, - 0x2d, 0x2e, 0xc9, 0x4c, 0xd4, 0x2f, 0x4c, 0x4f, 0xd2, 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, - 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x87, 0xc9, 0xe8, 0x15, 0xa6, 0x27, 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xc4, 0xa9, 0x83, 0x59, 0xab, 0xa4, 0xd2, 0x74, 0xf9, 0xc9, 0x64, 0x26, 0x39, - 0x21, 0x19, 0x58, 0x94, 0x14, 0x41, 0xd5, 0xc6, 0x23, 0xf9, 0xc7, 0xc9, 0xf3, 0xc4, 0x23, 0x39, - 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, - 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0xf4, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, - 0xf3, 0x73, 0xf5, 0x61, 0x36, 0xe7, 0x17, 0xa5, 0xc3, 0xd9, 0xba, 0x89, 0x05, 0x05, 0xfa, 0x15, - 0x60, 0xc3, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0x11, 0x62, 0x0c, 0x08, 0x00, 0x00, - 0xff, 0xff, 0x45, 0x99, 0xbb, 0x9f, 0x0c, 0x02, 0x00, 0x00, + proto.RegisterType((*MsgRegisterEVMAddress)(nil), "celestia.blobstream.v1.MsgRegisterEVMAddress") + proto.RegisterType((*MsgRegisterEVMAddressResponse)(nil), "celestia.blobstream.v1.MsgRegisterEVMAddressResponse") +} + +func init() { proto.RegisterFile("celestia/blobstream/v1/tx.proto", fileDescriptor_044858489439fd7e) } + +var fileDescriptor_044858489439fd7e = []byte{ + // 337 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0x4e, 0xcd, 0x49, + 0x2d, 0x2e, 0xc9, 0x4c, 0xd4, 0x4f, 0xca, 0xc9, 0x4f, 0x2a, 0x2e, 0x29, 0x4a, 0x4d, 0xcc, 0xd5, + 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x83, 0x29, 0xd0, + 0x43, 0x28, 0xd0, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b, 0xd1, 0x07, 0xb1, + 0x20, 0xaa, 0xa5, 0x24, 0x93, 0xf3, 0x8b, 0x73, 0xf3, 0x8b, 0xe3, 0x21, 0x12, 0x10, 0x0e, 0x54, + 0x4a, 0x26, 0x3d, 0x3f, 0x3f, 0x3d, 0x27, 0x55, 0x3f, 0xb1, 0x20, 0x53, 0x3f, 0x31, 0x2f, 0x2f, + 0xbf, 0x24, 0xb1, 0x24, 0x33, 0x3f, 0x0f, 0x2a, 0xab, 0x54, 0xcf, 0x25, 0xea, 0x5b, 0x9c, 0x1e, + 0x94, 0x9a, 0x9e, 0x59, 0x5c, 0x92, 0x5a, 0xe4, 0x1a, 0xe6, 0xeb, 0x98, 0x92, 0x52, 0x94, 0x5a, + 0x5c, 0x2c, 0xe4, 0xca, 0x25, 0x58, 0x96, 0x98, 0x93, 0x99, 0x92, 0x58, 0x92, 0x5f, 0x14, 0x9f, + 0x08, 0x11, 0x94, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x74, 0x92, 0xb8, 0xb4, 0x45, 0x57, 0x04, 0x6a, + 0x07, 0x54, 0x79, 0x70, 0x49, 0x51, 0x66, 0x5e, 0x7a, 0x90, 0x00, 0x5c, 0x0b, 0xcc, 0x18, 0x79, + 0x2e, 0xee, 0xd4, 0xb2, 0x5c, 0xb8, 0x01, 0x4c, 0x20, 0x03, 0x82, 0xb8, 0x52, 0xcb, 0x72, 0xa1, + 0x0a, 0x94, 0xe4, 0xb9, 0x64, 0xb1, 0x3a, 0x20, 0x28, 0xb5, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0xd5, + 0x68, 0x3d, 0x23, 0x17, 0xb3, 0x6f, 0x71, 0xba, 0xd0, 0x72, 0x46, 0x2e, 0x21, 0x2c, 0xee, 0xd4, + 0xd5, 0xc3, 0x1e, 0x50, 0x7a, 0x58, 0x4d, 0x95, 0x32, 0x25, 0x49, 0x39, 0xcc, 0x11, 0x4a, 0xda, + 0x4d, 0x97, 0x9f, 0x4c, 0x66, 0x52, 0x15, 0x52, 0x46, 0x8b, 0xae, 0x22, 0xa8, 0x96, 0x78, 0x24, + 0x4f, 0x3a, 0x05, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, + 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x59, 0x7a, + 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0xcc, 0x1d, 0xf9, 0x45, 0xe9, 0x70, + 0xb6, 0x6e, 0x62, 0x41, 0x81, 0x7e, 0x05, 0xb2, 0x1d, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, + 0xe0, 0xc8, 0x32, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb7, 0x87, 0xf6, 0x58, 0x36, 0x02, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -184,7 +185,7 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { func (c *msgClient) RegisterEVMAddress(ctx context.Context, in *MsgRegisterEVMAddress, opts ...grpc.CallOption) (*MsgRegisterEVMAddressResponse, error) { out := new(MsgRegisterEVMAddressResponse) - err := c.cc.Invoke(ctx, "/celestia.qgb.v1.Msg/RegisterEVMAddress", in, out, opts...) + err := c.cc.Invoke(ctx, "/celestia.blobstream.v1.Msg/RegisterEVMAddress", in, out, opts...) if err != nil { return nil, err } @@ -223,7 +224,7 @@ func _Msg_RegisterEVMAddress_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/celestia.qgb.v1.Msg/RegisterEVMAddress", + FullMethod: "/celestia.blobstream.v1.Msg/RegisterEVMAddress", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).RegisterEVMAddress(ctx, req.(*MsgRegisterEVMAddress)) @@ -232,7 +233,7 @@ func _Msg_RegisterEVMAddress_Handler(srv interface{}, ctx context.Context, dec f } var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "celestia.qgb.v1.Msg", + ServiceName: "celestia.blobstream.v1.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { @@ -241,7 +242,7 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "celestia/qgb/v1/tx.proto", + Metadata: "celestia/blobstream/v1/tx.proto", } func (m *MsgRegisterEVMAddress) Marshal() (dAtA []byte, err error) { diff --git a/x/qgb/types/tx.pb.gw.go b/x/blobstream/types/tx.pb.gw.go similarity index 97% rename from x/qgb/types/tx.pb.gw.go rename to x/blobstream/types/tx.pb.gw.go index 18769d55c4..c54c2fa7e6 100644 --- a/x/qgb/types/tx.pb.gw.go +++ b/x/blobstream/types/tx.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: celestia/qgb/v1/tx.proto +// source: celestia/blobstream/v1/tx.proto /* Package types is a reverse proxy. @@ -163,7 +163,7 @@ func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client } var ( - pattern_Msg_RegisterEVMAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"qgb", "v1", "register_evm_address"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Msg_RegisterEVMAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"blobstream", "v1", "register_evm_address"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/x/qgb/types/types.go b/x/blobstream/types/types.go similarity index 100% rename from x/qgb/types/types.go rename to x/blobstream/types/types.go diff --git a/x/qgb/types/types.pb.go b/x/blobstream/types/types.pb.go similarity index 87% rename from x/qgb/types/types.pb.go rename to x/blobstream/types/types.pb.go index 294f63b15c..8269872e0a 100644 --- a/x/qgb/types/types.pb.go +++ b/x/blobstream/types/types.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: celestia/qgb/v1/types.proto +// source: celestia/blobstream/v1/types.proto package types @@ -40,7 +40,7 @@ func (m *BridgeValidator) Reset() { *m = BridgeValidator{} } func (m *BridgeValidator) String() string { return proto.CompactTextString(m) } func (*BridgeValidator) ProtoMessage() {} func (*BridgeValidator) Descriptor() ([]byte, []int) { - return fileDescriptor_5db0e6d49b998544, []int{0} + return fileDescriptor_72483563ecab3424, []int{0} } func (m *BridgeValidator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -83,7 +83,7 @@ func (m *BridgeValidator) GetEvmAddress() string { return "" } -// 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 type Valset struct { @@ -102,7 +102,7 @@ func (m *Valset) Reset() { *m = Valset{} } func (m *Valset) String() string { return proto.CompactTextString(m) } func (*Valset) ProtoMessage() {} func (*Valset) Descriptor() ([]byte, []int) { - return fileDescriptor_5db0e6d49b998544, []int{1} + return fileDescriptor_72483563ecab3424, []int{1} } func (m *Valset) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -183,7 +183,7 @@ func (m *DataCommitment) Reset() { *m = DataCommitment{} } func (m *DataCommitment) String() string { return proto.CompactTextString(m) } func (*DataCommitment) ProtoMessage() {} func (*DataCommitment) Descriptor() ([]byte, []int) { - return fileDescriptor_5db0e6d49b998544, []int{2} + return fileDescriptor_72483563ecab3424, []int{2} } func (m *DataCommitment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -241,42 +241,44 @@ func (m *DataCommitment) GetTime() time.Time { } func init() { - proto.RegisterType((*BridgeValidator)(nil), "celestia.qgb.v1.BridgeValidator") - proto.RegisterType((*Valset)(nil), "celestia.qgb.v1.Valset") - proto.RegisterType((*DataCommitment)(nil), "celestia.qgb.v1.DataCommitment") -} - -func init() { proto.RegisterFile("celestia/qgb/v1/types.proto", fileDescriptor_5db0e6d49b998544) } - -var fileDescriptor_5db0e6d49b998544 = []byte{ - // 417 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0xc1, 0x6e, 0xd3, 0x40, - 0x10, 0xcd, 0x52, 0x13, 0xda, 0x8d, 0x44, 0x25, 0x53, 0x41, 0x48, 0x25, 0x3b, 0xca, 0x29, 0x97, - 0xee, 0xaa, 0xe5, 0x82, 0x38, 0x51, 0xc3, 0x81, 0x5e, 0x2d, 0xd4, 0x03, 0x97, 0x68, 0x6d, 0x0f, - 0x9b, 0x15, 0x5e, 0x8f, 0xe3, 0xdd, 0x18, 0xf8, 0x8b, 0x7e, 0x0c, 0x12, 0xbf, 0x50, 0xc1, 0xa5, - 0x47, 0x4e, 0x80, 0x92, 0x1f, 0x41, 0xde, 0x8d, 0x39, 0x44, 0xe2, 0xc6, 0x6d, 0xde, 0xbc, 0x99, - 0xa7, 0xf7, 0x46, 0x43, 0x4f, 0x73, 0x28, 0xc1, 0x58, 0x25, 0xf8, 0x4a, 0x66, 0xbc, 0x3d, 0xe7, - 0xf6, 0x73, 0x0d, 0x86, 0xd5, 0x0d, 0x5a, 0x0c, 0x8f, 0x7b, 0x92, 0xad, 0x64, 0xc6, 0xda, 0xf3, - 0xc9, 0x89, 0x44, 0x89, 0x8e, 0xe3, 0x5d, 0xe5, 0xc7, 0x26, 0x4f, 0x73, 0x34, 0x1a, 0xcd, 0xc2, - 0x13, 0x1e, 0xec, 0xa8, 0x58, 0x22, 0xca, 0x12, 0xb8, 0x43, 0xd9, 0xfa, 0x3d, 0xb7, 0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0xb2, 0x12, 0xf3, 0x0f, 0xee, 0x2e, 0x41, 0x4a, 0x5d, 0x2b, 0xe9, 0x3a, - 0xe1, 0x29, 0x3d, 0x82, 0xaa, 0xd8, 0xd1, 0xde, 0xf7, 0x21, 0x54, 0x85, 0x27, 0xff, 0xbf, 0xf3, - 0xe4, 0xea, 0x76, 0x13, 0x91, 0xbb, 0x4d, 0x44, 0x7e, 0x6f, 0x22, 0x72, 0xb3, 0x8d, 0x06, 0x77, - 0xdb, 0x68, 0xf0, 0x63, 0x1b, 0x0d, 0xde, 0x71, 0xa9, 0xec, 0x72, 0x9d, 0xb1, 0x1c, 0x35, 0xef, - 0x2f, 0x8f, 0x8d, 0xfc, 0x5b, 0x9f, 0x89, 0xba, 0xe6, 0x9f, 0xdc, 0x23, 0xba, 0x2f, 0xcc, 0x86, - 0xce, 0xc7, 0xb3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc7, 0x9d, 0xfb, 0xb5, 0xa5, 0x02, 0x00, - 0x00, + proto.RegisterType((*BridgeValidator)(nil), "celestia.blobstream.v1.BridgeValidator") + proto.RegisterType((*Valset)(nil), "celestia.blobstream.v1.Valset") + proto.RegisterType((*DataCommitment)(nil), "celestia.blobstream.v1.DataCommitment") +} + +func init() { + proto.RegisterFile("celestia/blobstream/v1/types.proto", fileDescriptor_72483563ecab3424) +} + +var fileDescriptor_72483563ecab3424 = []byte{ + // 424 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0x41, 0x8b, 0xd3, 0x40, + 0x18, 0xed, 0xb8, 0xb1, 0xee, 0x4e, 0x41, 0x21, 0x2e, 0x6b, 0xad, 0x90, 0x94, 0x5e, 0xec, 0x65, + 0x27, 0xec, 0x0a, 0x22, 0xde, 0x36, 0x0a, 0xea, 0x4d, 0x82, 0xec, 0xc1, 0x4b, 0x99, 0x24, 0x9f, + 0xd3, 0xc1, 0x4c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x23, 0x00, 0x00, 0xff, 0xff, + 0x1a, 0x81, 0x3a, 0x86, 0xc1, 0x02, 0x00, 0x00, } func (m *BridgeValidator) Marshal() (dAtA []byte, err error) { diff --git a/x/qgb/types/types_test.go b/x/blobstream/types/types_test.go similarity index 99% rename from x/qgb/types/types_test.go rename to x/blobstream/types/types_test.go index d0b4bd80fb..8520ca0233 100644 --- a/x/qgb/types/types_test.go +++ b/x/blobstream/types/types_test.go @@ -5,7 +5,7 @@ import ( mrand "math/rand" "testing" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/types" gethcommon "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" ) diff --git a/x/qgb/types/validator.go b/x/blobstream/types/validator.go similarity index 94% rename from x/qgb/types/validator.go rename to x/blobstream/types/validator.go index 18d4971f1f..8d3724d70c 100644 --- a/x/qgb/types/validator.go +++ b/x/blobstream/types/validator.go @@ -96,22 +96,22 @@ func EVMAddrLessThan(e common.Address, o common.Address) bool { } // PowerDiff returns the difference in power between two bridge validator sets. -// Note this is QGB bridge power *not* Cosmos voting power. +// Note this is BlobStream bridge power *not* Cosmos voting power. // Cosmos voting power is based on the absolute number of tokens in the staking // pool at any given time. -// QGB bridge power is normalized using the equation. +// BlobStream bridge power is normalized using the equation. // // validators cosmos voting power / total cosmos voting power in this block = -// QGB bridge power / u32_max +// BlobStream bridge power / u32_max // // As an example if someone has 52% of the Cosmos voting power when a validator -// set is created their QGB bridge voting power is u32_max * .52 +// set is created their BlobStream bridge voting power is u32_max * .52 // // Normalized voting power dramatically reduces how often we have to produce new // validator set updates. For example if the total on chain voting power // increases by 1% due to inflation, we shouldn't have to generate a new // validator set, after all the validators retained their relative percentages -// during inflation and normalized QGB power shows no difference. +// during inflation and normalized BlobStream power shows no difference. func (ibv InternalBridgeValidators) PowerDiff(c InternalBridgeValidators) float64 { powers := map[string]int64{} // loop over ibv and initialize the map with their powers diff --git a/x/qgb/types/valset.go b/x/blobstream/types/valset.go similarity index 91% rename from x/qgb/types/valset.go rename to x/blobstream/types/valset.go index 4dfdf4b26e..bbfac00f26 100644 --- a/x/qgb/types/valset.go +++ b/x/blobstream/types/valset.go @@ -39,7 +39,7 @@ func (v *Valset) SignBytes() (ethcmn.Hash, error) { // checkpointAbiJson but other than that it's a constant that has no impact // on the output. This is because it gets encoded as a function name which // we must then discard. - bytes, err := InternalQGBabi.Pack( + bytes, err := InternalBlobStreamABI.Pack( "domainSeparateValidatorSetHash", VsDomainSeparator, big.NewInt(int64(v.Nonce)), @@ -56,7 +56,7 @@ func (v *Valset) SignBytes() (ethcmn.Hash, error) { return hash, nil } -// Hash mimics the 'computeValsetHash' function used by the qgb contracts by +// Hash mimics the 'computeValsetHash' function used by the blobstream contracts by // using a Valset to compute the hash of the abi encoded validator set. func (v *Valset) Hash() (ethcmn.Hash, error) { ethVals := make([]wrapper.Validator, len(v.Members)) @@ -67,7 +67,7 @@ func (v *Valset) Hash() (ethcmn.Hash, error) { } } - encodedVals, err := InternalQGBabi.Pack("computeValidatorSetHash", ethVals) + encodedVals, err := InternalBlobStreamABI.Pack("computeValidatorSetHash", ethVals) if err != nil { return ethcmn.Hash{}, err } diff --git a/x/qgb/keeper/keeper_attestation_test.go b/x/qgb/keeper/keeper_attestation_test.go deleted file mode 100644 index c83eae833a..0000000000 --- a/x/qgb/keeper/keeper_attestation_test.go +++ /dev/null @@ -1,41 +0,0 @@ -package keeper_test - -import ( - "testing" - - testutil "github.com/celestiaorg/celestia-app/test/util" - "github.com/celestiaorg/celestia-app/x/qgb" - "github.com/stretchr/testify/assert" -) - -func TestCheckLatestAttestationNonce(t *testing.T) { - input := testutil.CreateTestEnvWithoutQGBKeysInit(t) - k := input.QgbKeeper - - // check if the latest attestation nonce is init - exists := k.CheckLatestAttestationNonce(input.Context) - assert.False(t, exists) - - // init the latest attestation nonce - input.QgbKeeper.SetLatestAttestationNonce(input.Context, qgb.InitialLatestAttestationNonce) - - // check if the latest attestation nonce value was initialized correctly - input.QgbKeeper.CheckLatestAttestationNonce(input.Context) - assert.Equal(t, qgb.InitialLatestAttestationNonce, input.QgbKeeper.GetLatestAttestationNonce(input.Context)) -} - -func TestCheckEarliestAvailableAttestationNonce(t *testing.T) { - input := testutil.CreateTestEnvWithoutQGBKeysInit(t) - k := input.QgbKeeper - - // check if the earliest available attestation nonce is init - exists := k.CheckEarliestAvailableAttestationNonce(input.Context) - assert.False(t, exists) - - // init the earliest available attestation nonce - input.QgbKeeper.SetEarliestAvailableAttestationNonce(input.Context, qgb.InitialEarliestAvailableAttestationNonce) - - // check if the earliest attestation nonce value was initialized correctly - input.QgbKeeper.CheckEarliestAvailableAttestationNonce(input.Context) - assert.Equal(t, qgb.InitialEarliestAvailableAttestationNonce, input.QgbKeeper.GetEarliestAvailableAttestationNonce(input.Context)) -} diff --git a/x/qgb/overview.md b/x/qgb/overview.md deleted file mode 100644 index 0958c4818b..0000000000 --- a/x/qgb/overview.md +++ /dev/null @@ -1,116 +0,0 @@ -# Overview - -The Quantum Gravity Bridge (QGB) is a one way bridge from Celestia to EVM chains. It provides a way for rollups using Celestia for Data Availability (DA), and an EVM chain as a settlement layer, to prove on-chain that the rollup data was correctly posted to Celestia and verify fraud proofs otherwise. These types of rollups are called Celestiums and are discussed in the [Quantum Gravity Bridge: Secure Off-Chain Data Availability for Ethereum L2s with Celestia](https://blog.celestia.org/celestiums) blog post. - -The QGB implementation consists of three components: The [state machine](https://github.com/celestiaorg/celestia-app/tree/main/x/qgb), the [orchestrator-relayer](https://github.com/celestiaorg/orchestrator-relayer), and the [QGB smart contract](https://github.com/celestiaorg/quantum-gravity-bridge). - -## [State machine](https://github.com/celestiaorg/celestia-app/tree/main/x/qgb) - -The state machine is the `qgb` module implementation. It is responsible for creating [attestations](https://github.com/celestiaorg/celestia-app/blob/main/x/qgb/types/attestation.go#L10-L18) which are signed by [orchestrators](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/orchestrator.md). Each Celestia validator is expected to also run an orchestrator. [Relayers](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md) periodically query the Celestia state for attestations and submit them to the QGB smart contract deployed on some EVM chain. - -There are two types of [attestations](https://github.com/celestiaorg/celestia-app/blob/main/x/qgb/types/attestation.go#L10-L18): [valsets](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/proto/celestia/qgb/v1/types.proto#L18-L33) and [data commitments](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/proto/celestia/qgb/v1/types.proto#L35-L55). - -All attestations have a [`nonce`](https://github.com/celestiaorg/celestia-app/blob/8ae6a84b2c99e55625bbe99f70db1e5a985c9675/x/qgb/types/attestation.go#L16) field that defines the order in which the attestations are generated. This nonce is stored in the QGB smart contract as per [ADR-004](https://github.com/celestiaorg/celestia-app/blob/main/docs/architecture/adr-004-qgb-relayer-security.md#decision), and is used to order attestation submissions on the EVM chain. - -### [Valsets](https://github.com/celestiaorg/celestia-app/tree/main/x/qgb#valsets) - -A [valset](https://github.com/celestiaorg/celestia-app/tree/main/x/qgb#valsets) represents a validator set snapshot. It contains a list of validators' EVM addresses along with their [QGB staking power](https://github.com/celestiaorg/celestia-app/tree/main/x/qgb#validator-power-normalization). It enables the QGB smart contract to track the state of the Celestia validator set. This is necessary so that the QGB smart contract can determine when a 2/3 threshold has signed that a particular data hash has been made available on Celestia. - -A valset is [generated](https://github.com/celestiaorg/celestia-app/tree/main/x/qgb#valset-handler) inside the state machine. It is then queried, signed, and submitted to the [QGB P2P network](https://github.com/celestiaorg/orchestrator-relayer/pull/66) by orchestrators. After more than 2/3rds of the Celestia validator set have submitted their signatures, [relayers](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md) relay the attestation to the QGB smart contract along with the signatures to be [verified](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L172-L211) and eventually [stored](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L266-L268). - -The QGB smart contract keeps track of the [last validator set hash](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L44-L45) and its corresponding [power threshold](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L46-L47). This way, the contract will always be able to verify if attestations were signed using the correct Celestia validator set, and if the provided signatures represent a majority. - -### [Data commitments](https://github.com/celestiaorg/celestia-app/tree/main/x/qgb#data-commitments) - -A [data commitment](https://github.com/celestiaorg/celestia-app/tree/main/x/qgb#data-commitments) is an attestation type representing a request to commit over a set of blocks. It provides an end exclusive range of blocks for orchestrators to sign over and propagate in the QGB P2P network. The range is defined by the param [`DataCommitmentWindow`](https://github.com/celestiaorg/celestia-app/blob/fc83b04c3a5638ac8d415770e38a4046b84fa128/x/qgb/keeper/keeper_data_commitment.go#L44-L50). - -The data commitment is a Merkle tree over a sequential set of blocks. These blocks are represented as a tuple of the [data root](https://github.com/celestiaorg/celestia-core/blob/6933af1ead0ddf4a8c7516690e3674c6cdfa7bd8/rpc/core/blocks.go#L549), and the [height](https://github.com/celestiaorg/celestia-core/blob/6933af1ead0ddf4a8c7516690e3674c6cdfa7bd8/rpc/core/blocks.go#L548). This commitment can be queried from core using the [`DataCommitment`](https://github.com/celestiaorg/celestia-core/blob/6933af1ead0ddf4a8c7516690e3674c6cdfa7bd8/rpc/core/blocks.go#L210-L227) query and allows generating Merkle inclusion proofs for any blob in any block in the set. - -When an orchestrator sees a newly generated data commitment, it queries the previous valset and checks whether it's part of its validator set. Then, the orchestrator signs the new data commitment and submits that signature to the [QGB P2P network](https://github.com/celestiaorg/orchestrator-relayer/pull/66). Otherwise, it ignores it and waits for new attestations. - -After the relayer finds more than 2/3rd signatures of that data commitment, it relays the commitment along with the signatures to the QGB smart contract where they get [verified](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L172-L211). Then, the smart contract [saves](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L331-L332) the commitment to the [state](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L50-L51) thus allowing for Merkle-based inclusion proof verification for any blob posted to any committed block. - -## [Orchestrator-relayer](https://github.com/celestiaorg/orchestrator-relayer) - -The [orchestrator-relayer](https://github.com/celestiaorg/orchestrator-relayer) contains the implementation of the QGB orchestrator and relayer. - -### [Orchestrator](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/orchestrator.md) - -An [orchestrator](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/orchestrator.md) is the software responsible for querying the state machine for new attestations, signs them, and then submits them to the QGB P2P network. - -At startup, it [loads](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/orchestrator.md#evm-key) the EVM private key corresponding to the address used when creating the validator. Then, it uses it to sign the attestations digests before submitting them to the P2P network. - -An attestation digest is a bytes array containing a digest of the attestation relevant information. More on this in the [hashes format](#hashes-format) section. - -The orchestrator generally needs access to the validator's RPC/gRPC endpoints. However, it still can use public ones if needed. Its only hard requirement is having access to the specific private key for the target validator. Otherwise, the signatures will be invalid and the validator could get slashed in future versions. - -### [Relayer](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md) - -A [relayer](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md) is the software responsible for querying the signatures of a validator set from the P2P network and aggregating them into a format that the [QGB smart contract](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol) understands. - -It uses the previous valset to that attestation to know which validators should sign. Then, it looks for all of those signatures. - -When the relayer finds more than 2/3rds of the signatures, it immediately relays them to the QGB smart contract to be persisted, and starts again. - -For a [QGB smart contract](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol) to not halt, it needs at least one relayer relaying signatures to it regularly. Otherwise, the QGB contract will be out of sync and will not be able to commit to new data. - -## [QGB smart contract](https://github.com/celestiaorg/quantum-gravity-bridge) - -The [QGB smart contract](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol) is the source of truth for Celestiums. It allows proving/verifying that data was posted to the Celestia blockchain. - -In order to reflect the Celestia chain data, the [QGB smart contract](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol) keeps track of the validator set changes, via valset updates, and commits to batches of block information, via data commitments. - -### Validator set changes - -In order to submit a validator set change, the QGB smart contract provides the [`updateValidatorSet()`](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L213-L273) `external` method that takes the previous valset nonce, the new one's nonce, its power threshold and its hash, along with the actual validator set and the corresponding signatures, as `calldata` to be verified. Then, it [persists](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L266-L268) the nonce, the valset hash and the threshold in state so they can be used for future valset and data commitment updates. - -### Batches - -The batches in the QGB smart contract refer to the `data root tuple root`s described above. These are submitted using the [`submitDataRootTupleRoot()`](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L275-L337) `external` method. This latter takes the new batch nonce, its corresponding valset, the `data root tuple root`, along with the actual validator set and their corresponding signatures as `calldata`. Then, it verifies the signature and [persists](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L331-L332) the new data root tuple root to the state along with the new nonce. - -### Hashes format - -The digest created/verified in the QGB smart contract follow the [EIP-712](https://eips.ethereum.org/EIPS/eip-712) standard for hashing data. - -#### Valset digest - -A valset digest is created inside the [`domainSeparateValidatorSetHash()`](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L137-L154) method. It is the `keccak256` hash of the concatenation of the following fields: - -- `VALIDATOR_SET_HASH_DOMAIN_SEPARATOR`: which is defined as a [constant](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/Constants.sol#L4-L6). -- The valset nonce: the [universal nonce](https://github.com/celestiaorg/celestia-app/blob/main/docs/architecture/adr-004-qgb-relayer-security.md#decision) of the attestation representing that validator set change. -- The power threshold: the threshold defining 2/3rds of the validator set. -- The validator set hash: The keccak256 hash of the validator set which is calculated using the [`computeValidatorSetHash()`](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L131-L135) method. - -#### Data commitment digest - -A data commitment digest is created inside the [`domainSeparateDataRootTupleRoot()`](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L156-L170) method. It is the `keccak256` hash of the concatenation of the following fields: - -- `DATA_ROOT_TUPLE_ROOT_DOMAIN_SEPARATOR`: which is defined as a [constant](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/Constants.sol#L8-L10). -- The data commitment nonce: the [universal nonce](https://github.com/celestiaorg/celestia-app/blob/main/docs/architecture/adr-004-qgb-relayer-security.md#decision) of the attestation representing that data commitment. -- The data root tuple root: which is the commitment over the set of blocks defined [above](#data-commitments). - -### Signatures - -The signature scheme used for signing the above hashes follow the [EIP-191](https://eips.ethereum.org/EIPS/eip-191) signing standard. It uses the `ECDSA` algorithm with the `secp256k1` curve. So, the orchestrator uses the keystore to [generate](https://github.com/celestiaorg/orchestrator-relayer/blob/09ebfdc312c0d9e08856fb98cfd089e956ab7f3a/evm/ethereum_signature.go#L18-L28) these signatures. - -The output signature is in the `[R || S || V]` format where `V` is `0` or `1`. This is defined in the QGB smart contract using the [Signature](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L17-L21) struct. - -These signatures are then verified in the smart contract using the [`verifySig()`](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L124-L129) method. - -## Security assumptions - -The security of the QGB relies on an honest majority of the Celestia validator set. This assumption indicates that more than 2/3s of the voting power follows each [block validity rule](../../specs/src/specs/block_validity_rules.md). Additionally, over 2/3s of the voting power sign valid validator set updates and data commitments, as outlined above. - -If more than 1/3rd of the validator set stops running their orchestrators, then the QGB halts. And, if more than 2/3rds sign invalid data, then the QGB contract will commit to invalid data. The only recovery from such a state is to revert to social consensus, potentially slashing the guilty validators and redeploying the smart contracts. - -## Slashing - -We still don't support slashing for equivocation, liveness or invalid signatures. However, if anything were to happen to the bridge, we would be able to social slash the corrupt validators and redeploy the contract. - -Future versions of the QGB will support slashing. It will be enforced via the use of [vote extensions](https://github.com/cometbft/cometbft/blob/v0.38.0/spec/abci/abci%2B%2B_methods.md#extendvote). - -## Proofs - -To prove that data was posted to an EVM chain, we have the following method: [`verifyAttestation()`](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L339-L358). This allows to verify that a data root tuple was committed to by the QGB smart contract. - -For the remaining proofs, i.e. shares to data root tuples proofs, the app is currently able to generate and verify them. However, these are still not supported at the smart contract level. Future works will focus on this. From 3576c6a3e3ddd53209e740dda4510e8d82043449 Mon Sep 17 00:00:00 2001 From: rachid Date: Mon, 9 Oct 2023 14:29:42 +0200 Subject: [PATCH 02/14] chore: proto-gen --- x/blobstream/types/genesis.pb.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/blobstream/types/genesis.pb.go b/x/blobstream/types/genesis.pb.go index 5dd4ed48fa..db99e3912f 100644 --- a/x/blobstream/types/genesis.pb.go +++ b/x/blobstream/types/genesis.pb.go @@ -23,7 +23,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// Params represent the Quantum Gravity Bridge genesis and store parameters. +// Params represent the BlobStream genesis and store parameters. type Params struct { DataCommitmentWindow uint64 `protobuf:"varint,1,opt,name=data_commitment_window,json=dataCommitmentWindow,proto3" json:"data_commitment_window,omitempty"` } From 7abda2969de298fcf4329a426c8013b592c8f615 Mon Sep 17 00:00:00 2001 From: rachid Date: Mon, 9 Oct 2023 14:30:34 +0200 Subject: [PATCH 03/14] chore: gofumpt --- test/util/common.go | 3 ++- x/blobstream/abci_test.go | 3 ++- x/blobstream/keeper/keeper_valset_test.go | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test/util/common.go b/test/util/common.go index 7b528dea67..82e1176002 100644 --- a/test/util/common.go +++ b/test/util/common.go @@ -2,10 +2,11 @@ package util import ( "bytes" - "github.com/celestiaorg/celestia-app/x/blobstream" "testing" "time" + "github.com/celestiaorg/celestia-app/x/blobstream" + cosmosmath "cosmossdk.io/math" "github.com/celestiaorg/celestia-app/app" "github.com/celestiaorg/celestia-app/x/blobstream/keeper" diff --git a/x/blobstream/abci_test.go b/x/blobstream/abci_test.go index 0a3598f7fd..9f7e0f8921 100644 --- a/x/blobstream/abci_test.go +++ b/x/blobstream/abci_test.go @@ -1,10 +1,11 @@ package blobstream_test import ( - "github.com/celestiaorg/celestia-app/x/blobstream" "testing" "time" + "github.com/celestiaorg/celestia-app/x/blobstream" + "github.com/celestiaorg/celestia-app/x/blobstream/keeper" "github.com/celestiaorg/celestia-app/x/blobstream/types" diff --git a/x/blobstream/keeper/keeper_valset_test.go b/x/blobstream/keeper/keeper_valset_test.go index 4034868df8..0d7cd773b1 100644 --- a/x/blobstream/keeper/keeper_valset_test.go +++ b/x/blobstream/keeper/keeper_valset_test.go @@ -3,9 +3,10 @@ package keeper_test import ( "bytes" "errors" - "github.com/celestiaorg/celestia-app/x/blobstream" "testing" + "github.com/celestiaorg/celestia-app/x/blobstream" + testutil "github.com/celestiaorg/celestia-app/test/util" "github.com/celestiaorg/celestia-app/x/blobstream/types" "github.com/cosmos/cosmos-sdk/x/staking" From a27b5a0a80519c45325bb3c2071d5e90e12538bc Mon Sep 17 00:00:00 2001 From: rachid Date: Wed, 11 Oct 2023 19:53:31 +0200 Subject: [PATCH 04/14] chore: revert consensus breaking changes --- app/version.go | 4 +- .../{blobstream => qgb}/v1/genesis.proto | 4 +- .../{blobstream => qgb}/v1/query.proto | 22 ++-- .../celestia/{blobstream => qgb}/v1/tx.proto | 4 +- .../{blobstream => qgb}/v1/types.proto | 2 +- test/util/genesis/modifier.go | 6 +- x/blobstream/types/genesis.pb.go | 50 ++++---- x/blobstream/types/query.pb.go | 113 +++++++++--------- x/blobstream/types/query.pb.gw.go | 18 +-- x/blobstream/types/tx.pb.go | 73 ++++++----- x/blobstream/types/tx.pb.gw.go | 4 +- x/blobstream/types/types.pb.go | 74 ++++++------ 12 files changed, 185 insertions(+), 189 deletions(-) rename proto/celestia/{blobstream => qgb}/v1/genesis.proto (84%) rename proto/celestia/{blobstream => qgb}/v1/query.proto (85%) rename proto/celestia/{blobstream => qgb}/v1/tx.proto (91%) rename proto/celestia/{blobstream => qgb}/v1/types.proto (98%) diff --git a/app/version.go b/app/version.go index 7b711abdaf..3d05ee87cf 100644 --- a/app/version.go +++ b/app/version.go @@ -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" @@ -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(), } diff --git a/proto/celestia/blobstream/v1/genesis.proto b/proto/celestia/qgb/v1/genesis.proto similarity index 84% rename from proto/celestia/blobstream/v1/genesis.proto rename to proto/celestia/qgb/v1/genesis.proto index eccae21bb8..08beebce0f 100644 --- a/proto/celestia/blobstream/v1/genesis.proto +++ b/proto/celestia/qgb/v1/genesis.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package celestia.blobstream.v1; +package celestia.qgb.v1; import "gogoproto/gogo.proto"; -import "celestia/blobstream/v1/types.proto"; +import "celestia/qgb/v1/types.proto"; option go_package = "github.com/celestiaorg/celestia-app/x/blobstream/types"; diff --git a/proto/celestia/blobstream/v1/query.proto b/proto/celestia/qgb/v1/query.proto similarity index 85% rename from proto/celestia/blobstream/v1/query.proto rename to proto/celestia/qgb/v1/query.proto index 3455dbfa5a..bfb19047c5 100644 --- a/proto/celestia/blobstream/v1/query.proto +++ b/proto/celestia/qgb/v1/query.proto @@ -1,8 +1,8 @@ syntax = "proto3"; -package celestia.blobstream.v1; +package celestia.qgb.v1; -import "celestia/blobstream/v1/genesis.proto"; -import "celestia/blobstream/v1/types.proto"; +import "celestia/qgb/v1/genesis.proto"; +import "celestia/qgb/v1/types.proto"; import "google/api/annotations.proto"; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; @@ -14,7 +14,7 @@ option go_package = "github.com/celestiaorg/celestia-app/x/blobstream/types"; service Query { // Params queries the current parameters for the blobstream module rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/blobstream/v1/params"; + option (google.api.http).get = "/qgb/v1/params"; } // queries for attestations requests waiting to be signed by an orchestrator @@ -23,12 +23,12 @@ service Query { // Returns nil if not found. rpc AttestationRequestByNonce(QueryAttestationRequestByNonceRequest) returns (QueryAttestationRequestByNonceResponse) { - option (google.api.http).get = "/blobstream/v1/attestations/requests/{nonce}"; + option (google.api.http).get = "/qgb/v1/attestations/requests/{nonce}"; } // LatestAttestationNonce queries latest attestation nonce. rpc LatestAttestationNonce(QueryLatestAttestationNonceRequest) returns (QueryLatestAttestationNonceResponse) { - option (google.api.http).get = "/blobstream/v1/attestations/nonce/latest"; + option (google.api.http).get = "/qgb/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 @@ -37,7 +37,7 @@ service Query { // no valset before nonce 1. rpc LatestValsetRequestBeforeNonce(QueryLatestValsetRequestBeforeNonceRequest) returns (QueryLatestValsetRequestBeforeNonceResponse) { - option (google.api.http).get = "/blobstream/v1/valset/request/before/{nonce}"; + option (google.api.http).get = "/qgb/v1/valset/request/before/{nonce}"; } // misc @@ -45,26 +45,26 @@ service Query { // LatestUnbondingHeight returns the latest unbonding height rpc LatestUnbondingHeight(QueryLatestUnbondingHeightRequest) returns (QueryLatestUnbondingHeightResponse) { - option (google.api.http).get = "/blobstream/v1/unbonding"; + option (google.api.http).get = "/qgb/v1/unbonding"; } // DataCommitmentRangeForHeight returns the data commitment window // that includes the provided height rpc DataCommitmentRangeForHeight(QueryDataCommitmentRangeForHeightRequest) returns (QueryDataCommitmentRangeForHeightResponse) { - option (google.api.http).get = "/blobstream/v1/data_commitment/range/height"; + option (google.api.http).get = "/qgb/v1/data_commitment/range/height"; } // LatestDataCommitment returns the latest data commitment in store rpc LatestDataCommitment(QueryLatestDataCommitmentRequest) returns (QueryLatestDataCommitmentResponse) { - option (google.api.http).get = "/blobstream/v1/data_commitment/latest"; + option (google.api.http).get = "/qgb/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 = "/blobstream/v1/evm_address"; + option (google.api.http).get = "/qgb/v1/evm_address"; } } diff --git a/proto/celestia/blobstream/v1/tx.proto b/proto/celestia/qgb/v1/tx.proto similarity index 91% rename from proto/celestia/blobstream/v1/tx.proto rename to proto/celestia/qgb/v1/tx.proto index 60dc687c48..c9dc5c2373 100644 --- a/proto/celestia/blobstream/v1/tx.proto +++ b/proto/celestia/qgb/v1/tx.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package celestia.blobstream.v1; +package celestia.qgb.v1; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; @@ -16,7 +16,7 @@ service Msg { // state machine. rpc RegisterEVMAddress(MsgRegisterEVMAddress) returns (MsgRegisterEVMAddressResponse) { - option (google.api.http).get = "/blobstream/v1/register_evm_address"; + option (google.api.http).get = "/qgb/v1/register_evm_address"; } } diff --git a/proto/celestia/blobstream/v1/types.proto b/proto/celestia/qgb/v1/types.proto similarity index 98% rename from proto/celestia/blobstream/v1/types.proto rename to proto/celestia/qgb/v1/types.proto index ef6a6917dd..1cd3338b63 100644 --- a/proto/celestia/blobstream/v1/types.proto +++ b/proto/celestia/qgb/v1/types.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package celestia.blobstream.v1; +package celestia.qgb.v1; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; diff --git a/test/util/genesis/modifier.go b/test/util/genesis/modifier.go index 9ffe274d11..234b17bf49 100644 --- a/test/util/genesis/modifier.go +++ b/test/util/genesis/modifier.go @@ -6,7 +6,7 @@ import ( "github.com/celestiaorg/celestia-app/app" blobtypes "github.com/celestiaorg/celestia-app/x/blob/types" - qgbtypes "github.com/celestiaorg/celestia-app/x/qgb/types" + bstypes "github.com/celestiaorg/celestia-app/x/blobstream/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -49,9 +49,9 @@ func ImmediateProposals(codec codec.Codec) Modifier { // qgb module's genesis state. func SetDataCommitmentWindow(codec codec.Codec, window uint64) Modifier { return func(state map[string]json.RawMessage) map[string]json.RawMessage { - qgbGenState := qgbtypes.DefaultGenesis() + qgbGenState := bstypes.DefaultGenesis() qgbGenState.Params.DataCommitmentWindow = window - state[qgbtypes.ModuleName] = codec.MustMarshalJSON(qgbGenState) + state[bstypes.ModuleName] = codec.MustMarshalJSON(qgbGenState) return state } } diff --git a/x/blobstream/types/genesis.pb.go b/x/blobstream/types/genesis.pb.go index db99e3912f..12137c7360 100644 --- a/x/blobstream/types/genesis.pb.go +++ b/x/blobstream/types/genesis.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: celestia/blobstream/v1/genesis.proto +// source: celestia/qgb/v1/genesis.proto package types @@ -32,7 +32,7 @@ func (m *Params) Reset() { *m = Params{} } func (m *Params) String() string { return proto.CompactTextString(m) } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_0af10765b619b991, []int{0} + return fileDescriptor_10da5f8e88ce2856, []int{0} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +78,7 @@ func (m *GenesisState) Reset() { *m = GenesisState{} } func (m *GenesisState) String() string { return proto.CompactTextString(m) } func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_0af10765b619b991, []int{1} + return fileDescriptor_10da5f8e88ce2856, []int{1} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -115,32 +115,30 @@ func (m *GenesisState) GetParams() *Params { } func init() { - proto.RegisterType((*Params)(nil), "celestia.blobstream.v1.Params") - proto.RegisterType((*GenesisState)(nil), "celestia.blobstream.v1.GenesisState") + proto.RegisterType((*Params)(nil), "celestia.qgb.v1.Params") + proto.RegisterType((*GenesisState)(nil), "celestia.qgb.v1.GenesisState") } -func init() { - proto.RegisterFile("celestia/blobstream/v1/genesis.proto", fileDescriptor_0af10765b619b991) -} +func init() { proto.RegisterFile("celestia/qgb/v1/genesis.proto", fileDescriptor_10da5f8e88ce2856) } -var fileDescriptor_0af10765b619b991 = []byte{ - // 250 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0x4e, 0xcd, 0x49, - 0x2d, 0x2e, 0xc9, 0x4c, 0xd4, 0x4f, 0xca, 0xc9, 0x4f, 0x2a, 0x2e, 0x29, 0x4a, 0x4d, 0xcc, 0xd5, - 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, - 0x17, 0x12, 0x83, 0xa9, 0xd2, 0x43, 0xa8, 0xd2, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf, - 0x07, 0x2b, 0xd1, 0x07, 0xb1, 0x20, 0xaa, 0xa5, 0x94, 0x70, 0x98, 0x59, 0x52, 0x59, 0x90, 0x0a, - 0x35, 0x51, 0xc9, 0x85, 0x8b, 0x2d, 0x20, 0xb1, 0x28, 0x31, 0xb7, 0x58, 0xc8, 0x84, 0x4b, 0x2c, - 0x25, 0xb1, 0x24, 0x31, 0x3e, 0x39, 0x3f, 0x37, 0x37, 0xb3, 0x24, 0x37, 0x35, 0xaf, 0x24, 0xbe, - 0x3c, 0x33, 0x2f, 0x25, 0xbf, 0x5c, 0x82, 0x51, 0x81, 0x51, 0x83, 0x25, 0x48, 0x04, 0x24, 0xeb, - 0x0c, 0x97, 0x0c, 0x07, 0xcb, 0x59, 0xb1, 0x34, 0xdc, 0x51, 0x60, 0x50, 0x72, 0xe3, 0xe2, 0x71, - 0x87, 0x38, 0x34, 0xb8, 0x24, 0xb1, 0x24, 0x55, 0xc8, 0x8c, 0x8b, 0xad, 0x00, 0x6c, 0x2a, 0x58, - 0x2f, 0xb7, 0x91, 0x9c, 0x1e, 0x76, 0x87, 0xeb, 0x41, 0xec, 0x0e, 0x82, 0xaa, 0x76, 0x0a, 0x38, - 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, - 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xb3, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, - 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0x98, 0x59, 0xf9, 0x45, 0xe9, 0x70, 0xb6, 0x6e, 0x62, 0x41, - 0x81, 0x7e, 0x05, 0xb2, 0x47, 0xc1, 0xbe, 0x4c, 0x62, 0x03, 0x7b, 0xd3, 0x18, 0x10, 0x00, 0x00, - 0xff, 0xff, 0xa6, 0x14, 0x6a, 0xc0, 0x60, 0x01, 0x00, 0x00, +var fileDescriptor_10da5f8e88ce2856 = []byte{ + // 252 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4d, 0x4e, 0xcd, 0x49, + 0x2d, 0x2e, 0xc9, 0x4c, 0xd4, 0x2f, 0x4c, 0x4f, 0xd2, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, + 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x87, 0x49, 0xeb, 0x15, 0xa6, + 0x27, 0xe9, 0x95, 0x19, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0xe5, 0xf4, 0x41, 0x2c, 0x88, + 0x32, 0x29, 0x69, 0x74, 0x53, 0x4a, 0x2a, 0x0b, 0x52, 0xa1, 0x66, 0x28, 0xb9, 0x70, 0xb1, 0x05, + 0x24, 0x16, 0x25, 0xe6, 0x16, 0x0b, 0x99, 0x70, 0x89, 0xa5, 0x24, 0x96, 0x24, 0xc6, 0x27, 0xe7, + 0xe7, 0xe6, 0x66, 0x96, 0xe4, 0xa6, 0xe6, 0x95, 0xc4, 0x97, 0x67, 0xe6, 0xa5, 0xe4, 0x97, 0x4b, + 0x30, 0x2a, 0x30, 0x6a, 0xb0, 0x04, 0x89, 0x80, 0x64, 0x9d, 0xe1, 0x92, 0xe1, 0x60, 0x39, 0x2b, + 0x96, 0x86, 0x3b, 0x0a, 0x0c, 0x4a, 0xf6, 0x5c, 0x3c, 0xee, 0x10, 0xa7, 0x05, 0x97, 0x24, 0x96, + 0xa4, 0x0a, 0xe9, 0x73, 0xb1, 0x15, 0x80, 0x4d, 0x05, 0xeb, 0xe5, 0x36, 0x12, 0xd7, 0x43, 0x73, + 0xaa, 0x1e, 0xc4, 0xd2, 0x20, 0xa8, 0x32, 0xa7, 0x80, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, + 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, + 0x96, 0x63, 0x88, 0x32, 0x4b, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x87, + 0x19, 0x92, 0x5f, 0x94, 0x0e, 0x67, 0xeb, 0x26, 0x16, 0x14, 0xe8, 0x57, 0xe8, 0x27, 0xe5, 0xe4, + 0x27, 0x15, 0x97, 0x14, 0xa5, 0x26, 0xe6, 0x42, 0xbc, 0x97, 0xc4, 0x06, 0xf6, 0x9f, 0x31, 0x20, + 0x00, 0x00, 0xff, 0xff, 0x11, 0x19, 0x03, 0x69, 0x44, 0x01, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { diff --git a/x/blobstream/types/query.pb.go b/x/blobstream/types/query.pb.go index ed7df634a6..3917870f41 100644 --- a/x/blobstream/types/query.pb.go +++ b/x/blobstream/types/query.pb.go @@ -762,60 +762,61 @@ func init() { func init() { proto.RegisterFile("celestia/qgb/v1/query.proto", fileDescriptor_c8535c57355a2b91) } var fileDescriptor_c8535c57355a2b91 = []byte{ - // 848 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcb, 0x4f, 0xeb, 0x46, - 0x14, 0xc6, 0xe3, 0x0a, 0x22, 0xf5, 0x20, 0xf1, 0x98, 0x84, 0x50, 0x0c, 0x35, 0xe0, 0xf0, 0x2c, - 0xc5, 0x23, 0x42, 0x1f, 0x2a, 0xd0, 0x05, 0x69, 0xa9, 0x40, 0xa2, 0xaf, 0x48, 0x65, 0xd1, 0x45, - 0xd1, 0x24, 0x19, 0x8c, 0xd5, 0xd8, 0x93, 0xd8, 0x4e, 0xd4, 0xa8, 0xed, 0xa6, 0x7f, 0x41, 0xa5, - 0x2e, 0xbb, 0xee, 0xb6, 0xab, 0xae, 0xda, 0x65, 0x37, 0x88, 0x15, 0x52, 0x37, 0x5d, 0x55, 0x15, - 0xdc, 0x3f, 0xe4, 0x2a, 0xe3, 0x99, 0xe0, 0xc4, 0x8e, 0x93, 0xa0, 0xbb, 0xf3, 0xcc, 0x9c, 0xef, - 0x3b, 0xbf, 0x33, 0xe0, 0x2f, 0x86, 0xa5, 0x0a, 0xad, 0x51, 0xcf, 0xb7, 0x08, 0x6e, 0x98, 0x65, - 0xdc, 0xda, 0xc7, 0x8d, 0x26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, 0x00, + // 855 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcf, 0x4f, 0x33, 0x45, + 0x18, 0xc7, 0xbb, 0xe6, 0x7d, 0x9b, 0xf8, 0x90, 0xbc, 0x2f, 0x4c, 0x4b, 0x91, 0x05, 0x17, 0xd8, + 0xf2, 0x53, 0x64, 0x27, 0x14, 0xc5, 0x08, 0x78, 0xa0, 0x8a, 0xc1, 0x04, 0x15, 0x9b, 0xc8, 0xc1, + 0x83, 0x64, 0xb6, 0x1d, 0x96, 0x8d, 0xdd, 0x9d, 0x76, 0x77, 0xdb, 0xd8, 0xa8, 0x17, 0xff, 0x02, + 0x13, 0x8f, 0x9e, 0xbd, 0x7a, 0xf2, 0xa4, 0x47, 0x2f, 0x84, 0x13, 0x89, 0x17, 0x4f, 0xc6, 0x80, + 0x7f, 0x88, 0xe9, 0xec, 0x4c, 0xd9, 0x76, 0xb7, 0xdb, 0x96, 0x78, 0xdb, 0x99, 0x79, 0xbe, 0xdf, + 0xe7, 0xf3, 0x0c, 0xec, 0xb7, 0x0b, 0x0b, 0x55, 0x5a, 0xa7, 0x7e, 0x60, 0x13, 0xdc, 0xb4, 0x4c, + 0xdc, 0xde, 0xc5, 0xcd, 0x16, 0xf5, 0x3a, 0x46, 0xc3, 0x63, 0x01, 0x43, 0x2f, 0xe5, 0xa1, 0xd1, + 0xb4, 0x4c, 0xa3, 0xbd, 0xab, 0xbe, 0x3e, 0x58, 0x6d, 0x51, 0x97, 0xfa, 0xb6, 0x1f, 0xd6, 0xab, + 0x31, 0xb3, 0xa0, 0xd3, 0xa0, 0xf2, 0x70, 0xd1, 0x62, 0xcc, 0xaa, 0x53, 0x4c, 0x1a, 0x36, 0x26, + 0xae, 0xcb, 0x02, 0x12, 0xd8, 0xcc, 0x95, 0xa7, 0x79, 0x8b, 0x59, 0x8c, 0x3f, 0xe2, 0xee, 0x93, + 0x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0x30, 0x10, 0xd1, 0xcf, 0x0a, 0xe4, 0x93, 0xf2, 0x1b, 0xed, 0xa6, 0x5d, 0x57, + 0xe2, 0xef, 0x81, 0x5a, 0x9a, 0x44, 0x22, 0x68, 0xd7, 0x39, 0xed, 0x32, 0xd2, 0x86, 0xd1, 0x8a, + 0x7f, 0xec, 0x6f, 0x01, 0x1e, 0x53, 0x0f, 0x6d, 0x24, 0x77, 0x8a, 0xc5, 0xab, 0xba, 0x39, 0xba, + 0x50, 0x80, 0x2c, 0x70, 0x90, 0x59, 0x94, 0x93, 0x20, 0x91, 0x38, 0x2d, 0x9f, 0xdf, 0xdc, 0x6b, + 0xca, 0xdd, 0xbd, 0xa6, 0xfc, 0x73, 0xaf, 0x29, 0x3f, 0x3c, 0x68, 0x99, 0xbb, 0x07, 0x2d, 0xf3, + 0xd7, 0x83, 0x96, 0xf9, 0x62, 0xdf, 0xb2, 0x83, 0xeb, 0x96, 0x69, 0x54, 0x99, 0x83, 0x65, 0x2b, + 0xe6, 0x59, 0xbd, 0xe7, 0x1d, 0xd2, 0x68, 0xe0, 0xaf, 0xb1, 0x59, 0x67, 0xa6, 0x1f, 0x78, 0x94, + 0x38, 0xe1, 0x77, 0xa5, 0x99, 0xe5, 0x5f, 0x3f, 0x7b, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x1d, + 0x22, 0x0e, 0x84, 0xc4, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -830,7 +831,7 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryClient interface { - // Params queries the current parameters for the qgb module + // Params queries the current parameters for the blobstream module Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // AttestationRequestByNonce queries attestation request by nonce. // Returns nil if not found. @@ -937,7 +938,7 @@ func (c *queryClient) EVMAddress(ctx context.Context, in *QueryEVMAddressRequest // QueryServer is the server API for Query service. type QueryServer interface { - // Params queries the current parameters for the qgb module + // Params queries the current parameters for the blobstream module Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // AttestationRequestByNonce queries attestation request by nonce. // Returns nil if not found. diff --git a/x/blobstream/types/query.pb.gw.go b/x/blobstream/types/query.pb.gw.go index 5e4d005d84..c7da4ad3a6 100644 --- a/x/blobstream/types/query.pb.gw.go +++ b/x/blobstream/types/query.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: celestia/blobstream/v1/query.proto +// source: celestia/qgb/v1/query.proto /* Package types is a reverse proxy. @@ -680,21 +680,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"blobstream", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"qgb", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_AttestationRequestByNonce_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"blobstream", "v1", "attestations", "requests", "nonce"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_AttestationRequestByNonce_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"qgb", "v1", "attestations", "requests", "nonce"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_LatestAttestationNonce_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"blobstream", "v1", "attestations", "nonce", "latest"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_LatestAttestationNonce_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"qgb", "v1", "attestations", "nonce", "latest"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_LatestValsetRequestBeforeNonce_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"blobstream", "v1", "valset", "request", "before", "nonce"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_LatestValsetRequestBeforeNonce_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"qgb", "v1", "valset", "request", "before", "nonce"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_LatestUnbondingHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"blobstream", "v1", "unbonding"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_LatestUnbondingHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"qgb", "v1", "unbonding"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_DataCommitmentRangeForHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"blobstream", "v1", "data_commitment", "range", "height"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_DataCommitmentRangeForHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"qgb", "v1", "data_commitment", "range", "height"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_LatestDataCommitment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"blobstream", "v1", "data_commitment", "latest"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_LatestDataCommitment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"qgb", "v1", "data_commitment", "latest"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_EVMAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"blobstream", "v1", "evm_address"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_EVMAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"qgb", "v1", "evm_address"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/x/blobstream/types/tx.pb.go b/x/blobstream/types/tx.pb.go index 2c591ea56b..0c6482f9e1 100644 --- a/x/blobstream/types/tx.pb.go +++ b/x/blobstream/types/tx.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: celestia/blobstream/v1/tx.proto +// source: celestia/qgb/v1/tx.proto package types @@ -42,7 +42,7 @@ func (m *MsgRegisterEVMAddress) Reset() { *m = MsgRegisterEVMAddress{} } func (m *MsgRegisterEVMAddress) String() string { return proto.CompactTextString(m) } func (*MsgRegisterEVMAddress) ProtoMessage() {} func (*MsgRegisterEVMAddress) Descriptor() ([]byte, []int) { - return fileDescriptor_044858489439fd7e, []int{0} + return fileDescriptor_85ed1095628e2204, []int{0} } func (m *MsgRegisterEVMAddress) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -93,7 +93,7 @@ func (m *MsgRegisterEVMAddressResponse) Reset() { *m = MsgRegisterEVMAdd func (m *MsgRegisterEVMAddressResponse) String() string { return proto.CompactTextString(m) } func (*MsgRegisterEVMAddressResponse) ProtoMessage() {} func (*MsgRegisterEVMAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_044858489439fd7e, []int{1} + return fileDescriptor_85ed1095628e2204, []int{1} } func (m *MsgRegisterEVMAddressResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -123,36 +123,35 @@ func (m *MsgRegisterEVMAddressResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRegisterEVMAddressResponse proto.InternalMessageInfo func init() { - proto.RegisterType((*MsgRegisterEVMAddress)(nil), "celestia.blobstream.v1.MsgRegisterEVMAddress") - proto.RegisterType((*MsgRegisterEVMAddressResponse)(nil), "celestia.blobstream.v1.MsgRegisterEVMAddressResponse") -} - -func init() { proto.RegisterFile("celestia/blobstream/v1/tx.proto", fileDescriptor_044858489439fd7e) } - -var fileDescriptor_044858489439fd7e = []byte{ - // 337 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0x4e, 0xcd, 0x49, - 0x2d, 0x2e, 0xc9, 0x4c, 0xd4, 0x4f, 0xca, 0xc9, 0x4f, 0x2a, 0x2e, 0x29, 0x4a, 0x4d, 0xcc, 0xd5, - 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x83, 0x29, 0xd0, - 0x43, 0x28, 0xd0, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b, 0xd1, 0x07, 0xb1, - 0x20, 0xaa, 0xa5, 0x24, 0x93, 0xf3, 0x8b, 0x73, 0xf3, 0x8b, 0xe3, 0x21, 0x12, 0x10, 0x0e, 0x54, - 0x4a, 0x26, 0x3d, 0x3f, 0x3f, 0x3d, 0x27, 0x55, 0x3f, 0xb1, 0x20, 0x53, 0x3f, 0x31, 0x2f, 0x2f, - 0xbf, 0x24, 0xb1, 0x24, 0x33, 0x3f, 0x0f, 0x2a, 0xab, 0x54, 0xcf, 0x25, 0xea, 0x5b, 0x9c, 0x1e, - 0x94, 0x9a, 0x9e, 0x59, 0x5c, 0x92, 0x5a, 0xe4, 0x1a, 0xe6, 0xeb, 0x98, 0x92, 0x52, 0x94, 0x5a, - 0x5c, 0x2c, 0xe4, 0xca, 0x25, 0x58, 0x96, 0x98, 0x93, 0x99, 0x92, 0x58, 0x92, 0x5f, 0x14, 0x9f, - 0x08, 0x11, 0x94, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x74, 0x92, 0xb8, 0xb4, 0x45, 0x57, 0x04, 0x6a, - 0x07, 0x54, 0x79, 0x70, 0x49, 0x51, 0x66, 0x5e, 0x7a, 0x90, 0x00, 0x5c, 0x0b, 0xcc, 0x18, 0x79, - 0x2e, 0xee, 0xd4, 0xb2, 0x5c, 0xb8, 0x01, 0x4c, 0x20, 0x03, 0x82, 0xb8, 0x52, 0xcb, 0x72, 0xa1, - 0x0a, 0x94, 0xe4, 0xb9, 0x64, 0xb1, 0x3a, 0x20, 0x28, 0xb5, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0xd5, - 0x68, 0x3d, 0x23, 0x17, 0xb3, 0x6f, 0x71, 0xba, 0xd0, 0x72, 0x46, 0x2e, 0x21, 0x2c, 0xee, 0xd4, - 0xd5, 0xc3, 0x1e, 0x50, 0x7a, 0x58, 0x4d, 0x95, 0x32, 0x25, 0x49, 0x39, 0xcc, 0x11, 0x4a, 0xda, - 0x4d, 0x97, 0x9f, 0x4c, 0x66, 0x52, 0x15, 0x52, 0x46, 0x8b, 0xae, 0x22, 0xa8, 0x96, 0x78, 0x24, - 0x4f, 0x3a, 0x05, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, - 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x59, 0x7a, - 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0xcc, 0x1d, 0xf9, 0x45, 0xe9, 0x70, - 0xb6, 0x6e, 0x62, 0x41, 0x81, 0x7e, 0x05, 0xb2, 0x1d, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, - 0xe0, 0xc8, 0x32, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb7, 0x87, 0xf6, 0x58, 0x36, 0x02, 0x00, - 0x00, + proto.RegisterType((*MsgRegisterEVMAddress)(nil), "celestia.qgb.v1.MsgRegisterEVMAddress") + proto.RegisterType((*MsgRegisterEVMAddressResponse)(nil), "celestia.qgb.v1.MsgRegisterEVMAddressResponse") +} + +func init() { proto.RegisterFile("celestia/qgb/v1/tx.proto", fileDescriptor_85ed1095628e2204) } + +var fileDescriptor_85ed1095628e2204 = []byte{ + // 335 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xc1, 0x4a, 0x03, 0x31, + 0x10, 0x86, 0x9b, 0x0a, 0x82, 0xf1, 0xa0, 0x2e, 0x15, 0x6a, 0xa9, 0xa9, 0x14, 0x11, 0x2f, 0x4d, + 0xa8, 0x82, 0x77, 0x0b, 0x3d, 0x16, 0x64, 0x05, 0x0f, 0x5e, 0x4a, 0xb6, 0x0d, 0x31, 0xb0, 0xbb, + 0xb3, 0xcd, 0xc4, 0xa5, 0x9e, 0x04, 0x9f, 0x40, 0xf4, 0xe6, 0x73, 0xf8, 0x10, 0x1e, 0x8b, 0x5e, + 0x3c, 0x4a, 0xeb, 0x83, 0x48, 0xbb, 0xbb, 0x45, 0xa4, 0x07, 0x6f, 0x93, 0xfc, 0x5f, 0xfe, 0x7f, + 0x32, 0x43, 0xab, 0x03, 0x15, 0x2a, 0x74, 0x46, 0x8a, 0x91, 0x0e, 0x44, 0xda, 0x16, 0x6e, 0xcc, + 0x13, 0x0b, 0x0e, 0xbc, 0xad, 0x42, 0xe1, 0x23, 0x1d, 0xf0, 0xb4, 0x5d, 0xab, 0x68, 0xd0, 0xb0, + 0xd0, 0xc4, 0xbc, 0xca, 0xb0, 0xda, 0xde, 0x00,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0xc9, 0x24, 0x11, + 0x63, 0x11, 0x84, 0x10, 0xa0, 0xb3, 0x4a, 0x46, 0xc2, 0xdd, 0x25, 0x0a, 0x83, 0xf5, 0xc5, 0x5e, + 0x4e, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x9d, 0x18, 0x1a, 0xed, 0x13, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -185,7 +184,7 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { func (c *msgClient) RegisterEVMAddress(ctx context.Context, in *MsgRegisterEVMAddress, opts ...grpc.CallOption) (*MsgRegisterEVMAddressResponse, error) { out := new(MsgRegisterEVMAddressResponse) - err := c.cc.Invoke(ctx, "/celestia.blobstream.v1.Msg/RegisterEVMAddress", in, out, opts...) + err := c.cc.Invoke(ctx, "/celestia.qgb.v1.Msg/RegisterEVMAddress", in, out, opts...) if err != nil { return nil, err } @@ -224,7 +223,7 @@ func _Msg_RegisterEVMAddress_Handler(srv interface{}, ctx context.Context, dec f } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/celestia.blobstream.v1.Msg/RegisterEVMAddress", + FullMethod: "/celestia.qgb.v1.Msg/RegisterEVMAddress", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).RegisterEVMAddress(ctx, req.(*MsgRegisterEVMAddress)) @@ -233,7 +232,7 @@ func _Msg_RegisterEVMAddress_Handler(srv interface{}, ctx context.Context, dec f } var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "celestia.blobstream.v1.Msg", + ServiceName: "celestia.qgb.v1.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { @@ -242,7 +241,7 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "celestia/blobstream/v1/tx.proto", + Metadata: "celestia/qgb/v1/tx.proto", } func (m *MsgRegisterEVMAddress) Marshal() (dAtA []byte, err error) { diff --git a/x/blobstream/types/tx.pb.gw.go b/x/blobstream/types/tx.pb.gw.go index c54c2fa7e6..18769d55c4 100644 --- a/x/blobstream/types/tx.pb.gw.go +++ b/x/blobstream/types/tx.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: celestia/blobstream/v1/tx.proto +// source: celestia/qgb/v1/tx.proto /* Package types is a reverse proxy. @@ -163,7 +163,7 @@ func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client } var ( - pattern_Msg_RegisterEVMAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"blobstream", "v1", "register_evm_address"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Msg_RegisterEVMAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"qgb", "v1", "register_evm_address"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/x/blobstream/types/types.pb.go b/x/blobstream/types/types.pb.go index 8269872e0a..1f94eb431d 100644 --- a/x/blobstream/types/types.pb.go +++ b/x/blobstream/types/types.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: celestia/blobstream/v1/types.proto +// source: celestia/qgb/v1/types.proto package types @@ -40,7 +40,7 @@ func (m *BridgeValidator) Reset() { *m = BridgeValidator{} } func (m *BridgeValidator) String() string { return proto.CompactTextString(m) } func (*BridgeValidator) ProtoMessage() {} func (*BridgeValidator) Descriptor() ([]byte, []int) { - return fileDescriptor_72483563ecab3424, []int{0} + return fileDescriptor_5db0e6d49b998544, []int{0} } func (m *BridgeValidator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -102,7 +102,7 @@ func (m *Valset) Reset() { *m = Valset{} } func (m *Valset) String() string { return proto.CompactTextString(m) } func (*Valset) ProtoMessage() {} func (*Valset) Descriptor() ([]byte, []int) { - return fileDescriptor_72483563ecab3424, []int{1} + return fileDescriptor_5db0e6d49b998544, []int{1} } func (m *Valset) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -183,7 +183,7 @@ func (m *DataCommitment) Reset() { *m = DataCommitment{} } func (m *DataCommitment) String() string { return proto.CompactTextString(m) } func (*DataCommitment) ProtoMessage() {} func (*DataCommitment) Descriptor() ([]byte, []int) { - return fileDescriptor_72483563ecab3424, []int{2} + return fileDescriptor_5db0e6d49b998544, []int{2} } func (m *DataCommitment) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -241,44 +241,42 @@ func (m *DataCommitment) GetTime() time.Time { } func init() { - proto.RegisterType((*BridgeValidator)(nil), "celestia.blobstream.v1.BridgeValidator") - proto.RegisterType((*Valset)(nil), "celestia.blobstream.v1.Valset") - proto.RegisterType((*DataCommitment)(nil), "celestia.blobstream.v1.DataCommitment") + proto.RegisterType((*BridgeValidator)(nil), "celestia.qgb.v1.BridgeValidator") + proto.RegisterType((*Valset)(nil), "celestia.qgb.v1.Valset") + proto.RegisterType((*DataCommitment)(nil), "celestia.qgb.v1.DataCommitment") } -func init() { - proto.RegisterFile("celestia/blobstream/v1/types.proto", fileDescriptor_72483563ecab3424) -} +func init() { proto.RegisterFile("celestia/qgb/v1/types.proto", fileDescriptor_5db0e6d49b998544) } -var fileDescriptor_72483563ecab3424 = []byte{ +var fileDescriptor_5db0e6d49b998544 = []byte{ // 424 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0x41, 0x8b, 0xd3, 0x40, - 0x18, 0xed, 0xb8, 0xb1, 0xee, 0x4e, 0x41, 0x21, 0x2e, 0x6b, 0xad, 0x90, 0x94, 0x5e, 0xec, 0x65, - 0x27, 0xec, 0x0a, 0x22, 0xde, 0x36, 0x0a, 0xea, 0x4d, 0x82, 0xec, 0xc1, 0x4b, 0x99, 0x24, 0x9f, - 0xd3, 0xc1, 0x4c, 0xbe, 0x38, 0x33, 0x8d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0x26, 0x22, 0xd7, 0x9b, 0x88, 0xfc, 0xd9, 0x44, 0xe4, 0x72, 0x1b, + 0x0d, 0xae, 0xb7, 0xd1, 0xe0, 0xe7, 0x36, 0x1a, 0xbc, 0x7f, 0xaa, 0xb4, 0x5b, 0xae, 0x25, 0xcb, + 0xd0, 0xf0, 0xfe, 0xe5, 0xb1, 0x56, 0xff, 0xce, 0x27, 0xa2, 0xaa, 0xf8, 0x67, 0x2e, 0x0b, 0x94, + 0xd6, 0xd5, 0x20, 0x8c, 0xff, 0x8c, 0x72, 0xd8, 0xc5, 0x79, 0xf2, 0x37, 0x00, 0x00, 0xff, 0xff, + 0x43, 0xb6, 0x7e, 0xfe, 0xac, 0x02, 0x00, 0x00, } func (m *BridgeValidator) Marshal() (dAtA []byte, err error) { From e4c369e72130b8ec33d0138eb85aeef5866c993e Mon Sep 17 00:00:00 2001 From: rachid Date: Wed, 11 Oct 2023 20:09:20 +0200 Subject: [PATCH 05/14] chore: BlobStream => Blobstream --- Makefile | 2 +- app/test/qgb_rpc_test.go | 2 +- proto/celestia/qgb/v1/genesis.proto | 4 +- proto/celestia/qgb/v1/tx.proto | 2 +- proto/celestia/qgb/v1/types.proto | 2 +- test/util/common.go | 38 +++++------ x/blobstream/README.md | 64 +++++++++---------- x/blobstream/abci.go | 2 +- x/blobstream/abci_test.go | 40 ++++++------ x/blobstream/client/config.go | 2 +- x/blobstream/client/query.go | 4 +- x/blobstream/client/suite_test.go | 8 +-- x/blobstream/client/tx.go | 2 +- x/blobstream/client/verify.go | 20 +++--- x/blobstream/integration_test.go | 10 +-- x/blobstream/keeper/hooks.go | 4 +- x/blobstream/keeper/keeper.go | 4 +- .../keeper/keeper_attestation_test.go | 20 +++--- .../keeper/keeper_data_commitment_test.go | 14 ++-- x/blobstream/keeper/keeper_valset_test.go | 16 ++--- x/blobstream/keeper/msg_server.go | 2 +- x/blobstream/keeper/msg_server_test.go | 2 +- x/blobstream/overview.md | 52 +++++++-------- x/blobstream/types/abi_consts.go | 16 ++--- x/blobstream/types/genesis.go | 2 +- x/blobstream/types/genesis.pb.go | 4 +- x/blobstream/types/types.pb.go | 2 +- x/blobstream/types/validator.go | 10 +-- x/blobstream/types/valset.go | 4 +- 29 files changed, 177 insertions(+), 177 deletions(-) diff --git a/Makefile b/Makefile index a2cc0f3159..b7d1f179a8 100644 --- a/Makefile +++ b/Makefile @@ -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. diff --git a/app/test/qgb_rpc_test.go b/app/test/qgb_rpc_test.go index 07eb3f75f2..e7d4157627 100644 --- a/app/test/qgb_rpc_test.go +++ b/app/test/qgb_rpc_test.go @@ -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.") } diff --git a/proto/celestia/qgb/v1/genesis.proto b/proto/celestia/qgb/v1/genesis.proto index 08beebce0f..f574d88e4b 100644 --- a/proto/celestia/qgb/v1/genesis.proto +++ b/proto/celestia/qgb/v1/genesis.proto @@ -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; } diff --git a/proto/celestia/qgb/v1/tx.proto b/proto/celestia/qgb/v1/tx.proto index c9dc5c2373..b9c4fe1e58 100644 --- a/proto/celestia/qgb/v1/tx.proto +++ b/proto/celestia/qgb/v1/tx.proto @@ -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 diff --git a/proto/celestia/qgb/v1/types.proto b/proto/celestia/qgb/v1/types.proto index 1cd3338b63..266788e2ab 100644 --- a/proto/celestia/qgb/v1/types.proto +++ b/proto/celestia/qgb/v1/types.proto @@ -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 { diff --git a/test/util/common.go b/test/util/common.go index 82e1176002..a609c962b1 100644 --- a/test/util/common.go +++ b/test/util/common.go @@ -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 @@ -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 @@ -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( @@ -305,7 +305,7 @@ func CreateTestEnvWithoutBlobStreamKeysInit(t *testing.T) TestInput { ), ) return TestInput{ - BStreamKeeper: *k, + BstreamKeeper: *k, AccountKeeper: accountKeeper, BankKeeper: bankKeeper, StakingKeeper: stakingKeeper, @@ -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 } @@ -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) @@ -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() @@ -504,10 +504,10 @@ 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) @@ -515,10 +515,10 @@ func ExecuteBlobStreamHeights(ctx sdk.Context, bsKeeper keeper.Keeper, beginHeig 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) diff --git a/x/blobstream/README.md b/x/blobstream/README.md index 89511ec587..f040e3a0ba 100644 --- a/x/blobstream/README.md +++ b/x/blobstream/README.md @@ -2,9 +2,9 @@ ## Concepts -This module contains the [BlobStream](https://blog.celestia.org/celestiums/) state machine implementation. +This module contains the [Blobstream](https://blog.celestia.org/celestiums/) state machine implementation. -The BlobStream state machine is responsible for creating attestations which are signed by [orchestrators](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/orchestrator.md), and submitted to EVM chains by [relayers](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md). +The Blobstream state machine is responsible for creating attestations which are signed by [orchestrators](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/orchestrator.md), and submitted to EVM chains by [relayers](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md). ### Attestations types @@ -16,7 +16,7 @@ There are two types of attestations, [valsets](https://github.com/celestiaorg/ce A valset is an attestation type representing a validator set change. It allows for the validator set to change over heights which in turn defines which orchestrator should sign the attestations. -When an orchestrator sees a newly generated valset published by the Celestia state machine, it queries the previous valset and checks whether it's part of its validator set. Then, the orchestrator signs the new valset and submits that signature to the [BlobStream P2P network](https://github.com/celestiaorg/orchestrator-relayer/pull/66). Otherwise, it ignores it and waits for new attestations. +When an orchestrator sees a newly generated valset published by the Celestia state machine, it queries the previous valset and checks whether it's part of its validator set. Then, the orchestrator signs the new valset and submits that signature to the [Blobstream P2P network](https://github.com/celestiaorg/orchestrator-relayer/pull/66). Otherwise, it ignores it and waits for new attestations. A valset is comprised of the following fields: @@ -51,16 +51,16 @@ message BridgeValidator { } ``` -1. `nonce`: is the universal nonce of the attestation. It is used to prevent front running attacks in the BlobStream smart contract. More details can be found in [ADR-004](https://github.com/celestiaorg/celestia-app/blob/main/docs/architecture/adr-004-qgb-relayer-security.md). +1. `nonce`: is the universal nonce of the attestation. It is used to prevent front running attacks in the Blobstream smart contract. More details can be found in [ADR-004](https://github.com/celestiaorg/celestia-app/blob/main/docs/architecture/adr-004-qgb-relayer-security.md). 2. `members`: contains the current validator set. 3. `height`: is the height at which the valset was created. 4. `time`: is the timestamp of the height at which the valset was created. #### Validator power normalization -The [BlobStream bridge power](https://github.com/celestiaorg/celestia-app/blob/6243f26fc419c32940d5dc4eb60b0e0aaf08eaa7/proto/celestia/qgb/v1/types.proto#L12-L13) is obtained by [normalizing](https://github.com/celestiaorg/celestia-app/blob/6243f26fc419c32940d5dc4eb60b0e0aaf08eaa7/x/qgb/keeper/keeper_valset.go#L125-L150) the validators' voting power using the [min-max normalization](https://en.wikipedia.org/wiki/Feature_scaling) formula. This formula takes into account the ratio of each validator's voting power to the total voting power in the block and scales it to a value between `0` and `2^32`. +The [Blobstream bridge power](https://github.com/celestiaorg/celestia-app/blob/6243f26fc419c32940d5dc4eb60b0e0aaf08eaa7/proto/celestia/qgb/v1/types.proto#L12-L13) is obtained by [normalizing](https://github.com/celestiaorg/celestia-app/blob/6243f26fc419c32940d5dc4eb60b0e0aaf08eaa7/x/qgb/keeper/keeper_valset.go#L125-L150) the validators' voting power using the [min-max normalization](https://en.wikipedia.org/wiki/Feature_scaling) formula. This formula takes into account the ratio of each validator's voting power to the total voting power in the block and scales it to a value between `0` and `2^32`. -By normalizing the voting power, we can significantly reduce the frequency of generating new validator set updates. For example, if there is a small increase in the total on-chain voting power due to inflation, there is no need to create a new validator set. This is because the relative proportions of the validators remain the same, and the normalized BlobStream power doesn't show any significant difference. +By normalizing the voting power, we can significantly reduce the frequency of generating new validator set updates. For example, if there is a small increase in the total on-chain voting power due to inflation, there is no need to create a new validator set. This is because the relative proportions of the validators remain the same, and the normalized Blobstream power doesn't show any significant difference. To ensure that the normalization process doesn't encounter overflow errors, the function normalizeValidatorPower uses [`BigInt`](https://github.com/celestiaorg/celestia-app/blob/6243f26fc419c32940d5dc4eb60b0e0aaf08eaa7/x/qgb/keeper/keeper_valset.go#LL142C1-L142C1) operations. It scales the raw power value with respect to the total validator power, making sure the result falls within the range of 0 to `2^32`. @@ -68,13 +68,13 @@ This mechanism allows to increase/decrease the frequency at which validator set #### Power diff -[`PowerDiff(...)`](https://github.com/celestiaorg/celestia-app/blob/6243f26fc419c32940d5dc4eb60b0e0aaf08eaa7/x/qgb/types/validator.go#L100-L141) is a function that calculates the difference in power between two sets of bridge validators. It's important to note that the power being compared is not the regular voting power in the Celestia consensus network, but a specific type called BlobStream bridge power (explained above). +[`PowerDiff(...)`](https://github.com/celestiaorg/celestia-app/blob/6243f26fc419c32940d5dc4eb60b0e0aaf08eaa7/x/qgb/types/validator.go#L100-L141) is a function that calculates the difference in power between two sets of bridge validators. It's important to note that the power being compared is not the regular voting power in the Celestia consensus network, but a specific type called Blobstream bridge power (explained above). ### Data commitments -A data commitment is an attestation type representing a request to commit over a set of blocks. It provides an end exclusive range of blocks for orchestrators to sign over and propagate in the BlobStream P2P network. The range is defined by the param [`DataCommitmentWindow`](https://github.com/celestiaorg/celestia-app/blob/fc83b04c3a5638ac8d415770e38a4046b84fa128/x/qgb/keeper/keeper_data_commitment.go#L44-L50), more on this below. +A data commitment is an attestation type representing a request to commit over a set of blocks. It provides an end exclusive range of blocks for orchestrators to sign over and propagate in the Blobstream P2P network. The range is defined by the param [`DataCommitmentWindow`](https://github.com/celestiaorg/celestia-app/blob/fc83b04c3a5638ac8d415770e38a4046b84fa128/x/qgb/keeper/keeper_data_commitment.go#L44-L50), more on this below. -When an orchestrator sees a newly generated data commitment, it queries the previous valset and checks whether it's part of its validator set. Then, the orchestrator signs the new data commitment and submits that signature to the [BlobStream P2P network](https://github.com/celestiaorg/orchestrator-relayer/pull/66). Otherwise, it ignores it and waits for new attestations. +When an orchestrator sees a newly generated data commitment, it queries the previous valset and checks whether it's part of its validator set. Then, the orchestrator signs the new data commitment and submits that signature to the [Blobstream P2P network](https://github.com/celestiaorg/orchestrator-relayer/pull/66). Otherwise, it ignores it and waits for new attestations. A data commitment is comprised of the following fields: @@ -102,7 +102,7 @@ message DataCommitment { } ``` -1. `nonce`: is the universal nonce of the attestation. It is used to prevent front running attacks in the BlobStream smart contract. More details can be found in [ADR-004](https://github.com/celestiaorg/celestia-app/blob/main/docs/architecture/adr-004-qgb-relayer-security.md). +1. `nonce`: is the universal nonce of the attestation. It is used to prevent front running attacks in the Blobstream smart contract. More details can be found in [ADR-004](https://github.com/celestiaorg/celestia-app/blob/main/docs/architecture/adr-004-qgb-relayer-security.md). 2. `begin_block`: the data commitment range first block. 3. `end_block`: the data commitment range last block. The range is end exclusive. Thus, the commitment will be over the set of blocks defined by `[begin_block, end_block)`. 4. `time`: is the timestamp of the height at which the data commitment was created. @@ -132,7 +132,7 @@ struct DataRootTuple { 2. `dataRoot`: the data root, aka data hash, of the block. 3. `squareSize`: the [square](https://celestiaorg.github.io/celestia-app/specs/data_structures.html#arranging-available-data-into-shares) size of the block. -These commitments are queried by orchestrators from [Celestia-core](https://github.com/celestiaorg/celestia-core/blob/d280f37a8376ed54ae03b10896fa25a4cbbc6d5b/rpc/core/blocks.go#L178-L195), signed, then submitted to the BlobStream P2P network as described [here](https://github.com/celestiaorg/orchestrator-relayer/blob/35b5df94c1602eb5e93a32d1bc6e5c8a4b5861e5/orchestrator/orchestrator.go#L331-L357). +These commitments are queried by orchestrators from [Celestia-core](https://github.com/celestiaorg/celestia-core/blob/d280f37a8376ed54ae03b10896fa25a4cbbc6d5b/rpc/core/blocks.go#L178-L195), signed, then submitted to the Blobstream P2P network as described [here](https://github.com/celestiaorg/orchestrator-relayer/blob/35b5df94c1602eb5e93a32d1bc6e5c8a4b5861e5/orchestrator/orchestrator.go#L331-L357). ## State @@ -147,13 +147,13 @@ Both types of attestations are set using the [`SetAttestationRequest(...)`](http ### Latest attestation nonce -The latest attestation nonce represents the most recently generated nonce in the BlobStream state machine store. It is [initialized to 0](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/x/qgb/genesis.go#L12) in genesis, and gets incremented at block 1. +The latest attestation nonce represents the most recently generated nonce in the Blobstream state machine store. It is [initialized to 0](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/x/qgb/genesis.go#L12) in genesis, and gets incremented at block 1. | Name | Key | |------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------| | LatestAttestationNonce | [`[LatestAttestationNonce]`](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/x/qgb/types/keys.go#L32-L33) | -The latest attestation nonce can be set to the BlobStream state machine store using the [`SetLatestAttestationNonce(...)`](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/x/qgb/keeper/keeper_attestation.go#L44-L57) method and retrieved using the [`GetLatestAttestationNonce(...)`](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/x/qgb/keeper/keeper_attestation.go#L67-L79). +The latest attestation nonce can be set to the Blobstream state machine store using the [`SetLatestAttestationNonce(...)`](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/x/qgb/keeper/keeper_attestation.go#L44-L57) method and retrieved using the [`GetLatestAttestationNonce(...)`](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/x/qgb/keeper/keeper_attestation.go#L67-L79). To check if the latest attestation nonce is defined in store, use the [`CheckLatestAttestationNonce(...)`](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/x/qgb/keeper/keeper_attestation.go#L59-L65) method. @@ -166,17 +166,17 @@ The latest unbonding height indicates the most recent height at which some valid |------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------| | LatestUnBondingBlockHeight | [`[LatestUnBondingBlockHeight]`](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/types/keys.go#L28-L30) | -The latest unbonding height can be set to the BlobStream state machine store using the [`SetLatestUnBondingBlockHeight(...)`](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/keeper/keeper_valset.go#L58-L64) method, and it is called in a `hook` when a validator starts unbonding. More details on hooks are below. +The latest unbonding height can be set to the Blobstream state machine store using the [`SetLatestUnBondingBlockHeight(...)`](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/keeper/keeper_valset.go#L58-L64) method, and it is called in a `hook` when a validator starts unbonding. More details on hooks are below. ### Earliest attestation nonce -The earliest attestation nonce corresponds to the nonce of the earliest generated attestation in the BlobStream state machine store. It is [initialized to 1](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/genesis.go#L13-L17) in genesis, and gets incremented updated when [pruning](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/abci.go#L184-L185). +The earliest attestation nonce corresponds to the nonce of the earliest generated attestation in the Blobstream state machine store. It is [initialized to 1](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/genesis.go#L13-L17) in genesis, and gets incremented updated when [pruning](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/abci.go#L184-L185). | Name | Key | |------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------| | EarliestAvailableAttestationNonce | [`[EarliestAvailableAttestationNonce]`](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/types/keys.go#L35-L37) | -The earliest attestation nonce can be set to the BlobStream state machine store using the [`SetEarliestAvailableAttestationNonce(...)`](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/keeper/keeper_attestation.go#L104-L110) method, and retrieved using the [`GetEarliestAvailableAttestationNonce(...)`](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/keeper/keeper_attestation.go#L89-L102). +The earliest attestation nonce can be set to the Blobstream state machine store using the [`SetEarliestAvailableAttestationNonce(...)`](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/keeper/keeper_attestation.go#L104-L110) method, and retrieved using the [`GetEarliestAvailableAttestationNonce(...)`](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/keeper/keeper_attestation.go#L89-L102). To check if the earliest attestation nonce is defined in store, use the [`CheckEarliestAvailableAttestationNonce(...)`](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/keeper/keeper_attestation.go#L81-L87) method. @@ -216,13 +216,13 @@ After a range update, the [`handler`](https://github.com/celestiaorg/celestia-ap ### Pruning -The third action done during the BlobStream [`EndBlock`](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/abci.go#L28-L35) step is pruning. +The third action done during the Blobstream [`EndBlock`](https://github.com/celestiaorg/celestia-app/blob/9bf0cf1dd9ce31a3fecb51310c3913820b21a8c2/x/qgb/abci.go#L28-L35) step is pruning. -The BlobStream state machine prunes old attestations up to the specified [`AttestationExpiryTime`](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/abci.go#L22-L25), which is currently set to 3 weeks, matching the consensus unbonding time. +The Blobstream state machine prunes old attestations up to the specified [`AttestationExpiryTime`](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/abci.go#L22-L25), which is currently set to 3 weeks, matching the consensus unbonding time. So, on every block height, the state machine [checks](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/abci.go#L140-L157) whether there are any [`expired`](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/abci.go#L22-L25) attestations. Then, it starts [pruning](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/abci.go#L161-L182) via calling the [`DeleteAttestation(...)`](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/keeper/keeper_attestation.go#L128-L139) method. Then, it [`prints`](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/abci.go#L186-L194) a log message specifying the number of pruned attestations. -If the all the attestations in store are expired, which is an edge case that should never occur, the BlobStream state machine [doesn't prune](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/abci.go#L161) the latest attestation. +If the all the attestations in store are expired, which is an edge case that should never occur, the Blobstream state machine [doesn't prune](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/abci.go#L161) the latest attestation. ### Hooks @@ -234,13 +234,13 @@ When a validator starts unbonding, a [hook](https://github.com/celestiaorg/celes ### New attestation event -After creating a new attestation, and adding it to the BlobStream store, an event is [emitted](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/keeper/keeper_attestation.go#L16-L22) containing its nonce. +After creating a new attestation, and adding it to the Blobstream store, an event is [emitted](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/keeper/keeper_attestation.go#L16-L22) containing its nonce. ## Client ### Query attestation command -The BlobStream query attestation command is part of the `celestia-appd` binary. It allows the user to query specific attestations by their corresponding nonce. +The Blobstream query attestation command is part of the `celestia-appd` binary. It allows the user to query specific attestations by their corresponding nonce. ```shell $ celestia-appd query blobstream attestation --help @@ -255,20 +255,20 @@ Aliases: ### Verification command -The BlobStream verification command is part of the `celestia-appd` binary. It allows the user to verify that a set of shares has been posted to a specific BlobStream contract. +The Blobstream verification command is part of the `celestia-appd` binary. It allows the user to verify that a set of shares has been posted to a specific Blobstream contract. ```shell $ celestia-appd verify --help -Verifies that a transaction hash, a range of shares, or a blob referenced by its transaction hash were committed to by the BlobStream contract +Verifies that a transaction hash, a range of shares, or a blob referenced by its transaction hash were committed to by the Blobstream contract Usage: celestia-appd verify [command] Available Commands: - blob Verifies that a blob, referenced by its transaction hash, in hex format, has been committed to by the BlobStream contract. - shares Verifies that a range of shares has been committed to by the BlobStream contract - tx Verifies that a transaction hash, in hex format, has been committed to by the BlobStream contract + blob Verifies that a blob, referenced by its transaction hash, in hex format, has been committed to by the Blobstream contract. + shares Verifies that a range of shares has been committed to by the Blobstream contract + tx Verifies that a transaction hash, in hex format, has been committed to by the Blobstream contract Flags: -h, --help help for verify @@ -278,9 +278,9 @@ Use "celestia-appd verify [command] --help" for more information about a command It currently supports three sub-commands: -- `blob`: Takes a transaction hash, in hex format, and verifies that the blob paid for by the transaction has been committed to by the BlobStream contract. It only supports one blob for now. -- `shares`: Takes a range of shares and a height, and verifies that these shares have been committed to by the BlobStream contract. -- `tx`: Takes a transaction hash, in hex format, and verifies that it has been committed to by the BlobStream contract. +- `blob`: Takes a transaction hash, in hex format, and verifies that the blob paid for by the transaction has been committed to by the Blobstream contract. It only supports one blob for now. +- `shares`: Takes a range of shares and a height, and verifies that these shares have been committed to by the Blobstream contract. +- `tx`: Takes a transaction hash, in hex format, and verifies that it has been committed to by the Blobstream contract. ## Params @@ -370,13 +370,13 @@ if k.CheckLatestAttestationNonce(ctx) && k.GetLatestAttestationNonce(ctx)+1 != n ### Hooks initialization panic -When initializing the BlobStream hooks, if the BlobStream store key is not setup correctly, the state machine will [panic](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/keeper/hooks.go#L14-L19): +When initializing the Blobstream hooks, if the Blobstream store key is not setup correctly, the state machine will [panic](https://github.com/celestiaorg/celestia-app/blob/0629c757ef35a24187a8d7a4c706c7cdc894c8b6/x/qgb/keeper/hooks.go#L14-L19): ```golang // if startup is mis-ordered in app.go this hook will halt the chain when // called. Keep this check to make such a mistake obvious if k.storeKey == nil { - panic("hooks initialized before BlobStreamKeeper") + panic("hooks initialized before BlobstreamKeeper") } ``` @@ -386,4 +386,4 @@ The smart contract implementation is in [quantum-gravity-bridge](https://github. The orchestrator and relayer implementations are in the [orchestrator-relayer](https://github.com/celestiaorg/orchestrator-relayer) repo. -BlobStream ADRs are in the [docs](https://github.com/celestiaorg/celestia-app/tree/main/docs/architecture). +Blobstream ADRs are in the [docs](https://github.com/celestiaorg/celestia-app/tree/main/docs/architecture). diff --git a/x/blobstream/abci.go b/x/blobstream/abci.go index e7c42a5d55..f537e19fd9 100644 --- a/x/blobstream/abci.go +++ b/x/blobstream/abci.go @@ -184,7 +184,7 @@ func pruneAttestations(ctx sdk.Context, k keeper.Keeper) { // some attestations were pruned and we need to update the state for it k.SetEarliestAvailableAttestationNonce(ctx, newEarliestAvailableNonce) ctx.Logger().Debug( - "pruned attestations from BlobStream store", + "pruned attestations from Blobstream store", "count", newEarliestAvailableNonce-earliestAttestation.GetNonce(), "new_earliest_available_nonce", diff --git a/x/blobstream/abci_test.go b/x/blobstream/abci_test.go index 9f7e0f8921..7d8c18010f 100644 --- a/x/blobstream/abci_test.go +++ b/x/blobstream/abci_test.go @@ -19,7 +19,7 @@ import ( func TestFirstAttestationIsValset(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - pk := input.BStreamKeeper + pk := input.BstreamKeeper ctx = ctx.WithBlockHeight(1) expectedTime := ctx.BlockTime() @@ -42,7 +42,7 @@ func TestFirstAttestationIsValset(t *testing.T) { func TestValsetCreationWhenValidatorUnbonds(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - pk := input.BStreamKeeper + pk := input.BstreamKeeper ctx = ctx.WithBlockHeight(1) // run abci methods after chain init @@ -68,7 +68,7 @@ func TestValsetCreationWhenValidatorUnbonds(t *testing.T) { func TestValsetCreationWhenEditingEVMAddr(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - pk := input.BStreamKeeper + pk := input.BstreamKeeper ctx = ctx.WithBlockHeight(1) @@ -81,7 +81,7 @@ func TestValsetCreationWhenEditingEVMAddr(t *testing.T) { require.Equal(t, uint64(1), currentAttestationNonce) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) - msgServer := keeper.NewMsgServerImpl(input.BStreamKeeper) + msgServer := keeper.NewMsgServerImpl(input.BstreamKeeper) newEVMAddr := testfactory.RandomEVMAddress() registerMsg := types.NewMsgRegisterEVMAddress( @@ -99,7 +99,7 @@ func TestValsetCreationWhenEditingEVMAddr(t *testing.T) { func TestSetValset(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - pk := input.BStreamKeeper + pk := input.BstreamKeeper vs, err := pk.GetCurrentValset(ctx) require.Nil(t, err) @@ -111,7 +111,7 @@ func TestSetValset(t *testing.T) { func TestSetDataCommitment(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - qk := input.BStreamKeeper + qk := input.BstreamKeeper ctx = ctx.WithBlockHeight(int64(qk.GetDataCommitmentWindowParam(ctx))) expectedTime := ctx.BlockTime() @@ -149,7 +149,7 @@ func TestSetDataCommitment(t *testing.T) { // table structure is to make it easy to understand the test flow. func TestGetDataCommitment(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - qk := input.BStreamKeeper + qk := input.BstreamKeeper tests := []struct { name string @@ -224,7 +224,7 @@ func TestGetDataCommitment(t *testing.T) { func TestDataCommitmentCreation(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - qk := input.BStreamKeeper + qk := input.BstreamKeeper ctx = ctx.WithBlockHeight(1) @@ -248,7 +248,7 @@ func TestDataCommitmentCreation(t *testing.T) { func TestDataCommitmentRange(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - qk := input.BStreamKeeper + qk := input.BstreamKeeper ctx = ctx.WithBlockHeight(1) // run abci methods after chain init @@ -294,7 +294,7 @@ func TestDataCommitmentRange(t *testing.T) { func TestHasDataCommitmentInStore(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - qk := input.BStreamKeeper + qk := input.BstreamKeeper // set the data commitment window qk.SetParams(ctx, types.Params{DataCommitmentWindow: 400}) require.Equal(t, uint64(400), qk.GetDataCommitmentWindowParam(ctx)) @@ -357,24 +357,24 @@ func TestHasDataCommitmentInStore(t *testing.T) { // end of the test, the data commitments cover all the needed ranges. func TestDataCommitmentCreationCatchup(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - qk := input.BStreamKeeper + qk := input.BstreamKeeper ctx = ctx.WithBlockHeight(1) // from height 1 to 1500 with a window of 400 qk.SetParams(ctx, types.Params{DataCommitmentWindow: 400}) - ctx = testutil.ExecuteBlobStreamHeights(ctx, qk, 1, 1501) + ctx = testutil.ExecuteBlobstreamHeights(ctx, qk, 1, 1501) // change window to 100 and execute up to 1920 qk.SetParams(ctx, types.Params{DataCommitmentWindow: 100}) - ctx = testutil.ExecuteBlobStreamHeights(ctx, qk, 1501, 1921) + ctx = testutil.ExecuteBlobstreamHeights(ctx, qk, 1501, 1921) // change window to 1000 and execute up to 3500 qk.SetParams(ctx, types.Params{DataCommitmentWindow: 1000}) - ctx = testutil.ExecuteBlobStreamHeights(ctx, qk, 1921, 3501) + ctx = testutil.ExecuteBlobstreamHeights(ctx, qk, 1921, 3501) // change window to 111 and execute up to 3800 qk.SetParams(ctx, types.Params{DataCommitmentWindow: 111}) - ctx = testutil.ExecuteBlobStreamHeights(ctx, qk, 3501, 3801) + ctx = testutil.ExecuteBlobstreamHeights(ctx, qk, 3501, 3801) // check if a data commitment was created hasDataCommitment, err := qk.HasDataCommitmentInStore(ctx) @@ -517,17 +517,17 @@ func TestDataCommitmentCreationCatchup(t *testing.T) { } // TestPruning tests the pruning mechanism by: 1. Generating a set of -// attestations 2. Running the BlobStream EndBlocker 3. Verifying that the expired +// attestations 2. Running the Blobstream EndBlocker 3. Verifying that the expired // attestations are pruned func TestPruning(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - bsKeeper := input.BStreamKeeper + bsKeeper := input.BstreamKeeper // set the data commitment window window := uint64(101) bsKeeper.SetParams(ctx, types.Params{DataCommitmentWindow: window}) initialBlockTime := ctx.BlockTime() blockInterval := 10 * time.Minute - ctx = testutil.ExecuteBlobStreamHeightsWithTime(ctx, bsKeeper, 1, 1626, blockInterval) + ctx = testutil.ExecuteBlobstreamHeightsWithTime(ctx, bsKeeper, 1, 1626, blockInterval) // check that we created a number of attestations assert.Equal(t, uint64(17), bsKeeper.GetLatestAttestationNonce(ctx)) @@ -540,7 +540,7 @@ func TestPruning(t *testing.T) { } // continue executing heights - ctx = testutil.ExecuteBlobStreamHeightsWithTime(ctx, bsKeeper, 1626, 5000, blockInterval) + ctx = testutil.ExecuteBlobstreamHeightsWithTime(ctx, bsKeeper, 1626, 5000, blockInterval) earliestAttestationNonce := bsKeeper.GetEarliestAvailableAttestationNonce(ctx) assert.Equal(t, uint64(21), earliestAttestationNonce) @@ -577,5 +577,5 @@ func TestPruning(t *testing.T) { // continue running the chain for a few more blocks to be sure no // inconsistency happens after pruning - testutil.ExecuteBlobStreamHeightsWithTime(ctx, bsKeeper, 5000, 6000, blockInterval) + testutil.ExecuteBlobstreamHeightsWithTime(ctx, bsKeeper, 5000, 6000, blockInterval) } diff --git a/x/blobstream/client/config.go b/x/blobstream/client/config.go index 0f67258d7b..c5b9c088b5 100644 --- a/x/blobstream/client/config.go +++ b/x/blobstream/client/config.go @@ -21,7 +21,7 @@ func addVerifyFlags(cmd *cobra.Command) *cobra.Command { cmd.Flags().Uint64P(evmChainIDFlag, "z", 5, "The EVM chain ID") cmd.Flags().StringP(flags.FlagNode, "t", "http://localhost:26657", ": to Tendermint RPC interface for this chain") cmd.Flags().StringP(evmRPCFlag, "e", "http://localhost:8545", "The EVM RPC address") - cmd.Flags().StringP(contractAddressFlag, "a", "", "The contract address at which the BlobStream is deployed") + cmd.Flags().StringP(contractAddressFlag, "a", "", "The contract address at which Blobstream is deployed") cmd.Flags().StringP(celesGRPCFlag, "c", "localhost:9090", ": To Celestia GRPC address") return cmd diff --git a/x/blobstream/client/query.go b/x/blobstream/client/query.go index 95ab18c81f..9e696f3eb6 100644 --- a/x/blobstream/client/query.go +++ b/x/blobstream/client/query.go @@ -15,7 +15,7 @@ import ( // GetQueryCmd returns the CLI query commands for this module func GetQueryCmd() *cobra.Command { - // Group BlobStream queries under a subcommand + // Group Blobstream queries under a subcommand cmd := &cobra.Command{ Use: types.ModuleName, Short: fmt.Sprintf("Querying commands for the %s module", types.ModuleName), @@ -115,7 +115,7 @@ func unmarshallAttestation(attestation *codectypes.Any) (types.AttestationReques return unmarshalledAttestation, nil } -// makeInterfaceRegistry creates the interface registry containing the BlobStream interfaces +// makeInterfaceRegistry creates the interface registry containing the Blobstream interfaces func makeInterfaceRegistry() codectypes.InterfaceRegistry { // create the codec interfaceRegistry := codectypes.NewInterfaceRegistry() diff --git a/x/blobstream/client/suite_test.go b/x/blobstream/client/suite_test.go index 4ab7f4f24f..327a2ce440 100644 --- a/x/blobstream/client/suite_test.go +++ b/x/blobstream/client/suite_test.go @@ -20,9 +20,9 @@ type CLITestSuite struct { func (s *CLITestSuite) SetupSuite() { if testing.Short() { - s.T().Skip("skipping BlobStream CLI tests in short mode.") + s.T().Skip("skipping Blobstream CLI tests in short mode.") } - s.T().Log("setting up BlobStream CLI test suite") + s.T().Log("setting up Blobstream CLI test suite") cfg := network.DefaultConfig() cfg.EnableTMLogging = false @@ -46,10 +46,10 @@ func (s *CLITestSuite) SetupSuite() { } func (s *CLITestSuite) TearDownSuite() { - s.T().Log("tearing down BlobStream CLI test suite") + s.T().Log("tearing down Blobstream CLI test suite") s.network.Cleanup() } -func TestBlobStreamCLI(t *testing.T) { +func TestBlobstreamCLI(t *testing.T) { suite.Run(t, new(CLITestSuite)) } diff --git a/x/blobstream/client/tx.go b/x/blobstream/client/tx.go index 38672cd85c..45309fe689 100644 --- a/x/blobstream/client/tx.go +++ b/x/blobstream/client/tx.go @@ -30,7 +30,7 @@ func CmdRegisterEVMAddress() *cobra.Command { Use: "register [valAddress] [evmAddress]", Short: "Register an EVM address for a validator", Long: `Registers an EVM address for a validator. This address will be used to -sign attestations as part of the BlobStream protocol. Only the validator, as the signer, +sign attestations as part of Blobstream protocol. Only the validator, as the signer, can register an EVM address. To change the EVM address, the validator can simply send a new message overriding the previous one. `, diff --git a/x/blobstream/client/verify.go b/x/blobstream/client/verify.go index 42f845c565..9baa9b4d19 100644 --- a/x/blobstream/client/verify.go +++ b/x/blobstream/client/verify.go @@ -24,7 +24,7 @@ import ( func VerifyCmd() *cobra.Command { command := &cobra.Command{ Use: "verify", - Short: "Verifies that a transaction hash, a range of shares, or a blob referenced by its transaction hash were committed to by the BlobStream contract", + Short: "Verifies that a transaction hash, a range of shares, or a blob referenced by its transaction hash were committed to by the Blobstream contract", } command.AddCommand( txCmd(), @@ -38,7 +38,7 @@ func txCmd() *cobra.Command { command := &cobra.Command{ Use: "tx ", Args: cobra.ExactArgs(1), - Short: "Verifies that a transaction hash, in hex format, has been committed to by the BlobStream contract", + Short: "Verifies that a transaction hash, in hex format, has been committed to by the Blobstream contract", RunE: func(cmd *cobra.Command, args []string) error { txHash, err := hex.DecodeString(args[0]) if err != nil { @@ -72,7 +72,7 @@ func txCmd() *cobra.Command { return err } - logger.Info("verifying that the transaction was committed to by the BlobStream", "tx_hash", args[0], "height", tx.Height) + logger.Info("verifying that the transaction was committed to by the Blobstream", "tx_hash", args[0], "height", tx.Height) blockRes, err := trpc.Block(cmd.Context(), &tx.Height) if err != nil { @@ -95,7 +95,7 @@ func blobCmd() *cobra.Command { command := &cobra.Command{ Use: "blob ", Args: cobra.ExactArgs(2), - Short: "Verifies that a blob, referenced by its transaction hash, in hex format, has been committed to by the BlobStream contract", + Short: "Verifies that a blob, referenced by its transaction hash, in hex format, has been committed to by the Blobstream contract", RunE: func(cmd *cobra.Command, args []string) error { txHash, err := hex.DecodeString(args[0]) if err != nil { @@ -134,7 +134,7 @@ func blobCmd() *cobra.Command { return err } - logger.Info("verifying that the blob was committed to by the BlobStream", "tx_hash", args[0], "height", tx.Height) + logger.Info("verifying that the blob was committed to by the Blobstream", "tx_hash", args[0], "height", tx.Height) blockRes, err := trpc.Block(cmd.Context(), &tx.Height) if err != nil { @@ -157,7 +157,7 @@ func sharesCmd() *cobra.Command { command := &cobra.Command{ Use: "shares ", Args: cobra.ExactArgs(3), - Short: "Verifies that a range of shares has been committed to by the BlobStream contract. The range should be end exclusive.", + Short: "Verifies that a range of shares has been committed to by the Blobstream contract. The range should be end exclusive.", RunE: func(cmd *cobra.Command, args []string) error { height, err := strconv.ParseUint(args[0], 10, 0) if err != nil { @@ -251,7 +251,7 @@ func VerifyShares(ctx context.Context, logger tmlog.Logger, config VerifyConfig, } logger.Info( - "proving that the data root was committed to in the BlobStream contract", + "proving that the data root was committed to in the Blobstream contract", "contract_address", config.ContractAddr, "fist_block", @@ -285,7 +285,7 @@ func VerifyShares(ctx context.Context, logger tmlog.Logger, config VerifyConfig, return false, err } - logger.Info("verifying that the data root was committed to in the BlobStream contract") + logger.Info("verifying that the data root was committed to in the Blobstream contract") isCommittedTo, err = VerifyDataRootInclusion( ctx, bsWrapper, @@ -299,9 +299,9 @@ func VerifyShares(ctx context.Context, logger tmlog.Logger, config VerifyConfig, } if isCommittedTo { - logger.Info("the BlobStream contract has committed to the provided shares") + logger.Info("the Blobstream contract has committed to the provided shares") } else { - logger.Info("the BlobStream contract didn't commit to the provided shares") + logger.Info("the Blobstream contract didn't commit to the provided shares") } return isCommittedTo, nil diff --git a/x/blobstream/integration_test.go b/x/blobstream/integration_test.go index 97117b3171..398999c676 100644 --- a/x/blobstream/integration_test.go +++ b/x/blobstream/integration_test.go @@ -18,14 +18,14 @@ import ( abci "github.com/tendermint/tendermint/abci/types" ) -func TestBlobStreamIntegrationSuite(t *testing.T) { +func TestBlobstreamIntegrationSuite(t *testing.T) { if testing.Short() { t.Skip("skipping blob stream integration test in short mode.") } - suite.Run(t, new(BlobStreamIntegrationSuite)) + suite.Run(t, new(BlobstreamIntegrationSuite)) } -type BlobStreamIntegrationSuite struct { +type BlobstreamIntegrationSuite struct { suite.Suite accounts []string @@ -33,7 +33,7 @@ type BlobStreamIntegrationSuite struct { ecfg encoding.Config } -func (s *BlobStreamIntegrationSuite) SetupSuite() { +func (s *BlobstreamIntegrationSuite) SetupSuite() { t := s.T() t.Log("setting up integration test suite") @@ -45,7 +45,7 @@ func (s *BlobStreamIntegrationSuite) SetupSuite() { s.cctx = cctx } -func (s *BlobStreamIntegrationSuite) TestBlobStream() { +func (s *BlobstreamIntegrationSuite) TestBlobstream() { t := s.T() type test struct { name string diff --git a/x/blobstream/keeper/hooks.go b/x/blobstream/keeper/hooks.go index 5e9199d5bc..2bd1776c7a 100644 --- a/x/blobstream/keeper/hooks.go +++ b/x/blobstream/keeper/hooks.go @@ -11,12 +11,12 @@ type Hooks struct { k Keeper } -// Create new BlobStream hooks +// Hooks Create new Blobstream hooks func (k Keeper) Hooks() Hooks { // if startup is mis-ordered in app.go this hook will halt the chain when // called. Keep this check to make such a mistake obvious if k.storeKey == nil { - panic("hooks initialized before BlobStreamKeeper") + panic("hooks initialized before BlobstreamKeeper") } return Hooks{k} } diff --git a/x/blobstream/keeper/keeper.go b/x/blobstream/keeper/keeper.go index 2de1bb8fa2..e87f1398fb 100644 --- a/x/blobstream/keeper/keeper.go +++ b/x/blobstream/keeper/keeper.go @@ -47,7 +47,7 @@ func (k Keeper) SetParams(ctx sdk.Context, ps types.Params) { } // DeserializeValidatorIterator returns validators from the validator iterator. -// Adding here in BlobStream keeper as cdc is not available inside endblocker. +// Adding here in Blobstream keeper as cdc is not available inside endblocker. func (k Keeper) DeserializeValidatorIterator(vals []byte) stakingtypes.ValAddresses { validators := stakingtypes.ValAddresses{ Addresses: []string{}, @@ -56,7 +56,7 @@ func (k Keeper) DeserializeValidatorIterator(vals []byte) stakingtypes.ValAddres return validators } -// StakingKeeper restricts the functionality of the bank keeper used in the BlobStream +// StakingKeeper restricts the functionality of the bank keeper used in the Blobstream // keeper type StakingKeeper interface { GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, found bool) diff --git a/x/blobstream/keeper/keeper_attestation_test.go b/x/blobstream/keeper/keeper_attestation_test.go index dccd02038a..3dcaed4e26 100644 --- a/x/blobstream/keeper/keeper_attestation_test.go +++ b/x/blobstream/keeper/keeper_attestation_test.go @@ -9,33 +9,33 @@ import ( ) func TestCheckLatestAttestationNonce(t *testing.T) { - input := testutil.CreateTestEnvWithoutBlobStreamKeysInit(t) - k := input.BStreamKeeper + input := testutil.CreateTestEnvWithoutBlobstreamKeysInit(t) + k := input.BstreamKeeper // check if the latest attestation nonce is init exists := k.CheckLatestAttestationNonce(input.Context) assert.False(t, exists) // init the latest attestation nonce - input.BStreamKeeper.SetLatestAttestationNonce(input.Context, blobstream.InitialLatestAttestationNonce) + input.BstreamKeeper.SetLatestAttestationNonce(input.Context, blobstream.InitialLatestAttestationNonce) // check if the latest attestation nonce value was initialized correctly - input.BStreamKeeper.CheckLatestAttestationNonce(input.Context) - assert.Equal(t, blobstream.InitialLatestAttestationNonce, input.BStreamKeeper.GetLatestAttestationNonce(input.Context)) + input.BstreamKeeper.CheckLatestAttestationNonce(input.Context) + assert.Equal(t, blobstream.InitialLatestAttestationNonce, input.BstreamKeeper.GetLatestAttestationNonce(input.Context)) } func TestCheckEarliestAvailableAttestationNonce(t *testing.T) { - input := testutil.CreateTestEnvWithoutBlobStreamKeysInit(t) - k := input.BStreamKeeper + input := testutil.CreateTestEnvWithoutBlobstreamKeysInit(t) + k := input.BstreamKeeper // check if the earliest available attestation nonce is init exists := k.CheckEarliestAvailableAttestationNonce(input.Context) assert.False(t, exists) // init the earliest available attestation nonce - input.BStreamKeeper.SetEarliestAvailableAttestationNonce(input.Context, blobstream.InitialEarliestAvailableAttestationNonce) + input.BstreamKeeper.SetEarliestAvailableAttestationNonce(input.Context, blobstream.InitialEarliestAvailableAttestationNonce) // check if the earliest attestation nonce value was initialized correctly - input.BStreamKeeper.CheckEarliestAvailableAttestationNonce(input.Context) - assert.Equal(t, blobstream.InitialEarliestAvailableAttestationNonce, input.BStreamKeeper.GetEarliestAvailableAttestationNonce(input.Context)) + input.BstreamKeeper.CheckEarliestAvailableAttestationNonce(input.Context) + assert.Equal(t, blobstream.InitialEarliestAvailableAttestationNonce, input.BstreamKeeper.GetEarliestAvailableAttestationNonce(input.Context)) } diff --git a/x/blobstream/keeper/keeper_data_commitment_test.go b/x/blobstream/keeper/keeper_data_commitment_test.go index cb246b6e73..9b811121e2 100644 --- a/x/blobstream/keeper/keeper_data_commitment_test.go +++ b/x/blobstream/keeper/keeper_data_commitment_test.go @@ -13,7 +13,7 @@ import ( func TestGetDataCommitmentForHeight(t *testing.T) { input, sdkCtx := testutil.SetupFiveValChain(t) - k := input.BStreamKeeper + k := input.BstreamKeeper initialValset, err := k.GetCurrentValset(sdkCtx) require.NoError(t, err) @@ -111,7 +111,7 @@ func TestGetDataCommitmentForHeight(t *testing.T) { func TestLatestDataCommitment(t *testing.T) { input, sdkCtx := testutil.SetupFiveValChain(t) - k := input.BStreamKeeper + k := input.BstreamKeeper initialValset, err := k.GetCurrentValset(sdkCtx) require.NoError(t, err) @@ -148,8 +148,8 @@ func TestLatestDataCommitment(t *testing.T) { } func TestCheckingLatestAttestationNonceInDataCommitments(t *testing.T) { - input := testutil.CreateTestEnvWithoutBlobStreamKeysInit(t) - k := input.BStreamKeeper + input := testutil.CreateTestEnvWithoutBlobstreamKeysInit(t) + k := input.BstreamKeeper tests := []struct { name string @@ -190,11 +190,11 @@ func TestCheckingLatestAttestationNonceInDataCommitments(t *testing.T) { } func TestCheckingEarliestAvailableAttestationNonceInDataCommitments(t *testing.T) { - input := testutil.CreateTestEnvWithoutBlobStreamKeysInit(t) - k := input.BStreamKeeper + input := testutil.CreateTestEnvWithoutBlobstreamKeysInit(t) + k := input.BstreamKeeper // init the latest attestation nonce - input.BStreamKeeper.SetLatestAttestationNonce(input.Context, blobstream.InitialLatestAttestationNonce) + input.BstreamKeeper.SetLatestAttestationNonce(input.Context, blobstream.InitialLatestAttestationNonce) tests := []struct { name string diff --git a/x/blobstream/keeper/keeper_valset_test.go b/x/blobstream/keeper/keeper_valset_test.go index 0d7cd773b1..53c235360e 100644 --- a/x/blobstream/keeper/keeper_valset_test.go +++ b/x/blobstream/keeper/keeper_valset_test.go @@ -60,7 +60,7 @@ func TestCurrentValsetNormalization(t *testing.T) { spec := spec t.Run(msg, func(t *testing.T) { input, ctx := testutil.SetupTestChain(t, spec.srcPowers) - r, err := input.BStreamKeeper.GetCurrentValset(ctx) + r, err := input.BstreamKeeper.GetCurrentValset(ctx) require.NoError(t, err) rMembers, err := types.BridgeValidators(r.Members).ToInternal() require.NoError(t, err) @@ -70,8 +70,8 @@ func TestCurrentValsetNormalization(t *testing.T) { } func TestCheckingEarliestAvailableAttestationNonceInValsets(t *testing.T) { - input := testutil.CreateTestEnvWithoutBlobStreamKeysInit(t) - k := input.BStreamKeeper + input := testutil.CreateTestEnvWithoutBlobstreamKeysInit(t) + k := input.BstreamKeeper // create a validator to have a realistic scenario testutil.CreateValidator( t, @@ -87,7 +87,7 @@ func TestCheckingEarliestAvailableAttestationNonceInValsets(t *testing.T) { staking.EndBlocker(input.Context, input.StakingKeeper) // init the latest attestation nonce - input.BStreamKeeper.SetLatestAttestationNonce(input.Context, blobstream.InitialLatestAttestationNonce) + input.BstreamKeeper.SetLatestAttestationNonce(input.Context, blobstream.InitialLatestAttestationNonce) tests := []struct { name string @@ -120,8 +120,8 @@ func TestCheckingEarliestAvailableAttestationNonceInValsets(t *testing.T) { } func TestCheckingAttestationNonceInValsets(t *testing.T) { - input := testutil.CreateTestEnvWithoutBlobStreamKeysInit(t) - k := input.BStreamKeeper + input := testutil.CreateTestEnvWithoutBlobstreamKeysInit(t) + k := input.BstreamKeeper // create a validator to have a realistic scenario testutil.CreateValidator( t, @@ -174,8 +174,8 @@ func TestCheckingAttestationNonceInValsets(t *testing.T) { } func TestEVMAddresses(t *testing.T) { - input := testutil.CreateTestEnvWithoutBlobStreamKeysInit(t) - k := input.BStreamKeeper + input := testutil.CreateTestEnvWithoutBlobstreamKeysInit(t) + k := input.BstreamKeeper _, exists := k.GetEVMAddress(input.Context, testutil.ValAddrs[0]) require.False(t, exists) diff --git a/x/blobstream/keeper/msg_server.go b/x/blobstream/keeper/msg_server.go index 7cdda965c7..a9ecab5253 100644 --- a/x/blobstream/keeper/msg_server.go +++ b/x/blobstream/keeper/msg_server.go @@ -16,7 +16,7 @@ type msgServer struct { Keeper } -// NewMsgServerImpl returns an implementation of the BlobStream MsgServer interface +// NewMsgServerImpl returns an implementation of the Blobstream MsgServer interface // for the provided Keeper. func NewMsgServerImpl(keeper Keeper) types.MsgServer { return &msgServer{Keeper: keeper} diff --git a/x/blobstream/keeper/msg_server_test.go b/x/blobstream/keeper/msg_server_test.go index dc25127e57..56fe7a2875 100644 --- a/x/blobstream/keeper/msg_server_test.go +++ b/x/blobstream/keeper/msg_server_test.go @@ -12,7 +12,7 @@ import ( func TestRegisterEVMAddress(t *testing.T) { input, sdkCtx := testutil.SetupFiveValChain(t) - k := input.BStreamKeeper + k := input.BstreamKeeper vals := input.StakingKeeper.GetValidators(sdkCtx, 100) require.GreaterOrEqual(t, len(vals), 1) val := vals[0] diff --git a/x/blobstream/overview.md b/x/blobstream/overview.md index 808d4233e4..4b8666a255 100644 --- a/x/blobstream/overview.md +++ b/x/blobstream/overview.md @@ -1,42 +1,42 @@ # Overview -BlobStream is a one way bridge from Celestia to EVM chains. It provides a way for rollups using Celestia for Data Availability (DA), and an EVM chain as a settlement layer, to prove on-chain that the rollup data was correctly posted to Celestia and verify fraud proofs otherwise. These types of rollups are discussed in the [Quantum Gravity Bridge: Secure Off-Chain Data Availability for Ethereum L2s with Celestia](https://blog.celestia.org/celestiums) blog post. +Blobstream is a one way bridge from Celestia to EVM chains. It provides a way for rollups using Celestia for Data Availability (DA), and an EVM chain as a settlement layer, to prove on-chain that the rollup data was correctly posted to Celestia and verify fraud proofs otherwise. These types of rollups are discussed in the [Quantum Gravity Bridge: Secure Off-Chain Data Availability for Ethereum L2s with Celestia](https://blog.celestia.org/celestiums) blog post. -BlobStream implementation consists of three components: The [state machine](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream), the [orchestrator-relayer](https://github.com/celestiaorg/orchestrator-relayer), and the [BlobStream smart contract](https://github.com/celestiaorg/blobstream-contracts). +Blobstream implementation consists of three components: The [state machine](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream), the [orchestrator-relayer](https://github.com/celestiaorg/orchestrator-relayer), and the [Blobstream smart contract](https://github.com/celestiaorg/blobstream-contracts). ## [State machine](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream) -The state machine is the `blobstream` module implementation. It is responsible for creating [attestations](https://github.com/celestiaorg/celestia-app/blob/main/x/blobstream/types/attestation.go#L10-L18) which are signed by [orchestrators](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/orchestrator.md). Each Celestia validator is expected to also run an orchestrator. [Relayers](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md) periodically query the Celestia state for attestations and submit them to the BlobStream smart contract deployed on some EVM chain. +The state machine is the `blobstream` module implementation. It is responsible for creating [attestations](https://github.com/celestiaorg/celestia-app/blob/main/x/blobstream/types/attestation.go#L10-L18) which are signed by [orchestrators](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/orchestrator.md). Each Celestia validator is expected to also run an orchestrator. [Relayers](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md) periodically query the Celestia state for attestations and submit them to the Blobstream smart contract deployed on some EVM chain. There are two types of [attestations](https://github.com/celestiaorg/celestia-app/blob/main/x/blobstream/types/attestation.go#L10-L18): [valsets](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/proto/celestia/qgb/v1/types.proto#L18-L33) and [data commitments](https://github.com/celestiaorg/celestia-app/blob/376a1d4c0f321f12ba78279d2bd34fc6cb5e6dc2/proto/celestia/qgb/v1/types.proto#L35-L55). -All attestations have a [`nonce`](https://github.com/celestiaorg/celestia-app/blob/8ae6a84b2c99e55625bbe99f70db1e5a985c9675/x/qgb/types/attestation.go#L16) field that defines the order in which the attestations are generated. This nonce is stored in the BlobStream smart contract as per [ADR-004](https://github.com/celestiaorg/celestia-app/blob/main/docs/architecture/adr-004-qgb-relayer-security.md#decision), and is used to order attestation submissions on the EVM chain. +All attestations have a [`nonce`](https://github.com/celestiaorg/celestia-app/blob/8ae6a84b2c99e55625bbe99f70db1e5a985c9675/x/qgb/types/attestation.go#L16) field that defines the order in which the attestations are generated. This nonce is stored in the Blobstream smart contract as per [ADR-004](https://github.com/celestiaorg/celestia-app/blob/main/docs/architecture/adr-004-qgb-relayer-security.md#decision), and is used to order attestation submissions on the EVM chain. ### [Valsets](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream#valsets) -A [valset](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream#valsets) represents a validator set snapshot. It contains a list of validators' EVM addresses along with their [BlobStream staking power](https://github.com/celestiaorg/celestia-app/tree/main/x/qgb#validator-power-normalization). It enables the BlobStream smart contract to track the state of the Celestia validator set. This is necessary so that the BlobStream smart contract can determine when a 2/3 threshold has signed that a particular data hash has been made available on Celestia. +A [valset](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream#valsets) represents a validator set snapshot. It contains a list of validators' EVM addresses along with their [Blobstream staking power](https://github.com/celestiaorg/celestia-app/tree/main/x/qgb#validator-power-normalization). It enables the Blobstream smart contract to track the state of the Celestia validator set. This is necessary so that the Blobstream smart contract can determine when a 2/3 threshold has signed that a particular data hash has been made available on Celestia. -A valset is [generated](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream#valset-handler) inside the state machine. It is then queried, signed, and submitted to the [BlobStream P2P network](https://github.com/celestiaorg/orchestrator-relayer/pull/66) by orchestrators. After more than 2/3rds of the Celestia validator set have submitted their signatures, [relayers](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md) relay the attestation to the BlobStream smart contract along with the signatures to be [verified](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L172-L211) and eventually [stored](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L266-L268). +A valset is [generated](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream#valset-handler) inside the state machine. It is then queried, signed, and submitted to the [Blobstream P2P network](https://github.com/celestiaorg/orchestrator-relayer/pull/66) by orchestrators. After more than 2/3rds of the Celestia validator set have submitted their signatures, [relayers](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md) relay the attestation to the Blobstream smart contract along with the signatures to be [verified](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L172-L211) and eventually [stored](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L266-L268). -The BlobStream smart contract keeps track of the [last validator set hash](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L44-L45) and its corresponding [power threshold](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L46-L47). This way, the contract will always be able to verify if attestations were signed using the correct Celestia validator set, and if the provided signatures represent a majority. +The Blobstream smart contract keeps track of the [last validator set hash](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L44-L45) and its corresponding [power threshold](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L46-L47). This way, the contract will always be able to verify if attestations were signed using the correct Celestia validator set, and if the provided signatures represent a majority. ### [Data commitments](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream#data-commitments) -A [data commitment](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream#data-commitments) is an attestation type representing a request to commit over a set of blocks. It provides an end exclusive range of blocks for orchestrators to sign over and propagate in the BlobStream P2P network. The range is defined by the param [`DataCommitmentWindow`](https://github.com/celestiaorg/celestia-app/blob/fc83b04c3a5638ac8d415770e38a4046b84fa128/x/qgb/keeper/keeper_data_commitment.go#L44-L50). +A [data commitment](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream#data-commitments) is an attestation type representing a request to commit over a set of blocks. It provides an end exclusive range of blocks for orchestrators to sign over and propagate in the Blobstream P2P network. The range is defined by the param [`DataCommitmentWindow`](https://github.com/celestiaorg/celestia-app/blob/fc83b04c3a5638ac8d415770e38a4046b84fa128/x/qgb/keeper/keeper_data_commitment.go#L44-L50). The data commitment is a Merkle tree over a sequential set of blocks. These blocks are represented as a tuple of the [data root](https://github.com/celestiaorg/celestia-core/blob/6933af1ead0ddf4a8c7516690e3674c6cdfa7bd8/rpc/core/blocks.go#L549), and the [height](https://github.com/celestiaorg/celestia-core/blob/6933af1ead0ddf4a8c7516690e3674c6cdfa7bd8/rpc/core/blocks.go#L548). This commitment can be queried from core using the [`DataCommitment`](https://github.com/celestiaorg/celestia-core/blob/6933af1ead0ddf4a8c7516690e3674c6cdfa7bd8/rpc/core/blocks.go#L210-L227) query and allows generating Merkle inclusion proofs for any blob in any block in the set. -When an orchestrator sees a newly generated data commitment, it queries the previous valset and checks whether it's part of its validator set. Then, the orchestrator signs the new data commitment and submits that signature to the [BlobStream P2P network](https://github.com/celestiaorg/orchestrator-relayer/pull/66). Otherwise, it ignores it and waits for new attestations. +When an orchestrator sees a newly generated data commitment, it queries the previous valset and checks whether it's part of its validator set. Then, the orchestrator signs the new data commitment and submits that signature to the [Blobstream P2P network](https://github.com/celestiaorg/orchestrator-relayer/pull/66). Otherwise, it ignores it and waits for new attestations. -After the relayer finds more than 2/3rd signatures of that data commitment, it relays the commitment along with the signatures to the BlobStream smart contract where they get [verified](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L172-L211). Then, the smart contract [saves](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L331-L332) the commitment to the [state](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L50-L51) thus allowing for Merkle-based inclusion proof verification for any blob posted to any committed block. +After the relayer finds more than 2/3rd signatures of that data commitment, it relays the commitment along with the signatures to the Blobstream smart contract where they get [verified](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L172-L211). Then, the smart contract [saves](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L331-L332) the commitment to the [state](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L50-L51) thus allowing for Merkle-based inclusion proof verification for any blob posted to any committed block. ## [Orchestrator-relayer](https://github.com/celestiaorg/orchestrator-relayer) -The [orchestrator-relayer](https://github.com/celestiaorg/orchestrator-relayer) contains the implementation of the BlobStream orchestrator and relayer. +The [orchestrator-relayer](https://github.com/celestiaorg/orchestrator-relayer) contains the implementation of the Blobstream orchestrator and relayer. ### [Orchestrator](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/orchestrator.md) -An [orchestrator](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/orchestrator.md) is the software responsible for querying the state machine for new attestations, signs them, and then submits them to the BlobStream P2P network. +An [orchestrator](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/orchestrator.md) is the software responsible for querying the state machine for new attestations, signs them, and then submits them to the Blobstream P2P network. At startup, it [loads](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/orchestrator.md#evm-key) the EVM private key corresponding to the address used when creating the validator. Then, it uses it to sign the attestations digests before submitting them to the P2P network. @@ -46,31 +46,31 @@ The orchestrator generally needs access to the validator's RPC/gRPC endpoints. H ### [Relayer](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md) -A [relayer](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md) is the software responsible for querying the signatures of a validator set from the P2P network and aggregating them into a format that the [BlobStream smart contract](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol) understands. +A [relayer](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md) is the software responsible for querying the signatures of a validator set from the P2P network and aggregating them into a format that the [Blobstream smart contract](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol) understands. It uses the previous valset to that attestation to know which validators should sign. Then, it looks for all of those signatures. -When the relayer finds more than 2/3rds of the signatures, it immediately relays them to the BlobStream smart contract to be persisted, and starts again. +When the relayer finds more than 2/3rds of the signatures, it immediately relays them to the Blobstream smart contract to be persisted, and starts again. -For a [BlobStream smart contract](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol) to not halt, it needs at least one relayer relaying signatures to it regularly. Otherwise, the BlobStream contract will be out of sync and will not be able to commit to new data. +For a [Blobstream smart contract](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol) to not halt, it needs at least one relayer relaying signatures to it regularly. Otherwise, the Blobstream contract will be out of sync and will not be able to commit to new data. -## [BlobStream smart contract](https://github.com/celestiaorg/blobstream-contracts) +## [Blobstream smart contract](https://github.com/celestiaorg/blobstream-contracts) -The [BlobStream smart contract](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol) is the source of truth for the rollups using Celestia as DA. It allows proving/verifying that data was posted to the Celestia blockchain. +The [Blobstream smart contract](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol) is the source of truth for the rollups using Celestia as DA. It allows proving/verifying that data was posted to the Celestia blockchain. -In order to reflect the Celestia chain data, the [BlobStream smart contract](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol) keeps track of the validator set changes, via valset updates, and commits to batches of block information, via data commitments. +In order to reflect the Celestia chain data, the [Blobstream smart contract](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol) keeps track of the validator set changes, via valset updates, and commits to batches of block information, via data commitments. ### Validator set changes -In order to submit a validator set change, the BlobStream smart contract provides the [`updateValidatorSet()`](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L213-L273) `external` method that takes the previous valset nonce, the new one's nonce, its power threshold and its hash, along with the actual validator set and the corresponding signatures, as `calldata` to be verified. Then, it [persists](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L266-L268) the nonce, the valset hash and the threshold in state so they can be used for future valset and data commitment updates. +In order to submit a validator set change, the Blobstream smart contract provides the [`updateValidatorSet()`](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L213-L273) `external` method that takes the previous valset nonce, the new one's nonce, its power threshold and its hash, along with the actual validator set and the corresponding signatures, as `calldata` to be verified. Then, it [persists](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L266-L268) the nonce, the valset hash and the threshold in state so they can be used for future valset and data commitment updates. ### Batches -The batches in the BlobStream smart contract refer to the `data root tuple root`s described above. These are submitted using the [`submitDataRootTupleRoot()`](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L275-L337) `external` method. This latter takes the new batch nonce, its corresponding valset, the `data root tuple root`, along with the actual validator set and their corresponding signatures as `calldata`. Then, it verifies the signature and [persists](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L331-L332) the new data root tuple root to the state along with the new nonce. +The batches in the Blobstream smart contract refer to the `data root tuple root`s described above. These are submitted using the [`submitDataRootTupleRoot()`](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L275-L337) `external` method. This latter takes the new batch nonce, its corresponding valset, the `data root tuple root`, along with the actual validator set and their corresponding signatures as `calldata`. Then, it verifies the signature and [persists](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L331-L332) the new data root tuple root to the state along with the new nonce. ### Hashes format -The digest created/verified in the BlobStream smart contract follow the [EIP-712](https://eips.ethereum.org/EIPS/eip-712) standard for hashing data. +The digest created/verified in the Blobstream smart contract follow the [EIP-712](https://eips.ethereum.org/EIPS/eip-712) standard for hashing data. #### Valset digest @@ -93,24 +93,24 @@ A data commitment digest is created inside the [`domainSeparateDataRootTupleRoot The signature scheme used for signing the above hashes follow the [EIP-191](https://eips.ethereum.org/EIPS/eip-191) signing standard. It uses the `ECDSA` algorithm with the `secp256k1` curve. So, the orchestrator uses the keystore to [generate](https://github.com/celestiaorg/orchestrator-relayer/blob/09ebfdc312c0d9e08856fb98cfd089e956ab7f3a/evm/ethereum_signature.go#L18-L28) these signatures. -The output signature is in the `[R || S || V]` format where `V` is `0` or `1`. This is defined in the BlobStream smart contract using the [Signature](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L17-L21) struct. +The output signature is in the `[R || S || V]` format where `V` is `0` or `1`. This is defined in the Blobstream smart contract using the [Signature](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L17-L21) struct. These signatures are then verified in the smart contract using the [`verifySig()`](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L124-L129) method. ## Security assumptions -The security of the BlobStream relies on an honest majority of the Celestia validator set. This assumption indicates that more than 2/3s of the voting power follows each [block validity rule](../../specs/src/specs/block_validity_rules.md). Additionally, over 2/3s of the voting power sign valid validator set updates and data commitments, as outlined above. +The security of the Blobstream relies on an honest majority of the Celestia validator set. This assumption indicates that more than 2/3s of the voting power follows each [block validity rule](../../specs/src/specs/block_validity_rules.md). Additionally, over 2/3s of the voting power sign valid validator set updates and data commitments, as outlined above. -If more than 1/3rd of the validator set stops running their orchestrators, then the BlobStream halts. And, if more than 2/3rds sign invalid data, then the BlobStream contract will commit to invalid data. The only recovery from such a state is to revert to social consensus, potentially slashing the guilty validators and redeploying the smart contracts. +If more than 1/3rd of the validator set stops running their orchestrators, then the Blobstream halts. And, if more than 2/3rds sign invalid data, then the Blobstream contract will commit to invalid data. The only recovery from such a state is to revert to social consensus, potentially slashing the guilty validators and redeploying the smart contracts. ## Slashing We still don't support slashing for equivocation, liveness or invalid signatures. However, if anything were to happen to the bridge, we would be able to social slash the corrupt validators and redeploy the contract. -Future versions of the BlobStream will support slashing. It will be enforced via the use of [vote extensions](https://github.com/cometbft/cometbft/blob/v0.38.0/spec/abci/abci%2B%2B_methods.md#extendvote). +Future versions of the Blobstream will support slashing. It will be enforced via the use of [vote extensions](https://github.com/cometbft/cometbft/blob/v0.38.0/spec/abci/abci%2B%2B_methods.md#extendvote). ## Proofs -To prove that data was posted to an EVM chain, we have the following method: [`verifyAttestation()`](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L339-L358). This allows to verify that a data root tuple was committed to by the BlobStream smart contract. +To prove that data was posted to an EVM chain, we have the following method: [`verifyAttestation()`](https://github.com/celestiaorg/quantum-gravity-bridge/blob/3cef3f5dfd37c3086fa40a6324f144595726dc16/src/QuantumGravityBridge.sol#L339-L358). This allows to verify that a data root tuple was committed to by the Blobstream smart contract. For the remaining proofs, i.e. shares to data root tuples proofs, the app is currently able to generate and verify them. However, these are still not supported at the smart contract level. Future works will focus on this. diff --git a/x/blobstream/types/abi_consts.go b/x/blobstream/types/abi_consts.go index f8072c28cc..a5bbc6638e 100644 --- a/x/blobstream/types/abi_consts.go +++ b/x/blobstream/types/abi_consts.go @@ -10,10 +10,10 @@ import ( ) const ( - // InternalBlobStreamABIJSON is the json encoded abi for private functions in the - // BlobStream contract. This is needed to encode data that is signed over in a way + // InternalBlobstreamABIJSON is the json encoded abi for private functions in the + // Blobstream contract. This is needed to encode data that is signed over in a way // that the contracts can easily verify. - InternalBlobStreamABIJSON = `[ + InternalBlobstreamABIJSON = `[ { "inputs": [ { @@ -116,8 +116,8 @@ const ( ) var ( - ExternalBlobStreamABI abi.ABI - InternalBlobStreamABI abi.ABI + ExternalBlobstreamABI abi.ABI + InternalBlobstreamABI abi.ABI BridgeValidatorAbi abi.Arguments VsDomainSeparator ethcmn.Hash @@ -129,13 +129,13 @@ func init() { if err != nil { log.Fatalln("bad ABI constant", err) } - ExternalBlobStreamABI = contractAbi + ExternalBlobstreamABI = contractAbi - internalABI, err := abi.JSON(strings.NewReader(InternalBlobStreamABIJSON)) + internalABI, err := abi.JSON(strings.NewReader(InternalBlobstreamABIJSON)) if err != nil { log.Fatalln("bad internal ABI constant", err) } - InternalBlobStreamABI = internalABI + InternalBlobstreamABI = internalABI solValidatorType, err := abi.NewType("tuple", "validator", []abi.ArgumentMarshaling{ {Name: "Addr", Type: "address"}, diff --git a/x/blobstream/types/genesis.go b/x/blobstream/types/genesis.go index 5bc84959b9..6d8f5cc334 100644 --- a/x/blobstream/types/genesis.go +++ b/x/blobstream/types/genesis.go @@ -14,7 +14,7 @@ const ( DefaultParamspace = ModuleName // MinimumDataCommitmentWindow is a constant that defines the minimum - // allowable window for the BlobStream data commitments. + // allowable window for the Blobstream data commitments. MinimumDataCommitmentWindow = 100 ) diff --git a/x/blobstream/types/genesis.pb.go b/x/blobstream/types/genesis.pb.go index 12137c7360..58d29c7ccd 100644 --- a/x/blobstream/types/genesis.pb.go +++ b/x/blobstream/types/genesis.pb.go @@ -23,7 +23,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// Params represent the BlobStream genesis and store parameters. +// Params represent Blobstream genesis and store parameters. type Params struct { DataCommitmentWindow uint64 `protobuf:"varint,1,opt,name=data_commitment_window,json=dataCommitmentWindow,proto3" json:"data_commitment_window,omitempty"` } @@ -68,7 +68,7 @@ func (m *Params) GetDataCommitmentWindow() uint64 { return 0 } -// GenesisState struct, containing all persistent data required by BlobStream +// GenesisState struct, containing all persistent data required by Blobstream // module type GenesisState struct { Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` diff --git a/x/blobstream/types/types.pb.go b/x/blobstream/types/types.pb.go index 1f94eb431d..34078b961b 100644 --- a/x/blobstream/types/types.pb.go +++ b/x/blobstream/types/types.pb.go @@ -83,7 +83,7 @@ func (m *BridgeValidator) GetEvmAddress() string { return "" } -// 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 type Valset struct { diff --git a/x/blobstream/types/validator.go b/x/blobstream/types/validator.go index 8d3724d70c..ece35f70c7 100644 --- a/x/blobstream/types/validator.go +++ b/x/blobstream/types/validator.go @@ -96,22 +96,22 @@ func EVMAddrLessThan(e common.Address, o common.Address) bool { } // PowerDiff returns the difference in power between two bridge validator sets. -// Note this is BlobStream bridge power *not* Cosmos voting power. +// Note this is Blobstream bridge power *not* Cosmos voting power. // Cosmos voting power is based on the absolute number of tokens in the staking // pool at any given time. -// BlobStream bridge power is normalized using the equation. +// Blobstream bridge power is normalized using the equation. // // validators cosmos voting power / total cosmos voting power in this block = -// BlobStream bridge power / u32_max +// Blobstream bridge power / u32_max // // As an example if someone has 52% of the Cosmos voting power when a validator -// set is created their BlobStream bridge voting power is u32_max * .52 +// set is created their Blobstream bridge voting power is u32_max * .52 // // Normalized voting power dramatically reduces how often we have to produce new // validator set updates. For example if the total on chain voting power // increases by 1% due to inflation, we shouldn't have to generate a new // validator set, after all the validators retained their relative percentages -// during inflation and normalized BlobStream power shows no difference. +// during inflation and normalized Blobstream power shows no difference. func (ibv InternalBridgeValidators) PowerDiff(c InternalBridgeValidators) float64 { powers := map[string]int64{} // loop over ibv and initialize the map with their powers diff --git a/x/blobstream/types/valset.go b/x/blobstream/types/valset.go index bbfac00f26..da9229b1d6 100644 --- a/x/blobstream/types/valset.go +++ b/x/blobstream/types/valset.go @@ -39,7 +39,7 @@ func (v *Valset) SignBytes() (ethcmn.Hash, error) { // checkpointAbiJson but other than that it's a constant that has no impact // on the output. This is because it gets encoded as a function name which // we must then discard. - bytes, err := InternalBlobStreamABI.Pack( + bytes, err := InternalBlobstreamABI.Pack( "domainSeparateValidatorSetHash", VsDomainSeparator, big.NewInt(int64(v.Nonce)), @@ -67,7 +67,7 @@ func (v *Valset) Hash() (ethcmn.Hash, error) { } } - encodedVals, err := InternalBlobStreamABI.Pack("computeValidatorSetHash", ethVals) + encodedVals, err := InternalBlobstreamABI.Pack("computeValidatorSetHash", ethVals) if err != nil { return ethcmn.Hash{}, err } From ba08ef17f7e9af2271367f9022ef1b4f5f053806 Mon Sep 17 00:00:00 2001 From: rachid Date: Thu, 12 Oct 2023 01:36:27 +0200 Subject: [PATCH 06/14] chore: disable TestBlobstream in race --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b7d1f179a8..ea12d8a2d6 100644 --- a/Makefile +++ b/Makefile @@ -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|TestBlobstream" .PHONY: test-race ## test-bench: Run unit tests in bench mode. From 57888afaf1eac69da12d155e861d7d455c98e3fb Mon Sep 17 00:00:00 2001 From: CHAMI Rachid Date: Fri, 13 Oct 2023 11:50:37 +0200 Subject: [PATCH 07/14] Update app/test/qgb_rpc_test.go Co-authored-by: Josh Stein <46639943+jcstein@users.noreply.github.com> --- app/test/qgb_rpc_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/qgb_rpc_test.go b/app/test/qgb_rpc_test.go index e7d4157627..f3b822de1d 100644 --- a/app/test/qgb_rpc_test.go +++ b/app/test/qgb_rpc_test.go @@ -16,7 +16,7 @@ import ( func TestBlobstreamRPCQueries(t *testing.T) { if testing.Short() { - t.Skip("skipping blob stream 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)) From 76a6adf9e859ff0523785ab056c95fbba4f7c2da Mon Sep 17 00:00:00 2001 From: CHAMI Rachid Date: Fri, 13 Oct 2023 11:51:45 +0200 Subject: [PATCH 08/14] Update x/blobstream/client/tx.go Co-authored-by: Sanaz Taheri <35961250+staheri14@users.noreply.github.com> --- x/blobstream/client/tx.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/blobstream/client/tx.go b/x/blobstream/client/tx.go index 45309fe689..c0d116a4d4 100644 --- a/x/blobstream/client/tx.go +++ b/x/blobstream/client/tx.go @@ -30,7 +30,7 @@ func CmdRegisterEVMAddress() *cobra.Command { Use: "register [valAddress] [evmAddress]", Short: "Register an EVM address for a validator", Long: `Registers an EVM address for a validator. This address will be used to -sign attestations as part of Blobstream protocol. Only the validator, as the signer, +sign attestations as part of the Blobstream protocol. Only the validator, as the signer, can register an EVM address. To change the EVM address, the validator can simply send a new message overriding the previous one. `, From 6b8522c2b361d9106a6d495ad1d4111f5cba66f6 Mon Sep 17 00:00:00 2001 From: CHAMI Rachid Date: Fri, 13 Oct 2023 12:10:41 +0200 Subject: [PATCH 09/14] Update x/blobstream/integration_test.go Co-authored-by: Josh Stein <46639943+jcstein@users.noreply.github.com> --- x/blobstream/integration_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/blobstream/integration_test.go b/x/blobstream/integration_test.go index 398999c676..6457f37b99 100644 --- a/x/blobstream/integration_test.go +++ b/x/blobstream/integration_test.go @@ -20,7 +20,7 @@ import ( func TestBlobstreamIntegrationSuite(t *testing.T) { if testing.Short() { - t.Skip("skipping blob stream integration test in short mode.") + t.Skip("skipping Blobstream integration test in short mode.") } suite.Run(t, new(BlobstreamIntegrationSuite)) } From d4e6dd3f83353c5ce979452cd7c501b7e4c5d6b0 Mon Sep 17 00:00:00 2001 From: CHAMI Rachid Date: Fri, 13 Oct 2023 13:01:35 +0200 Subject: [PATCH 10/14] Update x/blobstream/types/valset.go Co-authored-by: Josh Stein <46639943+jcstein@users.noreply.github.com> --- x/blobstream/types/valset.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/blobstream/types/valset.go b/x/blobstream/types/valset.go index da9229b1d6..649f309ceb 100644 --- a/x/blobstream/types/valset.go +++ b/x/blobstream/types/valset.go @@ -56,7 +56,7 @@ func (v *Valset) SignBytes() (ethcmn.Hash, error) { return hash, nil } -// Hash mimics the 'computeValsetHash' function used by the blobstream contracts by +// Hash mimics the 'computeValsetHash' function used by the Blobstream contracts by // using a Valset to compute the hash of the abi encoded validator set. func (v *Valset) Hash() (ethcmn.Hash, error) { ethVals := make([]wrapper.Validator, len(v.Members)) From deddb7b91690c1abd82942516d6372631ea3ca69 Mon Sep 17 00:00:00 2001 From: CHAMI Rachid Date: Fri, 13 Oct 2023 13:02:41 +0200 Subject: [PATCH 11/14] Update x/blobstream/keeper/keeper.go --- x/blobstream/keeper/keeper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/blobstream/keeper/keeper.go b/x/blobstream/keeper/keeper.go index e87f1398fb..0e75caf6e4 100644 --- a/x/blobstream/keeper/keeper.go +++ b/x/blobstream/keeper/keeper.go @@ -56,7 +56,7 @@ func (k Keeper) DeserializeValidatorIterator(vals []byte) stakingtypes.ValAddres return validators } -// StakingKeeper restricts the functionality of the bank keeper used in the Blobstream +// StakingKeeper restricts the functionality of the bank keeper used in the blobstream // keeper type StakingKeeper interface { GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, found bool) From a93181f7e327519500932b5dabf22f3eb07baae5 Mon Sep 17 00:00:00 2001 From: CHAMI Rachid Date: Wed, 18 Oct 2023 00:30:23 +0200 Subject: [PATCH 12/14] Update scripts/single-node.sh --- scripts/single-node.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/single-node.sh b/scripts/single-node.sh index e0085a7565..d2ffbe40dd 100755 --- a/scripts/single-node.sh +++ b/scripts/single-node.sh @@ -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 blobstream register \ + celestia-appd tx qgb register \ ${VALIDATOR_ADDRESS} \ ${EVM_ADDRESS} \ --from ${KEY_NAME} \ From 1edbd01528f7bbcc39dc5c0c5ef38a32821dcc5f Mon Sep 17 00:00:00 2001 From: CHAMI Rachid Date: Wed, 18 Oct 2023 00:31:08 +0200 Subject: [PATCH 13/14] Update scripts/build-run-single-node.sh --- scripts/build-run-single-node.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-run-single-node.sh b/scripts/build-run-single-node.sh index fd92ccf013..7af3124053 100755 --- a/scripts/build-run-single-node.sh +++ b/scripts/build-run-single-node.sh @@ -37,7 +37,7 @@ sed -i'.bak' 's#"null"#"kv"#g' ${HOME_DIR}/config/config.toml sleep 20 # private key: da6ed55cb2894ac2c9c10209c09de8e8b9d109b910338d5bf3d747a7e1fc9eb9 - ${BIN_PATH} tx blobstream register \ + ${BIN_PATH} tx qgb register \ "$(${BIN_PATH} keys show validator --home "${HOME_DIR}" --bech val -a)" \ 0x966e6f22781EF6a6A82BBB4DB3df8E225DfD9488 \ --from validator \ From a493b883ed932e8774e1497c0e290432637ec8e4 Mon Sep 17 00:00:00 2001 From: rachid Date: Wed, 18 Oct 2023 00:35:37 +0200 Subject: [PATCH 14/14] chore: bstream => blobstream --- app/app.go | 10 ++--- test/util/common.go | 44 +++++++++---------- x/blobstream/abci_test.go | 24 +++++----- .../keeper/keeper_attestation_test.go | 16 +++---- .../keeper/keeper_data_commitment_test.go | 10 ++--- x/blobstream/keeper/keeper_valset_test.go | 10 ++--- x/blobstream/keeper/msg_server_test.go | 2 +- 7 files changed, 58 insertions(+), 58 deletions(-) diff --git a/app/app.go b/app/app.go index f2970bd430..85ef4dddfd 100644 --- a/app/app.go +++ b/app/app.go @@ -228,8 +228,8 @@ type App struct { ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper - BlobKeeper blobmodulekeeper.Keeper - BStreamKeeper bsmodulekeeper.Keeper + BlobKeeper blobmodulekeeper.Keeper + BlobstreamKeeper bsmodulekeeper.Keeper // the module manager mm *module.Manager @@ -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.BStreamKeeper = *bsmodulekeeper.NewKeeper( + app.BlobstreamKeeper = *bsmodulekeeper.NewKeeper( appCodec, keys[bsmoduletypes.StoreKey], app.GetSubspace(bsmoduletypes.ModuleName), &stakingKeeper, ) - bsmod := bsmodule.NewAppModule(appCodec, app.BStreamKeeper) + 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.BStreamKeeper.Hooks(), + app.BlobstreamKeeper.Hooks(), ), ) diff --git a/test/util/common.go b/test/util/common.go index a609c962b1..202370e0d9 100644 --- a/test/util/common.go +++ b/test/util/common.go @@ -137,15 +137,15 @@ func initEVMAddrs(count int) []gethcommon.Address { // TestInput stores the various keepers required to test Blobstream type TestInput struct { - BstreamKeeper keeper.Keeper - AccountKeeper authkeeper.AccountKeeper - StakingKeeper stakingkeeper.Keeper - SlashingKeeper slashingkeeper.Keeper - DistKeeper distrkeeper.Keeper - BankKeeper bankkeeper.BaseKeeper - Context sdk.Context - Marshaler codec.Codec - LegacyAmino *codec.LegacyAmino + BlobstreamKeeper keeper.Keeper + AccountKeeper authkeeper.AccountKeeper + StakingKeeper stakingkeeper.Keeper + SlashingKeeper slashingkeeper.Keeper + DistKeeper distrkeeper.Keeper + BankKeeper bankkeeper.BaseKeeper + Context sdk.Context + Marshaler codec.Codec + LegacyAmino *codec.LegacyAmino } // CreateTestEnvWithoutBlobstreamKeysInit creates the keeper testing environment for Blobstream @@ -305,23 +305,23 @@ func CreateTestEnvWithoutBlobstreamKeysInit(t *testing.T) TestInput { ), ) return TestInput{ - BstreamKeeper: *k, - AccountKeeper: accountKeeper, - BankKeeper: bankKeeper, - StakingKeeper: stakingKeeper, - SlashingKeeper: slashingKeeper, - DistKeeper: distKeeper, - Context: ctx, - Marshaler: marshaler, - LegacyAmino: cdc, + BlobstreamKeeper: *k, + AccountKeeper: accountKeeper, + BankKeeper: bankKeeper, + StakingKeeper: stakingKeeper, + SlashingKeeper: slashingKeeper, + DistKeeper: distKeeper, + Context: ctx, + Marshaler: marshaler, + LegacyAmino: cdc, } } // 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.BlobstreamKeeper.SetLatestAttestationNonce(input.Context, blobstream.InitialLatestAttestationNonce) + input.BlobstreamKeeper.SetEarliestAvailableAttestationNonce(input.Context, blobstream.InitialEarliestAvailableAttestationNonce) return input } @@ -412,7 +412,7 @@ func RegisterEVMAddress( valAddr sdk.ValAddress, evmAddr gethcommon.Address, ) { - bsMsgServer := keeper.NewMsgServerImpl(input.BstreamKeeper) + bsMsgServer := keeper.NewMsgServerImpl(input.BlobstreamKeeper) registerMsg := bstypes.NewMsgRegisterEVMAddress(valAddr, evmAddr) _, err := bsMsgServer.RegisterEVMAddress(input.Context, registerMsg) require.NoError(t, err) @@ -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.BlobstreamKeeper) for i, weight := range weights { consPrivKey := ed25519.GenPrivKey() consPubKey := consPrivKey.PubKey() diff --git a/x/blobstream/abci_test.go b/x/blobstream/abci_test.go index 7d8c18010f..8eca1e05d6 100644 --- a/x/blobstream/abci_test.go +++ b/x/blobstream/abci_test.go @@ -19,7 +19,7 @@ import ( func TestFirstAttestationIsValset(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - pk := input.BstreamKeeper + pk := input.BlobstreamKeeper ctx = ctx.WithBlockHeight(1) expectedTime := ctx.BlockTime() @@ -42,7 +42,7 @@ func TestFirstAttestationIsValset(t *testing.T) { func TestValsetCreationWhenValidatorUnbonds(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - pk := input.BstreamKeeper + pk := input.BlobstreamKeeper ctx = ctx.WithBlockHeight(1) // run abci methods after chain init @@ -68,7 +68,7 @@ func TestValsetCreationWhenValidatorUnbonds(t *testing.T) { func TestValsetCreationWhenEditingEVMAddr(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - pk := input.BstreamKeeper + pk := input.BlobstreamKeeper ctx = ctx.WithBlockHeight(1) @@ -81,7 +81,7 @@ func TestValsetCreationWhenEditingEVMAddr(t *testing.T) { require.Equal(t, uint64(1), currentAttestationNonce) ctx = ctx.WithBlockHeight(ctx.BlockHeight() + 1) - msgServer := keeper.NewMsgServerImpl(input.BstreamKeeper) + msgServer := keeper.NewMsgServerImpl(input.BlobstreamKeeper) newEVMAddr := testfactory.RandomEVMAddress() registerMsg := types.NewMsgRegisterEVMAddress( @@ -99,7 +99,7 @@ func TestValsetCreationWhenEditingEVMAddr(t *testing.T) { func TestSetValset(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - pk := input.BstreamKeeper + pk := input.BlobstreamKeeper vs, err := pk.GetCurrentValset(ctx) require.Nil(t, err) @@ -111,7 +111,7 @@ func TestSetValset(t *testing.T) { func TestSetDataCommitment(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - qk := input.BstreamKeeper + qk := input.BlobstreamKeeper ctx = ctx.WithBlockHeight(int64(qk.GetDataCommitmentWindowParam(ctx))) expectedTime := ctx.BlockTime() @@ -149,7 +149,7 @@ func TestSetDataCommitment(t *testing.T) { // table structure is to make it easy to understand the test flow. func TestGetDataCommitment(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - qk := input.BstreamKeeper + qk := input.BlobstreamKeeper tests := []struct { name string @@ -224,7 +224,7 @@ func TestGetDataCommitment(t *testing.T) { func TestDataCommitmentCreation(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - qk := input.BstreamKeeper + qk := input.BlobstreamKeeper ctx = ctx.WithBlockHeight(1) @@ -248,7 +248,7 @@ func TestDataCommitmentCreation(t *testing.T) { func TestDataCommitmentRange(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - qk := input.BstreamKeeper + qk := input.BlobstreamKeeper ctx = ctx.WithBlockHeight(1) // run abci methods after chain init @@ -294,7 +294,7 @@ func TestDataCommitmentRange(t *testing.T) { func TestHasDataCommitmentInStore(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - qk := input.BstreamKeeper + qk := input.BlobstreamKeeper // set the data commitment window qk.SetParams(ctx, types.Params{DataCommitmentWindow: 400}) require.Equal(t, uint64(400), qk.GetDataCommitmentWindowParam(ctx)) @@ -357,7 +357,7 @@ func TestHasDataCommitmentInStore(t *testing.T) { // end of the test, the data commitments cover all the needed ranges. func TestDataCommitmentCreationCatchup(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - qk := input.BstreamKeeper + qk := input.BlobstreamKeeper ctx = ctx.WithBlockHeight(1) // from height 1 to 1500 with a window of 400 @@ -521,7 +521,7 @@ func TestDataCommitmentCreationCatchup(t *testing.T) { // attestations are pruned func TestPruning(t *testing.T) { input, ctx := testutil.SetupFiveValChain(t) - bsKeeper := input.BstreamKeeper + bsKeeper := input.BlobstreamKeeper // set the data commitment window window := uint64(101) bsKeeper.SetParams(ctx, types.Params{DataCommitmentWindow: window}) diff --git a/x/blobstream/keeper/keeper_attestation_test.go b/x/blobstream/keeper/keeper_attestation_test.go index 3dcaed4e26..56f5cecd3a 100644 --- a/x/blobstream/keeper/keeper_attestation_test.go +++ b/x/blobstream/keeper/keeper_attestation_test.go @@ -10,32 +10,32 @@ import ( func TestCheckLatestAttestationNonce(t *testing.T) { input := testutil.CreateTestEnvWithoutBlobstreamKeysInit(t) - k := input.BstreamKeeper + k := input.BlobstreamKeeper // check if the latest attestation nonce is init exists := k.CheckLatestAttestationNonce(input.Context) assert.False(t, exists) // init the latest attestation nonce - input.BstreamKeeper.SetLatestAttestationNonce(input.Context, blobstream.InitialLatestAttestationNonce) + input.BlobstreamKeeper.SetLatestAttestationNonce(input.Context, blobstream.InitialLatestAttestationNonce) // check if the latest attestation nonce value was initialized correctly - input.BstreamKeeper.CheckLatestAttestationNonce(input.Context) - assert.Equal(t, blobstream.InitialLatestAttestationNonce, input.BstreamKeeper.GetLatestAttestationNonce(input.Context)) + input.BlobstreamKeeper.CheckLatestAttestationNonce(input.Context) + assert.Equal(t, blobstream.InitialLatestAttestationNonce, input.BlobstreamKeeper.GetLatestAttestationNonce(input.Context)) } func TestCheckEarliestAvailableAttestationNonce(t *testing.T) { input := testutil.CreateTestEnvWithoutBlobstreamKeysInit(t) - k := input.BstreamKeeper + k := input.BlobstreamKeeper // check if the earliest available attestation nonce is init exists := k.CheckEarliestAvailableAttestationNonce(input.Context) assert.False(t, exists) // init the earliest available attestation nonce - input.BstreamKeeper.SetEarliestAvailableAttestationNonce(input.Context, blobstream.InitialEarliestAvailableAttestationNonce) + input.BlobstreamKeeper.SetEarliestAvailableAttestationNonce(input.Context, blobstream.InitialEarliestAvailableAttestationNonce) // check if the earliest attestation nonce value was initialized correctly - input.BstreamKeeper.CheckEarliestAvailableAttestationNonce(input.Context) - assert.Equal(t, blobstream.InitialEarliestAvailableAttestationNonce, input.BstreamKeeper.GetEarliestAvailableAttestationNonce(input.Context)) + input.BlobstreamKeeper.CheckEarliestAvailableAttestationNonce(input.Context) + assert.Equal(t, blobstream.InitialEarliestAvailableAttestationNonce, input.BlobstreamKeeper.GetEarliestAvailableAttestationNonce(input.Context)) } diff --git a/x/blobstream/keeper/keeper_data_commitment_test.go b/x/blobstream/keeper/keeper_data_commitment_test.go index 9b811121e2..7bcfa135aa 100644 --- a/x/blobstream/keeper/keeper_data_commitment_test.go +++ b/x/blobstream/keeper/keeper_data_commitment_test.go @@ -13,7 +13,7 @@ import ( func TestGetDataCommitmentForHeight(t *testing.T) { input, sdkCtx := testutil.SetupFiveValChain(t) - k := input.BstreamKeeper + k := input.BlobstreamKeeper initialValset, err := k.GetCurrentValset(sdkCtx) require.NoError(t, err) @@ -111,7 +111,7 @@ func TestGetDataCommitmentForHeight(t *testing.T) { func TestLatestDataCommitment(t *testing.T) { input, sdkCtx := testutil.SetupFiveValChain(t) - k := input.BstreamKeeper + k := input.BlobstreamKeeper initialValset, err := k.GetCurrentValset(sdkCtx) require.NoError(t, err) @@ -149,7 +149,7 @@ func TestLatestDataCommitment(t *testing.T) { func TestCheckingLatestAttestationNonceInDataCommitments(t *testing.T) { input := testutil.CreateTestEnvWithoutBlobstreamKeysInit(t) - k := input.BstreamKeeper + k := input.BlobstreamKeeper tests := []struct { name string @@ -191,10 +191,10 @@ func TestCheckingLatestAttestationNonceInDataCommitments(t *testing.T) { func TestCheckingEarliestAvailableAttestationNonceInDataCommitments(t *testing.T) { input := testutil.CreateTestEnvWithoutBlobstreamKeysInit(t) - k := input.BstreamKeeper + k := input.BlobstreamKeeper // init the latest attestation nonce - input.BstreamKeeper.SetLatestAttestationNonce(input.Context, blobstream.InitialLatestAttestationNonce) + input.BlobstreamKeeper.SetLatestAttestationNonce(input.Context, blobstream.InitialLatestAttestationNonce) tests := []struct { name string diff --git a/x/blobstream/keeper/keeper_valset_test.go b/x/blobstream/keeper/keeper_valset_test.go index 53c235360e..0cb0c42c7f 100644 --- a/x/blobstream/keeper/keeper_valset_test.go +++ b/x/blobstream/keeper/keeper_valset_test.go @@ -60,7 +60,7 @@ func TestCurrentValsetNormalization(t *testing.T) { spec := spec t.Run(msg, func(t *testing.T) { input, ctx := testutil.SetupTestChain(t, spec.srcPowers) - r, err := input.BstreamKeeper.GetCurrentValset(ctx) + r, err := input.BlobstreamKeeper.GetCurrentValset(ctx) require.NoError(t, err) rMembers, err := types.BridgeValidators(r.Members).ToInternal() require.NoError(t, err) @@ -71,7 +71,7 @@ func TestCurrentValsetNormalization(t *testing.T) { func TestCheckingEarliestAvailableAttestationNonceInValsets(t *testing.T) { input := testutil.CreateTestEnvWithoutBlobstreamKeysInit(t) - k := input.BstreamKeeper + k := input.BlobstreamKeeper // create a validator to have a realistic scenario testutil.CreateValidator( t, @@ -87,7 +87,7 @@ func TestCheckingEarliestAvailableAttestationNonceInValsets(t *testing.T) { staking.EndBlocker(input.Context, input.StakingKeeper) // init the latest attestation nonce - input.BstreamKeeper.SetLatestAttestationNonce(input.Context, blobstream.InitialLatestAttestationNonce) + input.BlobstreamKeeper.SetLatestAttestationNonce(input.Context, blobstream.InitialLatestAttestationNonce) tests := []struct { name string @@ -121,7 +121,7 @@ func TestCheckingEarliestAvailableAttestationNonceInValsets(t *testing.T) { func TestCheckingAttestationNonceInValsets(t *testing.T) { input := testutil.CreateTestEnvWithoutBlobstreamKeysInit(t) - k := input.BstreamKeeper + k := input.BlobstreamKeeper // create a validator to have a realistic scenario testutil.CreateValidator( t, @@ -175,7 +175,7 @@ func TestCheckingAttestationNonceInValsets(t *testing.T) { func TestEVMAddresses(t *testing.T) { input := testutil.CreateTestEnvWithoutBlobstreamKeysInit(t) - k := input.BstreamKeeper + k := input.BlobstreamKeeper _, exists := k.GetEVMAddress(input.Context, testutil.ValAddrs[0]) require.False(t, exists) diff --git a/x/blobstream/keeper/msg_server_test.go b/x/blobstream/keeper/msg_server_test.go index 56fe7a2875..a345ebc3cd 100644 --- a/x/blobstream/keeper/msg_server_test.go +++ b/x/blobstream/keeper/msg_server_test.go @@ -12,7 +12,7 @@ import ( func TestRegisterEVMAddress(t *testing.T) { input, sdkCtx := testutil.SetupFiveValChain(t) - k := input.BstreamKeeper + k := input.BlobstreamKeeper vals := input.StakingKeeper.GetValidators(sdkCtx, 100) require.GreaterOrEqual(t, len(vals), 1) val := vals[0]