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

Commit

Permalink
chore: bstream -> blobstream
Browse files Browse the repository at this point in the history
  • Loading branch information
rach-id committed Oct 11, 2023
1 parent 25d8251 commit 3a456b5
Show file tree
Hide file tree
Showing 69 changed files with 461 additions and 461 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

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/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}
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 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"
Expand All @@ -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"
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 Blobstream orchestrator and relayer.
Contains the implementation of the Bloblobstream 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 Bloblobstream 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 Bloblobstream 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 Bloblobstream CLI

```shell
make install
Expand All @@ -20,16 +20,16 @@ make install

```sh
# Print help
bstream --help
blobstream --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 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 Bloblobstream 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 Bloblobstream 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 Bloblobstream 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 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
Expand All @@ -53,10 +53,10 @@ make fmt

## Useful links

The smart contract implementation is in [blobstream-contracts](https://github.com/celestiaorg/blobstream-contracts).
The smart contract implementation is in [bloblobstream-contracts](https://github.com/celestiaorg/bloblobstream-contracts).

The state machine implementation is in [x/blobstream](https://github.com/celestiaorg/celestia-app/tree/main/x/blobstream).
The state machine implementation is in [x/bloblobstream](https://github.com/celestiaorg/celestia-app/tree/main/x/bloblobstream).

Blobstream ADRs are in the [docs](https://github.com/celestiaorg/celestia-app/tree/main/docs/architecture).
Bloblobstream 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).
Bloblobstream design explained in this [blog](https://blog.celestia.org/celestiums).
2 changes: 1 addition & 1 deletion 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 Blobstream store path for
// DefaultServicePath constructs the default Bloblobstream 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
8 changes: 4 additions & 4 deletions cmd/bstream/bootstrapper/cmd.go
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/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"
Expand All @@ -21,7 +21,7 @@ func Command() *cobra.Command {
bsCmd := &cobra.Command{
Use: "bootstrapper",
Aliases: []string{"bs"},
Short: "Blobstream P2P network bootstrapper command",
Short: "Bloblobstream P2P network bootstrapper command",
SilenceUsage: true,
}

Expand Down Expand Up @@ -110,7 +110,7 @@ func Start() *cobra.Command {
}

// creating the dht
dht, err := p2p.NewBlobstreamDHT(ctx, h, dataStore, aIBootstrappers, logger)
dht, err := p2p.NewBloblobstreamDHT(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 Blobstream bootstrapper store. Passed flags have persisted effect.",
Short: "Initialize the Bloblobstream bootstrapper store. Passed flags have persisted effect.",
RunE: func(cmd *cobra.Command, args []string) error {
config, err := parseInitFlags(cmd)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions cmd/bstream/bootstrapper/config.go
Original file line number Diff line number Diff line change
@@ -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"
)

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 Blobstream bootstrappers home directory")
cmd.Flags().String(base.FlagHome, homeDir, "The Bloblobstream 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 Blobstream bootstrappers home directory")
cmd.Flags().String(base.FlagHome, homeDir, "The Bloblobstream bootstrappers home directory")
return cmd
}

Expand Down
8 changes: 4 additions & 4 deletions 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/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"
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 Blobstream DHT and waits for some peers to connect to it.
// CreateDHTAndWaitForPeers helper function that creates a new Bloblobstream 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.BlobstreamDHT, error) {
) (*p2p.BloblobstreamDHT, 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.NewBlobstreamDHT(ctx, h, dataStore, aIBootstrappers, logger)
dht, err := p2p.NewBloblobstreamDHT(ctx, h, dataStore, aIBootstrappers, logger)
if err != nil {
return nil, err
}
Expand Down
18 changes: 9 additions & 9 deletions 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/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"

"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/bloblobstream/types"
"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 Blobstream contract and initializes it using the provided Celestia chain",
Short: "Deploys the Bloblobstream 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 `bstream deploy keys add/import` command")
logger.Info("please initialize the EVM keystore using the `blobstream 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 Blobstream contract without having a valset request: %s",
"cannot initialize the Bloblobstream 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.DeployBlobstreamContract(txOpts, backend, *vs, vs.Nonce, false)
address, tx, _, err := evmClient.DeployBloblobstreamContract(txOpts, backend, *vs, vs.Nonce, false)
if err != nil {
logger.Error("failed to deploy Blobstream contract")
logger.Error("failed to deploy Bloblobstream 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 Bloblobstream contract", "proxy_address", address.Hex(), "tx_hash", tx.Hash().String())
}

return nil
Expand Down
6 changes: 3 additions & 3 deletions 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/bstream/base"
"github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/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 Blobstream contract from. "+
"Specify the nonce to start the Bloblobstream 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 Blobstream deployer home directory")
cmd.Flags().String(base.FlagHome, homeDir, "The Bloblobstream 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
6 changes: 3 additions & 3 deletions 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/bstream/base"
"github.com/celestiaorg/orchestrator-relayer/cmd/blobstream/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 Blobstream evm keys home directory")
cmd.Flags().String(base.FlagHome, homeDir, "The Bloblobstream 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 Blobstream evm keys home directory")
cmd.Flags().String(base.FlagHome, homeDir, "The Bloblobstream 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/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/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"
Expand All @@ -21,7 +21,7 @@ import (
func Root(serviceName string) *cobra.Command {
evmCmd := &cobra.Command{
Use: "evm",
Short: "Blobstream EVM keys manager",
Short: "Bloblobstream EVM keys manager",
SilenceUsage: true,
}

Expand Down
6 changes: 3 additions & 3 deletions 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/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"
)

func Command(serviceName string) *cobra.Command {
keysCmd := &cobra.Command{
Use: "keys",
Short: "Blobstream keys manager",
Short: "Bloblobstream keys manager",
SilenceUsage: true,
}

Expand Down
4 changes: 2 additions & 2 deletions cmd/bstream/keys/p2p/config.go
Original file line number Diff line number Diff line change
@@ -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"
)
Expand All @@ -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 Bloblobstream p2p keys home directory")
return cmd
}

Expand Down
4 changes: 2 additions & 2 deletions cmd/bstream/keys/p2p/p2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -18,7 +18,7 @@ import (
func Root(serviceName string) *cobra.Command {
p2pCmd := &cobra.Command{
Use: "p2p",
Short: "Blobstream p2p keys manager",
Short: "Bloblobstream p2p keys manager",
SilenceUsage: true,
}

Expand Down
Loading

0 comments on commit 3a456b5

Please sign in to comment.