-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add import data to e2e tests (#2127)
E2E Testing Improvements: Disabled the header proof test in local upgrade E2E tests. Introduced an option to skip the header proof test. Utilized the new skip option for migration testing. Moved Bitcoin address tests to the advanced section. Logging and Version: Displayed cross-chain transaction (cctx) details in logs. Updated the application version. Fixes and Enhancements: Corrected verification flags error. Added legacy genesis structures. Implemented E2E testing with imported data. Updated the upgrade testing to utilize state export. Code Maintenance: Added latest genesis data to a new command. Included additional comments and resolved unit test issues. Removed unused functions. Parameterized the import data script. Documented a changelog and generated files. Added an issue to track the removal of legacy modules. Pipeline Updates: Updated the release pipeline, including removing unnecessary chmod commands from the Makefile.
- Loading branch information
Showing
21 changed files
with
1,905 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
version: "3" | ||
|
||
# This docker-compose file configures the localnet environment | ||
# it contains the following services: | ||
# - ZetaChain with 2 nodes (zetacore0, zetacore1) | ||
# - A observer set with 2 clients (zetaclient0, zetaclient1) | ||
# - An Ethereum node (eth) | ||
# - A Bitcoin node (bitcoin) | ||
# - A Rosetta API (rosetta) | ||
# - An orchestrator to manage interaction with the localnet (orchestrator) | ||
|
||
networks: | ||
mynetwork: | ||
ipam: | ||
config: | ||
- subnet: 172.20.0.0/24 | ||
|
||
services: | ||
rosetta: | ||
image: zetanode:latest | ||
container_name: rosetta | ||
hostname: rosetta | ||
ports: | ||
- "8080:8080" | ||
networks: | ||
mynetwork: | ||
ipv4_address: 172.20.0.200 | ||
entrypoint: ["zetacored", "rosetta", "--tendermint", "zetacore0:26657", "--grpc", "zetacore0:9090", "--network", "athens_101-1", "--blockchain", "zetacore" ,"--retries", "500"] | ||
|
||
zetacore0: | ||
image: zetanode:latest | ||
container_name: zetacore0 | ||
build: | ||
context: .. | ||
dockerfile: Dockerfile-localnet | ||
hostname: zetacore0 | ||
ports: | ||
- "1317:1317" | ||
- "9545:8545" | ||
- "9546:8546" | ||
- "26657:26657" | ||
- "6060:6060" | ||
- "9090:9090" | ||
networks: | ||
mynetwork: | ||
ipv4_address: 172.20.0.11 | ||
entrypoint: ["/root/start-zetacored.sh", "2","import-data"] | ||
environment: | ||
- HOTKEY_BACKEND=file | ||
- HOTKEY_PASSWORD=password # test purposes only | ||
volumes: | ||
- ~/genesis_export/:/root/genesis_data | ||
|
||
zetacore1: | ||
image: zetanode:latest | ||
container_name: zetacore1 | ||
build: | ||
context: .. | ||
dockerfile: Dockerfile-localnet | ||
hostname: zetacore1 | ||
networks: | ||
mynetwork: | ||
ipv4_address: 172.20.0.12 | ||
entrypoint: ["/root/start-zetacored.sh", "2","import-data"] | ||
environment: | ||
- HOTKEY_BACKEND=file | ||
- HOTKEY_PASSWORD=password # test purposes only | ||
|
||
|
||
zetaclient0: | ||
image: zetanode:latest | ||
container_name: zetaclient0 | ||
build: | ||
context: .. | ||
dockerfile: Dockerfile-localnet | ||
hostname: zetaclient0 | ||
networks: | ||
mynetwork: | ||
ipv4_address: 172.20.0.21 | ||
entrypoint: ["/root/start-zetaclientd.sh", "import-data"] | ||
environment: | ||
- ETHDEV_ENDPOINT=http://eth:8545 | ||
- HOTKEY_BACKEND=file | ||
- HOTKEY_PASSWORD=password # test purposes only | ||
|
||
zetaclient1: | ||
image: zetanode:latest | ||
container_name: zetaclient1 | ||
build: | ||
context: .. | ||
dockerfile: Dockerfile-localnet | ||
hostname: zetaclient1 | ||
networks: | ||
mynetwork: | ||
ipv4_address: 172.20.0.22 | ||
entrypoint: ["/root/start-zetaclientd.sh", "import-data"] | ||
environment: | ||
- ETHDEV_ENDPOINT=http://eth:8545 | ||
- HOTKEY_BACKEND=file | ||
- HOTKEY_PASSWORD=password # test purposes only | ||
|
||
eth: | ||
image: ethereum/client-go:v1.10.26 | ||
container_name: eth | ||
hostname: eth | ||
ports: | ||
- "8545:8545" | ||
networks: | ||
mynetwork: | ||
ipv4_address: 172.20.0.100 | ||
entrypoint: ["geth", "--dev", "--http", "--http.addr", "172.20.0.100", "--http.vhosts", "*", "--http.api", "eth,web3,net", "--http.corsdomain", "https://remix.ethereum.org", "--dev.period", "2"] | ||
|
||
bitcoin: | ||
image: ruimarinho/bitcoin-core:22 # version 23 is not working with btcd 0.22.0 due to change in createwallet rpc | ||
container_name: bitcoin | ||
hostname: bitcoin | ||
networks: | ||
mynetwork: | ||
ipv4_address: 172.20.0.101 | ||
ports: | ||
- "18443:18443" | ||
command: | ||
-printtoconsole | ||
-regtest=1 | ||
-rpcallowip=0.0.0.0/0 | ||
-rpcbind=0.0.0.0 | ||
-rpcauth=smoketest:63acf9b8dccecce914d85ff8c044b78b$$5892f9bbc84f4364e79f0970039f88bdd823f168d4acc76099ab97b14a766a99 | ||
-txindex=1 | ||
|
||
orchestrator: | ||
image: orchestrator:latest | ||
tty: true | ||
container_name: orchestrator | ||
build: | ||
context: .. | ||
dockerfile: contrib/localnet/orchestrator/Dockerfile | ||
depends_on: | ||
- zetacore0 | ||
- eth | ||
hostname: orchestrator | ||
networks: | ||
mynetwork: | ||
ipv4_address: 172.20.0.2 | ||
entrypoint: ["/work/start-zetae2e.sh", "local","import-data"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
if [ $# -lt 1 ] | ||
then | ||
echo "Usage: import-data.sh [network]" | ||
exit 1 | ||
fi | ||
|
||
NETWORK=$1 | ||
echo "NETWORK: ${NETWORK}" | ||
rm -rf ~/genesis_export/ | ||
mkdir ~/genesis_export/ | ||
echo "Download Latest State Export" | ||
LATEST_EXPORT_URL=$(curl https://snapshots.zetachain.com/latest-state-export | jq -r ."${NETWORK}") | ||
echo "LATEST EXPORT URL: ${LATEST_EXPORT_URL}" | ||
wget -q ${LATEST_EXPORT_URL} -O ~/genesis_export/exported-genesis.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.