line edits

This commit is contained in:
chase-45 2022-09-19 12:42:45 -04:00
parent caa844bec8
commit 5e5e40cb31
3 changed files with 20 additions and 65 deletions

View File

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

View File

@ -1,63 +1,8 @@
# Choosing an Environment
Sending a cross-chain message through Wormhole involves initiating a message on chain A, the Wormhole contract on chain A, the Guardian network, receiving a message on chain B, and the Wormhole contract on chain B.
### Devnet
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
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.
### 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
**Note:** There is only one Guardian node deployed for testnet, there is a small chance that your VAA will not be processed. This rate is _not_ indicative of performance on mainnet where there are 19 Guardian nodes watching for transactions.
### Mainnet
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
# Environment Setup
The bare minimum Wormhole environment is just a blockchain linked up to a Guardian node. There are quite a few ways of accomplishing this, and if you're just looking to get your feet wet, you should try whichever sounds easiest.
However, as you get deeper into cross-chain development you'll likely find you have a growing number of components, dependencies, and teammates in the picture making your development environment more complex. Here are some of the considerations you should have in mind when choosing a development environment, to make sure it will continue to work for you in the future.
However, as you get deeper into cross-chain development you'll likely find you have a growing number of components, dependencies, and teammates in the picture making your development environment more complex. Here are some of the considerations you should have in mind when choosing a development environment which will be well suited for your xDapp.
### What components do I need now? What components will I need in the future?
@ -65,6 +10,10 @@ However, as you get deeper into cross-chain development you'll likely find you h
### What are my dependencies?
- If your smart contracts have no dependencies, it may be possible for you to develop in a vacuum. However, if you're working on a fledgling blockchain and trying to integrate with other applications being developed on that chain, you may have no choice but to work in testnet alongside other development teams.
- If your smart contracts have no dependencies, it may be possible for you to develop in a vacuum. However, if you're working on a fledgling blockchain and trying to integrate with other applications which are also in development, you may have no choice but to work in testnet alongside other development teams.
- Just because you have dependencies doesn't mean you automatically have to develop in testnet or mainnet. Often times it's relatively trivial to redeploy your dependencies in Tilt, or to use something like [Foundry](https://github.com/foundry-rs/foundry) to create a development version of an existing testnet or mainnet.
### How am I going to collaborate?
- You should consider how your teammates or collaborators are going to work in this environment from the start. There are some basic considerations like "how will they access it", but also some subtler points such as ensuring that contracts will deploy deterministically and that automated tests can be trusted to run reliably. The two paths to accomplish this are to use a public environment (testnet), or to ensure the local environment is well controlled (like tilt).

View File

@ -1,10 +1,10 @@
# Tilt
# Tilt (Devnet)
### What is Tilt?
[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 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:
However, in the context of Wormhole, the 'Tilt' usually refers to the development environment used by the [Wormhole Core Repository](https://github.com/wormhole-foundation/wormhole). This environment uses Tilt to stand up 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,11 +12,11 @@ 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 development stack right out of the box.
The 'Tilt' environment (also referred to as Wormhole 'Devnet') is meant to provide an entire cross-chain development stack right out of the box.
### Is Tilt Right for You?
Tilt is a generally a good starting point for most developers. Here's a succinct list of the pros and cons of the environment, so you can decide if it's the right fit for you.
Tilt is generally a good starting point for most developers. Here's a succinct list of the pros and cons of the environment, so you can decide if it's the right fit for you.
### Pros
@ -33,7 +33,7 @@ Tilt is a generally a good starting point for most developers. Here's a succinct
# Setting up Tilt
The Tilt environment functions best in a UNIX-style environment. For Windows users, using a WSL environment is recommended.
Tilt functions best in a UNIX-style environment. For Windows users, using a WSL environment is recommended.
In order to run the Tilt environment, you'll first need to make sure you have [Tilt](https://docs.tilt.dev/install.html) and [Go](https://go.dev/doc/install) installed.
@ -47,7 +47,7 @@ cd wormhole
tilt up
```
Be sure to check out the **Tiltfile**, which has much of the configuration and arguments for the development environment. It's relatively straightforward to enable and disable components. For example, you can disable blockchains by setting them to false at startup
Be sure to check out the [**Tiltfile**](https://github.com/wormhole-foundation/wormhole/blob/dev.v2/Tiltfile), which has much of the configuration and arguments for the development environment. It's relatively straightforward to enable and disable components. For example, you can disable blockchains by setting them to false at startup
```
tilt up -- --algorand=false --near=false --solana=false terra_classic=false terra2=false
@ -59,10 +59,16 @@ Tilt can pretty much be treated as though it's an external environment that you
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.
Tilt is alos referred to as 'Devnet' in the Wormhole ecosystem, so anywhere you see information labeled as 'Devnet', you can apply it to Tilt.
For example, you can find all the deployed contract addresses in the 'Devnet' [constants](https://github.com/wormhole-foundation/wormhole/blob/dev.v2/sdk/js/src/utils/consts.ts) of the Wormhole Typescript SDK.
Useful information pertaining to funded wallets & useful private keys can also be found in the [devnet.md](https://github.com/wormhole-foundation/wormhole/blob/dev.v2/docs/devnet.md) file of the docs.
From here, Tilt is quite similar to using Testnet, and you should look at the [Tooling](./tooling.md) page for additional resources.
In order to shut down Tilt, simply run
```
tilt down
```