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
* sdk/js: Added repairVaa & test
* fixed unnecessary comments
* Separated rpc call from base repairVaa function. removed console logs and added throws
* removed unncessary else statement
* removed unnecessary async
* Skipping rpc call test for current guardian set
* Clean up minor formatting
* Optimism mainnet deploy
* node: added OP token to manual_tokens
* Add to readiness
* File should not have been committed
* Remove readiness since it goes with watcher
* Allow optimism watcher in mainnet
* Add to devnet config
Co-authored-by: Christine Eun <ceun@jumptrading.com>
* go sdk - BatchVAA structs
* make VAA body unmarshaling DRY
* implement binary encoding interfaces for VAAs
* validate observation length before unmarshaling
* move shared VerifySignatures logic to new function
* make SigningMsg a delegate call
* normalize ID of vaa types
* add BatchVAA version to signingBody
* add Attestation interface with shared VAA methods
* add data integrity checks to batchVAA unmarshal