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

Support resolution of unstoppable domains with IPFS records via Ethereum #8456

Merged
merged 6 commits into from
Apr 15, 2021

Conversation

yrliou
Copy link
Member

@yrliou yrliou commented Apr 6, 2021

Resolves brave/brave-browser#15158

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally: npm run test -- brave_browser_tests, npm run test -- brave_unit_tests, npm run lint, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

  1. Go to settings, open drop-down of ENS resolve method settings, should not have Ethereum.
  2. Change resolve method of Unstoppable Domains to Ethereum
  3. Go to brave://settings/ipfs, set the method to resolve to Gateway
  4. Visit brave.crypto, the page should be loaded normally via IPFS.

@yrliou yrliou self-assigned this Apr 6, 2021
@yrliou yrliou added this to the 1.24.x - Nightly milestone Apr 6, 2021
@yrliou yrliou force-pushed the UD_ethereum_ipfs branch 4 times, most recently from 5ab85b3 to 0bbbbb3 Compare April 8, 2021 03:43
@yrliou yrliou marked this pull request as ready for review April 8, 2021 15:18
@yrliou yrliou requested review from iefremov and a team as code owners April 8, 2021 15:18
@yrliou yrliou changed the title [WIP] Support resolution of unstoppable domains with IPFS records via Ethereum Support resolution of unstoppable domains with IPFS records via Ethereum Apr 8, 2021
@yrliou yrliou requested a review from bbondy April 8, 2021 15:19
@yrliou yrliou modified the milestones: 1.24.x - Beta, 1.25.x - Nightly Apr 8, 2021
@yrliou yrliou changed the title Support resolution of unstoppable domains with IPFS records via Ethereum [WIP] Support resolution of unstoppable domains with IPFS records via Ethereum Apr 8, 2021
@yrliou yrliou force-pushed the UD_ethereum_ipfs branch 2 times, most recently from ac2ce52 to be8a009 Compare April 8, 2021 17:57
@yrliou yrliou changed the title [WIP] Support resolution of unstoppable domains with IPFS records via Ethereum Support resolution of unstoppable domains with IPFS records via Ethereum Apr 8, 2021
return net::OK;
}

service->controller()->UnstoppableDomainsProxyReaderGetMany(
Copy link
Contributor

Choose a reason for hiding this comment

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

not really clear: "many" of what? and the method doesn't explain anything

Copy link
Contributor

Choose a reason for hiding this comment

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

also curious whether we consider the endpoint as trustworthy.. In theory, we'd better to follow Rule of 2: https://chromium.googlesource.com/chromium/src/+/master/docs/security/rule-of-2.md
probably something to consider during sec review

Copy link
Member Author

Choose a reason for hiding this comment

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

It's calling getMany function defined by Unstoppable Domains's ProxyReader smart contract.

Copy link
Member Author

Choose a reason for hiding this comment

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

We issue these calls to Unstoppable Domains smart contract via Infura to the Ethereum network.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added some more comments in 1cdb4f081decc67ac46ac53ed9bee83fcf3ebb34, and created security review issue.

@iefremov
Copy link
Contributor

we probably need a security review?

Copy link
Contributor

@iefremov iefremov left a comment

Choose a reason for hiding this comment

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

the code looks fine, but we have to be more verbose, so people external to the project could understand it

@yrliou yrliou requested a review from a team as a code owner April 13, 2021 22:44
Copy link
Collaborator

@mkarolin mkarolin left a comment

Choose a reason for hiding this comment

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

chromium_src change LGTM

@iefremov
Copy link
Contributor

Thanks @yrliou , much appreciated :D

@yrliou
Copy link
Member Author

yrliou commented Apr 15, 2021

unrelated post-init failure in audit-dep.

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.

Support resolution of unstoppable domains with IPFS records via Ethereum
4 participants