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
ProtocolId
re-work
#3980
Comments
Is there any interest in solving this on a wider scale. In particular I'd like to be able to uniquely identify items in an agnostic way. The minimum set of groupings I see are:
Each would have a unique identifier and semver. Again, these should be defined in a "language" and "platform" agnostic manner so as to be maximally portable. |
@divagant-martian @AgeManning what do you guys think? |
Thanks @realbigsean and @winksaville
The
We already model messages as the individual chunks received per protocol and don't support protocols depending on language or platform
Yeah agree, let's change this |
I believe I understand there is one lighthouse/beacon_node/lighthouse_network/src/rpc/protocol.rs Lines 141 to 158 in 38514c0
I was thinking there were many protocols and many combinations of messages. |
That's the |
SG, txs. I think we have similar models in mind. Your |
I'm interested in taking this on if it hasn't already been taken by @winksaville |
I won't have time, please take it on! |
My 2 cents on this topic is: At the moment, we only really use one encoding, we removed the support of plain ssz. So currently there is pain matching on just protocol and version, and I assume not for the encoding. We build a list of supported protocols using the raw abstract types ( Then when building the supported protocols here:
We could use this enum, i..e impl ProtocolId {
fn supported_protocol(&self) -> SupportedProtocol { .. }
} So when we are checking the match, we convert the raw ProtocolId into a |
## Issue Addressed Resolves #3980. Builds on work by @GeemoCandama in #4084 ## Proposed Changes Extends the `SupportedProtocol` abstraction added in Geemo's PR and attempts to fix internal versioning of requests that are mentioned in this comment #4084 (comment) Co-authored-by: geemo <geemo@tutanota.com>
This can be closed now |
## Issue Addressed Resolves sigp#3980. Builds on work by @GeemoCandama in sigp#4084 ## Proposed Changes Extends the `SupportedProtocol` abstraction added in Geemo's PR and attempts to fix internal versioning of requests that are mentioned in this comment sigp#4084 (comment) Co-authored-by: geemo <geemo@tutanota.com>
Resolves sigp#3980. Builds on work by @GeemoCandama in sigp#4084 Extends the `SupportedProtocol` abstraction added in Geemo's PR and attempts to fix internal versioning of requests that are mentioned in this comment sigp#4084 (comment) Co-authored-by: geemo <geemo@tutanota.com>
Resolves sigp#3980. Builds on work by @GeemoCandama in sigp#4084 Extends the `SupportedProtocol` abstraction added in Geemo's PR and attempts to fix internal versioning of requests that are mentioned in this comment sigp#4084 (comment) Co-authored-by: geemo <geemo@tutanota.com>
Description
ProtocolId
contains a singleVersion
enum for all protocols, this doesn't really make sense though because protocols are versioned independently. Places where this isn't great include #3972 where we want a complete match across protocol + version, but currently this means matching on protocol + version combinations that don't actually exist, e.g.LightClientBootstrap
+Version::V2
. Alsohandle_v1_response
thehandle_v2_response
end up being very confusing to work with because some v1 protocols end up having functionality more similar to v2 protocols (e.g. fork-awareness in the blobs by range v1 protocol is almost the same as fork-awareness in blocks by range v2 protocol and very unlike the blocks by range v1 protocol) but have to be handled independently.Options:
Protocol
. Maximally strict but maybe makes the most sense.The text was updated successfully, but these errors were encountered: