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(ipns-infra): IPNS publishing #2731

Merged
merged 1 commit into from
Sep 19, 2022
Merged

feat(ipns-infra): IPNS publishing #2731

merged 1 commit into from
Sep 19, 2022

Conversation

tx0c
Copy link
Contributor

@tx0c tx0c commented Sep 7, 2022

partI for #2631

@tx0c tx0c force-pushed the feat/ipns-publishing branch 6 times, most recently from 4b606a0 to 63c3535 Compare September 13, 2022 00:28
@codecov
Copy link

codecov bot commented Sep 13, 2022

Codecov Report

Base: 52.28% // Head: 52.12% // Decreases project coverage by -0.16% ⚠️

Coverage data is based on head (7dbc7ca) compared to base (ae21b09).
Patch coverage: 26.66% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2731      +/-   ##
===========================================
- Coverage    52.28%   52.12%   -0.17%     
===========================================
  Files          431      432       +1     
  Lines        11183    11249      +66     
  Branches      2390     2401      +11     
===========================================
+ Hits          5847     5863      +16     
- Misses        5332     5382      +50     
  Partials         4        4              
Impacted Files Coverage Δ
src/connectors/queue/publication.ts 15.92% <0.00%> (-0.32%) ⬇️
src/types/user.ts 100.00% <ø> (ø)
src/connectors/articleService.ts 24.35% <15.90%> (-1.63%) ⬇️
src/queries/user/ipnsAddress.ts 40.00% <40.00%> (ø)
src/connectors/ipfs/index.ts 59.25% <47.61%> (-40.75%) ⬇️
src/queries/user/index.ts 88.33% <100.00%> (+0.19%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tx0c tx0c force-pushed the feat/ipns-publishing branch 2 times, most recently from 65bba99 to 90a44a0 Compare September 13, 2022 01:02
@tx0c tx0c marked this pull request as ready for review September 13, 2022 02:15
@tx0c tx0c requested review from a team as code owners September 13, 2022 02:15
Copy link
Contributor

@robertu7 robertu7 left a comment

Choose a reason for hiding this comment

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

LGTM!

method: 'POST',
body: formData,
})
console.log(new Date(), 'key/import res:', res)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any sensitive data that needs to be masked?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no; the sample looks like this:

2022-09-12T18:42:59.223Z key/import fetch res: {
  Name: 'ed-gen-test23-4-1663008179217',
  Id: 'k51qzi5uqu5dhdb6i7umgq6xcu5wt4appzz1c1kyqgh8folsecogs56j11if8n'
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

many console log lines for debugging in the beginning days when running on dev; but eventually (in 2 ~ 4 weeks range) will be cleaned up

@tx0c tx0c force-pushed the feat/ipns-publishing branch 2 times, most recently from 24148c7 to a608d06 Compare September 13, 2022 19:46
const imported = await res.json()
console.log(new Date(), 'key/import res json:', imported)
// return res.json()
return imported
Copy link
Contributor Author

@tx0c tx0c Sep 13, 2022

Choose a reason for hiding this comment

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

there is ipfs.key.import method, accept password
https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/KEY.md#ipfskeyimportname-pem-password-options

but the problem is only for js-ipfs implementation, different than go-ipfs

ipfs/js-ipfs#3547 (comment)

In a bit more detail, js-IPFS accepts the key as a query string argument, go-IPFS accepts it in the body of the POST request.

@tx0c tx0c force-pushed the feat/ipns-publishing branch 9 times, most recently from 2aa3138 to 7dbc7ca Compare September 19, 2022 07:20
@tx0c tx0c merged commit 7dbc7ca into develop Sep 19, 2022
@delete-merged-branch delete-merged-branch bot deleted the feat/ipns-publishing branch September 19, 2022 15:57
partI for #2631

each author's json feed is like:

    <any-ipfs-gateway>/ipns/{key}/feed.json
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.

2 participants