Skip to content

Commit

Permalink
Merge branch 'develop' into try-fix-E2E-crosschain-swap
Browse files Browse the repository at this point in the history
  • Loading branch information
ws4charlie authored May 29, 2024
2 parents b3f7224 + b73fbcf commit 1d2edd1
Show file tree
Hide file tree
Showing 111 changed files with 2,810 additions and 1,733 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ jobs:
build-test:
needs:
- check_branch
runs-on: buildjet-4vcpu-ubuntu-2004
runs-on: buildjet-4vcpu-ubuntu-2204
timeout-minutes: 15
concurrency:
group: "build-test"
Expand Down Expand Up @@ -411,7 +411,7 @@ jobs:
- e2e-admin-tests
- e2e-upgrade-test
- check_branch
runs-on: buildjet-4vcpu-ubuntu-2004
runs-on: ubuntu-20.04
timeout-minutes: 60
environment: release
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rc-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
echo "The major version found in 'releaseVersion' in app/setup_handlers.go matches this tagged release - Moving Forward!"
publish-release:
runs-on: buildjet-4vcpu-ubuntu-2004
runs-on: buildjet-4vcpu-ubuntu-2204
timeout-minutes: 60
needs:
- pre-release-checks
Expand Down
4 changes: 3 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* [2152](https://github.com/zeta-chain/node/pull/2152) - custom priority nonce mempool
* [2113](https://github.com/zeta-chain/node/pull/2113) - add zetaclientd-supervisor process
* [2154](https://github.com/zeta-chain/node/pull/2154) - add `ibccrosschain` module
* [2258](https://github.com/zeta-chain/node/pull/2258) - add Optimism and Base in static chain information

### Refactor

Expand All @@ -29,6 +30,7 @@
* [2210](https://github.com/zeta-chain/node/pull/2210) - removed uncessary panics in the zetaclientd process
* [2205](https://github.com/zeta-chain/node/pull/2205) - remove deprecated variables pre-v17
* [2226](https://github.com/zeta-chain/node/pull/2226) - improve Go formatting with imports standardization and max line length to 120
* [2262](https://github.com/zeta-chain/node/pull/2262) - refactor MsgUpdateZRC20 into MsgPauseZrc20 and MsgUnPauseZRC20

### Tests

Expand All @@ -49,7 +51,7 @@
* [2256](https://github.com/zeta-chain/node/pull/2256) - fix rate limiter falsely included reverted non-withdraw cctxs

### CI

* [2268](https://github.com/zeta-chain/node/pull/2268) - CI: updated the publish-release pipeline to utilize the Github Actions Ubuntu 20.04 Runners.
* [2070](https://github.com/zeta-chain/node/pull/2070) - Added commands to build binaries from the working branch as a live full node rpc to test non-governance changes.
* [2119](https://github.com/zeta-chain/node/pull/2119) - Updated the release pipeline to only run on hotfix/ and release/ branches. Added option to only run pre-checks and not cut release as well. Switched approval steps to use environments.
* [2189](https://github.com/zeta-chain/node/pull/2189) - Updated the docker tag when a release trigger runs to be the github event for the release name which should be the version. Removed mac specific build as the arm build should handle that.
Expand Down
2 changes: 1 addition & 1 deletion cmd/zetaclientd/keygen_tss.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func GenerateTss(
// Bitcoin chain ID is currently used for using the correct signature format
// TODO: remove this once we have a better way to determine the signature format
// https://github.com/zeta-chain/node/issues/1397
bitcoinChainID := chains.BtcRegtestChain.ChainId
bitcoinChainID := chains.BitcoinRegtest.ChainId
btcChain, _, btcEnabled := appContext.GetBTCChainAndConfig()
if btcEnabled {
bitcoinChainID = btcChain.ChainId
Expand Down
3 changes: 2 additions & 1 deletion cmd/zetae2e/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ func ExportContractsFromRunner(r *runner.E2ERunner, conf config.Config) config.C
conf.Contracts.EVM.ConnectorEthAddr = r.ConnectorEthAddr.Hex()
conf.Contracts.EVM.CustodyAddr = r.ERC20CustodyAddr.Hex()
conf.Contracts.EVM.ERC20 = r.ERC20Addr.Hex()
conf.Contracts.EVM.TestDappAddr = r.EvmTestDAppAddr.Hex()

conf.Contracts.ZEVM.SystemContractAddr = r.SystemContractAddr.Hex()
conf.Contracts.ZEVM.ETHZRC20Addr = r.ETHZRC20Addr.Hex()
Expand All @@ -107,7 +108,7 @@ func ExportContractsFromRunner(r *runner.E2ERunner, conf config.Config) config.C
conf.Contracts.ZEVM.WZetaAddr = r.WZetaAddr.Hex()
conf.Contracts.ZEVM.ZEVMSwapAppAddr = r.ZEVMSwapAppAddr.Hex()
conf.Contracts.ZEVM.ContextAppAddr = r.ContextAppAddr.Hex()
conf.Contracts.ZEVM.TestDappAddr = r.EvmTestDAppAddr.Hex()
conf.Contracts.ZEVM.TestDappAddr = r.ZevmTestDAppAddr.Hex()

return conf
}
8 changes: 7 additions & 1 deletion cmd/zetae2e/config/contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,13 @@ func setContractsFromConfig(r *runner.E2ERunner, conf config.Config) error {
}
if c := conf.Contracts.ZEVM.TestDappAddr; c != "" {
if !ethcommon.IsHexAddress(c) {
return fmt.Errorf("invalid TestDappAddr: %s", c)
return fmt.Errorf("invalid ZevmTestDappAddr: %s", c)
}
r.ZevmTestDAppAddr = ethcommon.HexToAddress(c)
}
if c := conf.Contracts.EVM.TestDappAddr; c != "" {
if !ethcommon.IsHexAddress(c) {
return fmt.Errorf("invalid EvmTestDappAddr: %s", c)
}
r.EvmTestDAppAddr = ethcommon.HexToAddress(c)
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/zetae2e/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ func localE2ETest(cmd *cobra.Command, _ []string) {

if !skipHeaderProof {
if err := deployerRunner.EnableHeaderVerification([]int64{
chains.GoerliLocalnetChain.ChainId,
chains.BtcRegtestChain.ChainId}); err != nil {
chains.GoerliLocalnet.ChainId,
chains.BitcoinRegtest.ChainId}); err != nil {
panic(err)
}
}
Expand Down
40 changes: 28 additions & 12 deletions contrib/localnet/orchestrator/start-zetae2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,24 +79,29 @@ if [ "$OPTION" == "upgrade" ]; then
# Fetch the height of the upgrade, default is 225, if arg3 is passed, use that value
UPGRADE_HEIGHT=${3:-225}

# Run zetae2e, if the upgrade height is lower than 100, we use the setup-only flag
if [ "$UPGRADE_HEIGHT" -lt 100 ]; then
echo "running E2E command to setup the networks..."
if [[ ! -f deployed.yml ]]; then
zetae2e "$ZETAE2E_CMD" --setup-only --config-out deployed.yml --skip-header-proof
if [ $? -ne 0 ]; then
echo "e2e setup failed"
exit 1
fi
else
echo "skipping e2e setup because it has already been completed"
fi

# Run zetae2e, if the upgrade height is greater than 100 to populate the state
if [ "$UPGRADE_HEIGHT" -gt 100 ]; then
echo "running E2E command to setup the networks and populate the state..."

# Use light flag to ensure tests can complete before the upgrade height
zetae2e "$ZETAE2E_CMD" --config-out deployed.yml --light --skip-header-proof
fi
ZETAE2E_EXIT_CODE=$?

if [ $ZETAE2E_EXIT_CODE -ne 0 ]; then
echo "E2E setup failed"
exit 1
zetae2e "$ZETAE2E_CMD" --skip-setup --config deployed.yml --light --skip-header-proof
if [ $? -ne 0 ]; then
echo "first e2e failed"
exit 1
fi
fi

echo "E2E setup passed, waiting for upgrade height..."
echo "Waiting for upgrade height..."

OLD_VERSION=$(get_zetacored_version)

Expand Down Expand Up @@ -148,10 +153,21 @@ if [ "$OPTION" == "upgrade" ]; then
else

# Run the e2e tests normally
echo "running e2e setup..."

if [[ ! -f deployed.yml ]]; then
zetae2e "$ZETAE2E_CMD" --setup-only --config-out deployed.yml
if [ $? -ne 0 ]; then
echo "e2e setup failed"
exit 1
fi
else
echo "skipping e2e setup because it has already been completed"
fi

echo "running e2e tests..."

eval "zetae2e $ZETAE2E_CMD"
zetae2e "$ZETAE2E_CMD" --skip-setup --config deployed.yml
ZETAE2E_EXIT_CODE=$?

# if e2e passed, exit with 0, otherwise exit with 1
Expand Down
3 changes: 2 additions & 1 deletion docs/cli/zetacored/zetacored_tx_fungible.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ zetacored tx fungible [flags]
* [zetacored tx](zetacored_tx.md) - Transactions subcommands
* [zetacored tx fungible deploy-fungible-coin-zrc-4](zetacored_tx_fungible_deploy-fungible-coin-zrc-4.md) - Broadcast message DeployFungibleCoinZRC20
* [zetacored tx fungible deploy-system-contracts](zetacored_tx_fungible_deploy-system-contracts.md) - Broadcast message SystemContracts
* [zetacored tx fungible pause-zrc20](zetacored_tx_fungible_pause-zrc20.md) - Broadcast message PauseZRC20
* [zetacored tx fungible remove-foreign-coin](zetacored_tx_fungible_remove-foreign-coin.md) - Broadcast message RemoveForeignCoin
* [zetacored tx fungible unpause-zrc20](zetacored_tx_fungible_unpause-zrc20.md) - Broadcast message UnpauseZRC20
* [zetacored tx fungible update-contract-bytecode](zetacored_tx_fungible_update-contract-bytecode.md) - Broadcast message UpdateContractBytecode
* [zetacored tx fungible update-system-contract](zetacored_tx_fungible_update-system-contract.md) - Broadcast message UpdateSystemContract
* [zetacored tx fungible update-zrc20-liquidity-cap](zetacored_tx_fungible_update-zrc20-liquidity-cap.md) - Broadcast message UpdateZRC20LiquidityCap
* [zetacored tx fungible update-zrc20-paused-status](zetacored_tx_fungible_update-zrc20-paused-status.md) - Broadcast message UpdateZRC20PausedStatus
* [zetacored tx fungible update-zrc20-withdraw-fee](zetacored_tx_fungible_update-zrc20-withdraw-fee.md) - Broadcast message UpdateZRC20WithdrawFee

Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# tx fungible update-zrc20-paused-status
# tx fungible pause-zrc20

Broadcast message UpdateZRC20PausedStatus
Broadcast message PauseZRC20

```
zetacored tx fungible update-zrc20-paused-status [contractAddress1, contractAddress2, ...] [pausedStatus] [flags]
zetacored tx fungible pause-zrc20 [contractAddress1, contractAddress2, ...] [flags]
```

### Examples

```
zetacored tx fungible update-zrc20-paused-status "0xece40cbB54d65282c4623f141c4a8a0bE7D6AdEc, 0xece40cbB54d65282c4623f141c4a8a0bEjgksncf" 0
zetacored tx fungible pause-zrc20 "0xece40cbB54d65282c4623f141c4a8a0bE7D6AdEc, 0xece40cbB54d65282c4623f141c4a8a0bEjgksncf"
```

### Options
Expand All @@ -28,7 +28,7 @@ zetacored tx fungible update-zrc20-paused-status "0xece40cbB54d65282c4623f141c4a
--gas-adjustment float adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored (default 1)
--gas-prices string Gas prices in decimal format to determine the transaction fee (e.g. 0.1uatom)
--generate-only Build an unsigned transaction and write it to STDOUT (when enabled, the local Keybase only accessed when providing a key name)
-h, --help help for update-zrc20-paused-status
-h, --help help for pause-zrc20
--keyring-backend string Select keyring's backend (os|file|kwallet|pass|test|memory)
--keyring-dir string The client Keyring directory; if omitted, the default 'home' directory will be used
--ledger Use a connected Ledger device
Expand Down
59 changes: 59 additions & 0 deletions docs/cli/zetacored/zetacored_tx_fungible_unpause-zrc20.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# tx fungible unpause-zrc20

Broadcast message UnpauseZRC20

```
zetacored tx fungible unpause-zrc20 [contractAddress1, contractAddress2, ...] [flags]
```

### Examples

```
zetacored tx fungible unpause-zrc20 "0xece40cbB54d65282c4623f141c4a8a0bE7D6AdEc, 0xece40cbB54d65282c4623f141c4a8a0bEjgksncf"
```

### Options

```
-a, --account-number uint The account number of the signing account (offline mode only)
--aux Generate aux signer data instead of sending a tx
-b, --broadcast-mode string Transaction broadcasting mode (sync|async)
--chain-id string The network chain ID
--dry-run ignore the --gas flag and perform a simulation of a transaction, but don't broadcast it (when enabled, the local Keybase is not accessible)
--fee-granter string Fee granter grants fees for the transaction
--fee-payer string Fee payer pays fees for the transaction instead of deducting from the signer
--fees string Fees to pay along with transaction; eg: 10uatom
--from string Name or address of private key with which to sign
--gas string gas limit to set per-transaction; set to "auto" to calculate sufficient gas automatically. Note: "auto" option doesn't always report accurate results. Set a valid coin value to adjust the result. Can be used instead of "fees". (default 200000)
--gas-adjustment float adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored (default 1)
--gas-prices string Gas prices in decimal format to determine the transaction fee (e.g. 0.1uatom)
--generate-only Build an unsigned transaction and write it to STDOUT (when enabled, the local Keybase only accessed when providing a key name)
-h, --help help for unpause-zrc20
--keyring-backend string Select keyring's backend (os|file|kwallet|pass|test|memory)
--keyring-dir string The client Keyring directory; if omitted, the default 'home' directory will be used
--ledger Use a connected Ledger device
--node string [host]:[port] to tendermint rpc interface for this chain
--note string Note to add a description to the transaction (previously --memo)
--offline Offline mode (does not allow any online functionality)
-o, --output string Output format (text|json)
-s, --sequence uint The sequence number of the signing account (offline mode only)
--sign-mode string Choose sign mode (direct|amino-json|direct-aux), this is an advanced feature
--timeout-height uint Set a block timeout height to prevent the tx from being committed past a certain height
--tip string Tip is the amount that is going to be transferred to the fee payer on the target chain. This flag is only valid when used with --aux, and is ignored if the target chain didn't enable the TipDecorator
-y, --yes Skip tx broadcasting prompt confirmation
```

### Options inherited from parent commands

```
--home string directory for config and data
--log_format string The logging format (json|plain)
--log_level string The logging level (trace|debug|info|warn|error|fatal|panic)
--log_no_color Disable colored logs
--trace print out full stack trace on errors
```

### SEE ALSO

* [zetacored tx fungible](zetacored_tx_fungible.md) - fungible transactions subcommands

Loading

0 comments on commit 1d2edd1

Please sign in to comment.