Skip to content

Commit 925c91d

Browse files
committed
docs(pyth/anchor): link upstream tracking issue pyth-crosschain#3756
1 parent 9c1ca6d commit 925c91d

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

basics/pyth/anchor/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ See also: [Pyth overview](../README.md) and the [repository catalog](../../../RE
1313
> error[E0277]: the trait bound `pythnet_sdk::messages::PriceFeedMessage: BorshSerialize` is not satisfied
1414
> ```
1515
>
16-
> No published `pyth-solana-receiver-sdk` targets `anchor-lang` 1.0 (which this repo standardizes on), and no `pythnet-sdk` release has migrated to borsh 1.x — so the dependency can't simply be upgraded. As a workaround, `programs/pythexample/src/lib.rs` mirrors the on-chain `PriceUpdateV2` layout locally (same fields, same 8-byte discriminator, owned by the Pyth Receiver program) so accounts written by Pyth deserialize unchanged. Replace the vendored type with the SDK import once an Anchor 1.0 / borsh 1.x compatible release ships.
16+
> No published `pyth-solana-receiver-sdk` targets `anchor-lang` 1.0 (which this repo standardizes on), and no `pythnet-sdk` release has migrated to borsh 1.x — so the dependency can't simply be upgraded. Tracked upstream at [pyth-network/pyth-crosschain#3756](https://github.com/pyth-network/pyth-crosschain/issues/3756).
17+
>
18+
> As a workaround, `programs/pythexample/src/lib.rs` mirrors the on-chain `PriceUpdateV2` layout locally (same fields, same 8-byte discriminator, owned by the Pyth Receiver program) so accounts written by Pyth deserialize unchanged. Replace the vendored type with the SDK import once an Anchor 1.0 / borsh 1.x compatible release ships.
1719
1820
## Major concepts
1921

basics/pyth/anchor/programs/pythexample/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ pub struct ReadPrice<'info> {
4646
//
4747
// No published `pyth-solana-receiver-sdk` targets `anchor-lang` 1.0 (which this
4848
// repo standardizes on) and no `pythnet-sdk` release has migrated to borsh 1.x,
49-
// so the dependency can't simply be upgraded. The fields, order, and 8-byte
49+
// so the dependency can't simply be upgraded. Tracked upstream at
50+
// https://github.com/pyth-network/pyth-crosschain/issues/3756
51+
//
52+
// The fields, order, and 8-byte
5053
// discriminator below match the on-chain account exactly, and it is owned by
5154
// the Pyth Receiver program (see the `Owner` impl), so accounts written by Pyth
5255
// deserialize unchanged. Replace this with the SDK type once an Anchor 1.0 /

0 commit comments

Comments
 (0)