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

Improves the orchestrator/relayer commands, adds tests and moves Ethereum/Orchestrator addresses to cosmos-sdk.staking.Validator #276

Merged
merged 65 commits into from
Apr 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
260c66b
initial orchestrator client
evan-forbes Mar 28, 2022
0c01c30
format proto and add necessary queries
evan-forbes Mar 28, 2022
7bdc719
add orchestrator logic
evan-forbes Mar 28, 2022
feafc20
and encoding of data commitments and validator set changes
evan-forbes Mar 28, 2022
8f6b680
add orchestrator command
evan-forbes Mar 28, 2022
6d03852
add relayer
evan-forbes Mar 28, 2022
6e35820
Merge branch 'qgb-integration' into evan/orchestrator-orchestrator
evan-forbes Mar 30, 2022
6da95d2
add the orchestrator command
evan-forbes Mar 30, 2022
53a1eba
proto formatting
evan-forbes Mar 30, 2022
c2b653a
use correct name
evan-forbes Mar 30, 2022
f4acc94
use correct path to endpoint
evan-forbes Mar 30, 2022
0120edf
get rid of GravityNonces struct
evan-forbes Mar 30, 2022
f95e18b
use correct name
evan-forbes Mar 30, 2022
71ddf95
Merge branch 'evan/orchestrator-orchestrator' of github.com:celestiao…
evan-forbes Mar 30, 2022
bc1ab7a
Adds QGB related ADRs (#250)
rach-id Mar 24, 2022
715723d
regenerate proto
evan-forbes Mar 30, 2022
31793a0
go mod tidy
evan-forbes Mar 30, 2022
fc03805
use correct name
evan-forbes Mar 30, 2022
654eb51
handle error
evan-forbes Mar 30, 2022
8a2f8d1
Merge branch 'evan/orchestrator-orchestrator' of github.com:celestiao…
evan-forbes Mar 30, 2022
4c3c37b
Merge branch 'evan/orchestrator-orchestrator' into evan/orchestrator-…
evan-forbes Mar 31, 2022
c090b6a
begin refactor
evan-forbes Mar 31, 2022
024553d
adds data commitments and valset orchestrator processors
rach-id Apr 5, 2022
fe453dd
add the app client that queries for validator sets and data commitments
evan-forbes Apr 5, 2022
c953723
add two new methods
evan-forbes Apr 5, 2022
a58a6f5
Merge branch 'evan/testable-orchestrator' of github.com:celestiaorg/l…
evan-forbes Apr 5, 2022
aa1b807
add query methods to appClient
rach-id Apr 6, 2022
29359ea
WIP: update orchestrator and relayer to use the appClient
rach-id Apr 6, 2022
46c6cb2
WIP: update orchestrator and relayer to use the appClient
rach-id Apr 6, 2022
df34aa2
WIP: update orchestrator and relayer to use the appClient
rach-id Apr 6, 2022
c173382
adds evm_client implementation
rach-id Apr 6, 2022
07e2586
add the nil clients for the evm and mockappclient
evan-forbes Apr 6, 2022
e9cda79
Merge branch 'evan/testable-orchestrator' of github.com:celestiaorg/l…
evan-forbes Apr 6, 2022
db5add2
add the new methods to the mock app client
evan-forbes Apr 6, 2022
b6d38da
flesh out the mock app client
evan-forbes Apr 6, 2022
5dbcf63
Merge branch 'evan/testable-orchestrator' of github.com:celestiaorg/l…
evan-forbes Apr 6, 2022
5676046
flesh out app orchestrator test
evan-forbes Apr 6, 2022
f640536
adds QueryLatestValset to appClient
rach-id Apr 6, 2022
9199e4d
wip: adds orchestrator test
rach-id Apr 7, 2022
49a4578
adds orchestrator valset test
rach-id Apr 7, 2022
686cd3e
moves orchestrator test utils to a separate file
rach-id Apr 7, 2022
57f4f77
adds orchestrator valset processEvents error check in test
rach-id Apr 7, 2022
c12f37e
rename ValidatorSignature field in DataCommitmentConfirm to Validator…
rach-id Apr 7, 2022
fbdcda2
fix valset orchestrator signature test
rach-id Apr 7, 2022
a222e11
fix last valset request in orchestrator
rach-id Apr 7, 2022
31887ad
fix last valset request in orchestrator common test
rach-id Apr 7, 2022
0a35afb
remove unnecessary nonce increment for data commitment signing in orc…
rach-id Apr 7, 2022
756907f
fix orchestrator data commitment test
rach-id Apr 7, 2022
d753aeb
closes the mocked app client in orchestrator test
rach-id Apr 7, 2022
3bc57bd
add the mock evm client
evan-forbes Apr 7, 2022
6d6e6a2
fix the command to orchestrate valsets properly
evan-forbes Apr 7, 2022
4c079cb
Merge branch 'evan/testable-orchestrator' of github.com:celestiaorg/l…
evan-forbes Apr 7, 2022
21016ea
Merge branch 'evan/testable-orchestrator' of github.com:celestiaorg/l…
evan-forbes Apr 7, 2022
c98a38a
get rid of zerologger
evan-forbes Apr 7, 2022
8f58616
use tmlog instead of zerolog
evan-forbes Apr 7, 2022
a726cc3
remove extra err handling
evan-forbes Apr 7, 2022
2fa283c
add comment to question nonce usage in evm client submit dataroot
evan-forbes Apr 7, 2022
494d6cb
Merge branch 'evan/testable-orchestrator' of github.com:celestiaorg/l…
evan-forbes Apr 7, 2022
35e40fc
Merge branch 'evan/testable-orchestrator' of github.com:celestiaorg/l…
evan-forbes Apr 7, 2022
063887b
adds data commitment orchestrator test
rach-id Apr 7, 2022
7bf0283
adds deploy command
rach-id Apr 8, 2022
ec2beac
adds evmRpc flag to qgb config
rach-id Apr 8, 2022
3d814cb
deubgging the qgb install
evan-forbes Apr 8, 2022
3b8c611
add set orchestrator command
evan-forbes Apr 8, 2022
c67e57b
removes set Ethereum/Orch address + fixes tests + general cleanup (#296)
rach-id Apr 13, 2022
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
14 changes: 9 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,23 @@ jobs:
golangci:
name: golangci-lint
runs-on: ubuntu-latest
timeout-minutes: 6
timeout-minutes: 8
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v5
- uses: actions/setup-go@v3
with:
go-version: 1.17.1
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.0.1
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- uses: golangci/golangci-lint-action@v2.5.2
- uses: golangci/golangci-lint-action@v3.1.0
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.38
version: v1.42.1
args: --timeout 10m
github-token: ${{ secrets.github_token }}
skip-go-installation: true
if: env.GIT_DIFF
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ frontend/dist
frontend/.cache
secret.yml
build
coverage.txt
coverage.txt
.idea
.vscode
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ func New(
feegrant.ModuleName,
)

app.mm.SetOrderEndBlockers(crisistypes.ModuleName, stakingtypes.ModuleName)
app.mm.SetOrderEndBlockers(crisistypes.ModuleName, stakingtypes.ModuleName, qgbmoduletypes.ModuleName)

// NOTE: The genutils module must occur after staking so that pools are
// properly initialized with tokens from genesis accounts.
Expand Down
8 changes: 8 additions & 0 deletions cmd/celestia-appd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"os"

"github.com/celestiaorg/celestia-app/app"
"github.com/celestiaorg/celestia-app/x/qgb/orchestrator"
"github.com/cosmos/cosmos-sdk/baseapp"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
Expand All @@ -23,6 +24,13 @@ func main() {
appBuilder,
// this line is used by starport scaffolding # root/arguments
)

rootCmd.AddCommand(
orchestrator.DeployCmd(),
orchestrator.OrchestratorCmd(),
orchestrator.RelayerCmd(),
)

if err := svrcmd.Execute(rootCmd, app.DefaultNodeHome); err != nil {
os.Exit(1)
}
Expand Down
15 changes: 12 additions & 3 deletions contrib/single-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,19 @@ CHAINID="test"
# Build genesis file incl account for passed address
coins="1000000000000000uceles"
celestia-appd init $CHAINID --chain-id $CHAINID
celestia-appd keys add validator --keyring-backend="test"
celestia-appd keys add validator1 --keyring-backend="test"
celestia-appd keys add validator2 --keyring-backend="test"
celestia-appd keys add validator3 --keyring-backend="test"
# this won't work because the some proto types are decalared twice and the logs output to stdout (dependency hell involving iavl)
celestia-appd add-genesis-account $(celestia-appd keys show validator -a --keyring-backend="test") $coins
celestia-appd gentx validator 5000000000uceles --keyring-backend="test" --chain-id $CHAINID
celestia-appd add-genesis-account $(celestia-appd keys show validator1 -a --keyring-backend="test") $coins
celestia-appd add-genesis-account $(celestia-appd keys show validator2 -a --keyring-backend="test") $coins
celestia-appd add-genesis-account $(celestia-appd keys show validator3 -a --keyring-backend="test") $coins
celestia-appd gentx validator1 5000000000uceles \
--keyring-backend="test" \
--chain-id $CHAINID \
--orchestrator-address celes14v2rvt9az00vcd636j5q96aynzkyu0x85wuqas \
--ethereum-address 0x91DEd26b5f38B065FC0204c7929Da6b2A21277Cd

celestia-appd collect-gentxs

# Set proper defaults and change ports
Expand Down
36 changes: 23 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,22 @@ require (
github.com/stretchr/testify v1.7.0
github.com/tendermint/spm v0.1.5
github.com/tendermint/tendermint v0.34.14
github.com/tendermint/tm-db v0.6.4
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
github.com/tendermint/tm-db v0.6.6
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect
golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886 // indirect
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa
google.golang.org/grpc v1.42.0
)

require (
github.com/ethereum/go-ethereum v1.10.12
github.com/rs/zerolog v1.26.0
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
)
require github.com/ethereum/go-ethereum v1.10.12

require (
filippo.io/edwards25519 v1.0.0-beta.2 // indirect
github.com/99designs/keyring v1.1.6 // indirect
github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect
github.com/DataDog/zstd v1.4.8 // indirect
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/VictoriaMetrics/fastcache v1.6.0 // indirect
github.com/Workiva/go-datastructures v1.0.52 // indirect
github.com/armon/go-metrics v0.3.10 // indirect
github.com/beorn7/perks v1.0.1 // indirect
Expand All @@ -48,6 +44,7 @@ require (
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/coinbase/rosetta-sdk-go v0.6.10 // indirect
github.com/confio/ics23/go v0.6.6 // indirect
github.com/containerd/continuity v0.1.0 // indirect
github.com/cosmos/go-bip39 v1.0.0 // indirect
github.com/cosmos/iavl v0.17.1 // indirect
github.com/cosmos/ledger-cosmos-go v0.11.1 // indirect
Expand All @@ -61,12 +58,14 @@ require (
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac // indirect
github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b // indirect
github.com/edsrzf/mmap-go v1.0.0 // indirect
github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25 // indirect
github.com/felixge/httpsnoop v1.0.1 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-kit/kit v0.11.0 // indirect
github.com/go-logfmt/logfmt v0.5.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-playground/validator/v10 v10.4.1 // indirect
github.com/go-stack/stack v1.8.0 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/gogo/gateway v1.1.0 // indirect
Expand All @@ -85,34 +84,42 @@ require (
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/holiman/uint256 v1.2.0 // indirect
github.com/improbable-eng/grpc-web v0.14.1 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect
github.com/klauspost/compress v1.11.12 // indirect
github.com/lib/pq v1.2.0 // indirect
github.com/klauspost/compress v1.13.5 // indirect
github.com/lib/pq v1.10.3 // indirect
github.com/libp2p/go-buffer-pool v0.0.2 // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect
github.com/minio/highwayhash v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.4.3 // indirect
github.com/mtibben/percent v0.2.1 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.11.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.29.0 // indirect
github.com/prometheus/common v0.30.0 // indirect
github.com/prometheus/procfs v0.7.0 // indirect
github.com/prometheus/tsdb v0.7.1 // indirect
github.com/rakyll/statik v0.1.7 // indirect
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect
github.com/regen-network/cosmos-proto v0.3.1 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rjeczalik/notify v0.9.1 // indirect
github.com/rogpeppe/go-internal v1.8.1 // indirect
github.com/rs/cors v1.7.0 // indirect
github.com/rs/zerolog v1.26.0 // indirect
github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect
github.com/shirou/gopsutil v3.21.6+incompatible // indirect
github.com/spf13/afero v1.6.0 // indirect
Expand All @@ -130,6 +137,8 @@ require (
github.com/vivint/infectious v0.0.0-20200605153912-25a574ae18a3 // indirect
github.com/zondax/hid v0.9.0 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
golang.org/x/term v0.0.0-20220411215600-e5f449aeb171 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/ini.v1 v1.66.2 // indirect
Expand All @@ -141,8 +150,9 @@ require (

replace (
github.com/99designs/keyring => github.com/cosmos/keyring v1.1.7-0.20210622111912-ef00f8ac3d76
github.com/cosmos/cosmos-sdk => github.com/celestiaorg/cosmos-sdk v0.44.1-celestia
// TODO update this
github.com/cosmos/cosmos-sdk => github.com/sweexordious/cosmos-sdk v0.44.2-0.20220413095434-fa229c31f587
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
github.com/tendermint/tendermint => github.com/celestiaorg/celestia-core v0.34.14-celestia.0.20220119223021-e54097114e14
github.com/tendermint/tendermint => github.com/celestiaorg/celestia-core v0.35.0-dev.0.20220228062426-721562a3544d
google.golang.org/grpc => google.golang.org/grpc v1.33.2
)
Loading