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

Add API for receive already signed chunks by client #2905

Closed
tmm360 opened this issue Apr 26, 2022 · 8 comments · Fixed by #4719
Closed

Add API for receive already signed chunks by client #2905

tmm360 opened this issue Apr 26, 2022 · 8 comments · Fixed by #4719
Labels
enhancement enhancement of existing functionality issue

Comments

@tmm360
Copy link
Contributor

tmm360 commented Apr 26, 2022

Summary

We need a way for upload to a node chunks that was already signed by the client with postage stamps.
This primarily permits to publish contents signed with the user's address instead of the node's one.

Motivation

This is useful in all cases where a node is used by more than one user. Currently every published content is signed by node, and so the node owner is the first responsible of uploaded contents, where instead the final user should be.

Moreover, this permits to discharge node from computing load of sign every chunk, distributing it to clients.

Implementation

New API and a chunk validity check have to be implemented.
Old APIs can be kept untouched, eventually node's chunk signature can be disabled by options.

Drawbacks

Don't see any.

@bee-runner bee-runner bot added the issue label Apr 26, 2022
@agazso agazso added the enhancement enhancement of existing functionality label Apr 27, 2022
@agazso
Copy link
Member

agazso commented May 3, 2022

This is a good idea and definitely something like this would be good to have as a feature. The difficulty of this is that if the postage stamps are distributed then it is no longer trivial to know how much data was uploaded with it.

Currently the stamp is managed by a single node therefore the node is trivially able to account for all data that was attached to it and not overcommit. If you detach the stamp from the node and possibly make it distributable between different parties then it would require some kind of extra protocol to be able to track the data in a distributed manner as well. This protocol is missing and although there were some thinking in this space but as far as I know there is no consensus on how to do this at the moment.

@tmm360
Copy link
Contributor Author

tmm360 commented May 3, 2022

@agazso I see, thank you for have pointed me at this issue. I will try to figure out a possibile solution. But in this case, how can nodes verify now that postage stamps are not overloaded?

@nugaon
Copy link
Member

nugaon commented Jun 27, 2024

Picking up this issue since it was the closest to the pre-signed chunk support.

The POST /chunk endpoint could receive a Swarm-Postage-Stamp header where postage stamp signature could be set as a hex encoded string. @mfw78 already hacked all this but we need to have it on POST /soc endpoint as well.

This feature is also required for Addressed Envelope feature #4713 .

@agazso
Copy link
Member

agazso commented Jun 27, 2024

Maybe allow only mutable postage stamps, because it is not a problem to overcommit them. Otherwise the node may be penalized if it uploads with an overcommited postage stamp.

@nugaon
Copy link
Member

nugaon commented Jul 1, 2024

there is no punishment system in Bee for uploading two chunks with the same postage stamp, it will just store the one with higher timestamp.

@ldeffenb
Copy link
Collaborator

ldeffenb commented Jul 2, 2024

it will just store the one with higher timestamp.

Well, there are issues with the stamp timestamps in the reserve, but hopefully they'll get resolved before externally-stamped (and possibly re-used bucket indices) gets reduced to actual code.

@istae
Copy link
Member

istae commented Jul 2, 2024

it will just store the one with higher timestamp.

Well, there are issues with the stamp timestamps in the reserve, but hopefully they'll get resolved before externally-stamped (and possibly re-used bucket indices) gets reduced to actual code.

yep, the fix is in the pipeline.

@istae
Copy link
Member

istae commented Jul 2, 2024

fantastic feature idea btw

@nugaon nugaon mentioned this issue Jul 6, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement enhancement of existing functionality issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants