* Add cspell configuration and custom dictionary
The goal is to cut down on both incoming tyops, and well meaning but
spammy tyop fix PRs.
To run cspell locally install it and run:
cspell '**/*.md' \
--config cspell.config.yaml \
--words-only \
--unique \
--quiet | sort --ignore-case
* docs: cspell updates
* wormchain: cspell updates
* aptos: cspell updates
* node: cspell updates
* algorand: cspell updates
* whitepapers: cspell updates
* near: cspell updates
* solana: cspell updates
* terra: cspell updates
* cosmwasm: cspell updates
* ethereum: cspell updates
* clients: cspell updates
* cspell updates for DEVELOP document
* github: run cspell github action
* sdk: cspell updates
* github: only run cspell on markdown files
* algorand: EMMITTER --> EMITTER
Suggested-by: @evan-gray
* cspell: removed from dictionary
Suggested-by: @evan-gray
* aptos and node: cspell updates
Suggested-by: @evan-gray
* cosmowasm: doc updates for terra2
Suggested-by: @evan-gray
* algorand: cspell updates
Suggested-by: @evan-gray
* algorand: cspell updates
Suggested-by: @evan-gray
* cspell: updated custom word dictionary
This resorts the dictionary and adds a few new words from the
algorand/MEMORY.md document around varints and integers.
* cspell: sort the dictionary how vscode does it
On macOS the sorting is locale dependent. To do this on macOS, you have
to invert the case, do a character insensitive sort, and then invert the
case again:
LC_COLLATE="en_US.UTF-8" cspell '**/*.md' --config cspell.config.yaml \
--words-only \
--unique \
--no-progress \
--quiet \
| tr 'a-zA-Z' 'A-Za-z' \
| sort --ignore-case \
| tr 'a-zA-Z' 'A-Za-z'
This requires the `LC_COLLATE` variable to be set to `en_US.UTF-8`, or it
will not do the right thing.
* docs: grammar clean up
---------
Co-authored-by: Evan Gray <battledingo@gmail.com>
* Add tests for ibc-translator contract
* Tokenfactory metadata symbol fix: if symbol is empty when registering an
asset, populate tokenfactory's metadata symbol with the denom with
exponent string so it is not empty.
* Tokenfactory metadata display fix: use denom with exponent for this
string instead of base denom.
* Add tests for ibc-translator contract
* Tokenfactory metadata symbol fix: if symbol is empty when registering an
asset, populate tokenfactory's metadata symbol with the denom with
exponent string so it is not empty.
---------
Co-authored-by: Nikhil Suri <nikhilsuri@comcast.net>
LocalTerra was updated to v2.4.0 and the LCD no longer returns
HTTP errors on some transaction failures (not enough gas still returns
an HTTP error). This caused some of the integration tests to break, because
the typescript SDK would throw on those HTTP errors.
https://github.com/terra-money/LocalTerra/releases/tag/v2.4.0
* 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>
* cosmwasm: add wormchain-ibc-receiver and wormhole-ibc contracts
* Address review comments from jynnantonix and hendrikhofstadt
* Fix lint errors and test failures
* Update naming to reflect new mapping of channelId -> chainId
* Return errors in ibc handlers that should never be called
* Remove contract name and version logic from migration handlers
* Add query handlers to wormhole-ibc contract
* Add wormchain channel id whitelisting to wormhole-ibc contract
* Increase packet timeout to 1 year
* Rebase on main, update imports to new names
* Add governance replay protection to both contracts
* wormhole_ibc SubmitUpdateChannelChain should only handle a single VAA
* better error messages
* Better logging and strip null characters from channel_id from governance VAA
* add brackets back for empty query methods
* Update Cargo.lock
* Only send wormhole wasm event attributes via IBC and add attribute whitelist on the receiver end
* tilt: fix terra2 deploy
* Update based on comments from jynnantonix
---------
Co-authored-by: Evan Gray <battledingo@gmail.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
While sending tokens to another address on the same chain via wormhole
is quite inefficient, it's not strictly disallowed and we do have some
VAAs on solana that do this. Explicitly check for this case and allow
it.
There are no restrictions on native tokens sent in this way but wrapped
transfers are still subject to some checks: the wrapped account for
the token must exist and it must have a balance larger than the amount
being transferred. If either of those checks fails then that means
that the sender acquired some wrapped tokens that did not go through
the accountant and so that transfer should be blocked and require manual
intervention.
Now that we can calculate the digest of an Observation there's no need
to store the whole thing on-chain. Instead only store the observation
digest, tx_hash, and emitter chain (the tx_hash is necessary because
it's not included in the digest and the emitter chain is used for
servicing missing observation queries). When adding new observations
we can check for equality by comparing the digests and tx hashes rather
than comparing the whole object.
This should further reduce the size of the on-chain state.
When submitting observations to the accounting contract, clients sign
the entire batch once. There's no point storing this signature in the
on-chain data for each observation because it's already stored as part
of the chain's transaction history and the signature would be different
if an observation was submitted as part of a different batch (or the
same batch in a different order) even if the observation itself didn't
change.
Also, nothing actually made use of this signature data. (Yes,
technically it was returned by some queries but the usefulness of
the signature by itself is questionable without the full batch of
observations that were signed).
All we really care about is the index of the guardian anyway so use
a bitset to keep track of the indices of all the guardians that have
signed an observation. We use a u128 for the bitset out of an abundance
of caution in case the number of guardians increases in the future.
Dealing with more than 128 guardians is left as a problem for future
wormhole contributors if we ever get to that point.