-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: include request response protocol description #19
Conversation
/aztec/req/{subprotocol}/{version} | ||
``` | ||
|
||
Where subprotocol details the type of request being made, and version details the version of the protocol being used, the exact form of version is yet to be determined. It may represent a semantic version (such as a hardfork), or it may represent a specific protocol implementation version (semver identifier). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
semver identifier makes more sense to me here.
It should fail if, the message received is not of the expected size. | ||
The message cannot be deserialized into the expected type. | ||
|
||
The responder will read from the stream until: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be "will write to the stream"?
``` | ||
|
||
#### Making a request | ||
When opening a stream with a peer, a specific protocolID (a.k.a. SubProtocol) will be used to determine what data the peer requires. For example, a SubProtocol with id `/aztec/req/tx/0.1.0` represents a stream that will be used to request a transaction payload from a peer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, how does req/resp pick a peer to query?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now it round robins through it's peer list, but I beleive spyros is working on a peer ranking system, so it should choose the first peer based on its ranking
Close in favor of https://github.com/AztecProtocol/engineering-designs/pull/27/files |
No description provided.