Skip to content

Commit

Permalink
rebase develop
Browse files Browse the repository at this point in the history
  • Loading branch information
kingpinXD committed Oct 19, 2023
2 parents e31659d + 161406e commit 8a53b8d
Show file tree
Hide file tree
Showing 66 changed files with 2,254 additions and 746 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ localnet
package.json
yarn.lock
.github/
.gitignore
.gitignore
dist/**
62 changes: 0 additions & 62 deletions .github/workflows/chain-operations.yml

This file was deleted.

126 changes: 0 additions & 126 deletions .github/workflows/deploy.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Publish Release
on:
push:
tags:
- "v*.*.*"

- "v*.*.*"
concurrency:
group: publish-release
cancel-in-progress: false
Expand Down
42 changes: 41 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ builds:
- -X github.com/zeta-chain/zetacore/common.CommitHash={{ .Env.COMMIT }}
- -X github.com/zeta-chain/zetacore/common.BuildTime=={{ .Env.BUILDTIME }}
- -X github.com/cosmos/cosmos-sdk/types.DBBackend=pebbledb
W

- id: "zetaclientd_testnet"
main: ./cmd/zetaclientd
binary: "zetaclientd_testnet-{{ .Os }}-{{ .Arch }}"
Expand Down Expand Up @@ -121,6 +121,46 @@ W
flags: *default_mock_mainnet_flags
ldflags: *default_ldflags

- id: "zetacored_mainnet"
main: ./cmd/zetacored
binary: "zetacored_mainnet-{{ .Os }}-{{ .Arch }}"
env:
- 'CC={{ index .Env (print "CC_" .Os "_" .Arch) }}'
- 'CXX={{ index .Env (print "CXX_" .Os "_" .Arch) }}'
goos:
- linux
- darwin
- windows
goarch:
- arm64
- amd64
ignore:
- goos: windows
goarch: arm64
flags: &default_mainnet_flags
- -tags=pebbledb,ledger,cgo
ldflags: *default_ldflags

- id: "zetaclientd_mainnet"
main: ./cmd/zetaclientd
binary: "zetaclientd_mainnet-{{ .Os }}-{{ .Arch }}"
env:
- 'CC={{ index .Env (print "CC_" .Os "_" .Arch) }}'
- 'CXX={{ index .Env (print "CXX_" .Os "_" .Arch) }}'
goos:
- linux
# - darwin
# - windows
goarch:
- arm64
- amd64
ignore:
- goos: windows
goarch: arm64
flags: *default_mainnet_flags
ldflags: *default_ldflags


archives:
- format: binary
name_template: "{{ .Binary }}"
Expand Down
1 change: 0 additions & 1 deletion Dockerfile-versioned
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ RUN cp $GOPATH/bin/smoketest $GOPATH/bin/new/

# Checkout and build old binary
RUN cd node && git checkout ${old_version}
RUN cd node && git pull
RUN cd node && make install
RUN cd node && make install-smoketest
RUN cp $GOPATH/bin/zetacored $GOPATH/bin/old/
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ stop-stress-test:

stateful-upgrade:
@echo "--> Starting stateful smoketest"
$(DOCKER) build --build-arg old_version=v9.0.0-rc2 --build-arg new_version=v10.0.0 -t zetanode -f ./Dockerfile-versioned .
$(DOCKER) build --build-arg old_version=mock-mainnet-01-5-ga66d0b77 --build-arg new_version=v10.0.0-30 -t zetanode -f ./Dockerfile-versioned .
$(DOCKER) build -t orchestrator -f contrib/localnet/orchestrator/Dockerfile-upgrade.fastbuild .
cd contrib/localnet/ && $(DOCKER) compose -f docker-compose-stateful.yml up -d

Expand Down
7 changes: 3 additions & 4 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import (
"github.com/gorilla/mux"
"github.com/rakyll/statik/fs"
"github.com/spf13/cast"
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"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
Expand Down Expand Up @@ -97,10 +100,6 @@ import (
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"
Expand Down
1 change: 1 addition & 0 deletions cmd/zetaclientd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ func start(_ *cobra.Command, _ []string) error {
err := telemetryServer.Start()
if err != nil {
startLogger.Error().Err(err).Msg("telemetryServer error")
panic("telemetryServer error")
}
}()

Expand Down
6 changes: 0 additions & 6 deletions common/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,6 @@ func IsEVMChain(chainID int64) bool {
chainID == 137 // polygon mainnet
}

func IsEthereum(chainID int64) bool {
return chainID == 5 || // Goerli
chainID == 1337 || // eth privnet
chainID == 1 // eth mainnet
}

func (chain Chain) IsKlaytnChain() bool {
return chain.ChainId == 1001
}
Expand Down
3 changes: 2 additions & 1 deletion common/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ package common
// commands for the zetaclient; mostly administrative commands/txs

const (
CmdWhitelistERC20 = "cmd_whitelist_erc20"
CmdWhitelistERC20 = "cmd_whitelist_erc20"
CmdMigrateTssFunds = "cmd_migrate_tss_funds"
)
4 changes: 4 additions & 0 deletions common/default_chains_mainnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ func BtcChainID() int64 {
return BtcMainnetChain().ChainId
}

func BtcDustOffset() int64 {
return 0
}

func PolygonChain() Chain {
return Chain{
ChainName: ChainName_polygon_mainnet,
Expand Down
4 changes: 4 additions & 0 deletions common/default_chains_mock_mainnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ func BtcChainID() int64 {
return BtcMainnetChain().ChainId
}

func BtcDustOffset() int64 {
return 2000
}

func PolygonChain() Chain {
return Chain{
ChainName: ChainName_polygon_mainnet,
Expand Down
4 changes: 4 additions & 0 deletions common/default_chains_privnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ func BtcChainID() int64 {
return BtcRegtestChain().ChainId
}

func BtcDustOffset() int64 {
return 2000
}

func DefaultChainsList() []*Chain {
chains := []Chain{
BtcRegtestChain(),
Expand Down
4 changes: 4 additions & 0 deletions common/default_chains_testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ func BtcChainID() int64 {
return BtcTestNetChain().ChainId
}

func BtcDustOffset() int64 {
return 2000
}

func MumbaiChain() Chain {
return Chain{
ChainName: ChainName_mumbai_testnet,
Expand Down
Loading

0 comments on commit 8a53b8d

Please sign in to comment.