Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

pod: Add in-place stake history deserialization #6106

Closed
wants to merge 1 commit into from

Conversation

joncinque
Copy link
Contributor

Problem

The stake history sysvar is too large to deserialize on-chain.

Solution

Using pod types, create an in-place deserializer for StakeHistory. It's a bit goofy, but it should give an overall look at how it can be done. A few quirks about this, which is why it's only a draft:

  • bincode serializes vector sizes as a u64, whereas most other tools do a u32, which is why there's a new type parameter on PodSlice and a new (goofy) conversion function into usize for the pod number types
  • the stake program types might need to start taking in the Pod types for things like inflation calculation, I haven't looked that far into it

Let me know how this looks!

@joncinque joncinque requested a review from 2501babe January 10, 2024 13:17
@github-actions github-actions bot added the stale [bot only] Added to stale content; will be closed soon label Jan 25, 2024
@github-actions github-actions bot closed this Feb 2, 2024
@joncinque
Copy link
Contributor Author

Reopening in case it might still be useful

@joncinque joncinque reopened this Feb 2, 2024
@github-actions github-actions bot removed the stale [bot only] Added to stale content; will be closed soon label Feb 5, 2024
@github-actions github-actions bot added the stale [bot only] Added to stale content; will be closed soon label Feb 19, 2024
@github-actions github-actions bot closed this Feb 27, 2024
@buffalojoec buffalojoec reopened this Feb 27, 2024
@buffalojoec
Copy link
Contributor

I may be interested in this.

@2501babe
Copy link
Contributor

@buffalojoec you may be interested in solana-labs/solana#35252 also

@buffalojoec
Copy link
Contributor

@buffalojoec you may be interested in solana-labs/solana#35252 also

Ohhh yeah. I didn't realize you were tackling the sysvar, too!

@github-actions github-actions bot removed the stale [bot only] Added to stale content; will be closed soon label Feb 28, 2024
@github-actions github-actions bot added the stale [bot only] Added to stale content; will be closed soon label Mar 14, 2024
@github-actions github-actions bot closed this Mar 22, 2024
@joncinque joncinque deleted the stkhist branch March 22, 2024 11:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale [bot only] Added to stale content; will be closed soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants