From 0ca9eabc8fc4c6f40eb7476139d1d8a4e00f6f7d Mon Sep 17 00:00:00 2001 From: rachid Date: Tue, 10 Oct 2023 14:23:00 +0200 Subject: [PATCH 01/17] chore!: rename QGB to BlobStream --- .github/workflows/tag.yml | 2 +- .github/workflows/test.yml | 4 +- Dockerfile | 4 +- Makefile | 6 +- README.md | 24 ++-- cmd/{qgb => bstream}/base/config.go | 2 +- cmd/{qgb => bstream}/bootstrapper/cmd.go | 8 +- cmd/{qgb => bstream}/bootstrapper/config.go | 6 +- cmd/{qgb => bstream}/common/helpers.go | 8 +- cmd/{qgb => bstream}/deploy/cmd.go | 18 +-- cmd/{qgb => bstream}/deploy/config.go | 6 +- cmd/{qgb => bstream}/deploy/errors.go | 0 cmd/{qgb => bstream}/generate/cmd.go | 0 cmd/{qgb => bstream}/keys/common/common.go | 0 cmd/{qgb => bstream}/keys/evm/config.go | 6 +- cmd/{qgb => bstream}/keys/evm/evm.go | 4 +- cmd/{qgb => bstream}/keys/keys.go | 6 +- cmd/{qgb => bstream}/keys/p2p/config.go | 4 +- cmd/{qgb => bstream}/keys/p2p/p2p.go | 4 +- cmd/{qgb => bstream}/keys/p2p/p2p_test.go | 2 +- cmd/{qgb => bstream}/main.go | 2 +- cmd/{qgb => bstream}/orchestrator/cmd.go | 14 +- cmd/{qgb => bstream}/orchestrator/config.go | 6 +- cmd/{qgb => bstream}/query/cmd.go | 14 +- cmd/{qgb => bstream}/query/config.go | 2 +- cmd/{qgb => bstream}/relayer/cmd.go | 20 +-- cmd/{qgb => bstream}/relayer/config.go | 8 +- cmd/bstream/root/cmd.go | 38 ++++++ cmd/qgb/root/cmd.go | 38 ------ docker/entrypoint.sh | 2 +- docs/bootstrapper.md | 20 +-- docs/deploy.md | 44 +++---- docs/keys.md | 90 ++++++------- docs/orchestrator.md | 50 +++---- docs/relayer.md | 44 +++---- e2e/Dockerfile_e2e | 6 +- e2e/Makefile | 2 +- e2e/README.md | 18 +-- e2e/celestia-app/config.toml | 2 +- e2e/celestia-app/genesis.json | 4 +- e2e/celestia-app/genesis_template.json | 4 +- e2e/deployer_test.go | 12 +- e2e/docker-compose.yml | 14 +- e2e/orchestrator_test.go | 34 ++--- e2e/qgb_network.go | 124 +++++++++--------- e2e/relayer_test.go | 42 +++--- e2e/scripts/deploy_qgb_contract.sh | 12 +- e2e/scripts/start_core0.sh | 2 +- .../start_node_and_create_validator.sh | 2 +- ...rt_orchestrator_after_validator_created.sh | 10 +- e2e/scripts/start_relayer.sh | 20 +-- e2e/test_commons.go | 4 +- evm/ethereum_signature_test.go | 2 +- evm/evm_client.go | 42 +++--- evm/evm_client_test.go | 4 +- evm/suite_test.go | 8 +- orchestrator/broadcaster.go | 14 +- orchestrator/broadcaster_test.go | 10 +- orchestrator/orchestrator.go | 2 +- orchestrator/suite_test.go | 12 +- p2p/dht.go | 22 ++-- p2p/dht_test.go | 22 ++-- p2p/keys.go | 4 +- p2p/querier.go | 18 +-- p2p/querier_test.go | 14 +- relayer/relayer.go | 4 +- relayer/relayer_test.go | 4 +- relayer/suite_test.go | 12 +- rpc/app_querier.go | 18 +-- rpc/suite_test.go | 6 +- store/init.go | 2 +- store/store.go | 4 +- testing/celestia_network.go | 6 +- testing/dht_network.go | 10 +- types/data_commitment_confirm.go | 2 +- types/valset_confirm.go | 2 +- 76 files changed, 531 insertions(+), 531 deletions(-) rename cmd/{qgb => bstream}/base/config.go (96%) rename cmd/{qgb => bstream}/bootstrapper/cmd.go (92%) rename cmd/{qgb => bstream}/bootstrapper/config.go (88%) rename cmd/{qgb => bstream}/common/helpers.go (92%) rename cmd/{qgb => bstream}/deploy/cmd.go (83%) rename cmd/{qgb => bstream}/deploy/config.go (93%) rename cmd/{qgb => bstream}/deploy/errors.go (100%) rename cmd/{qgb => bstream}/generate/cmd.go (100%) rename cmd/{qgb => bstream}/keys/common/common.go (100%) rename cmd/{qgb => bstream}/keys/evm/config.go (91%) rename cmd/{qgb => bstream}/keys/evm/evm.go (99%) rename cmd/{qgb => bstream}/keys/keys.go (63%) rename cmd/{qgb => bstream}/keys/p2p/config.go (82%) rename cmd/{qgb => bstream}/keys/p2p/p2p.go (98%) rename cmd/{qgb => bstream}/keys/p2p/p2p_test.go (94%) rename cmd/{qgb => bstream}/main.go (72%) rename cmd/{qgb => bstream}/orchestrator/cmd.go (88%) rename cmd/{qgb => bstream}/orchestrator/config.go (94%) rename cmd/{qgb => bstream}/query/cmd.go (95%) rename cmd/{qgb => bstream}/query/config.go (96%) rename cmd/{qgb => bstream}/relayer/cmd.go (85%) rename cmd/{qgb => bstream}/relayer/config.go (95%) create mode 100644 cmd/bstream/root/cmd.go delete mode 100644 cmd/qgb/root/cmd.go diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 9298e501..9dfe7e3e 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -22,6 +22,6 @@ jobs: uses: goreleaser/goreleaser-action@v5.0.0 with: args: release --rm-dist - workdir: ./cmd/qgb + workdir: ./cmd/bstream env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c3ef37c5..33e8ca4b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,7 +45,7 @@ jobs: - name: Run tests in race mode run: make test-race - test-qgb-e2e: + test-bstreak-e2e: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -61,4 +61,4 @@ jobs: - name: Test run: go test -test.timeout 60m -failfast -v github.com/celestiaorg/orchestrator-relayer/e2e # yamllint disable-line rule:line-length env: - QGB_INTEGRATION_TEST: true + BLOBSTREAM_INTEGRATION_TEST: true diff --git a/Dockerfile b/Dockerfile index 6c692683..27cf45c9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# stage 1 Build qgb binary +# stage 1 Build bstream binary FROM --platform=$BUILDPLATFORM docker.io/golang:1.21.2-alpine3.18 as builder RUN apk update && apk --no-cache add make gcc musl-dev git bash @@ -27,7 +27,7 @@ RUN apk update && apk add --no-cache \ -s /sbin/nologin \ -u ${UID} -COPY --from=builder /orchestrator-relayer/build/qgb /bin/qgb +COPY --from=builder /orchestrator-relayer/build/bstream /bin/bstream COPY --chown=${USER_NAME}:${USER_NAME} docker/entrypoint.sh /opt/entrypoint.sh USER ${USER_NAME} diff --git a/Makefile b/Makefile index b48ab2e9..661554e2 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,8 @@ DOCKER := $(shell which docker) all: install install: go.sum - @echo "--> Installing qgb" - @go install -mod=readonly ./cmd/qgb + @echo "--> Installing bstream" + @go install -mod=readonly ./cmd/bstream go.sum: mod @echo "--> Verifying dependencies have expected content" @@ -24,7 +24,7 @@ pre-build: build: mod @mkdir -p build/ - @go build -o build ./cmd/qgb + @go build -o build ./cmd/bstream build-docker: @echo "--> Building Docker image" diff --git a/README.md b/README.md index bed0d9de..84c97693 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ # orchestrator-relayer -Contains the implementation of the QGB orchestrator and relayer. +Contains the implementation of the BlobStream orchestrator and relayer. -The orchestrator is the software that signs the QGB attestations, and the relayer is the one that relays them to the target EVM chain. +The orchestrator is the software that signs the BlobStream attestations, and the relayer is the one that relays them to the target EVM chain. -For a high-level overview of how the QGB works, check [here](https://github.com/celestiaorg/quantum-gravity-bridge/tree/76efeca0be1a17d32ef633c0fdbd3c8f5e4cc53f#how-it-works) and [here](https://blog.celestia.org/celestiums/). +For a high-level overview of how the BlobStream works, check [here](https://github.com/celestiaorg/quantum-gravity-bridge/tree/76efeca0be1a17d32ef633c0fdbd3c8f5e4cc53f#how-it-works) and [here](https://blog.celestia.org/celestiums/). ## Install 1. [Install Go](https://go.dev/doc/install) 1.21.1 2. Clone this repo -3. Install the QGB CLI +3. Install the BlobStream CLI ```shell make install @@ -20,16 +20,16 @@ make install ```sh # Print help -qgb --help +bstream --help ``` ## How to run If you are a Celestia-app validator, all you need to do is run the orchestrator. Check [here](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/orchestrator.md) for more details. -If you want to post commitments on an EVM chain, you will need to deploy a new QGB contract and run a relayer. Check [here](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md) for relayer docs and [here](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/deploy.md) for how to deploy a new QGB contract. +If you want to post commitments on an EVM chain, you will need to deploy a new BlobStream contract and run a relayer. Check [here](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md) for relayer docs and [here](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/deploy.md) for how to deploy a new BlobStream contract. -Note: the QGB P2P network is a separate network than the consensus or the data availability one. Thus, you will need its specific bootstrappers to be able to connect to it. +Note: the BlobStream P2P network is a separate network than the consensus or the data availability one. Thus, you will need its specific bootstrappers to be able to connect to it. ## Contributing @@ -41,7 +41,7 @@ Note: the QGB P2P network is a separate network than the consensus or the data a ### Helpful Commands ```sh -# Build a new orchestrator-relayer binary and output to build/qgb +# Build a new orchestrator-relayer binary and output to build/bstream make build # Run tests @@ -53,10 +53,10 @@ make fmt ## Useful links -The smart contract implementation is in [quantum-gravity-bridge](https://github.com/celestiaorg/quantum-gravity-bridge/). +The smart contract implementation is in [blobstream-contracts](https://github.com/celestiaorg/blobstream-contracts). -The state machine implementation is in [x/qgb](https://github.com/celestiaorg/celestia-app/tree/main/x/qgb). +The state machine implementation is in [x/blobstream](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream). -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). -QGB design explained in this [blog](https://blog.celestia.org/celestiums/). +BlobStream design explained in this [blog](https://blog.celestia.org/celestiums). diff --git a/cmd/qgb/base/config.go b/cmd/bstream/base/config.go similarity index 96% rename from cmd/qgb/base/config.go rename to cmd/bstream/base/config.go index 68c42823..75ecf78e 100644 --- a/cmd/qgb/base/config.go +++ b/cmd/bstream/base/config.go @@ -24,7 +24,7 @@ type Config struct { EVMPassphrase string } -// DefaultServicePath constructs the default qgb store path for +// DefaultServicePath constructs the default BlobStream store path for // the provided service. // It tries to get the home directory from an environment variable // called `_HOME`. If not set, then reverts to using diff --git a/cmd/qgb/bootstrapper/cmd.go b/cmd/bstream/bootstrapper/cmd.go similarity index 92% rename from cmd/qgb/bootstrapper/cmd.go rename to cmd/bstream/bootstrapper/cmd.go index 4f71389b..1e77125e 100644 --- a/cmd/qgb/bootstrapper/cmd.go +++ b/cmd/bstream/bootstrapper/cmd.go @@ -6,7 +6,7 @@ import ( "strings" "time" - p2pcmd "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/keys/p2p" + p2pcmd "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys/p2p" "github.com/celestiaorg/orchestrator-relayer/helpers" "github.com/celestiaorg/orchestrator-relayer/p2p" "github.com/celestiaorg/orchestrator-relayer/store" @@ -21,7 +21,7 @@ func Command() *cobra.Command { bsCmd := &cobra.Command{ Use: "bootstrapper", Aliases: []string{"bs"}, - Short: "QGB P2P network bootstrapper command", + Short: "BlobStream P2P network bootstrapper command", SilenceUsage: true, } @@ -110,7 +110,7 @@ func Start() *cobra.Command { } // creating the dht - dht, err := p2p.NewQgbDHT(ctx, h, dataStore, aIBootstrappers, logger) + dht, err := p2p.NewBlobStreamDHT(ctx, h, dataStore, aIBootstrappers, logger) if err != nil { return err } @@ -137,7 +137,7 @@ func Start() *cobra.Command { func Init() *cobra.Command { cmd := cobra.Command{ Use: "init", - Short: "Initialize the QGB bootstrapper store. Passed flags have persisted effect.", + Short: "Initialize the BlobStream bootstrapper store. Passed flags have persisted effect.", RunE: func(cmd *cobra.Command, args []string) error { config, err := parseInitFlags(cmd) if err != nil { diff --git a/cmd/qgb/bootstrapper/config.go b/cmd/bstream/bootstrapper/config.go similarity index 88% rename from cmd/qgb/bootstrapper/config.go rename to cmd/bstream/bootstrapper/config.go index c5e751fb..9d38e35f 100644 --- a/cmd/qgb/bootstrapper/config.go +++ b/cmd/bstream/bootstrapper/config.go @@ -1,7 +1,7 @@ package bootstrapper import ( - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/base" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/base" "github.com/spf13/cobra" ) @@ -14,7 +14,7 @@ func addStartFlags(cmd *cobra.Command) *cobra.Command { if err != nil { panic(err) } - cmd.Flags().String(base.FlagHome, homeDir, "The qgb bootstrappers home directory") + cmd.Flags().String(base.FlagHome, homeDir, "The BlobStream bootstrappers home directory") base.AddP2PNicknameFlag(cmd) base.AddP2PListenAddressFlag(cmd) base.AddBootstrappersFlag(cmd) @@ -65,7 +65,7 @@ func addInitFlags(cmd *cobra.Command) *cobra.Command { if err != nil { panic(err) } - cmd.Flags().String(base.FlagHome, homeDir, "The qgb bootstrappers home directory") + cmd.Flags().String(base.FlagHome, homeDir, "The BlobStream bootstrappers home directory") return cmd } diff --git a/cmd/qgb/common/helpers.go b/cmd/bstream/common/helpers.go similarity index 92% rename from cmd/qgb/common/helpers.go rename to cmd/bstream/common/helpers.go index 45a19f92..eb7b4ae0 100644 --- a/cmd/qgb/common/helpers.go +++ b/cmd/bstream/common/helpers.go @@ -12,7 +12,7 @@ import ( "github.com/celestiaorg/celestia-app/app" "github.com/celestiaorg/celestia-app/app/encoding" - common2 "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/keys/p2p" + common2 "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys/p2p" "github.com/celestiaorg/orchestrator-relayer/helpers" "github.com/celestiaorg/orchestrator-relayer/p2p" "github.com/celestiaorg/orchestrator-relayer/rpc" @@ -60,7 +60,7 @@ func NewTmAndAppQuerier(logger tmlog.Logger, tendermintRPC string, celesGRPC str return tmQuerier, appQuerier, stopFuncs, nil } -// CreateDHTAndWaitForPeers helper function that creates a new QGB DHT and waits for some peers to connect to it. +// CreateDHTAndWaitForPeers helper function that creates a new BlobStream DHT and waits for some peers to connect to it. func CreateDHTAndWaitForPeers( ctx context.Context, logger tmlog.Logger, @@ -69,7 +69,7 @@ func CreateDHTAndWaitForPeers( p2pListenAddr string, bootstrappers string, dataStore ds.Batching, -) (*p2p.QgbDHT, error) { +) (*p2p.BlobStreamDHT, error) { // get the p2p private key or generate a new one privKey, err := common2.GetP2PKeyOrGenerateNewOne(p2pKeyStore, p2pNickname) if err != nil { @@ -98,7 +98,7 @@ func CreateDHTAndWaitForPeers( } // creating the dht - dht, err := p2p.NewQgbDHT(ctx, h, dataStore, aIBootstrappers, logger) + dht, err := p2p.NewBlobStreamDHT(ctx, h, dataStore, aIBootstrappers, logger) if err != nil { return nil, err } diff --git a/cmd/qgb/deploy/cmd.go b/cmd/bstream/deploy/cmd.go similarity index 83% rename from cmd/qgb/deploy/cmd.go rename to cmd/bstream/deploy/cmd.go index c9a8d7a9..bbd21e00 100644 --- a/cmd/qgb/deploy/cmd.go +++ b/cmd/bstream/deploy/cmd.go @@ -5,15 +5,15 @@ import ( "os" "strconv" - evm2 "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/keys/evm" + evm2 "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys/evm" - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/keys" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys" "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/common" "github.com/celestiaorg/celestia-app/app" "github.com/celestiaorg/celestia-app/app/encoding" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/types" "github.com/celestiaorg/orchestrator-relayer/evm" "github.com/celestiaorg/orchestrator-relayer/rpc" "github.com/celestiaorg/orchestrator-relayer/store" @@ -25,7 +25,7 @@ import ( func Command() *cobra.Command { command := &cobra.Command{ Use: "deploy ", - Short: "Deploys the QGB contract and initializes it using the provided Celestia chain", + Short: "Deploys the BlobStream contract and initializes it using the provided Celestia chain", RunE: func(cmd *cobra.Command, args []string) error { config, err := parseDeployFlags(cmd) if err != nil { @@ -37,7 +37,7 @@ func Command() *cobra.Command { // checking if the provided home is already initiated isInit := store.IsInit(logger, config.Home, store.InitOptions{NeedEVMKeyStore: true}) if !isInit { - logger.Info("please initialize the EVM keystore using the `qgb deploy keys add/import` command") + logger.Info("please initialize the EVM keystore using the `bstream deploy keys add/import` command") return store.ErrNotInited } @@ -59,7 +59,7 @@ func Command() *cobra.Command { if err != nil { return errors.Wrap( err, - "cannot initialize the QGB contract without having a valset request: %s", + "cannot initialize the BlobStream contract without having a valset request: %s", ) } @@ -110,15 +110,15 @@ func Command() *cobra.Command { } defer backend.Close() - address, tx, _, err := evmClient.DeployQGBContract(txOpts, backend, *vs, vs.Nonce, false) + address, tx, _, err := evmClient.DeployBlobStreamContract(txOpts, backend, *vs, vs.Nonce, false) if err != nil { - logger.Error("failed to deploy QGB contract") + logger.Error("failed to deploy BlobStream contract") return err } receipt, err := evmClient.WaitForTransaction(cmd.Context(), backend, tx) if err == nil && receipt != nil && receipt.Status == 1 { - logger.Info("deployed QGB contract", "proxy_address", address.Hex(), "tx_hash", tx.Hash().String()) + logger.Info("deployed BlobStream contract", "proxy_address", address.Hex(), "tx_hash", tx.Hash().String()) } return nil diff --git a/cmd/qgb/deploy/config.go b/cmd/bstream/deploy/config.go similarity index 93% rename from cmd/qgb/deploy/config.go rename to cmd/bstream/deploy/config.go index dd30a890..954c37a1 100644 --- a/cmd/qgb/deploy/config.go +++ b/cmd/bstream/deploy/config.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/base" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/base" "github.com/celestiaorg/orchestrator-relayer/evm" "github.com/spf13/cobra" @@ -30,7 +30,7 @@ func addDeployFlags(cmd *cobra.Command) *cobra.Command { cmd.Flags().String( FlagStartingNonce, "latest", - "Specify the nonce to start the QGB contract from. "+ + "Specify the nonce to start the BlobStream contract from. "+ "\"earliest\": for genesis, "+ "\"latest\": for latest valset nonce, "+ "\"nonce\": for the latest valset before the provided nonce, provided nonce included.", @@ -40,7 +40,7 @@ func addDeployFlags(cmd *cobra.Command) *cobra.Command { if err != nil { panic(err) } - cmd.Flags().String(base.FlagHome, homeDir, "The qgb deployer home directory") + cmd.Flags().String(base.FlagHome, homeDir, "The BlobStream deployer home directory") cmd.Flags().String(base.FlagEVMPassphrase, "", "the evm account passphrase (if not specified as a flag, it will be asked interactively)") return cmd diff --git a/cmd/qgb/deploy/errors.go b/cmd/bstream/deploy/errors.go similarity index 100% rename from cmd/qgb/deploy/errors.go rename to cmd/bstream/deploy/errors.go diff --git a/cmd/qgb/generate/cmd.go b/cmd/bstream/generate/cmd.go similarity index 100% rename from cmd/qgb/generate/cmd.go rename to cmd/bstream/generate/cmd.go diff --git a/cmd/qgb/keys/common/common.go b/cmd/bstream/keys/common/common.go similarity index 100% rename from cmd/qgb/keys/common/common.go rename to cmd/bstream/keys/common/common.go diff --git a/cmd/qgb/keys/evm/config.go b/cmd/bstream/keys/evm/config.go similarity index 91% rename from cmd/qgb/keys/evm/config.go rename to cmd/bstream/keys/evm/config.go index 2620e3b0..6e398558 100644 --- a/cmd/qgb/keys/evm/config.go +++ b/cmd/bstream/keys/evm/config.go @@ -1,7 +1,7 @@ package evm import ( - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/base" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/base" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" ) @@ -15,7 +15,7 @@ func keysConfigFlags(cmd *cobra.Command, service string) *cobra.Command { if err != nil { panic(err) } - cmd.Flags().String(base.FlagHome, homeDir, "The qgb evm keys home directory") + cmd.Flags().String(base.FlagHome, homeDir, "The BlobStream evm keys home directory") cmd.Flags().String(base.FlagEVMPassphrase, "", "the evm account passphrase (if not specified as a flag, it will be asked interactively)") return cmd } @@ -54,7 +54,7 @@ func keysNewPassphraseConfigFlags(cmd *cobra.Command, service string) *cobra.Com if err != nil { panic(err) } - cmd.Flags().String(base.FlagHome, homeDir, "The qgb evm keys home directory") + cmd.Flags().String(base.FlagHome, homeDir, "The BlobStream evm keys home directory") cmd.Flags().String(base.FlagEVMPassphrase, "", "the evm account passphrase (if not specified as a flag, it will be asked interactively)") cmd.Flags().String(FlagNewEVMPassphrase, "", "the evm account new passphrase (if not specified as a flag, it will be asked interactively)") return cmd diff --git a/cmd/qgb/keys/evm/evm.go b/cmd/bstream/keys/evm/evm.go similarity index 99% rename from cmd/qgb/keys/evm/evm.go rename to cmd/bstream/keys/evm/evm.go index c2ed957e..b5dbe4e2 100644 --- a/cmd/qgb/keys/evm/evm.go +++ b/cmd/bstream/keys/evm/evm.go @@ -8,7 +8,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/keystore" - common2 "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/keys/common" + common2 "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys/common" "github.com/celestiaorg/orchestrator-relayer/store" "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" @@ -21,7 +21,7 @@ import ( func Root(serviceName string) *cobra.Command { evmCmd := &cobra.Command{ Use: "evm", - Short: "QGB EVM keys manager", + Short: "BlobStream EVM keys manager", SilenceUsage: true, } diff --git a/cmd/qgb/keys/keys.go b/cmd/bstream/keys/keys.go similarity index 63% rename from cmd/qgb/keys/keys.go rename to cmd/bstream/keys/keys.go index e2c865a3..e6647598 100644 --- a/cmd/qgb/keys/keys.go +++ b/cmd/bstream/keys/keys.go @@ -1,15 +1,15 @@ package keys import ( - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/keys/evm" - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/keys/p2p" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys/evm" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys/p2p" "github.com/spf13/cobra" ) func Command(serviceName string) *cobra.Command { keysCmd := &cobra.Command{ Use: "keys", - Short: "QGB keys manager", + Short: "BlobStream keys manager", SilenceUsage: true, } diff --git a/cmd/qgb/keys/p2p/config.go b/cmd/bstream/keys/p2p/config.go similarity index 82% rename from cmd/qgb/keys/p2p/config.go rename to cmd/bstream/keys/p2p/config.go index ba3bf5be..a9e13868 100644 --- a/cmd/qgb/keys/p2p/config.go +++ b/cmd/bstream/keys/p2p/config.go @@ -1,7 +1,7 @@ package p2p import ( - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/base" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/base" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" ) @@ -11,7 +11,7 @@ func keysConfigFlags(cmd *cobra.Command, service string) *cobra.Command { if err != nil { panic(err) } - cmd.Flags().String(base.FlagHome, homeDir, "The qgb p2p keys home directory") + cmd.Flags().String(base.FlagHome, homeDir, "The BlobStream p2p keys home directory") return cmd } diff --git a/cmd/qgb/keys/p2p/p2p.go b/cmd/bstream/keys/p2p/p2p.go similarity index 98% rename from cmd/qgb/keys/p2p/p2p.go rename to cmd/bstream/keys/p2p/p2p.go index 524cee54..0256b626 100644 --- a/cmd/qgb/keys/p2p/p2p.go +++ b/cmd/bstream/keys/p2p/p2p.go @@ -7,7 +7,7 @@ import ( "github.com/ipfs/boxo/keystore" - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/keys/common" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys/common" "github.com/celestiaorg/orchestrator-relayer/store" util "github.com/ipfs/boxo/util" "github.com/libp2p/go-libp2p/core/crypto" @@ -18,7 +18,7 @@ import ( func Root(serviceName string) *cobra.Command { p2pCmd := &cobra.Command{ Use: "p2p", - Short: "QGB p2p keys manager", + Short: "BlobStream p2p keys manager", SilenceUsage: true, } diff --git a/cmd/qgb/keys/p2p/p2p_test.go b/cmd/bstream/keys/p2p/p2p_test.go similarity index 94% rename from cmd/qgb/keys/p2p/p2p_test.go rename to cmd/bstream/keys/p2p/p2p_test.go index ec94a663..9b7b016b 100644 --- a/cmd/qgb/keys/p2p/p2p_test.go +++ b/cmd/bstream/keys/p2p/p2p_test.go @@ -3,7 +3,7 @@ package p2p_test import ( "testing" - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/keys/p2p" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys/p2p" "github.com/ipfs/boxo/keystore" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/cmd/qgb/main.go b/cmd/bstream/main.go similarity index 72% rename from cmd/qgb/main.go rename to cmd/bstream/main.go index 863abd49..53b92b18 100644 --- a/cmd/qgb/main.go +++ b/cmd/bstream/main.go @@ -4,7 +4,7 @@ import ( "context" "os" - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/root" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/root" ) func main() { diff --git a/cmd/qgb/orchestrator/cmd.go b/cmd/bstream/orchestrator/cmd.go similarity index 88% rename from cmd/qgb/orchestrator/cmd.go rename to cmd/bstream/orchestrator/cmd.go index be31a76d..a3a25fa6 100644 --- a/cmd/qgb/orchestrator/cmd.go +++ b/cmd/bstream/orchestrator/cmd.go @@ -5,12 +5,12 @@ import ( "os" "time" - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/common" - evm2 "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/keys/evm" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/common" + evm2 "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys/evm" "github.com/celestiaorg/orchestrator-relayer/p2p" dssync "github.com/ipfs/go-datastore/sync" - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/keys" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys" "github.com/celestiaorg/orchestrator-relayer/store" "github.com/celestiaorg/orchestrator-relayer/helpers" @@ -23,7 +23,7 @@ func Command() *cobra.Command { orchCmd := &cobra.Command{ Use: "orchestrator", Aliases: []string{"orch"}, - Short: "QGB orchestrator that signs attestations", + Short: "BlobStream orchestrator that signs attestations", SilenceUsage: true, } @@ -42,7 +42,7 @@ func Command() *cobra.Command { func Start() *cobra.Command { command := &cobra.Command{ Use: "start ", - Short: "Starts the QGB orchestrator to sign attestations", + Short: "Starts the BlobStream orchestrator to sign attestations", RunE: func(cmd *cobra.Command, args []string) error { config, err := parseOrchestratorFlags(cmd) if err != nil { @@ -106,7 +106,7 @@ func Start() *cobra.Command { }() // creating the broadcaster - broadcaster := orchestrator.NewBroadcaster(p2pQuerier.QgbDHT) + broadcaster := orchestrator.NewBroadcaster(p2pQuerier.BlobStreamDHT) if err != nil { return err } @@ -144,7 +144,7 @@ func Start() *cobra.Command { func Init() *cobra.Command { cmd := cobra.Command{ Use: "init", - Short: "Initialize the QGB orchestrator store. Passed flags have persisted effect.", + Short: "Initialize the BlobStream orchestrator store. Passed flags have persisted effect.", RunE: func(cmd *cobra.Command, args []string) error { config, err := parseInitFlags(cmd) if err != nil { diff --git a/cmd/qgb/orchestrator/config.go b/cmd/bstream/orchestrator/config.go similarity index 94% rename from cmd/qgb/orchestrator/config.go rename to cmd/bstream/orchestrator/config.go index 3d52492d..854ce194 100644 --- a/cmd/qgb/orchestrator/config.go +++ b/cmd/bstream/orchestrator/config.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/base" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/base" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" ) @@ -32,7 +32,7 @@ func addOrchestratorFlags(cmd *cobra.Command) *cobra.Command { if err != nil { panic(err) } - cmd.Flags().String(base.FlagHome, homeDir, "The qgb orchestrator home directory") + cmd.Flags().String(base.FlagHome, homeDir, "The BlobStream orchestrator home directory") cmd.Flags().String(base.FlagEVMPassphrase, "", "the evm account passphrase (if not specified as a flag, it will be asked interactively)") base.AddP2PNicknameFlag(cmd) base.AddP2PListenAddressFlag(cmd) @@ -119,7 +119,7 @@ func addInitFlags(cmd *cobra.Command) *cobra.Command { if err != nil { panic(err) } - cmd.Flags().String(base.FlagHome, homeDir, "The qgb orchestrator home directory") + cmd.Flags().String(base.FlagHome, homeDir, "The BlobStream orchestrator home directory") return cmd } diff --git a/cmd/qgb/query/cmd.go b/cmd/bstream/query/cmd.go similarity index 95% rename from cmd/qgb/query/cmd.go rename to cmd/bstream/query/cmd.go index 64b9d866..6e684e85 100644 --- a/cmd/qgb/query/cmd.go +++ b/cmd/bstream/query/cmd.go @@ -11,8 +11,8 @@ import ( common2 "github.com/ethereum/go-ethereum/common" - celestiatypes "github.com/celestiaorg/celestia-app/x/qgb/types" - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/common" + celestiatypes "github.com/celestiaorg/celestia-app/x/blobstream/types" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/common" "github.com/celestiaorg/orchestrator-relayer/p2p" "github.com/celestiaorg/orchestrator-relayer/rpc" "github.com/celestiaorg/orchestrator-relayer/types" @@ -29,7 +29,7 @@ func Command() *cobra.Command { queryCmd := &cobra.Command{ Use: "query", Aliases: []string{"q"}, - Short: "Query relevant information from a running QGB", + Short: "Query relevant information from a running BlobStream", SilenceUsage: true, } @@ -47,8 +47,8 @@ func Signers() *cobra.Command { command := &cobra.Command{ Use: "signers ", Args: cobra.ExactArgs(1), - Short: "Queries the QGB for attestations signers", - Long: "Queries the QGB for attestations signers. The nonce is the attestation nonce that the command" + + Short: "Queries the BlobStream for attestations signers", + Long: "Queries the BlobStream for attestations signers. The nonce is the attestation nonce that the command" + " will query signatures for. It should be either a specific nonce starting from 2 and on." + " Or, use 'latest' as argument to check the latest attestation nonce", RunE: func(cmd *cobra.Command, args []string) error { @@ -107,7 +107,7 @@ func Signers() *cobra.Command { dataStore := dssync.MutexWrap(ds.NewMapDatastore()) // creating the dht - dht, err := p2p.NewQgbDHT(cmd.Context(), h, dataStore, []peer.AddrInfo{}, logger) + dht, err := p2p.NewBlobStreamDHT(cmd.Context(), h, dataStore, []peer.AddrInfo{}, logger) if err != nil { return err } @@ -390,7 +390,7 @@ func Signature() *cobra.Command { dataStore := dssync.MutexWrap(ds.NewMapDatastore()) // creating the dht - dht, err := p2p.NewQgbDHT(cmd.Context(), h, dataStore, []peer.AddrInfo{}, logger) + dht, err := p2p.NewBlobStreamDHT(cmd.Context(), h, dataStore, []peer.AddrInfo{}, logger) if err != nil { return err } diff --git a/cmd/qgb/query/config.go b/cmd/bstream/query/config.go similarity index 96% rename from cmd/qgb/query/config.go rename to cmd/bstream/query/config.go index e2a35f75..b2b05f33 100644 --- a/cmd/qgb/query/config.go +++ b/cmd/bstream/query/config.go @@ -3,7 +3,7 @@ package query import ( "fmt" - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/relayer" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/relayer" "github.com/spf13/cobra" ) diff --git a/cmd/qgb/relayer/cmd.go b/cmd/bstream/relayer/cmd.go similarity index 85% rename from cmd/qgb/relayer/cmd.go rename to cmd/bstream/relayer/cmd.go index 59ecd263..bcc2f2b6 100644 --- a/cmd/qgb/relayer/cmd.go +++ b/cmd/bstream/relayer/cmd.go @@ -5,14 +5,14 @@ import ( "os" "time" - qgbwrapper "github.com/celestiaorg/quantum-gravity-bridge/v2/wrappers/QuantumGravityBridge.sol" + blobstreamwrapper "github.com/celestiaorg/quantum-gravity-bridge/v2/wrappers/QuantumGravityBridge.sol" - evm2 "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/keys/evm" + evm2 "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys/evm" "github.com/celestiaorg/orchestrator-relayer/p2p" dssync "github.com/ipfs/go-datastore/sync" - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/common" - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/keys" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/common" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys" "github.com/celestiaorg/orchestrator-relayer/evm" "github.com/celestiaorg/orchestrator-relayer/helpers" "github.com/celestiaorg/orchestrator-relayer/store" @@ -27,7 +27,7 @@ func Command() *cobra.Command { relCmd := &cobra.Command{ Use: "relayer", Aliases: []string{"rel"}, - Short: "QGB relayer that relays signatures to the target EVM chain", + Short: "BlobStream relayer that relays signatures to the target EVM chain", SilenceUsage: true, } @@ -46,7 +46,7 @@ func Command() *cobra.Command { func Init() *cobra.Command { cmd := cobra.Command{ Use: "init", - Short: "Initialize the QGB relayer store. Passed flags have persisted effect.", + Short: "Initialize the BlobStream relayer store. Passed flags have persisted effect.", RunE: func(cmd *cobra.Command, args []string) error { config, err := parseInitFlags(cmd) if err != nil { @@ -81,7 +81,7 @@ func Init() *cobra.Command { func Start() *cobra.Command { command := &cobra.Command{ Use: "start ", - Short: "Runs the QGB relayer to submit attestations to the target EVM chain", + Short: "Runs the BlobStream relayer to submit attestations to the target EVM chain", RunE: func(cmd *cobra.Command, args []string) error { config, err := parseRelayerStartFlags(cmd) if err != nil { @@ -145,20 +145,20 @@ func Start() *cobra.Command { } }() - // connecting to a QGB contract + // connecting to a BlobStream contract ethClient, err := ethclient.Dial(config.evmRPC) if err != nil { return err } defer ethClient.Close() - qgbWrapper, err := qgbwrapper.NewWrappers(config.contractAddr, ethClient) + blobStreamWrapper, err := blobstreamwrapper.NewWrappers(config.contractAddr, ethClient) if err != nil { return err } evmClient := evm.NewClient( logger, - qgbWrapper, + blobStreamWrapper, s.EVMKeyStore, &acc, config.evmRPC, diff --git a/cmd/qgb/relayer/config.go b/cmd/bstream/relayer/config.go similarity index 95% rename from cmd/qgb/relayer/config.go rename to cmd/bstream/relayer/config.go index a5380029..71507c55 100644 --- a/cmd/qgb/relayer/config.go +++ b/cmd/bstream/relayer/config.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/base" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/base" "github.com/celestiaorg/orchestrator-relayer/evm" "github.com/spf13/cobra" @@ -35,13 +35,13 @@ func addRelayerStartFlags(cmd *cobra.Command) *cobra.Command { cmd.Flags().String(FlagCoreRPCHost, "localhost", "Specify the rest rpc address host") cmd.Flags().Uint(FlagCoreRPCPort, 26657, "Specify the rest rpc address port") cmd.Flags().String(FlagEVMRPC, "http://localhost:8545", "Specify the ethereum rpc address") - cmd.Flags().String(FlagContractAddress, "", "Specify the contract at which the qgb is deployed") + cmd.Flags().String(FlagContractAddress, "", "Specify the contract at which the BlobStream is deployed") cmd.Flags().Uint64(FlagEVMGasLimit, evm.DefaultEVMGasLimit, "Specify the evm gas limit") homeDir, err := base.DefaultServicePath(ServiceNameRelayer) if err != nil { panic(err) } - cmd.Flags().String(base.FlagHome, homeDir, "The qgb relayer home directory") + cmd.Flags().String(base.FlagHome, homeDir, "The BlobStream relayer home directory") cmd.Flags().String(base.FlagEVMPassphrase, "", "the evm account passphrase (if not specified as a flag, it will be asked interactively)") base.AddP2PNicknameFlag(cmd) base.AddP2PListenAddressFlag(cmd) @@ -159,7 +159,7 @@ func addInitFlags(cmd *cobra.Command) *cobra.Command { if err != nil { panic(err) } - cmd.Flags().String(base.FlagHome, homeDir, "The qgb relayer home directory") + cmd.Flags().String(base.FlagHome, homeDir, "The BlobStream relayer home directory") return cmd } diff --git a/cmd/bstream/root/cmd.go b/cmd/bstream/root/cmd.go new file mode 100644 index 00000000..9d24cdcb --- /dev/null +++ b/cmd/bstream/root/cmd.go @@ -0,0 +1,38 @@ +package root + +import ( + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/bootstrapper" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/generate" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/query" + + "github.com/celestiaorg/celestia-app/x/blobstream/client" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/deploy" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/orchestrator" + "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/relayer" + + "github.com/spf13/cobra" +) + +// Cmd creates a new root command for the BlobStream CLI. It is called once in the +// main function. +func Cmd() *cobra.Command { + rootCmd := &cobra.Command{ + Use: "bstream", + Short: "The BlobStream CLI", + SilenceUsage: true, + } + + rootCmd.AddCommand( + orchestrator.Command(), + relayer.Command(), + deploy.Command(), + client.VerifyCmd(), + generate.Command(), + query.Command(), + bootstrapper.Command(), + ) + + rootCmd.SetHelpCommand(&cobra.Command{}) + + return rootCmd +} diff --git a/cmd/qgb/root/cmd.go b/cmd/qgb/root/cmd.go deleted file mode 100644 index b859cce6..00000000 --- a/cmd/qgb/root/cmd.go +++ /dev/null @@ -1,38 +0,0 @@ -package root - -import ( - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/bootstrapper" - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/generate" - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/query" - - "github.com/celestiaorg/celestia-app/x/qgb/client" - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/deploy" - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/orchestrator" - "github.com/celestiaorg/orchestrator-relayer/cmd/qgb/relayer" - - "github.com/spf13/cobra" -) - -// Cmd creates a new root command for the QGB CLI. It is called once in the -// main function. -func Cmd() *cobra.Command { - rootCmd := &cobra.Command{ - Use: "qgb", - Short: "The Quantum-Gravity-Bridge CLI", - SilenceUsage: true, - } - - rootCmd.AddCommand( - orchestrator.Command(), - relayer.Command(), - deploy.Command(), - client.VerifyCmd(), - generate.Command(), - query.Command(), - bootstrapper.Command(), - ) - - rootCmd.SetHelpCommand(&cobra.Command{}) - - return rootCmd -} diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index da160d68..9e45c439 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -2,7 +2,7 @@ set -e -echo "Starting Celestia QGB with command:" +echo "Starting Celestia BlobStream with command:" echo "$@" echo "" diff --git a/docs/bootstrapper.md b/docs/bootstrapper.md index 9b0abd33..91686ab1 100644 --- a/docs/bootstrapper.md +++ b/docs/bootstrapper.md @@ -1,19 +1,19 @@ -# QGB bootstrapper +# BlobStream bootstrapper -To bootstrap the QGB P2P network, we use the bootstrapper QGB node type to accept connections from freshly created orchestrators/relayers and share its peer table with them. +To bootstrap the BlobStream P2P network, we use the bootstrapper BlobStream node type to accept connections from freshly created orchestrators/relayers and share its peer table with them. ## How to run -### Install the QGB binary +### Install the BlobStream binary -Make sure to have the QGB binary installed. Check [the QGB binary page](https://docs.celestia.org/nodes/qgb-binary) for more details. +Make sure to have the BlobStream binary installed. Check [the BlobStream binary page](https://docs.celestia.org/nodes/blobstream-binary) for more details. ### Init the store Before starting the bootstrapper, we will need to init the store: ```ssh -qgb bootstrapper init +bstream bootstrapper init ``` By default, the store will be created un `~/.bootstrapper`. However, if you want to specify a custom location, you can use the `--home` flag. Or, you can use the following environment variable: @@ -29,7 +29,7 @@ The P2P private key is optional, and a new one will be generated automatically o The `p2p` sub-command will help you set up this key if you want to use a specific one: ```ssh -qgb bootstrapper p2p --help +bstream bootstrapper p2p --help ``` ### Start the bootstrapper @@ -37,12 +37,12 @@ qgb bootstrapper p2p --help Now that we have the store initialized, we can start the bootstrapper: ```shell -qgb bootstrapper +bstream bootstrapper -QGB P2P network bootstrapper command +BlobStream P2P network bootstrapper command Usage: - qgb bootstrapper [command] + bstream bootstrapper [command] Aliases: bootstrapper, bs @@ -50,7 +50,7 @@ Aliases: Flags: -h, --help help for bootstrapper -Use "qgb bootstrapper [command] --help" for more information about a command. +Use "bstream bootstrapper [command] --help" for more information about a command. ``` ### Open the P2P port diff --git a/docs/deploy.md b/docs/deploy.md index 0108351b..32e5f0c5 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -1,45 +1,45 @@ --- -sidebar_label: Deploy the QGB contract -description: Learn how to deploy the QGB smart contract. +sidebar_label: Deploy the BlobStream contract +description: Learn how to deploy the BlobStream smart contract. --- -# Deploy the QGB contract +# Deploy the BlobStream contract -The `deploy` is a helper command that allows deploying the QGB smart contract to a new EVM chain: +The `deploy` is a helper command that allows deploying the BlobStream smart contract to a new EVM chain: ```ssh -qgb deploy --help +bstream deploy --help -Deploys the QGB contract and initializes it using the provided Celestia chain +Deploys the BlobStream contract and initializes it using the provided Celestia chain Usage: - qgb deploy [flags] - qgb deploy [command] + bstream deploy [flags] + bstream deploy [command] Available Commands: - keys QGB keys manager + keys BlobStream keys manager ``` ## How to run -### Install the QGB binary +### Install the BlobStream binary -Make sure to have the QGB binary installed. Check [the QGB binary page](https://docs.celestia.org/nodes/qgb-binary) for more details. +Make sure to have the BlobStream binary installed. Check [the BlobStream binary page](https://docs.celestia.org/nodes/blobstream-binary) for more details. ### Add keys -In order to deploy a QGB smart contract, you will need a funded EVM address and its private key. The `keys` command will help you set up this key: +In order to deploy a BlobStream smart contract, you will need a funded EVM address and its private key. The `keys` command will help you set up this key: ```ssh -qgb deploy keys --help +bstream deploy keys --help ``` To import your EVM private key, there is the `import` subcommand to assist you with that: ```ssh -qgb deploy keys evm import --help +bstream deploy keys evm import --help ``` This subcommand allows you to either import a raw ECDSA private key provided as plaintext, or import it from a file. The files are JSON keystore files encrypted using a passphrase like in [this example](https://geth.ethereum.org/docs/developers/dapp-developer/native-accounts). @@ -47,17 +47,17 @@ This subcommand allows you to either import a raw ECDSA private key provided as After adding the key, you can check that it's added via running: ```ssh -qgb deploy keys evm list +bstream deploy keys evm list ``` -For more information about the `keys` command, check [the `keys` documentation](https://docs.celestia.org/nodes/qgb-keys). +For more information about the `keys` command, check [the `keys` documentation](https://docs.celestia.org/nodes/blobstream-keys). ### Deploy the contract -Now, we can deploy the QGB contract to a new EVM chain: +Now, we can deploy the BlobStream contract to a new EVM chain: ```ssh -qgb deploy \ +blobstream deploy \ --evm.chain-id 4 \ --evm.contract-address 0x27a1F8CE94187E4b043f4D57548EF2348Ed556c7 \ --core.grpc.host localhost \ @@ -68,8 +68,8 @@ qgb deploy \ The `latest` can be replaced by the following: -- `latest`: to deploy the QGB contract starting from the latest validator set. -- `earliest`: to deploy the QGB contract starting from genesis. -- `nonce`: you can provide a custom nonce on where you want the QGB to start. If the provided nonce is not a `Valset` attestation, then the one before it will be used to deploy the QGB smart contract. +- `latest`: to deploy the BlobStream contract starting from the latest validator set. +- `earliest`: to deploy the BlobStream contract starting from genesis. +- `nonce`: you can provide a custom nonce on where you want the BlobStream to start. If the provided nonce is not a `Valset` attestation, then the one before it will be used to deploy the BlobStream smart contract. -And, now you will see the QGB smart contract address in the logs along with the transaction hash. +And, now you will see the BlobStream smart contract address in the logs along with the transaction hash. diff --git a/docs/keys.md b/docs/keys.md index aa37e92d..e311971d 100644 --- a/docs/keys.md +++ b/docs/keys.md @@ -7,11 +7,11 @@ description: Learn how to manage EVM private keys and P2P identities. -The QGB `keys` command allows managing EVM private keys and P2P identities. It is defined as a subcommand for multiple commands with the only difference being the directory where the keys are stored. For the remaining functionality, it is the same for all the commands. +The BlobStream `keys` command allows managing EVM private keys and P2P identities. It is defined as a subcommand for multiple commands with the only difference being the directory where the keys are stored. For the remaining functionality, it is the same for all the commands. ## Orchestrator command -The `qgb orchestrator keys` command manages keys for the orchestrator. By default, it uses the orchestrator default home directory to store the keys: `~/.orchestrator/keystore`. However, the default home can be changed either by specifying a different directory using the `--home` flag or setting the following environment variable: +The `bstream orchestrator keys` command manages keys for the orchestrator. By default, it uses the orchestrator default home directory to store the keys: `~/.orchestrator/keystore`. However, the default home can be changed either by specifying a different directory using the `--home` flag or setting the following environment variable: | Variable | Explanation | Default value | Required | |---------------------|---------------------------------------|-------------------|----------| @@ -19,7 +19,7 @@ The `qgb orchestrator keys` command manages keys for the orchestrator. By defaul ## Relayer command -The `qgb relayer keys` command manages keys for the relayer. By default, it uses the relayer default home directory to store the keys: `~/.relayer/keystore`. However, the default home can be changed either by specifying a different directory using the `--home` flag or setting the following environment variable: +The `bstream relayer keys` command manages keys for the relayer. By default, it uses the relayer default home directory to store the keys: `~/.relayer/keystore`. However, the default home can be changed either by specifying a different directory using the `--home` flag or setting the following environment variable: | Variable | Explanation | Default value | Required | |---------------------|---------------------------------------|-------------------|----------| @@ -27,7 +27,7 @@ The `qgb relayer keys` command manages keys for the relayer. By default, it uses ## Deploy command -The `qgb deploy keys` command manages keys for the deployer. By default, it uses the deployer default home directory to store the keys: `~/.deployer/keystore`. However, the default home can be changed either by specifying a different directory using the `--home` flag or setting the following environment variable: +The `bstream deploy keys` command manages keys for the deployer. By default, it uses the deployer default home directory to store the keys: `~/.deployer/keystore`. However, the default home can be changed either by specifying a different directory using the `--home` flag or setting the following environment variable: | Variable | Explanation | Default value | Required | |---------------------|---------------------------------------|-------------------|----------| @@ -48,21 +48,21 @@ As specified above, aside from the difference in the default home directory, the The examples will use the orchestrator command to access the keys. However, the same behaviour applies to the other commands as well. ```ssh -qgb orchestrator keys --help +bstream orchestrator keys --help -QGB keys manager +BlobStream keys manager Usage: - qgb orchestrator keys [command] + bstream orchestrator keys [command] Available Commands: - evm QGB EVM keys manager - p2p QGB p2p keys manager + evm BlobStream EVM keys manager + p2p BlobStream p2p keys manager Flags: -h, --help help for keys -Use "qgb orchestrator keys [command] --help" for more information about a command. +Use "bstream orchestrator keys [command] --help" for more information about a command. ``` ### EVM keystore @@ -72,12 +72,12 @@ The first subcommand of the `keys` command is `evm`. This latter allows managing The EVM keys are `ECDSA` keys using the `secp256k1` curve. The implementation uses `geth` file system keystore [implementation](https://geth.ethereum.org/docs/developers/dapp-developer/native-accounts). Thus, keys can be used interchangeably with any compatible software. ```ssh -qgb orchestrator keys evm --help +bstream orchestrator keys evm --help -QGB EVM keys manager +BlobStream EVM keys manager Usage: - qgb orchestrator keys evm [command] + bstream orchestrator keys evm [command] Available Commands: add create a new EVM address @@ -89,7 +89,7 @@ Available Commands: Flags: -h, --help help for evm -Use "qgb orchestrator keys evm [command] --help" for more information about a command. +Use "bstream orchestrator keys evm [command] --help" for more information about a command. ``` The store also uses the `accounts.StandardScryptN` and `accounts.StandardScryptP` for the `Scrypt` password-based key derivation algorithm to improve its resistance to parallel hardware attacks: @@ -103,12 +103,12 @@ evmKs = keystore.NewKeyStore(evmKeyStorePath(path), keystore.StandardScryptN, ke The `add` subcommand allows creating a new EVM private key and storing it in the keystore: ```ssh -qgb orchestrator keys evm add --help +bstream orchestrator keys evm add --help create a new EVM address Usage: - qgb orchestrator keys evm add [flags] + bstream orchestrator keys evm add [flags] ``` The passphrase of the key encryption can be passed as a flag. But it is advised not to pass it as plain text and instead enter it when prompted interactively. @@ -116,7 +116,7 @@ The passphrase of the key encryption can be passed as a flag. But it is advised After creating a new key, you will see its corresponding address printed: ```ssh -qgb orchestrator keys evm add +bstream orchestrator keys evm add I[2023-04-13|14:16:11.387] successfully opened store path=/home/midnight/.orchestrator I[2023-04-13|14:16:11.387] please provide a passphrase for your account @@ -129,12 +129,12 @@ I[2023-04-13|14:16:30.534] successfully closed store path=/ho The `delete` subcommand allows deleting an EVM private key from store via providing its corresponding address: ```ssh -qgb orchestrator keys evm delete --help +bstream orchestrator keys evm delete --help delete an EVM addresses from the key store Usage: - qgb orchestrator keys evm delete [flags] + bstream orchestrator keys evm delete [flags] ``` The provided address should be a `0x` prefixed EVM address. @@ -144,7 +144,7 @@ After running the command, you will be prompted to enter the passphrase for the Then, you will be prompted to confirm that you want to delete that private key. Make sure to verify if you're deleting the right one because once deleted, it can no longer be recovered! ```ssh -qgb orchestrator keys evm delete 0x27a1F8CE94187E4b043f4D57548EF2348Ed556c7 +bstream orchestrator keys evm delete 0x27a1F8CE94187E4b043f4D57548EF2348Ed556c7 I[2023-04-13|15:01:41.308] successfully opened store path=/home/midnight/.orchestrator I[2023-04-13|15:01:41.309] deleting account address=0x27a1F8CE94187E4b043f4D57548EF2348Ed556c7 @@ -160,7 +160,7 @@ I[2023-04-13|15:01:45.534] successfully closed store path=/ho The `list` subcommand allows listing the existing keys in the keystore: ```ssh -qgb orchestrator keys evm list +bstream orchestrator keys evm list I[2023-04-13|16:08:45.084] successfully opened store path=/home/midnight/.orchestrator I[2023-04-13|16:08:45.084] listing accounts available in store @@ -175,18 +175,18 @@ You could specify a different home using the `--home` flag to list the keys in a The `update` subcommand allows changing the EVM private key passphrase to a new one. It takes as argument the `0x` prefixed EVM address corresponding to the private key we want to edit. ```ssh -qgb orchestrator evm update --help +bstream orchestrator evm update --help update an EVM account passphrase Usage: - qgb orchestrator keys evm update [flags] + bstream orchestrator keys evm update [flags] ``` Example: ```ssh -qgb orchestrator evm update 0x7Dd8F9CAfe6D25165249A454F2d0b72FD149Bbba +bstream orchestrator evm update 0x7Dd8F9CAfe6D25165249A454F2d0b72FD149Bbba I[2023-04-13|16:21:17.139] successfully opened store path=/home/midnight/.orchestrator I[2023-04-13|16:21:17.140] updating account address=0x7Dd8F9CAfe6D25165249A454F2d0b72FD149Bbba @@ -205,12 +205,12 @@ The `--home` can be specified if the store is not in the default directory. The `import` subcommand allows importing existing private keys into the keystore. It has two subcommands: `ecdsa` and `file`. The first allows importing a private key in plaintext, while the other allows importing a private key from a JSON file secured with a passphrase. ```ssh -qgb orchestrator keys evm import --help +bstream orchestrator keys evm import --help import evm keys to the keystore Usage: - qgb orchestrator keys evm import [command] + bstream orchestrator keys evm import [command] Available Commands: ecdsa import an EVM address from an ECDSA private key @@ -219,7 +219,7 @@ Available Commands: Flags: -h, --help help for import -Use "qgb orchestrator keys evm import [command] --help" for more information about a command. +Use "bstream orchestrator keys evm import [command] --help" for more information about a command. ``` #### EVM: Import ECDSA @@ -229,7 +229,7 @@ For the first one, it takes as argument the private key in plaintext. Then, it p Example: ```ssh -qgb orchestrator keys evm import ecdsa da6ed55cb2894ac2c9c10209c09de8e8b9d109b910338d5bf3d747a7e1fc9eb7 +bstream orchestrator keys evm import ecdsa da6ed55cb2894ac2c9c10209c09de8e8b9d109b910338d5bf3d747a7e1fc9eb7 I[2023-04-13|17:00:48.617] successfully opened store path=/home/midnight/.orchestrator I[2023-04-13|17:00:48.617] importing account @@ -243,18 +243,18 @@ I[2023-04-13|17:00:51.990] successfully closed store path=/ho For the second, it takes a JSON key file, as defined in [@ethereum/eth-keyfile](https://github.com/ethereum/eth-keyfile), and imports it to your keystore, so it can be used for signatures. ```ssh -qgb orchestrator keys evm import file --help +bstream orchestrator keys evm import file --help import an EVM address from a file Usage: - qgb orchestrator keys evm import file [flags] + bstream orchestrator keys evm import file [flags] ``` For example, if we have a file in the current directory containing a private key, we could run the following: ```ssh -qgb orchestrator keys evm import file UTC--2023-04-13T15-00-50.302148204Z--966e6f22781ef6a6a82bbb4db3df8e225dfd9488 +bstream orchestrator keys evm import file UTC--2023-04-13T15-00-50.302148204Z--966e6f22781ef6a6a82bbb4db3df8e225dfd9488 I[2023-04-13|17:31:53.307] successfully opened store path=/home/midnight/.orchestrator I[2023-04-13|17:31:53.307] importing account @@ -264,7 +264,7 @@ I[2023-04-13|17:31:58.436] successfully imported file address= I[2023-04-13|17:31:58.437] successfully closed store path=/home/midnight/.orchestrator ``` -with the `passphrase` being the current file passphrase, and the `new passphrase` being the new passphrase that will be used to encrypt the private key in the QGB store. +with the `passphrase` being the current file passphrase, and the `new passphrase` being the new passphrase that will be used to encrypt the private key in the BlobStream store. ### P2P keystore @@ -273,12 +273,12 @@ Similar to the above EVM keystore, the P2P store has similar subcommands for han To access the P2P keystore, run the following: ```ssh -qgb orchestrator keys p2p +bstream orchestrator keys p2p -QGB p2p keys manager +BlobStream p2p keys manager Usage: - qgb orchestrator keys p2p [command] + bstream orchestrator keys p2p [command] Available Commands: add create a new Ed25519 P2P address @@ -289,7 +289,7 @@ Available Commands: Flags: -h, --help help for p2p -Use "qgb orchestrator keys p2p [command] --help" for more information about a command. +Use "bstream orchestrator keys p2p [command] --help" for more information about a command. ``` The `orchestrator` could be replaced by `relayer` and the only difference would be the default home directory. Aside from that, all the methods defined for the orchestrator will also work with the relayer. @@ -299,18 +299,18 @@ The `orchestrator` could be replaced by `relayer` and the only difference would The `add` subcommand creates a new p2p key to the p2p store: ```ssh -qgb orchestrator keys p2p add --help +bstream orchestrator keys p2p add --help create a new Ed25519 P2P address Usage: - qgb orchestrator keys p2p add [flags] + bstream orchestrator keys p2p add [flags] ``` It takes as argument an optional `` which would be the name that we can use to reference that private key. If not specified, an incremental nickname will be assigned. ```ssh -qgb orchestrator keys p2p add +bstream orchestrator keys p2p add I[2023-04-13|17:38:17.289] successfully opened store path=/home/midnight/.orchestrator I[2023-04-13|17:38:17.290] generating a new Ed25519 private key nickname=1 @@ -327,12 +327,12 @@ The nickname will be needed in case the orchestrator needs to use a specific pri The `delete` subcommand will delete a P2P private key from store referenced by its nickname: ```ssh -qgb orchestrator keys p2p delete --help +bstream orchestrator keys p2p delete --help delete an Ed25519 P2P private key from store Usage: - qgb orchestrator keys p2p delete [flags] + bstream orchestrator keys p2p delete [flags] ``` #### P2P: Import subcommand @@ -340,12 +340,12 @@ Usage: The `import` subcommand will import an existing Ed25519 private key to the store. It takes as argument the nickname that we wish to save the private key under, and the actual private key in hex format without `0x`: ```ssh -qgb orchestrator keys p2p import --help +bstream orchestrator keys p2p import --help import an existing p2p private key Usage: - qgb orchestrator keys p2p import [flags] + bstream orchestrator keys p2p import [flags] ``` #### P2P: List subcommand @@ -353,10 +353,10 @@ Usage: The `list` subcommand lists the existing P2P private keys in the store: ```ssh -qgb orchestrator keys p2p list --help +bstream orchestrator keys p2p list --help list existing p2p addresses Usage: - qgb orchestrator keys p2p list [flags] + bstream orchestrator keys p2p list [flags] ``` diff --git a/docs/orchestrator.md b/docs/orchestrator.md index cf225ad5..38b2b847 100644 --- a/docs/orchestrator.md +++ b/docs/orchestrator.md @@ -1,22 +1,22 @@ --- -sidebar_label: QGB Orchestrator -description: Learn about the QGB Orchestrator. +sidebar_label: BlobStream Orchestrator +description: Learn about the BlobStream Orchestrator. --- -# QGB Orchestrator +# BlobStream Orchestrator -The role of the orchestrator is to sign attestations using its corresponding validator EVM private key. These attestations are generated within the QGB module of the Celestia-app state machine. To learn more about what attestations are, you can refer to [the QGB overview](https://github.com/celestiaorg/celestia-app/tree/main/x/qgb). +The role of the orchestrator is to sign attestations using its corresponding validator EVM private key. These attestations are generated within the BlobStream module of the Celestia-app state machine. To learn more about what attestations are, you can refer to [the BlobStream overview](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream). ## How it works The orchestrator does the following: 1. Connect to a Celestia-app full node or validator node via RPC and gRPC and wait for new attestations -2. Once an attestation is created inside the QGB state machine, the orchestrator queries it. -3. After getting the attestation, the orchestrator signs it using the provided EVM private key. The private key should correspond to the EVM address provided when creating the validator. Read [more about QGB keys](https://docs.celestia.org/nodes/qgb-keys/). +2. Once an attestation is created inside the BlobStream state machine, the orchestrator queries it. +3. After getting the attestation, the orchestrator signs it using the provided EVM private key. The private key should correspond to the EVM address provided when creating the validator. Read [more about BlobStream keys](https://docs.celestia.org/nodes/blobstream-keys/). 4. Then, the orchestrator pushes its signature to the P2P network it is connected to, via adding it as a DHT value. 5. Listen for new attestations and go back to step 2. @@ -46,16 +46,16 @@ To run an orchestrator, you will need to have access to the following: * *A list of bootstrappers for the P2P network. These will be shared by the team for every network we plan on supporting. * *Access to your consensus node RPC and gRPC ports. -### Install the QGB binary +### Install the BlobStream binary -Make sure to have the QGB binary installed. Check [the QGB binary page](https://docs.celestia.org/nodes/qgb-binary) for more details. +Make sure to have the BlobStream binary installed. Check [the BlobStream binary page](https://docs.celestia.org/nodes/blobstream-binary) for more details. ### Init the store Before starting the orchestrator, we will need to init the store: ```ssh -qgb orchestrator init +blobstream orchestrator init ``` By default, the store will be created under `~/.orchestrator`. However, if you want to specify a custom location, you can use the `--home` flag. Or, you can use the following environment variable: @@ -78,7 +78,7 @@ The P2P private key is optional, and a new one will be generated automatically o The `keys` command will help you set up these keys: ```ssh -qgb orchestrator keys --help +bstream orchestrator keys --help ``` To add an EVM private key, check the next section. @@ -92,7 +92,7 @@ To register an EVM address for your validator, check the section [Register EVM A To import your EVM private key, there is the `import` subcommand to assist you with that: ```ssh -qgb orchestrator keys evm import --help +bstream orchestrator keys evm import --help ``` This subcommand allows you to either import a raw ECDSA private key provided as plaintext, or import it from a file. The files are JSON keystore files encrypted using a passphrase like in [this example](https://geth.ethereum.org/docs/developers/dapp-developer/native-accounts). @@ -100,10 +100,10 @@ This subcommand allows you to either import a raw ECDSA private key provided as After adding the key, you can check that it's added via running: ```ssh -qgb orchestrator keys evm list +bstream orchestrator keys evm list ``` -For more information about the `keys` command, check [the `keys` documentation](https://docs.celestia.org/nodes/qgb-keys). +For more information about the `keys` command, check [the `keys` documentation](https://docs.celestia.org/nodes/blobstream-keys). ### Start the orchestrator @@ -112,18 +112,18 @@ Now that we have the store initialized, we can start the orchestrator. Make sure The orchestrator accepts the following flags: ```ssh -qgb orchestrator start --help +bstream orchestrator start --help -Starts the QGB orchestrator to sign attestations +Starts the BlobStream orchestrator to sign attestations Usage: - qgb orchestrator start [flags] + bstream orchestrator start [flags] ``` To start the orchestrator in the default home directory, run the following: ```ssh -qgb orchestrator start \ +bstream orchestrator start \ --core.grpc.host localhost \ --core.grpc.port 9090 \ --core.rpc.host localhost \ @@ -145,7 +145,7 @@ If not, then the signatures may not be available to the network and relayers wil #### Register EVM Address -When creating a validator, a random EVM address corresponding to its operator is set in the QGB state. This latter will be used by the orchestrator to sign attestations. And since validators will generally not have access to its corresponding private key, that address needs to be edited with one whose private key is known to the validator operator. +When creating a validator, a random EVM address corresponding to its operator is set in the BlobStream state. This latter will be used by the orchestrator to sign attestations. And since validators will generally not have access to its corresponding private key, that address needs to be edited with one whose private key is known to the validator operator. To edit an EVM address for a certain validator, its corresponding account needs to send a `RegisterEVMAddress` transaction with the new address. @@ -160,13 +160,13 @@ This assumes that you're using the default home directory, the default keystore To check which EVM address is registered for your `valoper` address, run the following: ```ssh -celestia-appd query qgb evm +celestia-appd query blobstream evm ``` Then, to proceed with the edit, run the following command: ```shell -celestia-appd tx qgb register \ +celestia-appd tx blobstream register \ \ \ --fees 30000utia \ @@ -244,11 +244,11 @@ logs: - events: - attributes: - key: action - value: /celestia.qgb.v1.MsgRegisterEVMAddress + value: /celestia.blobstream.v1.MsgRegisterEVMAddress type: message log: "" msg_index: 0 -raw_log: '[{"msg_index":0,"events":[{"type":"message","attributes":[{"key":"action","value":"/celestia.qgb.v1.MsgRegisterEVMAddress"}]}]}]' +raw_log: '[{"msg_index":0,"events":[{"type":"message","attributes":[{"key":"action","value":"/celestia.blobstream.v1.MsgRegisterEVMAddress"}]}]}]' timestamp: "" tx: null txhash: 4199EA959A2CFEFCD4726D8D8F7B536458A46A27318D3483A4E9614F560606BC @@ -257,7 +257,7 @@ txhash: 4199EA959A2CFEFCD4726D8D8F7B536458A46A27318D3483A4E9614F560606BC Now, you can verify that the EVM address has been updated using the following command: ```ssh -celestia-appd query qgb evm +celestia-appd query blobstream evm ``` Now, you can restart the orchestrator, and it should start signing. @@ -273,12 +273,12 @@ If you want to start the orchestrator as a `systemd` service, you could use the ```text [Unit] -Description=QGB orchestrator service +Description=BlobStream orchestrator service After=network.target [Service] Type=simple -ExecStart= orchestrator start --evm.account --evm.passphrase --core.grpc.host --core.grpc.port --core.rpc.host --core.rpc.port --p2p.bootstrappers +ExecStart= orchestrator start --evm.account --evm.passphrase --core.grpc.host --core.grpc.port --core.rpc.host --core.rpc.port --p2p.bootstrappers LimitNOFILE=infinity LimitCORE=infinity Restart=always diff --git a/docs/relayer.md b/docs/relayer.md index 1e698521..626442db 100644 --- a/docs/relayer.md +++ b/docs/relayer.md @@ -1,27 +1,27 @@ --- -sidebar_label: QGB Relayer -description: Learn about the QGB Relayer. +sidebar_label: BlobStream Relayer +description: Learn about the BlobStream Relayer. --- -# QGB Relayer +# BlobStream Relayer -The role of the relayer is to gather attestations' signatures from the orchestrators, and submit them to a target EVM chain. The attestations are generated within the QGB module of the Celestia-app state machine. To learn more about what attestations are, you can refer to [the QGB overview](https://github.com/celestiaorg/celestia-app/tree/main/x/qgb). +The role of the relayer is to gather attestations' signatures from the orchestrators, and submit them to a target EVM chain. The attestations are generated within the BlobStream module of the Celestia-app state machine. To learn more about what attestations are, you can refer to [the BlobStream overview](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream). -Also, while every validator in the Celestia validator set needs to run an orchestrator, we only need one entity to run the relayer, and it can be anyone. Thus, if you're a validator, most likely you want to read [the orchestrator documentation](https://docs.celestia.org/nodes/qgb-orchestrator/). +Also, while every validator in the Celestia validator set needs to run an orchestrator, we only need one entity to run the relayer, and it can be anyone. Thus, if you're a validator, most likely you want to read [the orchestrator documentation](https://docs.celestia.org/nodes/blobstream-orchestrator/). -Every relayer needs to target a QGB smart contract. This latter can be deployed, if not already, using the `qgb deploy` command. More details in the [Deploy the QGB contract guide](https://docs.celestia.org/nodes/qgb-deploy/). +Every relayer needs to target a BlobStream smart contract. This latter can be deployed, if not already, using the `bstream deploy` command. More details in the [Deploy the BlobStream contract guide](https://docs.celestia.org/nodes/blobstream-deploy/). ## How it works The relayer works as follows: 1. Connect to a Celestia-app full node or validator node via RPC and gRPC and wait for attestations. -2. Once an attestation is created inside the QGB state machine, the relayer queries it. -3. After getting the attestation, the relayer checks if the target QGB smart contract's nonce is lower than the attestation. +2. Once an attestation is created inside the BlobStream state machine, the relayer queries it. +3. After getting the attestation, the relayer checks if the target BlobStream smart contract's nonce is lower than the attestation. 4. If so, the relayer queries the P2P network for signatures from the orchestrators. -5. Once the relayer finds more than 2/3s signatures, it submits them to the target QGB smart contract where they get validated. +5. Once the relayer finds more than 2/3s signatures, it submits them to the target BlobStream smart contract where they get validated. 6. Listen for new attestations and go back to step 2. The relayer connects to a separate P2P network than the consensus or the data availability one. So, we will provide bootstrappers for that one. @@ -36,16 +36,16 @@ I[2023-04-26|00:04:28.175] waiting for routing table to populate targetnu ## How to run -### Install the QGB binary +### Install the BlobStream binary -Make sure to have the QGB binary installed. Check out the [Install the QGB binary page](https://docs.celestia.org/nodes/qgb-binary) for more details. +Make sure to have the BlobStream binary installed. Check out the [Install the BlobStream binary page](https://docs.celestia.org/nodes/blobstream-binary) for more details. ### Init the store Before starting the relayer, we will need to init the store: ```ssh -qgb relayer init +bstream relayer init ``` By default, the store will be created un `~/.relayer`. However, if you want to specify a custom location, you can use the `--home` flag. Or, you can use the following environment variable: @@ -68,7 +68,7 @@ The P2P private key is optional, and a new one will be generated automatically o The `keys` command will help you set up these keys: ```ssh -qgb relayer keys --help +bstream relayer keys --help ``` To add an EVM private key, check the next section. @@ -80,7 +80,7 @@ Because EVM keys are important, we provide a keystore that will help manage them To import your EVM private key, there is the `import` subcommand to assist you with that: ```ssh -qgb relayer keys evm import --help +bstream relayer keys evm import --help ``` This subcommand allows you to either import a raw ECDSA private key provided as plaintext, or import it from a file. The files are JSON keystore files encrypted using a passphrase like [in this example](https://geth.ethereum.org/docs/developers/dapp-developer/native-accounts). @@ -88,30 +88,30 @@ This subcommand allows you to either import a raw ECDSA private key provided as After adding the key, you can check that it's added via running: ```ssh -qgb relayer keys evm list +bstream relayer keys evm list ``` -For more information about the `keys` command, check [the `keys` documentation](https://docs.celestia.org/nodes/qgb-keys). +For more information about the `keys` command, check [the `keys` documentation](https://docs.celestia.org/nodes/blobstream-keys). ### Start the relayer -Now that we have the store initialized, and we have a target QGB smart contract address, we can start the relayer. Make sure you have your Celestia-app node RPC and gRPC accessible, and able to connect to the P2P network bootstrappers. +Now that we have the store initialized, and we have a target BlobStream smart contract address, we can start the relayer. Make sure you have your Celestia-app node RPC and gRPC accessible, and able to connect to the P2P network bootstrappers. The relayer accepts the following flags: ```ssh -qgb relayer start --help +bstream relayer start --help -Runs the QGB relayer to submit attestations to the target EVM chain +Runs the BlobStream relayer to submit attestations to the target EVM chain Usage: - qgb relayer start [flags] + bstream relayer start [flags] ``` To start the relayer using the default home directory, run the following: ```ssh -/bin/qgb relayer start \ +/bin/bstream relayer start \ --evm.contract-address=0x27a1F8CE94187E4b043f4D57548EF2348Ed556c7 \ --core.rpc.host=localhost \ --core.rpc.port=26657 \ @@ -124,4 +124,4 @@ To start the relayer using the default home directory, run the following: --p2p.listen-addr=/ip4/0.0.0.0/tcp/30001 ``` -And, you will be prompted to enter your EVM key passphrase for the EVM address passed using the `-d` flag, so that the relayer can use it to send transactions to the target QGB smart contract. Make sure that it's funded. +And, you will be prompted to enter your EVM key passphrase for the EVM address passed using the `-d` flag, so that the relayer can use it to send transactions to the target BlobStream smart contract. Make sure that it's funded. diff --git a/e2e/Dockerfile_e2e b/e2e/Dockerfile_e2e index 3b4b06aa..10bfe59a 100644 --- a/e2e/Dockerfile_e2e +++ b/e2e/Dockerfile_e2e @@ -1,4 +1,4 @@ -# stage 1 Build qgb binary +# stage 1 Build bstream binary FROM golang:1.21.1-alpine as builder RUN apk update && apk --no-cache add make gcc musl-dev git COPY . /orchestrator-relayer @@ -13,9 +13,9 @@ USER root # hadolint ignore=DL3018 RUN apk update && apk --no-cache add bash jq coreutils curl -COPY --from=builder /orchestrator-relayer/build/qgb /bin/qgb +COPY --from=builder /orchestrator-relayer/build/bstream /bin/bstream # p2p port EXPOSE 9090 26657 30000 -CMD [ "/bin/qgb" ] +CMD [ "/bin/bstream" ] diff --git a/e2e/Makefile b/e2e/Makefile index 1ae17432..8e8b68d2 100644 --- a/e2e/Makefile +++ b/e2e/Makefile @@ -5,4 +5,4 @@ PACKAGES=$(shell go list ./...) all: test test: - @QGB_INTEGRATION_TEST=true go test -mod=readonly -failfast -test.timeout 50m -v $(PACKAGES) + @BLOBSTREAM_INTEGRATION_TEST=true go test -mod=readonly -failfast -test.timeout 50m -v $(PACKAGES) diff --git a/e2e/README.md b/e2e/README.md index ed4ef278..4f4b19ca 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -1,16 +1,16 @@ -# Quantum Gravity Bridge end to end integration test +# BlobStream end to end integration test -This directory contains the QGB e2e integration tests. It serves as a way to fully test the QGB orchestrator and relayer in real network scenarios +This directory contains the BlobStream e2e integration tests. It serves as a way to fully test the BlobStream orchestrator and relayer in real network scenarios ## Topology -as discussed under [#398](https://github.com/celestiaorg/celestia-app/issues/398) The e2e network defined under `qgb_network.go` has the following components: +as discussed under [#398](https://github.com/celestiaorg/celestia-app/issues/398) The e2e network defined under `blobstream_network.go` has the following components: - 4 Celestia-app nodes that can be validators - 4 Orchestrator nodes that will each run aside of a celestia-app - 1 Ethereum node. Probably Ganache as it is easier to set up - 1 Relayer node that will listen to Celestia chain and relay attestations -- 1 Deployer node that can deploy a new QGB contract when needed. +- 1 Deployer node that can deploy a new BlobStream contract when needed. For more information on the environment variables required to run these tests, please check the `docker-compose.yml` file and the shell scripts defined under `celestia-app` directory. @@ -22,7 +22,7 @@ In some test scenarios, we only care about running a single orchestrator node. T // create dht for querying bootstrapper, err := helpers.ParseAddrInfos(network.Logger, BOOTSTRAPPERS) HandleNetworkError(t, network, err, false) -_, _, dht := qgbtesting.NewTestDHT(ctx, bootstrapper) +_, _, dht := blobstreamtesting.NewTestDHT(ctx, bootstrapper) defer dht.Close() ``` @@ -47,13 +47,13 @@ make test To run a single test, run the following: ```shell -QGB_INTEGRATION_TEST=true go test -mod=readonly -test.timeout 30m -v -run +BLOBSTREAM_INTEGRATION_TEST=true go test -mod=readonly -test.timeout 30m -v -run ``` ### Run all the tests using `go` directly ```shell -QGB_INTEGRATION_TEST=true go test -mod=readonly -test.timeout 30m -v +BLOBSTREAM_INTEGRATION_TEST=true go test -mod=readonly -test.timeout 30m -v ``` ## Common issues @@ -62,7 +62,7 @@ Currently, when the tests are run using the above ways, there are possible issue ### hanging docker containers after a sudden network stop -If the tests were stopped unexpectedly, for example, sending a `SIGINT`, ie, `ctrl+c`, the resources will not be releases correctly (might be fixed in the future). This will result in seeing similar logs to the following : +If the tests were stopped unexpectedly, for example, sending a `SIGINT`, ie, `ctrl+c`, the resources will not be released correctly (might be fixed in the future). This will result in seeing similar logs to the following : ```text ERROR: for core0 Cannot create container for service core0: Conflict. The container name "/core0" is already in use by container "4bdaf40e2cd26bf549738ea95f53ba49cb5407c3d892b50b5a75e72e08e @@ -87,4 +87,4 @@ To fix it, run the `cleanup.sh` script under `scripts` directory : ./scripts/cleanup.sh ``` -NB : This will kill and remove hanging containers and networks related to the executed. But, might also delete unrelated ones if they have the same name. +NB: This will kill and remove hanging containers and networks related to the executed. But might also delete unrelated ones if they have the same name. diff --git a/e2e/celestia-app/config.toml b/e2e/celestia-app/config.toml index eb236f16..d1fe4eec 100644 --- a/e2e/celestia-app/config.toml +++ b/e2e/celestia-app/config.toml @@ -15,7 +15,7 @@ proxy_app = "tcp://127.0.0.1:26658" # A custom human readable name for this node -moniker = "qgb-e2e" +moniker = "blobstream-e2e" # If this node is many blocks behind the tip of the chain, FastSync # allows them to catchup quickly by downloading blocks in parallel diff --git a/e2e/celestia-app/genesis.json b/e2e/celestia-app/genesis.json index 779ece17..a21c7e3e 100644 --- a/e2e/celestia-app/genesis.json +++ b/e2e/celestia-app/genesis.json @@ -1,6 +1,6 @@ { "genesis_time": "2023-08-19T12:26:21.927143572Z", - "chain_id": "qgb-e2e", + "chain_id": "blobstream-e2e", "initial_height": "1", "consensus_params": { "block": { @@ -188,7 +188,7 @@ { "@type": "/cosmos.staking.v1beta1.MsgCreateValidator", "description": { - "moniker": "qgb-e2e", + "moniker": "blobstream-e2e", "identity": "", "website": "", "security_contact": "", diff --git a/e2e/celestia-app/genesis_template.json b/e2e/celestia-app/genesis_template.json index 6dbfae0e..83035d45 100644 --- a/e2e/celestia-app/genesis_template.json +++ b/e2e/celestia-app/genesis_template.json @@ -1,6 +1,6 @@ { "genesis_time": "", - "chain_id": "qgb-e2e", + "chain_id": "blobstream-e2e", "initial_height": "1", "consensus_params": { "block": { @@ -188,7 +188,7 @@ { "@type": "/cosmos.staking.v1beta1.MsgCreateValidator", "description": { - "moniker": "qgb-e2e", + "moniker": "blobstream-e2e", "identity": "", "website": "", "security_contact": "", diff --git a/e2e/deployer_test.go b/e2e/deployer_test.go index 9b92b976..9dfe49eb 100644 --- a/e2e/deployer_test.go +++ b/e2e/deployer_test.go @@ -13,11 +13,11 @@ import ( ) func TestDeployer(t *testing.T) { - if os.Getenv("QGB_INTEGRATION_TEST") != TRUE { - t.Skip("Skipping QGB integration tests") + if os.Getenv("BLOBSTREAM_INTEGRATION_TEST") != TRUE { + t.Skip("Skipping BlobStream integration tests") } - network, err := NewQGBNetwork() + network, err := NewBlobStreamNetwork() HandleNetworkError(t, network, err, false) // to release resources after tests @@ -31,13 +31,13 @@ func TestDeployer(t *testing.T) { err = network.WaitForBlock(ctx, 2) HandleNetworkError(t, network, err, false) - _, err = network.GetLatestDeployedQGBContractWithCustomTimeout(ctx, 15*time.Second) + _, err = network.GetLatestDeployedBlobStreamContractWithCustomTimeout(ctx, 15*time.Second) HandleNetworkError(t, network, err, true) - err = network.DeployQGBContract() + err = network.DeployBlobStreamContract() HandleNetworkError(t, network, err, false) - bridge, err := network.GetLatestDeployedQGBContract(ctx) + bridge, err := network.GetLatestDeployedBlobStreamContract(ctx) HandleNetworkError(t, network, err, false) evmClient := evm.NewClient(nil, bridge, nil, nil, network.EVMRPC, evm.DefaultEVMGasLimit) diff --git a/e2e/docker-compose.yml b/e2e/docker-compose.yml index ebe420a7..c343c2c1 100644 --- a/e2e/docker-compose.yml +++ b/e2e/docker-compose.yml @@ -259,7 +259,7 @@ services: environment: # By default, we don't want to run the deploy on each run. - DEPLOY_NEW_CONTRACT=false - - EVM_CHAIN_ID=qgb-e2e + - EVM_CHAIN_ID=blobstream-e2e - EVM_ACCOUNT=0x95359c3348e189ef7781546e6E13c80230fC9fB5 - PRIVATE_KEY=0e9688e585562e828dcbd4f402d5eddf686f947fb6bf75894a85bf008b017401 - CORE_RPC_HOST=core0 @@ -273,10 +273,10 @@ services: "/bin/bash" ] command: [ - "/opt/deploy_qgb_contract.sh" + "/opt/deploy_blobstream_contract.sh" ] volumes: - - ${PWD}/scripts/deploy_qgb_contract.sh:/opt/deploy_qgb_contract.sh:ro + - ${PWD}/scripts/deploy_blobstream_contract.sh:/opt/deploy_blobstream_contract.sh:ro relayer: container_name: relayer @@ -289,7 +289,7 @@ services: ports: - "30004:30000" environment: - - EVM_CHAIN_ID=qgb-e2e + - EVM_CHAIN_ID=blobstream-e2e - EVM_ACCOUNT=0x95359c3348e189ef7781546e6E13c80230fC9fB5 - PRIVATE_KEY=0e9688e585562e828dcbd4f402d5eddf686f947fb6bf75894a85bf008b017401 - CORE_RPC_HOST=core0 @@ -302,8 +302,8 @@ services: - P2P_BOOTSTRAPPERS=/dns/core0-orch/tcp/30000/p2p/12D3KooWBSMasWzRSRKXREhediFUwABNZwzJbkZcYz5rYr9Zdmfn - P2P_LISTEN=/ip4/0.0.0.0/tcp/30000 # set the following environment variable to some value -# if you want to relay to an existing QGB contract -# - QGB_CONTRACT=0x123 +# if you want to relay to an existing BlobStream contract +# - BLOBSTREAM_CONTRACT=0x123 entrypoint: [ "/bin/bash" ] @@ -312,4 +312,4 @@ services: ] volumes: - ${PWD}/scripts/start_relayer.sh:/opt/start_relayer.sh:ro - - ${PWD}/scripts/deploy_qgb_contract.sh:/opt/deploy_qgb_contract.sh:ro + - ${PWD}/scripts/deploy_blobstream_contract.sh:/opt/deploy_blobstream_contract.sh:ro diff --git a/e2e/orchestrator_test.go b/e2e/orchestrator_test.go index 6898ffa7..a29af385 100644 --- a/e2e/orchestrator_test.go +++ b/e2e/orchestrator_test.go @@ -8,18 +8,18 @@ import ( "github.com/celestiaorg/orchestrator-relayer/helpers" - qgbtesting "github.com/celestiaorg/orchestrator-relayer/testing" + blobstreamtesting "github.com/celestiaorg/orchestrator-relayer/testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestOrchestratorWithOneValidator(t *testing.T) { - if os.Getenv("QGB_INTEGRATION_TEST") != TRUE { - t.Skip("Skipping QGB integration tests") + if os.Getenv("BLOBSTREAM_INTEGRATION_TEST") != TRUE { + t.Skip("Skipping BlobStream integration tests") } - network, err := NewQGBNetwork() + network, err := NewBlobStreamNetwork() HandleNetworkError(t, network, err, false) // to release resources after tests @@ -42,7 +42,7 @@ func TestOrchestratorWithOneValidator(t *testing.T) { // create dht for querying bootstrapper, err := helpers.ParseAddrInfos(network.Logger, BOOTSTRAPPERS) HandleNetworkError(t, network, err, false) - host, _, dht := qgbtesting.NewTestDHT(ctx, bootstrapper) + host, _, dht := blobstreamtesting.NewTestDHT(ctx, bootstrapper) defer dht.Close() // force the connection to the DHT to start the orchestrator @@ -67,11 +67,11 @@ func TestOrchestratorWithOneValidator(t *testing.T) { } func TestOrchestratorWithTwoValidators(t *testing.T) { - if os.Getenv("QGB_INTEGRATION_TEST") != TRUE { - t.Skip("Skipping QGB integration tests") + if os.Getenv("BLOBSTREAM_INTEGRATION_TEST") != TRUE { + t.Skip("Skipping BlobStream integration tests") } - network, err := NewQGBNetwork() + network, err := NewBlobStreamNetwork() HandleNetworkError(t, network, err, false) // to release resources after tests @@ -103,7 +103,7 @@ func TestOrchestratorWithTwoValidators(t *testing.T) { // create dht for querying bootstrapper, err := helpers.ParseAddrInfos(network.Logger, BOOTSTRAPPERS) HandleNetworkError(t, network, err, false) - host, _, dht := qgbtesting.NewTestDHT(ctx, bootstrapper) + host, _, dht := blobstreamtesting.NewTestDHT(ctx, bootstrapper) defer dht.Close() // force the connection to the DHT to start the orchestrator @@ -156,11 +156,11 @@ func TestOrchestratorWithTwoValidators(t *testing.T) { } func TestOrchestratorWithMultipleValidators(t *testing.T) { - if os.Getenv("QGB_INTEGRATION_TEST") != TRUE { - t.Skip("Skipping QGB integration tests") + if os.Getenv("BLOBSTREAM_INTEGRATION_TEST") != TRUE { + t.Skip("Skipping BlobStream integration tests") } - network, err := NewQGBNetwork() + network, err := NewBlobStreamNetwork() assert.NoError(t, err) // to release resources after tests @@ -179,7 +179,7 @@ func TestOrchestratorWithMultipleValidators(t *testing.T) { // create dht for querying bootstrapper, err := helpers.ParseAddrInfos(network.Logger, BOOTSTRAPPERS) HandleNetworkError(t, network, err, false) - host, _, dht := qgbtesting.NewTestDHT(ctx, bootstrapper) + host, _, dht := blobstreamtesting.NewTestDHT(ctx, bootstrapper) defer dht.Close() // force the connection to the DHT to start the orchestrator @@ -245,11 +245,11 @@ func TestOrchestratorWithMultipleValidators(t *testing.T) { } func TestOrchestratorReplayOld(t *testing.T) { - if os.Getenv("QGB_INTEGRATION_TEST") != TRUE { - t.Skip("Skipping QGB integration tests") + if os.Getenv("BLOBSTREAM_INTEGRATION_TEST") != TRUE { + t.Skip("Skipping BlobStream integration tests") } - network, err := NewQGBNetwork() + network, err := NewBlobStreamNetwork() HandleNetworkError(t, network, err, false) // to release resources after tests @@ -284,7 +284,7 @@ func TestOrchestratorReplayOld(t *testing.T) { // create dht for querying bootstrapper, err := helpers.ParseAddrInfos(network.Logger, BOOTSTRAPPERS) HandleNetworkError(t, network, err, false) - host, _, dht := qgbtesting.NewTestDHT(ctx, bootstrapper) + host, _, dht := blobstreamtesting.NewTestDHT(ctx, bootstrapper) defer dht.Close() // force the connection to the DHT to start the orchestrator diff --git a/e2e/qgb_network.go b/e2e/qgb_network.go index 3618e5ea..a98d8be7 100644 --- a/e2e/qgb_network.go +++ b/e2e/qgb_network.go @@ -19,14 +19,14 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - qgbwrapper "github.com/celestiaorg/quantum-gravity-bridge/v2/wrappers/QuantumGravityBridge.sol" + blobstreamwrapper "github.com/celestiaorg/quantum-gravity-bridge/v2/wrappers/QuantumGravityBridge.sol" "github.com/celestiaorg/celestia-app/app" "github.com/celestiaorg/celestia-app/app/encoding" - "github.com/celestiaorg/celestia-app/x/qgb/types" + "github.com/celestiaorg/celestia-app/x/blobstream/types" "github.com/celestiaorg/orchestrator-relayer/p2p" "github.com/celestiaorg/orchestrator-relayer/rpc" - qgbtypes "github.com/celestiaorg/orchestrator-relayer/types" + blobstreamtypes "github.com/celestiaorg/orchestrator-relayer/types" "github.com/ethereum/go-ethereum/accounts/abi/bind" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" @@ -36,7 +36,7 @@ import ( testcontainers "github.com/testcontainers/testcontainers-go/modules/compose" ) -type QGBNetwork struct { +type BlobStreamNetwork struct { ComposePaths []string Identifier string Instance *testcontainers.LocalDockerCompose @@ -53,7 +53,7 @@ type QGBNetwork struct { toStopChan chan<- struct{} } -func NewQGBNetwork() (*QGBNetwork, error) { +func NewBlobStreamNetwork() (*BlobStreamNetwork, error) { id := strings.ToLower(uuid.New().String()) paths := []string{"./docker-compose.yml"} instance := testcontainers.NewLocalDockerCompose(paths, id) //nolint:staticcheck @@ -61,7 +61,7 @@ func NewQGBNetwork() (*QGBNetwork, error) { // given an initial capacity to avoid blocking in case multiple services failed // and wanted to notify the moderator. toStopChan := make(chan struct{}, 10) - network := &QGBNetwork{ + network := &BlobStreamNetwork{ Identifier: id, ComposePaths: paths, Instance: instance, @@ -96,7 +96,7 @@ func registerModerator(stopChan chan<- struct{}, toStopChan <-chan struct{}) { // it is not calling `DeleteAll()` here as it is being called inside the tests. No need to call it two times. // this comes from the fact that we're sticking with unit tests style tests to be able to run individual tests // https://github.com/celestiaorg/celestia-app/issues/428 -func registerGracefulExit(network *QGBNetwork) { +func registerGracefulExit(network *BlobStreamNetwork) { c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt) go func() { @@ -117,9 +117,9 @@ func forceExitIfNeeded(exitCode int) { } } -// StartAll starts the whole QGB cluster with multiple validators, orchestrators and a relayer +// StartAll starts the whole BlobStream cluster with multiple validators, orchestrators and a relayer // Make sure to release the resources after finishing by calling the `StopAll()` method. -func (network QGBNetwork) StartAll() error { +func (network BlobStreamNetwork) StartAll() error { // the reason for building before executing `up` is to avoid rebuilding all the images // if some container accidentally changed some files when running. // This to speed up a bit the execution. @@ -141,7 +141,7 @@ func (network QGBNetwork) StartAll() error { // StopAll stops the network and leaves the containers created. This allows to resume // execution from the point where they stopped. -func (network QGBNetwork) StopAll() error { +func (network BlobStreamNetwork) StopAll() error { err := network.Instance. WithCommand([]string{"stop"}). Invoke() @@ -152,7 +152,7 @@ func (network QGBNetwork) StopAll() error { } // DeleteAll deletes the containers, network and everything related to the cluster. -func (network QGBNetwork) DeleteAll() error { +func (network BlobStreamNetwork) DeleteAll() error { err := network.Instance. WithCommand([]string{"down"}). Invoke() @@ -163,7 +163,7 @@ func (network QGBNetwork) DeleteAll() error { } // KillAll kills all the containers. -func (network QGBNetwork) KillAll() error { +func (network BlobStreamNetwork) KillAll() error { err := network.Instance. WithCommand([]string{"kill"}). Invoke() @@ -175,7 +175,7 @@ func (network QGBNetwork) KillAll() error { // Start starts a service from the `Service` enum. Make sure to call `Stop`, in the // end, to release the resources. -func (network QGBNetwork) Start(service Service) error { +func (network BlobStreamNetwork) Start(service Service) error { serviceName, err := service.toString() if err != nil { return err @@ -196,10 +196,10 @@ func (network QGBNetwork) Start(service Service) error { return nil } -// DeployQGBContract uses the Deployer service to deploy a new QGB contract +// DeployBlobStreamContract uses the Deployer service to deploy a new BlobStream contract // based on the existing running network. If no Celestia-app nor ganache is // started, it creates them automatically. -func (network QGBNetwork) DeployQGBContract() error { +func (network BlobStreamNetwork) DeployBlobStreamContract() error { fmt.Println("building images...") err := network.Instance. WithCommand([]string{"build", "--quiet", DEPLOYER}). @@ -218,7 +218,7 @@ func (network QGBNetwork) DeployQGBContract() error { // StartMultiple start multiple services. Make sure to call `Stop`, in the // end, to release the resources. -func (network QGBNetwork) StartMultiple(services ...Service) error { +func (network BlobStreamNetwork) StartMultiple(services ...Service) error { if len(services) == 0 { return fmt.Errorf("empty list of services provided") } @@ -246,7 +246,7 @@ func (network QGBNetwork) StartMultiple(services ...Service) error { return nil } -func (network QGBNetwork) Stop(service Service) error { +func (network BlobStreamNetwork) Stop(service Service) error { serviceName, err := service.toString() if err != nil { return err @@ -262,7 +262,7 @@ func (network QGBNetwork) Stop(service Service) error { // StopMultiple start multiple services. Make sure to call `Stop` or `StopMultiple`, in the // end, to release the resources. -func (network QGBNetwork) StopMultiple(services ...Service) error { +func (network BlobStreamNetwork) StopMultiple(services ...Service) error { if len(services) == 0 { return fmt.Errorf("empty list of services provided") } @@ -283,7 +283,7 @@ func (network QGBNetwork) StopMultiple(services ...Service) error { return nil } -func (network QGBNetwork) ExecCommand(service Service, command []string) error { +func (network BlobStreamNetwork) ExecCommand(service Service, command []string) error { serviceName, err := service.toString() if err != nil { return err @@ -299,7 +299,7 @@ func (network QGBNetwork) ExecCommand(service Service, command []string) error { // StartMinimal starts a network containing: 1 validator, 1 orchestrator, 1 relayer // and a ganache instance. -func (network QGBNetwork) StartMinimal() error { +func (network BlobStreamNetwork) StartMinimal() error { fmt.Println("building images...") err := network.Instance. WithCommand([]string{"build", "--quiet", "core0", "core0-orch", "relayer", "ganache"}). @@ -319,7 +319,7 @@ func (network QGBNetwork) StartMinimal() error { // StartBase starts the very minimal component to have a network. // It consists of starting `core0` as it is the genesis validator, and the docker network // will be created along with it, allowing more containers to join it. -func (network QGBNetwork) StartBase() error { +func (network BlobStreamNetwork) StartBase() error { fmt.Println("building images...") err := network.Instance. WithCommand([]string{"build", "--quiet", "core0"}). @@ -336,7 +336,7 @@ func (network QGBNetwork) StartBase() error { return nil } -func (network QGBNetwork) WaitForNodeToStart(_ctx context.Context, rpcAddr string) error { +func (network BlobStreamNetwork) WaitForNodeToStart(_ctx context.Context, rpcAddr string) error { ctx, cancel := context.WithTimeout(_ctx, 5*time.Minute) for { select { @@ -362,11 +362,11 @@ func (network QGBNetwork) WaitForNodeToStart(_ctx context.Context, rpcAddr strin } } -func (network QGBNetwork) WaitForBlock(_ctx context.Context, height int64) error { +func (network BlobStreamNetwork) WaitForBlock(_ctx context.Context, height int64) error { return network.WaitForBlockWithCustomTimeout(_ctx, height, 5*time.Minute) } -func (network QGBNetwork) WaitForBlockWithCustomTimeout( +func (network BlobStreamNetwork) WaitForBlockWithCustomTimeout( _ctx context.Context, height int64, timeout time.Duration, @@ -415,7 +415,7 @@ func (network QGBNetwork) WaitForBlockWithCustomTimeout( // and for any nonce, but would require adding a new method to the querier. Don't think it is worth it now as // the number of valsets that will be signed is trivial and reaching 0 would be in no time). // Returns the height and the nonce of some attestation that the orchestrator signed. -func (network QGBNetwork) WaitForOrchestratorToStart(_ctx context.Context, dht *p2p.QgbDHT, evmAddr string) (uint64, uint64, error) { +func (network BlobStreamNetwork) WaitForOrchestratorToStart(_ctx context.Context, dht *p2p.BlobStreamDHT, evmAddr string) (uint64, uint64, error) { // create p2p querier p2pQuerier := p2p.NewQuerier(dht, network.Logger) @@ -473,7 +473,7 @@ func (network QGBNetwork) WaitForOrchestratorToStart(_ctx context.Context, dht * if err != nil { continue } - dataRootTupleRoot := qgbtypes.DataCommitmentTupleRootSignBytes(big.NewInt(int64(castedAtt.Nonce)), commitment) + dataRootTupleRoot := blobstreamtypes.DataCommitmentTupleRootSignBytes(big.NewInt(int64(castedAtt.Nonce)), commitment) dcConfirm, err := p2pQuerier.QueryDataCommitmentConfirmByEVMAddress(ctx, lastNonce-i, evmAddr, dataRootTupleRoot.Hex()) if err == nil && dcConfirm != nil { cancel() @@ -489,7 +489,7 @@ func (network QGBNetwork) WaitForOrchestratorToStart(_ctx context.Context, dht * // GetValsetContainingVals Gets the last valset that contains a certain number of validator. // This is used after enabling orchestrators not to sign unless they belong to some valset. // Thus, any nonce after the returned valset should be signed by all orchestrators. -func (network QGBNetwork) GetValsetContainingVals(_ctx context.Context, number int) (*types.Valset, error) { +func (network BlobStreamNetwork) GetValsetContainingVals(_ctx context.Context, number int) (*types.Valset, error) { appQuerier := rpc.NewAppQuerier(network.Logger, network.CelestiaGRPC, network.EncCfg) err := appQuerier.Start() if err != nil { @@ -530,12 +530,12 @@ func (network QGBNetwork) GetValsetContainingVals(_ctx context.Context, number i // GetValsetConfirm Returns the valset confirm for nonce `nonce` // signed by orchestrator whose EVM address is `evmAddr`. -func (network QGBNetwork) GetValsetConfirm( +func (network BlobStreamNetwork) GetValsetConfirm( _ctx context.Context, - dht *p2p.QgbDHT, + dht *p2p.BlobStreamDHT, nonce uint64, evmAddr string, -) (*qgbtypes.ValsetConfirm, error) { +) (*blobstreamtypes.ValsetConfirm, error) { p2pQuerier := p2p.NewQuerier(dht, network.Logger) // create app querier appQuerier := rpc.NewAppQuerier(network.Logger, network.CelestiaGRPC, network.EncCfg) @@ -583,12 +583,12 @@ func (network QGBNetwork) GetValsetConfirm( // GetDataCommitmentConfirm Returns the data commitment confirm for nonce `nonce` // signed by orchestrator whose EVM address is `evmAddr`. -func (network QGBNetwork) GetDataCommitmentConfirm( +func (network BlobStreamNetwork) GetDataCommitmentConfirm( _ctx context.Context, - dht *p2p.QgbDHT, + dht *p2p.BlobStreamDHT, nonce uint64, evmAddr string, -) (*qgbtypes.DataCommitmentConfirm, error) { +) (*blobstreamtypes.DataCommitmentConfirm, error) { // create p2p querier p2pQuerier := p2p.NewQuerier(dht, network.Logger) @@ -629,7 +629,7 @@ func (network QGBNetwork) GetDataCommitmentConfirm( if err != nil { continue } - dataRootTupleRoot := qgbtypes.DataCommitmentTupleRootSignBytes(big.NewInt(int64(nonce)), commitment) + dataRootTupleRoot := blobstreamtypes.DataCommitmentTupleRootSignBytes(big.NewInt(int64(nonce)), commitment) resp, err := p2pQuerier.QueryDataCommitmentConfirmByEVMAddress(ctx, nonce, evmAddr, dataRootTupleRoot.Hex()) if err == nil && resp != nil { cancel() @@ -643,12 +643,12 @@ func (network QGBNetwork) GetDataCommitmentConfirm( // GetDataCommitmentConfirmByHeight Returns the data commitment confirm that commits // to height `height` signed by orchestrator whose EVM address is `evmAddr`. -func (network QGBNetwork) GetDataCommitmentConfirmByHeight( +func (network BlobStreamNetwork) GetDataCommitmentConfirmByHeight( _ctx context.Context, - dht *p2p.QgbDHT, + dht *p2p.BlobStreamDHT, height uint64, evmAddr string, -) (*qgbtypes.DataCommitmentConfirm, error) { +) (*blobstreamtypes.DataCommitmentConfirm, error) { // create app querier appQuerier := rpc.NewAppQuerier(network.Logger, network.CelestiaGRPC, network.EncCfg) err := appQuerier.Start() @@ -669,7 +669,7 @@ func (network QGBNetwork) GetDataCommitmentConfirmByHeight( } // GetLatestAttestationNonce Returns the latest attestation nonce. -func (network QGBNetwork) GetLatestAttestationNonce(_ctx context.Context) (uint64, error) { +func (network BlobStreamNetwork) GetLatestAttestationNonce(_ctx context.Context) (uint64, error) { // create app querier appQuerier := rpc.NewAppQuerier(network.Logger, network.CelestiaGRPC, network.EncCfg) err := appQuerier.Start() @@ -686,9 +686,9 @@ func (network QGBNetwork) GetLatestAttestationNonce(_ctx context.Context) (uint6 } // WasAttestationSigned Returns true if the attestation confirm exist. -func (network QGBNetwork) WasAttestationSigned( +func (network BlobStreamNetwork) WasAttestationSigned( _ctx context.Context, - dht *p2p.QgbDHT, + dht *p2p.BlobStreamDHT, nonce uint64, evmAddress string, ) (bool, error) { @@ -745,7 +745,7 @@ func (network QGBNetwork) WasAttestationSigned( if err != nil { continue } - dataRootTupleRoot := qgbtypes.DataCommitmentTupleRootSignBytes(big.NewInt(int64(castedAtt.Nonce)), commitment) + dataRootTupleRoot := blobstreamtypes.DataCommitmentTupleRootSignBytes(big.NewInt(int64(castedAtt.Nonce)), commitment) resp, err := p2pQuerier.QueryDataCommitmentConfirmByEVMAddress( ctx, castedAtt.Nonce, @@ -763,14 +763,14 @@ func (network QGBNetwork) WasAttestationSigned( } } -func (network QGBNetwork) GetLatestDeployedQGBContract(_ctx context.Context) (*qgbwrapper.Wrappers, error) { - return network.GetLatestDeployedQGBContractWithCustomTimeout(_ctx, 5*time.Minute) +func (network BlobStreamNetwork) GetLatestDeployedBlobStreamContract(_ctx context.Context) (*blobstreamwrapper.Wrappers, error) { + return network.GetLatestDeployedBlobStreamContractWithCustomTimeout(_ctx, 5*time.Minute) } -func (network QGBNetwork) GetLatestDeployedQGBContractWithCustomTimeout( +func (network BlobStreamNetwork) GetLatestDeployedBlobStreamContractWithCustomTimeout( _ctx context.Context, timeout time.Duration, -) (*qgbwrapper.Wrappers, error) { +) (*blobstreamwrapper.Wrappers, error) { client, err := ethclient.Dial(network.EVMRPC) if err != nil { return nil, err @@ -786,7 +786,7 @@ func (network QGBNetwork) GetLatestDeployedQGBContractWithCustomTimeout( case <-ctx.Done(): cancel() if errors.Is(ctx.Err(), context.DeadlineExceeded) { - return nil, fmt.Errorf("timeout. couldn't find deployed qgb contract") + return nil, fmt.Errorf("timeout. couldn't find deployed blobstream contract") } return nil, ctx.Err() default: @@ -820,8 +820,8 @@ func (network QGBNetwork) GetLatestDeployedQGBContractWithCustomTimeout( if receipt.ContractAddress == (ethcommon.Address{}) { continue } - // If the bridge is loaded, then it's the latest-deployed proxy QGB contract - bridge, err := qgbwrapper.NewWrappers(receipt.ContractAddress, client) + // If the bridge is loaded, then it's the latest-deployed proxy BlobStream contract + bridge, err := blobstreamwrapper.NewWrappers(receipt.ContractAddress, client) if err != nil { continue } @@ -837,7 +837,7 @@ func (network QGBNetwork) GetLatestDeployedQGBContractWithCustomTimeout( } } -func (network QGBNetwork) WaitForRelayerToStart(_ctx context.Context, bridge *qgbwrapper.Wrappers) error { +func (network BlobStreamNetwork) WaitForRelayerToStart(_ctx context.Context, bridge *blobstreamwrapper.Wrappers) error { ctx, cancel := context.WithTimeout(_ctx, 2*time.Minute) for { select { @@ -862,7 +862,7 @@ func (network QGBNetwork) WaitForRelayerToStart(_ctx context.Context, bridge *qg } } -func (network QGBNetwork) WaitForEventNonce(ctx context.Context, bridge *qgbwrapper.Wrappers, n uint64) error { +func (network BlobStreamNetwork) WaitForEventNonce(ctx context.Context, bridge *blobstreamwrapper.Wrappers, n uint64) error { ctx, cancel := context.WithTimeout(ctx, 5*time.Minute) for { select { @@ -889,10 +889,10 @@ func (network QGBNetwork) WaitForEventNonce(ctx context.Context, bridge *qgbwrap } } -func (network QGBNetwork) UpdateDataCommitmentWindow(ctx context.Context, newWindow uint64) error { +func (network BlobStreamNetwork) UpdateDataCommitmentWindow(ctx context.Context, newWindow uint64) error { fmt.Printf("updating data commitment window %d\n", newWindow) kr, err := keyring.New( - "qgb-tests", + "blobstream-tests", "test", "celestia-app/core0", nil, @@ -901,13 +901,13 @@ func (network QGBNetwork) UpdateDataCommitmentWindow(ctx context.Context, newWin if err != nil { return err } - qgbGRPC, err := grpc.Dial("localhost:9090", grpc.WithTransportCredentials(insecure.NewCredentials())) + blobStreamGRPC, err := grpc.Dial("localhost:9090", grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { return err } - defer qgbGRPC.Close() + defer blobStreamGRPC.Close() - signer, err := user.SetupSingleSigner(ctx, kr, qgbGRPC, encoding.MakeConfig(app.ModuleEncodingRegisters...)) + signer, err := user.SetupSingleSigner(ctx, kr, blobStreamGRPC, encoding.MakeConfig(app.ModuleEncodingRegisters...)) if err != nil { return err } @@ -940,7 +940,7 @@ func (network QGBNetwork) UpdateDataCommitmentWindow(ctx context.Context, newWin } // query the proposal to get the id - gqc := v1.NewQueryClient(qgbGRPC) + gqc := v1.NewQueryClient(blobStreamGRPC) gresp, err := gqc.Proposals( ctx, &v1.QueryProposalsRequest{ @@ -983,13 +983,13 @@ func (network QGBNetwork) UpdateDataCommitmentWindow(ctx context.Context, newWin return nil } -func (network QGBNetwork) PrintLogs() { +func (network BlobStreamNetwork) PrintLogs() { _ = network.Instance. WithCommand([]string{"logs"}). Invoke() } -func (network QGBNetwork) GetLatestValset(ctx context.Context) (*types.Valset, error) { +func (network BlobStreamNetwork) GetLatestValset(ctx context.Context) (*types.Valset, error) { // create app querier appQuerier := rpc.NewAppQuerier(network.Logger, network.CelestiaGRPC, network.EncCfg) err := appQuerier.Start() @@ -1005,15 +1005,15 @@ func (network QGBNetwork) GetLatestValset(ctx context.Context) (*types.Valset, e return valset, nil } -func (network QGBNetwork) GetCurrentDataCommitmentWindow(ctx context.Context) (uint64, error) { +func (network BlobStreamNetwork) GetCurrentDataCommitmentWindow(ctx context.Context) (uint64, error) { var window uint64 queryFun := func() error { - qgbGRPC, err := grpc.Dial("localhost:9090", grpc.WithTransportCredentials(insecure.NewCredentials())) + blobStreamGRPC, err := grpc.Dial("localhost:9090", grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { return err } - defer qgbGRPC.Close() - bqc := types.NewQueryClient(qgbGRPC) + defer blobStreamGRPC.Close() + bqc := types.NewQueryClient(blobStreamGRPC) presp, err := bqc.Params(ctx, &types.QueryParamsRequest{}) if err != nil { return err diff --git a/e2e/relayer_test.go b/e2e/relayer_test.go index 7401cf50..776505a4 100644 --- a/e2e/relayer_test.go +++ b/e2e/relayer_test.go @@ -12,17 +12,17 @@ import ( "github.com/celestiaorg/orchestrator-relayer/evm" "github.com/celestiaorg/orchestrator-relayer/rpc" - qgbtesting "github.com/celestiaorg/orchestrator-relayer/testing" + blobstreamtesting "github.com/celestiaorg/orchestrator-relayer/testing" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/stretchr/testify/assert" ) func TestRelayerWithOneValidator(t *testing.T) { - if os.Getenv("QGB_INTEGRATION_TEST") != TRUE { - t.Skip("Skipping QGB integration tests") + if os.Getenv("BLOBSTREAM_INTEGRATION_TEST") != TRUE { + t.Skip("Skipping BlobStream integration tests") } - network, err := NewQGBNetwork() + network, err := NewBlobStreamNetwork() HandleNetworkError(t, network, err, false) // to release resources after tests @@ -40,7 +40,7 @@ func TestRelayerWithOneValidator(t *testing.T) { // create dht for querying bootstrapper, err := helpers.ParseAddrInfos(network.Logger, BOOTSTRAPPERS) HandleNetworkError(t, network, err, false) - host, _, dht := qgbtesting.NewTestDHT(ctx, bootstrapper) + host, _, dht := blobstreamtesting.NewTestDHT(ctx, bootstrapper) defer dht.Close() // force the connection to the DHT to start the orchestrator @@ -50,7 +50,7 @@ func TestRelayerWithOneValidator(t *testing.T) { _, _, err = network.WaitForOrchestratorToStart(ctx, dht, CORE0EVMADDRESS) HandleNetworkError(t, network, err, false) - bridge, err := network.GetLatestDeployedQGBContract(ctx) + bridge, err := network.GetLatestDeployedBlobStreamContract(ctx) HandleNetworkError(t, network, err, false) latestNonce, err := network.GetLatestAttestationNonce(ctx) @@ -69,11 +69,11 @@ func TestRelayerWithOneValidator(t *testing.T) { } func TestRelayerWithTwoValidators(t *testing.T) { - if os.Getenv("QGB_INTEGRATION_TEST") != TRUE { - t.Skip("Skipping QGB integration tests") + if os.Getenv("BLOBSTREAM_INTEGRATION_TEST") != TRUE { + t.Skip("Skipping BlobStream integration tests") } - network, err := NewQGBNetwork() + network, err := NewBlobStreamNetwork() HandleNetworkError(t, network, err, false) // to release resources after tests @@ -100,7 +100,7 @@ func TestRelayerWithTwoValidators(t *testing.T) { // create dht for querying bootstrapper, err := helpers.ParseAddrInfos(network.Logger, BOOTSTRAPPERS) HandleNetworkError(t, network, err, false) - host, _, dht := qgbtesting.NewTestDHT(ctx, bootstrapper) + host, _, dht := blobstreamtesting.NewTestDHT(ctx, bootstrapper) defer dht.Close() // force the connection to the DHT to start the orchestrator @@ -116,7 +116,7 @@ func TestRelayerWithTwoValidators(t *testing.T) { // give the orchestrators some time to catchup time.Sleep(time.Second) - bridge, err := network.GetLatestDeployedQGBContract(ctx) + bridge, err := network.GetLatestDeployedBlobStreamContract(ctx) HandleNetworkError(t, network, err, false) err = network.WaitForRelayerToStart(ctx, bridge) @@ -135,11 +135,11 @@ func TestRelayerWithTwoValidators(t *testing.T) { } func TestRelayerWithMultipleValidators(t *testing.T) { - if os.Getenv("QGB_INTEGRATION_TEST") != TRUE { - t.Skip("Skipping QGB integration tests") + if os.Getenv("BLOBSTREAM_INTEGRATION_TEST") != TRUE { + t.Skip("Skipping BlobStream integration tests") } - network, err := NewQGBNetwork() + network, err := NewBlobStreamNetwork() HandleNetworkError(t, network, err, false) // to release resources after tests @@ -158,7 +158,7 @@ func TestRelayerWithMultipleValidators(t *testing.T) { // create dht for querying bootstrapper, err := helpers.ParseAddrInfos(network.Logger, BOOTSTRAPPERS) HandleNetworkError(t, network, err, false) - host, _, dht := qgbtesting.NewTestDHT(ctx, bootstrapper) + host, _, dht := blobstreamtesting.NewTestDHT(ctx, bootstrapper) defer dht.Close() // force the connection to the DHT to start the orchestrator @@ -191,7 +191,7 @@ func TestRelayerWithMultipleValidators(t *testing.T) { assert.NoError(t, err) assert.Equal(t, 4, len(latestValset.Members)) - bridge, err := network.GetLatestDeployedQGBContract(ctx) + bridge, err := network.GetLatestDeployedBlobStreamContract(ctx) HandleNetworkError(t, network, err, false) err = network.WaitForRelayerToStart(ctx, bridge) @@ -207,11 +207,11 @@ func TestRelayerWithMultipleValidators(t *testing.T) { } func TestUpdatingTheDataCommitmentWindow(t *testing.T) { - if os.Getenv("QGB_INTEGRATION_TEST") != TRUE { - t.Skip("Skipping QGB integration tests") + if os.Getenv("BLOBSTREAM_INTEGRATION_TEST") != TRUE { + t.Skip("Skipping BlobStream integration tests") } - network, err := NewQGBNetwork() + network, err := NewBlobStreamNetwork() HandleNetworkError(t, network, err, false) // to release resources after tests @@ -245,7 +245,7 @@ func TestUpdatingTheDataCommitmentWindow(t *testing.T) { // create dht for querying bootstrapper, err := helpers.ParseAddrInfos(network.Logger, BOOTSTRAPPERS) HandleNetworkError(t, network, err, false) - host, _, dht := qgbtesting.NewTestDHT(ctx, bootstrapper) + host, _, dht := blobstreamtesting.NewTestDHT(ctx, bootstrapper) defer dht.Close() // force the connection to the DHT to start the orchestrator @@ -278,7 +278,7 @@ func TestUpdatingTheDataCommitmentWindow(t *testing.T) { assert.NoError(t, err) assert.Equal(t, 4, len(latestValset.Members)) - bridge, err := network.GetLatestDeployedQGBContract(ctx) + bridge, err := network.GetLatestDeployedBlobStreamContract(ctx) HandleNetworkError(t, network, err, false) err = network.WaitForRelayerToStart(ctx, bridge) diff --git a/e2e/scripts/deploy_qgb_contract.sh b/e2e/scripts/deploy_qgb_contract.sh index 12f025ef..e3dcdc18 100644 --- a/e2e/scripts/deploy_qgb_contract.sh +++ b/e2e/scripts/deploy_qgb_contract.sh @@ -1,11 +1,11 @@ #!/bin/bash -# This script deploys the QGB contract and outputs the address to stdout. +# This script deploys the BlobStream contract and outputs the address to stdout. # check whether to deploy a new contract or no need if [[ "${DEPLOY_NEW_CONTRACT}" != "true" ]] then - echo "no need to deploy a new QGB contract. exiting..." + echo "no need to deploy a new BlobStream contract. exiting..." exit 0 fi @@ -59,11 +59,11 @@ do done # import keys to deployer -/bin/qgb deploy keys evm import ecdsa "${PRIVATE_KEY}" --evm.passphrase=123 +/bin/bstream deploy keys evm import ecdsa "${PRIVATE_KEY}" --evm.passphrase=123 -echo "deploying QGB contract..." +echo "deploying BlobStream contract..." -/bin/qgb deploy \ +/bin/bstream deploy \ --evm.chain-id "${EVM_CHAIN_ID}" \ --evm.account "${EVM_ACCOUNT}" \ --core.grpc.host "${CORE_GRPC_HOST}" \ @@ -74,4 +74,4 @@ echo "deploying QGB contract..." echo $(cat /opt/output) -cat /opt/output | grep "deployed" | awk '{ print $5 }' | cut -f 2 -d = > /opt/qgb_address.txt +cat /opt/output | grep "deployed" | awk '{ print $5 }' | cut -f 2 -d = > /opt/blobstream_address.txt diff --git a/e2e/scripts/start_core0.sh b/e2e/scripts/start_core0.sh index 11b0d7b3..5e688ec9 100644 --- a/e2e/scripts/start_core0.sh +++ b/e2e/scripts/start_core0.sh @@ -33,7 +33,7 @@ fi VAL_ADDRESS=$(celestia-appd keys show core0 --keyring-backend test --bech=val --home /opt -a) # Register the validator EVM address - celestia-appd tx qgb register \ + celestia-appd tx blobstream register \ "${VAL_ADDRESS}" \ 0x966e6f22781EF6a6A82BBB4DB3df8E225DfD9488 \ --from core0 \ diff --git a/e2e/scripts/start_node_and_create_validator.sh b/e2e/scripts/start_node_and_create_validator.sh index 8fd3c09d..9533413f 100644 --- a/e2e/scripts/start_node_and_create_validator.sh +++ b/e2e/scripts/start_node_and_create_validator.sh @@ -64,7 +64,7 @@ fi done # Register the validator EVM address - celestia-appd tx qgb register \ + celestia-appd tx blobstream register \ "${VAL_ADDRESS}" \ "${EVM_ACCOUNT}" \ --from "${MONIKER}" \ diff --git a/e2e/scripts/start_orchestrator_after_validator_created.sh b/e2e/scripts/start_orchestrator_after_validator_created.sh index 930fd828..9b840207 100644 --- a/e2e/scripts/start_orchestrator_after_validator_created.sh +++ b/e2e/scripts/start_orchestrator_after_validator_created.sh @@ -36,18 +36,18 @@ do done # initialize orchestrator -/bin/qgb orch init +/bin/bstream orch init # add keys to keystore -/bin/qgb orch keys evm import ecdsa "${PRIVATE_KEY}" --evm.passphrase 123 +/bin/bstream orch keys evm import ecdsa "${PRIVATE_KEY}" --evm.passphrase 123 # start orchestrator if [[ -z "${P2P_BOOTSTRAPPERS}" ]] then # import the p2p key to use - /bin/qgb orchestrator keys p2p import key "${P2P_IDENTITY}" + /bin/bstream orchestrator keys p2p import key "${P2P_IDENTITY}" - /bin/qgb orchestrator start \ + /bin/bstream orchestrator start \ --evm.account="${EVM_ACCOUNT}" \ --core.rpc.host="${CORE_RPC_HOST}" \ --core.rpc.port="${CORE_RPC_PORT}" \ @@ -60,7 +60,7 @@ else # to give time for the bootstrappers to be up sleep 5s - /bin/qgb orchestrator start \ + /bin/bstream orchestrator start \ --evm.account="${EVM_ACCOUNT}" \ --core.rpc.host="${CORE_RPC_HOST}" \ --core.rpc.port="${CORE_RPC_PORT}" \ diff --git a/e2e/scripts/start_relayer.sh b/e2e/scripts/start_relayer.sh index 328e5669..61a87bee 100644 --- a/e2e/scripts/start_relayer.sh +++ b/e2e/scripts/start_relayer.sh @@ -1,7 +1,7 @@ #!/bin/bash -# This script runs the QGB relayer with the ability to deploy a new QGB contract or -# pass one as an environment variable QGB_CONTRACT +# This script runs the BlobStream relayer with the ability to deploy a new BlobStream contract or +# pass one as an environment variable BLOBSTREAM_CONTRACT # check if environment variables are set if [[ -z "${EVM_CHAIN_ID}" || -z "${PRIVATE_KEY}" ]] || \ @@ -34,26 +34,26 @@ done sleep 60s # check whether to deploy a new contract or use an existing one -if [[ -z "${QGB_CONTRACT}" ]] +if [[ -z "${BLOBSTREAM_CONTRACT}" ]] then export DEPLOY_NEW_CONTRACT=true export STARTING_NONCE=latest # expects the script to be mounted to this directory - /bin/bash /opt/deploy_qgb_contract.sh + /bin/bash /opt/deploy_blobstream_contract.sh fi -# get the address from the `qgb_address.txt` file -QGB_CONTRACT=$(cat /opt/qgb_address.txt) +# get the address from the `blobstream_address.txt` file +BLOBSTREAM_CONTRACT=$(cat /opt/blobstream_address.txt) # init the relayer -/bin/qgb relayer init +/bin/bstream relayer init # import keys to relayer -/bin/qgb relayer keys evm import ecdsa "${PRIVATE_KEY}" --evm.passphrase 123 +/bin/bstream relayer keys evm import ecdsa "${PRIVATE_KEY}" --evm.passphrase 123 # to give time for the bootstrappers to be up sleep 5s -/bin/qgb relayer start \ +/bin/bstream relayer start \ --evm.account="${EVM_ACCOUNT}" \ --core.rpc.host="${CORE_RPC_HOST}" \ --core.rpc.port="${CORE_RPC_PORT}" \ @@ -61,7 +61,7 @@ sleep 5s --core.grpc.port="${CORE_GRPC_PORT}" \ --evm.chain-id="${EVM_CHAIN_ID}" \ --evm.rpc="${EVM_ENDPOINT}" \ - --evm.contract-address="${QGB_CONTRACT}" \ + --evm.contract-address="${BLOBSTREAM_CONTRACT}" \ --p2p.bootstrappers="${P2P_BOOTSTRAPPERS}" \ --p2p.listen-addr="${P2P_LISTEN}" \ --evm.passphrase=123 diff --git a/e2e/test_commons.go b/e2e/test_commons.go index 1826592c..1a601bfa 100644 --- a/e2e/test_commons.go +++ b/e2e/test_commons.go @@ -15,7 +15,7 @@ import ( const TRUE = "true" -func HandleNetworkError(t *testing.T, network *QGBNetwork, err error, expectError bool) { +func HandleNetworkError(t *testing.T, network *BlobStreamNetwork, err error, expectError bool) { if expectError && err == nil { network.PrintLogs() assert.Error(t, err) @@ -31,7 +31,7 @@ func HandleNetworkError(t *testing.T, network *QGBNetwork, err error, expectErro } } -func ConnectToDHT(ctx context.Context, h host.Host, dht *p2p.QgbDHT, target peer.AddrInfo) error { +func ConnectToDHT(ctx context.Context, h host.Host, dht *p2p.BlobStreamDHT, target peer.AddrInfo) error { timeout := time.NewTimer(time.Minute) for { select { diff --git a/evm/ethereum_signature_test.go b/evm/ethereum_signature_test.go index 7f32be5b..9ddfcde4 100644 --- a/evm/ethereum_signature_test.go +++ b/evm/ethereum_signature_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/require" ) -// The signatures in these tests are generated using the foundry setup in the quantum-gravity-bridge repository. +// The signatures in these tests are generated using the foundry setup in the blobstream-contracts repository. func TestNewEthereumSignature(t *testing.T) { digest, err := hexutil.Decode("0x078c42ff72a01b355f9d76bfeecd2132a0d3f1aad9380870026c56e23e6d00e5") diff --git a/evm/evm_client.go b/evm/evm_client.go index 309f8ea9..795a00d5 100644 --- a/evm/evm_client.go +++ b/evm/evm_client.go @@ -15,7 +15,7 @@ import ( "github.com/celestiaorg/celestia-app/x/qgb/types" proxywrapper "github.com/celestiaorg/quantum-gravity-bridge/v2/wrappers/ERC1967Proxy.sol" - qgbwrapper "github.com/celestiaorg/quantum-gravity-bridge/v2/wrappers/QuantumGravityBridge.sol" + blobstreamwrapper "github.com/celestiaorg/quantum-gravity-bridge/v2/wrappers/QuantumGravityBridge.sol" "github.com/ethereum/go-ethereum/accounts/abi/bind" ) @@ -24,19 +24,19 @@ const DefaultEVMGasLimit = uint64(2500000) type Client struct { logger tmlog.Logger - Wrapper *qgbwrapper.Wrappers + Wrapper *blobstreamwrapper.Wrappers Ks *keystore.KeyStore Acc *accounts.Account EvmRPC string GasLimit uint64 } -// NewClient Creates a new EVM Client that can be used to deploy the QGB contract and +// NewClient Creates a new EVM Client that can be used to deploy the BlobStream contract and // interact with it. // The wrapper parameter can be nil when creating the client for contract deployment. func NewClient( logger tmlog.Logger, - wrapper *qgbwrapper.Wrappers, + wrapper *blobstreamwrapper.Wrappers, ks *keystore.KeyStore, acc *accounts.Account, evmRPC string, @@ -62,21 +62,21 @@ func (ec *Client) NewEthClient() (*ethclient.Client, error) { return ethClient, nil } -// DeployQGBContract Deploys the QGB contract and initializes it with the provided valset. +// DeployBlobStreamContract Deploys the BlobStream contract and initializes it with the provided valset. // The waitToBeMined, when set to true, will wait for the transaction to be included in a block, // and log relevant information. // The initBridge, when set to true, will assign the newly deployed bridge to the wrapper. This // can be used later for further interactions with the new contract. -// Multiple calls to DeployQGBContract with the initBridge flag set to true will overwrite everytime +// Multiple calls to DeployBlobStreamContract with the initBridge flag set to true will overwrite everytime // the bridge contract. -func (ec *Client) DeployQGBContract( +func (ec *Client) DeployBlobStreamContract( opts *bind.TransactOpts, contractBackend bind.ContractBackend, contractInitValset types.Valset, contractInitNonce uint64, initBridge bool, -) (gethcommon.Address, *coregethtypes.Transaction, *qgbwrapper.Wrappers, error) { - // deploy the QGB implementation contract +) (gethcommon.Address, *coregethtypes.Transaction, *blobstreamwrapper.Wrappers, error) { + // deploy the BlobStream implementation contract impAddr, impTx, _, err := ec.DeployImplementation(opts, contractBackend) if err != nil { return gethcommon.Address{}, nil, nil, err @@ -84,16 +84,16 @@ func (ec *Client) DeployQGBContract( ec.logger.Info("deploying QGB implementation contract...", "address", impAddr.Hex(), "tx_hash", impTx.Hash().Hex()) - // encode the QGB contract initialization data using the chain parameters + // encode the BlobStream contract initialization data using the chain parameters ethVsHash, err := contractInitValset.Hash() if err != nil { return gethcommon.Address{}, nil, nil, err } - qgbABI, err := qgbwrapper.WrappersMetaData.GetAbi() + blobStreamABI, err := blobstreamwrapper.WrappersMetaData.GetAbi() if err != nil { return gethcommon.Address{}, nil, nil, err } - initData, err := qgbABI.Pack("initialize", big.NewInt(int64(contractInitNonce)), big.NewInt(int64(contractInitValset.TwoThirdsThreshold())), ethVsHash) + initData, err := blobStreamABI.Pack("initialize", big.NewInt(int64(contractInitNonce)), big.NewInt(int64(contractInitValset.TwoThirdsThreshold())), ethVsHash) if err != nil { return gethcommon.Address{}, nil, nil, err } @@ -103,7 +103,7 @@ func (ec *Client) DeployQGBContract( opts.Nonce.Add(opts.Nonce, big.NewInt(1)) } - // deploy the ERC1967 proxy, link it to the QGB implementation contract, and initialize it + // deploy the ERC1967 proxy, link it to the BlobStream implementation contract, and initialize it proxyAddr, tx, _, err := ec.DeployERC1867Proxy(opts, contractBackend, impAddr, initData) if err != nil { return gethcommon.Address{}, nil, nil, err @@ -111,7 +111,7 @@ func (ec *Client) DeployQGBContract( ec.logger.Info("deploying QGB proxy contract...", "address", proxyAddr, "tx_hash", tx.Hash().Hex()) - bridge, err := qgbwrapper.NewWrappers(proxyAddr, contractBackend) + bridge, err := blobstreamwrapper.NewWrappers(proxyAddr, contractBackend) if err != nil { return gethcommon.Address{}, nil, nil, err } @@ -128,7 +128,7 @@ func (ec *Client) UpdateValidatorSet( opts *bind.TransactOpts, newNonce, newThreshHold uint64, currentValset, newValset types.Valset, - sigs []qgbwrapper.Signature, + sigs []blobstreamwrapper.Signature, ) (*coregethtypes.Transaction, error) { // TODO in addition to the nonce, log more interesting information ec.logger.Info("relaying valset", "nonce", newNonce) @@ -171,7 +171,7 @@ func (ec *Client) SubmitDataRootTupleRoot( tupleRoot gethcommon.Hash, newNonce uint64, currentValset types.Valset, - sigs []qgbwrapper.Signature, + sigs []blobstreamwrapper.Signature, ) (*coregethtypes.Transaction, error) { ethVals, err := ethValset(currentValset) if err != nil { @@ -236,10 +236,10 @@ func (ec *Client) WaitForTransaction( func (ec *Client) DeployImplementation(opts *bind.TransactOpts, backend bind.ContractBackend) ( gethcommon.Address, *coregethtypes.Transaction, - *qgbwrapper.Wrappers, + *blobstreamwrapper.Wrappers, error, ) { - return qgbwrapper.DeployWrappers( + return blobstreamwrapper.DeployWrappers( opts, backend, ) @@ -259,14 +259,14 @@ func (ec *Client) DeployERC1867Proxy( ) } -func ethValset(valset types.Valset) ([]qgbwrapper.Validator, error) { - ethVals := make([]qgbwrapper.Validator, len(valset.Members)) +func ethValset(valset types.Valset) ([]blobstreamwrapper.Validator, error) { + ethVals := make([]blobstreamwrapper.Validator, len(valset.Members)) for i, v := range valset.Members { if ok := gethcommon.IsHexAddress(v.EvmAddress); !ok { return nil, errors.New("invalid ethereum address found in validator set") } addr := gethcommon.HexToAddress(v.EvmAddress) - ethVals[i] = qgbwrapper.Validator{ + ethVals[i] = blobstreamwrapper.Validator{ Addr: addr, Power: big.NewInt(int64(v.Power)), } diff --git a/evm/evm_client_test.go b/evm/evm_client_test.go index cbf30592..299de5ee 100644 --- a/evm/evm_client_test.go +++ b/evm/evm_client_test.go @@ -15,7 +15,7 @@ import ( func (s *EVMTestSuite) TestSubmitDataCommitment() { // deploy a new bridge contract - _, _, _, err := s.Client.DeployQGBContract(s.Chain.Auth, s.Chain.Backend, *s.InitVs, 1, true) + _, _, _, err := s.Client.DeployBlobStreamContract(s.Chain.Auth, s.Chain.Backend, *s.InitVs, 1, true) s.NoError(err) // we just need something to sign over, it doesn't matter what @@ -72,7 +72,7 @@ func (s *EVMTestSuite) TestSubmitDataCommitment() { func (s *EVMTestSuite) TestUpdateValset() { // deploy a new bridge contract - _, _, _, err := s.Client.DeployQGBContract(s.Chain.Auth, s.Chain.Backend, *s.InitVs, 1, true) + _, _, _, err := s.Client.DeployBlobStreamContract(s.Chain.Auth, s.Chain.Backend, *s.InitVs, 1, true) s.NoError(err) updatedValset := celestiatypes.Valset{ diff --git a/evm/suite_test.go b/evm/suite_test.go index 634c1778..411e4d9c 100644 --- a/evm/suite_test.go +++ b/evm/suite_test.go @@ -9,7 +9,7 @@ import ( celestiatypes "github.com/celestiaorg/celestia-app/x/qgb/types" "github.com/celestiaorg/orchestrator-relayer/evm" - qgbtesting "github.com/celestiaorg/orchestrator-relayer/testing" + blobstreamtesting "github.com/celestiaorg/orchestrator-relayer/testing" ethcmn "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/stretchr/testify/require" @@ -18,7 +18,7 @@ import ( type EVMTestSuite struct { suite.Suite - Chain *qgbtesting.EVMChain + Chain *blobstreamtesting.EVMChain Client *evm.Client InitVs *celestiatypes.Valset VsPrivateKey *ecdsa.PrivateKey @@ -29,7 +29,7 @@ func (s *EVMTestSuite) SetupTest() { testPrivateKey, err := crypto.HexToECDSA("64a1d6f0e760a8d62b4afdde4096f16f51b401eaaecc915740f71770ea76a8ad") s.VsPrivateKey = testPrivateKey require.NoError(t, err) - s.Chain = qgbtesting.NewEVMChain(testPrivateKey) + s.Chain = blobstreamtesting.NewEVMChain(testPrivateKey) ks := keystore.NewKeyStore(t.TempDir(), keystore.LightScryptN, keystore.LightScryptP) acc, err := ks.ImportECDSA(testPrivateKey, "123") @@ -37,7 +37,7 @@ func (s *EVMTestSuite) SetupTest() { err = ks.Unlock(acc, "123") require.NoError(t, err) - s.Client = qgbtesting.NewEVMClient(ks, &acc) + s.Client = blobstreamtesting.NewEVMClient(ks, &acc) s.InitVs, err = celestiatypes.NewValset( 1, 10, diff --git a/orchestrator/broadcaster.go b/orchestrator/broadcaster.go index 3fd2debc..2d866b0d 100644 --- a/orchestrator/broadcaster.go +++ b/orchestrator/broadcaster.go @@ -9,23 +9,23 @@ import ( ) type Broadcaster struct { - QgbDHT *p2p.QgbDHT + BlobStreamDHT *p2p.BlobStreamDHT } -func NewBroadcaster(qgbDHT *p2p.QgbDHT) *Broadcaster { - return &Broadcaster{QgbDHT: qgbDHT} +func NewBroadcaster(blobStreamDHT *p2p.BlobStreamDHT) *Broadcaster { + return &Broadcaster{BlobStreamDHT: blobStreamDHT} } func (b Broadcaster) ProvideDataCommitmentConfirm(ctx context.Context, nonce uint64, confirm types.DataCommitmentConfirm, dataRootTupleRoot string) error { - if len(b.QgbDHT.RoutingTable().ListPeers()) == 0 { + if len(b.BlobStreamDHT.RoutingTable().ListPeers()) == 0 { return ErrEmptyPeersTable } - return b.QgbDHT.PutDataCommitmentConfirm(ctx, p2p.GetDataCommitmentConfirmKey(nonce, confirm.EthAddress, dataRootTupleRoot), confirm) + return b.BlobStreamDHT.PutDataCommitmentConfirm(ctx, p2p.GetDataCommitmentConfirmKey(nonce, confirm.EthAddress, dataRootTupleRoot), confirm) } func (b Broadcaster) ProvideValsetConfirm(ctx context.Context, nonce uint64, confirm types.ValsetConfirm, signBytes string) error { - if len(b.QgbDHT.RoutingTable().ListPeers()) == 0 { + if len(b.BlobStreamDHT.RoutingTable().ListPeers()) == 0 { return ErrEmptyPeersTable } - return b.QgbDHT.PutValsetConfirm(ctx, p2p.GetValsetConfirmKey(nonce, confirm.EthAddress, signBytes), confirm) + return b.BlobStreamDHT.PutValsetConfirm(ctx, p2p.GetValsetConfirmKey(nonce, confirm.EthAddress, signBytes), confirm) } diff --git a/orchestrator/broadcaster_test.go b/orchestrator/broadcaster_test.go index edc733bd..b53a01b3 100644 --- a/orchestrator/broadcaster_test.go +++ b/orchestrator/broadcaster_test.go @@ -17,7 +17,7 @@ import ( "github.com/celestiaorg/orchestrator-relayer/orchestrator" "github.com/celestiaorg/orchestrator-relayer/p2p" - qgbtesting "github.com/celestiaorg/orchestrator-relayer/testing" + blobstreamtesting "github.com/celestiaorg/orchestrator-relayer/testing" "github.com/celestiaorg/orchestrator-relayer/types" "github.com/stretchr/testify/assert" ) @@ -28,7 +28,7 @@ var ( ) func TestBroadcastDataCommitmentConfirm(t *testing.T) { - network := qgbtesting.NewDHTNetwork(context.Background(), 4) + network := blobstreamtesting.NewDHTNetwork(context.Background(), 4) defer network.Stop() ks := keystore.NewKeyStore(t.TempDir(), keystore.LightScryptN, keystore.LightScryptP) @@ -64,7 +64,7 @@ func TestBroadcastDataCommitmentConfirm(t *testing.T) { } func TestBroadcastValsetConfirm(t *testing.T) { - network := qgbtesting.NewDHTNetwork(context.Background(), 4) + network := blobstreamtesting.NewDHTNetwork(context.Background(), 4) defer network.Stop() ks := keystore.NewKeyStore(t.TempDir(), keystore.LightScryptN, keystore.LightScryptP) @@ -100,8 +100,8 @@ func TestBroadcastValsetConfirm(t *testing.T) { // TestEmptyPeersTable tests that values are not broadcasted if the DHT peers // table is empty. func TestEmptyPeersTable(t *testing.T) { - _, _, dht := qgbtesting.NewTestDHT(context.Background(), nil) - defer func(dht *p2p.QgbDHT) { + _, _, dht := blobstreamtesting.NewTestDHT(context.Background(), nil) + defer func(dht *p2p.BlobStreamDHT) { err := dht.Close() if err != nil { require.NoError(t, err) diff --git a/orchestrator/orchestrator.go b/orchestrator/orchestrator.go index ec05dc0f..b13ec902 100644 --- a/orchestrator/orchestrator.go +++ b/orchestrator/orchestrator.go @@ -306,7 +306,7 @@ func (orch Orchestrator) Process(ctx context.Context, nonce uint64) error { // if nonce == 1, then, the current valset should sign the confirm. // In fact, the first nonce should never be signed. Because, the first attestation, in the case // where the `earliest` flag is specified when deploying the contract, will be relayed as part of - // the deployment of the QGB contract. + // the deployment of the BlobStream contract. // It will be signed temporarily for now. previousValset, err = orch.AppQuerier.QueryValsetByNonce(ctx, att.GetNonce()) if err != nil { diff --git a/orchestrator/suite_test.go b/orchestrator/suite_test.go index 95c0c1c7..01f0cbd0 100644 --- a/orchestrator/suite_test.go +++ b/orchestrator/suite_test.go @@ -9,13 +9,13 @@ import ( "github.com/celestiaorg/celestia-app/test/util/testnode" "github.com/celestiaorg/celestia-app/x/qgb/types" "github.com/celestiaorg/orchestrator-relayer/orchestrator" - qgbtesting "github.com/celestiaorg/orchestrator-relayer/testing" + blobstreamtesting "github.com/celestiaorg/orchestrator-relayer/testing" "github.com/stretchr/testify/suite" ) type OrchestratorTestSuite struct { suite.Suite - Node *qgbtesting.TestNode + Node *blobstreamtesting.TestNode Orchestrator *orchestrator.Orchestrator } @@ -23,14 +23,14 @@ func (s *OrchestratorTestSuite) SetupSuite() { t := s.T() ctx := context.Background() codec := encoding.MakeConfig(app.ModuleEncodingRegisters...).Codec - s.Node = qgbtesting.NewTestNode( + s.Node = blobstreamtesting.NewTestNode( ctx, t, testnode.ImmediateProposals(codec), - qgbtesting.SetDataCommitmentWindowParams(codec, types.Params{DataCommitmentWindow: 101}), - // qgbtesting.SetVotingParams(codec, v1beta1.VotingParams{VotingPeriod: 100 * time.Hour}), + blobstreamtesting.SetDataCommitmentWindowParams(codec, types.Params{DataCommitmentWindow: 101}), + // blobstreamtesting.SetVotingParams(codec, v1beta1.VotingParams{VotingPeriod: 100 * time.Hour}), ) - s.Orchestrator = qgbtesting.NewOrchestrator(t, s.Node) + s.Orchestrator = blobstreamtesting.NewOrchestrator(t, s.Node) } func (s *OrchestratorTestSuite) TearDownSuite() { diff --git a/p2p/dht.go b/p2p/dht.go index 9a4fbbdc..75a46c95 100644 --- a/p2p/dht.go +++ b/p2p/dht.go @@ -14,21 +14,21 @@ import ( ) const ( - ProtocolPrefix = "/qgb/0.1.0" // TODO "/qgb/" ? + ProtocolPrefix = "/blobstream/0.1.0" // TODO "/blobstream/" ? DataCommitmentConfirmNamespace = "dcc" ValsetConfirmNamespace = "vc" ) -// QgbDHT wrapper around the `IpfsDHT` implementation. +// BlobStreamDHT wrapper around the `IpfsDHT` implementation. // Used to add helper methods to easily handle the DHT. -type QgbDHT struct { +type BlobStreamDHT struct { *dht.IpfsDHT logger tmlog.Logger } -// NewQgbDHT create a new IPFS DHT using a suitable configuration for the QGB. +// NewBlobStreamDHT create a new IPFS DHT using a suitable configuration for the BlobStream. // If nil is passed for bootstrappers, the DHT will not try to connect to any existing peer. -func NewQgbDHT(ctx context.Context, h host.Host, store ds.Batching, bootstrappers []peer.AddrInfo, logger tmlog.Logger) (*QgbDHT, error) { +func NewBlobStreamDHT(ctx context.Context, h host.Host, store ds.Batching, bootstrappers []peer.AddrInfo, logger tmlog.Logger) (*BlobStreamDHT, error) { // this value is set to 23 days, which is the unbonding period. // we want to have the signatures available for this whole period. providers.ProvideValidity = time.Hour * 24 * 23 @@ -48,7 +48,7 @@ func NewQgbDHT(ctx context.Context, h host.Host, store ds.Batching, bootstrapper return nil, err } - return &QgbDHT{ + return &BlobStreamDHT{ IpfsDHT: router, logger: logger, }, nil @@ -57,7 +57,7 @@ func NewQgbDHT(ctx context.Context, h host.Host, store ds.Batching, bootstrapper // WaitForPeers waits for peers to be connected to the DHT. // Returns nil if the context is done or the peers list has more peers than the specified peersThreshold. // Returns error if it times out. -func (q QgbDHT) WaitForPeers(ctx context.Context, timeout time.Duration, rate time.Duration, peersThreshold int) error { +func (q BlobStreamDHT) WaitForPeers(ctx context.Context, timeout time.Duration, rate time.Duration, peersThreshold int) error { if peersThreshold < 1 { return ErrPeersThresholdCannotBeNegative } @@ -101,7 +101,7 @@ func (q QgbDHT) WaitForPeers(ctx context.Context, timeout time.Duration, rate ti // PutDataCommitmentConfirm encodes a data commitment confirm then puts its value to the DHT. // The key can be generated using the `GetDataCommitmentConfirmKey` method. // Returns an error if it fails to do so. -func (q QgbDHT) PutDataCommitmentConfirm(ctx context.Context, key string, dcc types.DataCommitmentConfirm) error { +func (q BlobStreamDHT) PutDataCommitmentConfirm(ctx context.Context, key string, dcc types.DataCommitmentConfirm) error { encodedData, err := types.MarshalDataCommitmentConfirm(dcc) if err != nil { return err @@ -116,7 +116,7 @@ func (q QgbDHT) PutDataCommitmentConfirm(ctx context.Context, key string, dcc ty // GetDataCommitmentConfirm looks for a data commitment confirm referenced by its key in the DHT. // The key can be generated using the `GetDataCommitmentConfirmKey` method. // Returns an error if it fails to get the confirm. -func (q QgbDHT) GetDataCommitmentConfirm(ctx context.Context, key string) (types.DataCommitmentConfirm, error) { +func (q BlobStreamDHT) GetDataCommitmentConfirm(ctx context.Context, key string) (types.DataCommitmentConfirm, error) { encodedConfirm, err := q.GetValue(ctx, key) // this is a blocking call, we should probably use timeout and channel if err != nil { return types.DataCommitmentConfirm{}, err @@ -131,7 +131,7 @@ func (q QgbDHT) GetDataCommitmentConfirm(ctx context.Context, key string) (types // PutValsetConfirm encodes a valset confirm then puts its value to the DHT. // The key can be generated using the `GetValsetConfirmKey` method. // Returns an error if it fails to do so. -func (q QgbDHT) PutValsetConfirm(ctx context.Context, key string, vc types.ValsetConfirm) error { +func (q BlobStreamDHT) PutValsetConfirm(ctx context.Context, key string, vc types.ValsetConfirm) error { encodedData, err := types.MarshalValsetConfirm(vc) if err != nil { return err @@ -146,7 +146,7 @@ func (q QgbDHT) PutValsetConfirm(ctx context.Context, key string, vc types.Valse // GetValsetConfirm looks for a valset confirm referenced by its key in the DHT. // The key can be generated using the `GetValsetConfirmKey` method. // Returns an error if it fails to get the confirm. -func (q QgbDHT) GetValsetConfirm(ctx context.Context, key string) (types.ValsetConfirm, error) { +func (q BlobStreamDHT) GetValsetConfirm(ctx context.Context, key string) (types.ValsetConfirm, error) { encodedConfirm, err := q.GetValue(ctx, key) // this is a blocking call, we should probably use timeout and channel if err != nil { return types.ValsetConfirm{}, err diff --git a/p2p/dht_test.go b/p2p/dht_test.go index dac49c45..9ebfcecc 100644 --- a/p2p/dht_test.go +++ b/p2p/dht_test.go @@ -15,7 +15,7 @@ import ( ethcrypto "github.com/ethereum/go-ethereum/crypto" "github.com/celestiaorg/orchestrator-relayer/p2p" - qgbtesting "github.com/celestiaorg/orchestrator-relayer/testing" + blobstreamtesting "github.com/celestiaorg/orchestrator-relayer/testing" "github.com/celestiaorg/orchestrator-relayer/types" "github.com/libp2p/go-libp2p/core/peer" "github.com/stretchr/testify/assert" @@ -30,11 +30,11 @@ var ( func TestDHTBootstrappers(t *testing.T) { ctx := context.Background() // create first dht - h1, _, dht1 := qgbtesting.NewTestDHT(ctx, nil) + h1, _, dht1 := blobstreamtesting.NewTestDHT(ctx, nil) defer dht1.Close() // create second dht with dht1 being a bootstrapper - h2, _, dht2 := qgbtesting.NewTestDHT( + h2, _, dht2 := blobstreamtesting.NewTestDHT( ctx, []peer.AddrInfo{{ ID: h1.ID(), @@ -58,7 +58,7 @@ func TestDHTBootstrappers(t *testing.T) { } func TestPutDataCommitmentConfirm(t *testing.T) { - network := qgbtesting.NewDHTNetwork(context.Background(), 2) + network := blobstreamtesting.NewDHTNetwork(context.Background(), 2) defer network.Stop() ks := keystore.NewKeyStore(t.TempDir(), keystore.LightScryptN, keystore.LightScryptP) @@ -96,7 +96,7 @@ func TestPutDataCommitmentConfirm(t *testing.T) { } func TestNetworkPutDataCommitmentConfirm(t *testing.T) { - network := qgbtesting.NewDHTNetwork(context.Background(), 10) + network := blobstreamtesting.NewDHTNetwork(context.Background(), 10) defer network.Stop() ks := keystore.NewKeyStore(t.TempDir(), keystore.LightScryptN, keystore.LightScryptP) @@ -134,7 +134,7 @@ func TestNetworkPutDataCommitmentConfirm(t *testing.T) { } func TestNetworkGetNonExistentDataCommitmentConfirm(t *testing.T) { - network := qgbtesting.NewDHTNetwork(context.Background(), 10) + network := blobstreamtesting.NewDHTNetwork(context.Background(), 10) defer network.Stop() // generate a test key for the DataCommitmentConfirm @@ -147,7 +147,7 @@ func TestNetworkGetNonExistentDataCommitmentConfirm(t *testing.T) { } func TestPutValsetConfirm(t *testing.T) { - network := qgbtesting.NewDHTNetwork(context.Background(), 2) + network := blobstreamtesting.NewDHTNetwork(context.Background(), 2) defer network.Stop() ks := keystore.NewKeyStore(t.TempDir(), keystore.LightScryptN, keystore.LightScryptP) @@ -182,7 +182,7 @@ func TestPutValsetConfirm(t *testing.T) { } func TestNetworkPutValsetConfirm(t *testing.T) { - network := qgbtesting.NewDHTNetwork(context.Background(), 10) + network := blobstreamtesting.NewDHTNetwork(context.Background(), 10) defer network.Stop() ks := keystore.NewKeyStore(t.TempDir(), keystore.LightScryptN, keystore.LightScryptP) @@ -217,7 +217,7 @@ func TestNetworkPutValsetConfirm(t *testing.T) { } func TestNetworkGetNonExistentValsetConfirm(t *testing.T) { - network := qgbtesting.NewDHTNetwork(context.Background(), 10) + network := blobstreamtesting.NewDHTNetwork(context.Background(), 10) defer network.Stop() // generate a test key for the ValsetConfirm @@ -232,7 +232,7 @@ func TestNetworkGetNonExistentValsetConfirm(t *testing.T) { func TestWaitForPeers(t *testing.T) { ctx := context.Background() // create first dht - h1, _, dht1 := qgbtesting.NewTestDHT(ctx, nil) + h1, _, dht1 := blobstreamtesting.NewTestDHT(ctx, nil) defer dht1.Close() // wait for peers @@ -241,7 +241,7 @@ func TestWaitForPeers(t *testing.T) { assert.Error(t, err) // create second dht - h2, _, dht2 := qgbtesting.NewTestDHT(ctx, nil) + h2, _, dht2 := blobstreamtesting.NewTestDHT(ctx, nil) defer dht2.Close() // connect to first dht err = h2.Connect(ctx, peer.AddrInfo{ diff --git a/p2p/keys.go b/p2p/keys.go index ae543767..8f5c35e6 100644 --- a/p2p/keys.go +++ b/p2p/keys.go @@ -11,7 +11,7 @@ import ( // - nonce: in hex format // - evm address: the 0x prefixed orchestrator EVM address in hex format // - data root tuple root: is the digest, in a 0x prefixed hex format, that is signed over for a -// data commitment and whose signature is relayed to the QGB smart contract. +// data commitment and whose signature is relayed to the BlobStream smart contract. // Expects the EVM address to be a correct address. func GetDataCommitmentConfirmKey(nonce uint64, evmAddr string, dataRootTupleRoot string) string { return "/" + DataCommitmentConfirmNamespace + "/" + @@ -24,7 +24,7 @@ func GetDataCommitmentConfirmKey(nonce uint64, evmAddr string, dataRootTupleRoot // - nonce: in hex format // - evm address: the orchestrator EVM address in hex format // - sign bytes: is the digest, in a 0x prefixed hex format, that is signed over for a valset and -// whose signature is relayed to the QGB smart contract. +// whose signature is relayed to the BlobStream smart contract. // Expects the EVM address to be a correct address. func GetValsetConfirmKey(nonce uint64, evmAddr string, signBytes string) string { return "/" + ValsetConfirmNamespace + "/" + diff --git a/p2p/querier.go b/p2p/querier.go index cab93f1d..8ff880ce 100644 --- a/p2p/querier.go +++ b/p2p/querier.go @@ -16,14 +16,14 @@ import ( // Querier used to query the DHT for confirms. type Querier struct { - QgbDHT *QgbDHT - logger tmlog.Logger + BlobStreamDHT *BlobStreamDHT + logger tmlog.Logger } -func NewQuerier(qgbDht *QgbDHT, logger tmlog.Logger) *Querier { +func NewQuerier(blobStreamDht *BlobStreamDHT, logger tmlog.Logger) *Querier { return &Querier{ - QgbDHT: qgbDht, - logger: logger, + BlobStreamDHT: blobStreamDht, + logger: logger, } } @@ -246,7 +246,7 @@ func (q Querier) QueryValsetConfirmByEVMAddress( address string, signBytes string, ) (*types.ValsetConfirm, error) { - confirm, err := q.QgbDHT.GetValsetConfirm( + confirm, err := q.BlobStreamDHT.GetValsetConfirm( ctx, GetValsetConfirmKey(nonce, address, signBytes), ) @@ -264,7 +264,7 @@ func (q Querier) QueryValsetConfirmByEVMAddress( // and signed by the orchestrator whose EVM address is `address`. // Returns (nil, nil) if the confirm is not found func (q Querier) QueryDataCommitmentConfirmByEVMAddress(ctx context.Context, nonce uint64, address string, dataRootTupleRoot string) (*types.DataCommitmentConfirm, error) { - confirm, err := q.QgbDHT.GetDataCommitmentConfirm( + confirm, err := q.BlobStreamDHT.GetDataCommitmentConfirm( ctx, GetDataCommitmentConfirmKey(nonce, address, dataRootTupleRoot), ) @@ -283,7 +283,7 @@ func (q Querier) QueryDataCommitmentConfirmByEVMAddress(ctx context.Context, non func (q Querier) QueryDataCommitmentConfirms(ctx context.Context, valset celestiatypes.Valset, nonce uint64, dataRootTupleRoot string) ([]types.DataCommitmentConfirm, error) { confirms := make([]types.DataCommitmentConfirm, 0) for _, member := range valset.Members { - confirm, err := q.QgbDHT.GetDataCommitmentConfirm( + confirm, err := q.BlobStreamDHT.GetDataCommitmentConfirm( ctx, GetDataCommitmentConfirmKey(nonce, member.EvmAddress, dataRootTupleRoot), ) @@ -304,7 +304,7 @@ func (q Querier) QueryDataCommitmentConfirms(ctx context.Context, valset celesti func (q Querier) QueryValsetConfirms(ctx context.Context, nonce uint64, valset celestiatypes.Valset, signBytes string) ([]types.ValsetConfirm, error) { confirms := make([]types.ValsetConfirm, 0) for _, member := range valset.Members { - confirm, err := q.QgbDHT.GetValsetConfirm( + confirm, err := q.BlobStreamDHT.GetValsetConfirm( ctx, GetValsetConfirmKey(nonce, member.EvmAddress, signBytes), ) diff --git a/p2p/querier_test.go b/p2p/querier_test.go index bd1c7070..fa2af3c9 100644 --- a/p2p/querier_test.go +++ b/p2p/querier_test.go @@ -14,7 +14,7 @@ import ( celestiatypes "github.com/celestiaorg/celestia-app/x/qgb/types" "github.com/celestiaorg/orchestrator-relayer/p2p" - qgbtesting "github.com/celestiaorg/orchestrator-relayer/testing" + blobstreamtesting "github.com/celestiaorg/orchestrator-relayer/testing" "github.com/celestiaorg/orchestrator-relayer/types" "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/assert" @@ -33,7 +33,7 @@ var ( func TestQueryTwoThirdsDataCommitmentConfirms(t *testing.T) { ctx := context.Background() - network := qgbtesting.NewDHTNetwork(ctx, 2) + network := blobstreamtesting.NewDHTNetwork(ctx, 2) defer network.Stop() vsNonce := uint64(2) @@ -152,7 +152,7 @@ func TestQueryTwoThirdsDataCommitmentConfirms(t *testing.T) { func TestQueryTwoThirdsValsetConfirms(t *testing.T) { ctx := context.Background() - network := qgbtesting.NewDHTNetwork(ctx, 2) + network := blobstreamtesting.NewDHTNetwork(ctx, 2) defer network.Stop() vsNonce := uint64(2) @@ -279,7 +279,7 @@ func TestQueryTwoThirdsValsetConfirms(t *testing.T) { func TestQueryValsetConfirmByEVMAddress(t *testing.T) { ctx := context.Background() - network := qgbtesting.NewDHTNetwork(ctx, 2) + network := blobstreamtesting.NewDHTNetwork(ctx, 2) defer network.Stop() vsNonce := uint64(10) @@ -320,7 +320,7 @@ func TestQueryValsetConfirmByEVMAddress(t *testing.T) { func TestQueryDataCommitmentConfirmByEVMAddress(t *testing.T) { ctx := context.Background() - network := qgbtesting.NewDHTNetwork(ctx, 2) + network := blobstreamtesting.NewDHTNetwork(ctx, 2) defer network.Stop() dcNonce := uint64(10) @@ -362,7 +362,7 @@ func TestQueryDataCommitmentConfirmByEVMAddress(t *testing.T) { func TestQueryValsetConfirms(t *testing.T) { ctx := context.Background() - network := qgbtesting.NewDHTNetwork(ctx, 2) + network := blobstreamtesting.NewDHTNetwork(ctx, 2) defer network.Stop() vsNonce := uint64(2) @@ -444,7 +444,7 @@ func TestQueryValsetConfirms(t *testing.T) { func TestQueryDataCommitmentConfirms(t *testing.T) { ctx := context.Background() - network := qgbtesting.NewDHTNetwork(ctx, 2) + network := blobstreamtesting.NewDHTNetwork(ctx, 2) defer network.Stop() dcNonce := uint64(2) diff --git a/relayer/relayer.go b/relayer/relayer.go index 2bb04d31..6f388a82 100644 --- a/relayer/relayer.go +++ b/relayer/relayer.go @@ -327,7 +327,7 @@ func (r *Relayer) SaveDataCommitmentSignaturesToStore(ctx context.Context, att c } // matchAttestationConfirmSigs matches and sorts the confirm signatures with the valset -// members as expected by the QGB contract. +// members as expected by the BlobStream contract. // Also, it leaves the non provided signatures as nil in the `sigs` slice: // https://github.com/celestiaorg/celestia-app/issues/628 func matchAttestationConfirmSigs( @@ -335,7 +335,7 @@ func matchAttestationConfirmSigs( currentValset celestiatypes.Valset, ) ([]wrapper.Signature, error) { sigs := make([]wrapper.Signature, len(currentValset.Members)) - // the QGB contract expects the signatures to be ordered by validators in valset + // the BlobStream contract expects the signatures to be ordered by validators in valset for i, val := range currentValset.Members { sig, has := signatures[val.EvmAddress] if !has { diff --git a/relayer/relayer_test.go b/relayer/relayer_test.go index e9fcb8ac..1b35a4fa 100644 --- a/relayer/relayer_test.go +++ b/relayer/relayer_test.go @@ -8,7 +8,7 @@ import ( "github.com/celestiaorg/orchestrator-relayer/p2p" "github.com/ipfs/go-datastore" - qgbtypes "github.com/celestiaorg/orchestrator-relayer/types" + blobstreamtypes "github.com/celestiaorg/orchestrator-relayer/types" "github.com/stretchr/testify/assert" @@ -27,7 +27,7 @@ func (s *RelayerTestSuite) TestProcessAttestation() { att := types.NewDataCommitment(latestValset.Nonce+1, 10, 100, time.Now()) commitment, err := s.Orchestrator.TmQuerier.QueryCommitment(ctx, att.BeginBlock, att.EndBlock) require.NoError(t, err) - dataRootTupleRoot := qgbtypes.DataCommitmentTupleRootSignBytes(big.NewInt(int64(att.Nonce)), commitment) + dataRootTupleRoot := blobstreamtypes.DataCommitmentTupleRootSignBytes(big.NewInt(int64(att.Nonce)), commitment) err = s.Orchestrator.ProcessDataCommitmentEvent(ctx, *att, dataRootTupleRoot) require.NoError(t, err) diff --git a/relayer/suite_test.go b/relayer/suite_test.go index 95e3f41d..b84a51a9 100644 --- a/relayer/suite_test.go +++ b/relayer/suite_test.go @@ -8,14 +8,14 @@ import ( "github.com/celestiaorg/orchestrator-relayer/orchestrator" "github.com/celestiaorg/orchestrator-relayer/relayer" - qgbtesting "github.com/celestiaorg/orchestrator-relayer/testing" + blobstreamtesting "github.com/celestiaorg/orchestrator-relayer/testing" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" ) type RelayerTestSuite struct { suite.Suite - Node *qgbtesting.TestNode + Node *blobstreamtesting.TestNode Orchestrator *orchestrator.Orchestrator Relayer *relayer.Relayer } @@ -26,15 +26,15 @@ func (s *RelayerTestSuite) SetupSuite() { t.Skip("skipping relayer tests in short mode.") } ctx := context.Background() - s.Node = qgbtesting.NewTestNode(ctx, t) + s.Node = blobstreamtesting.NewTestNode(ctx, t) _, err := s.Node.CelestiaNetwork.WaitForHeight(2) require.NoError(t, err) - s.Orchestrator = qgbtesting.NewOrchestrator(t, s.Node) - s.Relayer = qgbtesting.NewRelayer(t, s.Node) + s.Orchestrator = blobstreamtesting.NewOrchestrator(t, s.Node) + s.Relayer = blobstreamtesting.NewRelayer(t, s.Node) go s.Node.EVMChain.PeriodicCommit(ctx, time.Millisecond) initVs, err := s.Relayer.AppQuerier.QueryLatestValset(s.Node.Context) require.NoError(t, err) - _, _, _, err = s.Relayer.EVMClient.DeployQGBContract(s.Node.EVMChain.Auth, s.Node.EVMChain.Backend, *initVs, initVs.Nonce, true) + _, _, _, err = s.Relayer.EVMClient.DeployBlobStreamContract(s.Node.EVMChain.Auth, s.Node.EVMChain.Backend, *initVs, initVs.Nonce, true) require.NoError(t, err) } diff --git a/rpc/app_querier.go b/rpc/app_querier.go index 9b340b7a..c77ebaa2 100644 --- a/rpc/app_querier.go +++ b/rpc/app_querier.go @@ -16,23 +16,23 @@ import ( // AppQuerier queries the application for attestations and unbonding periods. type AppQuerier struct { - qgbRPC string - clientConn *grpc.ClientConn - Logger tmlog.Logger - EncCfg encoding.Config + blobStreamRPC string + clientConn *grpc.ClientConn + Logger tmlog.Logger + EncCfg encoding.Config } -func NewAppQuerier(logger tmlog.Logger, qgbRPC string, encCft encoding.Config) *AppQuerier { - return &AppQuerier{Logger: logger, qgbRPC: qgbRPC, EncCfg: encCft} +func NewAppQuerier(logger tmlog.Logger, blobStreamRPC string, encCft encoding.Config) *AppQuerier { + return &AppQuerier{Logger: logger, blobStreamRPC: blobStreamRPC, EncCfg: encCft} } func (aq *AppQuerier) Start() error { // creating a grpc connection to Celestia-app - qgbGRPC, err := grpc.Dial(aq.qgbRPC, grpc.WithTransportCredentials(insecure.NewCredentials())) + blobStreamGRPC, err := grpc.Dial(aq.blobStreamRPC, grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { return err } - aq.clientConn = qgbGRPC + aq.clientConn = blobStreamGRPC return nil } @@ -106,7 +106,7 @@ func (aq *AppQuerier) QueryDataCommitmentForHeight(ctx context.Context, height u return resp.DataCommitment, nil } -// QueryLatestDataCommitment query the latest data commitment in QGB state machine. +// QueryLatestDataCommitment query the latest data commitment in BlobStream state machine. func (aq *AppQuerier) QueryLatestDataCommitment(ctx context.Context) (*celestiatypes.DataCommitment, error) { queryClient := celestiatypes.NewQueryClient(aq.clientConn) resp, err := queryClient.LatestDataCommitment(ctx, &celestiatypes.QueryLatestDataCommitmentRequest{}) diff --git a/rpc/suite_test.go b/rpc/suite_test.go index e0846514..9fbc055c 100644 --- a/rpc/suite_test.go +++ b/rpc/suite_test.go @@ -11,13 +11,13 @@ import ( "github.com/stretchr/testify/require" - qgbtesting "github.com/celestiaorg/orchestrator-relayer/testing" + blobstreamtesting "github.com/celestiaorg/orchestrator-relayer/testing" "github.com/stretchr/testify/suite" ) type QuerierTestSuite struct { suite.Suite - Network *qgbtesting.CelestiaNetwork + Network *blobstreamtesting.CelestiaNetwork EncConf encoding.Config Logger tmlog.Logger } @@ -25,7 +25,7 @@ type QuerierTestSuite struct { func (s *QuerierTestSuite) SetupSuite() { t := s.T() ctx := context.Background() - s.Network = qgbtesting.NewCelestiaNetwork(ctx, t) + s.Network = blobstreamtesting.NewCelestiaNetwork(ctx, t) _, err := s.Network.WaitForHeightWithTimeout(400, 30*time.Second) s.EncConf = encoding.MakeConfig(app.ModuleEncodingRegisters...) s.Logger = tmlog.NewNopLogger() diff --git a/store/init.go b/store/init.go index 1d71c64c..ac949d3b 100644 --- a/store/init.go +++ b/store/init.go @@ -35,7 +35,7 @@ type InitOptions struct { NeedP2PKeyStore bool } -// Init initializes the qgb file system in the directory under +// Init initializes the BlobStream file system in the directory under // 'path'. // It also creates a lock under that directory, so it can't be used // by multiple processes. diff --git a/store/store.go b/store/store.go index 5e9b585c..e452a873 100644 --- a/store/store.go +++ b/store/store.go @@ -15,7 +15,7 @@ import ( tmlog "github.com/tendermint/tendermint/libs/log" ) -// Store contains relevant information about the QGB store. +// Store contains relevant information about the BlobStream store. type Store struct { // DataStore provides a Datastore - a KV store for dht p2p data to be stored on disk. DataStore datastore.Batching @@ -29,7 +29,7 @@ type Store struct { // P2PKeyStore provides a keystore for P2P private keys. P2PKeyStore *keystore2.FSKeystore - // Path the path to the qgb storage root. + // Path the path to the BlobStream storage root. Path string // storeLock protects directory when the data store is open. diff --git a/testing/celestia_network.go b/testing/celestia_network.go index 4c7e185a..960b5fd9 100644 --- a/testing/celestia_network.go +++ b/testing/celestia_network.go @@ -103,9 +103,9 @@ func NewCelestiaNetwork(ctx context.Context, t *testing.T, genesisOpts ...celest // SetDataCommitmentWindowParams will set the provided data commitment window as genesis state. func SetDataCommitmentWindowParams(codec codec.Codec, params types.Params) celestiatestnode.GenesisOption { return func(state map[string]json.RawMessage) map[string]json.RawMessage { - qgbGenState := types.DefaultGenesis() - qgbGenState.Params = ¶ms - state[types.ModuleName] = codec.MustMarshalJSON(qgbGenState) + blobStreamGenState := types.DefaultGenesis() + blobStreamGenState.Params = ¶ms + state[types.ModuleName] = codec.MustMarshalJSON(blobStreamGenState) return state } } diff --git a/testing/dht_network.go b/testing/dht_network.go index cbd42421..82ddbb76 100644 --- a/testing/dht_network.go +++ b/testing/dht_network.go @@ -19,7 +19,7 @@ type DHTNetwork struct { Context context.Context Hosts []host.Host Stores []ds.Batching - DHTs []*p2p.QgbDHT + DHTs []*p2p.BlobStreamDHT } // NewDHTNetwork creates a new DHT test network running in-memory. @@ -34,7 +34,7 @@ func NewDHTNetwork(ctx context.Context, count int) *DHTNetwork { } hosts := make([]host.Host, count) stores := make([]ds.Batching, count) - dhts := make([]*p2p.QgbDHT, count) + dhts := make([]*p2p.BlobStreamDHT, count) for i := 0; i < count; i++ { if i == 0 { hosts[i], stores[i], dhts[i] = NewTestDHT(ctx, nil) @@ -59,13 +59,13 @@ func NewDHTNetwork(ctx context.Context, count int) *DHTNetwork { } // NewTestDHT creates a test DHT not connected to any peers. -func NewTestDHT(ctx context.Context, bootstrappers []peer.AddrInfo) (host.Host, ds.Batching, *p2p.QgbDHT) { +func NewTestDHT(ctx context.Context, bootstrappers []peer.AddrInfo) (host.Host, ds.Batching, *p2p.BlobStreamDHT) { h, err := libp2p.New() if err != nil { panic(err) } dataStore := dssync.MutexWrap(ds.NewMapDatastore()) - dht, err := p2p.NewQgbDHT(ctx, h, dataStore, bootstrappers, tmlog.NewNopLogger()) + dht, err := p2p.NewBlobStreamDHT(ctx, h, dataStore, bootstrappers, tmlog.NewNopLogger()) if err != nil { panic(err) } @@ -73,7 +73,7 @@ func NewTestDHT(ctx context.Context, bootstrappers []peer.AddrInfo) (host.Host, } // WaitForPeerTableToUpdate waits for nodes to have updated their peers list -func WaitForPeerTableToUpdate(ctx context.Context, dhts []*p2p.QgbDHT, timeout time.Duration) error { +func WaitForPeerTableToUpdate(ctx context.Context, dhts []*p2p.BlobStreamDHT, timeout time.Duration) error { withTimeout, cancel := context.WithTimeout(ctx, timeout) defer cancel() ticker := time.NewTicker(time.Millisecond) diff --git a/types/data_commitment_confirm.go b/types/data_commitment_confirm.go index bceba6e0..66147c10 100644 --- a/types/data_commitment_confirm.go +++ b/types/data_commitment_confirm.go @@ -57,7 +57,7 @@ func IsEmptyMsgDataCommitmentConfirm(dcc DataCommitmentConfirm) bool { } // DataCommitmentTupleRootSignBytes EncodeDomainSeparatedDataCommitment takes the required input data and -// produces the required signature to confirm a validator set update on the QGB Ethereum contract. +// produces the required signature to confirm a validator set update on the BlobStream Ethereum contract. // This value will then be signed before being submitted to Cosmos, verified, and then relayed to Ethereum. func DataCommitmentTupleRootSignBytes(nonce *big.Int, commitment []byte) ethcmn.Hash { var dataCommitment [32]uint8 diff --git a/types/valset_confirm.go b/types/valset_confirm.go index 03145af5..5537e261 100644 --- a/types/valset_confirm.go +++ b/types/valset_confirm.go @@ -14,7 +14,7 @@ import ( // // If a sufficient number of validators (66% of voting power) submit ValsetConfirm // messages with their signatures, it is then possible for anyone to query them from -// the QGB P2P network and submit them to Ethereum to update the validator set. +// the BlobStream P2P network and submit them to Ethereum to update the validator set. type ValsetConfirm struct { // Ethereum address, associated to the orchestrator, used to sign the `ValSet` // message. From 25d8251350ec9d567ee1eafa09bd1af74eecd336 Mon Sep 17 00:00:00 2001 From: rachid Date: Thu, 12 Oct 2023 00:18:10 +0200 Subject: [PATCH 02/17] chore: BlobStream -> Blobstream --- README.md | 16 +++--- cmd/bstream/base/config.go | 2 +- cmd/bstream/bootstrapper/cmd.go | 6 +-- cmd/bstream/bootstrapper/config.go | 4 +- cmd/bstream/common/helpers.go | 6 +-- cmd/bstream/deploy/cmd.go | 10 ++-- cmd/bstream/deploy/config.go | 4 +- cmd/bstream/keys/evm/config.go | 4 +- cmd/bstream/keys/evm/evm.go | 2 +- cmd/bstream/keys/keys.go | 2 +- cmd/bstream/keys/p2p/config.go | 2 +- cmd/bstream/keys/p2p/p2p.go | 2 +- cmd/bstream/orchestrator/cmd.go | 8 +-- cmd/bstream/orchestrator/config.go | 4 +- cmd/bstream/query/cmd.go | 10 ++-- cmd/bstream/relayer/cmd.go | 8 +-- cmd/bstream/relayer/config.go | 6 +-- cmd/bstream/root/cmd.go | 4 +- docker/entrypoint.sh | 2 +- docs/bootstrapper.md | 10 ++-- docs/deploy.md | 28 +++++----- docs/keys.md | 14 ++--- docs/orchestrator.md | 22 ++++---- docs/relayer.md | 26 ++++----- e2e/README.md | 6 +-- e2e/deployer_test.go | 10 ++-- e2e/docker-compose.yml | 2 +- e2e/orchestrator_test.go | 16 +++--- e2e/qgb_network.go | 84 +++++++++++++++--------------- e2e/relayer_test.go | 24 ++++----- e2e/scripts/deploy_qgb_contract.sh | 6 +-- e2e/scripts/start_relayer.sh | 2 +- e2e/test_commons.go | 4 +- evm/evm_client.go | 14 ++--- evm/evm_client_test.go | 4 +- orchestrator/broadcaster.go | 14 ++--- orchestrator/broadcaster_test.go | 2 +- orchestrator/orchestrator.go | 2 +- p2p/dht.go | 20 +++---- p2p/keys.go | 4 +- p2p/querier.go | 14 ++--- relayer/relayer.go | 4 +- relayer/suite_test.go | 2 +- rpc/app_querier.go | 2 +- store/init.go | 2 +- store/store.go | 4 +- testing/dht_network.go | 10 ++-- types/data_commitment_confirm.go | 2 +- types/valset_confirm.go | 2 +- 49 files changed, 229 insertions(+), 229 deletions(-) diff --git a/README.md b/README.md index 84c97693..cf23ad8b 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ # orchestrator-relayer -Contains the implementation of the BlobStream orchestrator and relayer. +Contains the implementation of the Blobstream orchestrator and relayer. -The orchestrator is the software that signs the BlobStream attestations, and the relayer is the one that relays them to the target EVM chain. +The orchestrator is the software that signs the Blobstream attestations, and the relayer is the one that relays them to the target EVM chain. -For a high-level overview of how the BlobStream works, check [here](https://github.com/celestiaorg/quantum-gravity-bridge/tree/76efeca0be1a17d32ef633c0fdbd3c8f5e4cc53f#how-it-works) and [here](https://blog.celestia.org/celestiums/). +For a high-level overview of how the Blobstream works, check [here](https://github.com/celestiaorg/quantum-gravity-bridge/tree/76efeca0be1a17d32ef633c0fdbd3c8f5e4cc53f#how-it-works) and [here](https://blog.celestia.org/celestiums/). ## Install 1. [Install Go](https://go.dev/doc/install) 1.21.1 2. Clone this repo -3. Install the BlobStream CLI +3. Install the Blobstream CLI ```shell make install @@ -27,9 +27,9 @@ bstream --help If you are a Celestia-app validator, all you need to do is run the orchestrator. Check [here](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/orchestrator.md) for more details. -If you want to post commitments on an EVM chain, you will need to deploy a new BlobStream contract and run a relayer. Check [here](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md) for relayer docs and [here](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/deploy.md) for how to deploy a new BlobStream contract. +If you want to post commitments on an EVM chain, you will need to deploy a new Blobstream contract and run a relayer. Check [here](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/relayer.md) for relayer docs and [here](https://github.com/celestiaorg/orchestrator-relayer/blob/main/docs/deploy.md) for how to deploy a new Blobstream contract. -Note: the BlobStream P2P network is a separate network than the consensus or the data availability one. Thus, you will need its specific bootstrappers to be able to connect to it. +Note: the Blobstream P2P network is a separate network than the consensus or the data availability one. Thus, you will need its specific bootstrappers to be able to connect to it. ## Contributing @@ -57,6 +57,6 @@ The smart contract implementation is in [blobstream-contracts](https://github.co The state machine implementation is in [x/blobstream](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream). -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). -BlobStream design explained in this [blog](https://blog.celestia.org/celestiums). +Blobstream design explained in this [blog](https://blog.celestia.org/celestiums). diff --git a/cmd/bstream/base/config.go b/cmd/bstream/base/config.go index 75ecf78e..4c09783a 100644 --- a/cmd/bstream/base/config.go +++ b/cmd/bstream/base/config.go @@ -24,7 +24,7 @@ type Config struct { EVMPassphrase string } -// DefaultServicePath constructs the default BlobStream store path for +// DefaultServicePath constructs the default Blobstream store path for // the provided service. // It tries to get the home directory from an environment variable // called `_HOME`. If not set, then reverts to using diff --git a/cmd/bstream/bootstrapper/cmd.go b/cmd/bstream/bootstrapper/cmd.go index 1e77125e..e7afff9f 100644 --- a/cmd/bstream/bootstrapper/cmd.go +++ b/cmd/bstream/bootstrapper/cmd.go @@ -21,7 +21,7 @@ func Command() *cobra.Command { bsCmd := &cobra.Command{ Use: "bootstrapper", Aliases: []string{"bs"}, - Short: "BlobStream P2P network bootstrapper command", + Short: "Blobstream P2P network bootstrapper command", SilenceUsage: true, } @@ -110,7 +110,7 @@ func Start() *cobra.Command { } // creating the dht - dht, err := p2p.NewBlobStreamDHT(ctx, h, dataStore, aIBootstrappers, logger) + dht, err := p2p.NewBlobstreamDHT(ctx, h, dataStore, aIBootstrappers, logger) if err != nil { return err } @@ -137,7 +137,7 @@ func Start() *cobra.Command { func Init() *cobra.Command { cmd := cobra.Command{ Use: "init", - Short: "Initialize the BlobStream bootstrapper store. Passed flags have persisted effect.", + Short: "Initialize the Blobstream bootstrapper store. Passed flags have persisted effect.", RunE: func(cmd *cobra.Command, args []string) error { config, err := parseInitFlags(cmd) if err != nil { diff --git a/cmd/bstream/bootstrapper/config.go b/cmd/bstream/bootstrapper/config.go index 9d38e35f..3eace905 100644 --- a/cmd/bstream/bootstrapper/config.go +++ b/cmd/bstream/bootstrapper/config.go @@ -14,7 +14,7 @@ func addStartFlags(cmd *cobra.Command) *cobra.Command { if err != nil { panic(err) } - cmd.Flags().String(base.FlagHome, homeDir, "The BlobStream bootstrappers home directory") + cmd.Flags().String(base.FlagHome, homeDir, "The Blobstream bootstrappers home directory") base.AddP2PNicknameFlag(cmd) base.AddP2PListenAddressFlag(cmd) base.AddBootstrappersFlag(cmd) @@ -65,7 +65,7 @@ func addInitFlags(cmd *cobra.Command) *cobra.Command { if err != nil { panic(err) } - cmd.Flags().String(base.FlagHome, homeDir, "The BlobStream bootstrappers home directory") + cmd.Flags().String(base.FlagHome, homeDir, "The Blobstream bootstrappers home directory") return cmd } diff --git a/cmd/bstream/common/helpers.go b/cmd/bstream/common/helpers.go index eb7b4ae0..a827518c 100644 --- a/cmd/bstream/common/helpers.go +++ b/cmd/bstream/common/helpers.go @@ -60,7 +60,7 @@ func NewTmAndAppQuerier(logger tmlog.Logger, tendermintRPC string, celesGRPC str return tmQuerier, appQuerier, stopFuncs, nil } -// CreateDHTAndWaitForPeers helper function that creates a new BlobStream DHT and waits for some peers to connect to it. +// CreateDHTAndWaitForPeers helper function that creates a new Blobstream DHT and waits for some peers to connect to it. func CreateDHTAndWaitForPeers( ctx context.Context, logger tmlog.Logger, @@ -69,7 +69,7 @@ func CreateDHTAndWaitForPeers( p2pListenAddr string, bootstrappers string, dataStore ds.Batching, -) (*p2p.BlobStreamDHT, error) { +) (*p2p.BlobstreamDHT, error) { // get the p2p private key or generate a new one privKey, err := common2.GetP2PKeyOrGenerateNewOne(p2pKeyStore, p2pNickname) if err != nil { @@ -98,7 +98,7 @@ func CreateDHTAndWaitForPeers( } // creating the dht - dht, err := p2p.NewBlobStreamDHT(ctx, h, dataStore, aIBootstrappers, logger) + dht, err := p2p.NewBlobstreamDHT(ctx, h, dataStore, aIBootstrappers, logger) if err != nil { return nil, err } diff --git a/cmd/bstream/deploy/cmd.go b/cmd/bstream/deploy/cmd.go index bbd21e00..54b74dd2 100644 --- a/cmd/bstream/deploy/cmd.go +++ b/cmd/bstream/deploy/cmd.go @@ -25,7 +25,7 @@ import ( func Command() *cobra.Command { command := &cobra.Command{ Use: "deploy ", - Short: "Deploys the BlobStream contract and initializes it using the provided Celestia chain", + Short: "Deploys the Blobstream contract and initializes it using the provided Celestia chain", RunE: func(cmd *cobra.Command, args []string) error { config, err := parseDeployFlags(cmd) if err != nil { @@ -59,7 +59,7 @@ func Command() *cobra.Command { if err != nil { return errors.Wrap( err, - "cannot initialize the BlobStream contract without having a valset request: %s", + "cannot initialize the Blobstream contract without having a valset request: %s", ) } @@ -110,15 +110,15 @@ func Command() *cobra.Command { } defer backend.Close() - address, tx, _, err := evmClient.DeployBlobStreamContract(txOpts, backend, *vs, vs.Nonce, false) + address, tx, _, err := evmClient.DeployBlobstreamContract(txOpts, backend, *vs, vs.Nonce, false) if err != nil { - logger.Error("failed to deploy BlobStream contract") + logger.Error("failed to deploy Blobstream contract") return err } receipt, err := evmClient.WaitForTransaction(cmd.Context(), backend, tx) if err == nil && receipt != nil && receipt.Status == 1 { - logger.Info("deployed BlobStream contract", "proxy_address", address.Hex(), "tx_hash", tx.Hash().String()) + logger.Info("deployed Blobstream contract", "proxy_address", address.Hex(), "tx_hash", tx.Hash().String()) } return nil diff --git a/cmd/bstream/deploy/config.go b/cmd/bstream/deploy/config.go index 954c37a1..10d3309b 100644 --- a/cmd/bstream/deploy/config.go +++ b/cmd/bstream/deploy/config.go @@ -30,7 +30,7 @@ func addDeployFlags(cmd *cobra.Command) *cobra.Command { cmd.Flags().String( FlagStartingNonce, "latest", - "Specify the nonce to start the BlobStream contract from. "+ + "Specify the nonce to start the Blobstream contract from. "+ "\"earliest\": for genesis, "+ "\"latest\": for latest valset nonce, "+ "\"nonce\": for the latest valset before the provided nonce, provided nonce included.", @@ -40,7 +40,7 @@ func addDeployFlags(cmd *cobra.Command) *cobra.Command { if err != nil { panic(err) } - cmd.Flags().String(base.FlagHome, homeDir, "The BlobStream deployer home directory") + cmd.Flags().String(base.FlagHome, homeDir, "The Blobstream deployer home directory") cmd.Flags().String(base.FlagEVMPassphrase, "", "the evm account passphrase (if not specified as a flag, it will be asked interactively)") return cmd diff --git a/cmd/bstream/keys/evm/config.go b/cmd/bstream/keys/evm/config.go index 6e398558..d909201d 100644 --- a/cmd/bstream/keys/evm/config.go +++ b/cmd/bstream/keys/evm/config.go @@ -15,7 +15,7 @@ func keysConfigFlags(cmd *cobra.Command, service string) *cobra.Command { if err != nil { panic(err) } - cmd.Flags().String(base.FlagHome, homeDir, "The BlobStream evm keys home directory") + cmd.Flags().String(base.FlagHome, homeDir, "The Blobstream evm keys home directory") cmd.Flags().String(base.FlagEVMPassphrase, "", "the evm account passphrase (if not specified as a flag, it will be asked interactively)") return cmd } @@ -54,7 +54,7 @@ func keysNewPassphraseConfigFlags(cmd *cobra.Command, service string) *cobra.Com if err != nil { panic(err) } - cmd.Flags().String(base.FlagHome, homeDir, "The BlobStream evm keys home directory") + cmd.Flags().String(base.FlagHome, homeDir, "The Blobstream evm keys home directory") cmd.Flags().String(base.FlagEVMPassphrase, "", "the evm account passphrase (if not specified as a flag, it will be asked interactively)") cmd.Flags().String(FlagNewEVMPassphrase, "", "the evm account new passphrase (if not specified as a flag, it will be asked interactively)") return cmd diff --git a/cmd/bstream/keys/evm/evm.go b/cmd/bstream/keys/evm/evm.go index b5dbe4e2..d6656d49 100644 --- a/cmd/bstream/keys/evm/evm.go +++ b/cmd/bstream/keys/evm/evm.go @@ -21,7 +21,7 @@ import ( func Root(serviceName string) *cobra.Command { evmCmd := &cobra.Command{ Use: "evm", - Short: "BlobStream EVM keys manager", + Short: "Blobstream EVM keys manager", SilenceUsage: true, } diff --git a/cmd/bstream/keys/keys.go b/cmd/bstream/keys/keys.go index e6647598..4aa3b993 100644 --- a/cmd/bstream/keys/keys.go +++ b/cmd/bstream/keys/keys.go @@ -9,7 +9,7 @@ import ( func Command(serviceName string) *cobra.Command { keysCmd := &cobra.Command{ Use: "keys", - Short: "BlobStream keys manager", + Short: "Blobstream keys manager", SilenceUsage: true, } diff --git a/cmd/bstream/keys/p2p/config.go b/cmd/bstream/keys/p2p/config.go index a9e13868..df478948 100644 --- a/cmd/bstream/keys/p2p/config.go +++ b/cmd/bstream/keys/p2p/config.go @@ -11,7 +11,7 @@ func keysConfigFlags(cmd *cobra.Command, service string) *cobra.Command { if err != nil { panic(err) } - cmd.Flags().String(base.FlagHome, homeDir, "The BlobStream p2p keys home directory") + cmd.Flags().String(base.FlagHome, homeDir, "The Blobstream p2p keys home directory") return cmd } diff --git a/cmd/bstream/keys/p2p/p2p.go b/cmd/bstream/keys/p2p/p2p.go index 0256b626..e422f79d 100644 --- a/cmd/bstream/keys/p2p/p2p.go +++ b/cmd/bstream/keys/p2p/p2p.go @@ -18,7 +18,7 @@ import ( func Root(serviceName string) *cobra.Command { p2pCmd := &cobra.Command{ Use: "p2p", - Short: "BlobStream p2p keys manager", + Short: "Blobstream p2p keys manager", SilenceUsage: true, } diff --git a/cmd/bstream/orchestrator/cmd.go b/cmd/bstream/orchestrator/cmd.go index a3a25fa6..8c192440 100644 --- a/cmd/bstream/orchestrator/cmd.go +++ b/cmd/bstream/orchestrator/cmd.go @@ -23,7 +23,7 @@ func Command() *cobra.Command { orchCmd := &cobra.Command{ Use: "orchestrator", Aliases: []string{"orch"}, - Short: "BlobStream orchestrator that signs attestations", + Short: "Blobstream orchestrator that signs attestations", SilenceUsage: true, } @@ -42,7 +42,7 @@ func Command() *cobra.Command { func Start() *cobra.Command { command := &cobra.Command{ Use: "start ", - Short: "Starts the BlobStream orchestrator to sign attestations", + Short: "Starts the Blobstream orchestrator to sign attestations", RunE: func(cmd *cobra.Command, args []string) error { config, err := parseOrchestratorFlags(cmd) if err != nil { @@ -106,7 +106,7 @@ func Start() *cobra.Command { }() // creating the broadcaster - broadcaster := orchestrator.NewBroadcaster(p2pQuerier.BlobStreamDHT) + broadcaster := orchestrator.NewBroadcaster(p2pQuerier.BlobstreamDHT) if err != nil { return err } @@ -144,7 +144,7 @@ func Start() *cobra.Command { func Init() *cobra.Command { cmd := cobra.Command{ Use: "init", - Short: "Initialize the BlobStream orchestrator store. Passed flags have persisted effect.", + Short: "Initialize the Blobstream orchestrator store. Passed flags have persisted effect.", RunE: func(cmd *cobra.Command, args []string) error { config, err := parseInitFlags(cmd) if err != nil { diff --git a/cmd/bstream/orchestrator/config.go b/cmd/bstream/orchestrator/config.go index 854ce194..66fb3c4a 100644 --- a/cmd/bstream/orchestrator/config.go +++ b/cmd/bstream/orchestrator/config.go @@ -32,7 +32,7 @@ func addOrchestratorFlags(cmd *cobra.Command) *cobra.Command { if err != nil { panic(err) } - cmd.Flags().String(base.FlagHome, homeDir, "The BlobStream orchestrator home directory") + cmd.Flags().String(base.FlagHome, homeDir, "The Blobstream orchestrator home directory") cmd.Flags().String(base.FlagEVMPassphrase, "", "the evm account passphrase (if not specified as a flag, it will be asked interactively)") base.AddP2PNicknameFlag(cmd) base.AddP2PListenAddressFlag(cmd) @@ -119,7 +119,7 @@ func addInitFlags(cmd *cobra.Command) *cobra.Command { if err != nil { panic(err) } - cmd.Flags().String(base.FlagHome, homeDir, "The BlobStream orchestrator home directory") + cmd.Flags().String(base.FlagHome, homeDir, "The Blobstream orchestrator home directory") return cmd } diff --git a/cmd/bstream/query/cmd.go b/cmd/bstream/query/cmd.go index 6e684e85..7aca0661 100644 --- a/cmd/bstream/query/cmd.go +++ b/cmd/bstream/query/cmd.go @@ -29,7 +29,7 @@ func Command() *cobra.Command { queryCmd := &cobra.Command{ Use: "query", Aliases: []string{"q"}, - Short: "Query relevant information from a running BlobStream", + Short: "Query relevant information from a running Blobstream", SilenceUsage: true, } @@ -47,8 +47,8 @@ func Signers() *cobra.Command { command := &cobra.Command{ Use: "signers ", Args: cobra.ExactArgs(1), - Short: "Queries the BlobStream for attestations signers", - Long: "Queries the BlobStream for attestations signers. The nonce is the attestation nonce that the command" + + Short: "Queries the Blobstream for attestations signers", + Long: "Queries the Blobstream for attestations signers. The nonce is the attestation nonce that the command" + " will query signatures for. It should be either a specific nonce starting from 2 and on." + " Or, use 'latest' as argument to check the latest attestation nonce", RunE: func(cmd *cobra.Command, args []string) error { @@ -107,7 +107,7 @@ func Signers() *cobra.Command { dataStore := dssync.MutexWrap(ds.NewMapDatastore()) // creating the dht - dht, err := p2p.NewBlobStreamDHT(cmd.Context(), h, dataStore, []peer.AddrInfo{}, logger) + dht, err := p2p.NewBlobstreamDHT(cmd.Context(), h, dataStore, []peer.AddrInfo{}, logger) if err != nil { return err } @@ -390,7 +390,7 @@ func Signature() *cobra.Command { dataStore := dssync.MutexWrap(ds.NewMapDatastore()) // creating the dht - dht, err := p2p.NewBlobStreamDHT(cmd.Context(), h, dataStore, []peer.AddrInfo{}, logger) + dht, err := p2p.NewBlobstreamDHT(cmd.Context(), h, dataStore, []peer.AddrInfo{}, logger) if err != nil { return err } diff --git a/cmd/bstream/relayer/cmd.go b/cmd/bstream/relayer/cmd.go index bcc2f2b6..a1d35988 100644 --- a/cmd/bstream/relayer/cmd.go +++ b/cmd/bstream/relayer/cmd.go @@ -27,7 +27,7 @@ func Command() *cobra.Command { relCmd := &cobra.Command{ Use: "relayer", Aliases: []string{"rel"}, - Short: "BlobStream relayer that relays signatures to the target EVM chain", + Short: "Blobstream relayer that relays signatures to the target EVM chain", SilenceUsage: true, } @@ -46,7 +46,7 @@ func Command() *cobra.Command { func Init() *cobra.Command { cmd := cobra.Command{ Use: "init", - Short: "Initialize the BlobStream relayer store. Passed flags have persisted effect.", + Short: "Initialize the Blobstream relayer store. Passed flags have persisted effect.", RunE: func(cmd *cobra.Command, args []string) error { config, err := parseInitFlags(cmd) if err != nil { @@ -81,7 +81,7 @@ func Init() *cobra.Command { func Start() *cobra.Command { command := &cobra.Command{ Use: "start ", - Short: "Runs the BlobStream relayer to submit attestations to the target EVM chain", + Short: "Runs the Blobstream relayer to submit attestations to the target EVM chain", RunE: func(cmd *cobra.Command, args []string) error { config, err := parseRelayerStartFlags(cmd) if err != nil { @@ -145,7 +145,7 @@ func Start() *cobra.Command { } }() - // connecting to a BlobStream contract + // connecting to a Blobstream contract ethClient, err := ethclient.Dial(config.evmRPC) if err != nil { return err diff --git a/cmd/bstream/relayer/config.go b/cmd/bstream/relayer/config.go index 71507c55..b1cbee1c 100644 --- a/cmd/bstream/relayer/config.go +++ b/cmd/bstream/relayer/config.go @@ -35,13 +35,13 @@ func addRelayerStartFlags(cmd *cobra.Command) *cobra.Command { cmd.Flags().String(FlagCoreRPCHost, "localhost", "Specify the rest rpc address host") cmd.Flags().Uint(FlagCoreRPCPort, 26657, "Specify the rest rpc address port") cmd.Flags().String(FlagEVMRPC, "http://localhost:8545", "Specify the ethereum rpc address") - cmd.Flags().String(FlagContractAddress, "", "Specify the contract at which the BlobStream is deployed") + cmd.Flags().String(FlagContractAddress, "", "Specify the contract at which the Blobstream is deployed") cmd.Flags().Uint64(FlagEVMGasLimit, evm.DefaultEVMGasLimit, "Specify the evm gas limit") homeDir, err := base.DefaultServicePath(ServiceNameRelayer) if err != nil { panic(err) } - cmd.Flags().String(base.FlagHome, homeDir, "The BlobStream relayer home directory") + cmd.Flags().String(base.FlagHome, homeDir, "The Blobstream relayer home directory") cmd.Flags().String(base.FlagEVMPassphrase, "", "the evm account passphrase (if not specified as a flag, it will be asked interactively)") base.AddP2PNicknameFlag(cmd) base.AddP2PListenAddressFlag(cmd) @@ -159,7 +159,7 @@ func addInitFlags(cmd *cobra.Command) *cobra.Command { if err != nil { panic(err) } - cmd.Flags().String(base.FlagHome, homeDir, "The BlobStream relayer home directory") + cmd.Flags().String(base.FlagHome, homeDir, "The Blobstream relayer home directory") return cmd } diff --git a/cmd/bstream/root/cmd.go b/cmd/bstream/root/cmd.go index 9d24cdcb..fc1eb85c 100644 --- a/cmd/bstream/root/cmd.go +++ b/cmd/bstream/root/cmd.go @@ -13,12 +13,12 @@ import ( "github.com/spf13/cobra" ) -// Cmd creates a new root command for the BlobStream CLI. It is called once in the +// Cmd creates a new root command for the Blobstream CLI. It is called once in the // main function. func Cmd() *cobra.Command { rootCmd := &cobra.Command{ Use: "bstream", - Short: "The BlobStream CLI", + Short: "The Blobstream CLI", SilenceUsage: true, } diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 9e45c439..7db3ac1b 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -2,7 +2,7 @@ set -e -echo "Starting Celestia BlobStream with command:" +echo "Starting Celestia Blobstream with command:" echo "$@" echo "" diff --git a/docs/bootstrapper.md b/docs/bootstrapper.md index 91686ab1..bf404006 100644 --- a/docs/bootstrapper.md +++ b/docs/bootstrapper.md @@ -1,12 +1,12 @@ -# BlobStream bootstrapper +# Blobstream bootstrapper -To bootstrap the BlobStream P2P network, we use the bootstrapper BlobStream node type to accept connections from freshly created orchestrators/relayers and share its peer table with them. +To bootstrap the Blobstream P2P network, we use the bootstrapper Blobstream node type to accept connections from freshly created orchestrators/relayers and share its peer table with them. ## How to run -### Install the BlobStream binary +### Install the Blobstream binary -Make sure to have the BlobStream binary installed. Check [the BlobStream binary page](https://docs.celestia.org/nodes/blobstream-binary) for more details. +Make sure to have the Blobstream binary installed. Check [the Blobstream binary page](https://docs.celestia.org/nodes/blobstream-binary) for more details. ### Init the store @@ -39,7 +39,7 @@ Now that we have the store initialized, we can start the bootstrapper: ```shell bstream bootstrapper -BlobStream P2P network bootstrapper command +Blobstream P2P network bootstrapper command Usage: bstream bootstrapper [command] diff --git a/docs/deploy.md b/docs/deploy.md index 32e5f0c5..4cd541b7 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -1,36 +1,36 @@ --- -sidebar_label: Deploy the BlobStream contract -description: Learn how to deploy the BlobStream smart contract. +sidebar_label: Deploy the Blobstream contract +description: Learn how to deploy the Blobstream smart contract. --- -# Deploy the BlobStream contract +# Deploy the Blobstream contract -The `deploy` is a helper command that allows deploying the BlobStream smart contract to a new EVM chain: +The `deploy` is a helper command that allows deploying the Blobstream smart contract to a new EVM chain: ```ssh bstream deploy --help -Deploys the BlobStream contract and initializes it using the provided Celestia chain +Deploys the Blobstream contract and initializes it using the provided Celestia chain Usage: bstream deploy [flags] bstream deploy [command] Available Commands: - keys BlobStream keys manager + keys Blobstream keys manager ``` ## How to run -### Install the BlobStream binary +### Install the Blobstream binary -Make sure to have the BlobStream binary installed. Check [the BlobStream binary page](https://docs.celestia.org/nodes/blobstream-binary) for more details. +Make sure to have the Blobstream binary installed. Check [the Blobstream binary page](https://docs.celestia.org/nodes/blobstream-binary) for more details. ### Add keys -In order to deploy a BlobStream smart contract, you will need a funded EVM address and its private key. The `keys` command will help you set up this key: +In order to deploy a Blobstream smart contract, you will need a funded EVM address and its private key. The `keys` command will help you set up this key: ```ssh bstream deploy keys --help @@ -54,7 +54,7 @@ For more information about the `keys` command, check [the `keys` documentation]( ### Deploy the contract -Now, we can deploy the BlobStream contract to a new EVM chain: +Now, we can deploy the Blobstream contract to a new EVM chain: ```ssh blobstream deploy \ @@ -68,8 +68,8 @@ blobstream deploy \ The `latest` can be replaced by the following: -- `latest`: to deploy the BlobStream contract starting from the latest validator set. -- `earliest`: to deploy the BlobStream contract starting from genesis. -- `nonce`: you can provide a custom nonce on where you want the BlobStream to start. If the provided nonce is not a `Valset` attestation, then the one before it will be used to deploy the BlobStream smart contract. +- `latest`: to deploy the Blobstream contract starting from the latest validator set. +- `earliest`: to deploy the Blobstream contract starting from genesis. +- `nonce`: you can provide a custom nonce on where you want the Blobstream to start. If the provided nonce is not a `Valset` attestation, then the one before it will be used to deploy the Blobstream smart contract. -And, now you will see the BlobStream smart contract address in the logs along with the transaction hash. +And, now you will see the Blobstream smart contract address in the logs along with the transaction hash. diff --git a/docs/keys.md b/docs/keys.md index e311971d..aa44bcdc 100644 --- a/docs/keys.md +++ b/docs/keys.md @@ -7,7 +7,7 @@ description: Learn how to manage EVM private keys and P2P identities. -The BlobStream `keys` command allows managing EVM private keys and P2P identities. It is defined as a subcommand for multiple commands with the only difference being the directory where the keys are stored. For the remaining functionality, it is the same for all the commands. +The Blobstream `keys` command allows managing EVM private keys and P2P identities. It is defined as a subcommand for multiple commands with the only difference being the directory where the keys are stored. For the remaining functionality, it is the same for all the commands. ## Orchestrator command @@ -50,14 +50,14 @@ The examples will use the orchestrator command to access the keys. However, the ```ssh bstream orchestrator keys --help -BlobStream keys manager +Blobstream keys manager Usage: bstream orchestrator keys [command] Available Commands: - evm BlobStream EVM keys manager - p2p BlobStream p2p keys manager + evm Blobstream EVM keys manager + p2p Blobstream p2p keys manager Flags: -h, --help help for keys @@ -74,7 +74,7 @@ The EVM keys are `ECDSA` keys using the `secp256k1` curve. The implementation us ```ssh bstream orchestrator keys evm --help -BlobStream EVM keys manager +Blobstream EVM keys manager Usage: bstream orchestrator keys evm [command] @@ -264,7 +264,7 @@ I[2023-04-13|17:31:58.436] successfully imported file address= I[2023-04-13|17:31:58.437] successfully closed store path=/home/midnight/.orchestrator ``` -with the `passphrase` being the current file passphrase, and the `new passphrase` being the new passphrase that will be used to encrypt the private key in the BlobStream store. +with the `passphrase` being the current file passphrase, and the `new passphrase` being the new passphrase that will be used to encrypt the private key in the Blobstream store. ### P2P keystore @@ -275,7 +275,7 @@ To access the P2P keystore, run the following: ```ssh bstream orchestrator keys p2p -BlobStream p2p keys manager +Blobstream p2p keys manager Usage: bstream orchestrator keys p2p [command] diff --git a/docs/orchestrator.md b/docs/orchestrator.md index 38b2b847..0b999b01 100644 --- a/docs/orchestrator.md +++ b/docs/orchestrator.md @@ -1,22 +1,22 @@ --- -sidebar_label: BlobStream Orchestrator -description: Learn about the BlobStream Orchestrator. +sidebar_label: Blobstream Orchestrator +description: Learn about the Blobstream Orchestrator. --- -# BlobStream Orchestrator +# Blobstream Orchestrator -The role of the orchestrator is to sign attestations using its corresponding validator EVM private key. These attestations are generated within the BlobStream module of the Celestia-app state machine. To learn more about what attestations are, you can refer to [the BlobStream overview](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream). +The role of the orchestrator is to sign attestations using its corresponding validator EVM private key. These attestations are generated within the Blobstream module of the Celestia-app state machine. To learn more about what attestations are, you can refer to [the Blobstream overview](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream). ## How it works The orchestrator does the following: 1. Connect to a Celestia-app full node or validator node via RPC and gRPC and wait for new attestations -2. Once an attestation is created inside the BlobStream state machine, the orchestrator queries it. -3. After getting the attestation, the orchestrator signs it using the provided EVM private key. The private key should correspond to the EVM address provided when creating the validator. Read [more about BlobStream keys](https://docs.celestia.org/nodes/blobstream-keys/). +2. Once an attestation is created inside the Blobstream state machine, the orchestrator queries it. +3. After getting the attestation, the orchestrator signs it using the provided EVM private key. The private key should correspond to the EVM address provided when creating the validator. Read [more about Blobstream keys](https://docs.celestia.org/nodes/blobstream-keys/). 4. Then, the orchestrator pushes its signature to the P2P network it is connected to, via adding it as a DHT value. 5. Listen for new attestations and go back to step 2. @@ -46,9 +46,9 @@ To run an orchestrator, you will need to have access to the following: * *A list of bootstrappers for the P2P network. These will be shared by the team for every network we plan on supporting. * *Access to your consensus node RPC and gRPC ports. -### Install the BlobStream binary +### Install the Blobstream binary -Make sure to have the BlobStream binary installed. Check [the BlobStream binary page](https://docs.celestia.org/nodes/blobstream-binary) for more details. +Make sure to have the Blobstream binary installed. Check [the Blobstream binary page](https://docs.celestia.org/nodes/blobstream-binary) for more details. ### Init the store @@ -114,7 +114,7 @@ The orchestrator accepts the following flags: ```ssh bstream orchestrator start --help -Starts the BlobStream orchestrator to sign attestations +Starts the Blobstream orchestrator to sign attestations Usage: bstream orchestrator start [flags] @@ -145,7 +145,7 @@ If not, then the signatures may not be available to the network and relayers wil #### Register EVM Address -When creating a validator, a random EVM address corresponding to its operator is set in the BlobStream state. This latter will be used by the orchestrator to sign attestations. And since validators will generally not have access to its corresponding private key, that address needs to be edited with one whose private key is known to the validator operator. +When creating a validator, a random EVM address corresponding to its operator is set in the Blobstream state. This latter will be used by the orchestrator to sign attestations. And since validators will generally not have access to its corresponding private key, that address needs to be edited with one whose private key is known to the validator operator. To edit an EVM address for a certain validator, its corresponding account needs to send a `RegisterEVMAddress` transaction with the new address. @@ -273,7 +273,7 @@ If you want to start the orchestrator as a `systemd` service, you could use the ```text [Unit] -Description=BlobStream orchestrator service +Description=Blobstream orchestrator service After=network.target [Service] diff --git a/docs/relayer.md b/docs/relayer.md index 626442db..bda66970 100644 --- a/docs/relayer.md +++ b/docs/relayer.md @@ -1,27 +1,27 @@ --- -sidebar_label: BlobStream Relayer -description: Learn about the BlobStream Relayer. +sidebar_label: Blobstream Relayer +description: Learn about the Blobstream Relayer. --- -# BlobStream Relayer +# Blobstream Relayer -The role of the relayer is to gather attestations' signatures from the orchestrators, and submit them to a target EVM chain. The attestations are generated within the BlobStream module of the Celestia-app state machine. To learn more about what attestations are, you can refer to [the BlobStream overview](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream). +The role of the relayer is to gather attestations' signatures from the orchestrators, and submit them to a target EVM chain. The attestations are generated within the Blobstream module of the Celestia-app state machine. To learn more about what attestations are, you can refer to [the Blobstream overview](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream). Also, while every validator in the Celestia validator set needs to run an orchestrator, we only need one entity to run the relayer, and it can be anyone. Thus, if you're a validator, most likely you want to read [the orchestrator documentation](https://docs.celestia.org/nodes/blobstream-orchestrator/). -Every relayer needs to target a BlobStream smart contract. This latter can be deployed, if not already, using the `bstream deploy` command. More details in the [Deploy the BlobStream contract guide](https://docs.celestia.org/nodes/blobstream-deploy/). +Every relayer needs to target a Blobstream smart contract. This latter can be deployed, if not already, using the `bstream deploy` command. More details in the [Deploy the Blobstream contract guide](https://docs.celestia.org/nodes/blobstream-deploy/). ## How it works The relayer works as follows: 1. Connect to a Celestia-app full node or validator node via RPC and gRPC and wait for attestations. -2. Once an attestation is created inside the BlobStream state machine, the relayer queries it. -3. After getting the attestation, the relayer checks if the target BlobStream smart contract's nonce is lower than the attestation. +2. Once an attestation is created inside the Blobstream state machine, the relayer queries it. +3. After getting the attestation, the relayer checks if the target Blobstream smart contract's nonce is lower than the attestation. 4. If so, the relayer queries the P2P network for signatures from the orchestrators. -5. Once the relayer finds more than 2/3s signatures, it submits them to the target BlobStream smart contract where they get validated. +5. Once the relayer finds more than 2/3s signatures, it submits them to the target Blobstream smart contract where they get validated. 6. Listen for new attestations and go back to step 2. The relayer connects to a separate P2P network than the consensus or the data availability one. So, we will provide bootstrappers for that one. @@ -36,9 +36,9 @@ I[2023-04-26|00:04:28.175] waiting for routing table to populate targetnu ## How to run -### Install the BlobStream binary +### Install the Blobstream binary -Make sure to have the BlobStream binary installed. Check out the [Install the BlobStream binary page](https://docs.celestia.org/nodes/blobstream-binary) for more details. +Make sure to have the Blobstream binary installed. Check out the [Install the Blobstream binary page](https://docs.celestia.org/nodes/blobstream-binary) for more details. ### Init the store @@ -95,14 +95,14 @@ For more information about the `keys` command, check [the `keys` documentation]( ### Start the relayer -Now that we have the store initialized, and we have a target BlobStream smart contract address, we can start the relayer. Make sure you have your Celestia-app node RPC and gRPC accessible, and able to connect to the P2P network bootstrappers. +Now that we have the store initialized, and we have a target Blobstream smart contract address, we can start the relayer. Make sure you have your Celestia-app node RPC and gRPC accessible, and able to connect to the P2P network bootstrappers. The relayer accepts the following flags: ```ssh bstream relayer start --help -Runs the BlobStream relayer to submit attestations to the target EVM chain +Runs the Blobstream relayer to submit attestations to the target EVM chain Usage: bstream relayer start [flags] @@ -124,4 +124,4 @@ To start the relayer using the default home directory, run the following: --p2p.listen-addr=/ip4/0.0.0.0/tcp/30001 ``` -And, you will be prompted to enter your EVM key passphrase for the EVM address passed using the `-d` flag, so that the relayer can use it to send transactions to the target BlobStream smart contract. Make sure that it's funded. +And, you will be prompted to enter your EVM key passphrase for the EVM address passed using the `-d` flag, so that the relayer can use it to send transactions to the target Blobstream smart contract. Make sure that it's funded. diff --git a/e2e/README.md b/e2e/README.md index 4f4b19ca..cda669b8 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -1,6 +1,6 @@ -# BlobStream end to end integration test +# Blobstream end to end integration test -This directory contains the BlobStream e2e integration tests. It serves as a way to fully test the BlobStream orchestrator and relayer in real network scenarios +This directory contains the Blobstream e2e integration tests. It serves as a way to fully test the Blobstream orchestrator and relayer in real network scenarios ## Topology @@ -10,7 +10,7 @@ as discussed under [#398](https://github.com/celestiaorg/celestia-app/issues/398 - 4 Orchestrator nodes that will each run aside of a celestia-app - 1 Ethereum node. Probably Ganache as it is easier to set up - 1 Relayer node that will listen to Celestia chain and relay attestations -- 1 Deployer node that can deploy a new BlobStream contract when needed. +- 1 Deployer node that can deploy a new Blobstream contract when needed. For more information on the environment variables required to run these tests, please check the `docker-compose.yml` file and the shell scripts defined under `celestia-app` directory. diff --git a/e2e/deployer_test.go b/e2e/deployer_test.go index 9dfe49eb..f29ca46e 100644 --- a/e2e/deployer_test.go +++ b/e2e/deployer_test.go @@ -14,10 +14,10 @@ import ( func TestDeployer(t *testing.T) { if os.Getenv("BLOBSTREAM_INTEGRATION_TEST") != TRUE { - t.Skip("Skipping BlobStream integration tests") + t.Skip("Skipping Blobstream integration tests") } - network, err := NewBlobStreamNetwork() + network, err := NewBlobstreamNetwork() HandleNetworkError(t, network, err, false) // to release resources after tests @@ -31,13 +31,13 @@ func TestDeployer(t *testing.T) { err = network.WaitForBlock(ctx, 2) HandleNetworkError(t, network, err, false) - _, err = network.GetLatestDeployedBlobStreamContractWithCustomTimeout(ctx, 15*time.Second) + _, err = network.GetLatestDeployedBlobstreamContractWithCustomTimeout(ctx, 15*time.Second) HandleNetworkError(t, network, err, true) - err = network.DeployBlobStreamContract() + err = network.DeployBlobstreamContract() HandleNetworkError(t, network, err, false) - bridge, err := network.GetLatestDeployedBlobStreamContract(ctx) + bridge, err := network.GetLatestDeployedBlobstreamContract(ctx) HandleNetworkError(t, network, err, false) evmClient := evm.NewClient(nil, bridge, nil, nil, network.EVMRPC, evm.DefaultEVMGasLimit) diff --git a/e2e/docker-compose.yml b/e2e/docker-compose.yml index c343c2c1..7a91bf99 100644 --- a/e2e/docker-compose.yml +++ b/e2e/docker-compose.yml @@ -302,7 +302,7 @@ services: - P2P_BOOTSTRAPPERS=/dns/core0-orch/tcp/30000/p2p/12D3KooWBSMasWzRSRKXREhediFUwABNZwzJbkZcYz5rYr9Zdmfn - P2P_LISTEN=/ip4/0.0.0.0/tcp/30000 # set the following environment variable to some value -# if you want to relay to an existing BlobStream contract +# if you want to relay to an existing Blobstream contract # - BLOBSTREAM_CONTRACT=0x123 entrypoint: [ "/bin/bash" diff --git a/e2e/orchestrator_test.go b/e2e/orchestrator_test.go index a29af385..abda2480 100644 --- a/e2e/orchestrator_test.go +++ b/e2e/orchestrator_test.go @@ -16,10 +16,10 @@ import ( func TestOrchestratorWithOneValidator(t *testing.T) { if os.Getenv("BLOBSTREAM_INTEGRATION_TEST") != TRUE { - t.Skip("Skipping BlobStream integration tests") + t.Skip("Skipping Blobstream integration tests") } - network, err := NewBlobStreamNetwork() + network, err := NewBlobstreamNetwork() HandleNetworkError(t, network, err, false) // to release resources after tests @@ -68,10 +68,10 @@ func TestOrchestratorWithOneValidator(t *testing.T) { func TestOrchestratorWithTwoValidators(t *testing.T) { if os.Getenv("BLOBSTREAM_INTEGRATION_TEST") != TRUE { - t.Skip("Skipping BlobStream integration tests") + t.Skip("Skipping Blobstream integration tests") } - network, err := NewBlobStreamNetwork() + network, err := NewBlobstreamNetwork() HandleNetworkError(t, network, err, false) // to release resources after tests @@ -157,10 +157,10 @@ func TestOrchestratorWithTwoValidators(t *testing.T) { func TestOrchestratorWithMultipleValidators(t *testing.T) { if os.Getenv("BLOBSTREAM_INTEGRATION_TEST") != TRUE { - t.Skip("Skipping BlobStream integration tests") + t.Skip("Skipping Blobstream integration tests") } - network, err := NewBlobStreamNetwork() + network, err := NewBlobstreamNetwork() assert.NoError(t, err) // to release resources after tests @@ -246,10 +246,10 @@ func TestOrchestratorWithMultipleValidators(t *testing.T) { func TestOrchestratorReplayOld(t *testing.T) { if os.Getenv("BLOBSTREAM_INTEGRATION_TEST") != TRUE { - t.Skip("Skipping BlobStream integration tests") + t.Skip("Skipping Blobstream integration tests") } - network, err := NewBlobStreamNetwork() + network, err := NewBlobstreamNetwork() HandleNetworkError(t, network, err, false) // to release resources after tests diff --git a/e2e/qgb_network.go b/e2e/qgb_network.go index a98d8be7..140b892d 100644 --- a/e2e/qgb_network.go +++ b/e2e/qgb_network.go @@ -36,7 +36,7 @@ import ( testcontainers "github.com/testcontainers/testcontainers-go/modules/compose" ) -type BlobStreamNetwork struct { +type BlobstreamNetwork struct { ComposePaths []string Identifier string Instance *testcontainers.LocalDockerCompose @@ -53,7 +53,7 @@ type BlobStreamNetwork struct { toStopChan chan<- struct{} } -func NewBlobStreamNetwork() (*BlobStreamNetwork, error) { +func NewBlobstreamNetwork() (*BlobstreamNetwork, error) { id := strings.ToLower(uuid.New().String()) paths := []string{"./docker-compose.yml"} instance := testcontainers.NewLocalDockerCompose(paths, id) //nolint:staticcheck @@ -61,7 +61,7 @@ func NewBlobStreamNetwork() (*BlobStreamNetwork, error) { // given an initial capacity to avoid blocking in case multiple services failed // and wanted to notify the moderator. toStopChan := make(chan struct{}, 10) - network := &BlobStreamNetwork{ + network := &BlobstreamNetwork{ Identifier: id, ComposePaths: paths, Instance: instance, @@ -96,7 +96,7 @@ func registerModerator(stopChan chan<- struct{}, toStopChan <-chan struct{}) { // it is not calling `DeleteAll()` here as it is being called inside the tests. No need to call it two times. // this comes from the fact that we're sticking with unit tests style tests to be able to run individual tests // https://github.com/celestiaorg/celestia-app/issues/428 -func registerGracefulExit(network *BlobStreamNetwork) { +func registerGracefulExit(network *BlobstreamNetwork) { c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt) go func() { @@ -117,9 +117,9 @@ func forceExitIfNeeded(exitCode int) { } } -// StartAll starts the whole BlobStream cluster with multiple validators, orchestrators and a relayer +// StartAll starts the whole Blobstream cluster with multiple validators, orchestrators and a relayer // Make sure to release the resources after finishing by calling the `StopAll()` method. -func (network BlobStreamNetwork) StartAll() error { +func (network BlobstreamNetwork) StartAll() error { // the reason for building before executing `up` is to avoid rebuilding all the images // if some container accidentally changed some files when running. // This to speed up a bit the execution. @@ -141,7 +141,7 @@ func (network BlobStreamNetwork) StartAll() error { // StopAll stops the network and leaves the containers created. This allows to resume // execution from the point where they stopped. -func (network BlobStreamNetwork) StopAll() error { +func (network BlobstreamNetwork) StopAll() error { err := network.Instance. WithCommand([]string{"stop"}). Invoke() @@ -152,7 +152,7 @@ func (network BlobStreamNetwork) StopAll() error { } // DeleteAll deletes the containers, network and everything related to the cluster. -func (network BlobStreamNetwork) DeleteAll() error { +func (network BlobstreamNetwork) DeleteAll() error { err := network.Instance. WithCommand([]string{"down"}). Invoke() @@ -163,7 +163,7 @@ func (network BlobStreamNetwork) DeleteAll() error { } // KillAll kills all the containers. -func (network BlobStreamNetwork) KillAll() error { +func (network BlobstreamNetwork) KillAll() error { err := network.Instance. WithCommand([]string{"kill"}). Invoke() @@ -175,7 +175,7 @@ func (network BlobStreamNetwork) KillAll() error { // Start starts a service from the `Service` enum. Make sure to call `Stop`, in the // end, to release the resources. -func (network BlobStreamNetwork) Start(service Service) error { +func (network BlobstreamNetwork) Start(service Service) error { serviceName, err := service.toString() if err != nil { return err @@ -196,10 +196,10 @@ func (network BlobStreamNetwork) Start(service Service) error { return nil } -// DeployBlobStreamContract uses the Deployer service to deploy a new BlobStream contract +// DeployBlobstreamContract uses the Deployer service to deploy a new Blobstream contract // based on the existing running network. If no Celestia-app nor ganache is // started, it creates them automatically. -func (network BlobStreamNetwork) DeployBlobStreamContract() error { +func (network BlobstreamNetwork) DeployBlobstreamContract() error { fmt.Println("building images...") err := network.Instance. WithCommand([]string{"build", "--quiet", DEPLOYER}). @@ -218,7 +218,7 @@ func (network BlobStreamNetwork) DeployBlobStreamContract() error { // StartMultiple start multiple services. Make sure to call `Stop`, in the // end, to release the resources. -func (network BlobStreamNetwork) StartMultiple(services ...Service) error { +func (network BlobstreamNetwork) StartMultiple(services ...Service) error { if len(services) == 0 { return fmt.Errorf("empty list of services provided") } @@ -246,7 +246,7 @@ func (network BlobStreamNetwork) StartMultiple(services ...Service) error { return nil } -func (network BlobStreamNetwork) Stop(service Service) error { +func (network BlobstreamNetwork) Stop(service Service) error { serviceName, err := service.toString() if err != nil { return err @@ -262,7 +262,7 @@ func (network BlobStreamNetwork) Stop(service Service) error { // StopMultiple start multiple services. Make sure to call `Stop` or `StopMultiple`, in the // end, to release the resources. -func (network BlobStreamNetwork) StopMultiple(services ...Service) error { +func (network BlobstreamNetwork) StopMultiple(services ...Service) error { if len(services) == 0 { return fmt.Errorf("empty list of services provided") } @@ -283,7 +283,7 @@ func (network BlobStreamNetwork) StopMultiple(services ...Service) error { return nil } -func (network BlobStreamNetwork) ExecCommand(service Service, command []string) error { +func (network BlobstreamNetwork) ExecCommand(service Service, command []string) error { serviceName, err := service.toString() if err != nil { return err @@ -299,7 +299,7 @@ func (network BlobStreamNetwork) ExecCommand(service Service, command []string) // StartMinimal starts a network containing: 1 validator, 1 orchestrator, 1 relayer // and a ganache instance. -func (network BlobStreamNetwork) StartMinimal() error { +func (network BlobstreamNetwork) StartMinimal() error { fmt.Println("building images...") err := network.Instance. WithCommand([]string{"build", "--quiet", "core0", "core0-orch", "relayer", "ganache"}). @@ -319,7 +319,7 @@ func (network BlobStreamNetwork) StartMinimal() error { // StartBase starts the very minimal component to have a network. // It consists of starting `core0` as it is the genesis validator, and the docker network // will be created along with it, allowing more containers to join it. -func (network BlobStreamNetwork) StartBase() error { +func (network BlobstreamNetwork) StartBase() error { fmt.Println("building images...") err := network.Instance. WithCommand([]string{"build", "--quiet", "core0"}). @@ -336,7 +336,7 @@ func (network BlobStreamNetwork) StartBase() error { return nil } -func (network BlobStreamNetwork) WaitForNodeToStart(_ctx context.Context, rpcAddr string) error { +func (network BlobstreamNetwork) WaitForNodeToStart(_ctx context.Context, rpcAddr string) error { ctx, cancel := context.WithTimeout(_ctx, 5*time.Minute) for { select { @@ -362,11 +362,11 @@ func (network BlobStreamNetwork) WaitForNodeToStart(_ctx context.Context, rpcAdd } } -func (network BlobStreamNetwork) WaitForBlock(_ctx context.Context, height int64) error { +func (network BlobstreamNetwork) WaitForBlock(_ctx context.Context, height int64) error { return network.WaitForBlockWithCustomTimeout(_ctx, height, 5*time.Minute) } -func (network BlobStreamNetwork) WaitForBlockWithCustomTimeout( +func (network BlobstreamNetwork) WaitForBlockWithCustomTimeout( _ctx context.Context, height int64, timeout time.Duration, @@ -415,7 +415,7 @@ func (network BlobStreamNetwork) WaitForBlockWithCustomTimeout( // and for any nonce, but would require adding a new method to the querier. Don't think it is worth it now as // the number of valsets that will be signed is trivial and reaching 0 would be in no time). // Returns the height and the nonce of some attestation that the orchestrator signed. -func (network BlobStreamNetwork) WaitForOrchestratorToStart(_ctx context.Context, dht *p2p.BlobStreamDHT, evmAddr string) (uint64, uint64, error) { +func (network BlobstreamNetwork) WaitForOrchestratorToStart(_ctx context.Context, dht *p2p.BlobstreamDHT, evmAddr string) (uint64, uint64, error) { // create p2p querier p2pQuerier := p2p.NewQuerier(dht, network.Logger) @@ -489,7 +489,7 @@ func (network BlobStreamNetwork) WaitForOrchestratorToStart(_ctx context.Context // GetValsetContainingVals Gets the last valset that contains a certain number of validator. // This is used after enabling orchestrators not to sign unless they belong to some valset. // Thus, any nonce after the returned valset should be signed by all orchestrators. -func (network BlobStreamNetwork) GetValsetContainingVals(_ctx context.Context, number int) (*types.Valset, error) { +func (network BlobstreamNetwork) GetValsetContainingVals(_ctx context.Context, number int) (*types.Valset, error) { appQuerier := rpc.NewAppQuerier(network.Logger, network.CelestiaGRPC, network.EncCfg) err := appQuerier.Start() if err != nil { @@ -530,9 +530,9 @@ func (network BlobStreamNetwork) GetValsetContainingVals(_ctx context.Context, n // GetValsetConfirm Returns the valset confirm for nonce `nonce` // signed by orchestrator whose EVM address is `evmAddr`. -func (network BlobStreamNetwork) GetValsetConfirm( +func (network BlobstreamNetwork) GetValsetConfirm( _ctx context.Context, - dht *p2p.BlobStreamDHT, + dht *p2p.BlobstreamDHT, nonce uint64, evmAddr string, ) (*blobstreamtypes.ValsetConfirm, error) { @@ -583,9 +583,9 @@ func (network BlobStreamNetwork) GetValsetConfirm( // GetDataCommitmentConfirm Returns the data commitment confirm for nonce `nonce` // signed by orchestrator whose EVM address is `evmAddr`. -func (network BlobStreamNetwork) GetDataCommitmentConfirm( +func (network BlobstreamNetwork) GetDataCommitmentConfirm( _ctx context.Context, - dht *p2p.BlobStreamDHT, + dht *p2p.BlobstreamDHT, nonce uint64, evmAddr string, ) (*blobstreamtypes.DataCommitmentConfirm, error) { @@ -643,9 +643,9 @@ func (network BlobStreamNetwork) GetDataCommitmentConfirm( // GetDataCommitmentConfirmByHeight Returns the data commitment confirm that commits // to height `height` signed by orchestrator whose EVM address is `evmAddr`. -func (network BlobStreamNetwork) GetDataCommitmentConfirmByHeight( +func (network BlobstreamNetwork) GetDataCommitmentConfirmByHeight( _ctx context.Context, - dht *p2p.BlobStreamDHT, + dht *p2p.BlobstreamDHT, height uint64, evmAddr string, ) (*blobstreamtypes.DataCommitmentConfirm, error) { @@ -669,7 +669,7 @@ func (network BlobStreamNetwork) GetDataCommitmentConfirmByHeight( } // GetLatestAttestationNonce Returns the latest attestation nonce. -func (network BlobStreamNetwork) GetLatestAttestationNonce(_ctx context.Context) (uint64, error) { +func (network BlobstreamNetwork) GetLatestAttestationNonce(_ctx context.Context) (uint64, error) { // create app querier appQuerier := rpc.NewAppQuerier(network.Logger, network.CelestiaGRPC, network.EncCfg) err := appQuerier.Start() @@ -686,9 +686,9 @@ func (network BlobStreamNetwork) GetLatestAttestationNonce(_ctx context.Context) } // WasAttestationSigned Returns true if the attestation confirm exist. -func (network BlobStreamNetwork) WasAttestationSigned( +func (network BlobstreamNetwork) WasAttestationSigned( _ctx context.Context, - dht *p2p.BlobStreamDHT, + dht *p2p.BlobstreamDHT, nonce uint64, evmAddress string, ) (bool, error) { @@ -763,11 +763,11 @@ func (network BlobStreamNetwork) WasAttestationSigned( } } -func (network BlobStreamNetwork) GetLatestDeployedBlobStreamContract(_ctx context.Context) (*blobstreamwrapper.Wrappers, error) { - return network.GetLatestDeployedBlobStreamContractWithCustomTimeout(_ctx, 5*time.Minute) +func (network BlobstreamNetwork) GetLatestDeployedBlobstreamContract(_ctx context.Context) (*blobstreamwrapper.Wrappers, error) { + return network.GetLatestDeployedBlobstreamContractWithCustomTimeout(_ctx, 5*time.Minute) } -func (network BlobStreamNetwork) GetLatestDeployedBlobStreamContractWithCustomTimeout( +func (network BlobstreamNetwork) GetLatestDeployedBlobstreamContractWithCustomTimeout( _ctx context.Context, timeout time.Duration, ) (*blobstreamwrapper.Wrappers, error) { @@ -820,7 +820,7 @@ func (network BlobStreamNetwork) GetLatestDeployedBlobStreamContractWithCustomTi if receipt.ContractAddress == (ethcommon.Address{}) { continue } - // If the bridge is loaded, then it's the latest-deployed proxy BlobStream contract + // If the bridge is loaded, then it's the latest-deployed proxy Blobstream contract bridge, err := blobstreamwrapper.NewWrappers(receipt.ContractAddress, client) if err != nil { continue @@ -837,7 +837,7 @@ func (network BlobStreamNetwork) GetLatestDeployedBlobStreamContractWithCustomTi } } -func (network BlobStreamNetwork) WaitForRelayerToStart(_ctx context.Context, bridge *blobstreamwrapper.Wrappers) error { +func (network BlobstreamNetwork) WaitForRelayerToStart(_ctx context.Context, bridge *blobstreamwrapper.Wrappers) error { ctx, cancel := context.WithTimeout(_ctx, 2*time.Minute) for { select { @@ -862,7 +862,7 @@ func (network BlobStreamNetwork) WaitForRelayerToStart(_ctx context.Context, bri } } -func (network BlobStreamNetwork) WaitForEventNonce(ctx context.Context, bridge *blobstreamwrapper.Wrappers, n uint64) error { +func (network BlobstreamNetwork) WaitForEventNonce(ctx context.Context, bridge *blobstreamwrapper.Wrappers, n uint64) error { ctx, cancel := context.WithTimeout(ctx, 5*time.Minute) for { select { @@ -889,7 +889,7 @@ func (network BlobStreamNetwork) WaitForEventNonce(ctx context.Context, bridge * } } -func (network BlobStreamNetwork) UpdateDataCommitmentWindow(ctx context.Context, newWindow uint64) error { +func (network BlobstreamNetwork) UpdateDataCommitmentWindow(ctx context.Context, newWindow uint64) error { fmt.Printf("updating data commitment window %d\n", newWindow) kr, err := keyring.New( "blobstream-tests", @@ -983,13 +983,13 @@ func (network BlobStreamNetwork) UpdateDataCommitmentWindow(ctx context.Context, return nil } -func (network BlobStreamNetwork) PrintLogs() { +func (network BlobstreamNetwork) PrintLogs() { _ = network.Instance. WithCommand([]string{"logs"}). Invoke() } -func (network BlobStreamNetwork) GetLatestValset(ctx context.Context) (*types.Valset, error) { +func (network BlobstreamNetwork) GetLatestValset(ctx context.Context) (*types.Valset, error) { // create app querier appQuerier := rpc.NewAppQuerier(network.Logger, network.CelestiaGRPC, network.EncCfg) err := appQuerier.Start() @@ -1005,7 +1005,7 @@ func (network BlobStreamNetwork) GetLatestValset(ctx context.Context) (*types.Va return valset, nil } -func (network BlobStreamNetwork) GetCurrentDataCommitmentWindow(ctx context.Context) (uint64, error) { +func (network BlobstreamNetwork) GetCurrentDataCommitmentWindow(ctx context.Context) (uint64, error) { var window uint64 queryFun := func() error { blobStreamGRPC, err := grpc.Dial("localhost:9090", grpc.WithTransportCredentials(insecure.NewCredentials())) diff --git a/e2e/relayer_test.go b/e2e/relayer_test.go index 776505a4..408621b7 100644 --- a/e2e/relayer_test.go +++ b/e2e/relayer_test.go @@ -19,10 +19,10 @@ import ( func TestRelayerWithOneValidator(t *testing.T) { if os.Getenv("BLOBSTREAM_INTEGRATION_TEST") != TRUE { - t.Skip("Skipping BlobStream integration tests") + t.Skip("Skipping Blobstream integration tests") } - network, err := NewBlobStreamNetwork() + network, err := NewBlobstreamNetwork() HandleNetworkError(t, network, err, false) // to release resources after tests @@ -50,7 +50,7 @@ func TestRelayerWithOneValidator(t *testing.T) { _, _, err = network.WaitForOrchestratorToStart(ctx, dht, CORE0EVMADDRESS) HandleNetworkError(t, network, err, false) - bridge, err := network.GetLatestDeployedBlobStreamContract(ctx) + bridge, err := network.GetLatestDeployedBlobstreamContract(ctx) HandleNetworkError(t, network, err, false) latestNonce, err := network.GetLatestAttestationNonce(ctx) @@ -70,10 +70,10 @@ func TestRelayerWithOneValidator(t *testing.T) { func TestRelayerWithTwoValidators(t *testing.T) { if os.Getenv("BLOBSTREAM_INTEGRATION_TEST") != TRUE { - t.Skip("Skipping BlobStream integration tests") + t.Skip("Skipping Blobstream integration tests") } - network, err := NewBlobStreamNetwork() + network, err := NewBlobstreamNetwork() HandleNetworkError(t, network, err, false) // to release resources after tests @@ -116,7 +116,7 @@ func TestRelayerWithTwoValidators(t *testing.T) { // give the orchestrators some time to catchup time.Sleep(time.Second) - bridge, err := network.GetLatestDeployedBlobStreamContract(ctx) + bridge, err := network.GetLatestDeployedBlobstreamContract(ctx) HandleNetworkError(t, network, err, false) err = network.WaitForRelayerToStart(ctx, bridge) @@ -136,10 +136,10 @@ func TestRelayerWithTwoValidators(t *testing.T) { func TestRelayerWithMultipleValidators(t *testing.T) { if os.Getenv("BLOBSTREAM_INTEGRATION_TEST") != TRUE { - t.Skip("Skipping BlobStream integration tests") + t.Skip("Skipping Blobstream integration tests") } - network, err := NewBlobStreamNetwork() + network, err := NewBlobstreamNetwork() HandleNetworkError(t, network, err, false) // to release resources after tests @@ -191,7 +191,7 @@ func TestRelayerWithMultipleValidators(t *testing.T) { assert.NoError(t, err) assert.Equal(t, 4, len(latestValset.Members)) - bridge, err := network.GetLatestDeployedBlobStreamContract(ctx) + bridge, err := network.GetLatestDeployedBlobstreamContract(ctx) HandleNetworkError(t, network, err, false) err = network.WaitForRelayerToStart(ctx, bridge) @@ -208,10 +208,10 @@ func TestRelayerWithMultipleValidators(t *testing.T) { func TestUpdatingTheDataCommitmentWindow(t *testing.T) { if os.Getenv("BLOBSTREAM_INTEGRATION_TEST") != TRUE { - t.Skip("Skipping BlobStream integration tests") + t.Skip("Skipping Blobstream integration tests") } - network, err := NewBlobStreamNetwork() + network, err := NewBlobstreamNetwork() HandleNetworkError(t, network, err, false) // to release resources after tests @@ -278,7 +278,7 @@ func TestUpdatingTheDataCommitmentWindow(t *testing.T) { assert.NoError(t, err) assert.Equal(t, 4, len(latestValset.Members)) - bridge, err := network.GetLatestDeployedBlobStreamContract(ctx) + bridge, err := network.GetLatestDeployedBlobstreamContract(ctx) HandleNetworkError(t, network, err, false) err = network.WaitForRelayerToStart(ctx, bridge) diff --git a/e2e/scripts/deploy_qgb_contract.sh b/e2e/scripts/deploy_qgb_contract.sh index e3dcdc18..881e7376 100644 --- a/e2e/scripts/deploy_qgb_contract.sh +++ b/e2e/scripts/deploy_qgb_contract.sh @@ -1,11 +1,11 @@ #!/bin/bash -# This script deploys the BlobStream contract and outputs the address to stdout. +# This script deploys the Blobstream contract and outputs the address to stdout. # check whether to deploy a new contract or no need if [[ "${DEPLOY_NEW_CONTRACT}" != "true" ]] then - echo "no need to deploy a new BlobStream contract. exiting..." + echo "no need to deploy a new Blobstream contract. exiting..." exit 0 fi @@ -61,7 +61,7 @@ done # import keys to deployer /bin/bstream deploy keys evm import ecdsa "${PRIVATE_KEY}" --evm.passphrase=123 -echo "deploying BlobStream contract..." +echo "deploying Blobstream contract..." /bin/bstream deploy \ --evm.chain-id "${EVM_CHAIN_ID}" \ diff --git a/e2e/scripts/start_relayer.sh b/e2e/scripts/start_relayer.sh index 61a87bee..f03a7590 100644 --- a/e2e/scripts/start_relayer.sh +++ b/e2e/scripts/start_relayer.sh @@ -1,6 +1,6 @@ #!/bin/bash -# This script runs the BlobStream relayer with the ability to deploy a new BlobStream contract or +# This script runs the Blobstream relayer with the ability to deploy a new Blobstream contract or # pass one as an environment variable BLOBSTREAM_CONTRACT # check if environment variables are set diff --git a/e2e/test_commons.go b/e2e/test_commons.go index 1a601bfa..866279a7 100644 --- a/e2e/test_commons.go +++ b/e2e/test_commons.go @@ -15,7 +15,7 @@ import ( const TRUE = "true" -func HandleNetworkError(t *testing.T, network *BlobStreamNetwork, err error, expectError bool) { +func HandleNetworkError(t *testing.T, network *BlobstreamNetwork, err error, expectError bool) { if expectError && err == nil { network.PrintLogs() assert.Error(t, err) @@ -31,7 +31,7 @@ func HandleNetworkError(t *testing.T, network *BlobStreamNetwork, err error, exp } } -func ConnectToDHT(ctx context.Context, h host.Host, dht *p2p.BlobStreamDHT, target peer.AddrInfo) error { +func ConnectToDHT(ctx context.Context, h host.Host, dht *p2p.BlobstreamDHT, target peer.AddrInfo) error { timeout := time.NewTimer(time.Minute) for { select { diff --git a/evm/evm_client.go b/evm/evm_client.go index 795a00d5..1bf41262 100644 --- a/evm/evm_client.go +++ b/evm/evm_client.go @@ -31,7 +31,7 @@ type Client struct { GasLimit uint64 } -// NewClient Creates a new EVM Client that can be used to deploy the BlobStream contract and +// NewClient Creates a new EVM Client that can be used to deploy the Blobstream contract and // interact with it. // The wrapper parameter can be nil when creating the client for contract deployment. func NewClient( @@ -62,21 +62,21 @@ func (ec *Client) NewEthClient() (*ethclient.Client, error) { return ethClient, nil } -// DeployBlobStreamContract Deploys the BlobStream contract and initializes it with the provided valset. +// DeployBlobstreamContract Deploys the Blobstream contract and initializes it with the provided valset. // The waitToBeMined, when set to true, will wait for the transaction to be included in a block, // and log relevant information. // The initBridge, when set to true, will assign the newly deployed bridge to the wrapper. This // can be used later for further interactions with the new contract. -// Multiple calls to DeployBlobStreamContract with the initBridge flag set to true will overwrite everytime +// Multiple calls to DeployBlobstreamContract with the initBridge flag set to true will overwrite everytime // the bridge contract. -func (ec *Client) DeployBlobStreamContract( +func (ec *Client) DeployBlobstreamContract( opts *bind.TransactOpts, contractBackend bind.ContractBackend, contractInitValset types.Valset, contractInitNonce uint64, initBridge bool, ) (gethcommon.Address, *coregethtypes.Transaction, *blobstreamwrapper.Wrappers, error) { - // deploy the BlobStream implementation contract + // deploy the Blobstream implementation contract impAddr, impTx, _, err := ec.DeployImplementation(opts, contractBackend) if err != nil { return gethcommon.Address{}, nil, nil, err @@ -84,7 +84,7 @@ func (ec *Client) DeployBlobStreamContract( ec.logger.Info("deploying QGB implementation contract...", "address", impAddr.Hex(), "tx_hash", impTx.Hash().Hex()) - // encode the BlobStream contract initialization data using the chain parameters + // encode the Blobstream contract initialization data using the chain parameters ethVsHash, err := contractInitValset.Hash() if err != nil { return gethcommon.Address{}, nil, nil, err @@ -103,7 +103,7 @@ func (ec *Client) DeployBlobStreamContract( opts.Nonce.Add(opts.Nonce, big.NewInt(1)) } - // deploy the ERC1967 proxy, link it to the BlobStream implementation contract, and initialize it + // deploy the ERC1967 proxy, link it to the Blobstream implementation contract, and initialize it proxyAddr, tx, _, err := ec.DeployERC1867Proxy(opts, contractBackend, impAddr, initData) if err != nil { return gethcommon.Address{}, nil, nil, err diff --git a/evm/evm_client_test.go b/evm/evm_client_test.go index 299de5ee..854bb054 100644 --- a/evm/evm_client_test.go +++ b/evm/evm_client_test.go @@ -15,7 +15,7 @@ import ( func (s *EVMTestSuite) TestSubmitDataCommitment() { // deploy a new bridge contract - _, _, _, err := s.Client.DeployBlobStreamContract(s.Chain.Auth, s.Chain.Backend, *s.InitVs, 1, true) + _, _, _, err := s.Client.DeployBlobstreamContract(s.Chain.Auth, s.Chain.Backend, *s.InitVs, 1, true) s.NoError(err) // we just need something to sign over, it doesn't matter what @@ -72,7 +72,7 @@ func (s *EVMTestSuite) TestSubmitDataCommitment() { func (s *EVMTestSuite) TestUpdateValset() { // deploy a new bridge contract - _, _, _, err := s.Client.DeployBlobStreamContract(s.Chain.Auth, s.Chain.Backend, *s.InitVs, 1, true) + _, _, _, err := s.Client.DeployBlobstreamContract(s.Chain.Auth, s.Chain.Backend, *s.InitVs, 1, true) s.NoError(err) updatedValset := celestiatypes.Valset{ diff --git a/orchestrator/broadcaster.go b/orchestrator/broadcaster.go index 2d866b0d..f6d874c1 100644 --- a/orchestrator/broadcaster.go +++ b/orchestrator/broadcaster.go @@ -9,23 +9,23 @@ import ( ) type Broadcaster struct { - BlobStreamDHT *p2p.BlobStreamDHT + BlobstreamDHT *p2p.BlobstreamDHT } -func NewBroadcaster(blobStreamDHT *p2p.BlobStreamDHT) *Broadcaster { - return &Broadcaster{BlobStreamDHT: blobStreamDHT} +func NewBroadcaster(blobStreamDHT *p2p.BlobstreamDHT) *Broadcaster { + return &Broadcaster{BlobstreamDHT: blobStreamDHT} } func (b Broadcaster) ProvideDataCommitmentConfirm(ctx context.Context, nonce uint64, confirm types.DataCommitmentConfirm, dataRootTupleRoot string) error { - if len(b.BlobStreamDHT.RoutingTable().ListPeers()) == 0 { + if len(b.BlobstreamDHT.RoutingTable().ListPeers()) == 0 { return ErrEmptyPeersTable } - return b.BlobStreamDHT.PutDataCommitmentConfirm(ctx, p2p.GetDataCommitmentConfirmKey(nonce, confirm.EthAddress, dataRootTupleRoot), confirm) + return b.BlobstreamDHT.PutDataCommitmentConfirm(ctx, p2p.GetDataCommitmentConfirmKey(nonce, confirm.EthAddress, dataRootTupleRoot), confirm) } func (b Broadcaster) ProvideValsetConfirm(ctx context.Context, nonce uint64, confirm types.ValsetConfirm, signBytes string) error { - if len(b.BlobStreamDHT.RoutingTable().ListPeers()) == 0 { + if len(b.BlobstreamDHT.RoutingTable().ListPeers()) == 0 { return ErrEmptyPeersTable } - return b.BlobStreamDHT.PutValsetConfirm(ctx, p2p.GetValsetConfirmKey(nonce, confirm.EthAddress, signBytes), confirm) + return b.BlobstreamDHT.PutValsetConfirm(ctx, p2p.GetValsetConfirmKey(nonce, confirm.EthAddress, signBytes), confirm) } diff --git a/orchestrator/broadcaster_test.go b/orchestrator/broadcaster_test.go index b53a01b3..519cd694 100644 --- a/orchestrator/broadcaster_test.go +++ b/orchestrator/broadcaster_test.go @@ -101,7 +101,7 @@ func TestBroadcastValsetConfirm(t *testing.T) { // table is empty. func TestEmptyPeersTable(t *testing.T) { _, _, dht := blobstreamtesting.NewTestDHT(context.Background(), nil) - defer func(dht *p2p.BlobStreamDHT) { + defer func(dht *p2p.BlobstreamDHT) { err := dht.Close() if err != nil { require.NoError(t, err) diff --git a/orchestrator/orchestrator.go b/orchestrator/orchestrator.go index b13ec902..dfd1164c 100644 --- a/orchestrator/orchestrator.go +++ b/orchestrator/orchestrator.go @@ -306,7 +306,7 @@ func (orch Orchestrator) Process(ctx context.Context, nonce uint64) error { // if nonce == 1, then, the current valset should sign the confirm. // In fact, the first nonce should never be signed. Because, the first attestation, in the case // where the `earliest` flag is specified when deploying the contract, will be relayed as part of - // the deployment of the BlobStream contract. + // the deployment of the Blobstream contract. // It will be signed temporarily for now. previousValset, err = orch.AppQuerier.QueryValsetByNonce(ctx, att.GetNonce()) if err != nil { diff --git a/p2p/dht.go b/p2p/dht.go index 75a46c95..b9e4aeea 100644 --- a/p2p/dht.go +++ b/p2p/dht.go @@ -19,16 +19,16 @@ const ( ValsetConfirmNamespace = "vc" ) -// BlobStreamDHT wrapper around the `IpfsDHT` implementation. +// BlobstreamDHT wrapper around the `IpfsDHT` implementation. // Used to add helper methods to easily handle the DHT. -type BlobStreamDHT struct { +type BlobstreamDHT struct { *dht.IpfsDHT logger tmlog.Logger } -// NewBlobStreamDHT create a new IPFS DHT using a suitable configuration for the BlobStream. +// NewBlobstreamDHT create a new IPFS DHT using a suitable configuration for the Blobstream. // If nil is passed for bootstrappers, the DHT will not try to connect to any existing peer. -func NewBlobStreamDHT(ctx context.Context, h host.Host, store ds.Batching, bootstrappers []peer.AddrInfo, logger tmlog.Logger) (*BlobStreamDHT, error) { +func NewBlobstreamDHT(ctx context.Context, h host.Host, store ds.Batching, bootstrappers []peer.AddrInfo, logger tmlog.Logger) (*BlobstreamDHT, error) { // this value is set to 23 days, which is the unbonding period. // we want to have the signatures available for this whole period. providers.ProvideValidity = time.Hour * 24 * 23 @@ -48,7 +48,7 @@ func NewBlobStreamDHT(ctx context.Context, h host.Host, store ds.Batching, boots return nil, err } - return &BlobStreamDHT{ + return &BlobstreamDHT{ IpfsDHT: router, logger: logger, }, nil @@ -57,7 +57,7 @@ func NewBlobStreamDHT(ctx context.Context, h host.Host, store ds.Batching, boots // WaitForPeers waits for peers to be connected to the DHT. // Returns nil if the context is done or the peers list has more peers than the specified peersThreshold. // Returns error if it times out. -func (q BlobStreamDHT) WaitForPeers(ctx context.Context, timeout time.Duration, rate time.Duration, peersThreshold int) error { +func (q BlobstreamDHT) WaitForPeers(ctx context.Context, timeout time.Duration, rate time.Duration, peersThreshold int) error { if peersThreshold < 1 { return ErrPeersThresholdCannotBeNegative } @@ -101,7 +101,7 @@ func (q BlobStreamDHT) WaitForPeers(ctx context.Context, timeout time.Duration, // PutDataCommitmentConfirm encodes a data commitment confirm then puts its value to the DHT. // The key can be generated using the `GetDataCommitmentConfirmKey` method. // Returns an error if it fails to do so. -func (q BlobStreamDHT) PutDataCommitmentConfirm(ctx context.Context, key string, dcc types.DataCommitmentConfirm) error { +func (q BlobstreamDHT) PutDataCommitmentConfirm(ctx context.Context, key string, dcc types.DataCommitmentConfirm) error { encodedData, err := types.MarshalDataCommitmentConfirm(dcc) if err != nil { return err @@ -116,7 +116,7 @@ func (q BlobStreamDHT) PutDataCommitmentConfirm(ctx context.Context, key string, // GetDataCommitmentConfirm looks for a data commitment confirm referenced by its key in the DHT. // The key can be generated using the `GetDataCommitmentConfirmKey` method. // Returns an error if it fails to get the confirm. -func (q BlobStreamDHT) GetDataCommitmentConfirm(ctx context.Context, key string) (types.DataCommitmentConfirm, error) { +func (q BlobstreamDHT) GetDataCommitmentConfirm(ctx context.Context, key string) (types.DataCommitmentConfirm, error) { encodedConfirm, err := q.GetValue(ctx, key) // this is a blocking call, we should probably use timeout and channel if err != nil { return types.DataCommitmentConfirm{}, err @@ -131,7 +131,7 @@ func (q BlobStreamDHT) GetDataCommitmentConfirm(ctx context.Context, key string) // PutValsetConfirm encodes a valset confirm then puts its value to the DHT. // The key can be generated using the `GetValsetConfirmKey` method. // Returns an error if it fails to do so. -func (q BlobStreamDHT) PutValsetConfirm(ctx context.Context, key string, vc types.ValsetConfirm) error { +func (q BlobstreamDHT) PutValsetConfirm(ctx context.Context, key string, vc types.ValsetConfirm) error { encodedData, err := types.MarshalValsetConfirm(vc) if err != nil { return err @@ -146,7 +146,7 @@ func (q BlobStreamDHT) PutValsetConfirm(ctx context.Context, key string, vc type // GetValsetConfirm looks for a valset confirm referenced by its key in the DHT. // The key can be generated using the `GetValsetConfirmKey` method. // Returns an error if it fails to get the confirm. -func (q BlobStreamDHT) GetValsetConfirm(ctx context.Context, key string) (types.ValsetConfirm, error) { +func (q BlobstreamDHT) GetValsetConfirm(ctx context.Context, key string) (types.ValsetConfirm, error) { encodedConfirm, err := q.GetValue(ctx, key) // this is a blocking call, we should probably use timeout and channel if err != nil { return types.ValsetConfirm{}, err diff --git a/p2p/keys.go b/p2p/keys.go index 8f5c35e6..6b7132c2 100644 --- a/p2p/keys.go +++ b/p2p/keys.go @@ -11,7 +11,7 @@ import ( // - nonce: in hex format // - evm address: the 0x prefixed orchestrator EVM address in hex format // - data root tuple root: is the digest, in a 0x prefixed hex format, that is signed over for a -// data commitment and whose signature is relayed to the BlobStream smart contract. +// data commitment and whose signature is relayed to the Blobstream smart contract. // Expects the EVM address to be a correct address. func GetDataCommitmentConfirmKey(nonce uint64, evmAddr string, dataRootTupleRoot string) string { return "/" + DataCommitmentConfirmNamespace + "/" + @@ -24,7 +24,7 @@ func GetDataCommitmentConfirmKey(nonce uint64, evmAddr string, dataRootTupleRoot // - nonce: in hex format // - evm address: the orchestrator EVM address in hex format // - sign bytes: is the digest, in a 0x prefixed hex format, that is signed over for a valset and -// whose signature is relayed to the BlobStream smart contract. +// whose signature is relayed to the Blobstream smart contract. // Expects the EVM address to be a correct address. func GetValsetConfirmKey(nonce uint64, evmAddr string, signBytes string) string { return "/" + ValsetConfirmNamespace + "/" + diff --git a/p2p/querier.go b/p2p/querier.go index 8ff880ce..3be409ee 100644 --- a/p2p/querier.go +++ b/p2p/querier.go @@ -16,13 +16,13 @@ import ( // Querier used to query the DHT for confirms. type Querier struct { - BlobStreamDHT *BlobStreamDHT + BlobstreamDHT *BlobstreamDHT logger tmlog.Logger } -func NewQuerier(blobStreamDht *BlobStreamDHT, logger tmlog.Logger) *Querier { +func NewQuerier(blobStreamDht *BlobstreamDHT, logger tmlog.Logger) *Querier { return &Querier{ - BlobStreamDHT: blobStreamDht, + BlobstreamDHT: blobStreamDht, logger: logger, } } @@ -246,7 +246,7 @@ func (q Querier) QueryValsetConfirmByEVMAddress( address string, signBytes string, ) (*types.ValsetConfirm, error) { - confirm, err := q.BlobStreamDHT.GetValsetConfirm( + confirm, err := q.BlobstreamDHT.GetValsetConfirm( ctx, GetValsetConfirmKey(nonce, address, signBytes), ) @@ -264,7 +264,7 @@ func (q Querier) QueryValsetConfirmByEVMAddress( // and signed by the orchestrator whose EVM address is `address`. // Returns (nil, nil) if the confirm is not found func (q Querier) QueryDataCommitmentConfirmByEVMAddress(ctx context.Context, nonce uint64, address string, dataRootTupleRoot string) (*types.DataCommitmentConfirm, error) { - confirm, err := q.BlobStreamDHT.GetDataCommitmentConfirm( + confirm, err := q.BlobstreamDHT.GetDataCommitmentConfirm( ctx, GetDataCommitmentConfirmKey(nonce, address, dataRootTupleRoot), ) @@ -283,7 +283,7 @@ func (q Querier) QueryDataCommitmentConfirmByEVMAddress(ctx context.Context, non func (q Querier) QueryDataCommitmentConfirms(ctx context.Context, valset celestiatypes.Valset, nonce uint64, dataRootTupleRoot string) ([]types.DataCommitmentConfirm, error) { confirms := make([]types.DataCommitmentConfirm, 0) for _, member := range valset.Members { - confirm, err := q.BlobStreamDHT.GetDataCommitmentConfirm( + confirm, err := q.BlobstreamDHT.GetDataCommitmentConfirm( ctx, GetDataCommitmentConfirmKey(nonce, member.EvmAddress, dataRootTupleRoot), ) @@ -304,7 +304,7 @@ func (q Querier) QueryDataCommitmentConfirms(ctx context.Context, valset celesti func (q Querier) QueryValsetConfirms(ctx context.Context, nonce uint64, valset celestiatypes.Valset, signBytes string) ([]types.ValsetConfirm, error) { confirms := make([]types.ValsetConfirm, 0) for _, member := range valset.Members { - confirm, err := q.BlobStreamDHT.GetValsetConfirm( + confirm, err := q.BlobstreamDHT.GetValsetConfirm( ctx, GetValsetConfirmKey(nonce, member.EvmAddress, signBytes), ) diff --git a/relayer/relayer.go b/relayer/relayer.go index 6f388a82..0bfb491d 100644 --- a/relayer/relayer.go +++ b/relayer/relayer.go @@ -327,7 +327,7 @@ func (r *Relayer) SaveDataCommitmentSignaturesToStore(ctx context.Context, att c } // matchAttestationConfirmSigs matches and sorts the confirm signatures with the valset -// members as expected by the BlobStream contract. +// members as expected by the Blobstream contract. // Also, it leaves the non provided signatures as nil in the `sigs` slice: // https://github.com/celestiaorg/celestia-app/issues/628 func matchAttestationConfirmSigs( @@ -335,7 +335,7 @@ func matchAttestationConfirmSigs( currentValset celestiatypes.Valset, ) ([]wrapper.Signature, error) { sigs := make([]wrapper.Signature, len(currentValset.Members)) - // the BlobStream contract expects the signatures to be ordered by validators in valset + // the Blobstream contract expects the signatures to be ordered by validators in valset for i, val := range currentValset.Members { sig, has := signatures[val.EvmAddress] if !has { diff --git a/relayer/suite_test.go b/relayer/suite_test.go index b84a51a9..5f72ab25 100644 --- a/relayer/suite_test.go +++ b/relayer/suite_test.go @@ -34,7 +34,7 @@ func (s *RelayerTestSuite) SetupSuite() { go s.Node.EVMChain.PeriodicCommit(ctx, time.Millisecond) initVs, err := s.Relayer.AppQuerier.QueryLatestValset(s.Node.Context) require.NoError(t, err) - _, _, _, err = s.Relayer.EVMClient.DeployBlobStreamContract(s.Node.EVMChain.Auth, s.Node.EVMChain.Backend, *initVs, initVs.Nonce, true) + _, _, _, err = s.Relayer.EVMClient.DeployBlobstreamContract(s.Node.EVMChain.Auth, s.Node.EVMChain.Backend, *initVs, initVs.Nonce, true) require.NoError(t, err) } diff --git a/rpc/app_querier.go b/rpc/app_querier.go index c77ebaa2..a6397c5d 100644 --- a/rpc/app_querier.go +++ b/rpc/app_querier.go @@ -106,7 +106,7 @@ func (aq *AppQuerier) QueryDataCommitmentForHeight(ctx context.Context, height u return resp.DataCommitment, nil } -// QueryLatestDataCommitment query the latest data commitment in BlobStream state machine. +// QueryLatestDataCommitment query the latest data commitment in Blobstream state machine. func (aq *AppQuerier) QueryLatestDataCommitment(ctx context.Context) (*celestiatypes.DataCommitment, error) { queryClient := celestiatypes.NewQueryClient(aq.clientConn) resp, err := queryClient.LatestDataCommitment(ctx, &celestiatypes.QueryLatestDataCommitmentRequest{}) diff --git a/store/init.go b/store/init.go index ac949d3b..afe36b23 100644 --- a/store/init.go +++ b/store/init.go @@ -35,7 +35,7 @@ type InitOptions struct { NeedP2PKeyStore bool } -// Init initializes the BlobStream file system in the directory under +// Init initializes the Blobstream file system in the directory under // 'path'. // It also creates a lock under that directory, so it can't be used // by multiple processes. diff --git a/store/store.go b/store/store.go index e452a873..6d4d10d6 100644 --- a/store/store.go +++ b/store/store.go @@ -15,7 +15,7 @@ import ( tmlog "github.com/tendermint/tendermint/libs/log" ) -// Store contains relevant information about the BlobStream store. +// Store contains relevant information about the Blobstream store. type Store struct { // DataStore provides a Datastore - a KV store for dht p2p data to be stored on disk. DataStore datastore.Batching @@ -29,7 +29,7 @@ type Store struct { // P2PKeyStore provides a keystore for P2P private keys. P2PKeyStore *keystore2.FSKeystore - // Path the path to the BlobStream storage root. + // Path the path to the Blobstream storage root. Path string // storeLock protects directory when the data store is open. diff --git a/testing/dht_network.go b/testing/dht_network.go index 82ddbb76..63c5c8ad 100644 --- a/testing/dht_network.go +++ b/testing/dht_network.go @@ -19,7 +19,7 @@ type DHTNetwork struct { Context context.Context Hosts []host.Host Stores []ds.Batching - DHTs []*p2p.BlobStreamDHT + DHTs []*p2p.BlobstreamDHT } // NewDHTNetwork creates a new DHT test network running in-memory. @@ -34,7 +34,7 @@ func NewDHTNetwork(ctx context.Context, count int) *DHTNetwork { } hosts := make([]host.Host, count) stores := make([]ds.Batching, count) - dhts := make([]*p2p.BlobStreamDHT, count) + dhts := make([]*p2p.BlobstreamDHT, count) for i := 0; i < count; i++ { if i == 0 { hosts[i], stores[i], dhts[i] = NewTestDHT(ctx, nil) @@ -59,13 +59,13 @@ func NewDHTNetwork(ctx context.Context, count int) *DHTNetwork { } // NewTestDHT creates a test DHT not connected to any peers. -func NewTestDHT(ctx context.Context, bootstrappers []peer.AddrInfo) (host.Host, ds.Batching, *p2p.BlobStreamDHT) { +func NewTestDHT(ctx context.Context, bootstrappers []peer.AddrInfo) (host.Host, ds.Batching, *p2p.BlobstreamDHT) { h, err := libp2p.New() if err != nil { panic(err) } dataStore := dssync.MutexWrap(ds.NewMapDatastore()) - dht, err := p2p.NewBlobStreamDHT(ctx, h, dataStore, bootstrappers, tmlog.NewNopLogger()) + dht, err := p2p.NewBlobstreamDHT(ctx, h, dataStore, bootstrappers, tmlog.NewNopLogger()) if err != nil { panic(err) } @@ -73,7 +73,7 @@ func NewTestDHT(ctx context.Context, bootstrappers []peer.AddrInfo) (host.Host, } // WaitForPeerTableToUpdate waits for nodes to have updated their peers list -func WaitForPeerTableToUpdate(ctx context.Context, dhts []*p2p.BlobStreamDHT, timeout time.Duration) error { +func WaitForPeerTableToUpdate(ctx context.Context, dhts []*p2p.BlobstreamDHT, timeout time.Duration) error { withTimeout, cancel := context.WithTimeout(ctx, timeout) defer cancel() ticker := time.NewTicker(time.Millisecond) diff --git a/types/data_commitment_confirm.go b/types/data_commitment_confirm.go index 66147c10..ad391a0e 100644 --- a/types/data_commitment_confirm.go +++ b/types/data_commitment_confirm.go @@ -57,7 +57,7 @@ func IsEmptyMsgDataCommitmentConfirm(dcc DataCommitmentConfirm) bool { } // DataCommitmentTupleRootSignBytes EncodeDomainSeparatedDataCommitment takes the required input data and -// produces the required signature to confirm a validator set update on the BlobStream Ethereum contract. +// produces the required signature to confirm a validator set update on the Blobstream Ethereum contract. // This value will then be signed before being submitted to Cosmos, verified, and then relayed to Ethereum. func DataCommitmentTupleRootSignBytes(nonce *big.Int, commitment []byte) ethcmn.Hash { var dataCommitment [32]uint8 diff --git a/types/valset_confirm.go b/types/valset_confirm.go index 5537e261..33c66782 100644 --- a/types/valset_confirm.go +++ b/types/valset_confirm.go @@ -14,7 +14,7 @@ import ( // // If a sufficient number of validators (66% of voting power) submit ValsetConfirm // messages with their signatures, it is then possible for anyone to query them from -// the BlobStream P2P network and submit them to Ethereum to update the validator set. +// the Blobstream P2P network and submit them to Ethereum to update the validator set. type ValsetConfirm struct { // Ethereum address, associated to the orchestrator, used to sign the `ValSet` // message. From 7611e9606fea18fef2933e90fa72ae52249c826d Mon Sep 17 00:00:00 2001 From: rachid Date: Thu, 12 Oct 2023 00:37:42 +0200 Subject: [PATCH 03/17] chore: bstream -> blobstream --- .github/workflows/tag.yml | 2 +- .github/workflows/test.yml | 2 +- Dockerfile | 4 +- Makefile | 6 +- README.md | 4 +- cmd/{bstream => blobstream}/base/config.go | 0 .../bootstrapper/cmd.go | 2 +- .../bootstrapper/config.go | 2 +- cmd/{bstream => blobstream}/common/helpers.go | 2 +- cmd/{bstream => blobstream}/deploy/cmd.go | 6 +- cmd/{bstream => blobstream}/deploy/config.go | 2 +- cmd/{bstream => blobstream}/deploy/errors.go | 0 cmd/{bstream => blobstream}/generate/cmd.go | 0 .../keys/common/common.go | 0 .../keys/evm/config.go | 2 +- cmd/{bstream => blobstream}/keys/evm/evm.go | 2 +- cmd/{bstream => blobstream}/keys/keys.go | 4 +- .../keys/p2p/config.go | 2 +- cmd/{bstream => blobstream}/keys/p2p/p2p.go | 2 +- .../keys/p2p/p2p_test.go | 2 +- cmd/{bstream => blobstream}/main.go | 2 +- .../orchestrator/cmd.go | 6 +- .../orchestrator/config.go | 2 +- cmd/{bstream => blobstream}/query/cmd.go | 2 +- cmd/{bstream => blobstream}/query/config.go | 2 +- cmd/{bstream => blobstream}/relayer/cmd.go | 6 +- cmd/{bstream => blobstream}/relayer/config.go | 2 +- cmd/{bstream => blobstream}/root/cmd.go | 14 ++-- docs/bootstrapper.md | 10 +-- docs/deploy.md | 12 +-- docs/keys.md | 76 +++++++++---------- docs/orchestrator.md | 12 +-- docs/relayer.md | 16 ++-- e2e/Dockerfile_e2e | 6 +- e2e/scripts/deploy_qgb_contract.sh | 4 +- ...rt_orchestrator_after_validator_created.sh | 10 +-- e2e/scripts/start_relayer.sh | 6 +- 37 files changed, 117 insertions(+), 117 deletions(-) rename cmd/{bstream => blobstream}/base/config.go (100%) rename cmd/{bstream => blobstream}/bootstrapper/cmd.go (98%) rename cmd/{bstream => blobstream}/bootstrapper/config.go (96%) rename cmd/{bstream => blobstream}/common/helpers.go (98%) rename cmd/{bstream => blobstream}/deploy/cmd.go (95%) rename cmd/{bstream => blobstream}/deploy/config.go (98%) rename cmd/{bstream => blobstream}/deploy/errors.go (100%) rename cmd/{bstream => blobstream}/generate/cmd.go (100%) rename cmd/{bstream => blobstream}/keys/common/common.go (100%) rename cmd/{bstream => blobstream}/keys/evm/config.go (97%) rename cmd/{bstream => blobstream}/keys/evm/evm.go (99%) rename cmd/{bstream => blobstream}/keys/keys.go (71%) rename cmd/{bstream => blobstream}/keys/p2p/config.go (92%) rename cmd/{bstream => blobstream}/keys/p2p/p2p.go (99%) rename cmd/{bstream => blobstream}/keys/p2p/p2p_test.go (94%) rename cmd/{bstream => blobstream}/main.go (71%) rename cmd/{bstream => blobstream}/orchestrator/cmd.go (95%) rename cmd/{bstream => blobstream}/orchestrator/config.go (98%) rename cmd/{bstream => blobstream}/query/cmd.go (99%) rename cmd/{bstream => blobstream}/query/config.go (96%) rename cmd/{bstream => blobstream}/relayer/cmd.go (95%) rename cmd/{bstream => blobstream}/relayer/config.go (98%) rename cmd/{bstream => blobstream}/root/cmd.go (55%) diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 9dfe7e3e..df6ff3bc 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -22,6 +22,6 @@ jobs: uses: goreleaser/goreleaser-action@v5.0.0 with: args: release --rm-dist - workdir: ./cmd/bstream + workdir: ./cmd/blobstream env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 33e8ca4b..53ddf203 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,7 +45,7 @@ jobs: - name: Run tests in race mode run: make test-race - test-bstreak-e2e: + test-blobstream-e2e: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/Dockerfile b/Dockerfile index 27cf45c9..e5a52882 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# stage 1 Build bstream binary +# stage 1 Build blobstream binary FROM --platform=$BUILDPLATFORM docker.io/golang:1.21.2-alpine3.18 as builder RUN apk update && apk --no-cache add make gcc musl-dev git bash @@ -27,7 +27,7 @@ RUN apk update && apk add --no-cache \ -s /sbin/nologin \ -u ${UID} -COPY --from=builder /orchestrator-relayer/build/bstream /bin/bstream +COPY --from=builder /orchestrator-relayer/build/blobstream /bin/blobstream COPY --chown=${USER_NAME}:${USER_NAME} docker/entrypoint.sh /opt/entrypoint.sh USER ${USER_NAME} diff --git a/Makefile b/Makefile index 661554e2..6c360e5b 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,8 @@ DOCKER := $(shell which docker) all: install install: go.sum - @echo "--> Installing bstream" - @go install -mod=readonly ./cmd/bstream + @echo "--> Installing blobstream" + @go install -mod=readonly ./cmd/blobstream go.sum: mod @echo "--> Verifying dependencies have expected content" @@ -24,7 +24,7 @@ pre-build: build: mod @mkdir -p build/ - @go build -o build ./cmd/bstream + @go build -o build ./cmd/blobstream build-docker: @echo "--> Building Docker image" diff --git a/README.md b/README.md index cf23ad8b..76f9bb53 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ make install ```sh # Print help -bstream --help +blobstream --help ``` ## How to run @@ -41,7 +41,7 @@ Note: the Blobstream P2P network is a separate network than the consensus or the ### Helpful Commands ```sh -# Build a new orchestrator-relayer binary and output to build/bstream +# Build a new orchestrator-relayer binary and output to build/blobstream make build # Run tests diff --git a/cmd/bstream/base/config.go b/cmd/blobstream/base/config.go similarity index 100% rename from cmd/bstream/base/config.go rename to cmd/blobstream/base/config.go diff --git a/cmd/bstream/bootstrapper/cmd.go b/cmd/blobstream/bootstrapper/cmd.go similarity index 98% rename from cmd/bstream/bootstrapper/cmd.go rename to cmd/blobstream/bootstrapper/cmd.go index e7afff9f..e9e91962 100644 --- a/cmd/bstream/bootstrapper/cmd.go +++ b/cmd/blobstream/bootstrapper/cmd.go @@ -6,7 +6,7 @@ import ( "strings" "time" - p2pcmd "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys/p2p" + p2pcmd "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/keys/p2p" "github.com/celestiaorg/orchestrator-relayer/helpers" "github.com/celestiaorg/orchestrator-relayer/p2p" "github.com/celestiaorg/orchestrator-relayer/store" diff --git a/cmd/bstream/bootstrapper/config.go b/cmd/blobstream/bootstrapper/config.go similarity index 96% rename from cmd/bstream/bootstrapper/config.go rename to cmd/blobstream/bootstrapper/config.go index 3eace905..19310dbd 100644 --- a/cmd/bstream/bootstrapper/config.go +++ b/cmd/blobstream/bootstrapper/config.go @@ -1,7 +1,7 @@ package bootstrapper import ( - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/base" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/base" "github.com/spf13/cobra" ) diff --git a/cmd/bstream/common/helpers.go b/cmd/blobstream/common/helpers.go similarity index 98% rename from cmd/bstream/common/helpers.go rename to cmd/blobstream/common/helpers.go index a827518c..934a2d3b 100644 --- a/cmd/bstream/common/helpers.go +++ b/cmd/blobstream/common/helpers.go @@ -12,7 +12,7 @@ import ( "github.com/celestiaorg/celestia-app/app" "github.com/celestiaorg/celestia-app/app/encoding" - common2 "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys/p2p" + common2 "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/keys/p2p" "github.com/celestiaorg/orchestrator-relayer/helpers" "github.com/celestiaorg/orchestrator-relayer/p2p" "github.com/celestiaorg/orchestrator-relayer/rpc" diff --git a/cmd/bstream/deploy/cmd.go b/cmd/blobstream/deploy/cmd.go similarity index 95% rename from cmd/bstream/deploy/cmd.go rename to cmd/blobstream/deploy/cmd.go index 54b74dd2..cf2ddcce 100644 --- a/cmd/bstream/deploy/cmd.go +++ b/cmd/blobstream/deploy/cmd.go @@ -5,9 +5,9 @@ import ( "os" "strconv" - evm2 "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys/evm" + evm2 "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/keys/evm" - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/keys" "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/common" @@ -37,7 +37,7 @@ func Command() *cobra.Command { // checking if the provided home is already initiated isInit := store.IsInit(logger, config.Home, store.InitOptions{NeedEVMKeyStore: true}) if !isInit { - logger.Info("please initialize the EVM keystore using the `bstream deploy keys add/import` command") + logger.Info("please initialize the EVM keystore using the `blobstream deploy keys add/import` command") return store.ErrNotInited } diff --git a/cmd/bstream/deploy/config.go b/cmd/blobstream/deploy/config.go similarity index 98% rename from cmd/bstream/deploy/config.go rename to cmd/blobstream/deploy/config.go index 10d3309b..f84cdc3b 100644 --- a/cmd/bstream/deploy/config.go +++ b/cmd/blobstream/deploy/config.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/base" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/base" "github.com/celestiaorg/orchestrator-relayer/evm" "github.com/spf13/cobra" diff --git a/cmd/bstream/deploy/errors.go b/cmd/blobstream/deploy/errors.go similarity index 100% rename from cmd/bstream/deploy/errors.go rename to cmd/blobstream/deploy/errors.go diff --git a/cmd/bstream/generate/cmd.go b/cmd/blobstream/generate/cmd.go similarity index 100% rename from cmd/bstream/generate/cmd.go rename to cmd/blobstream/generate/cmd.go diff --git a/cmd/bstream/keys/common/common.go b/cmd/blobstream/keys/common/common.go similarity index 100% rename from cmd/bstream/keys/common/common.go rename to cmd/blobstream/keys/common/common.go diff --git a/cmd/bstream/keys/evm/config.go b/cmd/blobstream/keys/evm/config.go similarity index 97% rename from cmd/bstream/keys/evm/config.go rename to cmd/blobstream/keys/evm/config.go index d909201d..a96834fc 100644 --- a/cmd/bstream/keys/evm/config.go +++ b/cmd/blobstream/keys/evm/config.go @@ -1,7 +1,7 @@ package evm import ( - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/base" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/base" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" ) diff --git a/cmd/bstream/keys/evm/evm.go b/cmd/blobstream/keys/evm/evm.go similarity index 99% rename from cmd/bstream/keys/evm/evm.go rename to cmd/blobstream/keys/evm/evm.go index d6656d49..4af6eb8a 100644 --- a/cmd/bstream/keys/evm/evm.go +++ b/cmd/blobstream/keys/evm/evm.go @@ -8,7 +8,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/keystore" - common2 "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys/common" + common2 "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/keys/common" "github.com/celestiaorg/orchestrator-relayer/store" "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/common" diff --git a/cmd/bstream/keys/keys.go b/cmd/blobstream/keys/keys.go similarity index 71% rename from cmd/bstream/keys/keys.go rename to cmd/blobstream/keys/keys.go index 4aa3b993..4733dd69 100644 --- a/cmd/bstream/keys/keys.go +++ b/cmd/blobstream/keys/keys.go @@ -1,8 +1,8 @@ package keys import ( - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys/evm" - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys/p2p" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/keys/evm" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/keys/p2p" "github.com/spf13/cobra" ) diff --git a/cmd/bstream/keys/p2p/config.go b/cmd/blobstream/keys/p2p/config.go similarity index 92% rename from cmd/bstream/keys/p2p/config.go rename to cmd/blobstream/keys/p2p/config.go index df478948..f2d76a47 100644 --- a/cmd/bstream/keys/p2p/config.go +++ b/cmd/blobstream/keys/p2p/config.go @@ -1,7 +1,7 @@ package p2p import ( - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/base" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/base" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" ) diff --git a/cmd/bstream/keys/p2p/p2p.go b/cmd/blobstream/keys/p2p/p2p.go similarity index 99% rename from cmd/bstream/keys/p2p/p2p.go rename to cmd/blobstream/keys/p2p/p2p.go index e422f79d..1b5c9586 100644 --- a/cmd/bstream/keys/p2p/p2p.go +++ b/cmd/blobstream/keys/p2p/p2p.go @@ -7,7 +7,7 @@ import ( "github.com/ipfs/boxo/keystore" - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys/common" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/keys/common" "github.com/celestiaorg/orchestrator-relayer/store" util "github.com/ipfs/boxo/util" "github.com/libp2p/go-libp2p/core/crypto" diff --git a/cmd/bstream/keys/p2p/p2p_test.go b/cmd/blobstream/keys/p2p/p2p_test.go similarity index 94% rename from cmd/bstream/keys/p2p/p2p_test.go rename to cmd/blobstream/keys/p2p/p2p_test.go index 9b7b016b..3d0c47b2 100644 --- a/cmd/bstream/keys/p2p/p2p_test.go +++ b/cmd/blobstream/keys/p2p/p2p_test.go @@ -3,7 +3,7 @@ package p2p_test import ( "testing" - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys/p2p" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/keys/p2p" "github.com/ipfs/boxo/keystore" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/cmd/bstream/main.go b/cmd/blobstream/main.go similarity index 71% rename from cmd/bstream/main.go rename to cmd/blobstream/main.go index 53b92b18..b09e1205 100644 --- a/cmd/bstream/main.go +++ b/cmd/blobstream/main.go @@ -4,7 +4,7 @@ import ( "context" "os" - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/root" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/root" ) func main() { diff --git a/cmd/bstream/orchestrator/cmd.go b/cmd/blobstream/orchestrator/cmd.go similarity index 95% rename from cmd/bstream/orchestrator/cmd.go rename to cmd/blobstream/orchestrator/cmd.go index 8c192440..41fd21bd 100644 --- a/cmd/bstream/orchestrator/cmd.go +++ b/cmd/blobstream/orchestrator/cmd.go @@ -5,12 +5,12 @@ import ( "os" "time" - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/common" - evm2 "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys/evm" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/common" + evm2 "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/keys/evm" "github.com/celestiaorg/orchestrator-relayer/p2p" dssync "github.com/ipfs/go-datastore/sync" - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/keys" "github.com/celestiaorg/orchestrator-relayer/store" "github.com/celestiaorg/orchestrator-relayer/helpers" diff --git a/cmd/bstream/orchestrator/config.go b/cmd/blobstream/orchestrator/config.go similarity index 98% rename from cmd/bstream/orchestrator/config.go rename to cmd/blobstream/orchestrator/config.go index 66fb3c4a..eff7cd24 100644 --- a/cmd/bstream/orchestrator/config.go +++ b/cmd/blobstream/orchestrator/config.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/base" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/base" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/spf13/cobra" ) diff --git a/cmd/bstream/query/cmd.go b/cmd/blobstream/query/cmd.go similarity index 99% rename from cmd/bstream/query/cmd.go rename to cmd/blobstream/query/cmd.go index 7aca0661..ebce6a14 100644 --- a/cmd/bstream/query/cmd.go +++ b/cmd/blobstream/query/cmd.go @@ -12,7 +12,7 @@ import ( common2 "github.com/ethereum/go-ethereum/common" celestiatypes "github.com/celestiaorg/celestia-app/x/blobstream/types" - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/common" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/common" "github.com/celestiaorg/orchestrator-relayer/p2p" "github.com/celestiaorg/orchestrator-relayer/rpc" "github.com/celestiaorg/orchestrator-relayer/types" diff --git a/cmd/bstream/query/config.go b/cmd/blobstream/query/config.go similarity index 96% rename from cmd/bstream/query/config.go rename to cmd/blobstream/query/config.go index b2b05f33..22e6c050 100644 --- a/cmd/bstream/query/config.go +++ b/cmd/blobstream/query/config.go @@ -3,7 +3,7 @@ package query import ( "fmt" - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/relayer" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/relayer" "github.com/spf13/cobra" ) diff --git a/cmd/bstream/relayer/cmd.go b/cmd/blobstream/relayer/cmd.go similarity index 95% rename from cmd/bstream/relayer/cmd.go rename to cmd/blobstream/relayer/cmd.go index a1d35988..4b5e0c83 100644 --- a/cmd/bstream/relayer/cmd.go +++ b/cmd/blobstream/relayer/cmd.go @@ -7,12 +7,12 @@ import ( blobstreamwrapper "github.com/celestiaorg/quantum-gravity-bridge/v2/wrappers/QuantumGravityBridge.sol" - evm2 "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys/evm" + evm2 "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/keys/evm" "github.com/celestiaorg/orchestrator-relayer/p2p" dssync "github.com/ipfs/go-datastore/sync" - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/common" - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/keys" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/common" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/keys" "github.com/celestiaorg/orchestrator-relayer/evm" "github.com/celestiaorg/orchestrator-relayer/helpers" "github.com/celestiaorg/orchestrator-relayer/store" diff --git a/cmd/bstream/relayer/config.go b/cmd/blobstream/relayer/config.go similarity index 98% rename from cmd/bstream/relayer/config.go rename to cmd/blobstream/relayer/config.go index b1cbee1c..a957fc91 100644 --- a/cmd/bstream/relayer/config.go +++ b/cmd/blobstream/relayer/config.go @@ -6,7 +6,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/base" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/base" "github.com/celestiaorg/orchestrator-relayer/evm" "github.com/spf13/cobra" diff --git a/cmd/bstream/root/cmd.go b/cmd/blobstream/root/cmd.go similarity index 55% rename from cmd/bstream/root/cmd.go rename to cmd/blobstream/root/cmd.go index fc1eb85c..ae35cf85 100644 --- a/cmd/bstream/root/cmd.go +++ b/cmd/blobstream/root/cmd.go @@ -1,14 +1,14 @@ package root import ( - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/bootstrapper" - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/generate" - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/query" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/bootstrapper" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/generate" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/query" "github.com/celestiaorg/celestia-app/x/blobstream/client" - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/deploy" - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/orchestrator" - "github.com/celestiaorg/orchestrator-relayer/cmd/bstream/relayer" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/deploy" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/orchestrator" + "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/relayer" "github.com/spf13/cobra" ) @@ -17,7 +17,7 @@ import ( // main function. func Cmd() *cobra.Command { rootCmd := &cobra.Command{ - Use: "bstream", + Use: "blobstream", Short: "The Blobstream CLI", SilenceUsage: true, } diff --git a/docs/bootstrapper.md b/docs/bootstrapper.md index bf404006..a04e4ddc 100644 --- a/docs/bootstrapper.md +++ b/docs/bootstrapper.md @@ -13,7 +13,7 @@ Make sure to have the Blobstream binary installed. Check [the Blobstream binary Before starting the bootstrapper, we will need to init the store: ```ssh -bstream bootstrapper init +blobstream bootstrapper init ``` By default, the store will be created un `~/.bootstrapper`. However, if you want to specify a custom location, you can use the `--home` flag. Or, you can use the following environment variable: @@ -29,7 +29,7 @@ The P2P private key is optional, and a new one will be generated automatically o The `p2p` sub-command will help you set up this key if you want to use a specific one: ```ssh -bstream bootstrapper p2p --help +blobstream bootstrapper p2p --help ``` ### Start the bootstrapper @@ -37,12 +37,12 @@ bstream bootstrapper p2p --help Now that we have the store initialized, we can start the bootstrapper: ```shell -bstream bootstrapper +blobstream bootstrapper Blobstream P2P network bootstrapper command Usage: - bstream bootstrapper [command] + blobstream bootstrapper [command] Aliases: bootstrapper, bs @@ -50,7 +50,7 @@ Aliases: Flags: -h, --help help for bootstrapper -Use "bstream bootstrapper [command] --help" for more information about a command. +Use "blobstream bootstrapper [command] --help" for more information about a command. ``` ### Open the P2P port diff --git a/docs/deploy.md b/docs/deploy.md index 4cd541b7..5c007633 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -10,13 +10,13 @@ description: Learn how to deploy the Blobstream smart contract. The `deploy` is a helper command that allows deploying the Blobstream smart contract to a new EVM chain: ```ssh -bstream deploy --help +blobstream deploy --help Deploys the Blobstream contract and initializes it using the provided Celestia chain Usage: - bstream deploy [flags] - bstream deploy [command] + blobstream deploy [flags] + blobstream deploy [command] Available Commands: keys Blobstream keys manager @@ -33,13 +33,13 @@ Make sure to have the Blobstream binary installed. Check [the Blobstream binary In order to deploy a Blobstream smart contract, you will need a funded EVM address and its private key. The `keys` command will help you set up this key: ```ssh -bstream deploy keys --help +blobstream deploy keys --help ``` To import your EVM private key, there is the `import` subcommand to assist you with that: ```ssh -bstream deploy keys evm import --help +blobstream deploy keys evm import --help ``` This subcommand allows you to either import a raw ECDSA private key provided as plaintext, or import it from a file. The files are JSON keystore files encrypted using a passphrase like in [this example](https://geth.ethereum.org/docs/developers/dapp-developer/native-accounts). @@ -47,7 +47,7 @@ This subcommand allows you to either import a raw ECDSA private key provided as After adding the key, you can check that it's added via running: ```ssh -bstream deploy keys evm list +blobstream deploy keys evm list ``` For more information about the `keys` command, check [the `keys` documentation](https://docs.celestia.org/nodes/blobstream-keys). diff --git a/docs/keys.md b/docs/keys.md index aa44bcdc..e81912a7 100644 --- a/docs/keys.md +++ b/docs/keys.md @@ -11,7 +11,7 @@ The Blobstream `keys` command allows managing EVM private keys and P2P identitie ## Orchestrator command -The `bstream orchestrator keys` command manages keys for the orchestrator. By default, it uses the orchestrator default home directory to store the keys: `~/.orchestrator/keystore`. However, the default home can be changed either by specifying a different directory using the `--home` flag or setting the following environment variable: +The `blobstream orchestrator keys` command manages keys for the orchestrator. By default, it uses the orchestrator default home directory to store the keys: `~/.orchestrator/keystore`. However, the default home can be changed either by specifying a different directory using the `--home` flag or setting the following environment variable: | Variable | Explanation | Default value | Required | |---------------------|---------------------------------------|-------------------|----------| @@ -19,7 +19,7 @@ The `bstream orchestrator keys` command manages keys for the orchestrator. By de ## Relayer command -The `bstream relayer keys` command manages keys for the relayer. By default, it uses the relayer default home directory to store the keys: `~/.relayer/keystore`. However, the default home can be changed either by specifying a different directory using the `--home` flag or setting the following environment variable: +The `blobstream relayer keys` command manages keys for the relayer. By default, it uses the relayer default home directory to store the keys: `~/.relayer/keystore`. However, the default home can be changed either by specifying a different directory using the `--home` flag or setting the following environment variable: | Variable | Explanation | Default value | Required | |---------------------|---------------------------------------|-------------------|----------| @@ -27,7 +27,7 @@ The `bstream relayer keys` command manages keys for the relayer. By default, it ## Deploy command -The `bstream deploy keys` command manages keys for the deployer. By default, it uses the deployer default home directory to store the keys: `~/.deployer/keystore`. However, the default home can be changed either by specifying a different directory using the `--home` flag or setting the following environment variable: +The `blobstream deploy keys` command manages keys for the deployer. By default, it uses the deployer default home directory to store the keys: `~/.deployer/keystore`. However, the default home can be changed either by specifying a different directory using the `--home` flag or setting the following environment variable: | Variable | Explanation | Default value | Required | |---------------------|---------------------------------------|-------------------|----------| @@ -48,12 +48,12 @@ As specified above, aside from the difference in the default home directory, the The examples will use the orchestrator command to access the keys. However, the same behaviour applies to the other commands as well. ```ssh -bstream orchestrator keys --help +blobstream orchestrator keys --help Blobstream keys manager Usage: - bstream orchestrator keys [command] + blobstream orchestrator keys [command] Available Commands: evm Blobstream EVM keys manager @@ -62,7 +62,7 @@ Available Commands: Flags: -h, --help help for keys -Use "bstream orchestrator keys [command] --help" for more information about a command. +Use "blobstream orchestrator keys [command] --help" for more information about a command. ``` ### EVM keystore @@ -72,12 +72,12 @@ The first subcommand of the `keys` command is `evm`. This latter allows managing The EVM keys are `ECDSA` keys using the `secp256k1` curve. The implementation uses `geth` file system keystore [implementation](https://geth.ethereum.org/docs/developers/dapp-developer/native-accounts). Thus, keys can be used interchangeably with any compatible software. ```ssh -bstream orchestrator keys evm --help +blobstream orchestrator keys evm --help Blobstream EVM keys manager Usage: - bstream orchestrator keys evm [command] + blobstream orchestrator keys evm [command] Available Commands: add create a new EVM address @@ -89,7 +89,7 @@ Available Commands: Flags: -h, --help help for evm -Use "bstream orchestrator keys evm [command] --help" for more information about a command. +Use "blobstream orchestrator keys evm [command] --help" for more information about a command. ``` The store also uses the `accounts.StandardScryptN` and `accounts.StandardScryptP` for the `Scrypt` password-based key derivation algorithm to improve its resistance to parallel hardware attacks: @@ -103,12 +103,12 @@ evmKs = keystore.NewKeyStore(evmKeyStorePath(path), keystore.StandardScryptN, ke The `add` subcommand allows creating a new EVM private key and storing it in the keystore: ```ssh -bstream orchestrator keys evm add --help +blobstream orchestrator keys evm add --help create a new EVM address Usage: - bstream orchestrator keys evm add [flags] + blobstream orchestrator keys evm add [flags] ``` The passphrase of the key encryption can be passed as a flag. But it is advised not to pass it as plain text and instead enter it when prompted interactively. @@ -116,7 +116,7 @@ The passphrase of the key encryption can be passed as a flag. But it is advised After creating a new key, you will see its corresponding address printed: ```ssh -bstream orchestrator keys evm add +blobstream orchestrator keys evm add I[2023-04-13|14:16:11.387] successfully opened store path=/home/midnight/.orchestrator I[2023-04-13|14:16:11.387] please provide a passphrase for your account @@ -129,12 +129,12 @@ I[2023-04-13|14:16:30.534] successfully closed store path=/ho The `delete` subcommand allows deleting an EVM private key from store via providing its corresponding address: ```ssh -bstream orchestrator keys evm delete --help +blobstream orchestrator keys evm delete --help delete an EVM addresses from the key store Usage: - bstream orchestrator keys evm delete [flags] + blobstream orchestrator keys evm delete [flags] ``` The provided address should be a `0x` prefixed EVM address. @@ -144,7 +144,7 @@ After running the command, you will be prompted to enter the passphrase for the Then, you will be prompted to confirm that you want to delete that private key. Make sure to verify if you're deleting the right one because once deleted, it can no longer be recovered! ```ssh -bstream orchestrator keys evm delete 0x27a1F8CE94187E4b043f4D57548EF2348Ed556c7 +blobstream orchestrator keys evm delete 0x27a1F8CE94187E4b043f4D57548EF2348Ed556c7 I[2023-04-13|15:01:41.308] successfully opened store path=/home/midnight/.orchestrator I[2023-04-13|15:01:41.309] deleting account address=0x27a1F8CE94187E4b043f4D57548EF2348Ed556c7 @@ -160,7 +160,7 @@ I[2023-04-13|15:01:45.534] successfully closed store path=/ho The `list` subcommand allows listing the existing keys in the keystore: ```ssh -bstream orchestrator keys evm list +blobstream orchestrator keys evm list I[2023-04-13|16:08:45.084] successfully opened store path=/home/midnight/.orchestrator I[2023-04-13|16:08:45.084] listing accounts available in store @@ -175,18 +175,18 @@ You could specify a different home using the `--home` flag to list the keys in a The `update` subcommand allows changing the EVM private key passphrase to a new one. It takes as argument the `0x` prefixed EVM address corresponding to the private key we want to edit. ```ssh -bstream orchestrator evm update --help +blobstream orchestrator evm update --help update an EVM account passphrase Usage: - bstream orchestrator keys evm update [flags] + blobstream orchestrator keys evm update [flags] ``` Example: ```ssh -bstream orchestrator evm update 0x7Dd8F9CAfe6D25165249A454F2d0b72FD149Bbba +blobstream orchestrator evm update 0x7Dd8F9CAfe6D25165249A454F2d0b72FD149Bbba I[2023-04-13|16:21:17.139] successfully opened store path=/home/midnight/.orchestrator I[2023-04-13|16:21:17.140] updating account address=0x7Dd8F9CAfe6D25165249A454F2d0b72FD149Bbba @@ -205,12 +205,12 @@ The `--home` can be specified if the store is not in the default directory. The `import` subcommand allows importing existing private keys into the keystore. It has two subcommands: `ecdsa` and `file`. The first allows importing a private key in plaintext, while the other allows importing a private key from a JSON file secured with a passphrase. ```ssh -bstream orchestrator keys evm import --help +blobstream orchestrator keys evm import --help import evm keys to the keystore Usage: - bstream orchestrator keys evm import [command] + blobstream orchestrator keys evm import [command] Available Commands: ecdsa import an EVM address from an ECDSA private key @@ -219,7 +219,7 @@ Available Commands: Flags: -h, --help help for import -Use "bstream orchestrator keys evm import [command] --help" for more information about a command. +Use "blobstream orchestrator keys evm import [command] --help" for more information about a command. ``` #### EVM: Import ECDSA @@ -229,7 +229,7 @@ For the first one, it takes as argument the private key in plaintext. Then, it p Example: ```ssh -bstream orchestrator keys evm import ecdsa da6ed55cb2894ac2c9c10209c09de8e8b9d109b910338d5bf3d747a7e1fc9eb7 +blobstream orchestrator keys evm import ecdsa da6ed55cb2894ac2c9c10209c09de8e8b9d109b910338d5bf3d747a7e1fc9eb7 I[2023-04-13|17:00:48.617] successfully opened store path=/home/midnight/.orchestrator I[2023-04-13|17:00:48.617] importing account @@ -243,18 +243,18 @@ I[2023-04-13|17:00:51.990] successfully closed store path=/ho For the second, it takes a JSON key file, as defined in [@ethereum/eth-keyfile](https://github.com/ethereum/eth-keyfile), and imports it to your keystore, so it can be used for signatures. ```ssh -bstream orchestrator keys evm import file --help +blobstream orchestrator keys evm import file --help import an EVM address from a file Usage: - bstream orchestrator keys evm import file [flags] + blobstream orchestrator keys evm import file [flags] ``` For example, if we have a file in the current directory containing a private key, we could run the following: ```ssh -bstream orchestrator keys evm import file UTC--2023-04-13T15-00-50.302148204Z--966e6f22781ef6a6a82bbb4db3df8e225dfd9488 +blobstream orchestrator keys evm import file UTC--2023-04-13T15-00-50.302148204Z--966e6f22781ef6a6a82bbb4db3df8e225dfd9488 I[2023-04-13|17:31:53.307] successfully opened store path=/home/midnight/.orchestrator I[2023-04-13|17:31:53.307] importing account @@ -273,12 +273,12 @@ Similar to the above EVM keystore, the P2P store has similar subcommands for han To access the P2P keystore, run the following: ```ssh -bstream orchestrator keys p2p +blobstream orchestrator keys p2p Blobstream p2p keys manager Usage: - bstream orchestrator keys p2p [command] + blobstream orchestrator keys p2p [command] Available Commands: add create a new Ed25519 P2P address @@ -289,7 +289,7 @@ Available Commands: Flags: -h, --help help for p2p -Use "bstream orchestrator keys p2p [command] --help" for more information about a command. +Use "blobstream orchestrator keys p2p [command] --help" for more information about a command. ``` The `orchestrator` could be replaced by `relayer` and the only difference would be the default home directory. Aside from that, all the methods defined for the orchestrator will also work with the relayer. @@ -299,18 +299,18 @@ The `orchestrator` could be replaced by `relayer` and the only difference would The `add` subcommand creates a new p2p key to the p2p store: ```ssh -bstream orchestrator keys p2p add --help +blobstream orchestrator keys p2p add --help create a new Ed25519 P2P address Usage: - bstream orchestrator keys p2p add [flags] + blobstream orchestrator keys p2p add [flags] ``` It takes as argument an optional `` which would be the name that we can use to reference that private key. If not specified, an incremental nickname will be assigned. ```ssh -bstream orchestrator keys p2p add +blobstream orchestrator keys p2p add I[2023-04-13|17:38:17.289] successfully opened store path=/home/midnight/.orchestrator I[2023-04-13|17:38:17.290] generating a new Ed25519 private key nickname=1 @@ -327,12 +327,12 @@ The nickname will be needed in case the orchestrator needs to use a specific pri The `delete` subcommand will delete a P2P private key from store referenced by its nickname: ```ssh -bstream orchestrator keys p2p delete --help +blobstream orchestrator keys p2p delete --help delete an Ed25519 P2P private key from store Usage: - bstream orchestrator keys p2p delete [flags] + blobstream orchestrator keys p2p delete [flags] ``` #### P2P: Import subcommand @@ -340,12 +340,12 @@ Usage: The `import` subcommand will import an existing Ed25519 private key to the store. It takes as argument the nickname that we wish to save the private key under, and the actual private key in hex format without `0x`: ```ssh -bstream orchestrator keys p2p import --help +blobstream orchestrator keys p2p import --help import an existing p2p private key Usage: - bstream orchestrator keys p2p import [flags] + blobstream orchestrator keys p2p import [flags] ``` #### P2P: List subcommand @@ -353,10 +353,10 @@ Usage: The `list` subcommand lists the existing P2P private keys in the store: ```ssh -bstream orchestrator keys p2p list --help +blobstream orchestrator keys p2p list --help list existing p2p addresses Usage: - bstream orchestrator keys p2p list [flags] + blobstream orchestrator keys p2p list [flags] ``` diff --git a/docs/orchestrator.md b/docs/orchestrator.md index 0b999b01..cea2c169 100644 --- a/docs/orchestrator.md +++ b/docs/orchestrator.md @@ -78,7 +78,7 @@ The P2P private key is optional, and a new one will be generated automatically o The `keys` command will help you set up these keys: ```ssh -bstream orchestrator keys --help +blobstream orchestrator keys --help ``` To add an EVM private key, check the next section. @@ -92,7 +92,7 @@ To register an EVM address for your validator, check the section [Register EVM A To import your EVM private key, there is the `import` subcommand to assist you with that: ```ssh -bstream orchestrator keys evm import --help +blobstream orchestrator keys evm import --help ``` This subcommand allows you to either import a raw ECDSA private key provided as plaintext, or import it from a file. The files are JSON keystore files encrypted using a passphrase like in [this example](https://geth.ethereum.org/docs/developers/dapp-developer/native-accounts). @@ -100,7 +100,7 @@ This subcommand allows you to either import a raw ECDSA private key provided as After adding the key, you can check that it's added via running: ```ssh -bstream orchestrator keys evm list +blobstream orchestrator keys evm list ``` For more information about the `keys` command, check [the `keys` documentation](https://docs.celestia.org/nodes/blobstream-keys). @@ -112,18 +112,18 @@ Now that we have the store initialized, we can start the orchestrator. Make sure The orchestrator accepts the following flags: ```ssh -bstream orchestrator start --help +blobstream orchestrator start --help Starts the Blobstream orchestrator to sign attestations Usage: - bstream orchestrator start [flags] + blobstream orchestrator start [flags] ``` To start the orchestrator in the default home directory, run the following: ```ssh -bstream orchestrator start \ +blobstream orchestrator start \ --core.grpc.host localhost \ --core.grpc.port 9090 \ --core.rpc.host localhost \ diff --git a/docs/relayer.md b/docs/relayer.md index bda66970..fd4f1fdc 100644 --- a/docs/relayer.md +++ b/docs/relayer.md @@ -11,7 +11,7 @@ The role of the relayer is to gather attestations' signatures from the orchestra Also, while every validator in the Celestia validator set needs to run an orchestrator, we only need one entity to run the relayer, and it can be anyone. Thus, if you're a validator, most likely you want to read [the orchestrator documentation](https://docs.celestia.org/nodes/blobstream-orchestrator/). -Every relayer needs to target a Blobstream smart contract. This latter can be deployed, if not already, using the `bstream deploy` command. More details in the [Deploy the Blobstream contract guide](https://docs.celestia.org/nodes/blobstream-deploy/). +Every relayer needs to target a Blobstream smart contract. This latter can be deployed, if not already, using the `blobstream deploy` command. More details in the [Deploy the Blobstream contract guide](https://docs.celestia.org/nodes/blobstream-deploy/). ## How it works @@ -45,7 +45,7 @@ Make sure to have the Blobstream binary installed. Check out the [Install the Bl Before starting the relayer, we will need to init the store: ```ssh -bstream relayer init +blobstream relayer init ``` By default, the store will be created un `~/.relayer`. However, if you want to specify a custom location, you can use the `--home` flag. Or, you can use the following environment variable: @@ -68,7 +68,7 @@ The P2P private key is optional, and a new one will be generated automatically o The `keys` command will help you set up these keys: ```ssh -bstream relayer keys --help +blobstream relayer keys --help ``` To add an EVM private key, check the next section. @@ -80,7 +80,7 @@ Because EVM keys are important, we provide a keystore that will help manage them To import your EVM private key, there is the `import` subcommand to assist you with that: ```ssh -bstream relayer keys evm import --help +blobstream relayer keys evm import --help ``` This subcommand allows you to either import a raw ECDSA private key provided as plaintext, or import it from a file. The files are JSON keystore files encrypted using a passphrase like [in this example](https://geth.ethereum.org/docs/developers/dapp-developer/native-accounts). @@ -88,7 +88,7 @@ This subcommand allows you to either import a raw ECDSA private key provided as After adding the key, you can check that it's added via running: ```ssh -bstream relayer keys evm list +blobstream relayer keys evm list ``` For more information about the `keys` command, check [the `keys` documentation](https://docs.celestia.org/nodes/blobstream-keys). @@ -100,18 +100,18 @@ Now that we have the store initialized, and we have a target Blobstream smart co The relayer accepts the following flags: ```ssh -bstream relayer start --help +blobstream relayer start --help Runs the Blobstream relayer to submit attestations to the target EVM chain Usage: - bstream relayer start [flags] + blobstream relayer start [flags] ``` To start the relayer using the default home directory, run the following: ```ssh -/bin/bstream relayer start \ +/bin/blobstream relayer start \ --evm.contract-address=0x27a1F8CE94187E4b043f4D57548EF2348Ed556c7 \ --core.rpc.host=localhost \ --core.rpc.port=26657 \ diff --git a/e2e/Dockerfile_e2e b/e2e/Dockerfile_e2e index 10bfe59a..c65f4773 100644 --- a/e2e/Dockerfile_e2e +++ b/e2e/Dockerfile_e2e @@ -1,4 +1,4 @@ -# stage 1 Build bstream binary +# stage 1 Build blobstream binary FROM golang:1.21.1-alpine as builder RUN apk update && apk --no-cache add make gcc musl-dev git COPY . /orchestrator-relayer @@ -13,9 +13,9 @@ USER root # hadolint ignore=DL3018 RUN apk update && apk --no-cache add bash jq coreutils curl -COPY --from=builder /orchestrator-relayer/build/bstream /bin/bstream +COPY --from=builder /orchestrator-relayer/build/blobstream /bin/blobstream # p2p port EXPOSE 9090 26657 30000 -CMD [ "/bin/bstream" ] +CMD [ "/bin/blobstream" ] diff --git a/e2e/scripts/deploy_qgb_contract.sh b/e2e/scripts/deploy_qgb_contract.sh index 881e7376..b6270353 100644 --- a/e2e/scripts/deploy_qgb_contract.sh +++ b/e2e/scripts/deploy_qgb_contract.sh @@ -59,11 +59,11 @@ do done # import keys to deployer -/bin/bstream deploy keys evm import ecdsa "${PRIVATE_KEY}" --evm.passphrase=123 +/bin/blobstream deploy keys evm import ecdsa "${PRIVATE_KEY}" --evm.passphrase=123 echo "deploying Blobstream contract..." -/bin/bstream deploy \ +/bin/blobstream deploy \ --evm.chain-id "${EVM_CHAIN_ID}" \ --evm.account "${EVM_ACCOUNT}" \ --core.grpc.host "${CORE_GRPC_HOST}" \ diff --git a/e2e/scripts/start_orchestrator_after_validator_created.sh b/e2e/scripts/start_orchestrator_after_validator_created.sh index 9b840207..fbbf199c 100644 --- a/e2e/scripts/start_orchestrator_after_validator_created.sh +++ b/e2e/scripts/start_orchestrator_after_validator_created.sh @@ -36,18 +36,18 @@ do done # initialize orchestrator -/bin/bstream orch init +/bin/blobstream orch init # add keys to keystore -/bin/bstream orch keys evm import ecdsa "${PRIVATE_KEY}" --evm.passphrase 123 +/bin/blobstream orch keys evm import ecdsa "${PRIVATE_KEY}" --evm.passphrase 123 # start orchestrator if [[ -z "${P2P_BOOTSTRAPPERS}" ]] then # import the p2p key to use - /bin/bstream orchestrator keys p2p import key "${P2P_IDENTITY}" + /bin/blobstream orchestrator keys p2p import key "${P2P_IDENTITY}" - /bin/bstream orchestrator start \ + /bin/blobstream orchestrator start \ --evm.account="${EVM_ACCOUNT}" \ --core.rpc.host="${CORE_RPC_HOST}" \ --core.rpc.port="${CORE_RPC_PORT}" \ @@ -60,7 +60,7 @@ else # to give time for the bootstrappers to be up sleep 5s - /bin/bstream orchestrator start \ + /bin/blobstream orchestrator start \ --evm.account="${EVM_ACCOUNT}" \ --core.rpc.host="${CORE_RPC_HOST}" \ --core.rpc.port="${CORE_RPC_PORT}" \ diff --git a/e2e/scripts/start_relayer.sh b/e2e/scripts/start_relayer.sh index f03a7590..37f9c215 100644 --- a/e2e/scripts/start_relayer.sh +++ b/e2e/scripts/start_relayer.sh @@ -46,14 +46,14 @@ fi BLOBSTREAM_CONTRACT=$(cat /opt/blobstream_address.txt) # init the relayer -/bin/bstream relayer init +/bin/blobstream relayer init # import keys to relayer -/bin/bstream relayer keys evm import ecdsa "${PRIVATE_KEY}" --evm.passphrase 123 +/bin/blobstream relayer keys evm import ecdsa "${PRIVATE_KEY}" --evm.passphrase 123 # to give time for the bootstrappers to be up sleep 5s -/bin/bstream relayer start \ +/bin/blobstream relayer start \ --evm.account="${EVM_ACCOUNT}" \ --core.rpc.host="${CORE_RPC_HOST}" \ --core.rpc.port="${CORE_RPC_PORT}" \ From 7fb36dbee9ba52a77bdf13e8bf09f2669c4a74bb Mon Sep 17 00:00:00 2001 From: rachid Date: Thu, 12 Oct 2023 00:38:38 +0200 Subject: [PATCH 04/17] chore: fix imports --- cmd/blobstream/deploy/cmd.go | 2 +- cmd/blobstream/query/cmd.go | 2 +- cmd/blobstream/root/cmd.go | 2 +- e2e/qgb_network.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/blobstream/deploy/cmd.go b/cmd/blobstream/deploy/cmd.go index cf2ddcce..2866d4e4 100644 --- a/cmd/blobstream/deploy/cmd.go +++ b/cmd/blobstream/deploy/cmd.go @@ -13,7 +13,7 @@ import ( "github.com/celestiaorg/celestia-app/app" "github.com/celestiaorg/celestia-app/app/encoding" - "github.com/celestiaorg/celestia-app/x/blobstream/types" + "github.com/celestiaorg/celestia-app/x/qgb/types" "github.com/celestiaorg/orchestrator-relayer/evm" "github.com/celestiaorg/orchestrator-relayer/rpc" "github.com/celestiaorg/orchestrator-relayer/store" diff --git a/cmd/blobstream/query/cmd.go b/cmd/blobstream/query/cmd.go index ebce6a14..200954c4 100644 --- a/cmd/blobstream/query/cmd.go +++ b/cmd/blobstream/query/cmd.go @@ -11,7 +11,7 @@ import ( common2 "github.com/ethereum/go-ethereum/common" - celestiatypes "github.com/celestiaorg/celestia-app/x/blobstream/types" + celestiatypes "github.com/celestiaorg/celestia-app/x/qgb/types" "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/common" "github.com/celestiaorg/orchestrator-relayer/p2p" "github.com/celestiaorg/orchestrator-relayer/rpc" diff --git a/cmd/blobstream/root/cmd.go b/cmd/blobstream/root/cmd.go index ae35cf85..3d955c0a 100644 --- a/cmd/blobstream/root/cmd.go +++ b/cmd/blobstream/root/cmd.go @@ -5,7 +5,7 @@ import ( "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/generate" "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/query" - "github.com/celestiaorg/celestia-app/x/blobstream/client" + "github.com/celestiaorg/celestia-app/x/qgb/client" "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/deploy" "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/orchestrator" "github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/relayer" diff --git a/e2e/qgb_network.go b/e2e/qgb_network.go index 140b892d..a68704df 100644 --- a/e2e/qgb_network.go +++ b/e2e/qgb_network.go @@ -23,7 +23,7 @@ import ( "github.com/celestiaorg/celestia-app/app" "github.com/celestiaorg/celestia-app/app/encoding" - "github.com/celestiaorg/celestia-app/x/blobstream/types" + "github.com/celestiaorg/celestia-app/x/qgb/types" "github.com/celestiaorg/orchestrator-relayer/p2p" "github.com/celestiaorg/orchestrator-relayer/rpc" blobstreamtypes "github.com/celestiaorg/orchestrator-relayer/types" From 0aa1925d8b39689c9564d1ea7210cc8e18560dbd Mon Sep 17 00:00:00 2001 From: rachid Date: Thu, 12 Oct 2023 00:44:02 +0200 Subject: [PATCH 05/17] chore: residual change --- rpc/suite_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc/suite_test.go b/rpc/suite_test.go index 9fbc055c..7180a633 100644 --- a/rpc/suite_test.go +++ b/rpc/suite_test.go @@ -25,7 +25,7 @@ type QuerierTestSuite struct { func (s *QuerierTestSuite) SetupSuite() { t := s.T() ctx := context.Background() - s.Network = blobstreamtesting.NewCelestiaNetwork(ctx, t) + s.Network = blobstreamtesting.NewCelestiaNetwork(ctx, t, blobstreamtesting.DefaultCelestiaNetworkParams()) _, err := s.Network.WaitForHeightWithTimeout(400, 30*time.Second) s.EncConf = encoding.MakeConfig(app.ModuleEncodingRegisters...) s.Logger = tmlog.NewNopLogger() From 62b93b451501a6a0bde90ba2a06ee74bd03b426f Mon Sep 17 00:00:00 2001 From: CHAMI Rachid Date: Thu, 12 Oct 2023 00:55:12 +0200 Subject: [PATCH 06/17] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e5a52882..caa342e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # stage 1 Build blobstream binary -FROM --platform=$BUILDPLATFORM docker.io/golang:1.21.2-alpine3.18 as builder +FROM --platform=$BUILDPLATFORM docker.io/golang:1.21.3-alpine3.18 as builder RUN apk update && apk --no-cache add make gcc musl-dev git bash COPY . /orchestrator-relayer From 09370aa5a97128cd0d0cfd9c5983074eb2ffc64c Mon Sep 17 00:00:00 2001 From: CHAMI Rachid Date: Thu, 12 Oct 2023 00:55:18 +0200 Subject: [PATCH 07/17] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 76f9bb53..b6b6617a 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Contains the implementation of the Blobstream orchestrator and relayer. The orchestrator is the software that signs the Blobstream attestations, and the relayer is the one that relays them to the target EVM chain. -For a high-level overview of how the Blobstream works, check [here](https://github.com/celestiaorg/quantum-gravity-bridge/tree/76efeca0be1a17d32ef633c0fdbd3c8f5e4cc53f#how-it-works) and [here](https://blog.celestia.org/celestiums/). +For a high-level overview of how Blobstream works, check [here](https://github.com/celestiaorg/quantum-gravity-bridge/tree/76efeca0be1a17d32ef633c0fdbd3c8f5e4cc53f#how-it-works) and [here](https://blog.celestia.org/celestiums/). ## Install From f9e3cf4820399b0d37e11f45a6ab235a578cc251 Mon Sep 17 00:00:00 2001 From: CHAMI Rachid Date: Thu, 12 Oct 2023 00:55:23 +0200 Subject: [PATCH 08/17] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b6b6617a..67975349 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Contains the implementation of the Blobstream orchestrator and relayer. -The orchestrator is the software that signs the Blobstream attestations, and the relayer is the one that relays them to the target EVM chain. +The orchestrator is the software that signs Blobstream attestations, and the relayer is the one that relays them to the target EVM chain. For a high-level overview of how Blobstream works, check [here](https://github.com/celestiaorg/quantum-gravity-bridge/tree/76efeca0be1a17d32ef633c0fdbd3c8f5e4cc53f#how-it-works) and [here](https://blog.celestia.org/celestiums/). From b2bef5a1a69af797b4da34de8f97f61609e82274 Mon Sep 17 00:00:00 2001 From: rachid Date: Thu, 12 Oct 2023 01:19:16 +0200 Subject: [PATCH 09/17] chore: update the e2e genesis --- ...64e2a69d5557b0d35ec8b9d423785b12579b7.json | 1 - ...4a671b839639ed638fd4140f797ddadb3c2f1.json | 1 + e2e/celestia-app/genesis.json | 32 ++++++++++--------- e2e/celestia-app/genesis_template.json | 32 ++++++++++--------- 4 files changed, 35 insertions(+), 31 deletions(-) delete mode 100644 e2e/celestia-app/core0/config/gentx/gentx-40664e2a69d5557b0d35ec8b9d423785b12579b7.json create mode 100644 e2e/celestia-app/core0/config/gentx/gentx-de74a671b839639ed638fd4140f797ddadb3c2f1.json diff --git a/e2e/celestia-app/core0/config/gentx/gentx-40664e2a69d5557b0d35ec8b9d423785b12579b7.json b/e2e/celestia-app/core0/config/gentx/gentx-40664e2a69d5557b0d35ec8b9d423785b12579b7.json deleted file mode 100644 index ef81cc67..00000000 --- a/e2e/celestia-app/core0/config/gentx/gentx-40664e2a69d5557b0d35ec8b9d423785b12579b7.json +++ /dev/null @@ -1 +0,0 @@ -{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"qgb-e2e","identity":"","website":"","security_contact":"","details":""},"commission":{"rate":"0.100000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"celestia1p2gvpwa7svxd5t7d2zjc0u7gsh2537sjx3cq3a","validator_address":"celestiavaloper1p2gvpwa7svxd5t7d2zjc0u7gsh2537sjrw6e8m","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"op2bcHACpdcKUxbdTmDnW2aTXpdZod37uYZBUeHhPlk="},"value":{"denom":"utia","amount":"5000000000"}}],"memo":"40664e2a69d5557b0d35ec8b9d423785b12579b7@192.168.122.1:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AsIx/It5+oWua4C/oHtVy6Ns3/z3omXy10uuKSVINbas"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"210000","payer":"","granter":""},"tip":null},"signatures":["PJugSCNf0gV/E9kvmwqnY8cAHE1sMzEwqbL7trr+HX9zFi5xfE/9oz2GNv9GbKthyv86Quk2bm9ZJTYz230yXQ=="]} diff --git a/e2e/celestia-app/core0/config/gentx/gentx-de74a671b839639ed638fd4140f797ddadb3c2f1.json b/e2e/celestia-app/core0/config/gentx/gentx-de74a671b839639ed638fd4140f797ddadb3c2f1.json new file mode 100644 index 00000000..d6df2326 --- /dev/null +++ b/e2e/celestia-app/core0/config/gentx/gentx-de74a671b839639ed638fd4140f797ddadb3c2f1.json @@ -0,0 +1 @@ +{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"blobstream-e2e","identity":"","website":"","security_contact":"","details":""},"commission":{"rate":"0.100000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"celestia1p2gvpwa7svxd5t7d2zjc0u7gsh2537sjx3cq3a","validator_address":"celestiavaloper1p2gvpwa7svxd5t7d2zjc0u7gsh2537sjrw6e8m","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"bYso1zvhv8DD3mUM688cUff7U90670GM1fjnMzAbGfg="},"value":{"denom":"utia","amount":"5000000000"}}],"memo":"de74a671b839639ed638fd4140f797ddadb3c2f1@192.168.122.1:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AsIx/It5+oWua4C/oHtVy6Ns3/z3omXy10uuKSVINbas"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"210000","payer":"","granter":""},"tip":null},"signatures":["ixd1gyJnu7JHEHfrEkXoerUNjIDweOcyM87Hfp8ByHtG+wrXgjiNLxHV6MLg29CjiwgCj5EEeyc2o5Y8OJW5/w=="]} diff --git a/e2e/celestia-app/genesis.json b/e2e/celestia-app/genesis.json index a21c7e3e..a009ac65 100644 --- a/e2e/celestia-app/genesis.json +++ b/e2e/celestia-app/genesis.json @@ -1,16 +1,16 @@ { - "genesis_time": "2023-08-19T12:26:21.927143572Z", + "genesis_time": "2023-10-11T23:14:10.887740385Z", "chain_id": "blobstream-e2e", "initial_height": "1", "consensus_params": { "block": { - "max_bytes": "22020096", + "max_bytes": "1974272", "max_gas": "-1", - "time_iota_ms": "1000" + "time_iota_ms": "1" }, "evidence": { - "max_age_num_blocks": "100000", - "max_age_duration": "172800000000000", + "max_age_num_blocks": "120961", + "max_age_duration": "1814400000000000", "max_bytes": "1048576" }, "validator": { @@ -18,7 +18,9 @@ "ed25519" ] }, - "version": {} + "version": { + "app_version": "1" + } }, "app_hash": "", "app_state": { @@ -204,7 +206,7 @@ "validator_address": "celestiavaloper1p2gvpwa7svxd5t7d2zjc0u7gsh2537sjrw6e8m", "pubkey": { "@type": "/cosmos.crypto.ed25519.PubKey", - "key": "op2bcHACpdcKUxbdTmDnW2aTXpdZod37uYZBUeHhPlk=" + "key": "bYso1zvhv8DD3mUM688cUff7U90670GM1fjnMzAbGfg=" }, "value": { "denom": "utia", @@ -212,7 +214,7 @@ } } ], - "memo": "40664e2a69d5557b0d35ec8b9d423785b12579b7@192.168.122.1:26656", + "memo": "de74a671b839639ed638fd4140f797ddadb3c2f1@192.168.122.1:26656", "timeout_height": "0", "extension_options": [], "non_critical_extension_options": [] @@ -241,7 +243,7 @@ "tip": null }, "signatures": [ - "PJugSCNf0gV/E9kvmwqnY8cAHE1sMzEwqbL7trr+HX9zFi5xfE/9oz2GNv9GbKthyv86Quk2bm9ZJTYz230yXQ==" + "ixd1gyJnu7JHEHfrEkXoerUNjIDweOcyM87Hfp8ByHtG+wrXgjiNLxHV6MLg29CjiwgCj5EEeyc2o5Y8OJW5/w==" ] } ] @@ -255,7 +257,7 @@ "min_deposit": [ { "denom": "utia", - "amount": "100" + "amount": "10000000000" } ], "max_deposit_period": "172800s" @@ -313,11 +315,11 @@ }, "slashing": { "params": { - "signed_blocks_window": "100", - "min_signed_per_window": "0.500000000000000000", - "downtime_jail_duration": "600s", - "slash_fraction_double_sign": "0.050000000000000000", - "slash_fraction_downtime": "0.010000000000000000" + "signed_blocks_window": "5000", + "min_signed_per_window": "0.750000000000000000", + "downtime_jail_duration": "60s", + "slash_fraction_double_sign": "0.020000000000000000", + "slash_fraction_downtime": "0.000000000000000000" }, "signing_infos": [], "missed_blocks": [] diff --git a/e2e/celestia-app/genesis_template.json b/e2e/celestia-app/genesis_template.json index 83035d45..a009ac65 100644 --- a/e2e/celestia-app/genesis_template.json +++ b/e2e/celestia-app/genesis_template.json @@ -1,16 +1,16 @@ { - "genesis_time": "", + "genesis_time": "2023-10-11T23:14:10.887740385Z", "chain_id": "blobstream-e2e", "initial_height": "1", "consensus_params": { "block": { - "max_bytes": "22020096", + "max_bytes": "1974272", "max_gas": "-1", - "time_iota_ms": "1000" + "time_iota_ms": "1" }, "evidence": { - "max_age_num_blocks": "100000", - "max_age_duration": "172800000000000", + "max_age_num_blocks": "120961", + "max_age_duration": "1814400000000000", "max_bytes": "1048576" }, "validator": { @@ -18,7 +18,9 @@ "ed25519" ] }, - "version": {} + "version": { + "app_version": "1" + } }, "app_hash": "", "app_state": { @@ -204,7 +206,7 @@ "validator_address": "celestiavaloper1p2gvpwa7svxd5t7d2zjc0u7gsh2537sjrw6e8m", "pubkey": { "@type": "/cosmos.crypto.ed25519.PubKey", - "key": "op2bcHACpdcKUxbdTmDnW2aTXpdZod37uYZBUeHhPlk=" + "key": "bYso1zvhv8DD3mUM688cUff7U90670GM1fjnMzAbGfg=" }, "value": { "denom": "utia", @@ -212,7 +214,7 @@ } } ], - "memo": "40664e2a69d5557b0d35ec8b9d423785b12579b7@192.168.122.1:26656", + "memo": "de74a671b839639ed638fd4140f797ddadb3c2f1@192.168.122.1:26656", "timeout_height": "0", "extension_options": [], "non_critical_extension_options": [] @@ -241,7 +243,7 @@ "tip": null }, "signatures": [ - "PJugSCNf0gV/E9kvmwqnY8cAHE1sMzEwqbL7trr+HX9zFi5xfE/9oz2GNv9GbKthyv86Quk2bm9ZJTYz230yXQ==" + "ixd1gyJnu7JHEHfrEkXoerUNjIDweOcyM87Hfp8ByHtG+wrXgjiNLxHV6MLg29CjiwgCj5EEeyc2o5Y8OJW5/w==" ] } ] @@ -255,7 +257,7 @@ "min_deposit": [ { "denom": "utia", - "amount": "100" + "amount": "10000000000" } ], "max_deposit_period": "172800s" @@ -313,11 +315,11 @@ }, "slashing": { "params": { - "signed_blocks_window": "100", - "min_signed_per_window": "0.500000000000000000", - "downtime_jail_duration": "600s", - "slash_fraction_double_sign": "0.050000000000000000", - "slash_fraction_downtime": "0.010000000000000000" + "signed_blocks_window": "5000", + "min_signed_per_window": "0.750000000000000000", + "downtime_jail_duration": "60s", + "slash_fraction_double_sign": "0.020000000000000000", + "slash_fraction_downtime": "0.000000000000000000" }, "signing_infos": [], "missed_blocks": [] From 99db812c1dfc0d852f4fc7aa1f9a54bc4464ee04 Mon Sep 17 00:00:00 2001 From: rachid Date: Thu, 12 Oct 2023 01:30:10 +0200 Subject: [PATCH 10/17] chore: remaining changes --- e2e/scripts/start_core0.sh | 4 ++-- e2e/scripts/start_node_and_create_validator.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/e2e/scripts/start_core0.sh b/e2e/scripts/start_core0.sh index 5e688ec9..97a6d6b2 100644 --- a/e2e/scripts/start_core0.sh +++ b/e2e/scripts/start_core0.sh @@ -33,14 +33,14 @@ fi VAL_ADDRESS=$(celestia-appd keys show core0 --keyring-backend test --bech=val --home /opt -a) # Register the validator EVM address - celestia-appd tx blobstream register \ + celestia-appd tx qgb register \ "${VAL_ADDRESS}" \ 0x966e6f22781EF6a6A82BBB4DB3df8E225DfD9488 \ --from core0 \ --home /opt \ --fees "30000utia" \ -b block \ - --chain-id="qgb-e2e" \ + --chain-id="blobstream-e2e" \ --yes } & diff --git a/e2e/scripts/start_node_and_create_validator.sh b/e2e/scripts/start_node_and_create_validator.sh index 9533413f..1a7d4d07 100644 --- a/e2e/scripts/start_node_and_create_validator.sh +++ b/e2e/scripts/start_node_and_create_validator.sh @@ -44,7 +44,7 @@ fi --amount="${AMOUNT}" \ --pubkey="$(celestia-appd tendermint show-validator --home "${CELESTIA_HOME}")" \ --moniker="${MONIKER}" \ - --chain-id="qgb-e2e" \ + --chain-id="blobstream-e2e" \ --commission-rate=0.1 \ --commission-max-rate=0.2 \ --commission-max-change-rate=0.01 \ @@ -70,7 +70,7 @@ fi --from "${MONIKER}" \ --home "${CELESTIA_HOME}" \ --fees "30000utia" -b block \ - --chain-id="qgb-e2e" \ + --chain-id="blobstream-e2e" \ --yes } & From dbf3897ffaecfe328adb97bab2a05a7487c2f281 Mon Sep 17 00:00:00 2001 From: rachid Date: Thu, 12 Oct 2023 01:31:28 +0200 Subject: [PATCH 11/17] chore: to be reverted --- e2e/Service.go | 1 + 1 file changed, 1 insertion(+) diff --git a/e2e/Service.go b/e2e/Service.go index fc1b01fa..e506a005 100644 --- a/e2e/Service.go +++ b/e2e/Service.go @@ -8,6 +8,7 @@ const ( Core0 Service = iota Core0Orch Core1 + Core1Orch Core2 Core2Orch From 4414eac15aabd4dbe71945db02272a2478816ab5 Mon Sep 17 00:00:00 2001 From: rachid Date: Thu, 12 Oct 2023 01:31:39 +0200 Subject: [PATCH 12/17] chore: revert --- e2e/Service.go | 1 - 1 file changed, 1 deletion(-) diff --git a/e2e/Service.go b/e2e/Service.go index e506a005..fc1b01fa 100644 --- a/e2e/Service.go +++ b/e2e/Service.go @@ -8,7 +8,6 @@ const ( Core0 Service = iota Core0Orch Core1 - Core1Orch Core2 Core2Orch From 7569d90c05ca26bac09a66478d19611e381eb11d Mon Sep 17 00:00:00 2001 From: rachid Date: Thu, 12 Oct 2023 01:39:32 +0200 Subject: [PATCH 13/17] chore: fix e2e --- e2e/celestia-app/core0/config/node_key.json | 2 +- e2e/celestia-app/core0/config/priv_validator_key.json | 6 +++--- e2e/celestia-app/genesis.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/e2e/celestia-app/core0/config/node_key.json b/e2e/celestia-app/core0/config/node_key.json index 854f27e2..7c7ec962 100644 --- a/e2e/celestia-app/core0/config/node_key.json +++ b/e2e/celestia-app/core0/config/node_key.json @@ -1 +1 @@ -{"priv_key":{"type":"tendermint/PrivKeyEd25519","value":"UBoGaJ3RKtemvZDfHxi7iD6V63+xovKmTDW3kC9VROxkAuNh13cNysawBtEHqZGBL6vOJfsl8oExXHMpiVn8lg=="}} \ No newline at end of file +{"priv_key":{"type":"tendermint/PrivKeyEd25519","value":"e7Js9od4TAqfyihJrc3+zFo9bQCEX0PD0ho5NJ2jjCfMh/nz645apZWJLLnlFa1iP376gJrJLnpDUN4tfXPb3w=="}} \ No newline at end of file diff --git a/e2e/celestia-app/core0/config/priv_validator_key.json b/e2e/celestia-app/core0/config/priv_validator_key.json index 15a48d24..b25f4db9 100644 --- a/e2e/celestia-app/core0/config/priv_validator_key.json +++ b/e2e/celestia-app/core0/config/priv_validator_key.json @@ -1,11 +1,11 @@ { - "address": "6B6C0A34D67E7E7CDDDA9EE525F7E56BBCB00449", + "address": "EB7463ED828FEB5FED88364EBB272044A0FD2990", "pub_key": { "type": "tendermint/PubKeyEd25519", - "value": "op2bcHACpdcKUxbdTmDnW2aTXpdZod37uYZBUeHhPlk=" + "value": "bYso1zvhv8DD3mUM688cUff7U90670GM1fjnMzAbGfg=" }, "priv_key": { "type": "tendermint/PrivKeyEd25519", - "value": "tdTqBDW51HtVCwavRABzBy2hBtlu0j7tlofLU77jh9+inZtwcAKl1wpTFt1OYOdbZpNel1mh3fu5hkFR4eE+WQ==" + "value": "itECjJ4X7YWn18RxDrNpQoXz8OI3VyBxv8PJOEGvUe5tiyjXO+G/wMPeZQzrzxxR9/tT3TrvQYzV+OczMBsZ+A==" } } \ No newline at end of file diff --git a/e2e/celestia-app/genesis.json b/e2e/celestia-app/genesis.json index a009ac65..7193f14f 100644 --- a/e2e/celestia-app/genesis.json +++ b/e2e/celestia-app/genesis.json @@ -1,5 +1,5 @@ { - "genesis_time": "2023-10-11T23:14:10.887740385Z", + "genesis_time": "2023-10-11T23:39:11.204736683Z", "chain_id": "blobstream-e2e", "initial_height": "1", "consensus_params": { From f20413c36ab0f85ae795c748590428173e062dad Mon Sep 17 00:00:00 2001 From: rachid Date: Thu, 12 Oct 2023 01:44:52 +0200 Subject: [PATCH 14/17] chore: rename file --- .../{deploy_qgb_contract.sh => deploy_blobstream_contract.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename e2e/scripts/{deploy_qgb_contract.sh => deploy_blobstream_contract.sh} (100%) diff --git a/e2e/scripts/deploy_qgb_contract.sh b/e2e/scripts/deploy_blobstream_contract.sh similarity index 100% rename from e2e/scripts/deploy_qgb_contract.sh rename to e2e/scripts/deploy_blobstream_contract.sh From 0b70c66dba0d39135aa5dcc59bfe9eed7f0a41df Mon Sep 17 00:00:00 2001 From: rachid Date: Thu, 12 Oct 2023 01:55:44 +0200 Subject: [PATCH 15/17] chore: fix core0 p2p ID --- e2e/celestia-app/genesis.json | 2 +- e2e/scripts/start_node_and_create_validator.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/celestia-app/genesis.json b/e2e/celestia-app/genesis.json index 7193f14f..26ae6599 100644 --- a/e2e/celestia-app/genesis.json +++ b/e2e/celestia-app/genesis.json @@ -1,5 +1,5 @@ { - "genesis_time": "2023-10-11T23:39:11.204736683Z", + "genesis_time": "2023-10-11T23:54:12.784756260Z", "chain_id": "blobstream-e2e", "initial_height": "1", "consensus_params": { diff --git a/e2e/scripts/start_node_and_create_validator.sh b/e2e/scripts/start_node_and_create_validator.sh index 1a7d4d07..0c399b87 100644 --- a/e2e/scripts/start_node_and_create_validator.sh +++ b/e2e/scripts/start_node_and_create_validator.sh @@ -78,5 +78,5 @@ fi celestia-appd start \ --home="${CELESTIA_HOME}" \ --moniker="${MONIKER}" \ ---p2p.persistent_peers=40664e2a69d5557b0d35ec8b9d423785b12579b7@core0:26656 \ +--p2p.persistent_peers=c7a982ec9ef3af4f0846cb30e439cd70d961ce6e@core0:26656 \ --rpc.laddr=tcp://0.0.0.0:26657 From f0ad7a5d34f9d2562125e3b3575c8d5bf002126d Mon Sep 17 00:00:00 2001 From: rachid Date: Thu, 12 Oct 2023 01:58:07 +0200 Subject: [PATCH 16/17] chore: fix core0 p2p ID --- e2e/celestia-app/genesis.json | 2 +- e2e/scripts/start_node_and_create_validator.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/celestia-app/genesis.json b/e2e/celestia-app/genesis.json index 26ae6599..8b07d56e 100644 --- a/e2e/celestia-app/genesis.json +++ b/e2e/celestia-app/genesis.json @@ -1,5 +1,5 @@ { - "genesis_time": "2023-10-11T23:54:12.784756260Z", + "genesis_time": "2023-10-11T23:57:54.655221669Z", "chain_id": "blobstream-e2e", "initial_height": "1", "consensus_params": { diff --git a/e2e/scripts/start_node_and_create_validator.sh b/e2e/scripts/start_node_and_create_validator.sh index 0c399b87..4530efae 100644 --- a/e2e/scripts/start_node_and_create_validator.sh +++ b/e2e/scripts/start_node_and_create_validator.sh @@ -78,5 +78,5 @@ fi celestia-appd start \ --home="${CELESTIA_HOME}" \ --moniker="${MONIKER}" \ ---p2p.persistent_peers=c7a982ec9ef3af4f0846cb30e439cd70d961ce6e@core0:26656 \ +--p2p.persistent_peers=de74a671b839639ed638fd4140f797ddadb3c2f1@core0:26656 \ --rpc.laddr=tcp://0.0.0.0:26657 From b4bf813938c1779e6c7c229fbbd6b88a6a055cfc Mon Sep 17 00:00:00 2001 From: rachid Date: Fri, 13 Oct 2023 13:09:37 +0200 Subject: [PATCH 17/17] fix: use qgb instread of blobstream in command --- e2e/scripts/start_node_and_create_validator.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/scripts/start_node_and_create_validator.sh b/e2e/scripts/start_node_and_create_validator.sh index 4530efae..cbdb5755 100644 --- a/e2e/scripts/start_node_and_create_validator.sh +++ b/e2e/scripts/start_node_and_create_validator.sh @@ -64,7 +64,7 @@ fi done # Register the validator EVM address - celestia-appd tx blobstream register \ + celestia-appd tx qgb register \ "${VAL_ADDRESS}" \ "${EVM_ACCOUNT}" \ --from "${MONIKER}" \