Skip to content

Conversation

@tabaktoni
Copy link
Member

Motivation and Resolution

Decide hash based on starknet version instead of the spec version.

RPC version (if applicable)

0.8 0.9 getStarknetVersion

Usage related changes

new helper method getStarknetVersion

Checklist:

  • Performed a self-review of the code
  • Rebased to the last commit of the target branch (or merged it into my branch)
  • Linked the issues which this PR resolves
  • Documented the changes in code (API docs will be generated automatically)
  • Updated the tests
  • All tests are passing

Copy link
Collaborator

@PhilippeR26 PhilippeR26 left a comment

Choose a reason for hiding this comment

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

Looks good.

Copy link
Collaborator

@penovicp penovicp left a comment

Choose a reason for hiding this comment

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

I would consider adding memoization in some way, although I can see that it would be clunkier than for spec version. Maybe have it on the account class and apply it only if it passes 0.14.1? I also anticipate there would be a future feature request to make the version queries skippable, this could be forestalled with a memoization implementation.

Aside from the above, which can also be addressed in a different PR, lgtm

@tabaktoni
Copy link
Member Author

Originally, I implemented it with memoization, but then I realised it would break the purpose of detecting changes of the versions check in case N-1, N , where N is the new version, and especially in the case of long-running providers.
As this is only used on declaration (one time), I think it is fine to do real-time checking for the cost of one request.
For disabling it, I didn't implement it because it would also defeat the purpose.

Related to this, I proposed an addition to what I originally proposed to Alex here:
starkware-libs/starknet-specs#319 (comment)

@tabaktoni tabaktoni merged commit 3ce38fd into develop Nov 12, 2025
2 of 3 checks passed
@github-actions
Copy link
Contributor

🎉 This PR is included in version 8.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants