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.
* 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
* 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
Two opcodes were introduced p2pSyncRequestCode and p2pSyncResponseCode. MailServer interface got extended with SyncMail(*Peer, SyncMailRequest) error.
There are no breaking changes.
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
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.
- 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.