Skip to content

Conversation

nolash
Copy link
Contributor

@nolash nolash commented Mar 21, 2019

This PR contains some preliminary changes to allow for using ENR to transmit the swarm overlay address between peers.

Currently, ENR is not being sent over the p2p handshake. The necessary changes for this to happen is pending an EIP submission (and approval, and implementation). This is described in this PR by @fjl which incidentally also contains a hack by him that provides a functional demonstration on how ENR record will be available through PeerInfo and on the p2p.Peerobject:

#19220

In the meantime, the aim is to include the maximum amount of changes here that can be made towards the goal without relying on the implementation of the EIP. Some of the changes are cherry-picked from an experimental branch https://github.com/ethersphere/go-ethereum/tree/enr-bzz-poc building on the in the above mentioned PR.

In the experimental branch all handshake related code has been removed, and includes a temporary POC test swarm/network/simulation/protocol_new_test.go:TestENR that demonstrates a successful WaitTillHealthy() only using ENR.


My proposed steps towards the basic but sound transition to handshake-free Swarm are:

BEFORE EIP

  1. Preliminary changes in swarm/network and embed ENR in simulatioñ (done)
  2. Embed ENR in binary (this PR)

AFTER EIP

  1. Remove handshake from swarm/network
  2. Eliminate swarm/network:BzzAddr
  3. Merge swarm/network:BzzPeer and swarm/network:Peer
  4. Remove handshake from p2p/protocols
  5. Move p2p/protocols to swarm package

@zelig zelig merged commit 09924cb into ethereum:master Mar 22, 2019
@frncmx frncmx deleted the enr-bzz-binary branch March 22, 2019 11:26
nonsense referenced this pull request in ethersphere/swarm May 8, 2019
* cmd/swarm, p2p, swarm: Enable ENR in binary/execadapter

* cmd/p2p/swarm: Remove comments + config.Enode nomarshal

* p2p/simulations: Remove superfluous error check

* p2p/simulation: Move init enode comment

* swarm/api: Check error in config test

* swarm, p2p/simulations, cmd/swarm: Use nodekey in binary record sign

* cmd/swarm: Make nodekey available for swarm api config
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