Skip to content

Commit

Permalink
merge develop branch into feat-support-taproot and resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
ws4charlie committed Apr 3, 2024
2 parents a341da9 + 64b898c commit e0f0196
Show file tree
Hide file tree
Showing 580 changed files with 9,418 additions and 7,362 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
* @brewmaster012 @kingpinXD @kevinssgh @fadeev @lumtis @ws4charlie @skosito
* @brewmaster012 @kingpinXD @kevinssgh @lumtis @ws4charlie @skosito

.github/** @zeta-chain/devops
2 changes: 1 addition & 1 deletion .github/workflows/change-log-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Changelog Check

on:
pull_request:
types: [opened, synchronize, reopened]
types: [opened, synchronize, reopened, labeled, unlabeled]

jobs:
check-changelog:
Expand Down
182 changes: 182 additions & 0 deletions .github/workflows/execute_advanced_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
name: "TESTING:ADVANCED:E2E"

on:
workflow_dispatch:
inputs:
e2e-admin-tests:
type: boolean
required: false
default: false
e2e-upgrade-test:
type: boolean
required: false
default: false
e2e-performance-test:
type: boolean
required: false
default: false
e2e-upgrade-test-light:
type: boolean
required: false
default: false
debug:
type: boolean
required: false
default: false

jobs:
e2e-admin-tests:
if: ${{ github.event.inputs.e2e-admin-tests == 'true' }}
runs-on: buildjet-4vcpu-ubuntu-2204
timeout-minutes: 120
steps:
- name: "Checkout Code"
uses: actions/checkout@v3

- name: Execute e2e-admin-tests
shell: bash
run: |
make start-e2e-admin-test
container_id=$(docker ps --filter "ancestor=orchestrator:latest" --format "{{.ID}}")
if [ -z "$container_id" ]; then
echo "Orchestrator container is not currently running. Exiting..."
exit 1
fi
echo "Monitoring Orchestrator container with ID: $container_id"
while true; do
current_status=$(docker ps -q | grep $container_id || echo "docker-ps-error")
if [ "$current_status" == "docker-ps-error" ]; then
echo "***********************************"
echo "* *"
echo "* *"
echo "* TESTING COMPLETE *"
echo "* *"
echo "* *"
echo "***********************************"
docker logs $container_id || echo "no logs"
exit 0
else
echo "Testing in progress still...."
if [ "${{ github.event.inputs.debug }}" == "true" ]; then
docker logs $container_id || echo "no logs"
fi
fi
sleep 5
done
e2e-upgrade-test:
if: ${{ github.event.inputs.e2e-upgrade-test == 'true' }}
runs-on: buildjet-4vcpu-ubuntu-2204
timeout-minutes: 120
steps:
- name: "Checkout Code"
uses: actions/checkout@v3

- name: Execute upgrade-test
shell: bash
run: |
make start-upgrade-test
container_id=$(docker ps --filter "ancestor=orchestrator:latest" --format "{{.ID}}")
if [ -z "$container_id" ]; then
echo "Orchestrator container is not currently running. Exiting..."
exit 1
fi
echo "Monitoring Orchestrator container with ID: $container_id"
while true; do
current_status=$(docker ps -q | grep $container_id || echo "docker-ps-error")
if [ "$current_status" == "docker-ps-error" ]; then
echo "***********************************"
echo "* *"
echo "* *"
echo "* TESTING COMPLETE *"
echo "* *"
echo "* *"
echo "***********************************"
docker logs $container_id || echo "no logs"
exit 0
else
echo "Testing in progress still...."
if [ "${{ github.event.inputs.debug }}" == "true" ]; then
docker logs $container_id || echo "no logs"
fi
fi
sleep 5
done
e2e-upgrade-test-light:
if: ${{ github.event.inputs.e2e-upgrade-test-light == 'true' }}
runs-on: buildjet-4vcpu-ubuntu-2204
timeout-minutes: 120
steps:
- name: "Checkout Code"
uses: actions/checkout@v3

- name: Execute upgrade-test-light
shell: bash
run: |
make start-upgrade-test-light
container_id=$(docker ps --filter "ancestor=orchestrator:latest" --format "{{.ID}}")
if [ -z "$container_id" ]; then
echo "Orchestrator container is not currently running. Exiting..."
exit 1
fi
echo "Monitoring Orchestrator container with ID: $container_id"
while true; do
current_status=$(docker ps -q | grep $container_id || echo "docker-ps-error")
if [ "$current_status" == "docker-ps-error" ]; then
echo "***********************************"
echo "* *"
echo "* *"
echo "* TESTING COMPLETE *"
echo "* *"
echo "* *"
echo "***********************************"
docker logs $container_id || echo "no logs"
exit 0
else
echo "Testing in progress still...."
if [ "${{ github.event.inputs.debug }}" == "true" ]; then
docker logs $container_id || echo "no logs"
fi
fi
sleep 5
done
e2e-performance-test:
if: ${{ github.event.inputs.e2e-performance-test == 'true' }}
runs-on: buildjet-4vcpu-ubuntu-2204
timeout-minutes: 120
steps:
- name: "Checkout Code"
uses: actions/checkout@v3

- name: Execute Performance Tests
shell: bash
run: |
make start-e2e-performance-test
container_id=$(docker ps --filter "ancestor=orchestrator:latest" --format "{{.ID}}")
if [ -z "$container_id" ]; then
echo "Orchestrator container is not currently running. Exiting..."
exit 1
fi
echo "Monitoring Orchestrator container with ID: $container_id"
while true; do
current_status=$(docker ps -q | grep $container_id || echo "docker-ps-error")
if [ "$current_status" == "docker-ps-error" ]; then
echo "***********************************"
echo "* *"
echo "* *"
echo "* TESTING COMPLETE *"
echo "* *"
echo "* *"
echo "***********************************"
docker logs $container_id || echo "no logs"
exit 0
else
echo "Testing in progress still...."
if [ "${{ github.event.inputs.debug }}" == "true" ]; then
docker logs $container_id || echo "no logs"
fi
fi
sleep 5
done
35 changes: 34 additions & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,37 @@ jobs:
run: |
echo "Check Skipped, Mark Green for Pipeline Execution"
e2e-admin-tests:
runs-on: buildjet-4vcpu-ubuntu-2204
timeout-minutes: 120
steps:
- name: "Checkout Code"
if: ${{ github.event.inputs.skip_checks != 'true' }}
uses: actions/checkout@v3

- name: Execute e2e-admin-tests
if: ${{ github.event.inputs.skip_checks != 'true' }}
shell: bash
run: |
make start-e2e-admin-test
e2e-upgrade-test:
runs-on: buildjet-4vcpu-ubuntu-2204
timeout-minutes: 120
steps:
- name: "Checkout Code"
if: ${{ github.event.inputs.skip_checks != 'true' }}
uses: actions/checkout@v3

- name: Execute upgrade-test
if: ${{ github.event.inputs.skip_checks != 'true' }}
shell: bash
run: |
make start-upgrade-test
approval:
runs-on: ubuntu-latest
timeout-minutes: 10
Expand All @@ -333,6 +364,8 @@ jobs:
- check-upgrade-handler-updated
- smoke-test
- build-test
- e2e-admin-tests
- e2e-upgrade-test
steps:

- uses: trstringer/manual-approval@v1
Expand All @@ -345,7 +378,6 @@ jobs:
exclude-workflow-initiator-as-approver: true
additional-approved-words: ''
additional-denied-words: ''

publish-release:
runs-on: buildjet-4vcpu-ubuntu-2004
timeout-minutes: 60
Expand Down Expand Up @@ -405,6 +437,7 @@ jobs:
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
prerelease: true
token: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}
body_path: ${{ github.workspace }}-CHANGELOG.txt
tag_name: ${{ env.GITHUB_TAG_MAJOR_VERSION }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rc-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
prerelease: true
token: ${{ secrets.PAT_GITHUB_SERVICE_ACCT }}
body_path: ${{ github.workspace }}-CHANGELOG.txt
generate_release_notes: true
Expand Down
8 changes: 4 additions & 4 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ builds:
- -X github.com/cosmos/cosmos-sdk/version.ClientName=zetaclientd
- -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }}
- -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Env.COMMIT }}
- -X github.com/zeta-chain/zetacore/common.Name=zetacored
- -X github.com/zeta-chain/zetacore/common.Version={{ .Version }}
- -X github.com/zeta-chain/zetacore/common.CommitHash={{ .Env.COMMIT }}
- -X github.com/zeta-chain/zetacore/common.BuildTime=={{ .Env.BUILDTIME }}
- -X github.com/zeta-chain/zetacore/pkg/constant.Name=zetacored
- -X github.com/zeta-chain/zetacore/pkg/constant.Version={{ .Version }}
- -X github.com/zeta-chain/zetacore/pkg/constant.CommitHash={{ .Env.COMMIT }}
- -X github.com/zeta-chain/zetacore/pkg/constant.BuildTime={{ .Env.BUILDTIME }}
- -X github.com/cosmos/cosmos-sdk/types.DBBackend=pebbledb

- id: "zetaclientd"
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=zetacore \
-X github.com/cosmos/cosmos-sdk/version.ClientName=zetaclientd \
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \
-X github.com/zeta-chain/zetacore/common.Name=zetacored \
-X github.com/zeta-chain/zetacore/common.Version=$(VERSION) \
-X github.com/zeta-chain/zetacore/common.CommitHash=$(COMMIT) \
-X github.com/zeta-chain/zetacore/common.BuildTime=$(BUILDTIME) \
-X github.com/zeta-chain/zetacore/pkg/constant.Name=zetacored \
-X github.com/zeta-chain/zetacore/pkg/constant.Version=$(VERSION) \
-X github.com/zeta-chain/zetacore/pkg/constant.CommitHash=$(COMMIT) \
-X github.com/zeta-chain/zetacore/pkg/constant.BuildTime=$(BUILDTIME) \
-X github.com/cosmos/cosmos-sdk/types.DBBackend=pebbledb

BUILD_FLAGS := -ldflags '$(ldflags)' -tags pebbledb,ledger
Expand Down
4 changes: 2 additions & 2 deletions app/ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
// if tx is a system tx, and singer is authorized, use system tx handler

isAuthorized := func(creator string) bool {
return options.ObserverKeeper.IsAuthorized(ctx, creator)
return options.ObserverKeeper.IsNonTombstonedObserver(ctx, creator)
}
if IsSystemTx(tx, isAuthorized) {
anteHandler = newCosmosAnteHandlerForSystemTx(options)
Expand Down Expand Up @@ -172,7 +172,7 @@ func IsSystemTx(tx sdk.Tx, isAuthorizedSigner func(string) bool) bool {
*cctxtypes.MsgVoteOnObservedInboundTx,
*cctxtypes.MsgVoteOnObservedOutboundTx,
*cctxtypes.MsgAddToOutTxTracker,
*cctxtypes.MsgCreateTSSVoter,
*observertypes.MsgVoteTSS,
*observertypes.MsgAddBlockHeader,
*observertypes.MsgAddBlameVote:
signers := innerMsg.GetSigners()
Expand Down
22 changes: 11 additions & 11 deletions app/ante/ante_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestIsSystemTx(t *testing.T) {
// *cctxtypes.MsgVoteOnObservedInboundTx,
// *cctxtypes.MsgVoteOnObservedOutboundTx,
// *cctxtypes.MsgAddToOutTxTracker,
// *cctxtypes.MsgCreateTSSVoter,
// *observertypes.MsgVoteTSS,
// *observertypes.MsgAddBlockHeader,
// *observertypes.MsgAddBlameVote:
buildTxFromMsg := func(msg sdk.Msg) sdk.Tx {
Expand Down Expand Up @@ -64,26 +64,26 @@ func TestIsSystemTx(t *testing.T) {
wantIs bool
}{
{
"MsgCreateTSSVoter",
buildTxFromMsg(&crosschaintypes.MsgCreateTSSVoter{
"MsgVoteTSS",
buildTxFromMsg(&observertypes.MsgVoteTSS{
Creator: sample.AccAddress(),
TssPubkey: "pubkey1234",
}),
isAuthorizedFalse,
false,
},
{
"MsgCreateTSSVoter",
buildTxFromMsg(&crosschaintypes.MsgCreateTSSVoter{
"MsgVoteTSS",
buildTxFromMsg(&observertypes.MsgVoteTSS{
Creator: sample.AccAddress(),
TssPubkey: "pubkey1234",
}),
isAuthorized,
true,
},
{
"MsgExec{MsgCreateTSSVoter}",
buildAuthzTxFromMsg(&crosschaintypes.MsgCreateTSSVoter{
"MsgExec{MsgVoteTSS}",
buildAuthzTxFromMsg(&observertypes.MsgVoteTSS{
Creator: sample.AccAddress(),
TssPubkey: "pubkey1234",
}),
Expand Down Expand Up @@ -169,17 +169,17 @@ func TestIsSystemTx(t *testing.T) {
true,
},
{
"MsgCreateTSSVoter",
buildTxFromMsg(&crosschaintypes.MsgCreateTSSVoter{
"MsgVoteTSS",
buildTxFromMsg(&observertypes.MsgVoteTSS{
Creator: sample.AccAddress(),
}),
isAuthorized,

true,
},
{
"MsgExec{MsgCreateTSSVoter}",
buildAuthzTxFromMsg(&crosschaintypes.MsgCreateTSSVoter{
"MsgExec{MsgVoteTSS}",
buildAuthzTxFromMsg(&observertypes.MsgVoteTSS{
Creator: sample.AccAddress(),
}),
isAuthorized,
Expand Down
Loading

0 comments on commit e0f0196

Please sign in to comment.