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: pre-signed chunks #4719

Merged
merged 12 commits into from
Jul 9, 2024
Merged

feat: pre-signed chunks #4719

merged 12 commits into from
Jul 9, 2024

Conversation

nugaon
Copy link
Member

@nugaon nugaon commented Jul 6, 2024

Introducing Swarm-Postage-Stamp header on /chunk and /soc POST endpoints.

It allows to push chunk to the Swarm network with pre-signed postage stamp on the attached chunk by the Bee client.

The header value must be a valid Postage Stamp otherwise error 400 has been thrown.
It means that the stamp is signed against the attached chunk and the signature is created by its on-chain owner.
A correct Postage Stamp value is 113 bytes encoded as hex string and consists of:

  • :32 - ID of the batch
  • 32:40 - index
  • 40:48 - timestamp
  • 48: - signature

Closes #2905

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

Screenshots (if appropriate):

@nugaon nugaon marked this pull request as ready for review July 9, 2024 09:03
@istae istae requested review from janos, acha-bill and martinconic July 9, 2024 10:20
Copy link
Member

@istae istae left a comment

Choose a reason for hiding this comment

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

Nice!

Copy link
Member

@janos janos left a comment

Choose a reason for hiding this comment

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

👍

@nugaon nugaon merged commit b406289 into master Jul 9, 2024
14 checks passed
@nugaon nugaon deleted the feat/pre-signed-chunks branch July 9, 2024 11:41
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

Successfully merging this pull request may close these issues.

Add API for receive already signed chunks by client
4 participants