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

Share On-Chain Program #79

Open
sohrab- opened this issue Aug 25, 2022 · 1 comment
Open

Share On-Chain Program #79

sohrab- opened this issue Aug 25, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@sohrab-
Copy link
Member

sohrab- commented Aug 25, 2022

One option to share transactions with other users, as part of the documentation, etc. is to store our external representation on-chain. This will likely require a program.

Requirements:

  • Store provided data in a data account
  • Should be able to append data, in scenarios where data is too big for a single transaction and is broken across many
  • The user (wallet) should be able to modify the content at a later time
  • We should be able to fetch a list of "shared transactions" for a given wallet
  • Allow users to define how much space they are willing to pay rent for
  • Since this is a free service, besides the cost of program deployment, the rest of the costs should be covered by the users
@sohrab- sohrab- added the enhancement New feature or request label Aug 25, 2022
@sohrab-
Copy link
Member Author

sohrab- commented Aug 25, 2022

We will tackle the client-side of this later but here are some considerations:

  • Make fields in external representation optional, where it makes sense, and remove them prior to serialisation
    • E.g. lack of IAccountExt.type can assume to be "type": {"type": "unspecified"}
  • Use a binary JSON representation, such as Amazon Ion
  • Use a compression algorithm, such as brotli
  • Calculate the size and cost of the account for the user prior to export
  • Allow the user to pick the size of the account, minimum capped at export size, max, ~ 10MB account limit
  • Break the data into multiple transactions if larger than the transaction limit
  • Give the option to store in different networks, e.g. devnet, mainnet-beta, etc.
  • After we see the typical sizes, if feasible we should look into storing a collection of transactions in the same account

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants