This repository was archived by the owner on Aug 2, 2021. It is now read-only.
pss: Modularize crypto and remove Whisper. Step 1 - isolate whisper code#1698
Merged
nolash merged 8 commits intoethersphere:masterfrom Sep 2, 2019
Merged
pss: Modularize crypto and remove Whisper. Step 1 - isolate whisper code#1698nolash merged 8 commits intoethersphere:masterfrom
nolash merged 8 commits intoethersphere:masterfrom
Conversation
Contributor
Author
|
I think I'm going to encapsulate all uses of |
Contributor
Author
Yes, I also think that defining the crypto API should not be part of this stage. Anyway, in order to have a good view of the necessary methods I'm going to include all the uses of |
nolash
reviewed
Aug 30, 2019
Created Message and Envelope Types similar to whisper ones. Create a new CryptoBackend interface and default implementation using Whisper
Separated crypto utilities for tests in CryptoUtils
nolash
approved these changes
Sep 2, 2019
chadsr
added a commit
to chadsr/swarm
that referenced
this pull request
Sep 23, 2019
* 'master' of github.com:ethersphere/swarm: pss: Modularize crypto and remove Whisper. Step 1 - isolate whisper code (ethersphere#1698) pss: Improve pressure backstop queue handling - no mutex (ethersphere#1695) cmd/swarm-snapshot: if 2 nodes to create snapshot use connectChain (ethersphere#1709) network: Add API for Capabilities (ethersphere#1675) pss: fixed flaky test that was using a global variable instead of a local one (ethersphere#1702) pss: Port tests to `network/simulation` (ethersphere#1682) storage: fix hasherstore seen check to happen when error is nil (ethersphere#1700) vendor: upgrade go-ethereum to 1.9.2 (ethersphere#1689) bzzeth: initial support for bzz-eth protocol (ethersphere#1571) network/stream: terminate runUpdateSyncing on peer quit (ethersphere#1696) all: first working SWAP version (ethersphere#1554) version: update to v0.5.0 unstable (ethersphere#1694) chunk, storage: storage with multi chunk Set method (ethersphere#1684) chunk, storage: add HasMulti to chunk.Store (ethersphere#1686) chunk, shed, storage: chunk.Store GetMulti method (ethersphere#1691) api, chunk: progress bar support (ethersphere#1649)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We want to modularize crypto and stop depending on
whisper. Issue #1655 describe several steps to achive this. The goal of this PR is just a small fraction of that first step.This PR isolates all usages of whisper into two new files:
crypto.go: contains all the whisper usages related to keys managementmessage.go: contains the data model related to envelopes and messages that we were using fromwhisper.This PR is only a refactor of code, we are not changing anything so all the new methods and types are delegating into the old whisper methods and types.
The only minor thing done was removing unused fields from
whisper.ReceivedMessageandwhisper.Envelope.In
crypto.gowe have created and interface of the methods needed by keystore and also created a default implementation delegating to whisper.We also isolated code calling
github.com/ethereum/go-ethereum/cryptointocrypto.go.There are some crypto utilities used only by tests. Instead of adding those methods to the crypto interface, we created
CryptoUtils.goand add them there.CryptoUtilsis intended to be used only in tests.