25321b2c03
add a metric for received/validated/rejected envelopes
...
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-11-20 13:29:12 +01:00
fad088a1f7
port metrics to new prometheus library
...
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-11-20 13:29:12 +01:00
f326756ecf
add Topic to EnvelopeEvent
...
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-11-20 13:29:12 +01:00
Adam Babik
7ab066bada
Do not throttle when limits are unset ( #37 )
2019-11-17 21:34:58 +01:00
Adam Babik
c11e8d8fb8
Add whitelisting and setting rate limiter from outside ( #36 )
2019-11-15 13:32:20 +01:00
Andre Medeiros
eaa7a0f280
Add fuzzing target
2019-11-12 14:54:50 -05:00
Adam Babik
51d2371cf9
Implement peer rate limiter ( #33 )
...
This change introduces a rate limiting for peer's IP and ID. It allows for 10 messages per second from a single IP and 3 messages per second from a single peer ID. It does not enforce this policy though, it only collects stats for now.
2019-11-12 08:11:38 +01:00
Adam Babik
bac2d543b7
Fix ReceivedMessage.ValidateAndParse out-of-bands reads ( #31 )
2019-11-11 20:08:54 +01:00
Adam Babik
39d4d0a14f
Define MailServer.Deliver method accepting MessagesRequest ( #32 )
2019-11-02 15:31:00 +01:00
Adam Babik
8be20fd33d
crypto: add SignatureLength constant and use it everywhere ( #19996 )
2019-09-28 11:01:13 +02:00
Adam Babik
e234c0fdf9
cmd, contracts, eth, p2p, signer, whisper: fixed ineffectual assignments ( #19869 )
2019-09-28 10:57:14 +02:00
Adam Babik
75f34771fb
core/state, p2p/discover, trie, whisper: avoid unnecessary conversions ( #19870 )
2019-09-28 10:54:57 +02:00
Adam Babik
82c2163f41
whisper: PoW calculations as specified in EIP-627 ( #19753 )
2019-09-28 10:53:51 +02:00
Adam Babik
159b317456
upgrade geth to 1.9.5 and introduce go.mod
2019-09-28 10:51:24 +02:00
Adam Babik
bbabc9ff4e
whisper/whisperv6: fix PoW calculations to match the spec ( #19330 )
2019-09-28 10:47:51 +02:00
Adam Babik
3e303b1d5f
fix a case when Limit is 0 when syncing mailservers ( #29 )
...
It also improves passing errors to the requester.
2019-06-26 11:11:20 +02:00
Andrea Maria Piana
f62a6add56
Use rawsyncresponse
2019-05-06 14:33:58 +02:00
Andrea Maria Piana
f55e777bd6
Add SendRawP2PDirect
...
Adds a function to send RawValue envelopes. This is needed as a
performance optimization, as currently most of the processing time is
spent decoding envelopes and coding them back when sending them.
This will allow us to skip this unnecessary step.
2019-05-06 12:32:09 +02:00
Dmitry Shulyak
4fae75da94
Post request.completed only after envelopes from that request were added to a filter ( #27 )
...
* Post completion event after every message was added to a filter
* Add test that request.completed received after all envelope.avaiable
* Process all p2p envelopes and completion events sequantially
* Stop whisper after test
2019-04-19 08:14:44 +03:00
Dmitry Shulyak
efca6fbb0c
Pass information that message was received from a mailsver to a whisper user ( #26 )
2019-04-18 09:40:45 +03:00
Dmitry Shulyak
b8da753209
Change filter internal message store to inteface ( #25 )
2019-04-04 11:46:29 +03:00
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
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
88b3fdf3bd
Remove flakiness check before broadcast ( #20 )
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
2019-02-19 09:08:40 +02:00
Adam Babik
109fa96320
update geth to 1.8.20 ( #16 )
2018-12-17 18:22:49 +01:00
Adam Babik
82a7734c36
add event EventMailServerSyncFinished ( #15 )
2018-12-13 09:51:47 +01:00
Adam Babik
27e2442271
add request validation for mail sync ( #14 )
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.
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
2018-11-28 10:49:39 +02:00
Dmitry
76c2447643
Extend whisper protocol with confirmations and add necessary events
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.
2018-10-18 10:59:46 +02:00
Adam Babik
ca91ec35f6
Support batched messages in p2pMessageCode ( #3 )
2018-10-16 17:41:10 +02: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
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