Commit Graph

2525 Commits

Author SHA1 Message Date
bruce-riley 2fe56754d2
node: arbitrum watcher fix (#1699) 2022-10-12 10:04:54 -05:00
claudijd 3ac55339c9 Lower Solana Governor Limits 2022-10-11 22:30:01 -04:00
Chirantan Ekbote 8569d43ba4 node: solana: Store `lastSlot` more persistently
When the solana watcher is restarted (due to network errors, for
example) then the `lastSlot` state is lost.  This means that any
transactions in between the last processed slot and the most recent slot
will be lost and require manual re-observation.  Fix this by making the
`lastSlot` state persistent across watcher restarts.
2022-10-12 10:02:23 +09:00
Paul Noel c34022ee6a
clients/js: xpla client code (#1698)
* clients/js: xpla client code

* Tweak parameters

Change-Id: I693249ed0bf152a4414d2e0cabea842802110a89

* Testnet RPC is wrong in the client

Change-Id: I6c8a43e4fde301a94e6ec3b2199ef9f6cabf0b45

Co-authored-by: Bruce Riley <briley@jumptrading.com>
2022-10-11 14:30:09 -05:00
tbjump ff9b3af3fc
Add OtterSec Aptos Audit (#1702)
Co-authored-by: tbjump <>
2022-10-10 11:58:50 -07:00
bruce-riley 248fd5a588
node: neon watcher fix (#1694) 2022-10-07 13:45:37 -05:00
bruce-riley 1ebfa4ae95
sdk/js: 0.7.1 version bump, xpla and neon testnet support (#1693) 2022-10-07 10:26:54 -05:00
kev1n-peters 35b46ae205
cloud_functions: Performance enhancements to handle increased message volume (#1688)
TVL functions no longer scan the table for PythNet messages
Added a light-weight transaction-totals function
2022-10-07 09:33:10 -05:00
bruce-riley 09fefb30a9
Update client/js for Near testnet (#1677) 2022-10-07 08:35:28 -05:00
bruce-riley 4deadf9149
Update bridge addresses for Neon testnet (#1690) 2022-10-07 08:35:11 -05:00
Paul Noel d65def86e1
sdk/js: add XPLA to sdk (#1689)
* sdk/js: add XPLA to sdk

* sdk/js: use axpla as denom
2022-10-07 08:20:00 -05:00
Evan Gray 9609c4e7e0
sdk/js: add moonbeam mainnet addrs (#1683) 2022-10-07 08:18:36 -05:00
Justin Schuldt 0f73bb3b32 Tiltfile - add "spy" resource_dep 2022-10-07 00:52:02 -05:00
Chirantan Ekbote f7eb26124c cosmwasm: byte_utils: Clean up padding functions
You don't need multiple heap allocations just to left-pad or right-pad a
buffer.  Also add tests.
2022-10-07 09:41:32 +09:00
Paul Noel 66700359f7
clients/js - initial injective commit (#1447)
* clients/js - initial injective commit

* clients/js - upgrading the ethers package

* clients/js: fix packages
2022-10-06 14:39:34 -05:00
Paul Noel 066a2a56aa
clients/js: upgrade to latest wormhole-sdk (#1675)
* clients/js: upgrade to latest wormhole-sdk

* scripts: account for secp256k1 log msg
2022-10-06 11:24:43 -04:00
tbjump d5368b32c4
Revert "node: governor listen to quorum gossip (#1487)" (#1682)
This reverts commit 0dbd0b6628.
2022-10-06 07:57:25 -05:00
bruce-riley dd2b8e2bd2
node: poller timeout (#1670)
* node: poller timeout

Change-Id: Ia324f1ac482fa9c5bea2b501970f0b22b16e67ce

* Add a comment explaining readiness change

* Add comment explaining why we are using a timeout

* Retry if polling fails
2022-10-06 00:19:31 -05:00
Paul Noel 9657f41561
node: XPLA watcher (#1676) 2022-10-05 08:05:31 -05:00
Jonathan Claudius 59882d963d Re-add BOTX 2022-10-04 10:06:03 -05:00
Jonathan Claudius 517352706d Re-add manual token listings 2022-10-04 10:06:03 -05:00
Jonathan Claudius b4d79591a8 Update Governor tokens list 2022-10-04 10:06:03 -05:00
Chirantan Ekbote 153e92d4f4 wormchain: Use wormhole-sdk package
Now that the vaa code has moved into a separate sdk package we can use
it directly rather than going through the node package.  This should
also fix an issue where we didn't check for duplicate guardian
signatures during VAA verification.
2022-10-03 17:34:42 +09:00
Chirantan Ekbote bad2b6c5c6 wormchain: Copy sdk directory into docker image
We want wormchain to use the vaa package from the sdk directory so copy
that into the image when building.  Also move the dockerfile into the
parent directory to be consistent with what we do for the other
dockerfiles that use the root directory as the context.
2022-10-03 17:34:42 +09:00
Chirantan Ekbote 975182acb7 wormchain: Rename "certusone" -> "wormhole-foundation" 2022-10-03 17:34:42 +09:00
Chirantan Ekbote d577b931a4 wormchain: Fix formatting and add to lint.sh 2022-10-03 17:34:42 +09:00
Chirantan Ekbote 7f4b0d1a09 Wormhole chain integration
This is a squashed commit of all the changes needed to integrate
wormhole chain into the main repo.
2022-10-03 17:34:42 +09:00
Chirantan Ekbote e2c2ec9749 wormchain: tokenbridge: "Wormhole" -> "Portal" 2022-10-03 17:34:42 +09:00
Chirantan Ekbote 124307140d wormchain: tokenbridge: Don't change registered decimals
Don't allow an AssetMeta payload to change the decimals of a registered
asset as this would cause issues with any unredeemed token transfers.
2022-10-03 17:34:42 +09:00
Chirantan Ekbote d1b6512954 wormchain: tokenbridge: Normalize coins before processing
This lets users use non-base denominations when transferring coins.
2022-10-03 17:34:42 +09:00
Chirantan Ekbote 5e7752c74b wormchain: tokenbridge: Send/Burn coins after truncation
Sending or burning coins before truncating the amount would lead to the
user losing the truncated coins.  Only send or burn the coins after
truncation.
2022-10-03 17:34:42 +09:00
Chirantan Ekbote c53813ce37 wormchain: tokenbridge: Clean up coin handling
Use `sdk.Coin` methods as much as possible rather than mixing with
big.Int and uint256.Int.
2022-10-03 17:34:42 +09:00
Chirantan Ekbote ce40d17c74 wormchain: tokenbridge: Use sdk.Coin for transfer fees
Since the transfer amount already uses `sdk.Coin`, use it for fees as
well.  This ensures the fees cannot be negative.

Also add some extra validation for `MsgTransfer` fields and add tests
for the validation checks.
2022-10-03 17:34:42 +09:00
Chirantan Ekbote 524520c914 wormchain: wormhole: Fix broken test 2022-10-03 17:34:42 +09:00
Chirantan Ekbote b655e5b19b wormchain: Delete unused errors 2022-10-03 17:34:42 +09:00
Chirantan Ekbote 7fc2f06402 wormchain: client: Delete unused variable 2022-10-03 17:34:42 +09:00
Chirantan Ekbote b5ab6a8833 wormchain: wormhole: Remove nullify call in test
This was overwriting the generated keys and addresses.
2022-10-03 17:34:42 +09:00
Chirantan Ekbote 8f70fd1719 wormchain: tokenbridge: Don't register asset meta for unknown chains 2022-10-03 17:34:42 +09:00
Chirantan Ekbote 832a72057d wormchain: tokenbridge: Don't allow self-registration
Don't allow registering an emitter for wormhole chain on wormhole chain.
2022-10-03 17:34:42 +09:00
Chirantan Ekbote 5666ee51b5 wormchain: wormhole: Don't allow changes to the consensus guardian set
This would allow a jailed guardian to simply register a new validator
address and bypass the jail.
2022-10-03 17:34:42 +09:00
Chirantan Ekbote 727a3e869d wormchain: wormhole: Check for multiple validator registration.
Don't allow a tx signer to register more than one guardian validator.
2022-10-03 17:34:42 +09:00
Chirantan Ekbote 2fcfb7f769 wormchain: wormhole: Check for duplicate guardian addresses
When updating the guardian set via a governance action, make sure that
there are no duplicate addresses in the set.
2022-10-03 17:34:42 +09:00
Chirantan Ekbote b38180bf5d wormchain: tokenbridge: Check that the target chain is registered
Ensure that the destination chain has been registered in the tokenbridge
before allowing transfers to it.  This prevents users from accidentally
locking up their tokens in the token bridge by passing in an invalid
chain id.
2022-10-03 17:34:42 +09:00
Chirantan Ekbote d272eee7bc wormchain: tokenbridge: Burn wrapped coins
Previously we would just collect all the coins in the module account,
which isn't necessary for wrapped coins that we minted.  Burn them
instead.
2022-10-03 17:34:42 +09:00
Chirantan Ekbote 3e6b92a1f6 wormchain: tokenbridge: Reject transfers with negative fee 2022-10-03 17:34:42 +09:00
Chirantan Ekbote 317c0cf7c9 wormchain: wormhole: Simplify return in UpdateGuardianSet 2022-10-03 17:34:42 +09:00
Chirantan Ekbote 96c0db86ce wormchain: wormhole: Fix inconsistent comment 2022-10-03 17:34:42 +09:00
Chirantan Ekbote 991c41b46e wormchain: wormhole: Use existing helper functions
Replace a couple of blocks with existing helper functions that do the
same thing.
2022-10-03 17:34:42 +09:00
Chirantan Ekbote a0c25dead2 wormchain: tokenbridge: Check for base denom in GetWrappedCoinMeta
The base denom for wrapped tokens is prefixed with "b".  Check for this
in GetWrappedCoinMeta so that we don't end up treating base denom tokens
as native tokens.
2022-10-03 17:34:42 +09:00
Chirantan Ekbote a66b3ac28c wormchain: tokenbridge: Parse chain id as an unsigned integer
A chain id cannot be negative so parse it using `strconv.ParseUint` to
avoid issues with negative values.
2022-10-03 17:34:42 +09:00