mirror of
https://github.com/status-im/status-go.git
synced 2025-01-09 22:26:30 +00:00
299b3fc093
Why make the change? This implements waku/1 which is a breaking change as waku/0 diverged from the specs. What has changed? - Added v1 namespace - Changed the testing code to test from the outside rather than stubbing p2p specific messages, so that any version specific code is under `vx` namespaces - Split waku vs waku/x test code - Added a test suite that can be used for different versions Things still to do I kept the tests we have for the versioned aspect of waku, probably we want to add some or change other to provide the optimal test coverage.
20 lines
944 B
Go
20 lines
944 B
Go
package v1
|
|
|
|
// Waku protocol parameters
|
|
const (
|
|
Version = uint64(1) // Peer version number
|
|
VersionStr = "1" // The same, as a string
|
|
Name = "waku" // Nickname of the protocol
|
|
|
|
// Waku protocol message codes, according to https://github.com/vacp2p/specs/blob/master/specs/waku/waku-0.md
|
|
statusCode = 0 // used in the handshake
|
|
messagesCode = 1 // regular message
|
|
statusUpdateCode = 22 // update of settings
|
|
batchAcknowledgedCode = 11 // confirmation that batch of envelopes was received
|
|
messageResponseCode = 12 // includes confirmation for delivery and information about errors
|
|
p2pRequestCompleteCode = 125 // peer-to-peer message, used by Dapp protocol
|
|
p2pRequestCode = 126 // peer-to-peer message, used by Dapp protocol
|
|
p2pMessageCode = 127 // peer-to-peer message (to be consumed by the peer, but not forwarded any further)
|
|
NumberOfMessageCodes = 128
|
|
)
|