From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 6DD7410C3 for ; Thu, 14 Mar 2019 09:46:32 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 1D7AA852 for ; Thu, 14 Mar 2019 09:46:31 +0000 (UTC) Received: by mail-wm1-f42.google.com with SMTP id f3so2195497wmj.4 for ; Thu, 14 Mar 2019 02:46:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=b+ubiPNu5G+Ep9A8OVUYbOIHClR2MC0UM8iD12tBqd0=; b=ovW9yRxyWhUhlRGesczBmQo8CAHFlbpPoDUOSflIjDWaX9aF1hOp0gjjI8y0fb9mO8 b6LPDo7/z/cdjBnAGT6Dpock1rs6jUavZB1QA8S6jORKe1zzxjf5BJmgeDL1vxS9/gZt a6h9fM7xRk1R76j8QW0MwuivdxtV2eHfL6gEk7tUHUaDHMJJbyyzJ4UOq6t6L02/7brU JFNP8ybhIn6nEwOIzVyPqYa/gr3mot5df0DKegCxF9hcWMarLcOy3JpRJFDmloPFM6HO RQxr/ijBBx+EQZWaUYacj2bRWbZ4PAn6HSXJxlmcHdNDziNWS3gMVhkJpbfAtmwfi1Mk E3yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language; bh=b+ubiPNu5G+Ep9A8OVUYbOIHClR2MC0UM8iD12tBqd0=; b=bpiQJo0sx8CWgyoEgnVHvwyFApmNeeKT+9L7lIMxDVzTiFOJjU8+crrdcJWL1OpN7/ 2hDuC5htnYmnpKxDuW4iDBkGtm6Xg7DYCGHOCESRbnc2zIobpljgM77I3UbWA85YHk5V akc5wkbrJp4aBGcXcjRi3r/9lhG53Nb5wj077fKr2rKYO7ZBXV2Gvu/qLG2v0rp1d4+Y e/zPIPJarG5hVh8oJ+KopWSvJX+rVrRCfo8rP362AVwJ5/B92qY9UdWShL4J0JBUL9VE p9wVQtNkHyNIrUG08LmpT8SG/UoYNN9tr3sV2Dc1r/Qw6yyz62Qs4fvi7f1xmDra2dIQ 2w9w== X-Gm-Message-State: APjAAAUq2C5XRwZYOne7pGuIaQ9rdTAcL3eDinfmACLtF3lOejAPHCxt 3hoB5qxunGRudIfQHRMtLjM= X-Google-Smtp-Source: APXvYqzzCe5Xf5MOqsmDHRVv7NswrHdbW5zL1QUM6Fnyoqco7CTEPJAc8z1xZPLF41aRQcBLegWqgg== X-Received: by 2002:a1c:9684:: with SMTP id y126mr1881165wmd.124.1552556789616; Thu, 14 Mar 2019 02:46:29 -0700 (PDT) Received: from ?IPv6:2a01:cb1d:44:6500:9d6d:71b2:cb71:cb17? ([2a01:cb1d:44:6500:9d6d:71b2:cb71:cb17]) by smtp.googlemail.com with ESMTPSA id h13sm17461791wrt.89.2019.03.14.02.46.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Mar 2019 02:46:29 -0700 (PDT) To: Dustin Dettmer , Bitcoin Protocol Discussion , Oscar Guindzberg References: <78CAF294-56E2-477C-B46F-C65A56357820@sprovoost.nl> From: Aymeric Vitte Openpgp: preference=signencrypt Autocrypt: addr=vitteaymeric@gmail.com; prefer-encrypt=mutual; keydata= mQINBFdW8uABEAC7HJScbB2d/lmYoY5Cn9loEjJwfLs1LC3om030bWFGiH3Ceo5XeHUT94rw Pi+HaHU8ea94425SXIFsnqp/ouoT/8Ffn6vED0OoRmK0jE4fqDApXSpoL2mHX9PAGdUItMtD YrxBiBZN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A2StdE7hO vv2THuesjJDsj6aQUTgknaxKptJogNe3dDyIT+FHxXmCw0Nrbm9Q3ryl80z/G9utfFNO3Gwc q31QW3n3LJHnpqdrV3WsRzT5NwJMVtiIAGRrX8ZomtarWHT0PeEHC2xBdFzRrJtmkrwer0Wc 0nBzD7vk1XEXC9nODbmlgsesoHFgRwQBst3wClCbX1gv8aSfxQNpaf9UBC8DmyrQ621UXpBo PvcFEtWxV44vJfP0WOLCCN0Pzv2F2I66iKo7VMqbr5jlNAXJN9I1hXb7qwYJmBC9j5oeEoqv A9d44WWpxrdAr8qih4Nv89k9+9F6NoqORY3FGuVDKiW8CVhCmGT7bIvNeyicVBZFipXqPcKL VFduO2c5Ubc2npMWLUF1k9JJc9tH75l3+F/0RbYVTzGAZ+zSaudwR6h8YiCN2DBZGZkJEZbh 3X/l6jtijMN/W9sPHyyKvm/TmeEC27S3TqZPZ8PUQLxZC70V6gMbenh01JdSQsn5t8Ru0RNh Blt0g7IyZyIKCE9b+TyzbYpX6qgqEBUHia5b0vyPtQacWQlZ8uqnghAqNkLluEsy7Q/7xG6M wXUYEDsFOmB9dKOzcAOIhpxlVjSKu5mzXJ11sEtE8nyF5NJ/riCA7FGcjlki3zIpzQUNo9v7 vXl2h6Tivlk= Message-ID: <0305189e-1a8c-68f3-e3ce-74b9cb15ce1e@gmail.com> Date: Thu, 14 Mar 2019 10:46:28 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------C31129F0AFF2DB064881A604" Content-Language: fr X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org X-Mailman-Approved-At: Thu, 14 Mar 2019 10:36:11 +0000 Cc: Andreas Schildbach Subject: Re: [bitcoin-dev] Removal of reject network messages from Bitcoin Core (BIP61) X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Mar 2019 09:46:32 -0000 This is a multi-part message in MIME format. --------------C31129F0AFF2DB064881A604 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Apparently I don't have the same experience than others here, what I encountered is no reject message received for wrong txs, but from what I understand here it's not unusual to receive reject message for valid txs, then I don't see how it can be really helpful/relied, given also that the reject messages are unclear and even can be misleading As it was written already I found it useful only for debugging purposes, at least it can give some kind of ideas about what happened, bitcoin-transactions is implementing the bitcoin protocol but does not act as a node and does not pretend to fake a node behavior waiting for example to get the tx back, is the method of sending a getdata for a given tx to see if it was accepted by a node wrong ? It can't guarantee 100% that it was successful and will propagate but I see that you are doing completely different things Le 13/03/2019 à 23:30, Dustin Dettmer via bitcoin-dev a écrit : > I’ve solved the same problem in a different way. > > 1) Submit a transaction > 2) Collect all reject messages (that have matching txid in the reject > data) > 3) Wait 16 seconds after first error message received (chosen > semirandomly from trial and error) before processing errors > 4) Wait for our txid to be submitted back to us through the mempool, > if we get it notify success and delete all pending error events > 5) Signal failure with the given reject code if present (after the 16 > seconds have elapsed) > 6) If no error or success after 20 seconds, signal timeout failure > > This works fairly well in testing. Newer transaction types seem to > generate reject codes 100% of the time (from at least one node when > sending to 4 nodes) so this culling / time delay approach is > essentially required. > > On a related note: One issue is that RBF attempts with too small a fee > and accidental double spends (with enough fee for 1 tx but not a RBF) > both generate the same reject code: not enough fee. > > A new reject code for RBF based too small of fee would definitely make > for a better user experience as I’ve seen this exact problem create > confusion for users. > > Removing reject codes would make for a much worse user experience. > “Your tx failed and we have no idea why” would be the only message and > it would require waiting for a full timeout. > > On Wed, Mar 13, 2019 at 3:16 PM Oscar Guindzberg via bitcoin-dev > > wrote: > > > I'd like to better understand this, but it would be easier to just > > read the code than ask a bunch of questions. I tried looking for the > > handling of reject messages in Android  Bitcoin Wallet and BitcoinJ > > and didn't really find and handling other than logging exceptions. > > Would you mind giving me a couple pointers to where in the code > > they're handled? > > https://github.com/bitcoinj/bitcoinj/blob/master/core/src/main/java/org/bitcoinj/core/TransactionBroadcast.java#L93-L108 > _______________________________________________ > bitcoin-dev mailing list > bitcoin-dev@lists.linuxfoundation.org > > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev > > > _______________________________________________ > bitcoin-dev mailing list > bitcoin-dev@lists.linuxfoundation.org > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev -- Move your coins by yourself (browser version): https://peersm.com/wallet Bitcoin transactions made simple: https://github.com/Ayms/bitcoin-transactions Zcash wallets made simple: https://github.com/Ayms/zcash-wallets Bitcoin wallets made simple: https://github.com/Ayms/bitcoin-wallets Get the torrent dynamic blocklist: http://peersm.com/getblocklist Check the 10 M passwords list: http://peersm.com/findmyass Anti-spies and private torrents, dynamic blocklist: http://torrent-live.org Peersm : http://www.peersm.com torrent-live: https://github.com/Ayms/torrent-live node-Tor : https://www.github.com/Ayms/node-Tor GitHub : https://www.github.com/Ayms --------------C31129F0AFF2DB064881A604 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Apparently I don't have the same experience than others here, what I encountered is no reject message received for wrong txs, but from what I understand here it's not unusual to receive reject message for valid txs, then I don't see how it can be really helpful/relied, given also that the reject messages are unclear and even can be misleading

As it was written already I found it useful only for debugging purposes, at least it can give some kind of ideas about what happened, bitcoin-transactions is implementing the bitcoin protocol but does not act as a node and does not pretend to fake a node behavior waiting for example to get the tx back, is the method of sending a getdata for a given tx to see if it was accepted by a node wrong ? It can't guarantee 100% that it was successful and will propagate but I see that you are doing completely different things

Le 13/03/2019 à 23:30, Dustin Dettmer via bitcoin-dev a écrit :
I’ve solved the same problem in a different way.

1) Submit a transaction
2) Collect all reject messages (that have matching txid in the reject data)
3) Wait 16 seconds after first error message received (chosen semirandomly from trial and error) before processing errors
4) Wait for our txid to be submitted back to us through the mempool, if we get it notify success and delete all pending error events
5) Signal failure with the given reject code if present (after the 16 seconds have elapsed)
6) If no error or success after 20 seconds, signal timeout failure

This works fairly well in testing. Newer transaction types seem to generate reject codes 100% of the time (from at least one node when sending to 4 nodes) so this culling / time delay approach is essentially required.

On a related note: One issue is that RBF attempts with too small a fee and accidental double spends (with enough fee for 1 tx but not a RBF) both generate the same reject code: not enough fee.

A new reject code for RBF based too small of fee would definitely make for a better user experience as I’ve seen this exact problem create confusion for users.

Removing reject codes would make for a much worse user experience. “Your tx failed and we have no idea why” would be the only message and it would require waiting for a full timeout.

On Wed, Mar 13, 2019 at 3:16 PM Oscar Guindzberg via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org> wrote:
> I'd like to better understand this, but it would be easier to just
> read the code than ask a bunch of questions. I tried looking for the
> handling of reject messages in Android  Bitcoin Wallet and BitcoinJ
> and didn't really find and handling other than logging exceptions.
> Would you mind giving me a couple pointers to where in the code
> they're handled?

https://github.com/bitcoinj/bitcoinj/blob/master/core/src/main/java/org/bitcoinj/core/TransactionBroadcast.java#L93-L108
_______________________________________________
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev

_______________________________________________
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
-- 
Move your coins by yourself (browser version): https://peersm.com/wallet
Bitcoin transactions made simple: https://github.com/Ayms/bitcoin-transactions
Zcash wallets made simple: https://github.com/Ayms/zcash-wallets
Bitcoin wallets made simple: https://github.com/Ayms/bitcoin-wallets
Get the torrent dynamic blocklist: http://peersm.com/getblocklist
Check the 10 M passwords list: http://peersm.com/findmyass
Anti-spies and private torrents, dynamic blocklist: http://torrent-live.org
Peersm : http://www.peersm.com
torrent-live: https://github.com/Ayms/torrent-live
node-Tor : https://www.github.com/Ayms/node-Tor
GitHub : https://www.github.com/Ayms
--------------C31129F0AFF2DB064881A604--