whisper/whisperv6: implement pow/bloom exchange protocol (#15802)
This is the main feature of v6.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user