Skip to content

Conversation

Riateche
Copy link
Contributor

@Riateche Riateche commented Feb 25, 2025

  • Reorganize magics in different modules
  • Declare all magics in LE and add tests for BE representation
  • Add LeEcdsa format for EVM signatures on Solana
  • Add LeUnsigned format for off-chain usage
  • Add Message enum for ser/deserializing any message type.
  • Add BinaryWsUpdate for ser/deserializing binary WS updates.
  • Update WS client example.
  • Properly support binary updates in WS client: it no longer converts payloads to base64 and back.
  • Rename "chains" to "formats" in router API because now it contains off-chain formats. Old name is still supported for compatibility.

I wanted to deprecate parsed in router API and replace it with formats: ["json"] but unfortunately parsed is true by default to we can't easily deprecate it. We can remove it when we do a breaking change and go for a /v2/.. endpoint.

Tested WS client against a prod router to verify no breaking changes. Tested in tilt for new formats.

@vercel
Copy link

vercel bot commented Feb 25, 2025

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 Feb 27, 2025 10:31am
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 27, 2025 10:31am
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 27, 2025 10:31am
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
component-library ⬜️ Ignored (Inspect) Visit Preview Feb 27, 2025 10:31am
entropy-debugger ⬜️ Ignored (Inspect) Visit Preview Feb 27, 2025 10:31am
insights ⬜️ Ignored (Inspect) Visit Preview Feb 27, 2025 10:31am

Comment on lines -18 to +80
writer.write_u32::<BE>(EVM_FORMAT_MAGIC)?;
writer.write_u32::<LE>(EVM_FORMAT_MAGIC)?;
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't this a breaking change? How does the current contracts in EVM that expect BE work with this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not a breaking change because I changed the constant value.


[dependencies]
pyth-lazer-protocol = "0.5.0"
pyth-lazer-protocol = { path = "../protocol", version = "0.5.0" }
Copy link
Contributor

Choose a reason for hiding this comment

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

doesn't this break the publishing to cargo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, cargo is smart enough to remove paths on publish.

@keyvankhademi
Copy link
Contributor

I think you should increase the protocol version too.

@Riateche
Copy link
Contributor Author

Bumped protocol version.

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