Commit Graph

13 Commits

Author SHA1 Message Date
Guillaume Ballet
54fd263b40
whisper: PoW calculations as specified in EIP-627 (#19753)
* whisper: PoW calculations as specified in EIP-627

* Fix unit tests
2019-06-25 12:01:34 +02:00
Guillaume Ballet
df717abc99 whisper/whisperv6: fix PoW calculations to match the spec (#19330)
This PR fixes two issues in the PoW calculation of a Whisper envelope,
compared to the spec (see PoW Requirements):

- The pow is supposed to take the leading number of zeroes (i.e. most
  significant zeroes) and what it did was to take the number of trailing
  zeroes (i.e. least significant zeroes). It has been fixed to match what
  the spec and Parity does.
- The spec expects to use the size of the RLP encoded envelope, and it took
  something else, as described in #18070.
2019-03-26 10:23:59 +01:00
gluk256
f1d440a437 whisper: final refactoring (#16259)
whisper: final refactoring
2018-03-06 23:37:43 +01:00
Vlad
6219a33822 whisper: filereader mode introduced to wnode 2018-03-02 14:54:54 +01:00
Vlad
ee75a90ab4 whisper: topics replaced by bloom filters 2018-03-01 16:04:09 +01:00
gluk256
ccf8083537 whisper: Seal function fixed (#16048) 2018-02-09 17:25:03 +02:00
gluk256
a9e4a90d57 whisper: change the whisper message format so as to add the payload size (#15870)
* whisper: message format changed

* whisper: tests fixed

* whisper: style fixes

* whisper: fixed names, fixed failing tests

* whisper: fix merge issue in #15870

Occured while using the github online merge tool. Lesson learned.

* whisper: fix a gofmt error for #15870
2018-01-30 10:55:08 +02:00
Guillaume Ballet
367c329b88 whisper: remove linter warnings (#15972)
* whisper: fixes warnings from the code linter

* whisper: more non-API-breaking changes

The remaining lint errors are because of auto-generated
files and one is because an exported function has a non-
exported return type. Changing this would break the API,
and will be part of another commit for easier reversal.

* whisper: un-export NewSentMessage to please the linter

This is an API change, which is why it's in its own commit.
This change was initiated after the linter complained that
the returned type wasn't exported. I chose to un-export
the function instead of exporting the type, because that
type is an implementation detail that I would like to
change in the near future to make the code more
readable and with an increased coverage.

* whisper: update gencodec output after upgrading it to new lint standards
2018-01-26 13:45:10 +02:00
gluk256
fd869dc839 whisper/whisperv6: implement pow/bloom exchange protocol (#15802)
This is the main feature of v6.
2018-01-12 12:11:22 +01:00
Guillaume Ballet
bf62acf033 whisper/whisperv6: remove Version from the envelope (#15621) 2017-12-08 16:08:56 +01:00
Guillaume Ballet
d95962cd5d whisper/whisperv6: remove aesnonce (#15578)
As per EIP-627, the salt for symmetric encryption is now
part of the payload. This commit does that.
2017-12-08 11:40:59 +01:00
Guillaume Ballet
20fe928914 whisper: rename EnvNonce to Nonce in the v6 Envelope (#15579) 2017-12-01 12:50:19 +01:00
gluk256
9f7cd75682 whisper/whisperv6: initial commit (clone of v5) (#15324) 2017-11-03 21:29:49 +01:00