201 Commits

Author SHA1 Message Date
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
gluk256
cc64d28841 whisper: final refactoring (#16259)
whisper: final refactoring
2018-03-06 23:37:43 +01:00
gluk256
6f4d8d1c84 Merge pull request #16231 from gluk256/303-reader
whisper: filereader mode introduced to wnode
2018-03-03 09:40:01 +01:00
gluk256
70c41f0771 whisper/whisperv6: delete unused function (#16234) 2018-03-03 00:54:15 +01:00
Vlad
4e423276a6 whisper: filereader mode introduced to wnode 2018-03-02 14:54:54 +01:00
Vlad
31f7f7af81 whisper: topics replaced by bloom filters 2018-03-01 16:04:09 +01:00
Guillaume Ballet
162973eff1 Merge pull request #16210 from gluk256/288-filter-optimization
whisper: message filtering optimization

Only run the message through filters who registered their interest.
2018-02-28 17:28:09 +01:00
Vlad
96e10f14f1 whisper: style fixes 2018-02-28 15:05:35 +01:00
Guillaume Ballet
3fb52498eb Merge pull request #16214 from b00ris/whisperv6_datarace
whisper: fixed dataraces in peer unit tests
2018-02-28 14:31:19 +01:00
b00ris
3c84f6283c whisper: fix typo 2018-02-28 14:38:42 +03:00
b00ris
4c59e217af whisper: fixed datarace 2018-02-28 09:50:36 +03:00
Vlad
861918d7e9 whisper: comment updated 2018-02-28 00:39:38 +01:00
Vlad
d550d9390c whsiper: refactoring 2018-02-27 23:38:20 +01:00
Vlad
af5ad4d596 whisper: message filtering optimized 2018-02-27 21:16:15 +01:00
Vlad
61a8afe310 whisper: test fixed 2018-02-27 15:52:10 +01:00
Vlad
59b6882c84 whisper: mailserver no longer supports the signature vaidation 2018-02-27 15:45:00 +01:00
Vlad
b5923603ad whisper: refactoring 2018-02-23 14:52:25 +01:00
gluk256
0fc724cd72 Merge pull request #16172 from gluk256/244-light-client
whisper: light client mode introduced
2018-02-23 14:07:29 +01:00
Guillaume Ballet
dbc15627b2 Merge pull request #16146 from status-im/pombeirp/whisperv6-peer-race-cond-fix
Fix race condition in whisperv6/peer.go
2018-02-23 11:49:47 +01:00
Vlad
c86ffe8edc whisper: light client mode introduced 2018-02-23 11:10:28 +01:00
Guillaume Ballet
413e3df832 whisper: Support for v2 has long been discontinued, remove it. (#16153) 2018-02-22 12:25:07 +02:00
Pedro Pombeiro
b886e39718 whisper: Fix race condition in whisperv6/peer.go 2018-02-21 13:23:53 +01:00
gluk256
dc4b293204 whisper: test timeout extended (#16088)
* whisper: timeout extended

* whisper: test updated

* whisper: test updated
2018-02-15 14:42:44 +02:00
Guillaume Ballet
5e49d935c3 whisper: get wnode to work with v6 (#16051)
The bulk of the issue was to adapt to the new requirement
that a v6 filter has to either contain a symmertric key or
an asymmetric one.

This commits revert one of the fixes that I made to remove
a linter warning: unexporting NewSentMessage. This is not
really a problem as I have a cleanup in the pipe that will
solve this issue.
2018-02-10 15:35:32 +02:00
gluk256
591032a51b whisper: bloom filter refactoring (#16046)
* whisper: bloom filter refactoring

* whisper: fixed full node
2018-02-09 17:25:23 +02:00
gluk256
a0e556e09b whisper: Seal function fixed (#16048) 2018-02-09 17:25:03 +02:00
Guillaume Ballet
1e09403314 whisper: improve a log message to analyze a travis issue 2018-02-05 18:18:13 +01:00
gluk256
05ab15d98c 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
188304c519 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
b00ris
4452cc5f89 whisper: fix empty topic (#15811)
* whisper: fix empty topic

* whisper: add check to matchSingleTopic

* whisper: add tests

* whisper: fix gosimple

* whisper: added lastTopicByte const
2018-01-26 13:41:53 +02:00
gluk256
b45285c479 whisper/whisperv6: implement pow/bloom exchange protocol (#15802)
This is the main feature of v6.
2018-01-12 12:11:22 +01:00