Commit Graph

42 Commits

Author SHA1 Message Date
Reisen 624222e0c8
[pythnet-sdk] Allow as_bytes()/to_bytes() for MerkleRoot/MerklePath (#866)
* feat: allow as_bytes() for MerkleRoot

* feat: add borsh serialization to merkle types
2023-06-08 18:16:25 +01:00
Ali Behjati 7847a79b6a
Update rustfmt (#864) 2023-06-08 15:07:15 +02:00
Reisen 0b7805f285 fix: expose MerkleTree as a real interface that is accumulator friendly 2023-06-08 12:16:50 +01:00
Ali Behjati 0330c9d387
[ci] Fix pre-commit (#863) 2023-06-08 09:45:14 +02:00
guibescos e39db174d0
[pythnet-sdk] Add merkleRoot (#858)
* Add merkleRoot

* Restore file
2023-06-07 12:09:34 +01:00
Mohammad Amin Khashkhashi Moghaddam f764fc8411
Bugfix for magic value check and additional serde test (#860) 2023-06-07 12:50:24 +02:00
Ali Behjati c19f519839 Implement useful methods on PrefixedVec 2023-06-05 15:19:48 +01:00
Reisen 065fba29b1 feat: correct wire format definitions 2023-06-05 15:19:48 +01:00
Reisen a1dff0f5ac feat: add serializers for pyth formats
feat: use pythnet serialization in hermes

Fix vaa validation

Clippy

Update config names

Wrap Store with Arc

Store works perfectly without Arc as all it's elements are behind an Arc
or something similar to that, however a developer might make
mistake to add a field and missing it.

Improve error handling

Update metadata struct

Add metadata

Update Eth listener

Pin wormhole to a version

Fix ws dispatcher

fix: blocking in go recv corrupts tokio runtime

Make network <> store message passing non-blocking

Update logs and revert debug changes
2023-06-05 15:19:48 +01:00
Ali Behjati 866eace744 Add initial version 2023-06-05 15:19:48 +01:00
Reisen af2d7b6e38 feat: add serializers for pyth formats 2023-05-31 16:20:49 +01:00
swimricky 3e5b4bb095
test(pythnet-sdk): add hardcoded expected pythtest accumulator sequence unit test (#846) 2023-05-30 11:17:46 -07:00
swimricky e670f57f89
feat(message-buffer): add init msg buffer pda to script, fix msg buffer pid (#845) 2023-05-26 11:37:06 -07:00
swimricky 8eba51d51b
build(pythnet-sdk): pin wormhole-sdk & serde_wormhole tag (#835) 2023-05-23 12:59:26 -04:00
Ali Behjati 5a75653969
[message-buffer] Fix setup message buffer command (#828) 2023-05-23 09:30:52 -04: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 c23fc8dbad
[message-buffer 17/x] separate payer from admin (#819)
* feat(message-buffer): add payer to all contexts requiring lamports for rent

separate admin from payer of account creation/resize/deletion

* test(message-buffer): add test for same admin & payer

* feat(message-buffer/scripts): keep payer & admin the same in init-buffer script for simplicity
2023-05-16 13:57:09 -04:00
swimricky a115d88b09
[message-buffer 16/x] - integration repo scripts (#818)
* feat(message-buffer/scripts): add init-buffer script for integration repo

* feat(message-buffer/scripts): fix init-buffer scrtips
2023-05-16 12:33:45 -04:00
swimricky f0888549d7
[message-buffer 15/x] - audit fixes (#817)
* fix(message-buffer): set payer as admin in initialize (TOB-PYTH-5)

* fix(message-buffer/delete_buffer): remove auth validation in delete_buffer & add test (TOB-PYTH-7)

* fix(message-buffer): fix non-security-related findings

use constant for seeds, cap max target size, add more tests

* refactor(message-buffer): use seed consts in initialize, remove unused errors

* refactor(message-buffer): address PR comments

refactor missed consts, make initialize more readable
2023-05-16 12:08:36 -04:00
swimricky 78d3c5c4ca
[message-buffer 14/x] - Message buffer/zero copy fixes (#811)
* 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

* feat(message-buffer): use AccountLoader for zero-copy for resize/delete & put_all

* chore(message-buffer): clean up

* style(message-buffer): clean up

* fix(message-buffer): address PR feedback

revert to old put_all impl of using bytemuck for deserializing header, update tests add back old
check

* chore(message-buffer): clean up
2023-05-09 17:18:40 -04: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
swimricky 16baae6c99
fix(pythnet-sdk): fix modifiers (#809) 2023-05-09 09:22:12 -04:00
swimricky dab04d639b
[pythnet-sdk]: fix addresses & programIds in pythnet-sdk (#808)
* fix(pythnet-sdk): fix addresses & programIds in pythnet-sdk

* fix(pythnet-sdk): pin solana dev-dependency versions, fix visibility
2023-05-08 15:02:57 -04:00
Reisen 1902dbaa30
pythnet: replace pythnet_sdk with the right files (#803) 2023-05-05 21:04:49 +01:00
Reisen 677343c339
pythnet: move `pyth/` from pythnet and colocate other pythnet libs (#802) 2023-05-04 18:47:35 +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
Jayant Krishnamurthy 15708d552d
Fix formatting for new nightly rust (#415)
Co-authored-by: Jayant Krishnamurthy <jkrishnamurthy@jumptrading.com>
2022-12-05 10:02:58 -08:00
Jayant Krishnamurthy 3beffdfe46
Configure symbol groups by name (#403)
* Refactor to make this change easier

* stop mutating AttestationConfig

* get the product names also

* ok

* refactor

* cleanup

* more cleanup

* more cleanup

* comment

* i think this works

* fix stuff

* clippy

* more cleanup

* main

* main

* fix formatting

* blah

* test

* cleanup

* fix python

* config

* fix test

* grr

* grr

* comments

Co-authored-by: Jayant Krishnamurthy <jkrishnamurthy@jumptrading.com>
2022-12-02 09:35:33 -08: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
guibescos 57bdb092f5
Fix program account not being passed to CPI (#316)
* Fix program account not being passed to CPI

* Fix transaction sending
2022-09-29 12:49:48 -05:00
guibescos 3176d6a07f
Add payload generators (#312)
* Add payload generators

* Executor cli no longer a lib
2022-09-28 21:08:53 -05: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 834e045812
Fix AnchorVaa struct (#308)
* Deployment address and fix deser bug

* Format
2022-09-27 19:40:40 -05:00
guibescos 6898b390e6
Better program (#297)
* 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

* Move anchor checks

* Fix comment

* Restore deny warnings

* Better comments

* Typo

* Improve comments

* Better comment

* Tests for the remote executor (#298)

* Tests

* Cleanup

* Comments

* Comments

* Tests complete
2022-09-22 12:40:18 -05: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
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
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
guibescos f4cf96bd1f
Start anchor program (#282)
* Start anchor program

* pythnet folder

* Renames
2022-09-16 13:15:24 -05:00