Commit Graph

2086 Commits

Author SHA1 Message Date
Csongor Kiss f50586ad86 cosmwasm: move chain id and fee denom to storage
Prior to this change, these values were hardcode in the contract, as
the only supported chain was terra 2. This change allows the contract to
be deployed to other cosmwasm chains without having to recompile the
contract for each one.

The migration code ensures that terra2 is upgraded appropriately.
2022-07-20 16:09:39 -04:00
Kevin Peters eacb7c3f06 cloud_functions: Added LOAD_CACHE env variable
Can be set to false to effectively rebuild cache files.
2022-07-20 16:09:11 -04:00
Jeff Schroeder 3ce18fd66d Add the opencontainers source label to the relayer Dockerfile 2022-07-19 21:15:49 -04:00
Jeff Schroeder d9bde7e547 Build a relayer container image for each release
This, in addition to #1367, should make it easier for more people
to run their own relayer.
2022-07-19 21:15:49 -04:00
Evan Gray 577d9b35f8 sdk/js: parallelize tests 2022-07-19 19:43:41 -04:00
Kevin Peters c5a7d3e517 cloud_functions: use daily token prices to compute cumulative TVL
Use daily token prices to compute TVL instead of the prices fetched
at token transfer time, if available.

Added inactive tokenlist to exclude tokens that have essentially been
deactivated by CoinGecko (market data no longer available).
2022-07-19 16:45:21 -04:00
bruce-riley 7402259fc7
Chain governor (#1277)
* Rebase

* Reload from db on start up

Change-Id: I1deac9db28ad1157ea7e0c84af41c35b38497f4e

* Console commands

Change-Id: Ic242038312b7c837443a2df8823f100b3cdffd77

* Query prices from CoinGecko

Change-Id: I9a8c282ba374d32ef7045d11979a27ede3c52827

* Move chain config to separate file

Change-Id: I6a790eca765bce1f2caf48134e225df5c4daff15

* More code cleanup

Change-Id: Id12affa78cdc2d394d6dab0c53bb7ad06df8007e

* Few minor tweaks

Change-Id: I6cb511599d669e0b3d716d9f314ac0f26935ee92

* Create separate tests for different packages

Change-Id: Idb4da6817c9daad2a7420abc11bdaa702ae056dc

* Fix lint errors

Change-Id: I137c9e7e4574aee9c9fec22e91e19eee0e86a349

* Simplify chainlock message tests

* Add more governor db test coverage

* Next batch of review rework

Change-Id: Ife54852fca6c6990d1ffb3d60a8dd7f49d526f0a

* Still more rework

Change-Id: I43a8aa7fa4e1a7cea4d7fde68c963123c1ca8d53

* More rework

Change-Id: I9382412af4ffeda74967a834a6b0195a9d28b720

* Fix lint errors

Change-Id: Idaafce9b0314192557b7207911375d000bac5ae2

* Add rest and prometheus support

Change-Id: Ib870ed7eb305ef1ebbf6a7cedabc665c37c19171

* Add separate configs for testnet and devnet

Change-Id: I76b11d8940a8dc9935b3f276a008ed20ef60b850

* Update mainnet tokens to fix decimals

Change-Id: Iab018827766bc7748038b7be2f51342afb79b87c

* Let small enqueued VAAs go out when big ones can't

Change-Id: I7d3ef88d4579702d0c6ff4eaf5a8524799610ff6

* Tweak testnet config parameters

Change-Id: Id2c54151a7183ab3fb4af8060929198f6021ba4e

* Rework / enhancements from testnet testing

Change-Id: I1387b1d22667fa6ffe0bb1832dbc0b31196505d3

* Use known emitter maps

Change-Id: If330ee9d30ac3c2d1c6dca674f7777dc759de230

* Fix typo and out of date comments

Change-Id: I54a19792104ccc6ca023020303a710ef3ba18f74

Co-authored-by: claudijd <jclaudius@jumptrading.com>
2022-07-19 14:08:06 -04:00
bruce-riley 53efeb8c87
Add read only chain IDs (#1370)
* Add read only chain IDs

* Should be treated as EVMs
2022-07-19 14:05:40 -04:00
Chirantan Ekbote 7a1b1344a1 node: processor: Make observation state generic
We need to reuse almost all of the gossip infrastructure for accounting
transactions, with the only difference being that accounting will use a
`Transfer` message rather than a `VAA`.

Make the observation stored in the processor state generic so that it
can be either a VAA or a Transfer.  The rest of the code is shared.
2022-07-19 10:51:15 +09:00
Jeff Schroeder e538c074d3 relayer/spy_relayer: update README
With a bit more coherent docs
2022-07-18 09:39:58 -04:00
Jeff Schroeder ad845583e8 relayer/spy_relayer: remove Dockerfile debug bits 2022-07-18 09:39:58 -04:00
Evan Gray c2db111629 tilt: split out ci test containers 2022-07-15 14:36:46 -04:00
Evan Gray 90fe03012a tilt: build ci earlier 2022-07-15 14:36:46 -04:00
Evan Gray 91f9a13ae0 sdk/js: remove logs in tests 2022-07-15 14:36:46 -04:00
Evan Gray 271076a7b5 eth: 1 conf in devnet 2022-07-15 14:36:46 -04:00
Reisen 5da7ad0ef5 solitaire: reduce Claim complexity 2022-07-15 13:12:27 -05:00
Reisen 82ea938317 solitaire: remove recursive FromAccounts and 'c lifetime.
Solitaire parses accounts using two traits, FromAccounts and Peel. The
FromAccounts derive macro generates a function, `FromAccounts::from()`,
which calls `Peel::peel` to construct each field in the struct:

```
let example = Example {
    foo: Peel::peel(next_account_iter(accs)?),
    bar: Peel::peel(next_account_iter(accs)?),
    baz: Peel::peel(next_account_iter(accs)?),
    ...,
}
```

The FromAccounts derivation also attempts to implement Peel for the
structure itself however, which means `Example` itself is embeddable as
a field in another accounts struct. This is only used in ClaimableVAA
which is a large source of confusion and the complexity is not worth
maintaining.

This commit removes the recursion by:

1) Removing the `impl Peel` derived by FromAccounts.
2) Removes the AccountInfo iterator from Context as it is no longer needed.
3) Adds the current parsed account to Context instead, safe thanks to (2)
4) Move message out of ClaimableVAA and pass in to verify everywhere instead.
5) Removes Peel/FromAccounts from ClaimableVAA.
2022-07-15 13:12:27 -05:00
Evan Gray ec3bcfb40c examples: move to example repo 2022-07-15 14:08:04 -04:00
Josh Siegel caeea358d8 Stub out injective, osmosis, sui, and aptos 2022-07-15 10:45:30 -04:00
Chirantan Ekbote 508d140aa4 node/pkg/common: Refactor KnownEmitters
Create separate variables for the known tokenbridge and nft bridge
emitters and dynamically build KnownEmitters from those lists.  Having
separate variables for the tokenbridge and nft emitters will make it
easier to look them up without having to iterate over the whole emitter
list every time.

Also add a devnet_consts file to list the known emitters in the
development network.
2022-07-15 10:34:27 -04:00
Joe Howarth b306051bde Change spy_relayer readme guardian run command nodeKey path from /tmp/node.key -> /node.key 2022-07-14 23:29:03 -04:00
Csongor Kiss f4b890f342
solana: Fix verify script (#1356) 2022-07-14 17:11:42 -05:00
swimricky bf690e9adc
solana: fix payload3 deserialization (#1354)
* fix solana payload3 deserialization and add rust integration & unit tests

* add integration test for complete_native_with_payload
2022-07-14 13:30:38 -05:00
Jeff Schroeder deeabc096d
Update injective url/s (#1350)
* node/pkg/terra: remove setEvents

The guardian set should only be authoritative from ethereum, so having
this code in the terra watcher is unnecessary. Getting this information
on injective requires a few more hoops to jump through but it is never
used. It is easier to maintain less code, so remove it.

* node/cmd/guardiand: remove setEvents from cosmwasm

This removes the set events from:

* terra 2
* injective
* terra classic

* node/pkg/terra: don't query guardianset from cosmwasm

* node/pkg/terra: support injective

* node/pkg/terra: update queryLatency metric

To show the query latency of fetching the latest block height from rpc
2022-07-14 13:41:31 -04:00
Csongor Kiss 9d74a80aa0
Optimise solana dockerfiles (#1334)
* solana/devnet_setup.sh: Build CLI instead of JITing it

This makes the registration process a few seconds faster.

* solana/Dockerfile: Don't copy devnet_setup.sh at the beginning

This is unnecessary, and inefficient, because each time the file
changes, a lot of things get rebuilt/reinstalled.

* solana/Dockerfile: cache cargo registry

this allows skipping rebuilding cargo dependencies. Small contract
changes now rebuild in 20s, down from 60s before

* Remove unnecessary debian depencies

* Rename rust-toolchain.toml to rust-toolchain (rustup in the container
  didn't recognise it with .toml extension) and use in containers
  instead of manually specifying rust version

* solana/Dockerfile: Use prebuilt docker image

* solana: Add docs on docker base images
2022-07-14 12:29:33 -05:00
kev1n-peters cbc92a9571
cloud_functions: terra2 support (#1349) 2022-07-14 12:27:12 -05:00
Evan Gray 061244dc17 sdk/js: publish separate wasm package 2022-07-13 10:04:23 -04:00
Evan Gray 37c20b547a sdk/js: publish separate proto packages 2022-07-13 10:04:23 -04:00
Evan Gray 76da871c6b bridge_ui: update readme 2022-07-13 10:04:23 -04:00
claudijd 8221708ef0 Move from ADD to COPY on Dockerfiles 2022-07-13 09:27:15 -04:00
Jonathan Claudius 73307397bc
Comment Eth Governance contracts (#1325)
* Comment Eth Governance contracts

* Tweak comments per peer review

* Add replay to the list
2022-07-12 09:02:26 -04:00
kev1n-peters c97a8f6f45
cloud_functions: tokenAllowlist implementation (#1339) 2022-07-11 12:56:30 -05:00
Csongor Kiss fb026f598d
CI: build foundry from source at pinned commit (#1348) 2022-07-11 17:24:01 +01:00
Csongor Kiss c634690fa4 ethereum: Update truffle config to most recent deploy params
Also rename chains to be in line with the naming convention used elsewhere
2022-07-11 11:38:31 -04:00
Jonathan Claudius 38a2aba318
Add unit tests for db (#1062)
* Add unit tests for db

* Fix error checks and clean up tempdirs

* Add string explainer in the absence of a panic

* Remove unnecessary comment

* Fix NoError suggestion

* Add linter exception for panic test
2022-07-11 11:36:32 -04:00
Csongor Kiss 9e52ce4c0d CI: build&publish latest guardiand docker image from dev.v2 2022-07-11 11:21:50 -04:00
Evan Gray 59fd0d36c7 node: optional chains in tilt 2022-07-11 10:35:00 -04:00
Kevin Peters 83499fcda0 devnet: Fix WETH token address 2022-07-08 09:48:42 -04:00
Csongor Kiss b067e41120
CI: pin foundry version (#1344)
The latest nightly broke the ugprade test, not yet sure how. For now,
just pin the older version
2022-07-08 14:19:07 +01:00
chase-45 850dd33ba4 added arg to algorand startup 2022-07-07 22:55:55 -04:00
Csongor Kiss 9b4ac93c0a
solana: fix network handling in verify script (#1340) 2022-07-07 07:21:33 +01:00
Jonathan Claudius ce87cb6a6e
Add Kudelski Security Audit Report (#1336)
* Add Kudelski Security Audit Report

* Reorder audit scopes for consistency

* Fix a typo in Neodyme audit bullet
2022-07-06 15:06:14 -04:00
Jonathan Claudius 0919f29dc3
Docker FROM image pinning (#1337)
* Add script to check docker pinning project wide

* Add workflow to run check-docker-pin

* Pin Docker image refs which were unpinned

* Add exceptions to the pin checking logic

* Fixes to check-docker-pin

* Clean up find command

* Bash optimizations

* Switch to env shebang

* Switch from find to git ls-files and add justification for ignore choices
2022-07-06 15:05:30 -04:00
Csongor Kiss f856240792
node: Prepare development binary release (#1332)
* node: Shrink final docker image size

* Tiltfile: guardiand should run the build stage

* node: allow building without -race

* node: Support development builds

A development build must use the --unsafeDevMode flag.

* CI: build docker image

Co-authored-by: Csongor Kiss <ckiss@jumptrading.com>
2022-07-06 19:27:49 +01:00
bruce-riley d7b7cefa99
Guardian support for Injective (#1327) 2022-07-06 10:19:57 -04:00
Csongor Kiss e8620ccea9 clients/js: Dump payload in case of parse failure 2022-07-05 19:24:58 +01:00
Csongor Kiss 3b6292af29 clients/js: touch up README a little
commit-id:429c7d93
2022-07-05 19:24:58 +01:00
Csongor Kiss b5997a10f0 scripts/devnet-consts: use native format for addresses
commit-id:c8c78ae8
2022-07-05 19:24:58 +01:00
Csongor Kiss 3a182ec6f6 CI: test CLI parser
commit-id:5f865212
2022-07-05 19:24:58 +01:00
Csongor Kiss fa3cec16f6 clients/js: Add support for NFT bridge transfers
commit-id:6b11415c
2022-07-05 19:24:58 +01:00