diff --git a/Gopkg.lock b/Gopkg.lock index 0e5d6131f5d..43aa1043f75 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -455,6 +455,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "607ea9c619b417bcb42e03b9cc84cb6916db143559595373fe6d23520d17a0eb" + inputs-digest = "f30a629a0f26d852e0989a2f67f6aab3f03fca182c90af74e966012771d90cb1" solver-name = "gps-cdcl" solver-version = 1 diff --git a/_assets/patches/geth/0004-whisper-notifications.patch b/_assets/patches/geth/0004-whisper-notifications.patch index c7c5baa1287..51f09dc3c91 100644 --- a/_assets/patches/geth/0004-whisper-notifications.patch +++ b/_assets/patches/geth/0004-whisper-notifications.patch @@ -15,7 +15,7 @@ index 000000000..de8ec85be + "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 ( @@ -244,7 +244,7 @@ index 000000000..7f27f0301 + "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" +) + @@ -833,7 +833,7 @@ index 000000000..106752186 + "crypto/sha256" + + 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/_assets/patches/geth/0013-whisperv6-notifications-envelopeversion.patch b/_assets/patches/geth/0013-whisperv6-notifications-envelopeversion.patch index dd2f2094f2c..93ad44a0c89 100644 --- a/_assets/patches/geth/0013-whisperv6-notifications-envelopeversion.patch +++ b/_assets/patches/geth/0013-whisperv6-notifications-envelopeversion.patch @@ -13,7 +13,7 @@ index 106752186..cca3fba71 100644 crand "crypto/rand" + - whisper "github.com/ethereum/go-ethereum/whisper/whisperv5" + whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" "golang.org/x/crypto/pbkdf2" ) @@ -24,7 +25,7 @@ func makeSessionKey() ([]byte, error) { 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 5ef3fd17f2b..e860e5e161c 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 e84938cc3ef..3faea59598a 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 a8b317212fe..45f6910989c 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 98af0355fc1..cb95efcd017 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" @@ -79,7 +79,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/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..3b511f49318 100644 --- a/vendor/github.com/ethereum/go-ethereum/whisper/notifications/server.go +++ b/vendor/github.com/ethereum/go-ethereum/whisper/notifications/server.go @@ -13,7 +13,7 @@ import ( "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" ) 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" )