* 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
* 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
* 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
* 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
* 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
* 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>
* 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
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()
* 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.
* 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
* 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
* Use the cw sdk
* Fix clippy warnings
* Use Addr instead of String
* Format the code (cargo +nightly fmt)
* Depend on wormhole git instead of local dependency
* Add error enum
* refactor
* Refactor errors
* certusone->wormhole-foundation rename
It will fix some compile problems
* Build wormhole contract from their repo
* remove wormhole package
* Remove memmap2 patch
It was not needed anymore with the newer
verison of solana (wormhole removed it too)
* Rename pyth-bridge to pyth-cosmwasm
* pyth2wormhole: Implement reusable message PDAs
This changeset converts attest() to use a new PDA for
reusable/unreliable wormhole message account. Each PDA is tied to a
given attest() payer with an index that lets them rotate a number of
message accounts. Keeping the appropriate timing of the reuses is up
to the message owner, who should rotate a number of PDAs.
* pyth2wormhole-client: Add a message acc rotation impl
* p2w attest(): Integrate with bumped wormhole and fix call issues
* p2w-client: Format code, fix test_attest, refactor message index
* Dockerfile.client, Dockerfile.p2w-attest: Improve caching
The main improvement comes from running cargo-install from within a
workspace which lets us cache target/
* p2w-client: Make reusable messages configurable in yaml
* p2w on-chain: refactor to unreliable-only, adjust msg balance, nits
* p2w-client: P2WMessageIndex -> P2WMessageQueue, queue tests
* p2w-client: Add a hard limit to the message account queue
* Add out-of-tree dependency on wormhole v2.8.9
This lets us outsource all wormhole/solitaire code to the upstream
certusone repo
* Docker.client: Use cargo-install to install binaries from github
* p2w: fix solana-program wasm-bindgen
* pyth2wormhole: Fix code-level errors against newer solitaire
* p2w: Use upstream wormhole rust code, bump guardian to 2.8.9
* guardian: ensure solana is on, spy: bump image to 2.8.9
Co-authored-by: Reisen <reisen@morphism.org>
* Disable storage collision check on some migrations
Some changes after them have storage collision and this requires them to
disable it too
* Add new implementation memory layouts
* Update sdk version
* Update the contract according to the sdk changes
- Change some memory modifiers to improve gas efficiency
- Implement getValidTimePeriod() and remove old staleness logic
- Update the tests
* Update latest migration descriptions
* Add version
* Update Deploying.md
* Add test to validate version of the contract
* Add deploy commit hash
* Rename the placeholder
* Fix placeholder
This commit resolves a runtime problem in migrate() which occurred on devnet, as
well as invalid mutability for the old config and misuse of the
checked_sub() method.
The runtime problem came from a non-zero balance existing on
not-yet-used PDA. Effectively, this means permissionless
initialization of PDAs on Solana. Anyone can send lamports to any
account on Solana (existing or not), and it doesn't take much funds to
keep an empty account exempt. While it is possible to recover from it,
this case is relatively rare and takes a lot of code to
automate. Instead, we settle for a dumb bump of the config PDA
seed (see config.rs).
This measure is best used sparingly, as it imposes the same static
seed on all SOL networks. This will cause headaches if the attester
tooling grows a third-party user base.
* Set prev* to current* when price gets stale
* Add new solidity sdk
* Add migration files for this update
* rename diff to absDiff
Strangely, although you cannot use parent private method, you cannot
define a method with same name
* Add a comment to explain the prevPrice replacement
* Upgrade testnet contracts
And fixes some issues for it. Specially it uses
unsafeSkipStorage to skip OZ collision check
as they are very conservative and doesn't
cover our valid memory changes.
We should be very careful in memory
changes now that we cannot use
OZ collision check.
* Address Tom comments
* Implement the new IPyth events and methods
* Check contracts gets the fees in tests
* Fix the fee variable position to avoid conflict
* Add migration files.
* Add events to migration names and docs
* Fix pyth contract address in tests
Very strangely after adding migration steps the old address
used in evm relay became wormhole implementation address
I looked at eth-0/tests container logs and saw the
address is entirely different (before and after the change)
* Fix previous migration bug.
* rename instance to proxy to be more clear
* Update Deploying.md