* Add ibc-composability-mw to gateway along with updates to node for
ibc-composability-mw and ibc-translator.
* Move governance action to new GatewayModule
---------
Co-authored-by: Nikhil Suri <nikhilsuri@comcast.net>
* 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.
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.
* 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
* Adds .github because workflow needs to install forge
* sdk-ci-tests need to install forge
* don't wait for nonexistent relayer engine
* SDK minus payload tests
* Rename sdk relayer folder and file
* modify index.ts
* modify path
* sdk-ci-tests need to install forge
* don't wait for nonexistent relayer engine
* Add three governance VAA actions for generic relayers
* demandOption and const
* Remove forge build warnings
* Add note to interface for resend
* Verify additional VAAs in SDK
* via-ir on unless in Tilt
* Correct IWormholeReceiver interface
* Wormhole message fee now part of quoteDeliveryPrice (#3043)
* Fix to PR 3043
* Remove compiler warning
* Remove files
* remove generic relayer docker
* Fix typo
* 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
* Update register chain test to only do one registration
* Slight improvements to delivery provider implementation
* typed errors for delivery provider
* Update SDK to have via-ir devnet address
* Fix test
* enable VIA-IR in CI and not in Tilt
* Fix chain id
* get register chain test to work
* correct contract address for via ir
* update sdk consts for via ir address
* base 32 address
* merge
* -f to -r
* relay provider -> delivery provider
* fix await
* Readme changes
* 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
* Adds .github because workflow needs to install forge
* sdk-ci-tests need to install forge
* don't wait for nonexistent relayer engine
* SDK minus payload tests
* Rename sdk relayer folder and file
* modify index.ts
* modify path
* Remove forge build warnings
* Add note to interface for resend
* Verify additional VAAs in SDK
* via-ir on unless in Tilt
* Correct IWormholeReceiver interface
* Wormhole message fee now part of quoteDeliveryPrice (#3043)
* Fix to PR 3043
* Remove compiler warning
* Remove files
* remove generic relayer docker
* 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
* Update register chain test to only do one registration
* Slight improvements to delivery provider implementation
* typed errors for delivery provider
* Update SDK to have via-ir devnet address
* Fix test
* enable VIA-IR in CI and not in Tilt
* Fix chain id
* get register chain test to work
* correct contract address for via ir
* update sdk consts for via ir address
* base 32 address
* chain 24 not 26
* remove unintended line removal
* restore WormholeRelayerSend
* sdk: Add fuzz testing and documentation for CalculateQuorum
* Use testify assertions instead of stdlib
* sdk: move unit and fuzz run into one line
* sdk: use better testify function for zero check
* sdk: drop unnecessary format string assertions
* sdk: remove obviously ignored test corpus items
* 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>
* sdk: add new governance VAA for IbcReceiverUpdateChainConnection
* Enforce connectionId to be 64 bytes, add tests in rust sdk
* Update PrependBufferBytesFixed to LeftPadBytes, add template function + command for IBC governance VAA
* Add >64 length check for ibcReceiverUpdateChainConnectionConnectionId in runIbcReceiverUpdateChainConnectionTemplate command
* Update naming of governance VAA to reflect new mapping of channelId -> chainId
* Add TargetChainID to admin commands
* Node: Add IBC update channel to admin verify cmd
---------
Co-authored-by: Bruce Riley <briley@jumptrading.com>
* sdk: update wormhole-core to wormhole-sdk and fix lib name to be wormhole_sdk
* cosmwasm: update wormhole and token bridge cosmwasm package/lib names
* Fix terra2 deployment script with new artifact names
* Sei testnet support
* Set contract addresses
* node/pkg/watchers: add RunWithScissors
* SDK tweaks
* node: revert "node/pkg/watchers: add RunWithScissors" (#2620)
This reverts commit 9b8bed4dbf.
* Make Sei use IBC watcher
---------
Co-authored-by: Paul Noel <panoel007@gmail.com>
Co-authored-by: Paul Noel <35237584+panoel@users.noreply.github.com>
* Node: Support VAAs with large payloads
Change-Id: Ie09bdc8ea0813ee90f9b686f3fe95365baa4014f
* Clean up tests
Change-Id: I983a40a2e7763271c8212ac18455b8b45e48fd3e
Add a test for digest calculation that uses a hardcoded digest. The
digest for this test was calculated using the `worm` CLI to ensure
interoperability.
Add the payload as an explicit field to the `TransferWithPayload` enum
variant. This is a generic parameter that defaults to `Box<RawMessage>`
for maximum flexibility (and to avoid leaking lifetimes higher up the
stack) but users are encouraged to replace this default type parameter
with an explicit `&RawMessage` in places where the serde_wormhole data
format is used.
The main benefit of this change is that the payload is now included as
part of the actual message and no longer requires callers to awkwardly
append it after serialization. This is especially useful in human-
readable formats like JSON (see the `transfer_with_payload` test in
token.rs for an example of this simplification).
The main downside is that this now requires explicit type annotations
when using the non-payload3 variants so that the compiler will pick up
the default generic parameter. This is a relatively minor inconvenience
and the benefit appears to be worth the cost.
There should be no functional change.
The RawMessage type provides a more flexible way to handle trailing
payloads so replace all usage of the `*_with_payload` functions to use
`RawMessage` instead.
There should be no functional change.
Add a RawMessage type that can be used to defer parsing parts of a
payload, similar to the `json.RawMessage` from Go. The implementation
is inspired by `serde_json::RawValue`, which does a similar thing.
When serializing, RawMessage will serialize to a base64-encoded string
if it detects that the data format is human readable (like JSON).
Otherwise it will simply forward the raw bytes to the serializer.
RawMessage has both borrowed and boxed versions. The borrowed version
is the most efficient as it enables zero-copy handling of the input data
but also requires that the input data already contains raw bytes and is
not suitable when dealing with human-readable formats like JSON.
The boxed version is more flexible as it supports byte slices, base64-
encoded strings, and byte sequences but is slightly less efficient as it
requires copying or decoding the input data.
This field doesn't actually appear in `GuardianSetUpgrade` governance
messages and was already being skipped by serde so just remove it
completely. Contracts that need to keep track of this information can
encapsulate the `GuardianSetInfo` inside another struct that has an
`expiration_time` field.
Ensure that converting `Chain` to/from a u16 or to/from a string is
always isomorphic. This requires changing the `FromStr` impl so that in
can handle strings like "Unknown(27)".
Add a test to ensure that calculating the digest from the structured
body, serialized data, or partial body + serialized payload all give the
same result.
Add the `Body::with_payload` method, which can be used to change the
type of the payload for a `Body`. This is useful when parsing the
payload needs to be deferred until after the body is parsed.
Use the `Signature` type from the core SDK to avoid unnecessary
type conversions. Cosmwasm requires its message types to implement
`JsonSchema` so also derive that impl for the `Signature` type behind a
feature flag.
This change uncovered a separate issue where the fake `WormholeKeeper`
was using regular ecdsa signatures rather than recoverable signatures
so fix the signing and verification methods to use the recoverable
signatures.
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`.
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>
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.
* node: inject wormchain cosmwasm governance messages
* Use nested hash for defense in depth
* Use keccak.Reset() instead of creating new hash objects
* fix msg_server_wasmd_test
* Updated based on jynnantonix comments
* Check return value of binary.Write
* Include actual error in binary.Write panic case