diff options
author | gluk256 <gluk256@users.noreply.github.com> | 2016-12-20 07:58:01 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2016-12-20 07:58:01 +0800 |
commit | ba996f5e27572e853bcc5c815ae72082a15c9183 (patch) | |
tree | 16d6fd41d3d77208597683c71bdc9af603d43a77 /whisper/whisperv5/doc.go | |
parent | 64bf5bafe9ced66bfb11f34fed9181aa89399473 (diff) | |
download | dexon-ba996f5e27572e853bcc5c815ae72082a15c9183.tar.gz dexon-ba996f5e27572e853bcc5c815ae72082a15c9183.tar.zst dexon-ba996f5e27572e853bcc5c815ae72082a15c9183.zip |
whisper: refactoring (#3411)
* whisper: refactored message processing
* whisper: final polishing
* whisper: logging updated
* whisper: moved the check, changed the default PoW
* whisper: refactoring of message queuing
* whisper: refactored parameters
Diffstat (limited to 'whisper/whisperv5/doc.go')
-rw-r--r-- | whisper/whisperv5/doc.go | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/whisper/whisperv5/doc.go b/whisper/whisperv5/doc.go index 223d8246e..e2e255e9e 100644 --- a/whisper/whisperv5/doc.go +++ b/whisper/whisperv5/doc.go @@ -15,9 +15,7 @@ // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. /* -Package whisper implements the Whisper PoC-1. - -(https://github.com/ethereum/wiki/wiki/Whisper-PoC-1-Protocol-Spec) +Package whisper implements the Whisper protocol (version 5). Whisper combines aspects of both DHTs and datagram messaging systems (e.g. UDP). As such it may be likened and compared to both, not dissimilar to the @@ -42,11 +40,11 @@ const ( ProtocolVersionStr = "5.0" ProtocolName = "shh" - statusCode = 0 - messagesCode = 1 - p2pCode = 2 - mailRequestCode = 3 - NumberOfMessageCodes = 32 + statusCode = 0 // used by whisper protocol + messagesCode = 1 // normal whisper message + p2pCode = 2 // peer-to-peer message (to be consumed by the peer, but not forwarded any futher) + p2pRequestCode = 3 // peer-to-peer message, used by Dapp protocol + NumberOfMessageCodes = 64 paddingMask = byte(3) signatureFlag = byte(4) @@ -57,11 +55,12 @@ const ( saltLength = 12 AESNonceMaxLength = 12 - MaxMessageLength = 0xFFFF // todo: remove this restriction after testing in morden and analizing stats. this should be regulated by MinimumPoW. - MinimumPoW = 10.0 // todo: review + MaxMessageLength = 0xFFFF // todo: remove this restriction after testing. this should be regulated by PoW. + MinimumPoW = 1.0 // todo: review after testing. padSizeLimitLower = 128 // it can not be less - we don't want to reveal the absence of signature padSizeLimitUpper = 256 // just an arbitrary number, could be changed without losing compatibility + messageQueueLimit = 1024 expirationCycle = time.Second transmissionCycle = 300 * time.Millisecond |