Liamsi
a39b2522d5
review comments:
- re-add test
- add TODO
- err instead of panic where possible
6 years ago
Liamsi
d2c05bc5b9
Revert "delete everything" (includes everything non-go-crypto)
This reverts commit 96a3502
6 years ago
Liamsi
96a3502126
delete everything
6 years ago
Anton Kaliaev
205d8b8062
fixes after @xla review
- move prometheus metrics into internal packages
- *Option structs
- misc. format changes
6 years ago
Anton Kaliaev
e4bb3566a0
move metrics constructors to a separate package
6 years ago
Anton Kaliaev
84812145cb
friendly apis for constructors
6 years ago
Anton Kaliaev
b10b0da3fd
bundle imports
6 years ago
Anton Kaliaev
19699d644f
p2p metric, make height and totalTxs gauges
6 years ago
Dev Ojha
b84f788f36
Switch ports 466xx to 266xx ( #1735 )
* Switch ports 466xx to be 266xx
This is done so the default ports aren't in the linux kernel's default ephemeral port range.
* Update ABCI import
* Bump cache on circleci
* Get more verbose output for debugging
* Bump abci dependency
* Fix accidental change of a block header's hash
* pin abci release
6 years ago
Anton Kaliaev
cd3a240c9f
return an error if we fail to parse external IP
```
I[06-08|11:51:57.234] Getting UPNP external address module=p2p
I[06-08|11:51:58.867] Got UPNP external address module=p2p address=
```
Fixes #1717
```
I[06-08|11:51:56.952] Starting multiAppConn module=proxy impl=multiAppConn
I[06-08|11:51:56.952] Starting localClient module=abci-client connection=query impl=localClient
I[06-08|11:51:56.952] Starting localClient module=abci-client connection=mempool impl=localClient
I[06-08|11:51:56.952] Starting localClient module=abci-client connection=consensus impl=localClient
I[06-08|11:51:56.952] ABCI Handshake module=consensus appHeight=0 appHash=
I[06-08|11:51:56.952] ABCI Replay Blocks module=consensus appHeight=0 storeHeight=0 stateHeight=0
I[06-08|11:51:57.053] Completed ABCI Handshake - Tendermint and App are synced module=consensus appHeight=0 appHash=
I[06-08|11:51:57.053] This node is a validator module=consensus addr=6816B5D9BAC32A3CDF07884D9D3D2650694C371D pubKey=PubKeyEd25519{27A40CD032DD2467342D0CF27C5EC92052D966FEC714B6CF2F3BF3146AFD0D51}
I[06-08|11:51:57.234] Starting Node module=main impl=Node
I[06-08|11:51:57.234] Starting EventBus module=events impl=EventBus
I[06-08|11:51:57.234] Local listener module=p2p ip=:: port=46656
I[06-08|11:51:57.234] Getting UPNP external address module=p2p
I[06-08|11:51:58.867] Got UPNP external address module=p2p address=
I[06-08|11:51:58.867] Starting DefaultListener module=p2p impl=Listener(@<nil>:46656)
I[06-08|11:51:58.867] P2P Node ID module=main ID=3629b516392e494ae717ac4c6a1ea7eb0fe421c3 file=/home/tpb/.tendermint/config/node_key.json
I[06-08|11:51:58.868] Add our address to book module=p2p book=/home/tpb/.tendermint/config/addrbook.json addr=null
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x89fb86]
goroutine 1 [running]:
github.com/tendermint/tendermint/p2p.(*NetAddress).String(0x0, 0xc96e24, 0x17)
/home/tpb/code/go/src/github.com/tendermint/tendermint/p2p/netaddress.go:171 +0x26
github.com/tendermint/tendermint/p2p/pex.(*addrBook).AddOurAddress(0xc420190620, 0x0)
/home/tpb/code/go/src/github.com/tendermint/tendermint/p2p/pex/addrbook.go:160 +0x116
github.com/tendermint/tendermint/node.(*Node).OnStart(0xc420286d00, 0xc4201b8010, 0xd)
/home/tpb/code/go/src/github.com/tendermint/tendermint/node/node.go:402 +0x547
github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common.(*BaseService).Start(0xc420286d00, 0xe51c40, 0xc42000bd40)
/home/tpb/code/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common/service.go:130 +0x3bd
github.com/tendermint/tendermint/cmd/tendermint/commands.NewRunNodeCmd.func1(0xc42022e000, 0xc4200acdc0, 0x0, 0x1, 0x0, 0x0)
/home/tpb/code/go/src/github.com/tendermint/tendermint/cmd/tendermint/commands/run_node.go:58 +0xfe
github.com/tendermint/tendermint/vendor/github.com/spf13/cobra.(*Command).execute(0xc42022e000, 0xc4200acda0, 0x1, 0x1, 0xc42022e000, 0xc4200acda0)
/home/tpb/code/go/src/github.com/tendermint/tendermint/vendor/github.com/spf13/cobra/command.go:762 +0x468
github.com/tendermint/tendermint/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x1289280, 0xbbdda0, 0xc420015e01, 0xc4201bc640)
/home/tpb/code/go/src/github.com/tendermint/tendermint/vendor/github.com/spf13/cobra/command.go:852 +0x30a
github.com/tendermint/tendermint/vendor/github.com/spf13/cobra.(*Command).Execute(0x1289280, 0xc4201bc640, 0xc420015e98)
/home/tpb/code/go/src/github.com/tendermint/tendermint/vendor/github.com/spf13/cobra/command.go:800 +0x2b
github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/cli.Executor.Execute(0x1289280, 0xde5798, 0x2, 0xc4200332c0)
/home/tpb/code/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/cli/setup.go:89 +0x4e
main.main()
/home/tpb/code/go/src/github.com/tendermint/tendermint/cmd/tendermint/main.go:45 +0x24d
```
7 years ago
Ethan Buchman
9481cabd50
fixes from review
7 years ago
Alexander Simmerl
c661a3ec21
Fix race when mutating MConnConfig
Instead of mutating the passed in MConnConfig part of P2PConfig we just
use the default and override the values, the same as before as it was
always the default version. This is yet another good reason to not embed
information and access to config structs in our components and will go
away with the ongoing refactoring in #1325 .
7 years ago
Anton Kaliaev
b8c076ca79
do not drain the channel because there is no channel, duh
Fixes https://github.com/cosmos/cosmos-sdk/issues/1045
7 years ago
Alexander Simmerl
ea896865a7
Collapse PeerConfig into P2PConfig
As both configs are concerned with the p2p packaage and PeerConfig is
only used inside of the package there is no good reason to keep the
couple of fields separate, therefore it is collapsed into the more
general P2PConifg. This is a stepping stone towards a setup where the
components inside of p2p do not have any knowledge about the config.
follow-up to #1325
7 years ago
Anton Kaliaev
0562009275
bring back assert
7 years ago
idoor88
fedd07c522
removed assertion to avoid confusion ( #1626 )
7 years ago
Alexander Simmerl
3255c076e5
Remove auth_enc config option
As we didn't hear any voices requesting this feature, we removed the
option to disable it and always have peer connection auth encrypted.
closes #1518
follow-up #1325
7 years ago
Ethan Buchman
d454b1b25f
SkipDuplicate -> AllowDuplicate; fix p2p test on mac
7 years ago
Alexander Simmerl
5796e879b9
Introduce option to skip duplicate ip check
In some scenarios like tests we want to disable the guard which prevents
peers connecting from the same ip.
Fixes #1632
Closes #1634
7 years ago
Anton Kaliaev
4da81aa0b7
commented out TestPEXReactorRunning
7 years ago
Anton Kaliaev
67068a34f2
log requesting addresses
7 years ago
Anton Kaliaev
2a0e9f93ce
provide arg to error
BEFORE:
```
E[05-24|11:55:37.229] Dialing failed pex=0 addr=022ec801d79025caab3afbbf816d92ff8450d040@127.0.0.2:6593 err="Connect to self: <nil>" attempts=0
```
AFTER:
```
E[05-24|11:55:37.229] Dialing failed pex=0 addr=022ec801d79025caab3afbbf816d92ff8450d040@127.0.0.2:6593 err="Connect to self: 022ec801d79025caab3afbbf816d92ff8450d040@127.0.0.2:6593" attempts=0
```
7 years ago
Zach Ramsay
423fef1416
docs: use absolute links ( #1617 )
7 years ago
Alexander Simmerl
186d38dd8a
Use different loopback addresses for test switch
7 years ago
Alexander Simmerl
01fd102dba
Incoporate review feedback
7 years ago
Alexander Simmerl
e11f3167ff
Fix pex reactor test
7 years ago
Alexander Simmerl
7d98cfd3d6
Test duplicate IP guard in peer set
7 years ago
Alexander Simmerl
4848e88737
Fix persistent peer switch test
7 years ago
Zach Ramsay
60d7486de2
docs: fix dead links, closes #1608
7 years ago
Alexander Simmerl
91b6d3f18c
Do not set address for self error
7 years ago
Alexander Simmerl
20e9dd0737
Return fake IP even when there is no conn
7 years ago
Alexander Simmerl
0cd92a4948
Fix race in test suffix
7 years ago
Alexander Simmerl
d596ed1bc2
Let peerConn handle IPs in for tests
7 years ago
Anton Kaliaev
5a041baa36
nice output for msgBytes
Closes #1227
7 years ago
Alexander Simmerl
b698a9febc
Remove double locking in HasIP
7 years ago
Alexander Simmerl
c5f45275ec
Use remotePeer for test switch
7 years ago
Alexander Simmerl
77f09f5b5e
Move to ne.IP
7 years ago
Ethan Buchman
1fe41be929
p2p: prevent connections from same ip
7 years ago
Ethan Buchman
68a0b3f95b
version bump. add roadmap back. minor fixes
7 years ago
Jae Kwon
edbec10f9e
Expose peer stats for dump_consensus_state
7 years ago
Ethan Buchman
b6c062c451
fixes from review
7 years ago
Ethan Buchman
c195772de1
p2p: small lint
7 years ago
Ethan Buchman
fae94a44a2
p2p/pex: some addrbook fixes
* fix before/after in isBad()
* allow multiple IPs per ID even if ID isOld
7 years ago
Ethan Buchman
3a30ee75b9
minor fixes
7 years ago
Ethan Buchman
3498b676a6
update spec and addrbook.go
7 years ago
Ethan Buchman
6157c700dd
forgot errors file
7 years ago
Ethan Buchman
c90bf77566
rpc: add n_peers to /net_info
7 years ago
Ethan Buchman
6805ddf1b8
p2p: change some logs from Error to Debug. #1476
7 years ago
Ethan Buchman
2761861b6b
p2p: MinNumOutboundPeers. Closes #1501
7 years ago
Ethan Buchman
64569b15e5
fix build and test
7 years ago