Commit Graph

2758 Commits

Author SHA1 Message Date
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
Csongor Kiss 62edb5b5b1 wormchain: Audit items (#11)
* changed minimum governance vaa length check

* remove double write of chain ID in token attest

* removed panics from vaa processing in token bridge

* added non-negative check to fee in transfer tokens

* simplify non-negative check

* make fee sign check nicer in msg_server_execute_vaa

Operationally identical

* 14->13 in proofOfAuthority.md

Co-authored-by: chase-45 <chasemoran45@gmail.com>
Co-authored-by: Csongor Kiss <ckiss@jumptrading.com>
2022-10-03 17:34:42 +09:00
Developer Experience team at Tendermint 879be5bbc6 Add wormhole chain
This is a squashed commit of all the changes in the wormhole_chain
directory from the development branch with the following changes:

 * Replace the vendored cosmos-sdk directory with a replace directive in
   the go.mod file pointing to the wormhole-foundation/cosmos-sdk repo.
 * Update the cosmos-sdk version to v0.45.7.
 * Rename starport -> ignite
 * Update to ignite version 0.23.0
 * Update go version in dockerfile to 1.19.0
 * Upgrade github.com/cosmos/ibc-go v1.2.0 => v1.2.2
 * Upgrade github.com/tendermint/spm v0.1.5 => v0.1.9
 * Add missing module names to the
   SetOrder{BeginBlockers,EndBlockers,InitGenesis} functions.
 * Fix the gentx memo in the genesis.json file.
2022-10-03 17:34:42 +09:00
Paul Noel 0f7ddda602
Optimism testnet deploy (#1661)
* ethereum: add optimism testnet

* sdk/js: add optimism testnet

* ethereum: put back network id

* Revert "ethereum: put back network id"

This reverts commit 71f68c50d2.

* ethereum: put back network id

* ethereum: file cleanup
2022-09-30 17:38:08 -04:00
Ali Behjati 97617cb5ce
Solitaire: Use sysvar for rent instead of default (#1505)
* Solitaire: Use sysvar for rent instead of default

Using default has some risks such as:
- Network having a different values (such as Pythnet)
- Network changes the value

It avoids using default as fallback to have Error more explicitly
avoid exposing above risks under rare conditions
that the sysvar might return Err.

* Update comments

* Format the code
2022-09-30 15:53:02 -05:00
bruce-riley 0dbd0b6628
node: governor listen to quorum gossip (#1487)
* governor listen to quorum gossip

* governor listen to quorum gossip

* Fix build error in tests

* See p2p from other guardians in devnet

* Fix test broke during merge

* Change delete function being used

* Don't reload duplicates on startup
2022-09-30 12:28:26 -05:00
bruce-riley 7fcbabe720
node: eth publish immediately (#1664)
* node: eth publish immediately

Change-Id: I242f02d0ed5bcced5ed366a512c07d5757b300e8

* testing: immediate publish test

* Move magic number to the sdk

Change-Id: I806f73d4442af4736aa6e5fc1c8e48e434c4a6d4

Co-authored-by: Evan Gray <battledingo@gmail.com>
2022-09-30 11:03:01 -05:00
Csongor Kiss b5a8ba2361 ethereum: Add scripts to verify/upgrade all contracts 2022-09-30 09:11:52 -04:00
Evan Gray 860f91b2b8 clients/js: fix terra fee 2022-09-30 09:08:33 -04:00
Evan Gray 6a8ac2304f node: don't require algorandIndexerToken 2022-09-30 09:07:53 -04:00
Chirantan Ekbote 2914e48780 Dockerfile.node: Don't install wasmvm
Now that we don't depend on the cosmos-sdk packages we don't need this
anymore.
2022-09-30 16:12:30 +09:00
Chirantan Ekbote afda43a2a0 node: Run `go mod tidy`
Commit "02cf08531 node: move watchers to dedicated package (#1647)"
removed a lot of packages from the node dependency list.  Run `go mod
tidy` to clean up the go.mod and go.sum files.
2022-09-30 16:12:30 +09:00
Bruce Riley aebbbdcb9a Code review rework 2022-09-29 22:38:27 -04:00
Bruce Riley d45a1e95cb Implement finalizer 2022-09-29 22:38:27 -04:00
Bruce Riley 0b6cc9ab44 Basic guardian support 2022-09-29 22:38:27 -04:00
Bruce Riley 87d146a261 Deploy contracts to testnet 2022-09-29 22:38:27 -04:00
Evan Gray 3177cf7eb5 node: fix dockerfile 2022-09-29 17:36:09 -04:00
kev1n-peters 9352784c89
sdk/js: 0.7.0 version bump (#1451) 2022-09-28 23:27:18 +02:00