Commit Graph

31 Commits

Author SHA1 Message Date
Reisen ba435bac76 refactor(fortuna): re-organize in monorepo 2024-04-17 15:21:57 +01:00
Reisen 45065e2851 refactor(hermes): re-organize in monorepo 2024-04-15 15:12:13 +01:00
Ali Behjati 9416a8b586
chore(hermes): small improvements to add tests in CI and more (#1393)
* fix(hermes): fix a broken test

* refactor(hermes): add clippy to pre-commit

* feat(hermes): add ci for tests

* chore(hermes): remove legacy go footprint

* fix: add protoc action for ci

* chore: rebase on top of main

* fix: use right rust version for the Dockerfile

* fix: fix precommit ci
2024-03-27 13:55:26 +01:00
Anirudh Suresh e394f56468
fix: precommit fixes (#1377)
* config pre-commit

* poetry auto install in pre commit

---------

Co-authored-by: ani <ani@Anirudhs-MBP.cable.rcn.com>
2024-03-21 11:42:31 -04:00
Anirudh Suresh 92566736da
Express relay python searcher (#1319)
* move js searcher sdk

* add the python searcher sdk

* remove pycache

* create class for simple searcher

* add websocket to python searcher sdk

* finish ws, avoid storing liquidation opportunities within client

* python scripts now working w auto type generation

* minor precommit changes

* address comments 1

* add openapi type generations

* fixed precommit issues on generated type files

* reorg

* fixed openapi_client generated precommit

* fix js filepath issue

* added close ws

* renamings and add send_ws_message method

* get rid of duplicate error parsing

* cleanup

* set up pypi workflow

* address comments

* add python precommit

* changes + precommit changes

* test precommit change

* test precommit change

* test precommit change

* test precommit change

* test precommit change

* test precommit change

* test precommit change

* test precommit change

* test precommit change

* correct directory for poetry in pypi wf

* remove isort

* rename package

* add UUID and some cleanup

* new openapi typings

* add pydantic to pyproj

* more changes

* precommit

* remove extraneous files, stick w actual_instance

* added back http as nondefault

* correction

* some cleanup and reorg

* minor changes

* add back api response typing file

* minorer changes

* exclude openapi_client from end of file fixer

* build internal models via pydantic

* chgs

* start to reorg classes

* configure precommit to work

* some cleanup

* reorg a bit

* address comments

* chgs

* fgt

* morechgs

* some more chgs

---------

Co-authored-by: ani <ani@Anirudhs-MacBook-Pro.local>
Co-authored-by: ani <ani@Anirudhs-MBP.cable.rcn.com>
2024-03-15 15:08:48 -04:00
guibescos 6c45ed81ad
Fix pythnet-sdk ci (#1213)
* Fix CI

* Does this work?
2024-01-08 18:09:31 +00:00
guibescos a60279a2cc
[solana-receiver] Post price update (#1189)
* Do it

* Remove keypairs

* add check comment

* Works

* Cleanup deps

* Next

* Add better docs
2023-12-18 11:46:45 +07:00
swimricky 8202181a1b
Solana receiver decode vaa accumulator (#1145)
* feat: impl postAccumulatorUpdateVaa and postUpdates and CLI test changes

* feat: clean up

* refactor: reorganize and fix tests

* refactor: clean up

* chore: add rust-toolchain for solana target contract dir

* refactor: clean up and address feedback

* refactor: make emitter chain & post vaa program configurable

* feat: remove postAccUpdateVaa and use wh post_vaa in cli

* fix: add check for emitter address, hardcode expected emitter chain/addr for now

* chore: cleanup

* chore: clean up

* feat: address feedback, move checks from context into account, use signatureset for postupdates

* feat: use pubkey and require_keys_eq! for emitter addr check

* refactor: address feedback

add documentation and todos, revert programsimulator to use upgradable bpf loader

* feat: remove signature_set account from post_updates, update docs & readme

* test: add lazy static for setting up pyth binary but still has same invalidaccountdata issue

* chore: clean up

* refactor: remove unused errors

* feat: use UncheckedAccount for posted_vaa so owner can be checked dynamically against config
2023-11-30 16:04:41 -05:00
Jayant Krishnamurthy d87cd7c5fd
Rename pyth-rng to Fortuna (#1119) 2023-10-20 09:41:05 -07:00
Jayant Krishnamurthy 76a337971e
Initial version of random number server (#1103)
* feat(pyth-rng): first draft of pyth-rng

* adding api

* ok that wasnt so bad

* minor stuff

* add command to get current request

* refactor config

* refactor

* refactor

* ok

* ok

* it works

* blah

* stuff

* stuff

* builds

* builds

* ok it works

* more stuff

* cleanup

* ok stuff

* format

* docs

* ali comments

* correct fee

* warnings

---------

Co-authored-by: Reisen <reisen@morphism.org>
2023-10-18 14:35:25 -07:00
Ali Behjati 5f11c3d042 fix(hermes): fix rust version 2023-07-27 18:31:42 +03:30
Ali Behjati 404bc6cb81
[ci] Fix pre-commit (#857)
* Update pre-commit

* Update CI rust
2023-06-06 13:15:32 +02:00
Reisen 5ee1f20e73
[pythnet] Update serialization for MerkelPath/MerkleAccumulator (#830)
* feat: update serialization for MerkelPath/MerkleAccumulator

* Fix incorrect variable name.
2023-05-22 18:31:54 +01:00
swimricky 2e32a22725
[message-buffer 13/x] Rust Integration Tests (#794)
* test(message-buffer): add rust integration tests

add rust-toolchain.toml to pin rust version, add integration tests, update cpi caller auth seeds

* refactor(message-buffer): remove unused test ix

* chore(message-buffer): clean up

* refactor(message-buffer): simple refactor

* test(message-buffer): refactor integration test structure

* refactor(message-buffer): rename

* fix(message-buffer): fix min size check when shrinking msg buffer

* chore(message-buffer): cleanup

* fix(message-buffer): resize borrow bug fix

* test(message-buffer): refactor test util methods into MessageBufferTestContext for less duplication

* test(message-buffer): resolve merge conflicts from repo restructure

* chore(message-buffer): delete commented out code
2023-05-09 13:57:55 -04:00
Reisen 677343c339
pythnet: move `pyth/` from pythnet and colocate other pythnet libs (#802) 2023-05-04 18:47:35 +01:00
swimricky 794bd84c6f
[message-buffer 10/X] - Message Buffer Admin IXs & variable length (#779)
* ok

* ok

* it runs

* add this stuff

* working on tests

* feat(message-buffer): finish create_buffer ix, update put_all

* feat: rename bufferheader to messageBuffer, add delete_buffer impl

* feat(message-buffer): remove unused code, add additional checks, update unit tests

* style(message-buffer): fix pre-commit, run fmt & clippy

* fix(message-buffer): add verification checks, fix ts test

* refactor(message-buffer): rename update_whitelist_authority to admin

* fix(message-buffer): address PR comments

---------

Co-authored-by: Jayant Krishnamurthy <jayantkrishnamurthy@gmail.com>
2023-04-25 08:45:16 -07:00
swimricky 6a5b1c434a
[message-buffer 9/X] - Rename "accumulator" to message (#777)
* refactor(message-buffer): rename accumulator-input to message-buffer

refactor any names with accumulator to message

* refactor(message-buffer): change accumulator seed to message
2023-04-21 11:56:51 -07:00
Jayant Krishnamurthy 843a30c2c7
[solana] Add pre-commit for solana target chain contract (#753)
* precommit

* format
2023-04-09 19:38:29 -07:00
Ali Behjati 1af86140f1
[hermes] Add basic structure for price store and rpc (#717)
Co-authored-by: Reisen <Reisen@users.noreply.github.com>
2023-03-30 14:27:02 +02:00
swimricky 49d150acc2
Accumulator Updater Program (#712)
* feat(accumulator_updater): initial skeleton for accumulator_udpater program

Initial layout for accumulator updater program. Includes mock-cpi-caller which is meant to represent
pyth oracle(or any future allowed program) that will call the accumulator updater program. All
implementation details are open for discussion/subject to change

* test(accumulator_updater): add additional checks in tests and minor clean up

* chore(accumulator_updater): misc clean-up

* refactor(accumulator_updater): added comments & to-dos and minor refactoring to address PR comments
2023-03-29 09:56:03 -07:00
Reisen 032ecd66bf
[price-service] Rust implementation of a P2P price service. (#694)
* price_service: add Rust implementation of P2P price service.

* price_service: formatting hook and removes junk

* price_service: add TODO regarding build.rs hacks

* price_service: allow CGo to link resolv on mac
2023-03-15 17:18:05 +00:00
Ali Behjati 70fd0a6c15
[wormhole-attester] Move p2w-sdk inside wormhole_attester directory (#534)
* Move p2w-sdk to wormhole_attester

* Update references to the sdk
2023-01-25 18:14:02 +01:00
Ali Behjati 084acdb57e
[refactor] Convert hyphen to underscore in the directory tree (#524)
* Move price-service to price_service

* Update references to price-service

* Rename target-chains to target_chains

* Update references to target-chains

* Rename tilt-devnet to tilt_devnet

* Update references to tilt-devnet

* Rename wormhole-attester to wormhole_attester

* Update references to wormhole-attester

* Rename multisig-wh-message-builder

* Update references to wh-msg-bldr

* Fix dockerfile issue

* Rename remove-executor to remote_executor

* Update references to remote-executor

* Rename xc-governance-sdk-js

* Update references to the governance sdk

* Move docker-images to docker_images

* Update references to docker-images
2023-01-24 19:06:22 +01:00
Ali Behjati daad5c6dc5
[governance] move governance related components under this directory (#489)
* [governance] bring related stuff in governance dir

* [governance] fix changes
2023-01-13 18:58:44 +01: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
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 51514dcd9b
Add clippy to all rust projects (#400) 2022-11-28 18:22:48 +01:00
Ali Behjati becc216853
Abehjati/repo-improvement (#395)
* Use a new rustfmt file

* Run cosmwasm action only when needed

* Remove pre-commit from remote-executor action

* Fix formatting

* Run precommit for all files

As previous PR was merged without pre-commit
2022-11-25 11:16:58 +01:00
Ali Behjati d6e25d9209
Add pre-commit globally (#393)
* Add pre-commit globally

* Fix CI errors
2022-11-24 14:14:29 +01:00
guibescos 5214d185e8
Guibescos/executor cli (#309)
* Add tests to CI

* Fix yaml format

* Update pythnet address

* Checkpoint

* Format

* Reorder args

* Update executor contract

* Checkpoint

* Deployment address and fix deser bug

* Cli cleanup

* Format

* Get wormhole sdk from git

* Format

* Fix some bugs

* Non-emtpy lib
2022-09-28 10:55:11 -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