Commit Graph

1865 Commits

Author SHA1 Message Date
Guillermo Bescos Alapont 1d4b88b3e8 Merge branch 'guibescos/executor-rust-tests-2' into guibescos/executor-rust-tests-3 2022-09-22 00:47:25 -05:00
Guillermo Bescos Alapont eb1a80306d Lib from the other branch: 2022-09-22 00:47:16 -05:00
Guillermo Bescos Alapont 78bb4af6d4 Better comment 2022-09-22 00:45:46 -05:00
Guillermo Bescos Alapont 83a8a12b29 Improve comments 2022-09-22 00:38:09 -05:00
Guillermo Bescos Alapont 6b9995e792 Typo 2022-09-22 00:37:05 -05:00
Guillermo Bescos Alapont b3ef1b8e57 Better comments 2022-09-22 00:36:36 -05:00
Guillermo Bescos Alapont 1b8bc37ca4 Restore deny warnings 2022-09-22 00:33:45 -05:00
Guillermo Bescos Alapont dad0c344f9 Fix comment 2022-09-22 00:33:08 -05:00
Guillermo Bescos Alapont 699f2c49be Merge branch 'main' into guibescos/executor-rust-tests-2 2022-09-22 00:32:19 -05:00
Guillermo Bescos Alapont c17f4521e6 Tests 2022-09-22 00:29:31 -05:00
Guillermo Bescos Alapont 9e60825373 Move anchor checks 2022-09-22 00:28:00 -05:00
Ali Behjati 77083cf760
Attestation: Add ops owner and set-is-active ix (#295)
* Attestation: Add ops owner and set-is-active ix

* Update solana/pyth2wormhole/client/src/cli.rs

Co-authored-by: Stanisław Drozd <stan@nexantic.com>

* Fix typos

* Add a test without owner

Co-authored-by: Stanisław Drozd <stan@nexantic.com>
2022-09-21 21:14:23 +02:00
Jayant Krishnamurthy bf032f07c2
Delete one more noisy log message (#296)
Co-authored-by: Jayant Krishnamurthy <jkrishnamurthy@jumptrading.com>
2022-09-21 11:24:14 -07:00
Jayant Krishnamurthy 71a6ae687e
Make this log message less noisy (#285)
* make this log message less noisy

* build

Co-authored-by: Jayant Krishnamurthy <jkrishnamurthy@jumptrading.com>
2022-09-21 11:06:13 -07:00
guibescos c32f2d99b9
Setting up rust tests (#292)
* Add tests

* Add tests to CI

* Remote test from precommit hook

* New test

* Remove merge error

* Comments and increase seqno

* Remove unnecesary dep

* Fix rebase

* Fix feedback
2022-09-21 12:51:57 -05:00
Guillermo Bescos Alapont 777daba054 Fix feedback 2022-09-21 12:00:49 -05:00
Guillermo Bescos Alapont 2fd98ffc51 Fix rebase 2022-09-21 11:52:51 -05:00
Guillermo Bescos Alapont 05d714420d Remove unnecesary dep 2022-09-21 11:50:01 -05:00
Guillermo Bescos Alapont e4c34c6d32 Comments and increase seqno 2022-09-21 11:50:01 -05:00
Guillermo Bescos Alapont 8af57a0ce5 Remove merge error 2022-09-21 11:50:01 -05:00
Guillermo Bescos Alapont 56a583b86d New test 2022-09-21 11:50:01 -05:00
Guillermo Bescos Alapont c0b5dca467 Remote test from precommit hook 2022-09-21 11:50:01 -05:00
Guillermo Bescos Alapont 68faf975dc Add tests to CI 2022-09-21 11:50:01 -05:00
Guillermo Bescos Alapont 4d87a79f38 Add tests 2022-09-21 11:50:01 -05:00
guibescos 1ad419e0ba
Guibescos/executor deser test (#290)
* Add tests

* Add tests to CI

* Remote test from precommit hook
2022-09-21 10:11:14 -05:00
Stanisław Drozd fdafbe32a4
Drozdziak1/p2w client use mapping crawl (#294)
* p2w-client: Add attestation config merging logic

This change adds code to append new symbols to an existing attestation
config. In conjunction with the mapping crawling logic, this will aid
in hot reloading attestation configs in runtime

* pyth2wormhole-client: Use the crawled mapping symbols
2022-09-21 16:49:37 +02:00
Ali Behjati 44111714f9
Add new contract memory layout (#293) 2022-09-21 15:00:44 +02:00
Stanisław Drozd 163fa44f24
Drozdziak1/p2w client mapping crawl (#286)
* pyth2wormhole-client: Add a mapping crawling routine

* pyth2wormhole-client: Add mapping_addr for attestation config

* pyth2wormhole-client: cargo fmt
2022-09-21 10:38:17 +02:00
guibescos 48a5902cb0
Boolinator (#288)
* Start anchor program

* pythnet folder

* Renames

* Implement processor

* Comments

* More comments

* Bump anchor

* Use new version of the wormhole package

* Get Solana chain id from wormhole core

* Pythnet bridge address

* Remove comment

* Fix borsh headers

* Format

* Fix precommit

* Fix precommit

* Precommit

* Add to CI

* Fix CI

* Use boolinator

* Enable boolinator

* Remove duplicate macro
2022-09-20 16:01:24 -05:00
guibescos e7b9c883ff
Feature flag for bridge address (#289)
* Feature flag for bridge address

* Feature flag for bridge address
2022-09-20 15:20:18 -05:00
guibescos c367812fe4
Format and lint executor (#287)
* Start anchor program

* pythnet folder

* Renames

* Implement processor

* Comments

* More comments

* Bump anchor

* Use new version of the wormhole package

* Get Solana chain id from wormhole core

* Pythnet bridge address

* Remove comment

* Fix borsh headers

* Format

* Fix precommit

* Fix precommit

* Precommit

* Add to CI

* Fix CI
2022-09-20 13:55:01 -05:00
guibescos d20099a3c6
Guibescos/executor (#283)
* Start anchor program

* pythnet folder

* Renames

* Implement processor

* Comments

* More comments

* Bump anchor

* Use new version of the wormhole package

* Get Solana chain id from wormhole core

* Pythnet bridge address

* Remove comment

* Fix borsh headers
2022-09-20 11:33:55 -05:00
Ali Behjati 2ad991f4ab
Abehjati/add-eth-governance (#279)
Also add governance-sdk-js to generate messages (both in testing and in multisig)
2022-09-20 18:24:57 +02:00
Ali Behjati b86a9d1b38
Use hex payload instead of string (#284) 2022-09-19 15:38:49 +02:00
guibescos f4cf96bd1f
Start anchor program (#282)
* Start anchor program

* pythnet folder

* Renames
2022-09-16 13:15:24 -05:00
Jayant Krishnamurthy bfb3b7bab3
Move staleness check to new endpoint (#278)
* move staleness to new endpoint

* actually send the response

* Add schema

* Fix freshness metric to use publish time instead of attestation Time

* Rename endpoint to /api/ + small fix

* Bump version

Co-authored-by: Jayant Krishnamurthy <jkrishnamurthy@jumptrading.com>
Co-authored-by: Ali Behjati <bahjatia@gmail.com>
2022-09-14 19:57:38 +02:00
Daniel Chew f3e17ad307
add ledger support (#277)
* add ledger support

* address feedbacks
2022-09-15 01:26:39 +08:00
Daniel Chew 1c6977ec96
add pyth multisig cli program (#276) 2022-09-14 10:36:52 +08:00
Daniel Chew 8c0e9b6e2e
add new freshness check to price-service /ready endpoint (#275) 2022-09-12 15:57:45 +08:00
Ali Behjati 05c631b022
Add mainnet networks (#274) 2022-09-10 08:35:07 +02:00
Daniel Chew 303385bfbd
enable verbose property to return metadata for ws endpoint (#271)
* enable verbose property to return metadata for ws endpoint

* remove console log

* fix test cases failing

* fix spelling errors

* update callback and listener to use PriceInfo

* isolate verbose flag to each client and add tests

* isolate verbose flag from clients
2022-09-07 23:27:44 +08:00
Ali Behjati bd90203cdf
Fix a bug in the id of price attestation (#273) 2022-09-07 14:57:15 +02:00
Ali Behjati dd3f5a57ee
Abehjati/fix-deployment-bugs (#272)
* Fix migration files

* Use another rpc endpoint for bnb

* Fix the bogus commit hash replacement instruction

* Use a more clear placeholder
2022-09-07 12:00:18 +02:00
Stanisław Drozd 15f3175f91
p2w: Make commitment usage consistent (#270)
This changeset adjusts p2w_autoattest.py commitment to confirmed and
fixes a get_transaction() failure that happened due to the upstream
default finalized commitment setting (RpcClient's set value is not
used). This is fixed by using the chosen commitment explicitly via
get_transaction_with_config()
2022-09-06 16:21:02 +02:00
Stanisław Drozd 94aab8af8f
Drozdziak1/p2w init rent adjustment (#269)
* pyth2wormhole: add rent adjustment to the initialize() instruction

* pyth2wormhole migrate(): Leave a note about rent adjustment

The migrate() ix won't be called in the nearest future - it does not
make sense to bloat the program bytecode with the rent adjustment. The
note describes the what and why in detail.
2022-09-06 16:06:07 +02:00
Ali Behjati 65c273fa0a
Add pythnet migration files (#246)
* Add pythnet migration files

Also:
- Add related env vars for testnet networks. Mainnet ones to be added
when it's ready.
- Rename Pyth2Wormhole env vars to solana

* Add mainnet emitter

* Fix migration file numbers

* Address Jayant comments
2022-09-06 13:03:21 +02:00
Daniel Chew b846fc3c84
add new latest_price_info endpoint (#264)
* add new latest_price_info endpoint

* add verbose query param to latest_price_feeds

* add back logging statement for VAA

* trigger CI
2022-09-06 00:02:57 +08:00
Stanisław Drozd aa7be4d1be
Drozdziak1/p2w client error logging and docker caching (#268)
* p2w-client: Fix silent logs, restore program log printing

For some time now, p2w-client error reporting would fail to show
daemon mode errors. The logs would only mention resends without ever
showing failed attempts.

with solana-program 1.10.31 came a newer, inferior program log
reporting which only says "N program logs" instead of saying what they
are. This changeset prints errors verbatim using formatted debug
"{:#?}" syntax.

* Docker: Improve p2w-attest/solana-devnet caching

This commit speeds up caching in two ways:

1. By severing the dependency on bridge-client in
Dockerfile.p2w-attest - mainly because of unnecessary `cargo install`
builds which even with target dir caching can take ~1 minute. The
bridge/token-bridge client binaries are not useful to p2w-client anyway.

2. By attaching cargo-install commands to a target dir cache via the
--target-dir option in cargo
2022-09-05 17:00:24 +02:00
Ali Behjati 5c48dacee0
Hack the rent exempt bug (#265)
* Hack the rent exempt bug

* Fix compile bug

* Fix account resize potential problem

* Use invoke transfer instead of playing with lamports
2022-09-05 13:32:41 +02:00
Ali Behjati 19e34f5c00
Fix bugs related to P2WMessage being owned by wormhole (#266)
* Fix caused by wormhole owning P2WMessage

* Refactor the code

* Comment the integration test

It seems that solana test suite has bug,
An error occurs after tx is finished successfully. Also,
it appears as a segfault for Reisen.

* Add more comments

* Add manual check for seeds

* Add more comments

* minor comment change

* Improve comments
2022-09-05 12:36:59 +02:00