Go to file
Hendrik Hofstadt d677311d70 Fix build caching and initial devnet setup steps
Change-Id: I6df841c90f93585f0146b0de65883dd101e45bc9
2021-06-23 17:06:11 +02:00
.run Commit .run IntelliJ shortcuts to repo 2020-11-23 17:21:41 +01:00
bridge Merge branch 'main' into dev.v2 2021-06-22 18:54:15 +02:00
dashboards Add example Grafana dashboard 2021-02-04 18:38:19 +01:00
design design: update headers 2021-06-10 16:10:48 +02:00
devnet Fix eth and solana deployment in tilt devnet 2021-06-22 18:17:18 +00:00
docs take an axe to the docs 2021-04-16 15:49:26 +02:00
ethereum ethereum generalized messaging & governance 2021-05-27 16:01:49 +02:00
explorer Add explorer web app and web proto codegen 2021-06-02 16:05:16 +00:00
nix anchor-client with new() 2021-05-18 14:55:56 +02:00
proto Use full import path in proto's go_package 2021-06-01 19:04:49 +00:00
scripts Use /usr/bin/env for shell scripts; web/.dockerignore: node_modules (#159) 2021-01-23 18:20:17 +01:00
solana Fix build caching and initial devnet setup steps 2021-06-23 17:06:11 +02:00
terra switch terra contracts over to using governance packet structure 2021-06-01 17:10:34 -04:00
third_party Replace third_party/solana by solana-test-validator (#197) 2021-04-07 20:16:19 +02:00
tilt_modules Use /usr/bin/env for shell scripts; web/.dockerignore: node_modules (#159) 2021-01-23 18:20:17 +01:00
tools Fix build caching and initial devnet setup steps 2021-06-23 17:06:11 +02:00
web Update react router (#180) 2021-02-06 18:08:16 +01:00
.dockerignore Fix build caching and initial devnet setup steps 2021-06-23 17:06:11 +02:00
.envrc anchor-client with new() 2021-05-18 14:55:56 +02:00
.gitignore Add Makefile for production builds 2020-12-06 19:21:43 +01:00
CONTRIBUTING.md CONTRIBUTING.md: fix typo 2021-04-19 19:49:02 +00:00
DEVELOP.md README.md: bump Tilt and Minikube 2021-06-22 18:21:49 +00:00
Dockerfile.agent Fix build caching and initial devnet setup steps 2021-06-23 17:06:11 +02:00
LICENSE Add Apache2 license 2020-08-17 19:17:12 +02:00
Makefile Add version stamp to binary and include in heartbeat 2021-01-28 21:46:09 +01:00
README.md Merge branch 'main' into dev.v2 2021-06-22 18:54:15 +02:00
Tiltfile Add explorer web app and web proto codegen 2021-06-02 16:05:16 +00:00
buf.yml Add builds for protos and the Solana agent 2020-08-15 22:15:26 +02:00
codereview.cfg codereview.cfg: dev.v2 branch 2021-04-15 16:30:11 +02:00
dev-install.sh Use /usr/bin/env for shell scripts; web/.dockerignore: node_modules (#159) 2021-01-23 18:20:17 +01:00
generate-abi.sh Use /usr/bin/env for shell scripts; web/.dockerignore: node_modules (#159) 2021-01-23 18:20:17 +01:00
generate-protos.sh Add explorer web app and web proto codegen 2021-06-02 16:05:16 +00:00
shell.nix Solitaire client implementation 2021-06-04 13:02:35 +02:00

README.md

Wormhole v2

See DEVELOP.md for instructions on how to set up a local devnet, and CONTRIBUTING.md for instructions on how to contribute to this project.

See docs/operations.md for node operator instructions.

Audit / Feature Status

This software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Or plainly spoken - this is a very complex piece of software which targets a bleeding-edge, experimental smart contract runtime. Mistakes happen, and no matter how hard you try and whether you pay someone to audit it, it may eat your tokens, set your printer on fire or startle your cat. Cryptocurrencies are a high-risk investment, no matter how fancy.

READ FIRST BEFORE USING WORMHOLE

  • Much of the Solana ecosystem uses wrapped assets issued by a centralized bridge operated by FTX (the "Sollet bridge"). Markets on Serum or Raydium are using those centralized assets rather than Wormhole wrapped assets. These have names like "Wrapped BTC" or "Wrapped ETH". Wormhole is going to replace the FTX bridge eventually, but this will take some time - meanwhile, Wormhole wrapped assets aren't terribly useful yet since there're no market for them.

  • Other tokens on Solana like USDC and USDT are centralized native tokens issued on multiple chains. If you transfer USDT from Ethereum to Solana, you will get "Wormhole Wrapped USDT" (wwUSDT), rather than native USDT.

  • Solana's SPL tokens have no on-chain metadata. Wormhole can't know the name of the token when you transfer assets to Ethereum. All tokens are therefore named "WWT" plus the address of the SPL token. The reverse is also true - Wormhole knows the name of the ERC20 token, but there's no way to store it on Solana. There's an off-chain name registry that some block explorers use, but if you transfer an uncommon token to Solana, it may not show with a name on block explorers.

Repo overview

  • bridge/ — The guardian node which connects to both chains, observes data and submits VAAs. Written in pure Go.

    • cmd/ - CLI entry points for the guardiand service and all other command line tools.
    • e2e — The end-to-end testing framework (as regular Go tests, to be ran locally).
    • pkg/processor — Most of the business logic for cross-chain communication lives here. Talks to multiple loosely coupled services communicating via Go channels.
    • pkg/common — Shared libraries and types. No business logic.
    • pkg/p2p — libp2p-based gossip network.
    • pkg/devnet — Constants and helper functions for the deterministic local devnet.
    • pkg/ethereum — Ethereum chain interface with auto-generated contract ABI. Uses go-ethereum to directly connect to an Eth node.
    • pkg/solana — Solana chain interface. Light gRPC wrapper around a Rust agent (see below) which actually talks to Solana.
    • pkg/terra — Terra chain interface, using the upstream Terra RPC client.
    • pkg/supervisor — Erlang-inspired process supervision tree imported from Certus One's internal code base. We use this everywhere in the bridge code for fault tolerance and fast convergence.
    • pkg/vaa — Go implementation of our VAA structure, including serialization code.
    • pkg/readiness — Global stateful singleton package to manage the /ready endpoint, similar to how Prometheus metrics are implemented using a global registry.
  • ethereum/ — Ethereum wormhole contract, tests and fixtures.

    • contracts/ — Wormhole itself, a wrapped token example and helper libraries.
    • migrations/ — Ganache migration that deploys the contracts to a local devnet. This is the starting point for both the tests and the devnet. Note that devnet and tests result in different devnet states.
    • src/send-lockups.js — Sends example ETH lockups in a loop. See DEVELOP.md for usage.
  • solana/ — Solana sidecar agent, contract and CLI.

    • bridge/ - Solana Wormhole bridge components
      • agent/ — Rust agent sidecar deployed alongside each Guardian node. It serves a local gRPC API to interface with the Solana blockchain. This is far easier to maintain than a pure-Go Solana client.
      • program/ — Solana Wormhole smart contract code.
      • client/ — Wormhole user CLI tool for interaction with the smart contract.
    • devnet_setup.sh — Devnet initialization and example code for a lockup program (the Solana equivalent to the Ganache migration + send-lockups.js). Runs as a sidecar alongside the Solana devnet.
  • terra/ — Terra-side smart contracts.

  • proto/ — Protocol Buffer definitions for the P2P network and the local Solana agent RPC. These are heavily commented and a good intro.

  • third_party/ — Build machinery and tooling for third party applications we use.

    • googleapis/ — Google protobuf libraries end up here at runtime. Not checked un.
  • docs/ — Operator documentation and project specs.

  • design/ — Design documents/RfC for changes to the protocol.

  • web/ — User interface for cross-chain transfers. Not yet wired into the local devnet. Uses Metamask and Web3.js to initiate transfers from a browser. Watch this video as an introduction.

  • tools/ — Reproducible builds for local development tooling like buf and protoc-gen-go.

  • dashboards/ — Example Grafana dashboards for the Prometheus metrics exposed by guardiand.

  • Tiltfile, tilt_modules, devnet/ and various Dockerfiles — deployment code and fixtures for local development. Deploys a deterministic devnet with an Ethereum devnet, Solana devnet, and a variably sized guardian set that can be used to simulate full cross-chain transfers. The Dockerfiles are carefully designed for fast incremental builds with local caching, and require a recent Docker version with Buildkit support.

  • generate-abi.sh and generate-protos.sh — Helper scripts to (re-)build generated code. The Eth ABI is committed to the repo, so you only need to run this script if the Wormhole.sol interface changes. The protobuf libraries are not committed and will be regenerated automatically by the Tiltfile.