PriceUpdateV2 LEN
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- rust
- Domain
- blockchain
Research direction
Start at the PriceUpdateV2 definition and inspect its LEN constant alongside AnchorDeserialize::try_from_slice and PriceUpdateV2::try_deserialize. Compare the declared size with the 134-byte on-chain account example, then verify that the chosen correction makes deserialization behavior consistent without breaking existing accounts.
Written by the indexing model from the issue text.
Description
Issue
Deserializing an PriceUpdateV2 account info using AnchorDeserialize::try_from_slice(data) fails.
Note: Using PriceUpdateV2::try_deserialize(&mut data) works.
Cause
The PriceUpdateV2 structure have a size of 136 bytes, while LEN is 134 and onchain accounts are 134 bytes.
Onchain Account Example
https://explorer.solana.com/address/7UVimffxr9ow1uXYxsr4LHAcV58mLzhmwaeKvJ1pjLiE?cluster=devnet
PriceUpdateV2 struct in the code
#[account]
#[derive(BorshSchema)]
pub struct PriceUpdateV2 {
pub write_authority: Pubkey,
pub verification_level: VerificationLevel,
pub price_message: PriceFeedMessage,
pub posted_slot: u64,
}
impl PriceUpdateV2 {
pub const LEN: usize = 8 + 32 + 2 + 32 + 8 + 8 + 4 + 8 + 8 + 8 + 8 + 8;
}
- Dominant language
- TypeScript
- Stars
- 247
- Forks
- 348
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 27
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pyth-network/pyth-crosschain
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
pyth-network/pyth-crosschain#3653 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
pyth-network/pyth-crosschain#3652 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
pyth-network/pyth-crosschain#3228 · 2 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
pyth-network/pyth-crosschain#1729 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
pyth-network/pyth-crosschain#4049 ·
All issues in pyth-network/pyth-crosschain
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·