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

storage incentives: add stamper putter to api #930

Merged
merged 11 commits into from
Dec 15, 2020

Conversation

acud
Copy link
Member

@acud acud commented Nov 9, 2020

#873

changes that were made outside the scope of this PR are due to complaints from deepsource.

@acud acud added the in progress ongoing development , hold out with review label Nov 9, 2020
@acud acud self-assigned this Nov 9, 2020
@acud acud added the builds on open pr builds on another open one label Nov 9, 2020
@acud acud changed the base branch from master to storage-incentives November 10, 2020 14:22
@acud acud force-pushed the storage-incentives branch 2 times, most recently from 134fa9a to cbd4d4a Compare December 7, 2020 15:55
@acud acud removed the builds on open pr builds on another open one label Dec 7, 2020
mode, encrypt := requestModePut(r), requestEncrypt(r)
return func(ctx context.Context, r io.Reader, l int64) (swarm.Address, error) {
pipe := builder.NewPipelineBuilder(ctx, s, mode, encrypt, nil)
return builder.FeedPipeline(ctx, pipe, r, l)
}
}

func requestStamper(post postage.Service, signer crypto.Signer, batch []byte) (postage.Stamper, error) {
i, err := post.GetStampIssuer(batch)
Copy link
Member Author

Choose a reason for hiding this comment

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

post.GetStamper(batch,signer)

@acud acud marked this pull request as ready for review December 11, 2020 17:41
@acud acud requested a review from zelig December 12, 2020 10:16

func (w *stampWriter) ChainWrite(p *pipeline.PipeWriteArgs) (err error) {
addr := swarm.NewAddress(p.Ref)
p.Stamp, err = w.stamper.Stamp(addr)
Copy link
Member Author

Choose a reason for hiding this comment

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

this sets the stamp on the pipe write args, but does not implement the change which adds the stamp to the actual chunk which is in turn stored on the localstore. i suggest that this change is done in one PR (change to the chunk interface + persistence in localstore)

@acud acud added ready for review The PR is ready to be reviewed and removed in progress ongoing development , hold out with review labels Dec 12, 2020
@acud acud requested a review from paxthemax December 14, 2020 09:24
@acud acud changed the title pipeline: add postage writer storage incentives: add stamper putter to api Dec 14, 2020
Copy link
Member

@zelig zelig left a comment

Choose a reason for hiding this comment

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

i wish we kept the unrelated fixes in separate PRs in future

@acud
Copy link
Member Author

acud commented Dec 14, 2020

@zelig but the CI is failing. I don't know any way around that, particularly that deepsource scans different parts of the codebase randomly on different PRs 🤷‍♂️

Copy link
Contributor

@paxthemax paxthemax left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@paxthemax paxthemax merged commit 9b5ec93 into storage-incentives Dec 15, 2020
@paxthemax paxthemax deleted the postage-pipeline branch December 15, 2020 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull-request ready for review The PR is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants