Commit Graph

79 Commits

Author SHA1 Message Date
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
Stan Drozd 05edb3d14f pyth2wormhole: rename p2w-client service to p2w-attest
Change-Id: I34a53146919c12ab41b958cc8cd57108ee509faa
2021-11-15 15:22:29 +00:00
Stan Drozd 19c475e4a6 pyth2wormhole: share pending attestation information over HTTP
Change-Id: I585392f995f3d32b5e8152c08c79a012091c36ed
2021-11-15 15:22:29 +00:00
Stan Drozd 3e96438f4e pyth2wormhole: initial SDK skeleton
Change-Id: I8697ced892a1bf69f948c9743741d32a442a402f
2021-09-16 13:15:13 +00:00
Stan Drozd f24f86adf5 pyth2wormhole-client: Run an automated attestation script in Tilt
Change-Id: Id2e6def6c246862601a206084867c5f1b26a6673
2021-09-09 17:24:32 +02:00
Stan Drozd a97a34e174 Add a test pyth instance
Change-Id: Ifa5b50fb80f01f386fc8079eec3a0564df8072e1
2021-08-18 12:54:11 +02:00