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

feat: add publisher stake caps to validator #1778

Merged
merged 16 commits into from
Jul 31, 2024
Merged

Conversation

guibescos
Copy link
Contributor

@guibescos guibescos commented Jul 17, 2024

PublisherStakeCapsMessage is a new type of message, that contains how much stake each publisher should have to maximize their rewards in the context of CIP.
This message is different from other messages in that there's only one message of this type in the Merkle tree, and also it is potentially really big (since it contains the list of all publishers and their cap).

https://forum.pyth.network/t/community-proposal-for-the-design-of-the-community-integrity-pool-cip/1571

I gets computed in pyth-network/pythnet#302 , and will be consumed by the reward distribution logic on Solana.

Copy link

vercel bot commented Jul 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 31, 2024 6:56pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
xc-admin-frontend ⬜️ Ignored (Inspect) Visit Preview Jul 31, 2024 6:56pm

}
}

pub fn feed_id(&self) -> FeedId {
match self {
Self::PriceFeedMessage(msg) => msg.feed_id,
Self::TwapMessage(msg) => msg.feed_id,
Self::PublisherCapsMessage(_) => [0u8; 32],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the new type of message breaks this

@guibescos guibescos changed the title Feat/publisher caps feat: add publisher stake caps to validator Jul 18, 2024
@guibescos guibescos marked this pull request as ready for review July 22, 2024 16:48
pythnet/pythnet_sdk/src/messages.rs Outdated Show resolved Hide resolved
target_chains/solana/programs/pyth-push-oracle/src/lib.rs Outdated Show resolved Hide resolved
This reverts commit 48af94f.
@guibescos guibescos merged commit ff2d6a0 into main Jul 31, 2024
5 of 8 checks passed
@guibescos guibescos deleted the feat/publisher-caps branch July 31, 2024 18:54
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.

4 participants