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

feat (RPC): RPC call to add preimages #1432

Closed
iAmMichaelConnor opened this issue Aug 7, 2023 · 1 comment · Fixed by #2535
Closed

feat (RPC): RPC call to add preimages #1432

iAmMichaelConnor opened this issue Aug 7, 2023 · 1 comment · Fixed by #2535

Comments

@iAmMichaelConnor
Copy link
Contributor

From the idea in this discourse post it seemed to be useful to have a way to put note pre-images into the database using an rpc call such that applications could use its own logic for sharing preimages instead of the expensive broadcast.

This seems particularly of value for short-lived messages such which most public -> private data sharing will probably be as the same entity is likely both inserting and then consuming.

Also makes it more convenient to build applications that don't rely on ethereum for any data-availability of pre-images which can be used to reduce cost and might be very useful for applications such as NFT trading, where the pre-images might be a order that can just fine be stored on a centralized exchange or shared on ipfs or similar.

The insertion should check that the pre-image actually match the a specific note such that invalid pre-images are not stored in the database.

An api could take the pre-image only, or require more information such as index in data tree for easier lookups.

@LHerskind LHerskind added this to A3 Jun 8, 2023
@iAmMichaelConnor iAmMichaelConnor converted this from a draft issue Aug 7, 2023
@iAmMichaelConnor
Copy link
Contributor Author

iAmMichaelConnor commented Aug 7, 2023

I converted this (old) note (written by @LHerskind as a project board note) into an issue.
Tagging @LeilaWang , since I think we might now have this functionality?

This was referenced Sep 20, 2023
LeilaWang added a commit that referenced this issue Sep 26, 2023
Closes #1432 

Usage of this api will be added to an e2e test in a later PR where we
remove `Set.check_note_hash_exists`.

# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [ ] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [ ] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).
@github-project-automation github-project-automation bot moved this from Todo to Done in A3 Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant