Return-Path: Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 458C2C002D for ; Mon, 29 Aug 2022 18:19:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 117CB4032C for ; Mon, 29 Aug 2022 18:19:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 117CB4032C Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=lifewithalacrity-com.20210112.gappssmtp.com header.i=@lifewithalacrity-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=XSzETYHm X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -1.399 X-Spam-Level: X-Spam-Status: No, score=-1.399 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=no autolearn_force=no Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lg8cRNM9dmEc for ; Mon, 29 Aug 2022 18:19:45 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 6ED444032B Received: from mail-yw1-x1133.google.com (mail-yw1-x1133.google.com [IPv6:2607:f8b0:4864:20::1133]) by smtp4.osuosl.org (Postfix) with ESMTPS id 6ED444032B for ; Mon, 29 Aug 2022 18:19:45 +0000 (UTC) Received: by mail-yw1-x1133.google.com with SMTP id 00721157ae682-33dce2d4bc8so216854127b3.4 for ; Mon, 29 Aug 2022 11:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lifewithalacrity-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=XO4L9no3a63DlRK9i30vMge7hafVme5jb6PO34BYves=; b=XSzETYHmTr4/G4ypXvQO6Obg2qR5+lb1eB0ScL30HyxrpysY5Woo82kbaU5/AOqdbM cgueK+wkV209tqgN4AAskJ5wD+u90Iv8+V3lXPHBBIhCuVqlEJPNSFPS5DgifSw65lnS TpD2IztRdOpDUAgsD+tSsY0+AnruMGXwBVc/GRcekgIrlJnAJfPsTaByRvGVQ2KGVQIP LltEYBuvnwqm7Z8X9mrjpTX75kHuCQbewL5hWmHuL7JJyKStN0LK5d/WkkWwlRjl1IX6 9Zp04Z7eJwlhkEQQKMtnEhiJqS0hwhyqJJ2IdvpSRLE1DoBKQ8SQa1lhC1sfMa7pdFHr C+og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=XO4L9no3a63DlRK9i30vMge7hafVme5jb6PO34BYves=; b=xsZZ9UqyUOH2ZQESWtT4xGbsD36mBscPSgN2VDtjD9VW/Pw0LSyK5TdKLCzx+t5FX2 mHRrLk8MbR/EBnRTNwK4fCbhZh04hdJGDh82le0NJ6UP+UnLkzm0bKYbK1tsljPKqKz3 q6aWvDQcizMz+dmzhfBTYlXs1mmHwYiHMP8OlQ97OGsrJCsuAh7cFZ9qpr7HrOkchl0L 0fYOkAA99YNZkigDeAsLx4Ta/yEluKaDk/XpUWN4dnjO764uVxw4nk/VbW4SwjmClnLS WYgm81Vei2e4uyUUouYdxYgmlQGYu6OlTrxCN+TnAX3wKXznI2U4e+TaAZz+I1EZQvlW 4OIQ== X-Gm-Message-State: ACgBeo2h/VfgpwVJMLtEI4VM1r2J9k23RKjOZFWHAcDqgSw+6o2hEUr+ 7IgyxWrDsgbFRhpPj7NDomuXvonm+uPOP5zAX+0bX9ulQbg= X-Google-Smtp-Source: AA6agR76oNqrmFfbfOj/0kjTHvr4UhQ9W1WIDUstA3ADsiOxGnYa65PJyZ2kQdIfuychfFS3mvjhycrzNZkQ/zp4JHY= X-Received: by 2002:a81:f10:0:b0:33d:c7c6:434 with SMTP id 16-20020a810f10000000b0033dc7c60434mr11399226ywp.78.1661797184319; Mon, 29 Aug 2022 11:19:44 -0700 (PDT) MIME-Version: 1.0 References: <20220829154603.fec7mlm526vdfo2i@artanis> In-Reply-To: <20220829154603.fec7mlm526vdfo2i@artanis> From: Christopher Allen Date: Mon, 29 Aug 2022 11:19:07 -0700 Message-ID: To: Ali Sherief , Bitcoin Protocol Discussion Content-Type: multipart/alternative; boundary="000000000000dc362d05e7654e1f" X-Mailman-Approved-At: Mon, 29 Aug 2022 18:30:14 +0000 Cc: Nicholas Ochiel Subject: Re: [bitcoin-dev] BIP Proposal: Wallet Labels Export Format X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2022 18:19:47 -0000 --000000000000dc362d05e7654e1f Content-Type: text/plain; charset="UTF-8" On Mon, Aug 29, 2022 at 9:12 AM Ali Sherief via bitcoin-dev < bitcoin-dev@lists.linuxfoundation.org> wrote: > I am aware that business processes are mostly CSV file oriented I disagree that business processes are mostly CSV. Amateur processes maybe, but professional accounting, no. Trying to do my business accounting with CSV files from various exchanges is PITA. > so you can make a statement akin to BIP174 in the Goal 2 BIP, that expects > the medium of exchange to be in files ending in .csv. I wouldn't mind if > you require .csv file extension in a BIP for Goal 2. But such a statement > is not appropriate in the Goal 1 BIP which is only concerned with the > wallet label format itself. I too would like to see some separation of layers here, as there are other possible output formats. Maybe expanding on another use case for this data would help. I've been working with @nochiel on export to a Plain-Text Accounting friendly format, initially the beancount python app : (our prototype is current at /beancounter.py but it is being refactored into new repo). Basically what the final tool will do is: given a descriptor, get any transactions for that descriptor from a random explora via Tor (initially ours and Blockstream's), and then get price information from a random Spotbit price server via Tor (initially just ours, but seeking more hosts), and export a beancount compatible file. ``` python app.py beancount "wpkh(tpubD9hudZxy8Uj3453QrsEbr8KiyXTYC5ExHjJ5sNDVW7yKJ8wc7acKQcpdbvZX6dFerHK6MfVvs78VvGfotjN28yC4ij6nr4uSVhX2qorUV8V/0/*)" Outputs: spotbit.beancount 2008-10-31 commodity BTC name: "Bitcoin" asset-class: "cryptocurrency" 2018-04-02 open Assets:BTC BTC 2018-04-02 open Liabilities:Cash:USDT USDT 2018-04-02 * "tb1qcrekknrspx28t9vl53ltsag5gqgqdj066ydf75" "Transaction hash: 2a2f7f24761fa54cb6e559efea5678415d9cbbabc42e6a4e2ce463ee3c446230" Assets:BTC 1.00000000 BTC { 6935.16 USDT } Liabilities:Cash:USDT - 6935.16 USDT 2018-04-02 * "tb1q45whzx3emntntnpzjdx3gzj6z5cgxakkg7s3sa" "Transaction hash: 387123efcaa707759a4af8159cb1309fae86b793d26b5fd8bba42637852dde89" Assets:BTC - 0.36300616 BTC @ 6935.16 USDT Liabilities:Cash:USDT 2517.51 USDT 2018-04-02 * "tb1qgv5484m83e2mzz3n8tf4snvnwj5qgqgampnhvv" "Transaction hash: 387123efcaa707759a4af8159cb1309fae86b793d26b5fd8bba42637852dde89" Assets:BTC - 0.63699243 BTC @ 6935.16 USDT Liabilities:Cash:USDT 4417.64 USDT 2018-04-02 * "tb1q45whzx3emntntnpzjdx3gzj6z5cgxakkg7s3sa" "Transaction hash: 387123efcaa707759a4af8159cb1309fae86b793d26b5fd8bba42637852dde89" Assets:BTC 0.36300616 BTC { 6935.16 USDT } Liabilities:Cash:USDT - 2517.51 USDT ``` I can then use the beancount cli app (or it's fava webapp) to easily add other details to this file to do my bitcoin accounting (and any other accounting I need). In particular, as beancount support lots, it solves a problem for me with US taxes which is unrealized capital gain (I get 1 BTC from donor at $20K, the price goes up to $30K and I pay it to an engineer, my BTC balance is 0 but my unrealized capital gain for US tax purposes is $10K). More ideally, if there were additional details that I could merge in from my wallet export, such as payer and payee, notes, etc. it would make my accounting much easier. Thus I'd like to see an easier and interoperable way to merge these details (my account details from an Esplora and price details from Spotbit), with what my different wallets may (or may not) have available. I hope that this might inspire some ideas from the people working on this wallet export format. -- Christopher Allen --000000000000dc362d05e7654e1f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Aug 29, 2022 at 9:12 AM Ali Sheri= ef via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org> wrote:
I am aware that business processes are = mostly CSV file oriented

I disagree that bu= siness processes are mostly CSV.=C2=A0 Amateur processes maybe, but profess= ional accounting, no. Trying to do my business accounting with CSV files fr= om various exchanges is PITA.
=C2=A0
so you= can make a statement akin to BIP174 in the Goal 2 BIP, that expects the me= dium of exchange to be in files ending in .csv. I wouldn't mind if you = require .csv file extension in a BIP for Goal 2. But such a statement is no= t appropriate in the Goal 1 BIP which is only concerned with the wallet lab= el format itself.

I too would like to see s= ome separation of layers here, as there are other possible output formats. = Maybe expanding on another use case for this data would help.
I've been working with=C2=A0@nochiel=C2=A0on export to a Plain-Text Accounting friendly format, initially the beancount python=C2=A0app= : (our prototype is current at=C2=A0/bea= ncounter.py but it is being refactored into new repo).

Basically what the final tool will do is: given a descriptor, get = any transactions for that descriptor from a random explora via Tor (initial= ly ours and Blockstream's), and then get price information from a rando= m Spotbit price server via Tor (initially just ours, but seeking more hosts= ), and export a beancount compatible file.

```

python app.py beancount "wpkh(tpubD9hudZxy8Uj3453QrsEb= r8KiyXTYC5ExHjJ5sNDVW7yKJ8wc7acKQcpdbvZX6dFerHK6MfVvs78VvGfotjN28yC4ij6nr4u= SVhX2qorUV8V/0/*)"
Outputs: spotbit.beancount

2008-10-31 com= modity BTC
=C2=A0 name: "Bitcoin"
=C2=A0 asset-class: "= ;cryptocurrency"

2018-04-02 open Assets:BTC BTC
2018-04-02 o= pen Liabilities:Cash:USDT USDT

2018-04-02 * "tb1qcrekknrspx28t9= vl53ltsag5gqgqdj066ydf75" "Transaction hash: 2a2f7f24761fa54cb6e5= 59efea5678415d9cbbabc42e6a4e2ce463ee3c446230"
Assets:BTC 1.000000= 00 BTC { 6935.16 USDT }
Liabilities:Cash:USDT - 6935.16 USDT

20= 18-04-02 * "tb1q45whzx3emntntnpzjdx3gzj6z5cgxakkg7s3sa" "Tra= nsaction hash: 387123efcaa707759a4af8159cb1309fae86b793d26b5fd8bba42637852d= de89"
Assets:BTC - 0.36300616 BTC @ =C2=A06935.16 USDT
Liabil= ities:Cash:USDT 2517.51 USDT

2018-04-02 * "tb1qgv5484m83e2mzz= 3n8tf4snvnwj5qgqgampnhvv" "Transaction hash: 387123efcaa707759a4a= f8159cb1309fae86b793d26b5fd8bba42637852dde89"
Assets:BTC - 0.63699= 243 BTC @ =C2=A06935.16 USDT
Liabilities:Cash:USDT 4417.64 USDT
<= br>2018-04-02 * "tb1q45whzx3emntntnpzjdx3gzj6z5cgxakkg7s3sa" &quo= t;Transaction hash: 387123efcaa707759a4af8159cb1309fae86b793d26b5fd8bba4263= 7852dde89"
Assets:BTC 0.36300616 BTC { 6935.16 USDT }
Liabili= ties:Cash:USDT - 2517.51 USDT=C2=A0

<= span style=3D"caret-color: rgb(0, 0, 0);">```

I can then use the beancount cli app (or it's fava web= app) to easily add other details to this file to do my bitcoin accounting (= and any other accounting I need). In particular, as beancount support lots,= it solves a problem for me with US taxes which is unrealized capital gain = (I get 1 BTC from donor at $20K, the price goes up to $30K and I pay it to = an engineer, my BTC balance is 0 but my unrealized capital gain for US tax = purposes =C2=A0is $10K).

More ideally, if there we= re additional details that I could merge in from my wallet export, such as = payer and payee, notes, etc. it would make my accounting much easier.=C2=A0=

Thus I'd like to see an easier and interopera= ble way to merge these details (my account details from an Esplora and pric= e details from Spotbit), with what my different wallets may (or may not) ha= ve available.

I hope that this might inspire some = ideas from the people working on this wallet export format.

<= /div>
-- Christopher Allen

--000000000000dc362d05e7654e1f--