<oembed><type>rich</type><version>1.0</version><author_name>npub1xg2m84malu0cfm4444r0kysx4rgk27e75aj6sz6538kw8fcz627qeadsv7</author_name><author_url>https://nostr.ae/npub1xg2m84malu0cfm4444r0kysx4rgk27e75aj6sz6538kw8fcz627qeadsv7</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2019-03-07&#xA;📝 Original message:Yes, I&#39;m talking about P2P connections.&#xA;&#xA;First and foremost, reject messages are an indication that the&#xA;transaction isn&#39;t going to confirm. Without these messages, we&#39;d need to&#xA;revert to pre-BIP61 behaviour of using a timeout for reception of&#xA;network confirmations.&#xA;&#xA;Regarding the content, these cases are useful to distinguish:&#xA;&#xA;- Not enough fee&#xA;- UTXO already spent&#xA;- Tx validity/standardness (e.g. invalid signature)&#xA;&#xA;While the last one in theority wouldn&#39;t be necessary if you produced&#xA;your software bug-free to begin with, this just isn&#39;t how software&#xA;development works. Developers need any indication they can get.&#xA;&#xA;The first two happen even in the ideal case. Fees are impossible to&#xA;predict, and unintentional double spends happen because users clone&#xA;their wallet state.&#xA;&#xA;&#xA;On 07/03/2019 14.59, Sjors Provoost via bitcoin-dev wrote:&#xA;&gt; Can you elaborate a bit on what kind of reject messages your users are getting? I assume the users wallet connects directly to the Bitcoin p2p network?&#xA;&gt; &#xA;&gt; What does the wallet do when a transaction is rejected? Does it forget about it (that seems unsafe) or compose another one (with overlapping inputs)?&#xA;&gt; &#xA;&gt; Sjors&#xA;&gt; &#xA;&gt;&gt; Op 6 mrt. 2019, om 17:49 heeft Andreas Schildbach via bitcoin-dev &lt;bitcoin-dev at lists.linuxfoundation.org&gt; het volgende geschreven:&#xA;&gt;&gt;&#xA;&gt;&gt; Reject messages cannot be replaced for debugging user problems. At least&#xA;&gt;&gt; unless you plan to make RPC or bitcoind logfiles available via the P2P&#xA;&gt;&gt; protocol (both probably not a good idea).&#xA;&gt;&gt;&#xA;&gt;&gt; The typical case is, I get mailed a wallet logfile with reject messages&#xA;&gt;&gt; and that&#39;s all I have. I cannot access the bitcoind logfile(s) of the&#xA;&gt;&gt; node(s) that generated the reject message in the first place. Nor can I&#xA;&gt;&gt; access their RPC interface.&#xA;&gt;&gt;&#xA;&gt;&gt; I strongly suggest re-enabling reject messages by default before 0.18.&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; On 06/03/2019 01.53, Marco Falke via bitcoin-dev wrote:&#xA;&gt;&gt;&gt; Bitcoin Core may send &#34;reject&#34; messages as response to &#34;tx&#34;, &#34;block&#34; or&#xA;&gt;&gt;&gt; &#34;version&#34; messages from a network peer when the message could not be accepted.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; This feature is toggled by the `-enablebip61` command line option and has been&#xA;&gt;&gt;&gt; disabled by default since Bitcoin Core version 0.18.0 (not yet released as of&#xA;&gt;&gt;&gt; time of writing). Nodes on the network can not generally be trusted to send&#xA;&gt;&gt;&gt; valid (&#34;reject&#34;) messages, so this should only ever be used when connected to a&#xA;&gt;&gt;&gt; trusted node. At this time, I am not aware of any software that requires this&#xA;&gt;&gt;&gt; feature, and I would like to remove if from Bitcoin Core to make the codebase&#xA;&gt;&gt;&gt; slimmer, easier to understand and maintain. Let us know if your application&#xA;&gt;&gt;&gt; relies on this feature and you can not use any of the recommended alternatives:&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; * Testing or debugging of implementations of the Bitcoin P2P network protocol&#xA;&gt;&gt;&gt;  should be done by inspecting the log messages that are produced by a recent&#xA;&gt;&gt;&gt;  version of Bitcoin Core. Bitcoin Core logs debug messages&#xA;&gt;&gt;&gt;  (`-debug=&lt;category&gt;`) to a stream (`-printtoconsole`) or to a file&#xA;&gt;&gt;&gt;  (`-debuglogfile=&lt;debug.log&gt;`).&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; * Testing the validity of a block can be achieved by specific RPCs:&#xA;&gt;&gt;&gt;  - `submitblock`&#xA;&gt;&gt;&gt;  - `getblocktemplate` with `&#39;mode&#39;` set to `&#39;proposal&#39;` for blocks with&#xA;&gt;&gt;&gt;    potentially invalid POW&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; * Testing the validity of a transaction can be achieved by specific RPCs:&#xA;&gt;&gt;&gt;  - `sendrawtransaction`&#xA;&gt;&gt;&gt;  - `testmempoolaccept`&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; * Wallets should not use the absence of &#34;reject&#34; messages to indicate a&#xA;&gt;&gt;&gt;  transaction has propagated the network, nor should wallets use &#34;reject&#34;&#xA;&gt;&gt;&gt;  messages to set transaction fees. Wallets should rather use fee estimation&#xA;&gt;&gt;&gt;  to determine transaction fees and set replace-by-fee if desired. Thus, they&#xA;&gt;&gt;&gt;  could wait until the transaction has confirmed (taking into account the fee&#xA;&gt;&gt;&gt;  target they set (compare the RPC `estimatesmartfee`)) or listen for the&#xA;&gt;&gt;&gt;  transaction announcement by other network peers to check for propagation.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; I propose to remove &#34;reject&#34; messages from Bitcoin Core 0.19.0 unless there are&#xA;&gt;&gt;&gt; valid concerns about its removal.&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&gt; Marco&#xA;&gt;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; _______________________________________________&#xA;&gt;&gt; bitcoin-dev mailing list&#xA;&gt;&gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt;&gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev</html></oembed>