Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feat/zetaclient/ts…
Browse files Browse the repository at this point in the history
…s-improvements

# Conflicts:
#	cmd/zetaclientd/start.go
  • Loading branch information
swift1337 committed Nov 21, 2024
2 parents 034f19f + 495235e commit f7af651
Show file tree
Hide file tree
Showing 39 changed files with 1,158 additions and 169 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ jobs:
echo "${{ github.ref }}"
check-goreleaser:
if: inputs.skip_checks != true
runs-on: ${{ vars.RELEASE_RUNNER }}
steps:
- uses: actions/checkout@v4
- name: Build release snapshot
if: inputs.skip_checks != true
run: |
make release-snapshot
Expand Down
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@
## Unreleased

### Features

* [2984](https://github.com/zeta-chain/node/pull/2984) - add Whitelist message ability to whitelist SPL tokens on Solana
* [3091](https://github.com/zeta-chain/node/pull/3091) - improve build reproducability. `make release{,-build-only}` checksums should now be stable.
* [3124](https://github.com/zeta-chain/node/pull/3124) - integrate SPL deposits
* [3134](https://github.com/zeta-chain/node/pull/3134) - integrate SPL tokens withdraw to Solana
* [3182](https://github.com/zeta-chain/node/pull/3182) - enable zetaclient pprof server on port 6061

### Tests

* [3075](https://github.com/zeta-chain/node/pull/3075) - ton: withdraw concurrent, deposit & revert.
* [3105](https://github.com/zeta-chain/node/pull/3105) - split Bitcoin E2E tests into two runners for deposit and withdraw
* [3154](https://github.com/zeta-chain/node/pull/3154) - configure Solana gateway program id for E2E tests
* [3188](https://github.com/zeta-chain/node/pull/3188) - add e2e test for v2 deposit and call with swap

### Refactor

* [3118](https://github.com/zeta-chain/node/pull/3118) - zetaclient: remove hsm signer
* [3122](https://github.com/zeta-chain/node/pull/3122) - improve & refactor zetaclientd cli
* [3125](https://github.com/zeta-chain/node/pull/3125) - drop support for header proofs
Expand All @@ -23,11 +27,15 @@
* [3170](https://github.com/zeta-chain/node/pull/3170) - revamp TSS package in zetaclient

### Fixes

* [3117](https://github.com/zeta-chain/node/pull/3117) - register messages for emissions module to legacy amino codec.
* [3041](https://github.com/zeta-chain/node/pull/3041) - replace libp2p public DHT with private gossip peer discovery and connection gater for inbound connections
* [3106](https://github.com/zeta-chain/node/pull/3106) - prevent blocked CCTX on out of gas during omnichain calls
* [3139](https://github.com/zeta-chain/node/pull/3139) - fix config resolution in orchestrator
* [3149](https://github.com/zeta-chain/node/pull/3149) - abort the cctx if dust amount is detected in the revert outbound
* [3155](https://github.com/zeta-chain/node/pull/3155) - fix potential panic in the Bitcoin inscription parsing
* [3162](https://github.com/zeta-chain/node/pull/3162) - skip depositor fee calculation if transaction does not involve TSS address
* [3179](https://github.com/zeta-chain/node/pull/3179) - support inbound trackers for v2 cctx

## v21.0.0

Expand Down
12 changes: 12 additions & 0 deletions cmd/zetaclientd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package main

import (
"context"
"net/http"
_ "net/http/pprof" // #nosec G108 -- pprof enablement is intentional
"os"
"os/signal"
"path/filepath"
Expand Down Expand Up @@ -167,6 +169,16 @@ func Start(_ *cobra.Command, _ []string) error {
signalChannel := make(chan os.Signal, 1)
signal.Notify(signalChannel, syscall.SIGINT, syscall.SIGTERM)

// pprof http server
// zetacored/cometbft is already listening for pprof on 6060 (by default)
go func() {
// #nosec G114 -- timeouts uneeded
err := http.ListenAndServe("localhost:6061", nil)
if err != nil {
log.Error().Err(err).Msg("pprof http server error")
}
}()

// Starts various background TSS listeners.
// Shuts down zetaclientd if any is triggered.
maintenance.NewTSSListener(zetacoreClient, masterLogger).Listen(ctx, func() {
Expand Down
4 changes: 3 additions & 1 deletion cmd/zetae2e/config/local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,15 @@ contracts:
wzeta: "0x5F0b1a82749cb4E2278EC87F8BF6B618dC71a8bf"
test_dapp: "0xA8D5060feb6B456e886F023709A2795373691E63"
gateway: "0xa825eAa55b497AF892faca73a3797046C10B7c23"
test_dapp_v2: "0xBFF76e77D56B3C1202107f059425D56f0AEF87Ed"
evm:
zeta_eth: "0x733aB8b06DDDEf27Eaa72294B0d7c9cEF7f12db9"
connector_eth: "0xD28D6A0b8189305551a0A8bd247a6ECa9CE781Ca"
custody: "0xff3135df4F2775f4091b81f4c7B6359CfA07862a"
custody: "0x784aE8B474aebabB74526701146a708734f6931c"
erc20: "0xbD1e64A22B9F92D9Ce81aA9B4b0fFacd80215564"
test_dapp: "0xBFF76e77D56B3C1202107f059425D56f0AEF87Ed"
gateway: "0xF0deebCB0E9C829519C4baa794c5445171973826"
test_dapp_v2: "0xa825eAa55b497AF892faca73a3797046C10B7c23"
solana:
gateway_program_id: "94U5AHQMKkV5txNJ17QPXWoh474PheGou6cNP2FEuL1d"
spl: ""
1 change: 1 addition & 0 deletions cmd/zetae2e/local/v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func startV2Tests(eg *errgroup.Group, conf config.Config, deployerRunner *runner
e2etests.TestV2ERC20WithdrawAndCallName,
e2etests.TestV2ERC20DepositAndCallNoMessageName,
e2etests.TestV2ERC20WithdrawAndCallNoMessageName,
e2etests.TestV2DepositAndCallSwapName,
))

// Test revert cases for gas token workflow
Expand Down
26 changes: 26 additions & 0 deletions cmd/zetae2e/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import (
"github.com/zeta-chain/node/e2e/config"
"github.com/zeta-chain/node/e2e/e2etests"
"github.com/zeta-chain/node/e2e/runner"
"github.com/zeta-chain/node/e2e/txserver"
"github.com/zeta-chain/node/e2e/utils"
fungibletypes "github.com/zeta-chain/node/x/fungible/types"
observertypes "github.com/zeta-chain/node/x/observer/types"
)
Expand Down Expand Up @@ -104,6 +106,29 @@ func runE2ETest(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

var runnerOpts []runner.E2ERunnerOption

// if keys are defined for all policy accounts, we initialize a ZETA tx server allowing to send admin actions
emergencyKey := conf.PolicyAccounts.EmergencyPolicyAccount.RawPrivateKey.String()
operationalKey := conf.PolicyAccounts.OperationalPolicyAccount.RawPrivateKey.String()
adminKey := conf.PolicyAccounts.AdminPolicyAccount.RawPrivateKey.String()
if emergencyKey != "" && operationalKey != "" && adminKey != "" {
zetaTxServer, err := txserver.NewZetaTxServer(
conf.RPCs.ZetaCoreRPC,
[]string{utils.EmergencyPolicyName, utils.OperationalPolicyName, utils.AdminPolicyName},
[]string{
emergencyKey,
operationalKey,
adminKey,
},
conf.ZetaChainID,
)
if err != nil {
return err
}
runnerOpts = append(runnerOpts, runner.WithZetaTxServer(zetaTxServer))
}

// initialize deployer runner with config
testRunner, err := zetae2econfig.RunnerFromConfig(
ctx,
Expand All @@ -112,6 +137,7 @@ func runE2ETest(cmd *cobra.Command, args []string) error {
conf,
conf.DefaultAccount,
logger,
runnerOpts...,
)
if err != nil {
return err
Expand Down
45 changes: 45 additions & 0 deletions e2e/contracts/zevmswap/ZEVMSwapApp.abi
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,51 @@
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "bytes",
"name": "origin",
"type": "bytes"
},
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "chainID",
"type": "uint256"
}
],
"internalType": "struct Context",
"name": "",
"type": "tuple"
},
{
"internalType": "address",
"name": "zrc20",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "message",
"type": "bytes"
}
],
"name": "onCall",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
Expand Down
2 changes: 1 addition & 1 deletion e2e/contracts/zevmswap/ZEVMSwapApp.bin

Large diffs are not rendered by default.

Loading

0 comments on commit f7af651

Please sign in to comment.