Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the documentation for state sharing between contracts #1502

Open
Tracked by #1495
devendran-m opened this issue Dec 19, 2024 · 0 comments
Open
Tracked by #1495

Improve the documentation for state sharing between contracts #1502

devendran-m opened this issue Dec 19, 2024 · 0 comments

Comments

@devendran-m
Copy link
Contributor

devendran-m commented Dec 19, 2024

Problem Statement (received as feedback from Xrod);

There is no efficient mechanism for state sharing between contracts. If Contract A stores data under its URef, why can’t Contract B access that state directly? Why must Contract A explicitly share some state? If this state can already be read off-chain, why can’t it be accessed on-chain? If there is a solution available for this, it should be prominently mentioned in the documentation.

User Story:

As a developer building applications on the Casper Network,
I want an efficient mechanism for state sharing between contracts and clear documentation explaining its implementation,
so that I can simplify interactions between contracts, avoid redundant steps like explicit state sharing, and achieve consistency between on-chain and off-chain data access.

Acceptance Criteria:

  • The Casper Network provides a mechanism to allow Contract B to directly access data stored under Contract A’s URef without explicit sharing.
  • If a mechanism already exists, it is prominently documented with clear explanations and examples of how it works.
  • The documentation explains why certain states accessible off-chain cannot be accessed on-chain, if applicable, with technical reasoning.
  • Code examples and use cases demonstrate how to implement state sharing effectively between contracts.
  • Best practices for securely and efficiently sharing state between contracts are documented.
  • Developers can use the documented mechanism to implement state sharing between contracts without requiring additional support.
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

No branches or pull requests

1 participant