From f089c11614d7915f48df709f4d80679a9c12bd16 Mon Sep 17 00:00:00 2001 From: Pedro Pombeiro Date: Tue, 13 Feb 2018 10:18:33 +0100 Subject: [PATCH] Update project to use Whisper v6. Part of #638 --- Gopkg.lock | 3 +- .../geth/0016-geth-17-use-whisperv6.patch | 83 +++++++++++++++++++ _assets/patches/geth/README.md | 1 + geth/account/accounts_test.go | 2 +- geth/common/types.go | 2 +- geth/common/types_mock.go | 6 +- geth/mailservice/mailservice.go | 2 +- geth/mailservice/mailservice_api.go | 2 +- geth/mailservice/mailservice_api_test.go | 2 +- geth/mailservice/mailservice_mock.go | 6 +- geth/node/manager.go | 2 +- geth/node/node.go | 2 +- metrics/whisper/tracer_expvar.go | 2 +- metrics/whisper/tracer_log.go | 2 +- metrics/whisper/tracer_prometheus.go | 2 +- t/e2e/node/manager_test.go | 2 +- t/e2e/rpc/rpc_test.go | 4 +- t/e2e/suites.go | 2 +- t/e2e/whisper/whisper_jail_test.go | 4 +- t/e2e/whisper/whisper_mailbox_test.go | 12 +-- t/e2e/whisper/whisper_test.go | 2 +- .../whisper/mailserver/mailserver.go | 2 +- .../whisper/notifications/discovery.go | 2 +- .../whisper/notifications/server.go | 9 +- .../whisper/notifications/utils.go | 2 +- .../go-ethereum/whisper/shhclient/client.go | 2 +- 26 files changed, 124 insertions(+), 38 deletions(-) create mode 100644 _assets/patches/geth/0016-geth-17-use-whisperv6.patch diff --git a/Gopkg.lock b/Gopkg.lock index b38890147ae..0f6b40dcc82 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -107,7 +107,8 @@ "trie", "whisper/mailserver", "whisper/notifications", - "whisper/whisperv5" + "whisper/whisperv5", + "whisper/whisperv6" ] revision = "5b2cc44bf2b32bb482def02d7c8fa32ba08d0bf4" source = "https://github.com/status-im/go-ethereum.git" diff --git a/_assets/patches/geth/0016-geth-17-use-whisperv6.patch b/_assets/patches/geth/0016-geth-17-use-whisperv6.patch new file mode 100644 index 00000000000..74df36a38d5 --- /dev/null +++ b/_assets/patches/geth/0016-geth-17-use-whisperv6.patch @@ -0,0 +1,83 @@ +diff --git a/whisper/mailserver/mailserver.go b/whisper/mailserver/mailserver.go +index 0ec6ec570..6555fd5c0 100644 +--- a/whisper/mailserver/mailserver.go ++++ b/whisper/mailserver/mailserver.go +@@ -26,7 +26,7 @@ import ( + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/rlp" +- whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" ++ whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" + "github.com/syndtr/goleveldb/leveldb" + "github.com/syndtr/goleveldb/leveldb/util" + ) +diff --git a/whisper/notifications/discovery.go b/whisper/notifications/discovery.go +index de8ec85be..9a131ded1 100644 +--- a/whisper/notifications/discovery.go ++++ b/whisper/notifications/discovery.go +@@ -9,7 +9,7 @@ import ( + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/log" +- whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" ++ whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" + ) + + const ( +diff --git a/whisper/notifications/server.go b/whisper/notifications/server.go +index 7f27f0301..94dd1b683 100644 +--- a/whisper/notifications/server.go ++++ b/whisper/notifications/server.go +@@ -9,11 +9,12 @@ import ( + "crypto/ecdsa" + "encoding/hex" + "encoding/json" ++ + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/p2p" +- whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" ++ whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" + "github.com/status-im/status-go/geth/params" + ) + +@@ -58,9 +59,9 @@ type NotificationServer struct { + // ClientSession abstracts notification client, which expects notifications whenever + // some envelope can be decoded with session key (key hash is compared for optimization) + type ClientSession struct { +- ClientKey string // public key uniquely identifying a client +- SessionKey []byte // actual symkey used for client - server communication +- SessionKeyHash common.Hash // The Keccak256Hash of the symmetric key, which is shared between server/client ++ ClientKey string // public key uniquely identifying a client ++ SessionKey []byte // actual symkey used for client - server communication ++ SessionKeyHash common.Hash // The Keccak256Hash of the symmetric key, which is shared between server/client + SessionKeyInput []byte // raw symkey used as input for actual SessionKey + } + +diff --git a/whisper/notifications/utils.go b/whisper/notifications/utils.go +index cca3fba71..dc2e78d73 100644 +--- a/whisper/notifications/utils.go ++++ b/whisper/notifications/utils.go +@@ -7,7 +7,7 @@ import ( + + crand "crypto/rand" + +- whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" ++ whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" + "golang.org/x/crypto/pbkdf2" + ) + +diff --git a/whisper/shhclient/client.go b/whisper/shhclient/client.go +index 61b4775d9..d9754f350 100644 +--- a/whisper/shhclient/client.go ++++ b/whisper/shhclient/client.go +@@ -22,7 +22,7 @@ import ( + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/rpc" +- whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" ++ whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" + ) + + // Client defines typed wrappers for the Whisper v5 RPC API. diff --git a/_assets/patches/geth/README.md b/_assets/patches/geth/README.md index 565a814eef7..d9711ff744c 100644 --- a/_assets/patches/geth/README.md +++ b/_assets/patches/geth/README.md @@ -30,6 +30,7 @@ Instructions for creating a patch from the command line: - [`0013-whisperv6-notifications-envelopeversion.patch`](./0013-whisperv6-notifications-envelopeversion.patch) — replaces usage of EnvelopeVersion with ProtocolVersion in notifications for Whisper v6 - [`0014-whisperv6-notifications.patch`](./0014-whisperv6-notifications.patch) — adds Whisper v6 notifications (need to be reviewed and documented) - [`0015-whisperv6-envelopes-tracing.patch`](./0015-whisperv6-envelopes-tracing.patch) — adds Whisper v6 envelope tracing (need to be reviewed and documented) +- [`0016-geth-17-use-whisperv6.patch`](./0016-geth-17-use-whisperv6.patch) — changes previous patches to use Whisper v6 instead of Whisper v5 # Updating upstream version diff --git a/geth/account/accounts_test.go b/geth/account/accounts_test.go index 26e0142dbe1..989b10c651a 100644 --- a/geth/account/accounts_test.go +++ b/geth/account/accounts_test.go @@ -12,7 +12,7 @@ import ( "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts/keystore" gethcommon "github.com/ethereum/go-ethereum/common" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" + whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" "github.com/golang/mock/gomock" "github.com/status-im/status-go/geth/common" . "github.com/status-im/status-go/t/utils" diff --git a/geth/common/types.go b/geth/common/types.go index f1b80245b69..9c8ed55b3cc 100644 --- a/geth/common/types.go +++ b/geth/common/types.go @@ -16,7 +16,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/les" "github.com/ethereum/go-ethereum/node" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" + whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" "github.com/robertkrimen/otto" "github.com/status-im/status-go/geth/params" "github.com/status-im/status-go/geth/rpc" diff --git a/geth/common/types_mock.go b/geth/common/types_mock.go index 9f8fede64ac..4fd5b38bc1e 100644 --- a/geth/common/types_mock.go +++ b/geth/common/types_mock.go @@ -11,7 +11,7 @@ import ( common "github.com/ethereum/go-ethereum/common" les "github.com/ethereum/go-ethereum/les" node "github.com/ethereum/go-ethereum/node" - whisperv5 "github.com/ethereum/go-ethereum/whisper/whisperv5" + whisperv6 "github.com/ethereum/go-ethereum/whisper/whisperv6" gomock "github.com/golang/mock/gomock" otto "github.com/robertkrimen/otto" params "github.com/status-im/status-go/geth/params" @@ -166,9 +166,9 @@ func (mr *MockNodeManagerMockRecorder) LightEthereumService() *gomock.Call { } // WhisperService mocks base method -func (m *MockNodeManager) WhisperService() (*whisperv5.Whisper, error) { +func (m *MockNodeManager) WhisperService() (*whisperv6.Whisper, error) { ret := m.ctrl.Call(m, "WhisperService") - ret0, _ := ret[0].(*whisperv5.Whisper) + ret0, _ := ret[0].(*whisperv6.Whisper) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/geth/mailservice/mailservice.go b/geth/mailservice/mailservice.go index e9e136a525d..7343f8078b2 100644 --- a/geth/mailservice/mailservice.go +++ b/geth/mailservice/mailservice.go @@ -4,7 +4,7 @@ import ( "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/rpc" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" + whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" ) // ServiceProvider provides node and required services. diff --git a/geth/mailservice/mailservice_api.go b/geth/mailservice/mailservice_api.go index 9db4495cb9b..fd9702a48de 100644 --- a/geth/mailservice/mailservice_api.go +++ b/geth/mailservice/mailservice_api.go @@ -9,7 +9,7 @@ import ( "time" "github.com/ethereum/go-ethereum/p2p/discover" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" + whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" "github.com/status-im/status-go/geth/log" ) diff --git a/geth/mailservice/mailservice_api_test.go b/geth/mailservice/mailservice_api_test.go index c0a4db91901..9b2eff8ff23 100644 --- a/geth/mailservice/mailservice_api_test.go +++ b/geth/mailservice/mailservice_api_test.go @@ -6,7 +6,7 @@ import ( "time" "github.com/ethereum/go-ethereum/node" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" + whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" gomock "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" ) diff --git a/geth/mailservice/mailservice_mock.go b/geth/mailservice/mailservice_mock.go index 2dd64f59190..db328277e8f 100644 --- a/geth/mailservice/mailservice_mock.go +++ b/geth/mailservice/mailservice_mock.go @@ -6,7 +6,7 @@ package mailservice import ( node "github.com/ethereum/go-ethereum/node" - whisperv5 "github.com/ethereum/go-ethereum/whisper/whisperv5" + whisperv6 "github.com/ethereum/go-ethereum/whisper/whisperv6" gomock "github.com/golang/mock/gomock" reflect "reflect" ) @@ -48,9 +48,9 @@ func (mr *MockServiceProviderMockRecorder) Node() *gomock.Call { } // WhisperService mocks base method -func (m *MockServiceProvider) WhisperService() (*whisperv5.Whisper, error) { +func (m *MockServiceProvider) WhisperService() (*whisperv6.Whisper, error) { ret := m.ctrl.Call(m, "WhisperService") - ret0, _ := ret[0].(*whisperv5.Whisper) + ret0, _ := ret[0].(*whisperv6.Whisper) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/geth/node/manager.go b/geth/node/manager.go index ab1dc14954a..95dc981ed35 100644 --- a/geth/node/manager.go +++ b/geth/node/manager.go @@ -14,7 +14,7 @@ import ( "github.com/ethereum/go-ethereum/les" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/p2p/discover" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" + whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" "github.com/status-im/status-go/geth/log" "github.com/status-im/status-go/geth/mailservice" "github.com/status-im/status-go/geth/params" diff --git a/geth/node/node.go b/geth/node/node.go index 877b19d37c0..ee1b0a3238b 100644 --- a/geth/node/node.go +++ b/geth/node/node.go @@ -20,7 +20,7 @@ import ( "github.com/ethereum/go-ethereum/p2p/nat" "github.com/ethereum/go-ethereum/whisper/mailserver" "github.com/ethereum/go-ethereum/whisper/notifications" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" + whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" "github.com/status-im/status-go/geth/log" "github.com/status-im/status-go/geth/params" shhmetrics "github.com/status-im/status-go/metrics/whisper" diff --git a/metrics/whisper/tracer_expvar.go b/metrics/whisper/tracer_expvar.go index 9e2a71d2a93..1fa9337e36d 100644 --- a/metrics/whisper/tracer_expvar.go +++ b/metrics/whisper/tracer_expvar.go @@ -6,7 +6,7 @@ package whisper import ( "expvar" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" + whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" ) var ( diff --git a/metrics/whisper/tracer_log.go b/metrics/whisper/tracer_log.go index ce81ade5b4d..7a4c47cb75a 100644 --- a/metrics/whisper/tracer_log.go +++ b/metrics/whisper/tracer_log.go @@ -4,7 +4,7 @@ package whisper import ( - whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" + whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" "github.com/status-im/status-go/geth/log" ) diff --git a/metrics/whisper/tracer_prometheus.go b/metrics/whisper/tracer_prometheus.go index 728dc1d8ca9..81d05103e01 100644 --- a/metrics/whisper/tracer_prometheus.go +++ b/metrics/whisper/tracer_prometheus.go @@ -6,7 +6,7 @@ package whisper import ( "strconv" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" + whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" "github.com/prometheus/client_golang/prometheus" ) diff --git a/t/e2e/node/manager_test.go b/t/e2e/node/manager_test.go index 9ef6c8d1d4d..13caf48f6c9 100644 --- a/t/e2e/node/manager_test.go +++ b/t/e2e/node/manager_test.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum/go-ethereum/les" gethnode "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/rpc" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" + whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" "github.com/status-im/status-go/geth/node" "github.com/status-im/status-go/geth/params" diff --git a/t/e2e/rpc/rpc_test.go b/t/e2e/rpc/rpc_test.go index d8ca2b14310..f04dacf2aa3 100644 --- a/t/e2e/rpc/rpc_test.go +++ b/t/e2e/rpc/rpc_test.go @@ -64,7 +64,7 @@ func (s *RPCTestSuite) TestCallRPC() { { `{"jsonrpc":"2.0","method":"shh_version","params":[],"id":67}`, func(resultJSON string) { - expected := `{"jsonrpc":"2.0","id":67,"result":"5.0"}` + expected := `{"jsonrpc":"2.0","id":67,"result":"6.0"}` s.Equal(expected, resultJSON) }, }, @@ -135,7 +135,7 @@ func (s *RPCTestSuite) TestCallRawResult() { s.NotNil(client) jsonResult := client.CallRaw(`{"jsonrpc":"2.0","method":"shh_version","params":[],"id":67}`) - s.Equal(`{"jsonrpc":"2.0","id":67,"result":"5.0"}`, jsonResult) + s.Equal(`{"jsonrpc":"2.0","id":67,"result":"6.0"}`, jsonResult) s.NoError(s.NodeManager.StopNode()) } diff --git a/t/e2e/suites.go b/t/e2e/suites.go index 50dc4d6788e..06a8100b923 100644 --- a/t/e2e/suites.go +++ b/t/e2e/suites.go @@ -2,7 +2,7 @@ package t import ( "github.com/ethereum/go-ethereum/les" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" + whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" "github.com/status-im/status-go/geth/api" "github.com/status-im/status-go/geth/common" "github.com/status-im/status-go/geth/log" diff --git a/t/e2e/whisper/whisper_jail_test.go b/t/e2e/whisper/whisper_jail_test.go index 336aac23425..7fc87d8e90a 100644 --- a/t/e2e/whisper/whisper_jail_test.go +++ b/t/e2e/whisper/whisper_jail_test.go @@ -5,7 +5,7 @@ import ( "time" "github.com/ethereum/go-ethereum/crypto" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" + whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" "github.com/status-im/status-go/geth/common" "github.com/status-im/status-go/static" e2e "github.com/status-im/status-go/t/e2e" @@ -77,7 +77,7 @@ func (s *WhisperJailTestSuite) TestJailWhisper() { { "test 0: ensure correct version of Whisper is used", ` - var expectedVersion = '5.0'; + var expectedVersion = '6.0'; if (web3.version.whisper != expectedVersion) { throw 'unexpected shh version, expected: ' + expectedVersion + ', got: ' + web3.version.whisper; } diff --git a/t/e2e/whisper/whisper_mailbox_test.go b/t/e2e/whisper/whisper_mailbox_test.go index fc19591eb2b..791383f573f 100644 --- a/t/e2e/whisper/whisper_mailbox_test.go +++ b/t/e2e/whisper/whisper_mailbox_test.go @@ -12,7 +12,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p/discover" - "github.com/ethereum/go-ethereum/whisper/whisperv5" + "github.com/ethereum/go-ethereum/whisper/whisperv6" "github.com/status-im/status-go/geth/api" "github.com/status-im/status-go/geth/rpc" e2e "github.com/status-im/status-go/t/e2e" @@ -68,7 +68,7 @@ func (s *WhisperMailboxSuite) TestRequestMessageFromMailboxAsync() { s.Require().NotNil(rpcClient) //create topic - topic := whisperv5.BytesToTopic([]byte("topic name")) + topic := whisperv6.BytesToTopic([]byte("topic name")) //Add key pair to whisper keyID, err := senderWhisperService.NewKeyPair() @@ -177,7 +177,7 @@ func (s *WhisperMailboxSuite) TestRequestMessagesInGroupChat() { groupChatKey, err := aliceWhisperService.GetSymKey(groupChatKeyID) s.Require().NoError(err) //generate group chat topic - groupChatTopic := whisperv5.BytesToTopic([]byte("groupChatTopic")) + groupChatTopic := whisperv6.BytesToTopic([]byte("groupChatTopic")) groupChatPayload := newGroupChatParams(groupChatKey, groupChatTopic) payloadStr, err := groupChatPayload.Encode() s.Require().NoError(err) @@ -188,14 +188,14 @@ func (s *WhisperMailboxSuite) TestRequestMessagesInGroupChat() { bobKey, err := bobWhisperService.GetPrivateKey(bobKeyID) s.Require().NoError(err) bobPubkey := hexutil.Bytes(crypto.FromECDSAPub(&bobKey.PublicKey)) - bobAliceKeySendTopic := whisperv5.BytesToTopic([]byte("bobAliceKeySendTopic ")) + bobAliceKeySendTopic := whisperv6.BytesToTopic([]byte("bobAliceKeySendTopic ")) charlieKeyID, err := charlieWhisperService.NewKeyPair() s.Require().NoError(err) charlieKey, err := charlieWhisperService.GetPrivateKey(charlieKeyID) s.Require().NoError(err) charliePubkey := hexutil.Bytes(crypto.FromECDSAPub(&charlieKey.PublicKey)) - charlieAliceKeySendTopic := whisperv5.BytesToTopic([]byte("charlieAliceKeySendTopic ")) + charlieAliceKeySendTopic := whisperv6.BytesToTopic([]byte("charlieAliceKeySendTopic ")) //bob and charlie create message filter bobMessageFilterID := s.createPrivateChatMessageFilter(bobRPCClient, bobKeyID, bobAliceKeySendTopic.String()) @@ -277,7 +277,7 @@ func (s *WhisperMailboxSuite) TestRequestMessagesInGroupChat() { s.Require().Equal(helloWorldMessage, messages[0]["payload"].(string)) } -func newGroupChatParams(symkey []byte, topic whisperv5.TopicType) groupChatParams { +func newGroupChatParams(symkey []byte, topic whisperv6.TopicType) groupChatParams { groupChatKeyStr := hexutil.Bytes(symkey).String() return groupChatParams{ Key: groupChatKeyStr, diff --git a/t/e2e/whisper/whisper_test.go b/t/e2e/whisper/whisper_test.go index 6cda8c3e2b8..3e6ae166bea 100644 --- a/t/e2e/whisper/whisper_test.go +++ b/t/e2e/whisper/whisper_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/ethereum/go-ethereum/crypto" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" + whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" "github.com/status-im/status-go/geth/account" "github.com/status-im/status-go/geth/node" e2e "github.com/status-im/status-go/t/e2e" diff --git a/vendor/github.com/ethereum/go-ethereum/whisper/mailserver/mailserver.go b/vendor/github.com/ethereum/go-ethereum/whisper/mailserver/mailserver.go index 0ec6ec570c1..6555fd5c0ba 100644 --- a/vendor/github.com/ethereum/go-ethereum/whisper/mailserver/mailserver.go +++ b/vendor/github.com/ethereum/go-ethereum/whisper/mailserver/mailserver.go @@ -26,7 +26,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/rlp" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" + whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/util" ) diff --git a/vendor/github.com/ethereum/go-ethereum/whisper/notifications/discovery.go b/vendor/github.com/ethereum/go-ethereum/whisper/notifications/discovery.go index de8ec85bef1..9a131ded145 100644 --- a/vendor/github.com/ethereum/go-ethereum/whisper/notifications/discovery.go +++ b/vendor/github.com/ethereum/go-ethereum/whisper/notifications/discovery.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" + whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" ) const ( diff --git a/vendor/github.com/ethereum/go-ethereum/whisper/notifications/server.go b/vendor/github.com/ethereum/go-ethereum/whisper/notifications/server.go index 7f27f030184..94dd1b683ed 100644 --- a/vendor/github.com/ethereum/go-ethereum/whisper/notifications/server.go +++ b/vendor/github.com/ethereum/go-ethereum/whisper/notifications/server.go @@ -9,11 +9,12 @@ import ( "crypto/ecdsa" "encoding/hex" "encoding/json" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/p2p" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" + whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" "github.com/status-im/status-go/geth/params" ) @@ -58,9 +59,9 @@ type NotificationServer struct { // ClientSession abstracts notification client, which expects notifications whenever // some envelope can be decoded with session key (key hash is compared for optimization) type ClientSession struct { - ClientKey string // public key uniquely identifying a client - SessionKey []byte // actual symkey used for client - server communication - SessionKeyHash common.Hash // The Keccak256Hash of the symmetric key, which is shared between server/client + ClientKey string // public key uniquely identifying a client + SessionKey []byte // actual symkey used for client - server communication + SessionKeyHash common.Hash // The Keccak256Hash of the symmetric key, which is shared between server/client SessionKeyInput []byte // raw symkey used as input for actual SessionKey } diff --git a/vendor/github.com/ethereum/go-ethereum/whisper/notifications/utils.go b/vendor/github.com/ethereum/go-ethereum/whisper/notifications/utils.go index cca3fba7186..dc2e78d7360 100644 --- a/vendor/github.com/ethereum/go-ethereum/whisper/notifications/utils.go +++ b/vendor/github.com/ethereum/go-ethereum/whisper/notifications/utils.go @@ -7,7 +7,7 @@ import ( crand "crypto/rand" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" + whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" "golang.org/x/crypto/pbkdf2" ) diff --git a/vendor/github.com/ethereum/go-ethereum/whisper/shhclient/client.go b/vendor/github.com/ethereum/go-ethereum/whisper/shhclient/client.go index 61b4775d953..d9754f350e6 100644 --- a/vendor/github.com/ethereum/go-ethereum/whisper/shhclient/client.go +++ b/vendor/github.com/ethereum/go-ethereum/whisper/shhclient/client.go @@ -22,7 +22,7 @@ import ( "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/rpc" - whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" + whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" ) // Client defines typed wrappers for the Whisper v5 RPC API.