Commit Graph

2013 Commits

Author SHA1 Message Date
Reisen 98db3eca10
[near] Fix governance inconsistencies. (#453)
* near: update governance inconsistencies
* near: add small script for automated testing
* near: address feedback and update tests
* near: cannot trust outcome(), use failure len
2023-01-13 16:20:32 +00:00
Ali Behjati 0e55d0808d
[price-service] Move to top (#474)
* Move price service to top

* Update the paths and docs

* A little cleanup
2023-01-13 16:26:43 +01:00
Daniel Chew ad864c697a
[price-service] add /get_vaa endpoint that serves cache and db vaas (#482)
* add /get_vaa endpoint that serves cache and db vaas

* update env vars

* fix precommit errors

* fix precommit errors

* rename removeExpiredValuesFromVaasCache to runCacheCleanupLoop

* move initialized envOrErr to constructor or func arg

* use setInterval

* update pyth-price-service env vars on tilt devnet

* use undefined instead of null

* use status code

* make web-api an env var

* update env var

* fix precommit

* fix precommit

* fix changes

* remove env vars from tilt-devnet

* address changes

* fix lint issues

* fix linting issues again

* bump package version

* remove unused imports
2023-01-13 16:08:27 +01:00
Daniel Chew 8b9682ccac
[xc-admin] setup frontend template (#480)
* add xc-admin-frontend template

* add more placeholder stuffs

* update placefolders

* fix precommit

* add package-lock.json

* address comments

* fix type

* add package-lock.json

* Fix CI (#483)

* fix ci

Co-authored-by: guibescos <59208140+guibescos@users.noreply.github.com>
2023-01-13 13:23:49 +09:00
guibescos bab75170f9
[xc-admin] Decoders can't throw (#486)
* Push code

* Format
2023-01-12 20:35:19 -06:00
guibescos 411ed32859
[xc-admin] Header becomes class (#484)
* Header becomes class 2

* Revert test

* Cleanup

* Cleanup
2023-01-12 13:36:06 -06:00
guibescos 31ab162168
[xc admin] Pyth parser (#477)
* Pyth parser

* Bump pyth-client-js
2023-01-12 11:53:20 -06:00
guibescos 8ef49e6128
[xc-admin] Refactor wormhole messages as classes (#478)
* Refactor wormhole messages as classes

* Type error

* Export ExecutePostedVaa

* Rename to UnknownGovernanceAction

* Improve interface
2023-01-12 11:47:56 -06:00
Ali Behjati fedb92e446
Remove unused components/projects (#481)
* Remove unused components/projects

* --amend
2023-01-12 13:52:43 +01:00
Dev Kalra e169da0a93
[cosmwasm] Deploy tool: Add new commands (update contract admin + get contract info) (#473)
* add terra local config

* terra update admin and contract info

* osmosis update admin and contract info

* update deployer interface

* injective update admin and contract info

* refactor yargs structure

* update injective sdk ts library

* update readme.md

* error handling for update admin code

* fix typo

* move logging to the calling function

* comment the update admin method
2023-01-12 18:06:37 +05:30
Ali Behjati 5da094f864
[xc-tool] remove (#475) 2023-01-12 09:35:56 +01:00
guibescos 5641008356
Fix constructor for multisig transaction (#476) 2023-01-11 13:06:42 -06:00
guibescos d1f5e5955a
xc-admin/MultisigParser for wormhole instructions (#470)
* Checkpoint

* Refactor

* Unrecognized instruction -> unrecognized program

* Shorten tests

* Rename test

* Rename WormholeInstruction to WormholeMultisigInstruction

* Refactor into constructor and builder method

* Rename file
2023-01-11 12:50:22 -06:00
Jayant Krishnamurthy 7c2e02ea0b
[price-service] Document the spy filters in .env.sample (#472)
* document the filters

* better doc

Co-authored-by: Jayant Krishnamurthy <jkrishnamurthy@jumptrading.com>
2023-01-11 18:58:33 +01:00
guibescos 92c17ad7cc
Xc admin/change error handling (#471)
* Switch from undefined to not undefined

* Update tests
2023-01-11 09:01:37 -06:00
guibescos 80fe230563
Xc admin/add executor (#466)
* Add encoder

* Update test

* Cleanup

* More cleanup

* Add executor

* Update comment

* Update package lock

* Cleanup

* Fix bug and error handling
2023-01-10 14:02:14 -06:00
guibescos 1153abe6ff
[xc-admin] Start cli and add accept transfer for upgrade authorities (#467)
* Checkpoint

* Add global options
2023-01-10 12:53:57 -06:00
Dev Kalra 670fc23d2f
Osmosis deployment code (#469)
* Osmosis deployment code

* extract out pyth sources
2023-01-10 21:33:37 +05:30
guibescos 3d8638ab3c
[xc-admin] fix instructions indexes (#468)
* Fix bug

* Remove console

* Revert change
2023-01-10 08:32:36 -06:00
Dev Kalra 627edaa62a
Injective deployment code (#465)
* make it all typescript

* what the hell

* injective - store, instantiate, and migrate works

* terra, injective refactored

* update compiler in build.sh

* update package.json

* deploy.ts

* pre-commit run

* replace helper functions call with actual call

* correct case of RaiseCLError

* update deployer factory to take in config

* add comment to gas for injective store code

* extract raw log logic

* remove comment from injective config

* update deploy script for tilt

Co-authored-by: Jayant Krishnamurthy <jkrishnamurthy@jumptrading.com>
2023-01-10 15:45:35 +05:30
guibescos 2a961d5853
Xc admin/propose instructions (#463)
* Add encoder

* Checkpoint

* Refactor

* Cleanup

* Add comment

* Cleanup
2023-01-09 21:46:03 -06:00
guibescos 097943f657
[xc-admin] Add encoder for governance messages (#462)
* Add encoder

* Cleanup

* Update test

* Ci

* CI

* Cleanup

* More cleanup
2023-01-09 15:54:54 -06:00
guibescos 5efa611a97
Xc admin/add wormhole message header deser (#461)
* Checkpoint

* Checkpoint

* Fix tests

* Revert changes to remote executor

* Fix precommit

* Add comments

* Solve typo

* MetaData -> Metadata

* Address feedback

* Fix imports
2023-01-06 14:47:30 -06:00
guibescos e12567c544
Move rust-toolchain (#460)
* Move rust-toolchain

* update tilt

* Make CI run everytime

* Revert "Make CI run everytime"

This reverts commit e5b008a83728a4ae996b00d2697ee0742bca5682.
2023-01-06 09:35:26 -06:00
guibescos 6e1328f98e
Scaffolding for xc-admin (new crosschain admin tool) (#457)
* First commit

* Add typescript

* Add tsconfig
2023-01-06 08:41:11 -06:00
Stanisław Drozd 2a0350bb5f
attester-image-push: Fix container tag naming (#456) 2023-01-05 16:59:01 +01:00
Stanisław Drozd 682e97c61c
pyth-wormhole-attester: v1.3.1, use different manual buckets (#452)
* pyth-wormhole-attester: v1.3.1, use different manual buckets

* Update description in metric registration
2023-01-05 15:45:30 +01:00
Stanisław Drozd 0a93d47391
wormhole-attester: port the v1.3.0 healthcheck hotfix (#454)
* wormhole-attester: port the v1.3.0 healthcheck hotfix

This PR fixes a missing assignment to HealthCheckState's enable
flag. This would cause the attester to ignore all settings (including
defaults) and keep the enable flag set to false because we would never
bother setting it from attestation_cfg that came at runtime.

The bug is fixed and the healthcheck behavior is hardened. Currently,
the lazy_static block will explicitly initialize the global with
default values from attestation_cfg (enable is true, window size is
100). This prevents a similar human error from disabling the
healthcheck. Secondly, main.rs overwrites the default values using the
HealthCheckState::new() constructor, instead of individual struct
member assignments. This ensures that all necessary values or their
defaults are passed as the desired healthcheck state.

* p2w_autoattest.py: Get debug output from first attestation

* wormhole-attester: fix ()-less function bug, harden usize convertion

This change fixes a bug that would cause a gigantic allocation to
happen, after the attestation_cfg::default_healthcheck_window_size
function is taken without being called and converted to a very large
usize value. This would result in a big allocation which would crash
the attester. At the core it's a misunderstanding about "Fn() as
usize" conversion which unfortunately is safe Rust.

* Trigger build

* wormhole-attester: Fix a misuse of a mutex guard

This commit changes the `let hc = <lock the mutex>` into a direct
assignment to the locked mutex guard. Rust mutices are typically
scope-based which makes using them in variables more error prone.

* Dockerfile.client: Remove unused ADD wormhole-attester.

This speeds up the build of the container, and prevents useless
triggers from the attester codebase

* p2w_autoattest.py: simplify log filtering to just info
2023-01-05 15:27:15 +01:00
Stanisław Drozd 01c4661985
Repo structure refactor (#449)
* Repo structure refactor

This change introduces major codebase layout changes in three areas:
* Tilt devnet lives in tilt-devnet/ - all k8s and docker files,
scripts, local testing private keys are moved to this directory.
* pyth2wormhole becomes pyth-wormhole-attester and is relocated to
wormhole-attester/ - This long-needed rename will hopefully eradicate
most of the confusing naming around the attester. The Rust client binary
becomes pyth-wormhole-attester-client.
* Target-chain code lives in target-chain/ - This leaves just the
attester, third_party and pythnet-specific things at top-level.

Other opportunistic changes:
* Fixed rebuild trigger for Dockerfile.wasm

These items are a fraction of the necessary structure changes in the repo.

* cosmwasm: fix contract after faulty merge

* .github: remove unused dependabot config

* Fix path references in .github and .pre-commit-config.yml

* .github: Rename attester references to pyth-wormhole-attester

* .pre-commit-config.yaml: fix paths and run all commit hooks

* p2w-relay: Fix faulty merge resolution in favor of origin/main

* Dockerfile.pyth_relay: Fix Ethereum path reference

* Dockerfile.solana: Trip early cache with arbitrary change

* Dockerfile.pyth_relay: typo

* p2w-relay: fix evm build in npm script

* Dockerfile.solana: Retry invalidating cache again

* near -> target-chains/near

* wormhole-attester: bump on/off-chain major versions due to rename

Attester packages were renamed. This possibly breaks most dependees.

* Dockerfile.solana: Improve decoy-crate to have a real lib target

* .github/[...]/pyth-cosmwasm-contract.yml: typo

* rust-toolchain: Bump rust to stable 1.63

* rust-toolchain: use christmas nightly

* empty commit to trigger build

* attester-image-push.yaml: keep xc-attest image name intact

* multisig-wh-message-builder: remove accidental revert
2023-01-04 14:46:42 +01:00
Ali Behjati 3b5c159e0b
Add zksync deployment files (#450) 2023-01-03 17:40:17 +01:00
Reisen c92329c7c4
[near] Add receiver contract (#407)
near: add initial near receiver
2023-01-02 14:33:46 +00:00
Daniel Chew 378e99b345
add binary query string to /latest_price_feeds (#445)
* add binary query string to /latest_price_feeds

* fix precommit

* fix both rest and ws tests

* bump package version

* fix tests to use the latest schema
2023-01-02 17:38:52 +09:00
Jayant Krishnamurthy cdf99f4c60
Upgrade contract & fix deployment script (#447)
* merge

* stuff

* gr

* config

* config

* config

* config

* config

* config

* config

* cleanup

* add commands

* cleaunp

* fix

* use u64

Co-authored-by: Jayant Krishnamurthy <jkrishnamurthy@jumptrading.com>
Co-authored-by: Jayant Krishnamurthy <jayant@jumpcrypto.com>
2022-12-30 07:36:55 -08:00
Jayant Krishnamurthy 6833f41424
[cosmos] Require governance instruction bytes to be completely consumed (#448)
* add test

* fix  build

Co-authored-by: Jayant Krishnamurthy <jkrishnamurthy@jumptrading.com>
2022-12-29 12:04:50 -08:00
Jayant Krishnamurthy 695b096bb8
[cosmos] Misc code cleanup (#446)
* cleanup some stuff

* store things as Coin

* fix ci

* cleanup

* fix

Co-authored-by: Jayant Krishnamurthy <jkrishnamurthy@jumptrading.com>
2022-12-29 07:01:19 -08:00
Jayant Krishnamurthy 9c79ab8862
[cosmos] Implement the other governance instructions (#442)
* initial commit for governance instructions

* merge

* docs

* update deployment code

Co-authored-by: Jayant Krishnamurthy <jkrishnamurthy@jumptrading.com>
2022-12-29 06:02:43 -08:00
Daniel Chew 9ac61742c3
add binary option to subscribe to binary vaas (#444)
* add binary option to subscrube to binary vaas

* change property name

* combine verbosity and binary to a single config

* add tests
2022-12-29 18:35:12 +09:00
Jayant Krishnamurthy 6b07ae607c
Add query methods to cosmwasm contract (#441)
* implement query operations

* more governance

* revert

* update the terra sdk?

* wtf

* fix ci

* add tests

Co-authored-by: Jayant Krishnamurthy <jkrishnamurthy@jumptrading.com>
2022-12-27 09:59:48 -08:00
guibescos bddcb69351
[multisig-cli] Refactor check that multisig vault already exists (#437)
* Refactor check that multisig vault already exists

* [Multisig] add transfer auth to multisig (#439)

* Checkpoint

* Cleanup

* Revert "[Multisig] add transfer auth to multisig (#439)" (#440)

This reverts commit 5fcbb4ca1f071f9da98946aededc2174f3e917bb.
2022-12-21 17:26:33 +01:00
Ali Behjati 04d8a468ac
[eth] Improve docs and repo (#438)
* Remove .openzeppelin and its docs

This directory is no longer useful as we are not using truffle for
upgrades anymore.

* Update Deploying.md doc according to the feedbacks

* Add *mnemonic* to gitignore to avoid mistakes
2022-12-21 14:16:28 +01:00
Daniel Chew 2efd512d36
[eth] Deploy to arbitrum-testnet (#436)
* add arbitrum-testnet contract

* Fix format issues

Co-authored-by: Ali Behjati <bahjatia@gmail.com>
2022-12-20 19:02:59 +01:00
Stanisław Drozd afd4a8be91
wormhole-attester: Add a histogram metric for tx processing duration (#434)
This adds buckets between 16ms and 65.536 seconds. In tilt, most
attestation txs fall between 256 and 1024 milliseconds.
2022-12-20 11:53:51 +01:00
Ali Behjati 54846061dd
[price-service] Update docs + compose-file (#432)
* [price-service] Update docs + compose-file

* Address reviews

* Fix pre-commit issues
2022-12-20 10:08:06 +01:00
Thomaz Leite 3da1e86d56
Update README.md (#435) 2022-12-19 18:02:07 +00:00
Jayant Krishnamurthy 6b29d9704a
[cosmos] Pay fee + mock wormhole for testing (#433)
* added handler

* create binary for vaas

* updating tests

* add fee test

* blah

* simplify

* simplify

* cleanup5

* Add fees to the terra relayer

Co-authored-by: Jayant Krishnamurthy <jkrishnamurthy@jumptrading.com>
Co-authored-by: Ali Behjati <bahjatia@gmail.com>
2022-12-19 06:44:57 -08:00
guibescos f6ad2d6544
Refactor (#431) 2022-12-19 13:20:32 +01:00
Stanisław Drozd d517f11af0
[wormhole-attester] Add a healthcheck on the metrics port (#429)
* wormhole attester: Add a healthcheck on the metrics port

* pyth2wormhole healthcheck: apply review advice

- Move metrics/healthcheck counter updates to be next to each other
- Change "0-sized window disables healthcheck" into an explicit config value
- move healthcheck updates past the atomic counter updates
2022-12-15 18:29:23 +01:00
guibescos 51754457a6
[multisig-cli] Add support for json (#430)
* Draft

* Add verify for instruction payload

* Typos

* Refactor json parsing
2022-12-15 21:45:58 +08:00
guibescos e484f5cbb7
Check duplicates (#427)
* Check duplicates

* Cleanup

* Multisig/refactor wormhole to avoid many rpc calls (#428)

* Refactor wormhole

* Fix wasm bug

* hasWormholePayload becomes sync
2022-12-15 01:38:13 +08:00
Ali Behjati 09f8af74ed
[eth] Complete syncPythState.js (#425) 2022-12-13 17:54:15 +01:00