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

Commit

Permalink
chore: BlobStream -> Blobstream
Browse files Browse the repository at this point in the history
  • Loading branch information
rach-id committed Oct 11, 2023
1 parent 0ca9eab commit 25d8251
Show file tree
Hide file tree
Showing 49 changed files with 229 additions and 229 deletions.
16 changes: 8 additions & 8 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 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
Expand All @@ -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

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

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

Expand Down
6 changes: 3 additions & 3 deletions cmd/bstream/common/helpers.go
Original file line number Diff line number Diff line change
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 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.BlobStreamDHT, 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.NewBlobStreamDHT(ctx, h, dataStore, aIBootstrappers, logger)
dht, err := p2p.NewBlobstreamDHT(ctx, h, dataStore, aIBootstrappers, logger)
if err != nil {
return nil, err
}
Expand Down
10 changes: 5 additions & 5 deletions cmd/bstream/deploy/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 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 Down Expand Up @@ -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",
)
}

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.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
Expand Down
4 changes: 2 additions & 2 deletions cmd/bstream/deploy/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
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 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
4 changes: 2 additions & 2 deletions cmd/bstream/keys/evm/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
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 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
2 changes: 1 addition & 1 deletion cmd/bstream/keys/evm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/bstream/keys/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/bstream/keys/p2p/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/bstream/keys/p2p/p2p.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down
8 changes: 4 additions & 4 deletions cmd/bstream/orchestrator/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand All @@ -42,7 +42,7 @@ func Command() *cobra.Command {
func Start() *cobra.Command {
command := &cobra.Command{
Use: "start <flags>",
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 {
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions cmd/bstream/orchestrator/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
}

Expand Down
10 changes: 5 additions & 5 deletions cmd/bstream/query/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand All @@ -47,8 +47,8 @@ func Signers() *cobra.Command {
command := &cobra.Command{
Use: "signers <nonce>",
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 {
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down
8 changes: 4 additions & 4 deletions cmd/bstream/relayer/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand All @@ -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 {
Expand Down Expand Up @@ -81,7 +81,7 @@ func Init() *cobra.Command {
func Start() *cobra.Command {
command := &cobra.Command{
Use: "start <flags>",
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 {
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions cmd/bstream/relayer/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions cmd/bstream/root/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down
Loading

0 comments on commit 25d8251

Please sign in to comment.