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

Waku mailserver implementation #8

Closed
oskarth opened this issue Oct 15, 2019 · 10 comments
Closed

Waku mailserver implementation #8

oskarth opened this issue Oct 15, 2019 · 10 comments

Comments

@oskarth
Copy link
Contributor

oskarth commented Oct 15, 2019

Currently the Whisper implementation is lacking a mailserver implementation. I'd love to be able to start my nim-eth whisper node with mailserver capability! Initially for experimentation, later for production.

Here's what it would have to implement:

https://github.com/status-im/specs/blob/master/status-whisper-mailserver-spec.md

  proc p2pRequest(peer: Peer, envelope: Envelope) =
    # TODO: here we would have to allow to insert some specific implementation
    # such as e.g. Whisper Mail Server
    discard

In a first implementation, an in-memory database seems ok to me.


As an aside, can I start nim-eth as a bootnode? A naive grep didn't find anything straight away.

^ @kdeme

@kdeme
Copy link
Contributor

kdeme commented Oct 15, 2019

@oskarth re the bootnode with nim-eth. I used to work with a bootnode in the whisper tests but replaced it with direct connecting for having more deterministic and faster tests.

However the helper code is still around. In the end it is nothing more than starting a discovery node. I'm guessing that for your use case (the usual use case for a bootnode) you would want to change it to have a fixed private key though.

@oskarth
Copy link
Contributor Author

oskarth commented Oct 16, 2019

One thing I don't like about how the Go code works right now is that all bootnode/Whisper/mailserver/light node stuff is separated. IMO ideally it's a single node with different capabilities, so I can choose to be a discovery node, store expired envelopes, relay messages, etc.

@zah
Copy link
Contributor

zah commented Oct 18, 2019

With the Nimbus codebase, the solution would probably look like this:

var node = newEthereumNode(localKeys, localAddress, 1, nil,
                           addAllCapabilities = false,
                           useCompression = useCompression)

node.addCapability Whisper
node.configureWhisper(storeExpiredEnvelopes = true,
                      relayMessages = true)

@oskarth
Copy link
Contributor Author

oskarth commented Oct 22, 2019

Might be worth distinguishing between:

  • Mailserver client
  • Mailserver

Perhaps we want to split this into two issues?

@kdeme
Copy link
Contributor

kdeme commented Nov 18, 2019

I'm guessing the client side is probably only implementation of one message packet id, so it could be covered by status-im/nim-eth#123 .

Should be noted though that Status mailserver implementation is apparently different from the original one, so if after specs update it turns out to be more work we can split.
To be clear, this issue is about implementing the Status version of mailserver.

@oskarth
Copy link
Contributor Author

oskarth commented Nov 18, 2019

cc @adambabik re mailserver spec

@adambabik
Copy link

A bit more details: status-im/specs#64

@oskarth
Copy link
Contributor Author

oskarth commented Dec 5, 2019

@kdeme I think having a mailserver client mode would be super useful for testing bw stuff, and it'd also be useful for making status-nim impl more useful in app.

What do you think? Do you need help with this?

@kdeme
Copy link
Contributor

kdeme commented Dec 5, 2019

@oskarth started on it: status-im/nim-eth#141

I'll need some clarification though, or dig in the go code.

@kdeme kdeme changed the title Whisper mailserver implementation Waku mailserver implementation Dec 13, 2019
@kdeme kdeme transferred this issue from status-im/nim-eth May 8, 2020
@decanus decanus self-assigned this Jun 19, 2020
@oskarth
Copy link
Contributor Author

oskarth commented Jul 27, 2020

Duplicate of #75 which is more up to date

@oskarth oskarth closed this as completed Jul 27, 2020
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

No branches or pull requests

5 participants