Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Commit

Permalink
chore!: rename QGB to BlobStream
Browse files Browse the repository at this point in the history
  • Loading branch information
rach-id committed Oct 10, 2023
1 parent 84bdf4f commit 0ca9eab
Show file tree
Hide file tree
Showing 76 changed files with 531 additions and 531 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
uses: goreleaser/[email protected]
with:
args: release --rm-dist
workdir: ./cmd/qgb
workdir: ./cmd/bstream
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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}
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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).
2 changes: 1 addition & 1 deletion cmd/qgb/base/config.go → cmd/bstream/base/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<service_name_in_upper_case>_HOME`. If not set, then reverts to using
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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,
}

Expand Down Expand Up @@ -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
}
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
)

Expand All @@ -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)
Expand Down Expand Up @@ -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
}

Expand Down
8 changes: 4 additions & 4 deletions cmd/qgb/common/helpers.go → cmd/bstream/common/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
Expand All @@ -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 {
Expand Down Expand Up @@ -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
}
Expand Down
18 changes: 9 additions & 9 deletions cmd/qgb/deploy/cmd.go → cmd/bstream/deploy/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Check failure on line 16 in cmd/bstream/deploy/cmd.go

View workflow job for this annotation

GitHub Actions / test

cannot find module providing package github.com/celestiaorg/celestia-app/x/blobstream/types: import lookup disabled by -mod=readonly

Check failure on line 16 in cmd/bstream/deploy/cmd.go

View workflow job for this annotation

GitHub Actions / test-coverage

no required module provides package github.com/celestiaorg/celestia-app/x/blobstream/types; to add it:

Check failure on line 16 in cmd/bstream/deploy/cmd.go

View workflow job for this annotation

GitHub Actions / test-race

cannot find module providing package github.com/celestiaorg/celestia-app/x/blobstream/types: import lookup disabled by -mod=readonly
"github.com/celestiaorg/orchestrator-relayer/evm"
"github.com/celestiaorg/orchestrator-relayer/rpc"
"github.com/celestiaorg/orchestrator-relayer/store"
Expand All @@ -25,7 +25,7 @@ import (
func Command() *cobra.Command {
command := &cobra.Command{
Use: "deploy <flags>",
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 {
Expand All @@ -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
}

Expand All @@ -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",
)
}

Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions cmd/qgb/deploy/config.go → cmd/bstream/deploy/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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.",
Expand All @@ -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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions cmd/qgb/keys/evm/config.go → cmd/bstream/keys/evm/config.go
Original file line number Diff line number Diff line change
@@ -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"
)
Expand All @@ -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
}
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions cmd/qgb/keys/evm/evm.go → cmd/bstream/keys/evm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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,
}

Expand Down
6 changes: 3 additions & 3 deletions cmd/qgb/keys/keys.go → cmd/bstream/keys/keys.go
Original file line number Diff line number Diff line change
@@ -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,
}

Expand Down
Loading

0 comments on commit 0ca9eab

Please sign in to comment.