Commit Graph

51 Commits

Author SHA1 Message Date
Anton Kaliaev 1a3faa8db1
add app_state field to docs 2018-02-28 23:44:10 +04:00
Ethan Buchman 9293ae76bf p2p: introduce peerConn to simplify peer creation (#1226)
* expose AuthEnc in the P2P config

if AuthEnc is true, dialed peers must have a node ID in the address and
it must match the persistent pubkey from the secret handshake.

Refs #1157

* fixes after my own review

* fix docs

* fix build failure

```
p2p/pex/pex_reactor_test.go:288:88: cannot use seed.NodeInfo().NetAddress() (type *p2p.NetAddress) as type string in array or slice literal
```

* p2p: introduce peerConn to simplify peer creation

* Introduce `peerConn` containing the known fields of `peer`
* `peer` only created in `sw.addPeer` once handshake is complete and NodeInfo is checked
* Eliminates some mutable variables and makes the code flow better
* Simplifies the `newXxxPeer` funcs
* Use ID instead of PubKey where possible.
        * SetPubKeyFilter -> SetIDFilter
        * nodeInfo.Validate takes ID
        * remove peer.PubKey()

* persistent node ids

* fixes from review

* test: use ip_plus_id.sh more

* fix invalid memory panic during fast_sync test

```
2018-02-21T06:30:05Z box887.localdomain docker/local_testnet_4[14907]: panic: runtime error: invalid memory address or nil pointer dereference
2018-02-21T06:30:05Z box887.localdomain docker/local_testnet_4[14907]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x98dd3e]
2018-02-21T06:30:05Z box887.localdomain docker/local_testnet_4[14907]:
2018-02-21T06:30:05Z box887.localdomain docker/local_testnet_4[14907]: goroutine 3432 [running]:
2018-02-21T06:30:05Z box887.localdomain docker/local_testnet_4[14907]: github.com/tendermint/tendermint/p2p.newOutboundPeerConn(0xc423fd1380, 0xc420933e00, 0x1, 0x1239a60, 0
xc420128c40, 0x2, 0x42caf6, 0xc42001f300, 0xc422831d98, 0xc4227951c0, ...)
2018-02-21T06:30:05Z box887.localdomain docker/local_testnet_4[14907]: #011/go/src/github.com/tendermint/tendermint/p2p/peer.go:123 +0x31e
2018-02-21T06:30:05Z box887.localdomain docker/local_testnet_4[14907]: github.com/tendermint/tendermint/p2p.(*Switch).addOutboundPeerWithConfig(0xc4200ad040, 0xc423fd1380, 0
xc420933e00, 0xc423f48801, 0x28, 0x2)
2018-02-21T06:30:05Z box887.localdomain docker/local_testnet_4[14907]: #011/go/src/github.com/tendermint/tendermint/p2p/switch.go:455 +0x12b
2018-02-21T06:30:05Z box887.localdomain docker/local_testnet_4[14907]: github.com/tendermint/tendermint/p2p.(*Switch).DialPeerWithAddress(0xc4200ad040, 0xc423fd1380, 0x1, 0x
0, 0x0)
2018-02-21T06:30:05Z box887.localdomain docker/local_testnet_4[14907]: #011/go/src/github.com/tendermint/tendermint/p2p/switch.go:371 +0xdc
2018-02-21T06:30:05Z box887.localdomain docker/local_testnet_4[14907]: github.com/tendermint/tendermint/p2p.(*Switch).reconnectToPeer(0xc4200ad040, 0x123e000, 0xc42007bb00)
2018-02-21T06:30:05Z box887.localdomain docker/local_testnet_4[14907]: #011/go/src/github.com/tendermint/tendermint/p2p/switch.go:290 +0x25f
2018-02-21T06:30:05Z box887.localdomain docker/local_testnet_4[14907]: created by github.com/tendermint/tendermint/p2p.(*Switch).StopPeerForError
2018-02-21T06:30:05Z box887.localdomain docker/local_testnet_4[14907]: #011/go/src/github.com/tendermint/tendermint/p2p/switch.go:256 +0x1b7
```
2018-02-27 15:54:40 +04:00
Anton Kaliaev cf1f483526
add seed_mode flag (`--p2p.seed_mode`) 2018-02-08 17:20:55 +04:00
Zarko Milosevic 4cbdbbaac9 Add BFT time spec 2018-02-01 15:22:08 +01:00
Ethan Buchman fe632ea32a spec: minor fixes 2018-01-26 17:26:33 -05:00
Zach Ramsay 5b368252ac spec: more fixes 2018-01-26 17:26:33 -05:00
Zach Ramsay 8cca953590 spec: remove notes, see #1152 2018-01-26 17:26:33 -05:00
Zach Ramsay 4b4a2029c4 spec: typos & other fixes 2018-01-26 17:26:33 -05:00
Ethan Buchman 260affd037 docs consolidation 2018-01-23 23:46:28 -05:00
Zarko Milosevic dfdfd6c98e Small fix in example 2018-01-22 13:10:54 +01:00
Ethan Buchman 813bb6af96
Merge pull request #1092 from tendermint/add-consensus-reactor-doc
Add consensus reactor doc
2018-01-21 12:40:28 -05:00
Ethan Buchman aecbff725f
Merge pull request #1082 from tendermint/document-proposer-selection
Document proposer selection procedure
2018-01-21 12:39:43 -05:00
Ethan Buchman 2c6ed302b7 minor changes [ci skip] 2018-01-21 12:36:46 -05:00
Adrian Brink 0eb85161aa More specification 2018-01-21 12:35:09 -05:00
Adrian Brink 940145b368 Bullet points for reactor and poolRoutine 2018-01-21 12:32:45 -05:00
Adrian Brink a30315276b Formatting and documentation 2018-01-21 12:32:23 -05:00
Adrian Brink 6366eb9d99 Cleanup build and structure 2018-01-21 12:31:14 -05:00
Ethan Buchman ae27e85bf7 add warnings about new spec 2018-01-20 21:20:15 -05:00
Ethan Buchman f2d19162d2 fixes from caffix review 2018-01-20 21:20:09 -05:00
Zarko Milosevic d36e118bf6 Add Consensus reactor spec 2018-01-19 19:57:08 +01:00
Ethan Buchman e2b3b5b58c dial_persistent_peers -> dial_peers with persistent option 2018-01-13 14:50:58 -05:00
Ethan Buchman e6b70baae0 Merge branch 'develop' into 864-distinguish-between-seeds-and-manual-peers 2018-01-13 14:34:32 -05:00
Zach 39acf1c5e8
Merge branch 'develop' into config 2018-01-10 14:21:24 +00:00
Anton Kaliaev 1b455883d2
readd /dial_seeds 2018-01-09 17:54:28 -06:00
Anton Kaliaev e4897b7bdd
rename manual peers to persistent peers 2018-01-09 16:18:05 -06:00
Anton Kaliaev 28fc15028a
distinguish between seeds and manual peers in the config/flags
- we only use seeds if we can’t connect to peers in the addrbook.
- we always connect to nodes given in config/flags

Refs #864
2018-01-09 16:03:24 -06:00
Ethan Buchman 03a14d8342 docs/p2p: updates from review (#1076) 2018-01-09 11:44:49 -06:00
Zarko Milosevic dba4815616 Define requirements of the proposer selection procedure 2018-01-08 14:10:01 +01:00
Zach e0e600df05
Merge branch 'develop' into config 2018-01-06 05:30:38 +00:00
Adrian Brink f602de437e
Move P2P docs into docs folder 2018-01-03 10:49:47 +01:00
Zarko Milosevic 96e0e4ab5a Describe messages sent as part of consensus/gossip protocol 2017-12-30 21:18:12 +01:00
Anton Kaliaev 69d8c2e554 fixes after my own review 2017-12-28 20:49:02 +00:00
Zach Ramsay 70ba608850 config: write all default options to config file
config: test the default file

docs: spiff up config

config: minor fixes & comments

config: simplify test

config; use a seperate config directory, #556

config: update docs & parameterize file paths

config: PR comments

config: use the default object

fix a rebase error
2017-12-28 20:49:02 +00:00
Ethan Buchman 1a0db878bf
Merge pull request #1009 from tendermint/spec
Spec
2017-12-27 15:23:13 -05:00
Ethan Buchman caccabd4e5 spec: fixes from review 2017-12-27 15:14:49 -05:00
Ethan Buchman d4716fc03c state 2017-12-26 18:43:03 -05:00
Ethan Buchman 16227594ef notes about block 1 2017-12-26 16:33:42 -05:00
Ethan Buchman 65cdb07f0c merkle 2017-12-26 15:48:17 -05:00
Ethan Buchman eb73e82279 encoding.md 2017-12-26 15:30:56 -05:00
Ethan Buchman d6fbfddddd spec.md -> blockchain.md. some fixes 2017-12-26 15:30:27 -05:00
Anton Kaliaev cf0b5d3715
enforce <1/3 validator updates
Refs #950
2017-12-25 12:10:53 -06:00
Ethan Buchman e3585a6eb0 wip: tendermint specification 2017-12-21 22:36:37 -05:00
Anton Kaliaev 4f94caa1b9
explain what to do in case of truncation [ci skip] 2017-12-15 11:11:21 -06:00
Anton Kaliaev 04a18e0a97
briefly describe the recover process [ci skip] 2017-12-12 13:03:09 -06:00
Anton Kaliaev 5ff0bb2100
default moniker to the host name (Refs #920) 2017-12-07 12:49:29 -06:00
Zach Ramsay 559bd169bd docs: fix links, closes #860 2017-11-17 14:03:43 +00:00
Zach Ramsay 3e61b8c17a docs: comb through step by step 2017-10-23 19:11:51 -04:00
Anton Kaliaev b9c4fab96e
correct an error in validator's specification [ci skip] (Refs #756) 2017-10-18 19:23:30 +04:00
Zach Ramsay 00ab3daa0c document no empty blocks, closes #605 [ci skip] 2017-10-03 23:55:45 -04:00
Ethan Buchman 3089bbf2b8 Amount -> Power. Closes #166 2017-09-21 14:59:27 -04:00