Commit Graph

173 Commits

Author SHA1 Message Date
Bing Yu 3d16cca785
node: Fix url verification bug where <ip>:<port> is not supported (#3719)
* node: update url verification logic to support ip:port format

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

* node: add test case for ip:port

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

* node: change neon rpc scheme from websocket to HTTP

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

* node: update comment to be more accurate

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

* node: remove neon from devmode

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

* node: ignore internal xlabs testing file

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

* node: add ws:// prefix to Sui

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

* node: add ws:// and wss:// prefixes to Sui schemes

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

* node: update testnet yaml naming

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

---------

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>
2024-01-19 03:14:59 +08:00
Bing Yu 81af52a2c7
node: Add URL scheme verification along flag registration (#3627)
* node: Add valid schemes for each RPC/WS

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

* node: add function to validate rpc/ws url

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

* node: Add function to generate formats based on schemes input

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

* node: Add function to register and validate flag

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

* node: Change cobra flag register to register and verify

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

* node: registerFlagWithValidation -> registerRPCFlagWithValidationOrFail

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

* node: Fix minor formatting error

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

* node: Format node.go

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

* node: Remove default parameter

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

* node: Fix accoutantWS accepted schemes

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

* node: Remove expectedSchemes to use validSchemes[rpcName] instead

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

* node: Fix typos

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

* node: map -> inline param

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

* node: Add unit test for validateURL

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>

---------

Signed-off-by: bingyuyap <bingyu.yap.21@gmail.com>
2024-01-10 00:19:15 +08:00
Csongor Kiss bd62e27789
terra: migrate to cosmwasm 1.1.0 (#3138)
* terra/contracts: migrate to cosmwasm 1.1.0

use `classic-bindings` crate instead of terra-cosmwasm.
This is the updated version that calls the correct query post chain upgrade

* terra/Dockerfile: update workspace optimizer

* terra: label is now required on instantiate

* terra: accept either 32 or 20 byte addresses

* terra: update devnet terra classic

* node/cosmwasm: always CW >1

* tilt: re-introduce terra classic tests

* terra: make get_address support both 20 and 32 byte addresses

* terra: fix tests to account for burn tax

Since the tests are now ran against the new LocalTerra which has burn
tax, the transaction results are different from before

* terra/token-bridge: check first 12 bytes to determine native denoms

* terra/token-bridge: simplify conditional

---------

Co-authored-by: Evan Gray <battledingo@gmail.com>
2023-12-13 16:27:17 +00:00
Evan Gray 094a404902 tilt: remove additional root CA support 2023-12-12 14:22:05 -06:00
bruce-riley 0da1f37874
CCQ: Query server metrics (#3503)
* CCQ: Query server metrics

* Fix readiness port

* Fix readiness

* Fix testing script
2023-11-08 11:22:34 -06:00
bruce-riley d2db1616c5
CCQ: eth_call_by_timestamp (#3449)
* CCQ: eth_call_by_timestamp

* CI: add CCQ sdk tests

* SDK test changes

* Add block parsing tests

* Code review rework

* More code review rework

* More rework

* Allow two blocks to have the same timestamps

* Restore timestamp check

* Restore timestamp check

* Minor code rework

---------

Co-authored-by: Evan Gray <battledingo@gmail.com>
2023-10-19 10:32:23 -05:00
bruce-riley ea70610e46
CCQ: Testing (#3424)
* CCQ: Testing

* Use new p2p.NewHost function

* More rework

* More rework
2023-10-12 16:23:51 -05:00
Jeff Schroeder bdd1815bc4 Remove spy_relayer from tilt 2023-09-13 14:32:17 -04:00
bruce-riley c1ff1e1d1c
Node/Gateway: Relay attestations (#3350) 2023-09-07 14:11:15 -05:00
Kevin Peters 957f3307de node: Removed support for writing attestation events to bigtable
The Spy can be modified to listen to attestation events on the p2p
network and write them to a database instead.
2023-09-07 12:41:36 -05:00
bruce-riley 782111e528
Node: Clean up wormchain parameters (#3310) 2023-08-22 14:49:49 -05:00
derpy-duck 3bb7fbf245
Relayer: Relayer engine (#3169) 2023-07-06 17:00:05 -04:00
Hernán Di Pietro fd37be7199
tilt: algorand changes for 3.16.2 (#3114)
* Changes for 3.16.2 Tilt / Devnet.

* Updated constants in test file

* modified python script to 3.16.2

* More AppID Changes.

* Found more AppIds to replace.

* testApp fixed to 1008.
2023-06-28 11:37:41 -04:00
Evan Gray 0f0b15fe66 ci: pass num guardians to ci tests 2023-06-16 07:44:58 -07:00
derpy-duck 82e31f6965
Relayer: Import sdk in relayer engine (#3095)
* Update relayer engine dockerfile to import SDK, and reduce timeout

* fix import

* Add ethereum config folder
2023-06-16 06:44:55 -04:00
derpy-duck 10cc45aba2
Relayer/merge into wormhole relayer engine (#3042)
Note: The time limit for CI needs to be increased because now the relayer engine needs to build the SDK from source (the ethereum folder) in it's docker image.

Once the SDK is published, I can have the relayer engine docker image simply import the SDK, which should save a lot of time and allow us to reduce the CI time limit again.
2023-06-14 15:08:28 -04:00
derpy-duck 7885acb9bd
Relayer: Ethereum folder Changes for Merging into Main (#3038)
* gRelayer: surrounding files

* modification to get compilation

* restore devnet

* remove generic relayer docker

* remove wait for relayer engine

* keep build time 20

* sh -> bash

* sh -> bash

* Remove comment

* bash -> sh

* Revert "bash -> sh"

This reverts commit 5c37e92fa1.

* bash->sh

* gRelayer: ethereum folder changes for generic-relayer-merge

* add eth-devnet

* Adds .github because workflow needs to install forge

* sdk-ci-tests need to install forge

* don't wait for nonexistent relayer engine

* update package.json and package-lock.json

* Remove unnecessary types from package.json

* ts-node

* gRelayer: ethereum folder changes for generic-relayer-merge

* sdk-ci-tests need to install forge

* don't wait for nonexistent relayer engine

* update package.json and package-lock.json

* remove these changes

* Relayer: Natspec documentation in IWormholeRelayer (#3032)

* WIP

* Fixes

* Updated interfaces

* remove bash

* Forward uses same refund chain id and refund address (#3034)

* WIP

* Fixes

* Forward uses same refund chain id and refund address

* Updated interfaces

* Remove forge build warnings

* Add note to interface for resend

* via-ir on unless in Tilt

* Correct IWormholeReceiver interface

* Wormhole message fee now part of quoteDeliveryPrice (#3043)

* Fix to PR 3043

* Remove compiler warning

* Relayer/address drew review (#3060)

* Fix typo in Create2Factory

* Add event for contract upgrades

* Prevent registering contract if it is already registered

* Prevent allowing unset chainId for default delivery provider governance VAA

* memory to calldata for external functions in WormholeRelayerSend

* continue memory to calldata for external functions

* Fix pricing in delivery provider

* Sanity check new default delivery provider isn't 0 address

* Don't save vaaKey as local variable

* cache the length of array rather than iterate every time for vaaKeys

* Replacing memory with calldata in few locations

* Remove stale file DeliveryProviderMessages

* Remove batch VAA sender script

* Remove batch VAA from WormholeSimulator

* Wait for a confirmation in deploy scripts

* remove unnecessary comments

* Fix Delivery Provider Pricing and add a test

* remove console logs

* Revert "continue memory to calldata for external functions"

This reverts commit f322afb6c0.

* Revert "memory to calldata for external functions in WormholeRelayerSend"

This reverts commit 42fcaad884.

* Revert "Don't save vaaKey as local variable"

This reverts commit a9172379c5.

* Revert "cache the length of array rather than iterate every time for vaaKeys"

This reverts commit d61380a9b0.

* Revert "Replacing memory with calldata in few locations"

This reverts commit 94e47b6e72.

* Revert "Fix typo in Create2Factory"

This reverts commit a9f7bdf461.

* Update contract addresses for via-ir

* Slight improvements to delivery provider implementation

* typed errors for delivery provider

* enable VIA-IR in CI and not in Tilt

* correct contract address for via ir

* WormholeRelayerSend and WormholeRelayerDelivery (#3082)
2023-06-13 17:01:43 -04:00
derpy-duck 3009d002fd
Relayer: Setup for Merging into Main (#3039)
* gRelayer: surrounding files

* modification to get compilation

* restore devnet

* remove generic relayer docker

* remove wait for relayer engine

* keep build time 20

* sh -> bash

* sh -> bash

* Remove comment

* bash -> sh

* Revert "bash -> sh"

This reverts commit 5c37e92fa1.

* bash->sh
2023-06-13 15:36:13 -04:00
bruce-riley ee676b28d1
Node: Remove wormchain watcher (#3074)
Change-Id: I498099496791859f6f5a39cc0642a49239a09972
2023-06-12 13:49:43 -05:00
tbjump 6ad0bbf85b tilt: add --guardiand_loglevel 2023-06-12 09:47:11 -07:00
heyitaki 0ecc427d6f docker: build CLI in shared image
Co-authored-by: Evan Gray <battledingo@gmail.com>
2023-06-01 15:33:07 +01:00
Nikhil Suri f6f93bf35e
tilt: devnet deployment for ibc generic messaging (#2593)
* Tilt devnet deployment for ibc generic messaging

* Address review comments from kcsongor and hendrikhofstadt

* Add IBC channel whitelist updates to wormchain and terra devnet deploy scripts

* VAAs had guardian set index three instead of zero

* ci: update addresses

* Remove message.block_height and message.tx_index from attributes

* Remove unnecessary contracts from terra2 devnet deployment

* Update wormhole-ibc address on terra2

* Update wormhole-ibc guardian set on terra2 devnet deployment

* IBC relayer testnet deployment fixes

* Wormchain update whitelist fix

---------

Co-authored-by: Bruce Riley <briley@jumptrading.com>
Co-authored-by: Evan Gray <battledingo@gmail.com>
2023-05-18 18:56:18 -04:00
heyitaki 412680fba5 sui: update devnet addresses 2023-05-02 15:14:23 -04:00
heyitaki ed733f8e73 sdk/js: add Sui support
Co-authored-by: Evan Gray <battledingo@gmail.com>
Co-authored-by: Kevin Peters <kpeters@jumptrading.com>
2023-05-02 15:14:23 -04:00
Hendrik Hofstadt 36c34bec1c
node: remove unused legacy code (#2441)
* node: remove discord notifier

Change-Id: If309974f73be35bddb3004e62ff9a0e1d06efab8

* node: remove legacy devnet features

Change-Id: I6f9dac21cb44846f638996c3aa5eb8376794cd78
2023-03-03 16:14:39 +01:00
Evan Gray 7f9a03254a test: accountant e2e 2023-01-31 11:09:43 -05:00
Justin Schuldt 15f485885b
wormchain: contracts deploy to Tilt devnet (#2300) 2023-01-30 21:45:22 -05:00
Evan Gray ae82c4035f tilt: fix accounting deploy 2023-01-30 10:17:20 -06:00
Justin Schuldt e09a2616bf
wormchain: contracts env data (#2297) 2023-01-27 14:27:21 -05:00
justinschuldt 08a0c28c65 wormchain ibc - update wormchain service name 2023-01-27 06:56:15 -05:00
justinschuldt 9db82e310f cosmwasm - separate deploy code per chain 2023-01-19 09:32:13 -06:00
Justin Schuldt ff7273cc5d
tilt: two wormchain nodes for devnet (#2228) 2023-01-18 17:15:23 -05:00
jumpsiegel 3580f51ccf
node/pythnet: websocket subscription (#2219)
* node/pythnet: websocket subscription
2023-01-18 11:24:55 -05:00
Nikhil Suri a7976136b7
tilt: add ibc relayer which connects wormchain and terra2 to dev environment (#2215)
- updates terra2 devnet chain timeout_commit to "1s" since the timeout_commit of "0.5s" is too fast and leads to Terra2's clock going into the future.
- updates terra2 devnet chain unbonding_time to "1814400s" which is the default value and translates to a valid trusting period for IBC connectivity.
2023-01-18 07:57:09 -08:00
bruce-riley 499c8424e4
Node: Initial guardiand changes for accounting (#2181)
* node: guardiand support for accounting

Change-Id: I97fe1f6d6d71a5803881ff4c793e3c30f22b14d8

* Node: Tie accounting into the guardian

Change-Id: I31600d18176f516b75b3eb046fd7ac6e54e1b133

* Node: accounting tests and metrics

Change-Id: Ieb139772edf464ed1ab202861babeaf0f857ad6b

* Node: minor tweak to accounting metrics

Change-Id: Iad2b7e34870734f0c5e5d538c0ac86269a9a4728

* Node: load accounting key

Change-Id: I228ce23e63b556d751000b97097202eda48650aa

* More work in progress

Change-Id: I85088d26c05cf02d26043cf6ee8c67efd13f2ea4

* Node: send observations to accounting contract

Change-Id: Ib90909c2ee705d5e2a7e6cf3a6ec4ba7519e2eb1

* Node: Fix lint error in accounting tests

Change-Id: Id73397cf45107243a9f68ba82bed3ccf2b0299b5

* Node: Need to copy libwasmvm.so

Change-Id: I2856c8964ca082f1f4014d6db9fb1b2dc4e64409

* Node: Rename wormchain to wormconn

Change-Id: I6782be733ebdd92b908228d3984a906aa4c795f7

* Node: moving accounting check after governor

Change-Id: I064c77d30514715c6f8b6b5da50806a5e1adf657

* Node: Add accounting status to heartbeat

Change-Id: I0ae3e476386cfaccc5c877ee1351dbe41c0358c7

* Node: start of accounting integration work

Change-Id: I8ad206eb7fc07aa9e1a2ebc321f2c490ec36b51e

* Node: More broadcast tx stuff

Change-Id: Id2cc83df859310c013665eaa9c6ce3033bb1d9c5

* Node: Can actually send a request to accounting

Change-Id: I6af5d59c53939f58b2f13ae501914bef260592f2

* Node: More accounting tx broadcast stuff

Change-Id: If758e49f8928807e87053320e9330c7208aad490

* Node: config changes for accounting

Change-Id: I2803cceb188d04c557a52aa9aa8ba7296da8879f

* Node: More accounting changes

Change-Id: Id979af0ec6ab8484bc094072f3febf39355351ca

* Node/Acct: Use new observation request format

* Node/acct: use new contract interface

* Node/acct: fix minor copy/paste error

* Node: Clean up comments and lint errors

* Node: disable accounting in dev by default

* Node: Fix test failure

* Remove test code

* Switch messages to debug, rename Run()

* check for "out of gas"

* Use worker routine to submit observations

* Rename mutex to reflect what it protects

* Create handleEvents func

* Remove FinalizeObservation

* Node/Acct: Trying to use tm library for watcher

* Node/acct: switch watcher to use tm library

* Node/Acct: Need separate WS parm for accounting

* Node/Acct: Fix compile error in tests

* Node/Acct: Minor rework

* Node: add wormchain as a dep to remove stale code

* Node/Acct: GS index is not correct in requests

* Node/Acct: Peg connection error metric

* Node/Acct: Add wormchain to node docker file

* Node/Acct: Fix for double base64 decode

* Node/Acct: Change public key to sender address

* Node/Acct: Fix lint error

* Node/Acct: key pass phrase change

* Node/Acct: Pass guardian index in obs req

* Node/Acct: No go on submit observation

* Node/Acct: Don't double encode tx_hash

* Node/Acct: Remove unneeded base64 encoding

* Node/Acct: handle submit channel overflow

* Node/Acct: Added a TODO to document a review issue

* Node/Acct: Fix for checking if channel is full

Co-authored-by: Conor Patrick <conorpp94@gmail.com>
2023-01-16 06:33:01 -06:00
heyitaki b7d870efcb docker: reorganize dockerfiles 2022-12-21 10:58:22 -08:00
Chirantan Ekbote 25abafc753
cosmwasm: Add wormchain-accounting contract (#1920)
* sdk/rust: Move profile settings to workspace

* sdk/rust: Add serde_wormhole crate

The serde_wormhole crate implements the wormhole wire format as a serde
data format.  This will let us replace all the hand-rolled
serialization with auto-generated code, which is less error-prone and
easier to review.

* sdk/rust: Add serde-based struct defintions

Refactor the core crate to add serde-based struct definitions for the
various messages used by the different wormhole smart contracts.  This
will also make it easier to use alternate data formats (like json) for
client-side tooling.

Co-authored-by: Reisen <reisen@morphism.org>

* sdk/rust: Drop references to `de::Unexpected`

The `de::Unexpected` enum from serde has a `Float(f64)` variant.
Referencing this enum anywhere in the code will cause the compiler to
emit its `fmt::Display` impl, which includes an `f64.load` instruction
on wasm targets.  Even if this instruction is never executed, its mere
existence will cause cosmos chains to reject any cosmwasm contract that
has it.

Fix this by removing all references to `de::Unexpected`.

* cosmwasm: Use cargo resolver version "2"

Enable the new feature resolver for the entire workspace.  This
prevents features that are enabled only for dev builds from also being
enabled in normal builds.

* Move cosmwasm Dockerfile to root directory

The cosmwasm contracts now also depend on the rust sdk so the docker
build context needs to be set to the root directory rather than the
cosmwasm/ directory.

* cosmwasm: Add wormchain-accounting contract

This contract implements tokenbridge accounting specifically for the
wormchain environment.

Fixes #1880.

* cosmwasm/accounting: Drop references to `de::Unexpected`

The `de::Unexpected` enum from serde has a `Float(f64)` variant.
Referencing this enum anywhere in the code will cause the compiler to
emit its `fmt::Display` impl, which includes an `f64.load` instruction
on wasm targets.  Even if this instruction is never executed, its mere
existence will cause cosmos chains to reject any cosmwasm contracts that
contain it.

Fix this by removing references to `de::Unexpected`.

Co-authored-by: Reisen <reisen@morphism.org>
2022-12-14 12:06:45 -05:00
jumpsiegel 402a2d1a30
Basic Sui watcher support (#1951) 2022-11-18 08:14:22 -06:00
jumpsiegel aabe1ca420
WH-1945: Tilt integration @ Closes #1945 (#1950) 2022-11-17 12:43:15 -06:00
Josh Siegel 2fab13e2cc WH-1903: snapshot of btc node work @ Closes #1903 2022-11-14 17:56:06 -06:00
Evan Gray 83e0f053f8 remove explorer related code 2022-10-31 13:22:51 -04:00
Evan Gray f60e6669ec node: commit proto and matching test fixes #1769 2022-10-31 12:45:30 -04:00
Evan Gray 090a8e0c74 relayer: fix ci 2022-10-27 14:04:38 -04:00
Evan Gray 9623ca7321 ci: quieter node 2022-10-27 07:52:24 -04:00
Evan Gray 7ee3f6bcbc tilt: move wormchain guardian flags to tiltfile 2022-10-27 07:52:24 -04:00
Evan Gray 043d4511a1 tilt: default to minimal tilt 2022-10-26 08:06:59 -04:00
Evan Gray 3e20790349 tilt: make wormchain optional and add missing dep 2022-10-26 08:06:59 -04:00
Evan Gray dc119e2b3a ci: earlier sdk build 2022-10-26 08:06:59 -04:00
Evan Gray c834938f09 ci: remove e2e since there is no UI to test 2022-10-25 18:31:45 -04:00
Conor Patrick 91bd9a5c36 rename all wormholechain and wormhole-chain references 2022-10-24 17:59:52 -04:00