Skip to content

Conversation

tompntn
Copy link
Contributor

@tompntn tompntn commented Nov 10, 2022

This allows publishers to configure the amount and cost of CU units used in upd_price transactions. By default we specify the amount, but not the cost.

Note that one code path, that used by the pyth upd_price_val cli command, used only in tests, uses a slightly different method of sending the transaction than the websocket update_price command. To ensure this still works, we preserve the signatures of the existing pc::rpc::upd_price::build and pc::rpc::upd_price::request methods, instead adding additional versions of these that allow specifying the additional parameters.

@tompntn tompntn marked this pull request as draft November 11, 2022 13:21
@tompntn tompntn force-pushed the pythd-configurable-tx-price branch from 072fa03 to 58b547b Compare November 16, 2022 13:42
@tompntn tompntn force-pushed the pythd-configurable-tx-price branch from cc1e6f1 to 5814705 Compare November 17, 2022 18:59
@tompntn tompntn marked this pull request as ready for review November 17, 2022 18:59
@tompntn tompntn requested a review from jayantk November 17, 2022 18:59
jayantk
jayantk previously approved these changes Nov 17, 2022
Copy link
Contributor

@jayantk jayantk left a comment

Choose a reason for hiding this comment

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

seems great to me. one request is to document the special semantics of 0 in an appropriate place. Aside from that, lgtm.

@tompntn tompntn merged commit b18c201 into main Nov 18, 2022
@tompntn tompntn deleted the pythd-configurable-tx-price branch November 18, 2022 17:26
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