Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integrate the price feed server #11

Merged
merged 12 commits into from
Aug 10, 2021
Merged

Conversation

hussein-aitlahcen
Copy link
Contributor

@hussein-aitlahcen hussein-aitlahcen commented Aug 4, 2021

In this PR we update the price server to handle the current oracle implementation (pretty much implementing the exact interface it is expecting right now). I added a little bit of documentation as well so that anyone can try the end-to-end oracle<->server<->pyth pipeline.

We also fixed a little bug in the oracle pallet, we were trying to iterate over the assets by an index, while they were indexed by an arbitrary key (asset_id).

We refactored the code to separate the backend websocket fetch from the frontend api. We also extracted the pure logic from both the frontend and the backend module to write some tests.

I have one concern regarding how we handle the asset pair. Only a subset of the cartesian product (asset, asset) is valid, perhaps we should make a separate crate to handle these things as it will be pretty common to use them?

The nix script has been fixed, you should be able to run nix-shell price-feed/run_pyth.nix and then use the run command to fire an instance of pythd and pyth_tx. You can check their log, respectively tail -f $PYTHD_LOG and tail -f $PYTH_TX_LOG from within the shell. The two instances are dropped on shell exit.

@hussein-aitlahcen
Copy link
Contributor Author

@andor0 is there any chance you check this out please :)?

@hussein-aitlahcen hussein-aitlahcen force-pushed the price-feed-integration branch 4 times, most recently from abe08bb to 7b07b67 Compare August 5, 2021 09:21
@hussein-aitlahcen hussein-aitlahcen force-pushed the price-feed-integration branch 3 times, most recently from 4a6c93a to 03ffb45 Compare August 5, 2021 13:33
@hussein-aitlahcen hussein-aitlahcen force-pushed the price-feed-integration branch 10 times, most recently from b02a2b7 to 8e306c3 Compare August 7, 2021 20:30
@hussein-aitlahcen hussein-aitlahcen force-pushed the price-feed-integration branch 6 times, most recently from baaa634 to a4631b0 Compare August 8, 2021 21:41
@hussein-aitlahcen hussein-aitlahcen marked this pull request as draft August 9, 2021 13:44
@hussein-aitlahcen hussein-aitlahcen marked this pull request as ready for review August 9, 2021 14:08
price-feed/src/frontend.rs Outdated Show resolved Hide resolved
price-feed/src/frontend.rs Outdated Show resolved Hide resolved
@andor0
Copy link
Contributor

andor0 commented Aug 10, 2021

LGFM

@hussein-aitlahcen hussein-aitlahcen merged commit b179e4f into main Aug 10, 2021
@hussein-aitlahcen hussein-aitlahcen deleted the price-feed-integration branch August 10, 2021 11:49
seunlanlege pushed a commit that referenced this pull request Sep 20, 2021
vault account fix & property tests precision
haroldsphinx added a commit that referenced this pull request Jan 27, 2022
# This is the 1st commit message:

fetch depth

# The commit message #2 will be skipped:

# Update checkout action

# The commit message #3 will be skipped:

# Update checkout action

# The commit message #4 will be skipped:

# Update checkout action

# The commit message #5 will be skipped:

# Update checkout action

# The commit message #6 will be skipped:

# Update checkout action

# The commit message #7 will be skipped:

# Update checkout action

# The commit message #8 will be skipped:

# Update checkout action

# The commit message #9 will be skipped:

# Update checkout action

# The commit message #10 will be skipped:

# Update checkout action

# The commit message #11 will be skipped:

# Update checkout action

# The commit message #12 will be skipped:

# Update checkout action

# The commit message #13 will be skipped:

# Update checkout action

# The commit message #14 will be skipped:

# Update checkout action

# The commit message #15 will be skipped:

# Update checkout action

# The commit message #16 will be skipped:

# Update checkout action

# The commit message #17 will be skipped:

# Update checkout action
seunlanlege added a commit that referenced this pull request Oct 6, 2022
…tions (#11)

* refactor traits

* minor fix

* fmt

* clippy suggested fixes

* test fixes

* some fixes

* deny docs

* extra refactor of trait definitions

* delegate all hashing to host functions

* bump substrate  and fix build errors

* fix some comments

* removed duplicate code in tests

* make traits stateless

* fix test issues

* minor fix

* export NodeUtils

* minor fix

* fix build error

* make extrinsic proof a vector of bytes

* check for wasm target

* create test_utils

* fixed flaky test issues

* fix subxt at least

* cargo fmt

* fix tests

* cargo test --nocapture

* Bump version of composablefi/ci-linux docker image

* use relay chain node url

Co-authored-by: Seun Lanlege <seunlanlege@gmail.com>
Co-authored-by: Andrey Orlov <aaorlov1@gmail.com>
dzmitry-lahoda added a commit that referenced this pull request Dec 14, 2022
# This is the 1st commit message:

lfs

# This is the commit message #2:

staging migration

Signed-off-by: Dzmitry Lahoda <dzmitry@lahoda.pro>

# This is the commit message #3:

picasso

# This is the commit message #4:

yamlgit add .git add .

# This is the commit message #5:

fmt; reuse; clean

Signed-off-by: Dzmitry Lahoda <dzmitry@lahoda.pro>

# This is the commit message #6:

trying replace nixops devnet

# This is the commit message #7:

fixed container

# This is the commit message #8:

zombies in compose

# This is the commit message #9:

getting routes

# This is the commit message #10:

ops mapping

# This is the commit message #11:

returned garbage for happy refactoring

# This is the commit message #12:

more

# This is the commit message #13:

revert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants