tilt & testnet additions

This commit is contained in:
chase-45 2022-09-19 11:29:26 -04:00
parent 6a521a4709
commit 52fde8dee3
5 changed files with 174 additions and 25 deletions

View File

@ -40,6 +40,7 @@
- [Environment Setup](./technical/env/environments.md)
- [Tilt](./technical/env/tilt.md)
- [Troubleshooting](./technical/env/troubleshooting.md)
- [Wormhole Local Validator](./technical/env/wlv.md)
- [Testnet](./technical/env/testnet.md)
- [Tooling](./technical/env/tooling.md)

View File

@ -7,30 +7,35 @@ Sending a cross-chain message through Wormhole involves initiating a message on
Wormhole provides two different local development environments to simulate these different elements. Below are those two options and the high level pros and cons of each.
1. [Wormhole Local Validator](./wlv.md)
- Pros
- Lightweight, low system resource demand
- Good iteration times
- Can be added into an existing blockchain development setup
- Cons
- You may end up reinventing the tilt/testnet environment as you add more components
- Pros
- Lightweight, low system resource demand
- Good iteration times
- Can be added into an existing blockchain development setup
- Cons
- You may end up reinventing the tilt/testnet environment as you add more components
2. [Tilt](./tilt.md)
- Pros
- Out of the box support for the many components needed to develop across the heterogenous blockchain space
- Consistent development environment, where contracts deploy deterministically & everything is already linked up
- Ability to easily turn containers on and off as needed
- Cons
- Relatively high system requirements. Specifically is RAM intensive
- Iteration requires docker container rebuilds, which can be slow
- Most blockchains are 'fresh', and thus may require you to deploy your own contract dependencies.
- Pros
- Out of the box support for the many components needed to develop across the heterogenous blockchain space
- Consistent development environment, where contracts deploy deterministically & everything is already linked up
- Ability to easily turn containers on and off as needed
- Cons
- Relatively high system requirements. Specifically is RAM intensive
- Iteration requires docker container rebuilds, which can be slow
- Most blockchains are 'fresh', and thus may require you to deploy your own contract dependencies.
### Testnet
To test your application on the various testnets, there are Wormhole contracts and one Guardian node deployed. You can find the contracts [here](../../reference/contracts.md) and the rpc node [here](../../reference/rpcnodes.md).
There are two main obstacles with testing in testnet:
- Many testnet blockchains are somewhat unstable and unreliable
- Getting testnet tokens is a nuisance
@ -38,4 +43,16 @@ There are two main obstacles with testing in testnet:
### Mainnet
To deploy to mainnet, you can find the contracts [here](../../reference/contracts.md) and the rpc node [here](../../reference/rpcnodes.md).
To deploy to mainnet, you can find the contracts [here](../../reference/contracts.md) and the rpc node [here](../../reference/rpcnodes.md).
---
Express what a normal development stack looks like in Wormhole
- Minimum components
- additional components
- contract dependency hell
## Basics
Cross-chain development environments are inherently more complex than

View File

@ -1,12 +1,22 @@
# Testnet
Wormhole testnet functions much like mainnet, is spread across many of the most popular testnet platforms
Wormhole testnet is spread across many of the most popular testnet blockchains.
- check reference section for testnet contracts
The primary reason to use Wormhole testnet is in order to simplify the management of your dependent contracts. This will vary from blockchain to blockchain.
For example, some blockchain ecosystems have the standard that their contracts are closed-source, and there are no tools to fork mainnet. Other ecosystems, such as EVM, have tools like [foundry](https://github.com/foundry-rs/foundry), which allow you to hardfork the mainnet ecosystem into a local development node.
In short, testnet tends to be the correct choice only when you have contract dependencies, and those dependencies are difficult to get working in a local environment. In most other cases, testnet tends to be more work than it's worth.
If you elect to use testnet, the Wormhole contracts addresses can be found in the [Reference](../../reference/contracts.md) section.
Pros:
- Many other projects deploy their contracts to testnet.
- In ecosystems without extensive local tooling, this may be the preferred development environment.
Cons:
- Many testnet blockchains are somewhat unstable and unreliable
- Getting testnet tokens is a nuisance
- Many testnets are somewhat unstable and have outages or partitioning events.
- Wormhole Testnet sometimes misses VAAs due to testnet instabilities.
- Testnet tokens are often difficult to acquire.

View File

@ -2,9 +2,9 @@
### What is Tilt?
[Tilt](https://tilt.dev/) is part of the Docker ecosystem. It allows developers to easily configure a Kubernetes environment for development.
[Tilt](https://tilt.dev/) is part of the official Docker ecosystem. It's a tool which allows developers to easily configure a Kubernetes environment for development.
In the context of Wormhole, the 'Tilt' environment is the development environment used by the [Wormhole Core Repository](https://github.com/wormhole-foundation/wormhole). It utilizes Tilt to set up a development environment with all the tools necessary to build across multiple blockchains. It has docker images for all the common items encountered during cross-chain developing, including:
In the context of Wormhole, the 'Tilt' environment is the development environment used by the [Wormhole Core Repository](https://github.com/wormhole-foundation/wormhole). It utilizes Tilt to deploy an environment with all the tools necessary to build across multiple blockchains. It has docker images for all the common items encountered during cross-chain developing, including:
- All the supported blockchains / ecosystems of Wormhole
- A Guardian Node
@ -12,7 +12,7 @@ In the context of Wormhole, the 'Tilt' environment is the development environmen
- Databases, Redis
- Utility frontends
The Tilt environment is meant to be an entire cross-chain ecosystem right out of the box.
The Tilt environment is meant to be an entire cross-chain development stack right out of the box.
### Is Tilt Right for You?
@ -21,8 +21,9 @@ Tilt is a generally a good starting point for most developers. Here's a succinct
### Pros
- Out-of-the-box support for the many components needed to develop across the heterogenous blockchain space.
- Consistent development environment, where contracts deploy deterministically & everything is already linked up.
- Ability to easily enable/disable contracts as needed.
- Consistent development environment, where contracts deploy deterministically and everything is already linked up.
- Ability to easily enable/disable components as needed.
- Regularly updated as new components join the Wormhole ecosystem.
### Cons
@ -56,7 +57,7 @@ tilt up -- --algorand=false --near=false --solana=false terra_classic=false terr
Tilt can pretty much be treated as though it's an external environment that you can easily spin up and tear down.
If you've followed the standard setup, all your resources will be bound to various ports on localhost. To see all the endpoints which are being hosted in your Tilt environment, you should check the Tilt dashboard, located at http://localhost:10350/overview.
If you've followed the standard setup, all your resources will be bound to various ports on localhost. To see all the endpoints which are being hosted in your Tilt environment, you should check the Tilt dashboard, located at [http://localhost:10350/overview](http://localhost:10350/overview).
Tilt is actually referred to as 'Devnet' in the Wormhole ecosystem, so anywhere you see information labeled as 'Devnet', you can apply it to Tilt.

120
src/technical/env/troubleshooting.md vendored Normal file
View File

@ -0,0 +1,120 @@
# Troubleshooting
Tilt, Kubernetes, and Docker may be new tools for developers entering the Wormhole ecosystem. This section is meant to provide some additional support when setting up the Wormhole Tilt environment.
## macOS Install
## Prerequisites
Having `homebrew` on your system makes the installation really straightforward. You can grab it with:
```sh
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
From there, all the other installs are one-liners.
## Install Go
```sh
brew install go
```
## Install Docker
```sh
brew install docker
```
After installation, go into Docker settings and switch ON `kubernetes`. Also configure Docker to have 4 CPUs and ~16GB of RAM.
## Install Tilt
```sh
brew install tilt
```
## Clone Wormhole Repo and Start Tilt
```sh
git clone --branch dev.v2 https://github.com/certusone/wormhole.git
```
```sh
cd wormhole/
tilt up
```
You'll be able to access the Tilt UI at
`localhost:10350`
## Linux & WSL Install
### Setup Script
If you're using a Debian distro, you should run the [dev-setup.sh](https://github.com/wormhole-foundation/wormhole/blob/dev.v2/scripts/dev-setup.sh) script. Even if you're not using Debian, this script still contains the main steps for setup.
## Regular Setup
### 1. Install Go
```sh
wget https://go.dev/dl/go1.18.1.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.1.linux-amd64.tar.gz
```
### 2. Install Docker
If you're using Linux with a window manager, consider getting Docker Desktop instead of the following command. It comes with Kubernetes built in and you won't need to download `minikube`. It's recommended to have at least 4 CPUs and 16GB RAM dedicated to Docker.
Also, make absolutely sure that you set up Docker as a non-root user.
[https://docs.docker.com/engine/install/ubuntu/#installation-methods](https://docs.docker.com/engine/install/ubuntu/#installation-methods)
### 3. (Docker Desktop Install)
Enable Kubernetes by going into Settings > Kubernetes
### 3. (Non Docker Desktop)
Install [`minikube`](https://minikube.sigs.k8s.io/docs/start/).
Configure minikube:
```
minikube start --driver=docker --kubernetes-version=v1.23.3 --cpus=4 --memory=14G --disk-size=10G --namespace=wormhole
```
Minikube needs to be running for tilt to work, so always make sure to run `minikube start` before you bring up tilt.
### 4. Install Tilt
Install Tilt by copy pasting this into the Terminal:
```sh
curl -fsSL https://raw.githubusercontent.com/tilt-dev/tilt/master/scripts/install.sh | bash
```
### 5. Clone the Wormhole Repo and start Tilt
```sh
git clone --branch dev.v2 https://github.com/wormhole-foundation/wormhole.git
```
If you're running Tilt on your machine:
```sh
cd wormhole/
tilt up
```
If you're running Tilt in a VM, you'll need to pass in some extra flags to enable Tilt to listen to incoming traffic from external addresses:
```sh
cd wormhole
tilt up --host=0.0.0.0 -- --webHost=0.0.0.0
```
You can now access the Tilt UI at either `localhost:10350` or `vm_external_ip:10350`.
If the VM's external IP doesn't work, check firewall and port settings to make sure your VM allows incoming traffic.