231 Commits

Author SHA1 Message Date
Dmitry Shulyak
3a4601b568
Receiver notifies sender with reasons for discarding envelopes (#23)
* Receiver notifies sender with reasons for discarding envelopes

On a sender side we want to know if some messages were discarded. For this
purpose new message type was added - messagesResponse. This message type is versioned,
in order to make it easier transition to new message response, if we will want to extend it in near
future.

The response itself is formed from hash of envelopes received in a single batch, and errors
during processing of envelopes. Each error has a code and description, the reason for adding a code
is to provide some kind of user-friendly description to a client explaining why certain envelopes
were not yet delivered. Description will be simply logged on a sender side.

The followup for this change will be an extention on status-go side that will send particular envelope
errors to a client (e.g. status-react).

* Store errors as array and cover new changes with tests
v1.4.10
2019-03-26 10:15:16 +02:00
Dmitry Shulyak
37436ddc1e
Keep connection if time is not synchronized between several peers (#22) 2019-03-20 17:21:53 +02:00
Dmitry Shulyak
f60fda29e2
Upgrade to geth 1.8.23 (#21) v1.4.9 2019-03-14 08:04:41 +02:00
Dmitry Shulyak
88b3fdf3bd
Remove flakiness check before broadcast (#20) v1.4.8 2019-02-20 14:06:56 +02:00
Dmitry Shulyak
9e2f8db257
Send event when envelope was received from a peer (#19)
* Send event when envelope was received from a peer

* Update event description
v1.4.7
2019-02-19 09:08:40 +02:00
Adam Babik
9cdf6385f8
upgrade geth to 1.8.21 (#17) v1.4.6 2019-01-16 10:22:52 +01:00
Adam Babik
109fa96320
update geth to 1.8.20 (#16) v1.4.5 2018-12-17 18:22:49 +01:00
Adam Babik
82a7734c36
add event EventMailServerSyncFinished (#15) v1.4.4 2018-12-13 09:51:47 +01:00
Adam Babik
27e2442271
add request validation for mail sync (#14) v1.4.3 2018-12-11 09:22:16 +01:00
Adam Babik
6e5af097a1
add opcodes to sync messages (#13)
Two opcodes were introduced p2pSyncRequestCode and p2pSyncResponseCode. MailServer interface got extended with SyncMail(*Peer, SyncMailRequest) error.

There are no breaking changes.
v1.4.2
2018-12-06 09:33:58 +01:00
Dmitry
19c3d76859 Extend mail response with a peer and refactor tests 2018-12-03 10:32:48 +02:00
Dmitry
96d2199ed5 Send events when mail request is sent or expired v1.4.1 2018-11-28 10:49:39 +02:00
Dmitry
76c2447643 Extend whisper protocol with confirmations and add necessary events v1.4.0 2018-11-26 09:32:41 +02:00
Dmitry
552229d15d Add testify/require module to Gopkg.toml 2018-11-26 09:32:41 +02:00
Adam Babik
4cd9bb35e2
Upgrade geth 1.8.17 (#8) 2018-11-12 10:03:57 +01:00
Igor Mandrigin
14e1bbfd9b Add an response that mailserver failed to complete request. v1.2.0 2018-10-18 10:59:46 +02:00
Adam Babik
ca91ec35f6
Support batched messages in p2pMessageCode (#3) v1.1.0 2018-10-16 17:41:10 +02:00
Adam Babik
ca67be6b3b
add shhclient package (#2) v1.0.0 2018-10-15 16:03:46 +02:00
Dmitry
c72a926c11 Vendor all dependencies and run unit tests on travis CI 2018-10-01 11:38:03 +03:00
Dmitry
f415849507 Update gopkg.lock with forked ethereum 2018-10-01 11:18:56 +03:00
Dmitry
502d98953e Apply part of the watchdog change to status-go whisper module 2018-10-01 11:11:09 +03:00
Dmitry
d441b04413 Apply whisper metrics patch 2018-10-01 11:11:05 +03:00
Dmitry
3dff91373a Apply mail server cursor patch 2018-10-01 11:11:00 +03:00
Dmitry
07151c8376 Apply mail server completion response 2018-10-01 11:10:11 +03:00
Dmitry
8ff11fbbc0 Apply time source patch with changes in tests 2018-10-01 11:10:07 +03:00
Dmitry
5e489619d5 Apply whisper confirmations patch 2018-10-01 11:10:01 +03:00
Dmitry
536333e998 Apply 0014-whisperv6-notifications patches to status-go/whisper module 2018-10-01 11:09:03 +03:00
Dmitry
4d5a3acbfd Put repository under dep 2018-10-01 10:48:18 +03:00
Dmitry
e7fc8adc5b Remove not used modules 2018-10-01 10:43:22 +03:00
Pedro Pombeiro
aa0e214684 whisper: Fix interpretation of to parameter in shh_requestMessages (#16996)
The argument is inclusive rather than exclusive, according to docs.
2018-09-19 17:44:30 +02:00
Emil
e050a9667e all: simplify s[:] to s where s is a slice (#17673) 2018-09-14 22:07:13 +02:00
b00ris
1462c1b12a whisper: add light mode check to handshake (#16725) 2018-09-05 10:57:45 +02:00
Adam Babik
739fa07809 whisper: fix loop in expire() (#17532) 2018-08-29 13:56:13 +03:00
Wenbiao Zheng
98fed4d847 all: remove the duplicate 'the' in annotations (#17509) 2018-08-27 11:49:29 +03:00
Eugene Valeyev
b1785a6112 whisper: fixed broken partial topic filtering
Changes in #15811 broke partial topic filtering. Re-enable it.
2018-08-13 16:27:25 +02:00
b00ris
e28f4af720 whisper: remove unused error (#17315) 2018-08-07 15:16:56 +02:00
Ralph Caraveo III
9f139cbd6b all: switch out defunct set library to different one (#16873)
* keystore, ethash, eth, miner, rpc, whisperv6: tech debt with now defunct set.

* whisperv5: swap out gopkg.in/fatih/set.v0 with supported set
2018-07-16 10:54:19 +03:00
Adrià Cidre
6d0071d84c whisper: Reduce message loop log from Warn to Info (#17055) 2018-06-26 04:31:05 -04:00
Armin Braun
f2b01a0e17 #15685 made peer_test.go more portable by using random free port instead of hardcoded port 30303 (#15687)
Improves test portability by resolving 127.0.0.1:0
to get a random free port instead of the hard coded one. Now
the test works if you have a running node on the same
interface already.

Fixes #15685
2018-06-14 10:54:00 +02:00
Felix Lange
bcdcf1cc33 crypto: replace ToECDSAPub with error-checking func UnmarshalPubkey (#16932)
ToECDSAPub was unsafe because it returned a non-nil key with nil X, Y in
case of invalid input. This change replaces ToECDSAPub with
UnmarshalPubkey across the codebase.
2018-06-12 15:26:08 +02:00
Andrea Franz
c4287e578d whisper/shhclient: update call to shh_post to expect string instead of bool (#16757)
Fixes #16756
2018-05-29 04:36:31 -04:00
Andrea Franz
0156532b43 whisper/shhclient: update call to shh_generateSymKeyFromPassword to pass a string (#16668) 2018-05-09 13:40:59 +02:00
Ivan Daniluk
5e1f54c064 whisper/mailserver: pass init error to the caller (#16671)
* whisper/mailserver: pass init error to the caller

* whisper/mailserver: add returns to fmt.Errorf

* whisper/mailserver: check err in mailserver init test
2018-05-04 12:10:18 +03:00
Eli
86907e7607 whisper: Golint fixes in whisper packages (#16637) 2018-05-02 08:17:17 +02:00
gluk256
0a4cbece76 whisper/whisperv6: post returns the hash of sent message (#16495) 2018-04-19 15:34:24 +02:00
thomasmodeneis
3e994ca586 build: enable goimports and varcheck linters (#16446) 2018-04-18 00:53:50 +02:00
Guillaume Ballet
67e431d5be whisper: fix issue in topic list copy (#16381)
- Fixes #16271. What was appeneded was a pointer to
an object that changes during the iteration.
- The topic is allocated as a 4-byte array, fill partial topics
with 0s. Partial topics are currently disabled, but would
crash as they rely on the presence of byte number 3.
2018-03-27 17:26:08 +02:00
Guillaume Ballet
8951f4ea6b whisper: switch all remaining components from v5 to v6 2018-03-26 16:36:14 +02:00
David Huie
75cd6be0e4 ecies: drop randomness parameter from PrivateKey.Decrypt (#16374)
The parameter `rand` is unused in `PrivateKey.Decrypt`. Decryption in
the ECIES encryption scheme is deterministic, so randomness isn't
needed.
2018-03-26 13:46:18 +03:00
Guillaume Ballet
f475c8977d whisper: some components are still using v5, switch to v6 2018-03-22 15:48:52 +01:00