Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
rosetta-cli
mesh-cli
bin/
/.vscode
/cli-data
19 changes: 10 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
# limitations under the License.

# Compile golang
FROM ubuntu:20.04 as cli
FROM ubuntu:24.04 as cli

RUN apt-get update && apt-get install -y curl make gcc g++ git
ENV GOLANG_VERSION 1.17.9
ENV GOLANG_VERSION 1.24.8
ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
ENV GOLANG_DOWNLOAD_SHA256 9dacf782028fdfc79120576c872dee488b81257b1c48e9032d122cfdb379cca6
ENV GOLANG_DOWNLOAD_SHA256 6842c516ca66c89d648a7f1dbe28e28c47b61b59f8f06633eb2ceb1188e9251d

RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
&& echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \
Expand All @@ -31,14 +31,15 @@ RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"

WORKDIR /go/src

ARG VERSION=v0.10.4
RUN git clone https://github.com/coinbase/rosetta-cli.git && \
cd rosetta-cli && \
ARG VERSION=v0.11.0
RUN git clone https://github.com/coinbase/mesh-cli.git && \
cd mesh-cli && \
git fetch --all --tags && \
git checkout $VERSION && \
make install
make install && \
cp /go/bin/mesh-cli /go/bin/rosetta-cli

FROM ubuntu:20.04
FROM ubuntu:24.04

RUN apt-get update -y && apt-get install -y \
curl
Expand All @@ -47,4 +48,4 @@ RUN apt-get update -y && apt-get install -y \
COPY --from=cli /go/bin/ /usr/local/bin/

WORKDIR /app
ENTRYPOINT ["rosetta-cli"]
ENTRYPOINT ["mesh-cli"]
10 changes: 5 additions & 5 deletions cmd/check_construction.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ import (
"fmt"
"time"

cliErrs "github.com/coinbase/rosetta-cli/pkg/errors"
"github.com/coinbase/rosetta-cli/pkg/logger"
cliErrs "github.com/coinbase/mesh-cli/pkg/errors"
"github.com/coinbase/mesh-cli/pkg/logger"
"github.com/fatih/color"

"github.com/coinbase/rosetta-cli/pkg/results"
"github.com/coinbase/rosetta-cli/pkg/tester"
"github.com/coinbase/mesh-cli/pkg/results"
"github.com/coinbase/mesh-cli/pkg/tester"

"github.com/coinbase/rosetta-sdk-go/fetcher"
"github.com/coinbase/rosetta-sdk-go/types"
Expand All @@ -46,7 +46,7 @@ are run to ensure that intermediate representations are correct (for example, do
an unsigned transaction return a superset of operations provided during
construction?).

Check out the https://github.com/coinbase/rosetta-cli/tree/master/examples
Check out the https://github.com/coinbase/mesh-cli/tree/master/examples
directory for examples of how to configure this test for Bitcoin and
Ethereum.

Expand Down
6 changes: 3 additions & 3 deletions cmd/check_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"fmt"
"time"

"github.com/coinbase/rosetta-cli/pkg/logger"
"github.com/coinbase/rosetta-cli/pkg/results"
"github.com/coinbase/rosetta-cli/pkg/tester"
"github.com/coinbase/mesh-cli/pkg/logger"
"github.com/coinbase/mesh-cli/pkg/results"
"github.com/coinbase/mesh-cli/pkg/tester"
"github.com/coinbase/rosetta-sdk-go/fetcher"
"github.com/coinbase/rosetta-sdk-go/types"
"github.com/coinbase/rosetta-sdk-go/utils"
Expand Down
4 changes: 2 additions & 2 deletions cmd/check_perf.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"fmt"
"time"

"github.com/coinbase/rosetta-cli/pkg/results"
t "github.com/coinbase/rosetta-cli/pkg/tester"
"github.com/coinbase/mesh-cli/pkg/results"
t "github.com/coinbase/mesh-cli/pkg/tester"
"github.com/spf13/cobra"
"golang.org/x/sync/errgroup"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/check_spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ import (
"fmt"
"time"

"github.com/coinbase/rosetta-cli/pkg/results"
"github.com/coinbase/mesh-cli/pkg/results"
"github.com/coinbase/rosetta-sdk-go/fetcher"
"github.com/coinbase/rosetta-sdk-go/types"
"github.com/spf13/cobra"

cliErrs "github.com/coinbase/rosetta-cli/pkg/errors"
cliErrs "github.com/coinbase/mesh-cli/pkg/errors"
)

var (
Expand All @@ -37,7 +37,7 @@ minimum requirements specified in rosetta-api.org.
By default, check:spec will verify only Coinbase spec requirements. To verify the minimum requirements as well,
add the --all flag to the check:spec command:

rosetta-cli check:spec --all --configuration-file [filepath]
mesh-cli check:spec --all --configuration-file [filepath]

The minimum requirements verify whether an API response contains the required fields, and that the fields are
correctly formatted with proper values. For example, it would check whether the response of /network/list
Expand Down
2 changes: 1 addition & 1 deletion cmd/check_spec_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/coinbase/rosetta-sdk-go/fetcher"
"github.com/fatih/color"

cliErrs "github.com/coinbase/rosetta-cli/pkg/errors"
cliErrs "github.com/coinbase/mesh-cli/pkg/errors"
)

type checkSpecAPI string
Expand Down
2 changes: 1 addition & 1 deletion cmd/configuration_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package cmd
import (
"fmt"

"github.com/coinbase/rosetta-cli/configuration"
"github.com/coinbase/mesh-cli/configuration"

"github.com/coinbase/rosetta-sdk-go/utils"
"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cmd/configuration_validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package cmd
import (
"fmt"

"github.com/coinbase/rosetta-cli/configuration"
"github.com/coinbase/mesh-cli/configuration"

"github.com/fatih/color"
"github.com/spf13/cobra"
Expand Down
19 changes: 10 additions & 9 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package cmd
import (
"context"
"fmt"
"github.com/coinbase/rosetta-sdk-go/types"
"log"
"os"
"os/signal"
Expand All @@ -26,7 +25,9 @@ import (
"runtime/pprof"
"syscall"

"github.com/coinbase/rosetta-cli/configuration"
"github.com/coinbase/rosetta-sdk-go/types"

"github.com/coinbase/mesh-cli/configuration"

"github.com/coinbase/rosetta-sdk-go/utils"
"github.com/fatih/color"
Expand All @@ -40,7 +41,7 @@ const (

var (
rootCmd = &cobra.Command{
Use: "rosetta-cli",
Use: "mesh-cli",
Short: "CLI for the Rosetta API",
PersistentPreRunE: rootPreRun,
}
Expand Down Expand Up @@ -104,7 +105,7 @@ var (
// and check:construction.
asserterConfigurationFile string

// curveType is used to specify curve type to generate a keypair using rosetta-cli key:gen
// curveType is used to specify curve type to generate a keypair using mesh-cli key:gen
// command
curveType string
)
Expand Down Expand Up @@ -187,7 +188,7 @@ func rootPostRun() {
}

// Execute handles all invocations of the
// rosetta-cli cmd.
// mesh-cli cmd.
func Execute() error {
defer rootPostRun()
return rootCmd.Execute()
Expand All @@ -203,7 +204,7 @@ func init() {
"",
`Configuration file that provides connection and test settings.
If you would like to generate a starter configuration file (populated
with the defaults), run rosetta-cli configuration:create.
with the defaults), run mesh-cli configuration:create.

Any fields not populated in the configuration file will be populated with
default values.`,
Expand Down Expand Up @@ -440,7 +441,7 @@ func initConfig() {
// Override start and end syncing index in configuration file when it's explicitly set via CLI
if startIndex != -1 {
Config.Data.StartIndex = &startIndex
// Configures rosetta-cli to lookup the balance of newly seen accounts at the
// Configures mesh-cli to lookup the balance of newly seen accounts at the
// parent block before applying operations. Otherwise the balance will be 0.
Config.Data.InitialBalanceFetchDisabled = false
}
Expand Down Expand Up @@ -518,8 +519,8 @@ func handleSignals(listeners *[]context.CancelFunc) {

var versionCmd = &cobra.Command{
Use: "version",
Short: "Print rosetta-cli version",
Short: "Print mesh-cli version",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("v0.10.4")
fmt.Println("v0.11.0")
},
}
2 changes: 1 addition & 1 deletion cmd/validate_asserter_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"sort"
"strings"

cliErrs "github.com/coinbase/rosetta-cli/pkg/errors"
cliErrs "github.com/coinbase/mesh-cli/pkg/errors"
"github.com/coinbase/rosetta-sdk-go/asserter"
"github.com/coinbase/rosetta-sdk-go/fetcher"
"github.com/coinbase/rosetta-sdk-go/types"
Expand Down
2 changes: 1 addition & 1 deletion cmd/view_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"strconv"
"time"

cliErrs "github.com/coinbase/rosetta-cli/pkg/errors"
cliErrs "github.com/coinbase/mesh-cli/pkg/errors"

"github.com/coinbase/rosetta-sdk-go/fetcher"
"github.com/coinbase/rosetta-sdk-go/parser"
Expand Down
2 changes: 1 addition & 1 deletion cmd/view_networks.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"log"
"time"

"github.com/coinbase/rosetta-cli/pkg/errors"
"github.com/coinbase/mesh-cli/pkg/errors"

"github.com/coinbase/rosetta-sdk-go/fetcher"
"github.com/coinbase/rosetta-sdk-go/types"
Expand Down
4 changes: 2 additions & 2 deletions configuration/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"runtime"
"strings"

cliErrs "github.com/coinbase/rosetta-cli/pkg/errors"
cliErrs "github.com/coinbase/mesh-cli/pkg/errors"
"github.com/coinbase/rosetta-sdk-go/asserter"
"github.com/coinbase/rosetta-sdk-go/constructor/dsl"
"github.com/coinbase/rosetta-sdk-go/constructor/job"
Expand Down Expand Up @@ -367,7 +367,7 @@ func assertConfiguration(ctx context.Context, config *Configuration) error {

// modifyFilePaths modifies a collection of filepaths in a *Configuration
// file to make them relative to the configuration file (this makes it a lot easier
// to store all config-related files in the same directory and to run the rosetta-cli
// to store all config-related files in the same directory and to run the mesh-cli
// from a different directory).
func modifyFilePaths(config *Configuration, fileDir string) {
if config.Data != nil {
Expand Down
12 changes: 6 additions & 6 deletions configuration/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ type ConstructionConfiguration struct {
// to use while testing.
PrefundedAccounts []*modules.PrefundedAccount `json:"prefunded_accounts,omitempty"`

// Workflows are executed by the rosetta-cli to test
// Workflows are executed by the mesh-cli to test
// certain construction flows.
Workflows []*job.Workflow `json:"workflows"`

Expand Down Expand Up @@ -160,7 +160,7 @@ type ConstructionConfiguration struct {
// logging should be silenced.
Quiet bool `json:"quiet,omitempty"`

// InitialBalanceFetchDisabled configures rosetta-cli
// InitialBalanceFetchDisabled configures mesh-cli
// not to lookup the balance of newly seen accounts at the
// parent block before applying operations. Disabling this
// is only a good idea if you create multiple new accounts each block
Expand Down Expand Up @@ -281,7 +281,7 @@ type DataConfiguration struct {
// some of the more advanced checks to confirm syncing is working as expected.
ReconciliationDisabled bool `json:"reconciliation_disabled"`

// ReconciliationDrainDisabled is a boolean that configures the rosetta-cli
// ReconciliationDrainDisabled is a boolean that configures the mesh-cli
// to exit check:data before the entire active reconciliation queue has
// been drained (if reconciliation is enabled).
ReconciliationDrainDisabled bool `json:"reconciliation_drain_disabled"`
Expand Down Expand Up @@ -336,7 +336,7 @@ type DataConfiguration struct {
// provided in the `statefulsyncer` package.
PruningFrequency *int `json:"pruning_frequency,omitempty"`

// InitialBalanceFetchDisabled configures rosetta-cli
// InitialBalanceFetchDisabled configures mesh-cli
// not to lookup the balance of newly seen accounts at the
// parent block before applying operations. Disabling
// this step can significantly speed up performance
Expand Down Expand Up @@ -366,7 +366,7 @@ type Configuration struct {
TargetAccount string `json:"target_account,omitempty"`

// DataDirectory is a folder used to store logs and any data used to perform validation.
// The path can be absolute, or it can be relative to where rosetta-cli
// The path can be absolute, or it can be relative to where mesh-cli
// binary is being executed.
DataDirectory string `json:"data_directory"`

Expand Down Expand Up @@ -464,7 +464,7 @@ type Configuration struct {
// then this value must be true.
CoinSupported bool `json:"coin_supported"`

// InfoMetaData is a string, rosetta-cli will convert it into a map[string]string
// InfoMetaData is a string, mesh-cli will convert it into a map[string]string
// key-value are separated by ":"
// different key-value pairs are separated by ","
// an example: if users want to record "instance_name" as "1234", and "blockchain_name" as "Bitcoin",
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/coinbase/rosetta-cli
module github.com/coinbase/mesh-cli

go 1.16

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package main
import (
"os"

"github.com/coinbase/rosetta-cli/cmd"
"github.com/coinbase/mesh-cli/cmd"

"github.com/fatih/color"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zapcore"

"github.com/coinbase/rosetta-cli/pkg/results"
"github.com/coinbase/mesh-cli/pkg/results"

"github.com/coinbase/rosetta-sdk-go/parser"
"github.com/coinbase/rosetta-sdk-go/reconciler"
Expand Down
2 changes: 1 addition & 1 deletion pkg/processor/balance_storage_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"fmt"
"math/big"

"github.com/coinbase/rosetta-cli/pkg/logger"
"github.com/coinbase/mesh-cli/pkg/logger"

"github.com/coinbase/rosetta-sdk-go/parser"
"github.com/coinbase/rosetta-sdk-go/reconciler"
Expand Down
2 changes: 1 addition & 1 deletion pkg/processor/broadcast_storage_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"math/big"
"reflect"

"github.com/coinbase/rosetta-cli/configuration"
"github.com/coinbase/mesh-cli/configuration"

"github.com/coinbase/rosetta-sdk-go/constructor/coordinator"
"github.com/coinbase/rosetta-sdk-go/parser"
Expand Down
2 changes: 1 addition & 1 deletion pkg/processor/coordinator_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"log"
"math/big"

cliErrs "github.com/coinbase/rosetta-cli/pkg/errors"
cliErrs "github.com/coinbase/mesh-cli/pkg/errors"
"github.com/coinbase/rosetta-sdk-go/constructor/coordinator"
"github.com/coinbase/rosetta-sdk-go/fetcher"
"github.com/coinbase/rosetta-sdk-go/keys"
Expand Down
4 changes: 2 additions & 2 deletions pkg/processor/reconciler_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"sync"
"time"

"github.com/coinbase/rosetta-cli/pkg/logger"
"github.com/coinbase/mesh-cli/pkg/logger"

cliErrs "github.com/coinbase/rosetta-cli/pkg/errors"
cliErrs "github.com/coinbase/mesh-cli/pkg/errors"
"github.com/coinbase/rosetta-sdk-go/reconciler"
"github.com/coinbase/rosetta-sdk-go/storage/modules"
"github.com/coinbase/rosetta-sdk-go/types"
Expand Down
2 changes: 1 addition & 1 deletion pkg/processor/reconciler_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"context"
"fmt"

"github.com/coinbase/rosetta-cli/configuration"
"github.com/coinbase/mesh-cli/configuration"

"github.com/coinbase/rosetta-sdk-go/fetcher"
"github.com/coinbase/rosetta-sdk-go/reconciler"
Expand Down
Loading
Loading