Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src/ripple/overlay/README.md incorrect #2449

Closed
codedot opened this issue Mar 22, 2018 · 5 comments
Closed

src/ripple/overlay/README.md incorrect #2449

codedot opened this issue Mar 22, 2018 · 5 comments
Labels
Documentation README changes, code comments, etc.

Comments

@codedot
Copy link

codedot commented Mar 22, 2018

The peer handshake protocol documentation provided in the src/ripple/overlay/README.md file is currently inconsistent with implementation. In particular, the example HTTP request

GET / HTTP/1.1
User-Agent: rippled-0.27.0
Local-Address: 192.168.0.101:8421
Upgrade: RTXP/1.2, RTXP/1.3
Connection: Upgrade
Connect-As: Leaf, Peer
Accept-Encoding: identity, zlib, snappy
Public-Key: aBRoQibi2jpDofohooFuzZi9nEzKw9Zdfc4ExVNmuXHaJpSPh8uJ
Session-Signature: 71ED064155FFADFA38782C5E0158CB26

provided in documentation is very different from what rippled actually sends:

GET / HTTP/1.1
User-Agent: rippled-0.81.0
Upgrade: RTXP/1.2
Connection: Upgrade
Connect-As: Peer
Crawl: public
Public-Key: n9JkLKbdx7nK5DAVEVt12tfuPTjRyKSzgHcL5sZt1MEZCys5anyA
Session-Signature: MEUCIQCB0sFjTi7EJOSHYNBm0r2wNy2CZ5GP1kG95fQWYSrgMwIgcPqEZsSXpIvX/DTA2fLeiBEHNpNODL1yIKGusx/cjLU=
Network-Time: 574447212
Closed-Ledger: dnh7rcZ4/OIOi0HrAWltMjtsK7+2ozvXJpDwO5shTzA=
Previous-Ledger: q4aKbP7sd5wv+EXArwCmQiWZhq9AwBl2p/hCtpGJNsc=

after exchanging the following Finished messages during TLS handshake (see #2413 for details):

<Buffer d9 84 67 bb 33 a4 92 e0 f8 b2 3c 3a>
<Buffer 1c 85 dd d7 0d e7 b3 61 9b cf 8c ae>

Since Session-Signature can be verified with the Public-Key and the above Finished messages using this function, Public-Key is therefore a base-58-encoded value formed according to the Encodings article (type 28), which contradicts documentation:

* `Public-Key`

    This field value must be present, and contain a base 64 encoded value used
    as a server public key identifier.

Also, documentation is missing description of how exactly the Session-Signature field is formed, only vaguely referring to source code. Finally, the Network-Time, Closed-Ledger, and Previous-Ledger fields are not mentioned in documentation at all.

@nbougalis
Copy link
Contributor

Thank you. We are working on improving the documentation of this particular section of the code.

@codedot
Copy link
Author

codedot commented Nov 1, 2018

Why is this issue closed? The documentation has not yet been corrected at all, the latest commit being still afd4b45 on Nov 9, 2016.

@nbougalis
Copy link
Contributor

Touché. This issue should remain open until such time as the documentation is fixed. You may feel free to submit a pull request, if you're so inclined.

@nbougalis nbougalis reopened this Nov 3, 2018
@mDuo13 mDuo13 added the Documentation README changes, code comments, etc. label Aug 2, 2019
@MarkusTeufelberger
Copy link
Collaborator

See #3049

@nbougalis
Copy link
Contributor

The documentation has been updated with #3049. I believe that this issue no longer applies. If you still feel it does, please create a new issue. Thanks. 🖖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation README changes, code comments, etc.
Projects
None yet
Development

No branches or pull requests

4 participants