Skip to content

Commit

Permalink
Merge branch 'develop' into docs-update
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev authored Aug 7, 2023
2 parents 2c99443 + 6753c10 commit 525e56b
Show file tree
Hide file tree
Showing 186 changed files with 513 additions and 287 deletions.
59 changes: 41 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
- ready_for_review

concurrency:
group: ${{ github.head_ref || github.run_id }}
group: build-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
Expand All @@ -30,8 +30,11 @@ env:
jobs:
build-and-test-single-arch:
runs-on: ubuntu-latest
# runs-on: ["zeta-runners"]
timeout-minutes: 20
if: (! startsWith(github.ref, 'refs/tags/')) || (! startsWith(github.ref, 'refs/heads/develop') )
concurrency:
group: "build-and-test-single-arch"
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -60,12 +63,17 @@ jobs:
uses: de-vri-es/setup-git-credentials@v2.0.8
with:
credentials: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}

- name: Test
run: |
echo "Running Build Tests"
make clean
make test
uses: nick-fields/retry@v2
with:
timeout_minutes: 20
max_attempts: 2
retry_on: error
command: |
echo "Running Build Tests"
make clean
make test
- name: Build zetacored and zetaclientd
env:
Expand Down Expand Up @@ -136,10 +144,15 @@ jobs:
# ${{ matrix.runs-on }}-go-

- name: Test
run: |
echo "Running Build Tests"
make clean
make test
uses: nick-fields/retry@v2
with:
timeout_minutes: 20
max_attempts: 2
retry_on: error
command: |
echo "Running Build Tests"
make clean
make test
- name: Build zetacored and zetaclientd
env:
Expand Down Expand Up @@ -227,13 +240,25 @@ jobs:
with:
credentials: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}

# - name: Test
# shell: alpine.sh --root {0}
# run: |
# echo "Running Build Tests"
# apk add --no-cache --update
# make clean
# make test

- name: Test
shell: alpine.sh --root {0}
run: |
echo "Running Build Tests"
apk add --no-cache --update
make clean
make test
uses: nick-fields/retry@v2
with:
timeout_minutes: 20
max_attempts: 2
retry_on: error
shell: alpine.sh --root {0}
command: |
echo "Running Build Tests"
make clean
make test
- name: Build zetacored and zetaclientd
env:
Expand All @@ -247,8 +272,6 @@ jobs:
make install-testnet
cp "$HOME"/go/bin/* ./
- name: Binary Docker Test
env:
CPU_ARCH: ${{ env.CPU_ARCH }}
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ on:

env:
GOPRIVATE: github.com/zeta-chain/*


concurrency:
group: linters-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 10

env:
GO111MODULE: on
Expand All @@ -32,6 +37,9 @@ jobs:
go-version: 1.19

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3.3.1
uses: golangci/golangci-lint-action@v3

with:
version: v1.50
skip-cache: false

1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ linters:
- ineffassign
- unconvert
- misspell
- goimports
- govet
- gosec
- stylecheck
Expand Down
3 changes: 2 additions & 1 deletion app/ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ package ante

import (
"fmt"
"runtime/debug"

ethante "github.com/evmos/ethermint/app/ante"
cctxtypes "github.com/zeta-chain/zetacore/x/crosschain/types"
"runtime/debug"

tmlog "github.com/tendermint/tendermint/libs/log"

Expand Down
3 changes: 2 additions & 1 deletion app/ante/authz.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package ante

import (
errorsmod "cosmossdk.io/errors"
"fmt"

errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types"
errortypes "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/authz"
Expand Down
1 change: 1 addition & 0 deletions app/ante/handler_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package ante

import (
"fmt"

sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
Expand Down
79 changes: 40 additions & 39 deletions app/app.go
Original file line number Diff line number Diff line change
@@ -1,53 +1,28 @@
package app

import (
zetaCoreModuleKeeper "github.com/zeta-chain/zetacore/x/crosschain/keeper"
"io"
"net/http"
"os"
"time"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/simapp"
appparams "github.com/cosmos/cosmos-sdk/simapp/params"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/authz"
authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper"
authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module"
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
"github.com/cosmos/cosmos-sdk/x/group"
groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper"
groupmodule "github.com/cosmos/cosmos-sdk/x/group/module"
evmante "github.com/evmos/ethermint/app/ante"
ethermint "github.com/evmos/ethermint/types"
"github.com/evmos/ethermint/x/evm"
"github.com/evmos/ethermint/x/evm/vm/geth"
"github.com/evmos/ethermint/x/feemarket"
feemarkettypes "github.com/evmos/ethermint/x/feemarket/types"
"github.com/gorilla/mux"
"github.com/rakyll/statik/fs"
"github.com/spf13/cast"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/log"
tmos "github.com/tendermint/tendermint/libs/os"
dbm "github.com/tendermint/tm-db"
"github.com/zeta-chain/zetacore/app/ante"
srvflags "github.com/zeta-chain/zetacore/server/flags"
emissionsModuleKeeper "github.com/zeta-chain/zetacore/x/emissions/keeper"
emissionsModuleTypes "github.com/zeta-chain/zetacore/x/emissions/types"
fungibleModuleKeeper "github.com/zeta-chain/zetacore/x/fungible/keeper"
fungibleModuleTypes "github.com/zeta-chain/zetacore/x/fungible/types"

"io"
"net/http"
"os"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/grpc/tmservice"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/server/api"
"github.com/cosmos/cosmos-sdk/server/config"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
"github.com/cosmos/cosmos-sdk/simapp"
appparams "github.com/cosmos/cosmos-sdk/simapp/params"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/version"
"github.com/cosmos/cosmos-sdk/x/auth"
Expand All @@ -56,6 +31,9 @@ import (
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"
"github.com/cosmos/cosmos-sdk/x/authz"
authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper"
authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module"
"github.com/cosmos/cosmos-sdk/x/bank"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
Expand All @@ -79,11 +57,10 @@ import (
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
evmkeeper "github.com/evmos/ethermint/x/evm/keeper"
evmtypes "github.com/evmos/ethermint/x/evm/types"
feemarketkeeper "github.com/evmos/ethermint/x/feemarket/keeper"
"github.com/zeta-chain/zetacore/docs/openapi"

govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
"github.com/cosmos/cosmos-sdk/x/group"
groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper"
groupmodule "github.com/cosmos/cosmos-sdk/x/group/module"
"github.com/cosmos/cosmos-sdk/x/params"
paramsclient "github.com/cosmos/cosmos-sdk/x/params/client"
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
Expand All @@ -99,13 +76,37 @@ import (
upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client"
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
abci "github.com/tendermint/tendermint/abci/types"
tmjson "github.com/tendermint/tendermint/libs/json"
"github.com/tendermint/tendermint/libs/log"
tmos "github.com/tendermint/tendermint/libs/os"
dbm "github.com/tendermint/tm-db"

evmante "github.com/evmos/ethermint/app/ante"
ethermint "github.com/evmos/ethermint/types"
"github.com/evmos/ethermint/x/evm"
evmkeeper "github.com/evmos/ethermint/x/evm/keeper"
evmtypes "github.com/evmos/ethermint/x/evm/types"
"github.com/evmos/ethermint/x/evm/vm/geth"
"github.com/evmos/ethermint/x/feemarket"
feemarketkeeper "github.com/evmos/ethermint/x/feemarket/keeper"
feemarkettypes "github.com/evmos/ethermint/x/feemarket/types"

"github.com/zeta-chain/zetacore/app/ante"
"github.com/zeta-chain/zetacore/docs/openapi"
srvflags "github.com/zeta-chain/zetacore/server/flags"

zetaCoreModule "github.com/zeta-chain/zetacore/x/crosschain"
zetaCoreModuleKeeper "github.com/zeta-chain/zetacore/x/crosschain/keeper"
zetaCoreModuleTypes "github.com/zeta-chain/zetacore/x/crosschain/types"

emissionsModule "github.com/zeta-chain/zetacore/x/emissions"
emissionsModuleKeeper "github.com/zeta-chain/zetacore/x/emissions/keeper"
emissionsModuleTypes "github.com/zeta-chain/zetacore/x/emissions/types"

fungibleModule "github.com/zeta-chain/zetacore/x/fungible"
fungibleModuleKeeper "github.com/zeta-chain/zetacore/x/fungible/keeper"
fungibleModuleTypes "github.com/zeta-chain/zetacore/x/fungible/types"

zetaObserverModule "github.com/zeta-chain/zetacore/x/observer"
zetaObserverModuleKeeper "github.com/zeta-chain/zetacore/x/observer/keeper"
Expand Down
3 changes: 2 additions & 1 deletion cmd/zetaclientd/keygen_tss.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package main
import (
"errors"
"fmt"
"time"

"github.com/rs/zerolog"
"github.com/tendermint/tendermint/crypto/secp256k1"
"github.com/zeta-chain/zetacore/common"
Expand All @@ -12,7 +14,6 @@ import (
tsscommon "gitlab.com/thorchain/tss/go-tss/common"
"gitlab.com/thorchain/tss/go-tss/keygen"
"gitlab.com/thorchain/tss/go-tss/p2p"
"time"
)

func GenerateTss(logger zerolog.Logger, cfg *config.Config, zetaBridge *mc.ZetaCoreBridge, peers p2p.AddrList, priKey secp256k1.PrivKey, ts *mc.TelemetryServer) (*mc.TSS, error) {
Expand Down
1 change: 1 addition & 0 deletions cmd/zetaclientd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/zeta-chain/zetacore/cmd"
"github.com/zeta-chain/zetacore/common/cosmos"

//mcconfig "github.com/Meta-Protocol/zetacore/metaclient/config"
"github.com/cosmos/cosmos-sdk/types"

Expand Down
7 changes: 4 additions & 3 deletions cmd/zetaclientd/p2p_diagnostics.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ package main
import (
"context"
"fmt"
"os"
"sync"
"time"

cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
"github.com/libp2p/go-libp2p"
dht "github.com/libp2p/go-libp2p-kad-dht"
Expand All @@ -19,9 +23,6 @@ import (
mc "github.com/zeta-chain/zetacore/zetaclient"
"github.com/zeta-chain/zetacore/zetaclient/config"
"gitlab.com/thorchain/tss/go-tss/p2p"
"os"
"sync"
"time"
)

func RunDiagnostics(startLogger zerolog.Logger, peers p2p.AddrList, bridgePk cryptotypes.PrivKey, cfg *config.Config) error {
Expand Down
13 changes: 7 additions & 6 deletions cmd/zetaclientd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"os/signal"
"path/filepath"
"syscall"
"time"

"github.com/libp2p/go-libp2p/core"
maddr "github.com/multiformats/go-multiaddr"
"github.com/pkg/errors"
Expand All @@ -14,12 +21,6 @@ import (
"github.com/zeta-chain/zetacore/zetaclient/config"
metrics2 "github.com/zeta-chain/zetacore/zetaclient/metrics"
"gitlab.com/thorchain/tss/go-tss/p2p"
"io/ioutil"
"os"
"os/signal"
"path/filepath"
"syscall"
"time"
)

type Multiaddr = core.Multiaddr
Expand Down
9 changes: 5 additions & 4 deletions cmd/zetaclientd/start_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ package main

import (
"fmt"
"github.com/pkg/errors"
"github.com/rs/zerolog"
"github.com/zeta-chain/zetacore/zetaclient/config"
"google.golang.org/grpc"
"net"
"os"
"strings"
"time"

"github.com/pkg/errors"
"github.com/rs/zerolog"
"github.com/zeta-chain/zetacore/zetaclient/config"
"google.golang.org/grpc"
)

func setMYIP(cfg *config.Config, logger zerolog.Logger) {
Expand Down
1 change: 1 addition & 0 deletions cmd/zetaclientd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"fmt"

"github.com/spf13/cobra"
"github.com/zeta-chain/zetacore/common"
)
Expand Down
Loading

0 comments on commit 525e56b

Please sign in to comment.