Skip to content

Conversation

@jayantk
Copy link
Contributor

@jayantk jayantk commented Apr 24, 2025

Summary

Bring back the original EntropyStructs definitions and move the new structs to EntropyStructsV2. Use the old EntropyStructs in events to maintain the selectors.

Rationale

The last few Entropy PRs have added fields to the contract structs, which were backward compatible with the storage. However, these changes change the selectors of Events, which breaks the public interface of the contract that is used by Fortuna to identify requests. This PR fixes the public interface so the selectors aren't changed.

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code

I checked out an old version of the code and computed selectors using forge selectors list then compared with the new version.

@vercel
Copy link

vercel bot commented Apr 24, 2025

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

Name Status Preview Comments Updated (UTC)
insights ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 25, 2025 3:28pm
5 Skipped Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Visit Preview Apr 25, 2025 3:28pm
component-library ⬜️ Ignored (Inspect) Visit Preview Apr 25, 2025 3:28pm
entropy-debugger ⬜️ Ignored (Inspect) Visit Preview Apr 25, 2025 3:28pm
proposals ⬜️ Ignored (Inspect) Visit Preview Apr 25, 2025 3:28pm
staking ⬜️ Ignored (Inspect) Visit Preview Apr 25, 2025 3:28pm

address provider,
uint64 sequenceNumber
) external view returns (EntropyStructs.Request memory req);
) external view returns (EntropyStructsV2.Request memory req);
Copy link
Contributor

Choose a reason for hiding this comment

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

can you check if the current fortuna deserializes this correctly?

@jayantk jayantk requested a review from a team as a code owner April 24, 2025 19:35
@jayantk jayantk merged commit a4333da into main Apr 25, 2025
12 checks passed
@jayantk jayantk deleted the entropy_error6 branch April 25, 2025 15:31
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