Removal of reject network messages from Bitcoin Core (BIP61) [combined summary]



Individual post summaries: Click here to read the original discussion on the bitcoin-dev mailing list

Published on: 2019-10-21T08:44:16+00:00


Summary:

In a recent discussion on the bitcoin-dev mailing list, the use of "reject" messages in the Bitcoin network was debated. It was argued that nodes on the network cannot be trusted to send valid reject messages, so this feature should only be used when connected to a trusted node. However, it was also pointed out that nodes generally rely on the assumption they are connected to at least one honest peer, allowing for a convergence on the set of honest peers and the ability to ban or disconnect those who send invalid reject messages for valid transactions.Bitcoin Core developer, Marco Falke, proposed removing the reject message feature from Bitcoin Core to make the codebase slimmer. However, it was noted that Neutrino, a light client implementation, currently relies on receiving reject messages from its peers when broadcasting a transaction to the network. Despite this, Falke believes that removing the feature would help in terms of comprehension and maintainability. The alternative recommended by Falke is not suitable for use cases where the main thing required is identification of whether a broadcasted transaction is valid or not. Reject messages are also useful when developing new light clients, as feedback from the network on why a transaction was rejected helps identify potential bugs in their transaction crafting logic. While Falke suggested testing the validity of a transaction through specific RPCs, such as `sendrawtransaction` and `testmempoolaccept`, these are not helpful for light clients. Therefore, it is believed that disabling the reject message feature by default would hinder light clients' ability to realize they are broadcasting invalid transactions. Thus, the feature should remain enabled by default to aid the light clients of the network.Bitcoin Core may remove the reject messages feature from its system, as it has been disabled by default since version 0.18.0. This feature is toggled by the `-enablebip61` command line option. Developers have proposed alternative testing methods for those who rely on the feature, including inspecting log messages produced by a recent version of Bitcoin Core, using specific RPCs to test the validity of blocks and transactions, and relying on fee estimation to determine transaction fees and setting replace-by-fee if desired. The proposal to remove the feature from Bitcoin Core 0.19.0 has been made unless there are valid concerns about its removal.Overall, the debate centers around the trustworthiness of reject messages sent by nodes on the Bitcoin network. While some argue that this feature should only be used when connected to trusted nodes, others believe that removing it would make the codebase slimmer and easier to maintain. However, alternative testing methods have been proposed, and it is important to consider the impact on light clients and their ability to identify and correct invalid transactions.


Updated on: 2023-08-02T00:34:07.125703+00:00