Commit Graph

81 Commits

Author SHA1 Message Date
Ali Behjati 2c37465618
Add health probe (#107) 2022-03-24 11:32:56 +01:00
Ali Behjati 637d529918
Add fee estimate for terra relay (#112) 2022-03-23 15:29:32 +01:00
Ali Behjati 80f90d66fa
Remove unused components from wormhole (#108)
* Remove unused components from wormhole

Removes the following:
- explorer
- e2e
- bridge_ui
- algorand stuff (teal dockerfile and third_party/algorand)
- ci_tests (testing directory)  which are for JS/Bridge UI
2022-03-23 13:02:58 +01:00
Stan Drozd a27c71126f p2w-terra-relay: Admit loss against mkdir -p
commit-id:3abdb58d
2022-03-23 11:50:21 +01:00
Stan Drozd 9c533d583b Merge remote-tracking branch 'origin/dev.v2' into drozdziak1/p2w-relay-evm
commit-id:d5b1a04d
2022-03-23 11:25:27 +01:00
Stan Drozd 3eeda53356 Dockerfile.pyth_relay: Fix lockfile issue in ethereum
This commit fixes a lockfile issue resulting from newer NPM in our
container.

Specifically, our Dockerfile is pinned, relaxes Ethereum's
lockfile (npm ci -> npm install) and hardens our lockfile (npm install
-> npm ci)

commit-id:3381c8ec
2022-03-23 11:22:45 +01:00
Ali Behjati f07a223977
Remove dependency to wormhole sdk as path and cleanup wrong eth copies (#104) 2022-03-23 10:00:09 +01:00
Stan Drozd 5ec8cff437 p2w-terra-relay: EVM boilerplate
commit-id:8ad73ded
2022-03-22 17:58:06 +01:00
Stan Drozd c7008e1b46 Run formatter to trigger CI
commit-id:7c643d79
2022-03-22 15:39:09 +01:00
Stan Drozd 08358da4df p2w-terra-relay: apply review nits
commit-id:5034b061
2022-03-22 11:05:55 +01:00
Stan Drozd 53a73c5b67 Merge remote-tracking branch 'origin/dev.v2' into drozdziak1/p2w-relay-iface-integrate-terra
commit-id:0749da54
2022-03-22 10:19:35 +01:00
Stan Drozd 0ad479bcbb p2w-terra-relay: run formatter
commit-id:df311e23
2022-03-22 10:17:38 +01:00
Ali Behjati e601fdcfc9
Update worket to handle timeout in callback correctly (#97) 2022-03-21 18:36:08 +01:00
Stan Drozd c502ed3684 terra.ts: add missing return statement
commit-id:ba0365e6
2022-03-21 14:37:05 +01:00
Stan Drozd 1be4c84bad p2w-terra-relay: make worker.ts generic w.r.t. Relay interface
commit-id:5937a08c
2022-03-21 14:12:21 +01:00
Stan Drozd 0f445b3a75 p2w-terra-relay: apply review nits
commit-id:aec39c85
2022-03-18 13:36:45 +01:00
Stan Drozd c8e87063c9 Merge remote-tracking branch 'origin/dev.v2' into drozdziak1/p2w-terra-relay-iface-impl
commit-id:324eae28
2022-03-18 13:19:18 +01:00
Stan Drozd 67c7e34809 p2w-terra-relay: iface.ts review nits, naive impl for Terra
commit-id:0ecbfdd6
2022-03-17 15:49:57 +01:00
Stan Drozd d9cbde7255 p2w-terra-relay: ignore lib and node, own project dir in docker
commit-id:b084bc40
2022-03-17 15:07:02 +01:00
Ali Behjati 9ebcec4675
update p2w sdk to new pyth (#91)
* p2w-sdk/rust use pyth sdk solana v2
2022-03-17 10:49:51 +01:00
Stan Drozd 6916266fa7 p2w relay interface: remove config from Relay iface
commit-id:0359d886
2022-03-16 13:49:48 +01:00
Stan Drozd e852fc5d89 p2w-relay-iface -> p2w-relay-terra/src/relay/iface.ts
commit-id:ed9846e3
2022-03-16 13:47:03 +01:00
Stan Drozd 6058ec33d5 [WIP] p2w-relay-iface: Add NPM package with relayer interface PoC
commit-id:efcb9b34
2022-03-15 18:20:12 +01:00
Ali Behjati 6d682ab399
Rename twa to ema in terra relay (#85) 2022-03-14 15:48:53 +01:00
Ali Behjati f3858436f1
update p2w sdk to use ema instead of twa (#84) 2022-03-14 15:48:40 +01:00
Ali Behjati 3199015c7d
Abehjati/update p2w sdk to pyth sdk (#83)
* Make p2w-sdk use pyth-sdk
2022-03-14 12:36:12 +01:00
Ali Behjati 2efc93eba6
Support Batch Price attestation for terra relay (#75)
* Support Batch Price attestation for terra relay
2022-03-11 16:47:20 +01:00
Ali Behjati 6544e97c35
Fix pyth test publisher (#76)
* Fix test pyth publisher to actually publish price

- Uses newer pyth images and removes existing hacks for old versions. It essentially makes dockers cleaner.
- Also improve some adds in dockers to cache more efficiently
2022-03-11 08:49:27 +01:00
Eran Davidovich f34fae72bb
Merge pull request #78 from pyth-network/chore/p2w-attest-die
fix: p2w_autoattest don't die after initialization
2022-03-10 21:48:20 +02:00
Eran Davidovich cde9a1b77e hopefully this time. 2022-03-10 19:16:19 +02:00
Eran Davidovich 2039e1fe1e Remove bool test 2022-03-10 18:55:51 +02:00
Eran Davidovich f031c0a418 set P2W_EXIT_ON_ERROR default to True 2022-03-10 18:50:42 +02:00
Eran Davidovich 341560b440 add P2W_EXIT_ON_ERROR 2022-03-10 18:49:28 +02:00
Eran Davidovich f9b0d42a32 fix: p2w_autoattest don't die after initialization
also minimal formatting
2022-03-10 16:53:09 +02:00
Eran Davidovich d1d3ccd492 chore: p2w spy guarding improve Dockerfile 2022-03-10 16:49:26 +02:00
Ali Behjati 2a0a38ec32
Add solana feature flag for p2w sdk (#71) 2022-03-08 16:45:17 +01:00
Ali Behjati 3bb57de884
Use threadpool to set up price symbols (#69) 2022-03-08 13:25:28 +01:00
Ali Behjati f72caf0b56
p2w attester contract use p2w-sdk (#68)
* Make solana pyth2wormhole contract to use the sdk
2022-03-08 12:28:09 +01:00
Ali Behjati 643ab162d1
Make p2w-sdk js use p2w-sdk rust wasm bindings (#65)
* Make p2w-sdk js use p2w-sdk rust wasm bindings (instead of solana contract bindings)
- Removes `wasm.rs` in solana contract too.
2022-03-07 20:15:06 +01:00
Ali Behjati ca02edd7fc Update readme 2022-03-07 13:12:49 +00:00
Ali Behjati 8387c70fda Move terra relayer into the repo 2022-03-07 13:09:38 +00:00
Ali Behjati 3389acddf3 Add new line 2022-03-07 09:39:08 +00:00
Ali Behjati fa052ff355 Add emitter type and add wasm function for it
- It requires solitaire and it requires nightly rust
- No logic is applied, code is from p2w solana contract. (Eventually will be removed from there)
2022-03-07 09:36:19 +00:00
Ali Behjati 87d8b05c4e Add p2w sdk
It uses Pyth clients structs and cleans some of definitions for Pyth2Wormhole structures.
2022-03-07 09:09:31 +00:00
Ali Behjati 73f4391f54 Add newline to a file 2022-03-04 14:04:18 +00:00
Ali Behjati 247371cb7b Move js sdk on p2w-sdk to js folder
Also modifies other dependencies to correct path
2022-03-04 13:09:06 +00:00
Stanisław Drozd 2ea41b8176
[WIP] Pr/drozdziak1/p2w batching/5e704f8b (#877)
* ethereum: p2w contract -> p2w emitter, fill in essential envs

Change-Id: I6fa9364a96738d2cc02ec829a31fedba0586d8e8

commit-id:0a56f1f8

* Add p2w-relay, a p2w-sdk integration test

commit-id:6bfab639

* p2w-sdk: Expand README

Change-Id: I17cb547d6aaddc240588923561c26d11a787df2e

commit-id:6ebd6a22

* p2w-sdk: don't build ETH contracts, only the types

Change-Id: I7cbd18328227700635d7688aa24a9671e8919fcd

commit-id:adf079f7

* p2w: configurability and sane envs

commit-id:f10fd90e

* Solitaire: Implement Option<T> support in structs

commit-id:31aa12d6

* bridge/governance.rs: Stop pestering about EMITTER_ADDRESS

commit-id:d5bd7234

* p2w-attest: price batching

This commit introduces support for multiple Pyth product/price pairs
per call. The initial maximum batch size is 5 and is enforced using a
`P2W_MAX_BATCH_SIZE` constant.

solana/pyth2wormhole/program:
* On-chain batching logic
* Batch message parsing logic

solana/pyth2wormhole/client:
* Off-chain batching logic - divides any number of symbols into
largest possible batches
* Use a multi-symbol config file instead of CLI arguments

third_party/pyth/p2w-sdk:
* Expose batch parsing logic

third_party/pyth/p2w-relay:
* Comment out target chain calls until ETH contract supports batching
* Test the batch parsing function

third_party/pyth/p2w_autoattest.py:
* Generate and use the symbol config file  with pyth2wormhole-client

third_party/pyth/pyth_publisher.py:
* Add a configurable number of mock Pyth symbols
* Adjust HTTP endpoint for multiple symbols

commit-id:73787a61

* p2w-attest: mention attestation size in batch

This commit ensures that no matter the attestation format, a batch
will never contain attestations of different sizes. This guarantee
enables forward compatibility by adding new constant-size fields at
the end of a batch at all times. An older implementation will simply
not consume the remaining newer values while respecting the stated
batch member alignment.

commit-id:210da230

* pyth2wormhole-client: use fresh blockhashes, harden batch errors

This commit makes sure we don't have to deal with expired transactions
due to stale blockhashes. The problem existed with larger symbol
configs as well as on Solana mainnet. Additionally, the attestation logic
now treats transaction errors as non-critical - a failure for a batch
does not prevent attestation attempts for batches farther in the queue

commit-id:5e704f8b
2022-02-23 19:12:16 +01:00
Evan Gray 075defa634 feat: improve bridge_ui tilt
properly cache npm ci in Docker container image
support hotloading outside ci
2022-02-14 07:56:38 -05:00
jumpsiegel f90ed66ca0
Stub out algorand support in wormhole (#611)
* Stub out algorand support in wormhole

  1) Introduce the algorand chain constant in all the appropriate places
  2) Deploy pyth/hernandc algorand smart contracts into devnet
  3) Fund all the correct contracts for devnet testing

Change-Id: I6e4402b5b21223b32ea89653f8c7606f5c7f2843

* pr/jsiegel/algorand-v1: ALGORAND is not a EVM chain @ gusc1a-ossdev-jsl1

* pr/jsiegel/algorand-v1: fix lint @ gusc1a-ossdev-jsl1

* pr/jsiegel/algorand-v1: put the requirements into the image @ gusc1a-ossdev-jsl1

* jsiegel/algorand: make the watcher hang forever @ gusc1a-ossdev-jsl1

* jsiegel/algorand: comment these out @ gusc1a-ossdev-jsl1

* jsiegel/algorand: put this back in @ gusc1a-ossdev-jsl1

* jsiegel/algorand: fix guardian example @ gusc1a-ossdev-jsl1

* Generate teal source code

commit-id:a537a109

* jsiegel/algorand: it builds @ gusc1a-ossdev-jsl1

* pr/jsiegel/algorand-v1: add Dockerfile.teal @ gusc1a-ossdev-jsl1

* jsiegel/algorand: improve the dependencies @ gusc1a-ossdev-jsl1

* pr/jsiegel/algorand-v1: Fix up build @ gusc1a-ossdev-jsl1

* dead file

* pr/jsiegel/algorand-v1: remove more stuff @ gusc1a-ossdev-jsl1

* pr/jsiegel/algorand-v1: fix build @ gusc1a-ossdev-jsl1

* pr/jsiegel/algorand-v1: freeze the requirements @ gusc1a-ossdev-jsl1

* pr/jsiegel/algorand-v1: Fix teal to use pipenv @ gusc1a-ossdev-jsl1

* pr/jsiegel/algorand-v1: fix miss-merge @ gusc1a-ossdev-jsl1

Co-authored-by: Leo <leo@certus.one>
2021-12-22 11:22:04 -05:00
Leo e4802d42d7 devnet: add algorand sandnet
As far as I can tell, both primary and node are happy. We can't use
https://github.com/algorand/sandbox since it makes too many
assumptions about its environment (docker-compose, interactive
development vs. reproducible CI usage).

Instead, use the official mainnet Docker images and ship our own config.

Caveat: "goal network create" is not reproducible and each Docker
build will generate a new set of root keys. We can presumably avoid
this by hardcoding the output of "goal network create"
(using --noimportkeys to avoid having to vendor a SQLite DB.. we'd
just re-import them to kmd at runtime, which is what goal is doing
internally: f51d2d7d5a/netdeploy/networkTemplate.go (L131))

Change-Id: I8c99c6150c9c244c9f12b68a58184c2d5697cee8
2021-12-09 11:54:17 +00:00