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
Proposal to deprecate and eventually remove the reject
wire protocol message.
#2546
Comments
Given everything you have written above, it seems only sensible to remove the
I'm curious what this is? Presumably theres a request/response type and some handling code, but if the handling code is basically just a log line, where does the dev complexity come from?
If I understand correctly, this is going to be backwards incompatible. Is there a good reason to do this? If clients on the new protocol version simply ignore the There is a good chance that 1.8 will include other changes which genuinely are backwards incompatible and will force and upgrade, but I don't think this needs to be one of them. |
There is a bunch of code dedicated to converting internal errors into the appropriate reject codes and it constantly has to be updated as new internal errors are added.
Yes, but 1.7.0 will almost positively have a consensus vote which means that everyone will already be required to be on the 1.7.0 code base (which would support the new protocol version) anyway. That is actually the primary reason I'm suggesting this approach. If it turns out that is not the case, we'd just punt to the next version after one that does. The goal is to be able to remove all of the wire protocol code which can't be done as long as you have to negotiate to old versions that support it, even if you yourself are not sending / ignoring it, you still have to parse and understand it at the protocol level. |
I double checked and indeed the only other place unrelated to tx or block submission that uses it is as a reply to a version message when the connected peer can't provide full node services. I guess that can be easily handled as a simple disconnect instead of a reject msg. Updating the minimum required protocol version in the release following a hard fork upgrade event seems reasonable to me. |
Yep, that was exactly my thought on it. Right now, it sends a reject and then disconnects. It would just log and disconnect. Anyone dealing with software related to the implementation of protocol that are trying to figure out why can then just enable debug logging on dcrd to see the reason. |
The final part of this has been completed via PR #3254. |
I would like to propose that the
reject
wire protocol message be deprecated in v1.7.0 and then removed entirely in the release after that. This is a holdover from the original btcsuite codebase as it was required on that network, but it really is not a useful message and has several downsides.Additional Info About Correctness
As mentioned above, software already realistically MUST NOT rely on p2p
reject
messages for correctness anyway. In particular, the proper way to handle the two main cases (both today and after these proposed changes) is:reject
message is NOT an indication of successsubmitblock
RPCProposed Roadmap
If we decide to move forward with this, I would expect the v1.7.0 release to:
reject
messages and ignore any receivedreject
message (in practice this means stop logging them)Then, in the following release:
reject
protocol message altogetherThe text was updated successfully, but these errors were encountered: