Skip to content

Commit

Permalink
parent bf5c42e
Browse files Browse the repository at this point in the history
author Obie Kaku <[email protected]> 1718989425 -0500
committer Obie Kaku <[email protected]> 1733863492 -0600

chore: refreshed icts

core contract upgrade working

wip

wip

Update wormchain_test.go

fix: creating wormhole ibc channel correctly

debugging ibc handshake

chore: refactoring tests

tests updated

wip

Add interchaintest tests to wormchain

chore: refreshed icts

core contract upgrade working

wip

wip

Update wormchain_test.go

fix: creating wormhole ibc channel correctly

debugging ibc handshake

chore: refactoring tests

tests updated

wip

removed unneeded schema files

revert contract changes

removed unused wasm binaries

reverted unneeded formatting changes

removed unused wasm binaries

Node: p2p.Run not always subscribing to heartbeat channel when it should (wormhole-foundation#4152)

Node: CCQ logging changes (wormhole-foundation#4153)

wormchain: disable ignite

Node: Deploy Worldchain mainnet (wormhole-foundation#4156)

* Node: Deploy Worldchain mainnet

* Code review rework

* node: Governor setup for Worldchain

---------

Co-authored-by: Dirk Brink <[email protected]>

make: fix VERSION unset if commit has no associated tag

eth: env file for Worldchain Mainnet (wormhole-foundation#4158)

Deploy Ink testnet

Node: Update golang (wormhole-foundation#4161)

* Node: Update golang

* node: Upgrade golangci-lint

Temporarily increasing governor limits for a few chains (wormhole-foundation#4164)

refactoring and clean up

put back the ibc translator update channel chain

remove unused contract upgrade fn

removed wormchaind build

reorganized some test utils
  • Loading branch information
kakucodes committed Dec 10, 2024
1 parent bf5c42e commit a62c1a4
Show file tree
Hide file tree
Showing 53 changed files with 1,169 additions and 232 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "1.21.9"
go-version: "1.23.3"
- run: make node

algorand:
Expand Down Expand Up @@ -186,8 +186,7 @@ jobs:
done
cargo test --workspace --features "nft-bridge/instructions token-bridge/instructions wormhole-bridge-solana/instructions"
shell:
bash
shell: bash

aptos:
name: Aptos
Expand Down Expand Up @@ -271,7 +270,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "1.21.9"
go-version: "1.23.3"
- run: cd sdk/vaa && go test && go test -v -fuzz FuzzCalculateQuorum -run FuzzCalculateQuorum -fuzztime 15s

# Run Go linters
Expand All @@ -288,13 +287,13 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "1.21.9"
go-version: "1.23.3"
- name: Install formatter
run: go install golang.org/x/tools/cmd/[email protected]
- name: Formatting checks
run: ./scripts/lint.sh -l -g format
- name: Install linters
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.57.2
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.60.1
- name: Run linters
run: make generate && golangci-lint --version && ./scripts/lint.sh -g lint
- name: Ensure generated proto matches
Expand Down Expand Up @@ -330,7 +329,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "1.21.9"
go-version: "1.23.3"
# The go-ethereum and celo-blockchain packages both implement secp256k1 using the exact same header, but that causes duplicate symbols.
- name: Run golang tests
run: cd node && go test -v -timeout 5m -race -ldflags '-extldflags "-Wl,--allow-multiple-definition" ' ./...
Expand Down
2 changes: 1 addition & 1 deletion DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

The following dependencies are required for local development:

- [Go](https://golang.org/dl/) >= 1.21.9 (latest minor release is recommended)
- [Go](https://golang.org/dl/) >= 1.23.3 (latest minor release is recommended)
- [Tilt](http://tilt.dev/) >= 0.20.8
- Any of the local Kubernetes clusters supported by Tilt.
We strongly recommend [minikube](https://kubernetes.io/docs/setup/learning-environment/minikube/) >=
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.proto
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2
FROM docker.io/golang:1.21.9-bullseye@sha256:311468bffa9fa4747a334b94e6ce3681b564126d653675a6adc46698b2b88d35 AS go-tools
FROM docker.io/golang:1.23.3-bullseye@sha256:bc1b90c2a8eb0ffb62325e02a85d51031ad3afae15b3df4b6a48b7929b00badb AS go-tools

RUN mkdir /app

Expand All @@ -10,7 +10,7 @@ RUN --mount=type=cache,target=/root/.cache --mount=type=cache,target=/go \
cd /app/tools && CGO_ENABLED=0 ./build.sh

# syntax=docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2
FROM docker.io/golang:1.21.9-bullseye@sha256:311468bffa9fa4747a334b94e6ce3681b564126d653675a6adc46698b2b88d35 AS go-build
FROM docker.io/golang:1.23.3-bullseye@sha256:bc1b90c2a8eb0ffb62325e02a85d51031ad3afae15b3df4b6a48b7929b00badb AS go-build

COPY --from=go-tools /app /app

Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ BIN = $(OUT)/bin

-include Makefile.help

VERSION = $(shell git describe --tags --dirty)
# VERSION is the git tag of the current commit if there's a tag, otherwise it's "dev-" plus the git commit sha.
VERSION = $(shell git describe --tags --dirty 2>/dev/null || echo "dev-$(shell git rev-parse --short HEAD)")

.PHONY: dirs
dirs: Makefile
Expand Down
12 changes: 6 additions & 6 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -817,12 +817,12 @@ if wormchain:
ignore = ["./wormchain/testing", "./wormchain/ts-sdk", "./wormchain/design", "./wormchain/vue", "./wormchain/build/wormchaind"],
)

docker_build(
ref = "vue-export",
context = ".",
dockerfile = "./wormchain/Dockerfile.proto",
target = "vue-export",
)
# docker_build(
# ref = "vue-export",
# context = ".",
# dockerfile = "./wormchain/Dockerfile.proto",
# target = "vue-export",
# )

docker_build(
ref = "wormchain-deploy",
Expand Down
35 changes: 22 additions & 13 deletions docs/operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ so you can test changes for your mainnet full nodes and gain operational experie
### Solana node requirements

Refer to the [Solana documentation](https://docs.solanalabs.com/operations/setup-an-rpc-node) on how to run an RPC
(full) node. [Solana's Discord server](https://solana.com/community) is a great resource for questions regarding
(full) node. [Solana's Discord server](https://solana.com/community) is a great resource for questions regarding
operations.

The `#rpc-server-operators` channel is especially useful for setting up Solana RPC nodes.
Expand Down Expand Up @@ -91,7 +91,6 @@ since only very few nodes support the light client protocol.
Running a full node typically requires ~500G of SSD storage, 8G of RAM and 4-8 CPU threads (depending on clock
frequency). Light clients have much lower hardware requirements.


### Terra

Terra is also sometimes referred to as Terra 2, but the correct name is just simply "Terra". The previous version was renamed to "Terra Classic".
Expand All @@ -102,17 +101,18 @@ Refer to the [Terra documentation](https://docs.terra.money/full-node/run-a-full

Refer to the [Terra Classic documentation](https://classic-docs.terra.money/docs/full-node/run-a-full-terra-node/README.html) on how to run a full node.


### Wormchain

All guardians **must run validators for wormchain**, the codename of [Wormhole Gateway](https://wormhole.com/gateway/).

#### Pre-requisites
- Ensure you have [Go](https://golang.org/dl/) >= 1.21.9 installed.

- Ensure you have [Go](https://golang.org/dl/) >= 1.23.3 installed.

#### Building wormchaind binary

There is not a pre-built binary available. You need to check out the repo and build the
wormchaind binary from source:
wormchaind binary from source:

First, check out the version of the Wormhole repo that you want to deploy:

Expand All @@ -125,18 +125,22 @@ Then, compile the release binary as an unprivileged build user:
```bash
make build/wormchaind
```

You'll find `wormchaind` binary in `wormchain/build/wormchaind`.

#### Initialize environment

Initialize the Wormchain environment with the necessary configuration.

```bash
/path/to/wormchain/bin/wormchaind init <your-node-name> --chain-id wormchain --home /path/to/wormchain/directory
```

This command will generate the private validator key. That key should be backed up.
This key is set in `config.toml` file under the `priv_validator_key_file` field.

#### Generate configuration files

The `--wormchainURL` argument to the guardian node should point to `<validator address>:9090` which is the `grpc` port
in the app.toml.

Expand Down Expand Up @@ -174,24 +178,29 @@ For signing, consider setting up a remote threshold signer such as
in front of your wormchain validator.

#### Retrieve the Genesis File

Download the genesis file from the wormhole repository.

```bash
wget -O /path/to/wormchain/config/genesis.json https://raw.githubusercontent.com/wormhole-foundation/wormhole/main/wormchain/<network>/genesis.json
```

#### Generate wormchain keys

To generate wormchain keys, run the following command:

```bash
/path/to/wormchain/bin/wormchaind keys add <key-name> --keyring-backend file --home /path/to/wormchain/directory
```

This command will create a `<key-name>.info` file. To extract the key, run the following command:

```bash
wormchaind keys export <key_name> --home /path/to/wormchain/directory --keyring-dir . --keyring-backend file
```

This command will ask for a passphrase to be created for it. Both `wormchain.key` and `passphrase` will be used by the following `guardiand` flags:

- `--accountantKeyPath`
- `--accountantKeyPassPhrase`

Expand Down Expand Up @@ -262,9 +271,9 @@ to function correctly. By default in geth, [historical state is only kept in mem
After 128 blocks, older states are garbage collected. Many of these chains are forks of geth that maintain this
historical limitation.

* Arbitrum
* Base
* Optimism
- Arbitrum
- Base
- Optimism

Newer execution clients such as [reth](https://github.com/paradigmxyz/reth) lack this limitation and are worth
investigating once they are stable.
Expand All @@ -279,10 +288,10 @@ All modern Cosmos integrations happen by Wormhole observing IBC transactions on

The following Cosmos based nodes were added prior to Gateway and guardians need to run full nodes:

* Injective
* Terra
* Terra Classic
* XPLA
- Injective
- Terra
- Terra Classic
- XPLA

**NOTE**: All guardians must run validators for wormchain.

Expand All @@ -291,7 +300,7 @@ The following Cosmos based nodes were added prior to Gateway and guardians need
For security reasons, we do not provide a pre-built binary. You need to check out the repo and build the
guardiand binary from source. A Git repo is much harder to tamper with than release binaries.

To build the Wormhole node, you need [Go](https://golang.org/dl/) >= 1.21.9
To build the Wormhole node, you need [Go](https://golang.org/dl/) >= 1.23.3

First, check out the version of the Wormhole repo that you want to deploy:

Expand Down
20 changes: 20 additions & 0 deletions ethereum/env/.env.ink.testnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Ink testnet env
# Rename to .env

# Common config for forge deployment
RPC_URL=https://rpc-qnd-sepolia.inkonchain.com

# Wormhole Core Migrations
INIT_SIGNERS=["0x13947Bd48b18E53fdAeEe77F3473391aC727C638"]
INIT_CHAIN_ID=46
INIT_GOV_CHAIN_ID=0x1
INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004
INIT_EVM_CHAIN_ID=763373

# Bridge Migrations
BRIDGE_INIT_CHAIN_ID=46
BRIDGE_INIT_GOV_CHAIN_ID=0x1
BRIDGE_INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004
BRIDGE_INIT_FINALITY=1
# Ink is an OP Stack chain so it uses the standard WETH.
BRIDGE_INIT_WETH=0x4200000000000000000000000000000000000006
22 changes: 22 additions & 0 deletions ethereum/env/.env.worldchain.mainnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Worldchain mainnet env
# Rename to .env

# Common config for forge deployment
RPC_URL=https://worldchain-mainnet.g.alchemy.com/public
FORGE_ARGS="--slow --legacy"

# Wormhole Core Migrations
INIT_SIGNERS=["0x58CC3AE5C097b213cE3c81979e1B9f9570746AA5"]
INIT_CHAIN_ID=45
INIT_GOV_CHAIN_ID=0x1
INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004
INIT_EVM_CHAIN_ID=480

# Bridge Migrations
BRIDGE_INIT_CHAIN_ID=45
BRIDGE_INIT_GOV_CHAIN_ID=0x1
BRIDGE_INIT_GOV_CONTRACT=0x0000000000000000000000000000000000000000000000000000000000000004

# https://www.coingecko.com/en/coins/wrapped-eth-world-chain
BRIDGE_INIT_WETH=0x4200000000000000000000000000000000000006
BRIDGE_INIT_FINALITY=1
2 changes: 1 addition & 1 deletion node/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2
FROM --platform=linux/amd64 docker.io/golang:1.21.9-bullseye@sha256:311468bffa9fa4747a334b94e6ce3681b564126d653675a6adc46698b2b88d35 AS dev
FROM --platform=linux/amd64 docker.io/golang:1.23.3-bullseye@sha256:bc1b90c2a8eb0ffb62325e02a85d51031ad3afae15b3df4b6a48b7929b00badb AS dev
# libwasmvm.so is not compatible with arm

FROM dev AS build
Expand Down
1 change: 1 addition & 0 deletions node/cmd/guardiand/adminnodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ func runListNodes(cmd *cobra.Command, args []string) {
{"Xpla", vaa.ChainIDXpla},
{"Btc", vaa.ChainIDBtc},
{"Injective", vaa.ChainIDInjective},
{"Ink", vaa.ChainIDInk},
{"Base", vaa.ChainIDBase},
{"Sei", vaa.ChainIDSei},
{"Scroll", vaa.ChainIDScroll},
Expand Down
22 changes: 21 additions & 1 deletion node/cmd/guardiand/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ var (
monadDevnetRPC *string
monadDevnetContract *string

inkRPC *string
inkContract *string

sepoliaRPC *string
sepoliaContract *string

Expand Down Expand Up @@ -415,6 +418,9 @@ func init() {
baseRPC = node.RegisterFlagWithValidationOrFail(NodeCmd, "baseRPC", "Base RPC URL", "ws://eth-devnet:8545", []string{"ws", "wss"})
baseContract = NodeCmd.Flags().String("baseContract", "", "Base contract address")

inkRPC = node.RegisterFlagWithValidationOrFail(NodeCmd, "inkRPC", "Ink RPC URL", "ws://eth-devnet:8545", []string{"ws", "wss"})
inkContract = NodeCmd.Flags().String("inkContract", "", "Ink contract address")

arbitrumSepoliaRPC = node.RegisterFlagWithValidationOrFail(NodeCmd, "arbitrumSepoliaRPC", "Arbitrum on Sepolia RPC URL", "ws://eth-devnet:8545", []string{"ws", "wss"})
arbitrumSepoliaContract = NodeCmd.Flags().String("arbitrumSepoliaContract", "", "Arbitrum on Sepolia contract address")

Expand Down Expand Up @@ -798,7 +804,8 @@ func runNode(cmd *cobra.Command, args []string) {
*berachainContract = checkEvmArgs(logger, *berachainRPC, *berachainContract, "berachain", false)
*snaxchainContract = checkEvmArgs(logger, *snaxchainRPC, *snaxchainContract, "snaxchain", true)
*unichainContract = checkEvmArgs(logger, *unichainRPC, *unichainContract, "unichain", false)
*worldchainContract = checkEvmArgs(logger, *worldchainRPC, *worldchainContract, "worldchain", false)
*worldchainContract = checkEvmArgs(logger, *worldchainRPC, *worldchainContract, "worldchain", true)
*inkContract = checkEvmArgs(logger, *inkRPC, *inkContract, "ink", false)

// These chains will only ever be testnet / devnet.
*sepoliaContract = checkEvmArgs(logger, *sepoliaRPC, *sepoliaContract, "sepolia", false)
Expand Down Expand Up @@ -916,6 +923,7 @@ func runNode(cmd *cobra.Command, args []string) {
rpcMap["ibcWS"] = *ibcWS
rpcMap["injectiveLCD"] = *injectiveLCD
rpcMap["injectiveWS"] = *injectiveWS
rpcMap["inkRPC"] = *inkRPC
rpcMap["karuraRPC"] = *karuraRPC
rpcMap["klaytnRPC"] = *klaytnRPC
rpcMap["lineaRPC"] = *lineaRPC
Expand Down Expand Up @@ -1403,6 +1411,18 @@ func runNode(cmd *cobra.Command, args []string) {
watcherConfigs = append(watcherConfigs, wc)
}

if shouldStart(inkRPC) {
wc := &evm.WatcherConfig{
NetworkID: "ink",
ChainID: vaa.ChainIDInk,
Rpc: *inkRPC,
Contract: *inkContract,
CcqBackfillCache: *ccqBackfillCache,
}

watcherConfigs = append(watcherConfigs, wc)
}

if shouldStart(terraWS) {
wc := &cosmwasm.WatcherConfig{
NetworkID: "terra",
Expand Down
2 changes: 1 addition & 1 deletion node/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/certusone/wormhole/node

go 1.21.9
go 1.23.3

require (
github.com/celo-org/celo-blockchain v1.5.5
Expand Down
2 changes: 1 addition & 1 deletion node/hack/query/ccqlistener/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker.io/docker/dockerfile:1.3@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cfdf59ef1357b3b2
FROM --platform=linux/amd64 docker.io/golang:1.21.9-bullseye@sha256:311468bffa9fa4747a334b94e6ce3681b564126d653675a6adc46698b2b88d35 AS build
FROM --platform=linux/amd64 docker.io/golang:1.23.3-bullseye@sha256:bc1b90c2a8eb0ffb62325e02a85d51031ad3afae15b3df4b6a48b7929b00badb AS build
# libwasmvm.so is not compatible with arm

WORKDIR /app
Expand Down
Loading

0 comments on commit a62c1a4

Please sign in to comment.