diff options
author | gluk256 <gluk256@users.noreply.github.com> | 2018-01-12 19:11:22 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2018-01-12 19:11:22 +0800 |
commit | fd869dc839e2b3696e130224a43b9b25455ceb46 (patch) | |
tree | f19c5db8acac542f451cceac216333f7a75a2ef5 /whisper/whisperv6/doc.go | |
parent | 56152b31ac251d1cc68fcddbdad159ba5234c415 (diff) | |
download | go-tangerine-fd869dc839e2b3696e130224a43b9b25455ceb46.tar go-tangerine-fd869dc839e2b3696e130224a43b9b25455ceb46.tar.gz go-tangerine-fd869dc839e2b3696e130224a43b9b25455ceb46.tar.bz2 go-tangerine-fd869dc839e2b3696e130224a43b9b25455ceb46.tar.lz go-tangerine-fd869dc839e2b3696e130224a43b9b25455ceb46.tar.xz go-tangerine-fd869dc839e2b3696e130224a43b9b25455ceb46.tar.zst go-tangerine-fd869dc839e2b3696e130224a43b9b25455ceb46.zip |
whisper/whisperv6: implement pow/bloom exchange protocol (#15802)
This is the main feature of v6.
Diffstat (limited to 'whisper/whisperv6/doc.go')
-rw-r--r-- | whisper/whisperv6/doc.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/whisper/whisperv6/doc.go b/whisper/whisperv6/doc.go index 2a4911d65..da1b4ee5b 100644 --- a/whisper/whisperv6/doc.go +++ b/whisper/whisperv6/doc.go @@ -35,7 +35,6 @@ import ( ) const ( - EnvelopeVersion = uint64(0) ProtocolVersion = uint64(6) ProtocolVersionStr = "6.0" ProtocolName = "shh" @@ -52,11 +51,14 @@ const ( paddingMask = byte(3) signatureFlag = byte(4) - TopicLength = 4 - signatureLength = 65 - aesKeyLength = 32 - AESNonceLength = 12 - keyIdSize = 32 + TopicLength = 4 // in bytes + signatureLength = 65 // in bytes + aesKeyLength = 32 // in bytes + AESNonceLength = 12 // in bytes + keyIdSize = 32 // in bytes + bloomFilterSize = 64 // in bytes + + EnvelopeHeaderLength = 20 MaxMessageSize = uint32(10 * 1024 * 1024) // maximum accepted size of a message. DefaultMaxMessageSize = uint32(1024 * 1024) @@ -68,10 +70,8 @@ const ( expirationCycle = time.Second transmissionCycle = 300 * time.Millisecond - DefaultTTL = 50 // seconds - SynchAllowance = 10 // seconds - - EnvelopeHeaderLength = 20 + DefaultTTL = 50 // seconds + DefaultSyncAllowance = 10 // seconds ) type unknownVersionError uint64 |