Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump github.com/ethereum/go-ethereum from 1.11.6 to 1.13.15 in /wormchain/interchaintest #67

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 20 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "Guardian Development",
"build": {
"context": "..",
"dockerfile": "../node/Dockerfile",
"target": "dev"
},
"customizations": {
"vscode": {
"extensions": [
"golang.go",
"ms-azuretools.vscode-docker",
"ms-vscode.makefile-tools"
],
"settings": {
"files.insertFinalNewline": true
}
}
},
}
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/sdk/js-proto-web/ @evan-gray @kev1n-peters
/sdk/js-query/ @evan-gray @kev1n-peters @bruce-riley
/sdk/js-wasm/ @evan-gray @kev1n-peters
/sdk/js/ @evan-gray @kev1n-peters @barnjamin @panoel
/sdk/js/ @evan-gray @kev1n-peters @panoel
/sdk/rust/ @a5-pickle
/sdk/vaa/ @bruce-riley @SEJeff
/spydk/ @evan-gray
Expand Down Expand Up @@ -62,7 +62,7 @@

## Governor

/node/pkg/governor/ @bruce-riley @claudijd @SEJeff @djb15
/node/pkg/governor/ @bruce-riley @claudijd @SEJeff @djb15 @johnsaigle

## Gateway Relayer

Expand Down Expand Up @@ -94,4 +94,4 @@

## Documentation

/docs @evan-gray @barnjamin @SEJeff @bruce-riley
/docs @evan-gray @SEJeff @bruce-riley
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
name: Bug report
about: Submit a bug ticket if you have an issue. If you're a user, check out the Wormhole Discord server below for faster assistance.
about: Submit a bug ticket if you found a bug not related to the guardian software. If you're a user, check out the Wormhole Discord server below for faster assistance.
title: ''
labels: 'bug'
labels: ['bug']
assignees: ''
---
<!--- Fill out the fields if you're an integrator or contributor. -->
<!--- Fill out all the fields below for faster assistance. -->

## Description and context
<!--- Provide a detailed description of the problem to expedite the process. -->
Expand All @@ -28,5 +28,4 @@ assignees: ''


## Solution recommendation
<!--- Not mandatory, but feel free to recommend a way fix the issue. -->

<!--- Not mandatory, but feel free to recommend a way fix the issue. -->
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report_guardian.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Guardian software bug report
about: Submit a bug ticket if you have an issue with the guardian software. If you're a user, check out the Wormhole Discord server below for faster assistance.
title: ''
labels: ['bug', 'guardian-support']
assignees: ''
---
<!--- Fill out all the fields below for faster assistance. -->

## Description
<!-- Please describe the issue in detail. Include logs, errors, and expected behavior. -->

## Recommendation
<!-- Not necessary, but feel free to recommend a way to fix the issue. -->
25 changes: 0 additions & 25 deletions .github/ISSUE_TEMPLATE/tracking_issue.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16"
node-version: "20"
- run: |
cd clients/js && make test
make docs
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ and code reviews are our most important tools to accomplish that.
- We welcome typo and grammar fixes to *public facing* documents. This includes
things like the whitepapers, but excludes inline code comments. PRs that touch
only the latter will be rejected. Fixing typos in comments alongside other non-trivial engineering work is welcome.
- Pull requests that modify dependencies must be well-documented so that the benefits of updating can be weighed against
security and compatibility concerns. Low-effort PRs that update dependencies without any documentation will be rejected.

Documentation for the in-the-wild deployments lives in the
[wormhole-networks](https://github.com/certusone/wormhole-networks) repository.
Expand Down
70 changes: 60 additions & 10 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,41 @@ def command_with_dlv(argv):
"--",
] + argv[1:]

def generate_bootstrap_peers(num_guardians, port_num):
# Improve the chances of the guardians discovering each other in tilt by making them all bootstrap peers.
# The devnet guardian uses deterministic P2P peer IDs based on the guardian index. The peer IDs here
# were generated using `DeterministicP2PPrivKeyByIndex` in `node/pkg/devnet/deterministic_p2p_key.go`.
peer_ids = [
"12D3KooWL3XJ9EMCyZvmmGXL2LMiVBtrVa2BuESsJiXkSj7333Jw",
"12D3KooWHHzSeKaY8xuZVzkLbKFfvNgPPeKhFBGrMbNzbm5akpqu",
"12D3KooWKRyzVWW6ChFjQjK4miCty85Niy49tpPV95XdKu1BcvMA",
"12D3KooWB1b3qZxWJanuhtseF3DmPggHCtG36KZ9ixkqHtdKH9fh",
"12D3KooWE4qDcRrueTuRYWUdQZgcy7APZqBngVeXRt4Y6ytHizKV",
"12D3KooWPgam4TzSVCRa4AbhxQnM9abCYR4E9hV57SN7eAjEYn1j",
"12D3KooWM4yJB31d4hF2F9Vdwuj9WFo1qonoySyw4bVAQ9a9d21o",
"12D3KooWCv935r3ropYhUe5yMCp9QiUoc9A6cZpYQ5x84DqEPbwb",
"12D3KooWQfG74brcJhzpNwjPCZmcbBv8f6wxKgLSYmEDXXdPXQpH",
"12D3KooWNEWRB7PnuZs164xaA9QWM3iZHekHyEQo5qGP5KCHHuSN",
"12D3KooWB224kvi7vN34xJfsfW7bnv6eodxTkgo9VFA6UiaGMgRD",
"12D3KooWCR2EoapJjoQVR4E3NLjWn818gG3XizQ92Yx6C424HL2g",
"12D3KooWNc5rNmCJ9yvXviXaENnp7vqDQjomZwia4aA7Q3hSYkiW",
"12D3KooWBremnqYWBDK6ctvCuhCqJAps5ZAPADu53gXhQHexrvtP",
"12D3KooWFqdBYPrtwErMosomvD4uRtVhXQdqqZZHC3NCBZYVxr4t",
"12D3KooW9yvKfP5HgVaLnNaxWywo3pLAEypk7wjUcpgKwLznk5gQ",
"12D3KooWRuYVGEsecrJJhZsSoKf1UNdBVYKFCmFLNj9ucZiSQCYj",
"12D3KooWGEcD5sW5osB6LajkHGqiGc3W8eKfYwnJVVqfujkpLWX2",
"12D3KooWQYz2inBsgiBoqNtmEn1qeRBr9B8cdishFuBgiARcfMcY"
]
bootstrap = ""
for idx in range(num_guardians):
if bootstrap != "":
bootstrap += ","
bootstrap += "/dns4/guardian-{idx}.guardian/udp/{port}/quic/p2p/{peer}".format(idx = idx, port = port_num, peer = peer_ids[idx])
return bootstrap

bootstrapPeers = generate_bootstrap_peers(num_guardians, 8999)
ccqBootstrapPeers = generate_bootstrap_peers(num_guardians, 8996)

def build_node_yaml():
node_yaml = read_yaml_stream("devnet/node.yaml")

Expand All @@ -173,6 +208,14 @@ def build_node_yaml():
container["command"] = command_with_dlv(container["command"])
print(container["command"])

if num_guardians > 1:
container["command"] += [
"--bootstrap",
bootstrapPeers,
"--ccqP2pBootstrap",
ccqBootstrapPeers,
]

if aptos:
container["command"] += [
"--aptosRPC",
Expand All @@ -189,8 +232,6 @@ def build_node_yaml():
"http://sui:9000",
"--suiMoveEventType",
"0x320a40bff834b5ffa12d7f5cc2220dd733dd9e8e91c425800203d06fb2b1fee8::publish_message::WormholeMessage",
"--suiWS",
"ws://sui:9000",
]

if evm2:
Expand Down Expand Up @@ -587,7 +628,12 @@ if ci_tests:
],
)

k8s_yaml_with_ns(encode_yaml_stream(set_env_in_jobs(read_yaml_stream("devnet/tests.yaml"), "NUM_GUARDIANS", str(num_guardians))))
k8s_yaml_with_ns(
encode_yaml_stream(
set_env_in_jobs(
set_env_in_jobs(read_yaml_stream("devnet/tests.yaml"), "NUM_GUARDIANS", str(num_guardians)),
"BOOTSTRAP_PEERS", str(ccqBootstrapPeers)))
)

# separate resources to parallelize docker builds
k8s_resource(
Expand All @@ -614,12 +660,6 @@ if ci_tests:
trigger_mode = trigger_mode,
resource_deps = [], # uses devnet-consts.json, but wormchain/contracts/tools/test_ntt_accountant.sh handles waiting for guardian, not having deps gets the build earlier
)
k8s_resource(
"query-ci-tests",
labels = ["ci"],
trigger_mode = trigger_mode,
resource_deps = [], # node/hack/query/test/test_query.sh handles waiting for guardian, not having deps gets the build earlier
)
k8s_resource(
"query-sdk-ci-tests",
labels = ["ci"],
Expand Down Expand Up @@ -907,8 +947,18 @@ if aptos:
trigger_mode = trigger_mode,
)

def build_query_server_yaml():
qs_yaml = read_yaml_stream("devnet/query-server.yaml")

for obj in qs_yaml:
if obj["kind"] == "StatefulSet" and obj["metadata"]["name"] == "query-server":
container = obj["spec"]["template"]["spec"]["containers"][0]
container["command"] += ["--bootstrap="+ccqBootstrapPeers]

return encode_yaml_stream(qs_yaml)

if query_server:
k8s_yaml_with_ns("devnet/query-server.yaml")
k8s_yaml_with_ns(build_query_server_yaml())

k8s_resource(
"query-server",
Expand Down
5 changes: 3 additions & 2 deletions clients/eth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"context"
"errors"
"fmt"
"os"
"strconv"
Expand Down Expand Up @@ -183,7 +184,7 @@ func getTransactor(ethC *ethclient.Client) (*abi.AbiTransactor, error) {
addr := common.HexToAddress(contractAddress)
emptyAddr := common.Address{}
if addr == emptyAddr {
return nil, fmt.Errorf("invalid contract address")
return nil, errors.New("invalid contract address")
}

t, err := abi.NewAbiTransactor(addr, ethC)
Expand All @@ -196,7 +197,7 @@ func getTransactor(ethC *ethclient.Client) (*abi.AbiTransactor, error) {

func getGovernanceVaaAction(payload []byte) (uint8, error) {
if len(payload) < 32+2+1 {
return 0, fmt.Errorf("VAA payload does not contain a governance header")
return 0, errors.New("VAA payload does not contain a governance header")
}

return payload[32], nil
Expand Down
58 changes: 18 additions & 40 deletions clients/js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ Options:
```
</details>

<details>
<summary> chains </summary>

```sh
Options:
--help Show help [boolean]
--version Show version number [boolean]
```
</details>

<details>
<summary> edit-vaa </summary>

Expand Down Expand Up @@ -248,16 +258,8 @@ Positionals:
Options:
--help Show help [boolean]
--version Show version number [boolean]
-c, --chain chain name
[choices: "unset", "solana", "ethereum", "terra", "bsc", "polygon",
"avalanche", "oasis", "algorand", "aurora", "fantom", "karura", "acala",
"klaytn", "celo", "near", "moonbeam", "neon", "terra2", "injective",
"osmosis", "sui", "aptos", "arbitrum", "optimism", "gnosis", "pythnet",
"xpla", "btc", "base", "sei", "rootstock", "scroll", "mantle", "blast",
"xlayer", "linea", "berachain", "seievm", "wormchain", "cosmoshub", "evmos",
"kujira", "neutron", "celestia", "stargaze", "seda", "dymension",
"provenance", "sepolia", "arbitrum_sepolia", "base_sepolia",
"optimism_sepolia", "holesky", "polygon_sepolia"]
-c, --chain chain name. To see a list of supported chains, run
`worm chains` [string]
-n, --network Network
[required] [choices: "mainnet", "testnet", "devnet"]
-a, --contract-address Contract to submit VAA to (override config) [string]
Expand Down Expand Up @@ -307,26 +309,10 @@ Options:
Options:
--help Show help [boolean]
--version Show version number [boolean]
--src-chain source chain
[required] [choices: "solana", "ethereum", "terra", "bsc", "polygon",
"avalanche", "oasis", "algorand", "aurora", "fantom", "karura", "acala",
"klaytn", "celo", "near", "moonbeam", "neon", "terra2", "injective",
"osmosis", "sui", "aptos", "arbitrum", "optimism", "gnosis", "pythnet",
"xpla", "btc", "base", "sei", "rootstock", "scroll", "mantle", "blast",
"xlayer", "linea", "berachain", "seievm", "wormchain", "cosmoshub", "evmos",
"kujira", "neutron", "celestia", "stargaze", "seda", "dymension",
"provenance", "sepolia", "arbitrum_sepolia", "base_sepolia",
"optimism_sepolia", "holesky", "polygon_sepolia"]
--dst-chain destination chain
[required] [choices: "solana", "ethereum", "terra", "bsc", "polygon",
"avalanche", "oasis", "algorand", "aurora", "fantom", "karura", "acala",
"klaytn", "celo", "near", "moonbeam", "neon", "terra2", "injective",
"osmosis", "sui", "aptos", "arbitrum", "optimism", "gnosis", "pythnet",
"xpla", "btc", "base", "sei", "rootstock", "scroll", "mantle", "blast",
"xlayer", "linea", "berachain", "seievm", "wormchain", "cosmoshub", "evmos",
"kujira", "neutron", "celestia", "stargaze", "seda", "dymension",
"provenance", "sepolia", "arbitrum_sepolia", "base_sepolia",
"optimism_sepolia", "holesky", "polygon_sepolia"]
--src-chain source chain. To see a list of supported chains, run `worm
chains` [string] [required]
--dst-chain destination chain. To see a list of supported chains, run
`worm chains` [string] [required]
--dst-addr destination address [string] [required]
--token-addr token address [string] [default: native token]
--amount token amount [string] [required]
Expand All @@ -353,16 +339,8 @@ Options:
```sh
Positionals:
network Network [choices: "mainnet", "testnet", "devnet"]
chain Source chain
[choices: "unset", "solana", "ethereum", "terra", "bsc", "polygon",
"avalanche", "oasis", "algorand", "aurora", "fantom", "karura", "acala",
"klaytn", "celo", "near", "moonbeam", "neon", "terra2", "injective",
"osmosis", "sui", "aptos", "arbitrum", "optimism", "gnosis", "pythnet",
"xpla", "btc", "base", "sei", "rootstock", "scroll", "mantle", "blast",
"xlayer", "linea", "berachain", "seievm", "wormchain", "cosmoshub", "evmos",
"kujira", "neutron", "celestia", "stargaze", "seda", "dymension",
"provenance", "sepolia", "arbitrum_sepolia", "base_sepolia",
"optimism_sepolia", "holesky", "polygon_sepolia"]
chain Source chain. To see a list of supported chains, run `worm chains`
[string]
tx Source transaction hash [string]

Options:
Expand Down
1 change: 1 addition & 0 deletions clients/js/info_tests/evm-1.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0xbeFA429d57cD18b7F8A4d91A2da9AB4AF05d0FBe
1 change: 1 addition & 0 deletions clients/js/info_tests/evm-1.test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
evm address-from-secret 0xcfb12303a19cde580bb4dd771639b0d26bc68353645571a8cff516ab2ee113a0
1 change: 1 addition & 0 deletions clients/js/info_tests/generate-1.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0100000000010009b7c0612e950779ea6a5458800289925c02a32cca3670f497693df283b503177e757473f94adfa2d18745b9e3d01a04f6b97240459612bd8654e5f91fb3f3d5010000000100000001000100000000000000000000000000000000000000000000000000000000000000040000000005a657f60000000000000000000000000000000000000000000000004e46544272696467650100000004000000000000000000000000706abc4e45d419950511e474c7b9ed348a4a716c
1 change: 1 addition & 0 deletions clients/js/info_tests/generate-1.test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
generate registration --module NFTBridge --chain bsc --contract-address 0x706abc4E45D419950511e474C7B9Ed348A4a716c --guardian-secret cfb12303a19cde580bb4dd771639b0d26bc68353645571a8cff516ab2ee113a0
1 change: 1 addition & 0 deletions clients/js/info_tests/generate-2.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
01000000000100fe357dfbb2661d594da7720bf919bcb5597776c20720065c38748a7f69bc59e30b1a3a9ed564418083162c2f9f12910a799699faafe75494ba68b5813ae4a19a0000000001000000010002000000000000000000000000000000001111111111111111111111111111111500000000051d2e300002000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800020655534443000000000000000000000000000000000000000000000000000000005553444300000000000000000000000000000000000000000000000000000000
1 change: 1 addition & 0 deletions clients/js/info_tests/generate-2.test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
generate attestation --emitter-chain Ethereum --emitter-address 11111111111111111111111111111115 --chain Ethereum --token-address 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 --decimals 6 --symbol USDC --name USDC --guardian-secret cfb12303a19cde580bb4dd771639b0d26bc68353645571a8cff516ab2ee113a0
Loading