Commit Graph
7213 Commits
Author SHA1 Message Date
Juan Leni ba9b09974a dropping connecting when writing fails 2019-04-03 14:46:57 +02:00
Juan Leni 708bf4ff07 check during initialization 2019-04-03 14:40:58 +02:00
6d68360e51 Update privval/signer_client_test.go
Co-Authored-By: jleni <juan.leni@zondax.ch>
2019-04-03 14:26:25 +02:00
eb7365c567 Update privval/signer_client.go
Co-Authored-By: jleni <juan.leni@zondax.ch>
2019-04-03 14:22:38 +02:00
9f76ddbe22 Update node/node.go
Co-Authored-By: jleni <juan.leni@zondax.ch>
2019-04-03 14:21:32 +02:00
Juan Leni cc39cc487f clean up 2019-04-03 14:15:50 +02:00
Juan Leni fb7ad0720b small formatting changes 2019-04-03 14:15:50 +02:00
Juan Leni e57278df4f addressing comments 2019-04-03 14:15:50 +02:00
Juan Leni ab033fbc81 Improve reconnections + fixing unit tests 2019-04-03 14:15:50 +02:00
Juan Leni 37cc8db430 improved connection loop 2019-04-03 14:15:50 +02:00
Juan Leni 409175c3f2 wip 2019-04-03 14:15:50 +02:00
Juan Leni defade8c6c complete implementation 2019-04-03 14:15:50 +02:00
Juan Leni fb31eefe50 avoid invalid cache values (improve later?) 2019-04-03 14:15:50 +02:00
Juan Leni bce20dbfb6 fix linter issues 2019-04-03 14:15:50 +02:00
Juan Leni 33b8c6307b fixing unit test 2019-04-03 14:15:50 +02:00
Juan Leni a66063f946 Improving service endpoint 2019-04-03 14:15:50 +02:00
Juan Leni ad7eb8f45d clean up tests 2019-04-03 14:15:50 +02:00
Juan Leni c7348985af Fix/improve unit tests 2019-04-03 14:15:50 +02:00
Juan Leni 588e7f32dc Clean up 2019-04-03 14:15:50 +02:00
Juan Leni 91e00b3620 Improve tests 2019-04-03 14:15:50 +02:00
Juan Leni d9b3001d13 Encapsulating and fixing unit tests 2019-04-03 14:15:50 +02:00
Juan Leni 07501137c4 reworking unit tests 2019-04-03 14:15:50 +02:00
Juan Leni c879c6e58d refactoring - work in progress 2019-04-03 14:15:50 +02:00
Anton KaliaevandGitHub f965a4db15 p2p: seed mode refactoring (#3011)
ListOfKnownAddresses is removed
panic if addrbook size is less than zero
CrawlPeers does not attempt to connect to existing or peers we're currently dialing
various perf. fixes
improved tests (though not complete)
move IsDialingOrExistingAddress check into DialPeerWithAddress (Fixes #2716)


* addrbook: preallocate memory when saving addrbook to file

* addrbook: remove oldestFirst struct and check for ID

* oldestFirst replaced with sort.Slice
* ID is now mandatory, so no need to check

* addrbook: remove ListOfKnownAddresses

GetSelection is used instead in seed mode.

* addrbook: panic if size is less than 0

* rewrite addrbook#saveToFile to not use a counter

* test AttemptDisconnects func

* move IsDialingOrExistingAddress check into DialPeerWithAddress

* save and cleanup crawl peer data

* get rid of DefaultSeedDisconnectWaitPeriod

* make linter happy

* fix TestPEXReactorSeedMode

* fix comment

* add a changelog entry

* Apply suggestions from code review

Co-Authored-By: melekes <anton.kalyaev@gmail.com>

* rename ErrDialingOrExistingAddress to ErrCurrentlyDialingOrExistingAddress

* lowercase errors

* do not persist seed data

pros:
- no extra files
- less IO

cons:
- if the node crashes, seed might crawl a peer too soon

* fixes after Ethan's review

* add a changelog entry

* we should only consult Switch about peers

checking addrbook size does not make sense since only PEX reactor uses
it for dialing peers!

https://github.com/tendermint/tendermint/pull/3011#discussion_r270948875
2019-04-03 11:22:52 +02:00
Ethan BuchmanandGitHub 086d6cbe8c Merge pull request #3527 from tendermint/v0.31
Merge V0.31.3 back to develop
2019-04-02 16:49:44 -04:00
Ethan BuchmanandGitHub 6cc3f4d87c Merge pull request #3525 from tendermint/release/v0.31.3
Release/v0.31.3
v0.31.3
2019-04-02 16:45:04 -04:00
Ethan BuchmanandGitHub 3cfd9757a7 changelog and version v0.31.3 2019-04-02 09:14:33 -04:00
Ethan BuchmanandGitHub 882622ec10 Fixes tendermint/tendermint#3522
* OriginalAddr -> SocketAddr

OriginalAddr records the originally dialed address for outbound peers,
rather than the peer's self reported address. For inbound peers, it was
nil. Here, we rename it to SocketAddr and for inbound peers, set it to
the RemoteAddr of the connection.

* use SocketAddr

Numerous places in the code call peer.NodeInfo().NetAddress().
However, this call to NetAddress() may perform a DNS lookup if the
reported NodeInfo.ListenAddr includes a name. Failure of this lookup
returns a nil address, which can lead to panics in the code.

Instead, call peer.SocketAddr() to return the static address of the
connection.

* remove nodeInfo.NetAddress()

Expose `transport.NetAddress()`, a static result determined
when the transport is created. Removing NetAddress() from the nodeInfo
prevents accidental DNS lookups.

* fixes from review

* linter

* fixes from review
2019-04-01 19:59:57 -04:00
Ethan BuchmanandGitHub 1ecf814838 Fixes tendermint/tendermint#3439
* make sure we create valid private keys:

 - genPrivKey samples and rejects invalid fieldelems (like libsecp256k1)
 - GenPrivKeySecp256k1 uses `(sha(secret) mod (n − 1)) + 1`
 - fix typo, rename test file: s/secpk256k1/secp256k1/

* Update crypto/secp256k1/secp256k1.go
2019-04-01 19:45:57 -04:00
Greg SzaboandEthan Buchman e4a03f249d Release message changelog link fix (#3519) 2019-04-01 14:18:18 -04:00
Ethan BuchmanandGitHub 56d8aa42b3 Merge pull request #3520 from tendermint/v0.31
Merge v0.31.2 release back to develop
2019-04-01 14:17:58 -04:00
Ismail KhoffiandGitHub 79e9f20578 Merge pull request #3518 from tendermint/prepare-release-v0.31.2
Release v0.31.2
v0.31.2
2019-04-01 17:58:28 +02:00
Ismail Khoffi ab24925c94 prepare changelog and bump versions to v0.31.2 2019-04-01 17:49:34 +02:00
Greg SzaboandIsmail Khoffi 0ae41cc663 Fix for wrong version tag (#3517)
* Fix for wrong version tag (tag on the release branch instead of master)
2019-04-01 17:47:00 +02:00
Ethan BuchmanandIsmail Khoffi 422d04c8ba Bucky/mempool txsmap (#3512)
* mempool: resCb -> globalCb

* reqResCb takes an externalCb

* failing test for #3509

* txsMap is sync.Map

* update changelog
2019-03-31 13:14:18 +02:00
zjubfdandAlexander Simmerl 2233dd45bd libs: remove useless code in group (#3504)
* lib: remove useless code in group
* update change log
* Update CHANGELOG_PENDING.md

Co-Authored-By: guagualvcha <baifudong@lancai.cn>
2019-03-29 18:47:53 +01:00
Greg SzaboandIsmail Khoffi 9199f3f613 Release management using CircleCI (#3498)
* Release management using CircleCI

* Changelog updated
2019-03-29 12:57:16 +01:00
Ismail KhoffiandAlexander Simmerl 6c1a4b5137 blockchain: comment out logger in test code that causes a race condition (#3500) 2019-03-28 17:39:09 +01:00
Ethan BuchmanandGitHub c7bb998497 Merge pull request #3502 from tendermint/bucky/merge-master
Bucky/merge master
2019-03-28 08:07:59 -04:00
Ethan Buchman 7b72436c75 Merge branch 'master' into bucky/merge-master 2019-03-28 08:12:05 -04:00
Ethan BuchmanandGitHub a0234affb6 Merge pull request #3489 from tendermint/release/v0.31.1
Release/v0.31.1
v0.31.1
2019-03-28 07:57:42 -04:00
Ethan BuchmanandGitHub 9390a810eb minor changelog updates (#3499) 2019-03-27 21:03:28 -04:00
Ismail KhoffiandAnton Kaliaev a49d80b89c catch up with develop and rebase on current release to include #3482 2019-03-27 23:14:57 +01:00
Sean BraithwaiteandAnton Kaliaev ccfe75ec4a docs: Fix broken links (#3482) (#3488)
* docs: fix broken links (#3482)

A bunch of links were broken in the documentation s they included the
`docs` prefix.

* Update CHANGELOG_PENDING

* docs: switch to relative links for github compatitibility (#3482)
2019-03-27 23:14:57 +01:00
Sean BraithwaiteandIsmail Khoffi d586945d69 docs: Fix broken links (#3482) (#3488)
* docs: fix broken links (#3482)

A bunch of links were broken in the documentation s they included the
`docs` prefix.

* Update CHANGELOG_PENDING

* docs: switch to relative links for github compatitibility (#3482)
2019-03-27 18:51:57 +01:00
Ismail KhoffiandAnton Kaliaev ae88965ff6 changelog: add summary & fix link & add external contributor (#3490) 2019-03-27 17:46:29 +01:00
Ismail Khoffi 2338134836 bump versions 2019-03-27 16:52:19 +01:00
Ismail Khoffi 1b33a50e6d Merge remote-tracking branch 'remotes/origin/develop' into release/v0.31.1 2019-03-27 16:50:59 +01:00
Ismail Khoffi 3c7bb6b571 Add some numbers for #2778 2019-03-27 16:50:42 +01:00
Anton KaliaevandGitHub 5fa540bdc9 mempool: add a safety check, write tests for mempoolIDs (#3487)
* mempool: add a safety check, write tests for mempoolIDs

and document 65536 limit in the mempool reactor spec

follow-up to https://github.com/tendermint/tendermint/pull/2778

* rename the test

* fixes after Ismail's review
2019-03-27 16:45:34 +01:00