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: v11.0.0 #1444

Merged
merged 23 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
aaadff9
feat: zeta supply checks (#1358)
kingpinXD Nov 10, 2023
5420527
chore: improve changelogs format (#1390)
lumtis Nov 10, 2023
5e635ca
fix(`crosschain`): use event index in inbound tx digest (#1372)
lumtis Nov 11, 2023
c66a904
fix: cherry pick v10.1.x hotfix (minRelayTxFee and bitcoin mainnet/te…
ws4charlie Nov 13, 2023
ce3cc5f
feat: update observer (#1384)
kingpinXD Nov 14, 2023
23c7d9a
chore: add chain id to localnet and open port 26657 to make local tes…
CharlieMc0 Nov 16, 2023
fd0e56e
feat: Add HSM capability for zetaclient hot key - non production (#1387)
kevinssgh Nov 16, 2023
10308d1
fix: speed up evm outtx inclusion and improve log prints (#1406)
ws4charlie Nov 17, 2023
b98f760
docs: add code freeze note (#1414)
lumtis Nov 20, 2023
4d5995a
zetaclient: allow one 1 event that remotely calls zEVM contract per tx
brewmaster012 Nov 29, 2023
6d9e4c2
revert the accidental last commit
brewmaster012 Nov 29, 2023
73d87a2
include bitcoin outtx regardless of the cctx status (#38)
ws4charlie Nov 30, 2023
3f5fec9
refactor: condense logging for a supply checker (#9)
kingpinXD Dec 1, 2023
ccfb7ed
chore: increment handler version (#5)
kingpinXD Dec 1, 2023
8b765df
test: add tests for out tx tracker (#10)
kingpinXD Dec 1, 2023
09eed9c
fix: Zellic-3.7 - Add check for existing contract address to avoid ov…
kevinssgh Dec 1, 2023
8130fef
fix: Zellic-3.2 - prevent deposit when zrc20 is paused (#31)
lumtis Dec 1, 2023
b5409f4
test: ballot tests (#17)
kingpinXD Dec 1, 2023
aa5fb62
refactor(`fungible`): use code hash in `MsgUpdateContractBytecode` to…
lumtis Dec 1, 2023
dc5231e
refactor: consolidate builds (#22)
lumtis Dec 3, 2023
48b15c5
refactor: disable zeta supply checker routine (#45)
lumtis Dec 4, 2023
f56eb84
docs: update changelog with v11.0.0
lumtis Dec 19, 2023
f6c1b92
chore: update go releaser
lumtis Dec 19, 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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
GOOS: linux
GOARCH: ${{ env.CPU_ARCH }}
run: |
make install-testnet
make install
cp "$HOME"/go/bin/* ./
chmod a+x ./zetacored
./zetacored version
Expand Down
72 changes: 72 additions & 0 deletions Dockerfile-versioned-source
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
FROM golang:1.19-alpine

ENV GOPATH /go
ENV GOOS=linux
ENV CGO_ENABLED=1

ARG old_version

RUN apk --no-cache add git make build-base jq openssh libusb-dev linux-headers bash curl tmux
RUN ssh-keygen -b 2048 -t rsa -f /root/.ssh/localtest.pem -q -N ""

WORKDIR /go/delivery/zeta-node

RUN mkdir -p $GOPATH/bin/old
RUN mkdir -p $GOPATH/bin/new

ENV NEW_VERSION=v42.0.0

# Build new release from the current source
COPY go.mod /go/delivery/zeta-node/
COPY go.sum /go/delivery/zeta-node/
RUN cd /go/delivery/zeta-node/ && go mod download
COPY . /go/delivery/zeta-node/
RUN cd /go/delivery/zeta-node/ && make install
RUN cd /go/delivery/zeta-node/ && make install-smoketest
RUN cp $GOPATH/bin/zetacored $GOPATH/bin/new/
RUN cp $GOPATH/bin/zetaclientd $GOPATH/bin/new/
RUN cp $GOPATH/bin/smoketest $GOPATH/bin/new/

# Checkout and build old binary
RUN git clone https://github.com/zeta-chain/node.git
RUN cd node && git fetch

RUN cd node && git checkout ${old_version}
RUN cd node && make install
RUN cd node && make install-smoketest
RUN cp $GOPATH/bin/zetacored $GOPATH/bin/old/
RUN cp $GOPATH/bin/zetaclientd $GOPATH/bin/old/
RUN cp $GOPATH/bin/smoketest $GOPATH/bin/old/

RUN git clone https://github.com/zeta-chain/cosmos-sdk.git
RUN cd cosmos-sdk && git checkout zetavisor-v0.1.5
RUN cd cosmos-sdk/cosmovisor && make zetavisor
#
#FROM golang:1.19-alpine

#RUN apk --no-cache add openssh jq tmux vim curl bash
RUN ssh-keygen -A
WORKDIR /root

RUN cp /root/.ssh/localtest.pem.pub /root/.ssh/authorized_keys

RUN cp /go/bin/zetaclientd /usr/local/bin
RUN cp /go/bin/zetacored /usr/local/bin
RUN cp /go/bin/smoketest /usr/local/bin
RUN cp /go/bin/zetavisor /usr/local/bin

COPY contrib/localnet/scripts /root
COPY contrib/localnet/preparams /root/preparams
COPY contrib/localnet/ssh_config /root/.ssh/config
COPY contrib/localnet/zetacored /root/zetacored
COPY contrib/localnet/tss /root/tss

RUN chmod 755 /root/*.sh
RUN chmod 700 /root/.ssh
RUN chmod 600 /root/.ssh/*

WORKDIR /usr/local/bin
ENV SHELL /bin/sh
EXPOSE 22

ENTRYPOINT ["/usr/sbin/sshd", "-D"]
102 changes: 49 additions & 53 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=zetacore \
-X github.com/zeta-chain/zetacore/common.BuildTime=$(BUILDTIME) \
-X github.com/cosmos/cosmos-sdk/types.DBBackend=pebbledb

BUILD_FLAGS := -ldflags '$(ldflags)' -tags PRIVNET,pebbledb,ledger
TESTNET_BUILD_FLAGS := -ldflags '$(ldflags)' -tags TESTNET,pebbledb,ledger
MOCK_MAINNET_BUILD_FLAGS := -ldflags '$(ldflags)' -tags MOCK_MAINNET,pebbledb,ledger
MAINNET_BUILD_FLAGS := -ldflags '$(ldflags)' -tags pebbledb,ledger
BUILD_FLAGS := -ldflags '$(ldflags)' -tags pebbledb,ledger

TEST_DIR?="./..."
TEST_BUILD_FLAGS := -tags TESTNET,pebbledb,ledger
PRIV_BUILD_FLAGS := -tags PRIVNET,pebbledb,ledger
TEST_BUILD_FLAGS := -tags pebbledb,ledger
HSM_BUILD_FLAGS := -tags pebbledb,ledger,hsm_test

clean: clean-binaries clean-dir clean-test-dir clean-coverage

Expand All @@ -39,6 +36,22 @@ clean-dir:

all: install

go.sum: go.mod
@echo "--> Ensure dependencies have not been modified"
GO111MODULE=on go mod verify

###############################################################################
### Test commands ###
###############################################################################

run-test:
@go test ${TEST_BUILD_FLAGS} ${TEST_DIR}

test :clean-test-dir run-test

test-hsm:
@go test ${HSM_BUILD_FLAGS} ${TEST_DIR}

test-coverage-exclude-core:
@go test ${TEST_BUILD_FLAGS} -v -coverprofile coverage.out $(go list ./... | grep -v /x/zetacore/)

Expand All @@ -57,21 +70,9 @@ clean-test-dir:
@rm -rf x/crosschain/client/querytests/.zetacored
@rm -rf x/observer/client/querytests/.zetacored

run-test:
@go test ${TEST_BUILD_FLAGS} ${TEST_DIR}

test :clean-test-dir run-test

test-priv:
@go test ${PRIV_BUILD_FLAGS} ${TEST_DIR}

gosec:
gosec -exclude-dir=localnet ./...

install-testnet: go.sum
@echo "--> Installing zetacored & zetaclientd"
@go install -mod=readonly $(TESTNET_BUILD_FLAGS) ./cmd/zetacored
@go install -mod=readonly $(TESTNET_BUILD_FLAGS) ./cmd/zetaclientd
###############################################################################
### Install commands ###
###############################################################################

build-testnet-ubuntu: go.sum
docker build -t zetacore-ubuntu --platform linux/amd64 -f ./Dockerfile-athens3-ubuntu .
Expand All @@ -85,44 +86,26 @@ install: go.sum
@go install -race -mod=readonly $(BUILD_FLAGS) ./cmd/zetacored
@go install -race -mod=readonly $(BUILD_FLAGS) ./cmd/zetaclientd

install-mainnet: go.sum
@echo "--> Installing zetacored & zetaclientd"
@go install -mod=readonly $(MAINNET_BUILD_FLAGS) ./cmd/zetacored
@go install -mod=readonly $(MAINNET_BUILD_FLAGS) ./cmd/zetaclientd

install-mock-mainnet: go.sum
@echo "--> Installing zetacored & zetaclientd"
@go install -mod=readonly $(MOCK_MAINNET_BUILD_FLAGS) ./cmd/zetacored
@go install -mod=readonly $(MOCK_MAINNET_BUILD_FLAGS) ./cmd/zetaclientd


install-zetaclient: go.sum
@echo "--> Installing zetaclientd"
@go install -mod=readonly $(BUILD_FLAGS) ./cmd/zetaclientd

# running with race detector on will be slow
install-zetaclient-race-test-only-build: go.sum
@echo "--> Installing zetaclientd"
@go install -race -mod=readonly $(BUILD_FLAGS) ./cmd/zetaclientd

install-zetacore: go.sum
@echo "--> Installing zetacored"
@go install -mod=readonly $(BUILD_FLAGS) ./cmd/zetacored

install-zetacore-testnet: go.sum
@echo "--> Installing zetacored"
@go install -mod=readonly $(TESTNET_BUILD_FLAGS) ./cmd/zetacored
# running with race detector on will be slow
install-zetaclient-race-test-only-build: go.sum
@echo "--> Installing zetaclientd"
@go install -race -mod=readonly $(BUILD_FLAGS) ./cmd/zetaclientd

install-smoketest: go.sum
@echo "--> Installing orchestrator"
@go install -mod=readonly $(BUILD_FLAGS) ./contrib/localnet/orchestrator/smoketest

go.sum: go.mod
@echo "--> Ensure dependencies have not been modified"
GO111MODULE=on go mod verify

test-cctx:
./standalone-network/cctx-creator.sh
###############################################################################
### Local network ###
###############################################################################

init:
./standalone-network/init.sh
Expand All @@ -136,12 +119,12 @@ chain-stop:
@killall zetacored
@killall tail

test-cctx:
./standalone-network/cctx-creator.sh

chain-init-testnet: clean install-zetacore-testnet init
chain-run-testnet: clean install-zetacore-testnet init run

chain-init-mock-mainnet: clean install-mock-mainnet init
chain-run-mock-mainnet: clean install-mock-mainnet init run
###############################################################################
### Linting ###
###############################################################################

lint-pre:
@test -z $(gofmt -l .)
Expand All @@ -153,6 +136,13 @@ lint: lint-pre
lint-cosmos-gosec:
@bash ./scripts/cosmos-gosec.sh

gosec:
gosec -exclude-dir=localnet ./...

###############################################################################
### Generation commands ###
###############################################################################

proto:
@echo "--> Removing old Go types "
@find . -name '*.pb.go' -type f -delete
Expand Down Expand Up @@ -193,7 +183,7 @@ generate: proto openapi specs typescript docs-zetacored
.PHONY: generate

###############################################################################
### Docker Images ###
### Smoke tests ###
###############################################################################

zetanode:
Expand Down Expand Up @@ -237,13 +227,19 @@ stateful-upgrade:
$(DOCKER) build -t orchestrator -f contrib/localnet/orchestrator/Dockerfile-upgrade.fastbuild .
cd contrib/localnet/ && $(DOCKER) compose -f docker-compose-stateful.yml up -d

stateful-upgrade-source:
@echo "--> Starting stateful smoketest"
$(DOCKER) build --build-arg old_version=v10.1.7 -t zetanode -f ./Dockerfile-versioned-source .
$(DOCKER) build -t orchestrator -f contrib/localnet/orchestrator/Dockerfile-upgrade.fastbuild .
cd contrib/localnet/ && $(DOCKER) compose -f docker-compose-stateful.yml up -d

stop-stateful-upgrade:
cd contrib/localnet/ && $(DOCKER) compose -f docker-compose-stateful.yml down --remove-orphans


###############################################################################
### GoReleaser ###
###############################################################################

PACKAGE_NAME := github.com/zeta-chain/node
GOLANG_CROSS_VERSION ?= v1.20
GOPATH ?= '$(HOME)/go'
Expand Down
1 change: 1 addition & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ func New(
keys[zetaObserverModuleTypes.MemStoreKey],
app.GetSubspace(zetaObserverModuleTypes.ModuleName),
&stakingKeeper,
app.SlashingKeeper,
)

// register the staking hooks
Expand Down
2 changes: 1 addition & 1 deletion app/setup_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
observertypes "github.com/zeta-chain/zetacore/x/observer/types"
)

const releaseVersion = "v10.1.0"
const releaseVersion = "v11.0.0"

func SetupHandlers(app *App) {
app.UpgradeKeeper.SetUpgradeHandler(releaseVersion, func(ctx sdk.Context, plan types.Plan, vm module.VersionMap) (module.VersionMap, error) {
Expand Down
Loading
Loading