Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Rosetta cli test #41

Merged
merged 29 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c733fdc
added makefile for docker image
bizk Sep 18, 2023
4a531b7
added workflow and command
bizk Sep 18, 2023
bfaa3db
testing ci
bizk Sep 18, 2023
af91ac7
testing ci
bizk Sep 18, 2023
d3a928c
testing ci
bizk Sep 18, 2023
a8e18bc
testing ci
bizk Sep 18, 2023
7b89389
separated simapp step on workflow
bizk Sep 18, 2023
a492223
concat 2 steps
bizk Sep 18, 2023
91a691b
added checkout
bizk Sep 19, 2023
293c7f4
added checkout
bizk Sep 19, 2023
68d54f8
small improvement on errors and fix on plugin deps
bizk Sep 19, 2023
1065814
improvement over job steps
bizk Sep 19, 2023
7099f0d
moved rosetta CLI exec to shell script
bizk Sep 19, 2023
4f7e347
added rosetta install command to shell script
bizk Sep 19, 2023
3a8b59f
added rosetta install command to shell script
bizk Sep 19, 2023
32c21ed
added rosetta install command to shell script
bizk Sep 19, 2023
56757d2
separated installation from rosetta-cli to another step
bizk Sep 19, 2023
f3c2c23
separated installation from rosetta-cli to another step
bizk Sep 19, 2023
adc31bf
reduced CLI max indexc
bizk Sep 19, 2023
f1e7e24
added call to check for blockchain status
bizk Sep 19, 2023
7564c5e
added await
bizk Sep 20, 2023
a909af9
added inmemory to rosetta cli
bizk Sep 20, 2023
89f6c5e
changed rosseta server and CLI ports to 8081
bizk Sep 20, 2023
ee27eb3
fix check step
bizk Sep 20, 2023
39c9f50
checking rosetta block endpoint
bizk Sep 20, 2023
3b55e48
fix on plugin prefix
bizk Sep 20, 2023
75f034a
changed error message generation according to linter suggestions
bizk Sep 20, 2023
26c1f2f
fixed go.mod leaking dependencies issues
bizk Sep 20, 2023
c35dd69
added step to use go version 1.21
bizk Sep 20, 2023
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
41 changes: 41 additions & 0 deletions .github/workflows/rosetta-cli-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: rosetta-cli-test

on:
push:
branches:
- main
- release/**
pull_request:
merge_group:

permissions:
contents: read

jobs:
run-simapp:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: '^1.21.1'
- name: Get cosmos-sdk repo
uses: actions/checkout@v3
with:
repository: cosmos/cosmos-sdk
ref: main
- name: set up simapp
run: make build && export SIMD_BIN=./build/simd && make init-simapp
- name: Run simapp
run: ./build/simd start &
- name: Check blockchain status
run: curl localhost:26657/status
bizk marked this conversation as resolved.
Show resolved Hide resolved
- name: Checkout back to rosetta
uses: actions/checkout@v3
- name: Build Rosetta
run: go mod tidy && make rosetta && make plugin
- name: Run Rosetta service
run: ./rosetta --blockchain "cosmos" --network "cosmos" --tendermint "tcp://localhost:26657" --addr "localhost:8081" --grpc "localhost:9090" &
- name: Check rosetta status
run: curl localhost:8081/block
bizk marked this conversation as resolved.
Show resolved Hide resolved
- name: Test rosetta through Rosetta-cli
run: make rosetta-cli
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,10 @@ lint-fix:
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version)
@./scripts/go-lint-all.bash --fix

.PHONY: all build rosetta test lint lint-fix
.PHONY: all build rosetta test lint lint-fix

docker:
docker build . --tag rosetta

rosetta-cli:
./scripts/rosetta-cli-test.sh
64 changes: 32 additions & 32 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/cosmos/rosetta

go 1.20
go 1.21

require (
cosmossdk.io/api v0.7.0
cosmossdk.io/api v0.7.1
cosmossdk.io/log v1.2.1
cosmossdk.io/math v1.1.2
cosmossdk.io/x/tx v0.10.0
Expand All @@ -22,23 +22,23 @@ require (

require (
cosmossdk.io/collections v0.4.0 // indirect
cosmossdk.io/core v0.11.0 // indirect
cosmossdk.io/core v0.12.0 // indirect
cosmossdk.io/depinject v1.0.0-alpha.4 // indirect
cosmossdk.io/errors v1.0.0 // indirect
cosmossdk.io/store v1.0.0-alpha.1.0.20230728080422-54ed7dab3982 // indirect
cosmossdk.io/store v1.0.0-rc.0 // indirect
filippo.io/edwards25519 v1.0.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/99designs/keyring v1.2.1 // indirect
github.com/99designs/keyring v1.2.2 // indirect
github.com/DataDog/zstd v1.5.5 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cockroachdb/errors v1.11.1 // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/pebble v0.0.0-20230817233644-564b068800e0 // indirect
github.com/cockroachdb/pebble v0.0.0-20230919203036-f509cd48c70c // indirect
github.com/cockroachdb/redact v1.1.5 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/cometbft/cometbft-db v0.8.0 // indirect
Expand All @@ -47,29 +47,29 @@ require (
github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect
github.com/cosmos/go-bip39 v1.0.0 // indirect
github.com/cosmos/gogogateway v1.2.0 // indirect
github.com/cosmos/iavl v1.0.0-beta.2 // indirect
github.com/cosmos/iavl v1.0.0-rc.1 // indirect
github.com/cosmos/ics23/go v0.10.0 // indirect
github.com/cosmos/ledger-cosmos-go v0.13.0 // indirect
github.com/danieljoos/wincred v1.1.2 // indirect
github.com/danieljoos/wincred v1.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
github.com/dgraph-io/badger/v2 v2.2007.4 // indirect
github.com/dgraph-io/ristretto v0.1.1 // indirect
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/dvsekhvalnov/jose2go v1.5.0 // indirect
github.com/emicklei/dot v1.5.0 // indirect
github.com/emicklei/dot v1.6.0 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/felixge/httpsnoop v1.0.2 // indirect
github.com/felixge/httpsnoop v1.0.3 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/getsentry/sentry-go v0.23.0 // indirect
github.com/go-kit/kit v0.12.0 // indirect
github.com/getsentry/sentry-go v0.24.1 // indirect
github.com/go-kit/kit v0.13.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/gogo/googleapis v1.4.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v1.1.0 // indirect
github.com/golang/glog v1.1.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/btree v1.1.2 // indirect
Expand All @@ -83,8 +83,8 @@ require (
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-metrics v0.5.1 // indirect
github.com/hashicorp/go-plugin v1.4.10 // indirect
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect
github.com/hashicorp/go-plugin v1.5.1 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/hdevalence/ed25519consensus v0.1.0 // indirect
Expand All @@ -93,22 +93,22 @@ require (
github.com/improbable-eng/grpc-web v0.15.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/klauspost/compress v1.17.0 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/linxGnu/grocksdb v1.8.0 // indirect
github.com/linxGnu/grocksdb v1.8.4 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mtibben/percent v0.2.1 // indirect
github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce // indirect
github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.16.0 // indirect
Expand All @@ -117,36 +117,36 @@ require (
github.com/prometheus/procfs v0.11.1 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/rs/cors v1.8.3 // indirect
github.com/rs/cors v1.10.0 // indirect
github.com/rs/zerolog v1.30.0 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/viper v1.16.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
github.com/tendermint/go-amino v0.16.0 // indirect
github.com/tidwall/btree v1.6.0 // indirect
github.com/tidwall/btree v1.7.0 // indirect
github.com/zondax/hid v0.9.1 // indirect
github.com/zondax/ledger-go v0.14.1 // indirect
github.com/zondax/ledger-go v0.14.2 // indirect
go.etcd.io/bbolt v1.3.7 // indirect
golang.org/x/crypto v0.13.0 // indirect
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/net v0.15.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/term v0.12.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gotest.tools/v3 v3.5.0 // indirect
nhooyr.io/websocket v1.8.6 // indirect
gotest.tools/v3 v3.5.1 // indirect
nhooyr.io/websocket v1.8.7 // indirect
pgregory.net/rapid v1.1.0 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

//replace cosmossdk.io/api => cosmossdk.io/api v0.3.1
replace cosmossdk.io/core => cosmossdk.io/core v0.11.0
Loading
Loading