v0.38.x: backport of new content on spec/p2p#1005
Conversation
76b090c to
65d273c
Compare
p2p/README.md
Outdated
| - [Connection](https://github.com/cometbft/cometbft/blob/v0.38.x/spec/p2p/legacy-docs/connection.md) for details on how connections and multiplexing work | ||
| - [Peer](https://github.com/cometbft/cometbft/blob/v0.38.x/spec/p2p/legacy-docs/node.md) for details on peer ID, handshakes, and peer exchange | ||
| - [Node](https://github.com/cometbft/cometbft/blob/v0.38.x/spec/p2p/legacy-docs/node.md) for details about different types of nodes and how they should work | ||
| - [Config](https://github.com/cometbft/cometbft/blob/v0.38.x/spec/p2p/legacy-docs/config.md) for details on some config option |
| documentation also applies to the releases `v0.37.*` and `v0.38.*` [^v35]. | ||
|
|
||
| [^v35]: The releases `v0.35.*` and `v0.36.*`, which included a major | ||
| refactoring of the p2p layer implementation, were [discontinued][v35postmorten]. |
There was a problem hiding this comment.
"discontinued" gives the impression that they didn't receive updates. I suggest a stronger wording here.
| refactoring of the p2p layer implementation, were [discontinued][v35postmorten]. | |
| refactoring of the p2p layer implementation, were [retired][v35postmorten]. |
|
|
||
| - In the [setup](https://github.com/cometbft/cometbft/blob/29c5a062d23aaef653f11195db55c45cd9e02715/node/node.go#L985) of a node, to establish connections with every configured | ||
| persistent peer | ||
| - In the [setup](https://github.com/cometbft/cometbft/blob/v0.34.x/node/node.go#L987) |
There was a problem hiding this comment.
v0.34.x could still be updated and these links be broken. What is the guideline here? Should we incur in the risk of broken links or point to specific patch versions?
There was a problem hiding this comment.
So, the implementation/README.md specifies that this documentation is based on v0.34.x branch. I've tried to check whether replacing links to the main branch could to the work, but it doesn't. So I would rather maintain references to v0.34.x here, until we find a way to describe the implementation on all branches consistently.
I also realized, from your reviews and from mine, that there are some small changes to make, but I would rather open another PR against |
sergio-mena
left a comment
There was a problem hiding this comment.
Didn't read through the text. I started but realized I've already reviewed this (it's a backport -- let me know if there's some text not present in main that I should read)
|
@sergio-mena, sorry, I have updated the description. The changes are really minimal: |
|
The other backport of this same content, but to |
5877700 to
067fd57
Compare
|
Any blocker for merging this PR? |
I've reviewed those changes locally and LGTM, except for a minor comment that I just added. For me, it looks good to go |
* spec/p2p: starting the specification of a Reactor * spec/p2p: generic service modelled in Quint * spec/p2p: minimal/initial reactor model in Quint * spec/p2p: P2P -> reactor interaction grammar * spec/p2p: routines modeled in reactor.qnt * spec/p2p: reactor.Receive) modeled in Quint * spec/p2p: reactor types moved to the beginning * spec/p2p: reactor Quint state encapsulated * spec/p2p: reactor with actions and defintions * spec/p2p: reactor SetSwitch() method modeled * spec/p2p: reactor Service interface modeled * spec/p2p: reactor setup action added * spec/p2p: reactor Quint spec cleanup * spec/p2p: reactor InitPeer spec updated * spec/p2p: reactor Quint simulation support * spec/p2p: reactor Quint spec refactored * spec/p2p: reactor grammar added to a rephrased README * spec/p2p: README structure reorganized * spec/p2p: reactor registration, overview * spec/p2p: reactor implements a service (start/stop) * spec/p2p: reactor peer management, overview * spec/p2p: reactor receive message method documented * spec/p2p: renamed to registration/register reactor * spec/p2p: reactor grammar refactoring, part I * spec/p2p: reactor grammar refactoring, part II * spec/p2p: reactor grammar refactoring, part III * spec/p2p: reactor grammar refactoring, part IV * spec/p2p: removing Quint model used as an example * spec/p2p: reactor grammar refactoring, part V * spec/p2p: reactor grammar refactoring, part VI * spec/p2p: reactor grammar refactoring, part VII * Apply suggestions from code review Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com> * spec/p2p: reactor Quint model, some comments added * Update spec/p2p/reactor/reactor.qnt Co-authored-by: Lasaro <lasaro@informal.systems> * spec/p2p: syntax HL for Quint files Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com> * spec/p2p: suggestions from code review Co-authored-by: Sergio Mena <sergio@informal.systems> * spec/p2p: reactor Quint model, channel ID as str * spec/p2p: applying suggestions from code review * spec/p2p: API methods first, then actions on Quint * spec/p2p: reactor Quint model, minor code cleanup * spec/p2p: reactor README intro slightly rephrased * spec/p2p: reactor grammar intro slightly rephrased * spec/p2p: some reactor "should" replaced by "must" * spec/p2p: Quint model reference on README updated * spec/p2p: minor fixes on reactor's README --------- Co-authored-by: Daniel Cason <cason@lausanne.local> Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com> Co-authored-by: Lasaro <lasaro@informal.systems> Co-authored-by: Sergio Mena <sergio@informal.systems>
* spec/p2p: registered flag in Quint reactor * spec/p2p: NewReactor method in Quint reactor * spec/p2p: reactor is registered with a name * spec/p2p: reactor actions receive ReactorState * spec/p2p: Quint model supports multiple reactors * spec/p2p: Quint reactor/service state simplified * spec/p2p: Quint reactor has channels' list as field * spec/p2p: Quint updateReactorTo action helper * spec/p2p: reactors are assigned to channel IDs * spec/p2p: reactor API specification, small fixes * spec/p2p: API p2p layer provides to reactors * spec/p2p: reactor API content to reactor.md file * spec/p2p: new README for reactors with a diagram * spec/p2p: API for reactors, introduction text * spec/p2p: links between the two API documentations * spec/p2p: suggestions from code review Co-authored-by: Sergio Mena <sergio@informal.systems> * spec/p2p: Apply suggestions from code review Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com> Co-authored-by: Lasaro <lasaro@informal.systems> * spec/p2p: reactor documentation intro, small fix * spec/p2p: a paragraph about concurrency and reactors * spec/p2p: intro to the reactor grammar, minor add * spec/p2p: notes about switch broadcast method * spec/p2p: note on NumPeers() switch method * spec/p2p: reactor veting peers, some rephrasing * spec/p2p: link to discussion on peer quality * spec/p2p: link to stop peer discussion on other repo * spec/p2p: link to state sharing between reactors added * spec/p2p: link to reactor API split added --------- Co-authored-by: Sergio Mena <sergio@informal.systems> Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com> Co-authored-by: Lasaro <lasaro@informal.systems>
* spec/p2p: moving legacy documents to legacy/ dir * spec/p2p: using capitalized names for README.md * spec/p2p: intro to p2p spec, moved from other README * spec/p2p: v0.34.x documentation, README shortened * spec/p2p: minor changes on READMEs * spec/p2p: moving messages/ content to legacy/ dir * spec/p2p: dir for docs of the p2p implementation * spec/p2p: renamed reactor dirs to reactor-api * spec/p2p: legacy content to legacy-docs/ dir * spec/p2p: fixes on implementation/README.md file * spec/p2p: moving images to a single subdir * spec/p2p: fixing Markdown links * spec/p2p: fixing Markdown links in all repo * spec/p2p: table of contents for the p2p docs * spec/p2p: applying suggestions from Josef Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com> --------- Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com>
71fcfe1 to
1ebb801
Compare
This PR backports 3 PRs merged into the
mainbranch: #714, #851, and #966.Note to reviewers: there is no new content added here, this is just a manual backport of multiple PRs already merged into main.
Addresses #598