Skip to content

Conversation

@Riateche
Copy link
Contributor

@Riateche Riateche commented Jul 31, 2024

  • Read published prices from publishers' accounts and apply them to price feed accounts
  • Add minimal CI

@Riateche Riateche changed the base branch from pyth to pyth-v1.14.17 July 31, 2024 09:34
@Riateche Riateche force-pushed the batch-publish branch 9 times, most recently from a1fd3c8 to 6982f90 Compare July 31, 2024 11:32
Copy link
Collaborator

@ali-behjati ali-behjati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks very good to me. I like to see how the program will work.

@Riateche Riateche changed the title WIP: Batch publish Batch publish Aug 28, 2024
"STAKE_CAPS_PARAMETERS_ADDR",
Ok(*STAKE_CAPS_PARAMETERS_ADDR),
),
("BATCH_PUBLISH_PID", Ok(*BATCH_PUBLISH_PID)),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i recommend we rename this function and move it to mod.rs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

}

let mut measure = Measure::start("update_v2_aggregate_price");
let mut new_prices = batch_publish::extract_batch_publish_prices(bank).unwrap_or_else(|err| {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's have a measure for this too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

};

#[test]
fn test_batch_publish() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if feed index of 0 is permitted we can add tests with that and make sure that it doesn't work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expanded the test to make sure prices with feed_index == 0 are not applied.

@Riateche Riateche merged commit 2a7cebd into pyth-v1.14.17 Aug 30, 2024
@Riateche Riateche deleted the batch-publish branch August 30, 2024 09:15
ilya-bobyr pushed a commit to ilya-bobyr/pythnet that referenced this pull request Dec 19, 2024
---

Batch publish (pyth-network#313)

* feat: batch publish

* feat: batch publish 2 (wip)

* feat: verify that price feed index is set

* refactor: add pyth module

* feat: integrate pyth-price-publisher

* refactor: rename and move get_accumulator_keys

* test: make sure batch publish does not apply prices when price_index == 0

* chore: fix format

* fix: update deps

---

Update dependency, program id and test for pyth-price-store (pyth-network#314)

* test: modify batch publish tests

* chore: use real batch publish pid as default

* chore: update pyth-price-store dependency

---

Rename price store env var and bump version (pyth-network#315)

* chore: rename variable for pyth store pid

* chore: bump pythnet version to 1.14.179
ilya-bobyr pushed a commit to ilya-bobyr/pythnet that referenced this pull request Dec 20, 2024
---

Batch publish (pyth-network#313)

* feat: batch publish

* feat: batch publish 2 (wip)

* feat: verify that price feed index is set

* refactor: add pyth module

* feat: integrate pyth-price-publisher

* refactor: rename and move get_accumulator_keys

* test: make sure batch publish does not apply prices when price_index == 0

* chore: fix format

* fix: update deps

---

Update dependency, program id and test for pyth-price-store (pyth-network#314)

* test: modify batch publish tests

* chore: use real batch publish pid as default

* chore: update pyth-price-store dependency

---

Rename price store env var and bump version (pyth-network#315)

* chore: rename variable for pyth store pid

* chore: bump pythnet version to 1.14.179
ilya-bobyr pushed a commit to ilya-bobyr/pythnet that referenced this pull request Feb 1, 2025
---

Batch publish (pyth-network#313)

* feat: batch publish

* feat: batch publish 2 (wip)

* feat: verify that price feed index is set

* refactor: add pyth module

* feat: integrate pyth-price-publisher

* refactor: rename and move get_accumulator_keys

* test: make sure batch publish does not apply prices when price_index == 0

* chore: fix format

* fix: update deps

---

Update dependency, program id and test for pyth-price-store (pyth-network#314)

* test: modify batch publish tests

* chore: use real batch publish pid as default

* chore: update pyth-price-store dependency

---

Rename price store env var and bump version (pyth-network#315)

* chore: rename variable for pyth store pid

* chore: bump pythnet version to 1.14.179
ilya-bobyr pushed a commit to ilya-bobyr/pythnet that referenced this pull request Feb 1, 2025
---

Batch publish (pyth-network#313)

* feat: batch publish

* feat: batch publish 2 (wip)

* feat: verify that price feed index is set

* refactor: add pyth module

* feat: integrate pyth-price-publisher

* refactor: rename and move get_accumulator_keys

* test: make sure batch publish does not apply prices when price_index == 0

* chore: fix format

* fix: update deps

---

Update dependency, program id and test for pyth-price-store (pyth-network#314)

* test: modify batch publish tests

* chore: use real batch publish pid as default

* chore: update pyth-price-store dependency

---

Rename price store env var and bump version (pyth-network#315)

* chore: rename variable for pyth store pid

* chore: bump pythnet version to 1.14.179
ilya-bobyr pushed a commit to ilya-bobyr/pythnet that referenced this pull request Feb 4, 2025
---

Batch publish (pyth-network#313)

* feat: batch publish

* feat: batch publish 2 (wip)

* feat: verify that price feed index is set

* refactor: add pyth module

* feat: integrate pyth-price-publisher

* refactor: rename and move get_accumulator_keys

* test: make sure batch publish does not apply prices when price_index == 0

* chore: fix format

* fix: update deps

---

Update dependency, program id and test for pyth-price-store (pyth-network#314)

* test: modify batch publish tests

* chore: use real batch publish pid as default

* chore: update pyth-price-store dependency

---

Rename price store env var and bump version (pyth-network#315)

* chore: rename variable for pyth store pid

* chore: bump pythnet version to 1.14.179
ilya-bobyr pushed a commit to ilya-bobyr/pythnet that referenced this pull request Feb 4, 2025
---

Batch publish (pyth-network#313)

* feat: batch publish

* feat: batch publish 2 (wip)

* feat: verify that price feed index is set

* refactor: add pyth module

* feat: integrate pyth-price-publisher

* refactor: rename and move get_accumulator_keys

* test: make sure batch publish does not apply prices when price_index == 0

* chore: fix format

* fix: update deps

---

Update dependency, program id and test for pyth-price-store (pyth-network#314)

* test: modify batch publish tests

* chore: use real batch publish pid as default

* chore: update pyth-price-store dependency

---

Rename price store env var and bump version (pyth-network#315)

* chore: rename variable for pyth store pid

* chore: bump pythnet version to 1.14.179
ilya-bobyr pushed a commit to ilya-bobyr/pythnet that referenced this pull request Feb 4, 2025
---

Batch publish (pyth-network#313)

* feat: batch publish

* feat: batch publish 2 (wip)

* feat: verify that price feed index is set

* refactor: add pyth module

* feat: integrate pyth-price-publisher

* refactor: rename and move get_accumulator_keys

* test: make sure batch publish does not apply prices when price_index == 0

* chore: fix format

* fix: update deps

---

Update dependency, program id and test for pyth-price-store (pyth-network#314)

* test: modify batch publish tests

* chore: use real batch publish pid as default

* chore: update pyth-price-store dependency

---

Rename price store env var and bump version (pyth-network#315)

* chore: rename variable for pyth store pid

* chore: bump pythnet version to 1.14.179
ilya-bobyr pushed a commit to ilya-bobyr/pythnet that referenced this pull request Mar 6, 2025
---

Batch publish (pyth-network#313)

* feat: batch publish

* feat: batch publish 2 (wip)

* feat: verify that price feed index is set

* refactor: add pyth module

* feat: integrate pyth-price-publisher

* refactor: rename and move get_accumulator_keys

* test: make sure batch publish does not apply prices when price_index == 0

* chore: fix format

* fix: update deps

---

Update dependency, program id and test for pyth-price-store (pyth-network#314)

* test: modify batch publish tests

* chore: use real batch publish pid as default

* chore: update pyth-price-store dependency

---

Rename price store env var and bump version (pyth-network#315)

* chore: rename variable for pyth store pid

* chore: bump pythnet version to 1.14.179
ilya-bobyr pushed a commit to ilya-bobyr/pythnet that referenced this pull request Jun 21, 2025
* add `deprecated` feature to produce warnings on use of deprecated functions

* replace `multiple_occurrences` with arg actions

* replace `possible_values` with `PossibleValueParser`

* deprecated `value_of` and `values_of`

* deprecate `unix_timestamp_from_rfc3339_datetime`

* deprecate `cluster_type_of`

* deprecate `commitment_of`

* deprecate `keypair_of`, `keypairs_of`, `pubkey_of`, and `pubkeys_of` functions

* replace deprecated functions from `try_keypair_of`, `try_keypairs_of`, `try_pubkey_of`, and `try_pubkeys_of`

* deprecate `pubkeys_sigs_of`

* allow deprecated on tests

* remove `deprecation` feature from clap-v3-utils

* re-export `pubkeys_sigs_of`

* add helper `extract_keypair` to dedupe `try_keypair_of` and `try_keypairs_of`

* remove unwraps and expects

* bump deprecation version
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.

3 participants