Skip to content

Instantly share code, notes, and snippets.

@chris-belcher
Last active February 18, 2025 22:39
Show Gist options
  • Save chris-belcher/ca5051285c6f8d38693fd127575be44d to your computer and use it in GitHub Desktop.
Save chris-belcher/ca5051285c6f8d38693fd127575be44d to your computer and use it in GitHub Desktop.

Revisions

  1. chris-belcher revised this gist Jul 18, 2023. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -33,6 +33,8 @@ So if anyone reading this has any kind of influence influence then I urgently ne

    Here is a photo of me in my dark room. I’m here over 23 hours per day.

    ![cb](https://user-images.githubusercontent.com/8398185/254129767-47c5da2c-e83a-4c63-94df-b303de4f62e1.jpg)




  2. chris-belcher revised this gist Jul 18, 2023. 1 changed file with 26 additions and 0 deletions.
    26 changes: 26 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,32 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Update

    It’s been one year since I stopped working on my Bitcoin projects. Many people donated money to me. They deserve to know what’s going on. I have severe long Covid. It has utterly destroyed my life. Made me completely disabled in body and mind. And I need help.

    I got Covid on March 2022. By May 2022 I could see that I hadn’t really recovered fully. I’d get weird symptoms when I did any kind of exercise. In July 2022, disaster struck as my condition worsened dramatically and I found myself unable to work. I also couldn’t read books, watch TV, scroll my phone, drive or anything that required concentration.

    I spent the next few months mostly outside lying down looking at the clouds, trying not to concentrate on anything. I tried many different experimental treatments but nothing worked that well. Resting a lot, in body and mind, helped me most. Giving my body the rest it needed to heal itself. By October 2022, I had improved a bit, I could read my phone for a few minutes and watch short YouTube videos, with breaks.

    But in November, things took a turn for the worse. I lost goals/gains? I had made and steadily went downhill. In February 2023 I got so bad that I became sensitive to light. I had to rest in a completely dark room. If a bit of sunlight poked through the curtains, it would set off bodily pains, intense headache and nausea. I had to blindfold myself to go to the bathroom, feeling my way around like a blind man. Since then I’ve been in this dark room, lying in bed, doing absolutely nothing. I haven’t written a single line of code in a year. My doctor says that it is about blood. That covid damages the blood vessels and they no longer deliver nutrients properly to the muscles and brain. I've actually seen this with my own eyes, once when having my blood taken the nurse noticed it was very thick and sticky. She put a few drops into a tissue to show me, and the blood didn't flow like normal but jiggled like uncooked egg. Blood thinners are one of the things that helped a bit though not enough.

    I’ve got important work to do. I shouldn’t be in this dark room for another day, let alone for the next several years or decades which is how long this disease lasts.

    Near the start of Covid, when patients were filling up hospitals there was a series of rapid trials and in only a few weeks they found widely available medications that turned out to work well for acute covid. The same kind of thing should happen now for long covid.

    A lot could be achieved just by speeding up the bureaucracy. For example, it often takes 8 months for a scientific paper to get past peer reviewing lists because the reviewer was reading it for 8 months but because that’s how long it took them to get round to it. I’ve got a background in science so I know how this works. It’s OK for an experiment on subatomic larticles, not when so many people are disabled and unwell. Right now there’s a trial for paxlovid, which will take two years (!) very curious given patients take it just got two weeks. I am seeing one of the rare specialists in post viral illnesses who now runs a long covid clinic. They havent been able to help me much since theres not enough science yet. It’s likely I’d be near the front of the queue when a medication that works is found.

    We need these rapid trials. I need those trials, quickly.

    The long covid space has plenty of ideas for stuff to try (for example this [long covid researcher](https://twitter.com/resiapretorius/status/1596469636010512384), [this patient advocate](https://twitter.com/loscharlos/status/1674174208874807297)).
    So if anyone reading this has any kind of influence influence then I urgently need your help.

    Here is a photo of me in my dark room. I’m here over 23 hours per day.




    ## Health-related absense
    See https://www.reddit.com/r/Bitcoin/comments/yvqf42/important_dev_chris_belcher_who_was_working_on/iwil0r9/

  3. chris-belcher revised this gist Nov 15, 2022. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,9 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Health-related absense
    See https://www.reddit.com/r/Bitcoin/comments/yvqf42/important_dev_chris_belcher_who_was_working_on/iwil0r9/

    ## Week-2022-6-20
    took part in a Bitcoin Developers twitch livestream taking viewers through Teleport: https://twitter.com/ConorOkus/status/1540024421812826113

  4. chris-belcher revised this gist Jun 27, 2022. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,13 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week-2022-6-20
    took part in a Bitcoin Developers twitch livestream taking viewers through Teleport: https://twitter.com/ConorOkus/status/1540024421812826113

    pushed this commit which adds one new method of creating funding transactions in case the first method fails
    https://github.com/bitcoin-teleport/teleport-transactions/commit/761e3a9bb86dd1380b01a1e2ffdf8c97d43dd2b9


    ## Week-2022-6-13
    carefully analyzing all the debug information i got from the crash bug from last week

  5. chris-belcher revised this gist Jun 21, 2022. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,15 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week-2022-6-13
    carefully analyzing all the debug information i got from the crash bug from last week

    found another thing i need to print out in the debug log, trying again to reproduce the crash

    while that happens i made a new release of electrum personal server: https://github.com/chris-belcher/electrum-personal-server/releases/tag/eps-v0.2.4

    the dogfooding from earlier gives me the impression that the create_spending_tx() function will sometimes fail, ultimately because its method of creating transactions doesn't always work, so i need to create another way that can be used if this first way fails

    ## Week-2022-6-6
    pushed this commit which i think fixes the earlier issue of maker's swapcoins not appearing in the wallet

  6. chris-belcher revised this gist Jun 14, 2022. 1 changed file with 21 additions and 0 deletions.
    21 changes: 21 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,27 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week-2022-6-6
    pushed this commit which i think fixes the earlier issue of maker's swapcoins not appearing in the wallet

    https://github.com/bitcoin-teleport/teleport-transactions/commit/229ab43886c13d3a5e12ea0614f3c67ebc95cac4

    did another coinswap on signet to confirm this, and it does work


    noticed another bug where the taker code wont import the addresses and transactions of a coinswap you just did

    fixed that here: https://github.com/bitcoin-teleport/teleport-transactions/commit/6176d12cc616779f56028b07ed024bf1fc0ee3d7

    added a check when starting the maker, which i suspect trips up a lot of people when they try to run a maker with this early stage code: https://github.com/bitcoin-teleport/teleport-transactions/commit/dced1f998e264a4706f76991783f6cf6e8a51d78

    found a crash bug while dogfooding doing coinswaps on signet, i was able to reproduce it too with a backtrace so im hopeful i can fix it easily

    hopefully fixed another crash bug but the not one i was looking for https://github.com/bitcoin-teleport/teleport-transactions/commit/ced801cc62e4e1257e81e8ad7978caacbcc0dede

    i managed to reproduce the crash bug from earlier with a backtrace and with debug symbols enabled, hopefully that will allow me to find the cause of it, it might take a while


    ## Week-2022-5-30
    continued to dogfood doing coinswaps on signet over tor

  7. chris-belcher revised this gist Jun 6, 2022. 1 changed file with 25 additions and 0 deletions.
    25 changes: 25 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,31 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week-2022-5-30
    continued to dogfood doing coinswaps on signet over tor

    found other weird issues, including an alarming issue where coins will just disappear from the wallet, so im investigating that

    created a new main subroutine "display-wallet-addresses" which ill need for debugging this coins disappearing issue: https://github.com/bitcoin-teleport/teleport-transactions/commit/9b9f6b83029e9143dc1ed7e2e5ea2bac78405348

    and a bugfix https://github.com/bitcoin-teleport/teleport-transactions/commit/66b2f63886aac2b0bf3c04abd65c10b3b5356a1a

    found the cause of the disappearing coins, it was because i was using two versions of the wallet file and i happened to look at the old version

    found another issue while dogfooding, which is that the maker cant seem to spend coins in timelock contracts

    after investigation looks like the walletcreatefundedpsbt RPC call doesnt want to select the timelocked coins, i dont think its worth fixing this since eventually we'll be using scriptless-scripts instead, its best to just spend the coins back to our wallet when their timelock matures, thats what the watchtower does automatically anyway

    did another coinswap with myself on signet, noticed some other coins disappeared! now ill track down this bug

    after searching a bit, seems like what i did was use the same wallet file for one of the makers and the taker, thats pretty undefined behaviour so

    doing another coinswap with myself on signet, now with the correct wallet files haha
    still found some problems, again missing coins, will investigate

    looks like the maker code doesnt correctly import addresses, and i never noticed when trying it on regtest because all the coinswap apps were connected to the same regtest instance


    ## Week-2022-5-23
    pushed commit which implements code that has makers advertising fidelity bonds
    https://github.com/bitcoin-teleport/teleport-transactions/commit/da30210ebda960686ababfc76c026fabee605da6
  8. chris-belcher revised this gist May 30, 2022. 1 changed file with 18 additions and 0 deletions.
    18 changes: 18 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,24 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week-2022-5-23
    pushed commit which implements code that has makers advertising fidelity bonds
    https://github.com/bitcoin-teleport/teleport-transactions/commit/da30210ebda960686ababfc76c026fabee605da6

    this commit doesnt contain an update to the tests, so they fail now, will fix

    small edit pushed: https://github.com/bitcoin-teleport/teleport-transactions/commit/389944454b12d6778ff4aa815de4a69dfafb4985

    fixed tests: https://github.com/bitcoin-teleport/teleport-transactions/commit/1665c9a55f6523c3c7acd5ef0a44e0cdbcf9cb5b

    im examining the logs of the two signet makers iv been running, i got the idea to reduce spam and add more detail to the logs: https://github.com/bitcoin-teleport/teleport-transactions/commit/73c4f983f638677e945dec8cadcf29d7e69343fa there have been three coinswap attempts but all ended up going to the contract transaction stage, that's pretty weird, ill try doing a coinswap with them, i tried to do a coinswap and it looks like one of the makers kept refusing incoming connections for some reason, very weird

    i can see why people maybe gave up halfway through, because waiting for signet blocks is pretty boring, coinjoin has much more instant gratification compared to coinswap

    ill try again with just one hop instead of two, so its less likely to fail.. with one hop the maker that previously refused connections is now accepting connections, weird
    maybe the yield-generator's connection to the bitcoin node is intermittent and that causes the maker to think it cant reach the bitcoin node, making it shut down... also the connection between maker and watchtower failed too for some reason, which made the whole coinswap fail... very weird


    ## Week-2022-5-16
    wrote a suggestion on the minimint project after watching their talk on the open source stage of the miami bitcoin conference: https://github.com/fedimint/minimint/issues/96

  9. chris-belcher revised this gist May 25, 2022. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,15 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week-2022-5-16
    wrote a suggestion on the minimint project after watching their talk on the open source stage of the miami bitcoin conference: https://github.com/fedimint/minimint/issues/96

    finished implementing the generating of fidelity bond proofs, the signatures which are used to convince other entities that your fidelity bond is real and owned by you, also finished the verify function which checks the proof is valid

    implemented an extra column in the "download-offers" subroutine which displays maker's fidelity bond values, will now test a little bit

    it seems to work on signet too, both when querying a single maker and when querying all makers

    ## Week 2022-5-9
    finished implementing the ability to spend from timelocked fidelity bond addresses in teleport
    https://github.com/bitcoin-teleport/teleport-transactions/commit/46e29e5e880e3a3ecf4e65f7e1ef02d54bc4b4da
  10. chris-belcher revised this gist May 16, 2022. 1 changed file with 12 additions and 0 deletions.
    12 changes: 12 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,18 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week 2022-5-9
    finished implementing the ability to spend from timelocked fidelity bond addresses in teleport
    https://github.com/bitcoin-teleport/teleport-transactions/commit/46e29e5e880e3a3ecf4e65f7e1ef02d54bc4b4da

    wrote a reply to some messages on the mailing list about my fidelity bonds BIP
    https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-May/020479.html

    wrote another reply
    https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-May/020486.html

    currently working on implementing fidelity bond proofs and the function which calculates the value of a fidelity bond

    ## Week 2022-5-2
    started to implement fidelity bonds into teleport

  11. chris-belcher revised this gist May 15, 2022. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,13 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week 2022-5-2
    started to implement fidelity bonds into teleport

    implemented the generating of the timelocked addresses, and sync'ing them

    currently working on having fidelity bond coins be printed out in the "wallet-balance" main method

    ## Week 2022-4-25
    realized that this code is pretty urgent so wrote it and created a PR https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/1256

  12. chris-belcher revised this gist May 2, 2022. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,15 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week 2022-4-25
    realized that this code is pretty urgent so wrote it and created a PR https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/1256

    continuing to work on creating a bip for fidelity bond wallets, currently working on the details of the certificate signature to make sure that its compatible with signmessage/verifymessage that other wallets already implement

    uploaded the code which produces test vectors for the fidelity bonds bip: https://github.com/chris-belcher/timelocked-addresses-fidelity-bond-bip-testvectors

    sent the bip proposal to the mailing list: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-May/020389.html

    ## Week 2022-4-18
    trying to ease myself back into doing work

  13. chris-belcher revised this gist Apr 25, 2022. 1 changed file with 12 additions and 0 deletions.
    12 changes: 12 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,18 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week 2022-4-18
    trying to ease myself back into doing work

    continued to write the draft for the new BIP document about fidelity bond wallets, which is already implemented in joinmarket and will be an important part of teleport / coinswap

    managed to write these comments on the joinmarket github about fidelity bonds: https://github.com/JoinMarket-Org/joinmarket-clientserver/issues/1247#issuecomment-1107808303

    this week i only worked about an hour a day :( this sucks. can't wait until tuesday for when i have my meeting with the physiotherapist, hopefully he can help

    ## Week 2022-4-11
    wasnt able to do any work all week due to the previously-written about covid wrist and hand pain issue

    ## Week 2022-4-4
    did some napkin math regarding my newfound inspiration for private methods of lightweight wallet sync, but unfortunately it didnt work, you can get good privacy but it uses far too much bandwidth

  14. chris-belcher revised this gist Apr 25, 2022. 1 changed file with 11 additions and 0 deletions.
    11 changes: 11 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,17 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week 2022-4-4
    did some napkin math regarding my newfound inspiration for private methods of lightweight wallet sync, but unfortunately it didnt work, you can get good privacy but it uses far too much bandwidth

    back to trying to figure out the standard for fidelity bonds signatures

    later, i managed to figure everything out about fidelity bond signatures, i have rust code which generates them and signs certificates, now ill write a bip document about them

    i noticed that the pull request on bitcoin core which implements my BIP-326 got one tACK. So I reviewed the pull request myself as well, to hopefully get the PR merged. https://github.com/bitcoin/bitcoin/pull/24128#issuecomment-1087534889

    looks like covid made my wrist/hand injury RSI from a few months ago flare-up again :( i got a lot of pain in the same places in the wrists and hands when i type on a keyboard or use the mouse. I emailed my doctor who said yes its fairly common, he says that in most cases it lasts 1-2 months but may be shorter.

    ## Week 2022-3-28
    had covid, didnt work all week

  15. chris-belcher revised this gist Apr 4, 2022. 1 changed file with 23 additions and 0 deletions.
    23 changes: 23 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,29 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week 2022-3-28
    had covid, didnt work all week

    got some inspiration for private methods of lightweight wallet sync while in self-isolation


    ## Week 2022-3-21
    continued to work on implementing a part of joinmarket's fidelity bond protocol in rust, so that it can later be used in teleport and so that the same fidelity bond can be used in both teleport and joinmarket, and also so that the protocol is standardized so that other wallets can support timelocked addresses too

    ## Week 2022-3-14
    the PR i reviewed was merged into bitcoin core: https://github.com/bitcoin/bitcoin/pull/24225 it is a step towards adding an implementation of my bip326 into core

    played with descriptor wallets in core a little bit, intending to make teleport use them, as they are clearly the future. however it looks like rust-bitcoin doesnt support the importdescriptors RPC yet: https://github.com/rust-bitcoin/rust-bitcoincore-rpc/pull/199
    so ill postpone moving to them

    im giving up the brainstorming into private methods of lightweight wallet sync for now, C-PIR seems too costly for the server and prefix filtering of addresses doesnt provide any privacy for reasonable bandwidth usages. it's not even worth writing up anywhere

    now working on adding fidelity bonds to teleport

    i thought of another thing to try for brainstorming private methods of lightweight wallet sync, involving downloading false positives and using the properties of the binomial coefficent, ill investigate it after i finish some of this timelocked address and fidelity bonds code

    working on reproducing the exact same fidelity bond signing stuff as in joinmarket, but in rust, to be used in teleport

    ## Week 2022-3-7
    fixed a thing on electrum personal server, which was quick and easy, but Bitcoin Core is deprecating an RPC call that EPS uses, so that had to be tweaked

  16. chris-belcher revised this gist Mar 14, 2022. 1 changed file with 14 additions and 0 deletions.
    14 changes: 14 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,20 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week 2022-3-7
    fixed a thing on electrum personal server, which was quick and easy, but Bitcoin Core is deprecating an RPC call that EPS uses, so that had to be tweaked

    my anti-fee-sniping and extra privacy BIP was merged(!): https://github.com/bitcoin/bips/pull/1269#event-6199508205

    reviewed a PR for bitcoin core which could ultimately lead to an implementation of bip326 being added: https://github.com/bitcoin/bitcoin/pull/24225

    did a bit of reading papers about cryptography to see if some idea would work, i think it will not. the idea is from this thread: https://bitcointalk.org/index.php?topic=5365132.20

    made some necessary bug fixes and then made a release of electrum personal server: https://github.com/chris-belcher/electrum-personal-server/releases/tag/eps-v0.2.3

    thinking about and working on another idea related to the above cryptography, you could summarize the aims of the idea as "an electrum server that cant spy on you"


    ## Week 2022-2-28
    created an alpha release and posted it on all the places https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-February/020026.html

  17. chris-belcher revised this gist Mar 8, 2022. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,13 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week 2022-2-28
    created an alpha release and posted it on all the places https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-February/020026.html

    spent time answering questions from various people

    working on doing some calculations for fidelity bonds, it is research ill need before adding fidelity bonds to teleport

    ## Week 2022-2-21
    tried to write and make a short video presentation about the upcoming alpha release, but
    got stuck with writer's block and decided it wasnt worth spending 2 weeks doing it
  18. chris-belcher revised this gist Mar 5, 2022. 1 changed file with 13 additions and 0 deletions.
    13 changes: 13 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,19 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week 2022-2-21
    tried to write and make a short video presentation about the upcoming alpha release, but
    got stuck with writer's block and decided it wasnt worth spending 2 weeks doing it

    did some test coinswaps on signet and found some other things that could really trip
    people up when testing, so decided to fix them: https://github.com/bitcoin-teleport/teleport-transactions/commit/390341b056ed91d4cbcf24c1b992b7f1693508c4 https://github.com/bitcoin-teleport/teleport-transactions/commit/4b8581e7f8801b9847edfdb8438db6c926ba5435

    other small edits: https://github.com/bitcoin-teleport/teleport-transactions/commit/43f035527c93619f51afefd0b8c3d266e8c580e9 https://github.com/bitcoin-teleport/teleport-transactions/commit/f9bff3f7007fd4326680baaf0628bdeb842bf74f

    decided to do the release on monday when more people are on the internet

    until then, working on some analysis of joinmarket's fidelity bond ecosystem, that understanding will be needed because teleport also requires fidelity bonds

    ## Week 2022-2-14
    created a main subroutine "download-offers" which displays all the offers of all the makers out there https://github.com/bitcoin-teleport/teleport-transactions/commit/4b1c89e3954c37cfc08a96410735a93076e6f0f8

  19. chris-belcher revised this gist Feb 21, 2022. 1 changed file with 21 additions and 0 deletions.
    21 changes: 21 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,27 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week 2022-2-14
    created a main subroutine "download-offers" which displays all the offers of all the makers out there https://github.com/bitcoin-teleport/teleport-transactions/commit/4b1c89e3954c37cfc08a96410735a93076e6f0f8

    other small edits, which add small things or rename things: https://github.com/bitcoin-teleport/teleport-transactions/commit/d83dcc8db6d960c2af0281ff255b27a0235799bc https://github.com/bitcoin-teleport/teleport-transactions/commit/876e986c943812729ebc4d438d9eafef88e39a4f https://github.com/bitcoin-teleport/teleport-transactions/commit/c34f75c98cd8da7a3b0e9935a038ac3bd3068771

    now working on updating the rust-bitcoin dependency to the latest version

    done, see https://github.com/bitcoin-teleport/teleport-transactions/commit/d92ef31aa0a4edf747a5c37537b6982ee301a96e

    added a fee rate parameter that the user can configure https://github.com/bitcoin-teleport/teleport-transactions/commit/85610a0cbe5de706877cfeed930c50facee3aed7

    these are all the features i want in the first alpha release, now ill write some more docs if needed, and then write an email to the mailing list about this release and post it all around like on reddit/twitter/mastodon

    i pretended i was new to the project and set up a maker from scratch on sig, i found a bug which i need to work through.

    i think i found the cause of the bug, which was caused by upgrading to bitcoincore-rpc version 0.14, posted an issue to the github https://github.com/rust-bitcoin/rust-bitcoincore-rpc/issues/211 playing around with it also helped me find a workaround which i think ill use until it gets fixed upstream

    coded one or two small fixes, also edited and expanded the README in preparation for the upcoming alpha release

    wrote the email which will announce the alpha release, not sent yet. I'm thinking of creating a video presentation which might be a bit more accessible, I've seen other announcement posts which have an accompanying video and it seemed like a good idea.

    ## Week 2022-2-7
    separated out a big chunk of code in taker_protocol.rs into its own function

  20. chris-belcher revised this gist Feb 15, 2022. 1 changed file with 26 additions and 0 deletions.
    26 changes: 26 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,32 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week 2022-2-7
    separated out a big chunk of code in taker_protocol.rs into its own function

    pushed this commit https://github.com/bitcoin-teleport/teleport-transactions/commit/b430eb25b982e9246dfed0e65582104511f9151d with it now all the taker connections
    are attempts repeatedly before giving up.

    This robustness is important for decentralization, without it only makers on very
    stable servers and connections which never go down would earn the max profit. We want makers to be runnable on raspberry pis in people's bedrooms, that would be out without more robustness and re-trying the connections.

    a few other small commits which involve renaming things mostly: https://github.com/bitcoin-teleport/teleport-transactions/commit/3a590944cbc8a153bbce8003b22ad1e2b4dc5b3e https://github.com/bitcoin-teleport/teleport-transactions/commit/731d73871834a7bfcaf76a62a4646e04eeeb8b8f

    currently working on adding socks5 proxy support, which is needed to use tor. because of that i notice the version of tokio im using is many many versions out of date and i need to update, or else this tokio-socks package i found wont work

    done, that was easier than i thought https://github.com/bitcoin-teleport/teleport-transactions/commit/73145d8475766a7b9db6b869773d934442e65447

    added ability for taker to connect to .onion makers https://github.com/bitcoin-teleport/teleport-transactions/commit/0f75c1dc12addf5057b204178f5c248a18b9dc7a

    add timeouts to the taker message sending routines https://github.com/bitcoin-teleport/teleport-transactions/commit/af3e8a39a7ba0dcf92b8b62c18ec12875c7fb01a

    implemented retrying and timeouts to the offerbook synchronization code https://github.com/bitcoin-teleport/teleport-transactions/commit/4405ed37e5a4f32e3c372a13593f73ce29fe3de9

    now working on creating directory servers

    created a simple directory server with the python http.server module, also created code to have teleport takers sync from those directory servers. pushed the code: https://github.com/bitcoin-teleport/teleport-transactions/commit/173a1c05ed7dbbaaeba8f61a5353f44056169e8b


    ## Week 2022-1-31
    did small code edits:
    https://github.com/bitcoin-teleport/teleport-transactions/commit/5ac963b0d091df2c021bcf5b7b28d8e878f0314d
  21. chris-belcher revised this gist Feb 7, 2022. 1 changed file with 35 additions and 0 deletions.
    35 changes: 35 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,41 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week 2022-1-31
    did small code edits:
    https://github.com/bitcoin-teleport/teleport-transactions/commit/5ac963b0d091df2c021bcf5b7b28d8e878f0314d
    https://github.com/bitcoin-teleport/teleport-transactions/commit/a5ec8dedd8f7a75d4db581bd612682470c372e8d
    https://github.com/bitcoin-teleport/teleport-transactions/commit/55dac4a50bc48ca773e1d0feaa0265155a86c7ba

    now adding support for coinswap fees from taker to maker, and parameters like minimum confirmations and minimum locktime

    also reading old mailing list emails to help figure out exactly how to implement coinswap fees

    implementing all the fees and doing the accounting, for makers now i am able to print out a "potentially earned" log message

    done, pushed the commit
    https://github.com/bitcoin-teleport/teleport-transactions/commit/b6a5b225195a3a3ef3da67f1f3a349a76823fbdc

    the next big task will be adding support for connecting to makers at any address not just localhost, and also connecting over tor

    did some small code edit tasks:
    https://github.com/bitcoin-teleport/teleport-transactions/commit/af1af0efb16872e01d8cc63f31d1386c27cbc847
    https://github.com/bitcoin-teleport/teleport-transactions/commit/8a0886797a4a426adcc4c135090dafcbb42c3b4b
    https://github.com/bitcoin-teleport/teleport-transactions/commit/e36e1a38c36adf18d15d15a360874d6af8f1a798
    https://github.com/bitcoin-teleport/teleport-transactions/commit/e1e896e62be8ea52517163f2c9bf86e84b2295cc
    https://github.com/bitcoin-teleport/teleport-transactions/commit/87f6e3faeeca423b9aa98c0f761247748a459406
    https://github.com/bitcoin-teleport/teleport-transactions/commit/1c6542121a45bc58704092f7f8b0a1046515ca51
    https://github.com/bitcoin-teleport/teleport-transactions/commit/956eb81d93c5aa87bf3a9bae1e1c12751ffe0aae
    https://github.com/bitcoin-teleport/teleport-transactions/commit/e033828f422401f16b6eeb951b9bd3b7773bd308
    https://github.com/bitcoin-teleport/teleport-transactions/commit/0f7a7c4e57195fd4f9982ea55dd100f210de0f12

    spent some time making example scripts and asking for advice on the ##rust irc channel, figuring out how exactly ill code this next thing where taker attempts to connect many times before giving up

    partily finished coding the feature for repeatedly attempting to connect to makers, not giving up after the first failure but trying again, though not in every single place in the code yet

    pushed the code i have so far https://github.com/bitcoin-teleport/teleport-transactions/commit/3bcc827f72f38ccba596a2e902bff28662feaa99 still not done yet is the connection which sends the ProofOfFunding message, that part is more complicated and ill do it in another commit


    ## Week 2022-1-24
    after a fair bit of testing and playing around, i got the watchtower code to work i believe

  22. chris-belcher revised this gist Jan 31, 2022. 1 changed file with 21 additions and 1 deletion.
    22 changes: 21 additions & 1 deletion work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,27 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week-2020-1-17
    ## Week 2022-1-24
    after a fair bit of testing and playing around, i got the watchtower code to work i believe

    however i realize for security its necessary for the watchtower to broadcast a spend of the contract which uses the timelock branch as soon as that timeout matures, so im coding that up now

    coded that up and testing it
    also testing in the special case where the contract transactions are all confirmed in different blocks

    found a bug that means i have to slightly recode a significant part of the watchtower code. the bug happens when theres are multiple timelocked transactions watched by the watchtower, and they mature at different times. done that now, it was fiddly but im finished at least for this bug

    that marks the end of my work on watchtower for now, pushed all the code https://github.com/bitcoin-teleport/teleport-transactions/commit/ba2731a76d81583a78ffe6b2487c6a8756edb055

    now moving ahead to the next task before the first release. reorganized my notes slightly to make a brief plan for the next task

    made a few small edits here:
    https://github.com/bitcoin-teleport/teleport-transactions/commit/4275ca3ba1f47f63a8b8289d1a39b3f0be45c749
    https://github.com/bitcoin-teleport/teleport-transactions/commit/42d977ed40211a19b8f11fc1778db4226cbdd189
    https://github.com/bitcoin-teleport/teleport-transactions/commit/281eb2e4f8c02095c78481402b9a3c4605f0e73b


    ## Week-2022-1-17
    continuing to work on implementing the feature in watchtower where it watches for a hash preimage being used to spend a certain coin, and then using the knowledge of that hash preimage to spend its own coins

    for that i need to create a way to spend a coin using a hash preimage, so that i can test the watchtower
  23. chris-belcher revised this gist Jan 24, 2022. 1 changed file with 16 additions and 0 deletions.
    16 changes: 16 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,22 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week-2020-1-17
    continuing to work on implementing the feature in watchtower where it watches for a hash preimage being used to spend a certain coin, and then using the knowledge of that hash preimage to spend its own coins

    for that i need to create a way to spend a coin using a hash preimage, so that i can test the watchtower

    pushed this commit which adds the displaying of hashlocked contract coins https://github.com/bitcoin-teleport/teleport-transactions/commit/d15536b49d71ce327b3ce3efd3763b2d234eb568

    pushed this commit which implements spending of hashlocked contract coins https://github.com/bitcoin-teleport/teleport-transactions/commit/6475b24c87fa4f459a1a72a8f3d4fae173a01944

    now working on adding to watchtower features for detecting when a contract UTXO is spent via the hashlock branch

    ive written code which reads the hash preimage from a transaction

    finished writing more-or-less all code for watchtower that will be needed, testing it now by doing hashlock spends on regtest


    ## Week-2022-1-10
    working on creating more integration tests, specifically one for the wallet display and another
    which does a full coinswap but which fails due to a maker misbehaving, the test will check that
  24. chris-belcher revised this gist Jan 16, 2022. 1 changed file with 41 additions and 0 deletions.
    41 changes: 41 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,47 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week-2022-1-10
    working on creating more integration tests, specifically one for the wallet display and another
    which does a full coinswap but which fails due to a maker misbehaving, the test will check that
    the taker correctly responds

    added two small edits while reading the code figuring out whats the best to do
    https://github.com/bitcoin-teleport/teleport-transactions/commit/5ab083703ef6831410c3ffdc778913c0cac30b63
    https://github.com/bitcoin-teleport/teleport-transactions/commit/70e3d1101a89f011025af2b449227993e08d408f


    actually on second thoughts i can create tests like these later, right now its more important
    to go ahead with new features eventually getting to an alpha release

    working on a new main subroutine called `direct-send` which just sends a normal transaction out
    from the wallet, i described it previously here: https://github.com/bitcoin-teleport/teleport-transactions/issues/42 it is needed right now because it can be used to test a thief attempt where one party spends
    a contract transaction output using a hashvalue, we have to test that the watchtower correctly reads out
    that hashvalue and uses it to spend its own contract transaction outputs

    to do that you need to be able to choose to spend certain coins, hence making this new subroutine

    did that in these commits
    https://github.com/bitcoin-teleport/teleport-transactions/commit/9b256b1d6ca9dac3af3fb68b73c56cd2b2d79f92
    https://github.com/bitcoin-teleport/teleport-transactions/commit/50560943f23374ef173a5d1f9927a08f8df81e96


    ## Week-2022-1-3
    spent a day or two coding some analysis scripts for the fidelity bonds on joinmarket
    i've been trying to calculate the probability of each maker actually being chosen to create a coinjoin with
    its an interesting problem and very relevant to coinswap because the project will use fidelity bonds too
    however the code i wrote runs in O(N!) time and so very quickly becomes impractical to run in any reasonable time, so ill have to think about ways to get that time down

    giving up for now, and going back to coding on teleport/coinswap

    i moved most things in main.rs to lib.rs, as this is the standard way of structuring a project and is required for writing more integration tests

    opened a pull request in the BIP repository to add my BIP standard for using nsequence numbers for anti-fee-sniping to eventually improve the privacy of coinswap, lightning network, DLCs and other off-chain protocols: https://github.com/bitcoin/bips/pull/1269

    modified the standard coinswap integration test to work with the move to lib.rs, this will allow later adding of more integration tests which test various kinds of errors
    https://github.com/bitcoin-teleport/teleport-transactions/commit/f48a2f487bfb5bfd4bc0fd24fae2f8bc1bec0887


    ## Week-2021-12-27
    finished and tested the code for having the taker try again with another maker if it fails to obtain the required signatures

  25. chris-belcher revised this gist Jan 4, 2022. 1 changed file with 29 additions and 0 deletions.
    29 changes: 29 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,35 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week-2021-12-27
    finished and tested the code for having the taker try again with another maker if it fails to obtain the required signatures

    created a new mode for makers where they will abort the connection if the taker asks for senders contract transaction signatures
    this new mode is used for testing the above new feature

    merged the git branch i was working on these past few days and pushed it to github

    there are other commits in that branch but these two are probably the most important
    https://github.com/bitcoin-teleport/teleport-transactions/commit/1f63310eb84b36148b0aae11489d681e9bab19a5
    https://github.com/bitcoin-teleport/teleport-transactions/commit/d5e38f3b4be4c34af0c7d0b4c3c61a0dae74a556


    noticed some odd log::info! messages that could be improved in maker, did that
    https://github.com/bitcoin-teleport/teleport-transactions/commit/dfcdfc901dc3aa0ee24dbd678c4cd0aa1b053aeb
    now when running maker the info messages will be interesting and readable

    made slight edits to the wallet-balance output
    https://github.com/bitcoin-teleport/teleport-transactions/commit/a6300300829ccd1afce9d6c85b23e0e9f58ef032

    fixed a problem where a socket to the maker would remain open and idle for potentially days
    https://github.com/bitcoin-teleport/teleport-transactions/commit/8d93f7ff4d2332acd51bd4819185db36fd3e69fb

    removed some unecessary code i noticed here
    https://github.com/bitcoin-teleport/teleport-transactions/commit/c938596bfa9151631a83452fda4e359909aeb780

    reading and studying how tests work, as i intend to write some more tests, i didnt write the tests we have now so i need to understand them in a lot of detail first


    ## Week-2021-12-13
    worked on connecting up the watchtower code with the maker code
    to have the maker register its coins with watchtowers during a coinswap
  26. chris-belcher revised this gist Dec 30, 2021. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    # Chris Belcher's Work Diary

    I keep a diary of all the work I do on bitcoin privacy.

    It may also be interesting to my collaborators and donors, and anyone who wants to follow
  27. chris-belcher revised this gist Dec 21, 2021. 1 changed file with 11 additions and 0 deletions.
    11 changes: 11 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -8,6 +8,17 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations

    (Note: I use the datetime format YYYY-MM-DD)

    ## Week-2021-12-13
    worked on connecting up the watchtower code with the maker code
    to have the maker register its coins with watchtowers during a coinswap
    the security of coinswap depends on this

    pushed a commit: https://github.com/bitcoin-teleport/teleport-transactions/commit/8c5a4be497e603152f45037e6f42b5fb476a25e7

    now working on adding code to the taker which watches the network
    like a watchtower but in the same application, allowing the taker to know if one of the makers has deviated from the protocol by broadcasting one or more contract transactions
    done, pushed commit https://github.com/bitcoin-teleport/teleport-transactions/commit/7c3fc03f8d53826d9964d339480e105f7f790c24


    ## Week-2021-12-6
    wrote an issue delegating a feature we need
  28. chris-belcher revised this gist Dec 14, 2021. 1 changed file with 10 additions and 0 deletions.
    10 changes: 10 additions & 0 deletions work-diary.md
    Original file line number Diff line number Diff line change
    @@ -9,6 +9,16 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations
    (Note: I use the datetime format YYYY-MM-DD)


    ## Week-2021-12-6
    wrote an issue delegating a feature we need
    https://github.com/bitcoin-teleport/teleport-transactions/issues/42

    finally finished the first version of the watchtower code
    which i pushed here
    https://github.com/bitcoin-teleport/teleport-transactions/commit/2c22fb9d43c2348f715e99e258c18509b53e57ce

    next step is to connect it up to the maker code, and to create tests which run the whole taker-maker-watchtower flow

    ## Week-2021-11-29
    still working a little bit less intensely due to overuse injury/RSI

  29. chris-belcher renamed this gist Dec 8, 2021. 1 changed file with 80 additions and 80 deletions.
    160 changes: 80 additions & 80 deletions work-diary → work-diary.md
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations
    (Note: I use the datetime format YYYY-MM-DD)


    # week-2021-11-29
    ## Week-2021-11-29
    still working a little bit less intensely due to overuse injury/RSI

    continued to work on the watchtower code
    @@ -26,7 +26,7 @@ now working on code for a watchtower client, which makers will use to tell watch
    their coinswaps, and also the code ill use to test the watchtower


    # week-2021-11-22
    ## Week-2021-11-22
    The large gap in my updating of this work diary is because my RSI injury
    got worse and I stopped working.

    @@ -50,25 +50,25 @@ I was able to carry on developing the watchtower code a little.
    pushed this commit:
    https://github.com/bitcoin-teleport/teleport-transactions/commit/cc401f0b9dab3e1eb3f95740ee505bdd2a34d6b3

    # week-2021-11-15
    # week-2021-11-8
    # week-2021-11-1
    # week-2021-10-25
    ## Week-2021-11-15
    ## Week-2021-11-8
    ## Week-2021-11-1
    ## Week-2021-10-25

    # week-2021-10-18
    ## Week-2021-10-18
    reviewed quickly an urgent bugfix for joinmarket

    released here
    https://github.com/JoinMarket-Org/joinmarket-clientserver/releases/tag/v0.9.3


    # week-2021-10-11
    ## Week-2021-10-11
    more discussion here https://github.com/bitcoin-teleport/teleport-transactions/issues/37#issuecomment-942386013

    iv had pretty bad RSI so ive been typing with one hand lately, ive ordered a better keyboard which is on the way


    # week-2021-10-4
    ## Week-2021-10-4
    pushed two commits to github:
    https://github.com/bitcoin-teleport/teleport-transactions/commit/e07b9ce906d1073f18bb0ec460bd79035039b543
    https://github.com/bitcoin-teleport/teleport-transactions/commit/b25f5d332106531cddd349d5c3b57c7b6f332480
    @@ -81,25 +81,25 @@ finished testing it, it seems great so i merged it
    https://github.com/bitcoin-teleport/teleport-transactions/pull/32


    # week-2021-9-27
    ## Week-2021-9-27
    continued coding where i left off
    committed code which broadcasts contract transactions
    now working on code to display live contract transactions to the user

    # week-2021-9-20
    ## Week-2021-9-20
    a sparrow wallet developer implemented my BIP about using relative locktimes for taproot spends
    https://github.com/sparrowwallet/sparrow/issues/161#issuecomment-925003231

    they also suggested an edit to the spec, which i merged


    # week-2021-9-13
    ## Week-2021-9-13
    on vacation

    # week-2021-9-6
    ## Week-2021-9-6
    on vacation

    # week-2021-8-30
    ## Week-2021-8-30
    its one month since fidelity bonds in joinmarket was released
    made a quick summary and explaination on the social medias

    @@ -108,7 +108,7 @@ https://twitter.com/chris_belcher_/status/1432696845017436166
    https://www.reddit.com/r/Bitcoin/comments/pf6kb2/developments_in_joinmarket_and_privacy_one_month/


    # week-2021-8-23
    ## Week-2021-8-23
    reviewed and merged https://github.com/bitcoin-teleport/teleport-transactions/pull/29

    some small cleanup changes and bugfixes
    @@ -124,7 +124,7 @@ it would broadcast the contract transactions and have the teleport wallet handle
    them (for example, by displaying them separately depending on whether the timeout has passed)


    # week-2021-8-16
    ## Week-2021-8-16
    still observing how the joinmarket fidelity bond ecosystem develops

    continued to review some PRs on the teleport github
    @@ -133,15 +133,15 @@ https://github.com/bitcoin-teleport/teleport-transactions/pull/29
    merged https://github.com/bitcoin-teleport/teleport-transactions/pull/33


    # week-2021-8-9
    ## Week-2021-8-9

    more talking to people about joinmarket fidelity bonds

    updated docs
    https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/982


    # week-2021-8-2
    ## Week-2021-8-2
    joinmarket with fidelity bonds is released
    https://github.com/JoinMarket-Org/joinmarket-clientserver/releases/tag/v0.9.0

    @@ -160,7 +160,7 @@ answered more questions about fidelity bonds in joinmarket
    many people had questions now that it is released


    # week-2021-7-26
    ## Week-2021-7-26
    working teleport/coinswap

    tried to figure out the best way to import contract_redeemscript addresses into core's wallet
    @@ -173,7 +173,7 @@ a maker ends up stalling
    tested and merged this pr https://github.com/bitcoin-teleport/teleport-transactions/pull/23


    # week-2021-7-19
    ## Week-2021-7-19
    merged the announce-fidelity-bonds branch into joinmarket(!)

    wrote pseudocode for the bip proposal for nsequence value setting
    @@ -191,7 +191,7 @@ wrote a big comment along with pseoducode
    https://github.com/bitcoin-teleport/teleport-transactions/pull/23#issuecomment-886058400


    # week-2021-7-12
    ## Week-2021-7-12
    pushed three commits to teleport
    https://github.com/bitcoin-teleport/teleport-transactions/commit/ef4565c436f497fa65111a532bc3260a27e0e1b6
    https://github.com/bitcoin-teleport/teleport-transactions/commit/5741b6d2baa51b0d24e71f1361b53bd3c9f9b6de
    @@ -206,7 +206,7 @@ which speeds up the integration tests
    coded an edit to fidelity bond wallets in joinmarket that we decided was needed
    https://github.com/JoinMarket-Org/joinmarket-clientserver/commit/5178d0548182f2d8ef575edd532ae5650140d126

    # week-2021-7-5
    ## Week-2021-7-5
    finishing squish the commits to the joinmarket fidelity bonds PR
    this is the home stretch now
    now just doing some quick tests manually
    @@ -223,7 +223,7 @@ which will be necessary for adding watchtowers and reacting to stalls and misbeh
    from the other side


    # week-2021-6-28
    ## Week-2021-6-28
    discussion about my proposed bip
    https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-June/019147.html

    @@ -238,7 +238,7 @@ and then squishing all the commits ready for the final review

    squishing all the commits and made sure the tests all pass, it took ages

    # week-2021-6-21
    ## Week-2021-6-21
    finished adding error handling to maker_protocol.rs
    https://github.com/bitcoin-teleport/teleport-transactions/commit/c0e374f81f0d432f6acecf0e5e1733d4ada6f7ae

    @@ -250,7 +250,7 @@ https://github.com/bitcoin-teleport/teleport-transactions/issues/21
    read the code, thought a lot, and wrote notes about using the contract txes
    which can be used to recover money after a locktime or with a hash preimage

    # week-2021-6-14
    ## Week-2021-6-14
    working on adding proper error handling to teleport
    right now unwrap() is used everywhere, so if anything unexpected at all happens the app just crashes

    @@ -274,7 +274,7 @@ https://github.com/bitcoin-teleport/teleport-transactions/commit/3eb9ae95b2df5e6
    currently trying to add error handling to maker_protocol.rs but some issues around the tokio concurrency compile errors are causing headaches
    again created a cut-down version of my code to be able to show people in #rust who helped me figure it out

    # week-2021-6-7
    ## Week-2021-6-7
    a few more fixes to the announce fidelity bonds PR on joinmarket

    wrote a BIP proposal which will slightly improve privacy for off-chain protocols like coinswap and lightning
    @@ -288,7 +288,7 @@ https://github.com/spesmilo/electrum/pull/7330#issuecomment-859758732
    in either case, its a success from my point of view


    # week-2021-5-31
    ## Week-2021-5-31
    created this PR on the electrum github to improve privacy in a very
    specific situation: https://github.com/spesmilo/electrum/pull/7330

    @@ -305,7 +305,7 @@ fixed some of waxwing's review comments
    some edits of the docs, and one crash bug in wallet-tool's showutxos method


    # week-2021-5-24
    ## Week-2021-5-24
    fixed all the other review comments and uploaded the commits
    https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/872#issuecomment-849199986

    @@ -321,7 +321,7 @@ this will be needed also to implement the security part of coinswap, for example
    transactions and being ready to react if another party broadcasts them


    # week-2021-5-17
    ## Week-2021-5-17
    made all the edits to fidelity-bonds.md that the reviewers asked for

    reading the code to figure out how to fulfil waxwing's review comments
    @@ -332,7 +332,7 @@ client-daemon protocol used in joinmarket
    (just to clear up possible misunderstanding, the client-daemon protocol
    is different from the taker-maker protocol also used in joinmarket)

    # week-2021-5-10
    ## Week-2021-5-10
    discussed with waxwing and undeath about the fidelity bonds code, they had many questions

    wrote docs on the fidelity bond proof protocol https://github.com/JoinMarket-Org/JoinMarket-Docs/pull/4
    @@ -343,7 +343,7 @@ some more back and forth on the announce fidelity bonds PR and docs PR

    merged the docs PR

    # week-2021-5-3
    ## Week-2021-5-3
    finished one test which tests the de/serialization of the fidelity bond message
    sent from maker to taker
    added test which checks for duplicates
    @@ -367,7 +367,7 @@ opened the fidelity bonds PR, finally
    https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/872


    # week-2021-4-27
    ## Week-2021-4-27
    coded up a c++ version of the python script which calculates how much
    a sybil attacker would have to spend to attack a joinmarket which has
    fidelity bonds
    @@ -385,7 +385,7 @@ and its coming together nicely
    i think all the code i wanted for using fidelity bonds is now done
    i just need to come up with some tests and write those, then ill open a PR

    # week-2021-4-19
    ## Week-2021-4-19
    coded the fix to the year 2038 problem with fidelity bonds and merged it
    https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/857

    @@ -414,7 +414,7 @@ so would be nice to calculate up to N=24 while right now i have only up to N=12
    will need to quickly rewrite the sybil attack calculations code in c++ instead of python


    # week-2021-4-12
    ## Week-2021-4-12
    adding parsing of fidelity bonds to taker and orderbook watch
    stuck on some weird parts of the codebase

    @@ -431,15 +431,15 @@ see https://github.com/JoinMarket-Org/joinmarket-clientserver/issues/798
    i figured out a solution


    # week-2021-4-5
    ## Week-2021-4-5
    currently coding the wallet to choose the most-valuable fidelity bond and announcing it
    requires adding new RPC functions

    appeared on matt odell's Citadel Dispatch podcast/show with waxwing talking about bitcoin privacy
    https://podcasts.apple.com/us/podcast/tales-from-the-crypt-a-bitcoin-podcast/id1292381204?i=1000516047636


    # week-2021-3-29
    ## Week-2021-3-29
    testing fidelity bond announcing on regtest on my own irc server running locally
    there are weird wallet sync issues

    @@ -464,7 +464,7 @@ found some subtle mistakes in my document about the maths of fidelity bonds
    https://gist.github.com/chris-belcher/87ebbcbb639686057a389acb9ab3e25b
    corrected them

    # week-2021-3-22
    ## Week-2021-3-22
    reviewed this PR https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/837
    opened this one https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/838
    they are part of the process of finishing adding fidelity bonds to joinmarket
    @@ -476,7 +476,7 @@ figured out parts of the message passing between maker and taker
    figured out the signing and verifying parts mostly


    # week-2021-3-15
    ## Week-2021-3-15
    figuring out how to do the rest of the adding fidelity bonds to joinmarket
    i was working on this back in may 2020 and still have some code and
    notes, reading that and rebasing the code onto the current joinmarket
    @@ -487,7 +487,7 @@ spent time upgrade my xubuntu as it was reaching the end of life
    took a while but upgrade seemed to work fine


    # week-2021-3-8
    ## Week-2021-3-8
    worked on the web api rescan feature for EPS
    should be quick to code and useful to certain people

    @@ -506,7 +506,7 @@ still need to release a new version of electrum personal server to include
    the bugfixes and mempool feature i made


    # week-2021-3-1
    ## Week-2021-3-1
    while talking to an EPS user in the wild i came up with another possible solution to
    rescanning while in pruned mode:
    https://github.com/chris-belcher/electrum-personal-server/issues/85#issuecomment-788353541
    @@ -524,7 +524,7 @@ continued to take part in ##taproot-activation
    looks like this "speedy trial" idea could be the thing that brings everyone together


    # week-2021-2-22
    ## Week-2021-2-22
    merged a couple of open PRs for electrum personal server
    edited the README to deal with an issue someone opened
    some other fixes
    @@ -540,7 +540,7 @@ my earlier reddit thread was sticked so spent some time replying to people there
    https://www.reddit.com/r/Bitcoin/comments/lm6nmk/another_coinswap_milestone_multihop_coinswaps/


    # week-2021-2-15
    ## Week-2021-2-15
    participated in the taproot activation meeting on IRC

    created a mailing list post and reddit thread showing the multi-hop coinswap on testnet and
    @@ -550,11 +550,11 @@ https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-February/018426.htm
    doing some work on electrum personal server, there have been many bug reports built up over the last
    few months which would be nice to fix before going onto other stuff

    # week-2021-2-8
    ## Week-2021-2-8
    wrote the text for the mailing list and reddit threads, had writers block for a long time
    didnt do much else, felt a bit low energy

    # week-2021-2-1
    ## Week-2021-2-1
    now that multihop coinswap is done, im working on refactoring the code to make it readable
    because until now it was an unreadable mess

    @@ -583,7 +583,7 @@ how i look at coinswaps and how they work, the aim is to make it as easy as poss
    someone to understand the project


    # week-2021-1-25
    ## Week-2021-1-25
    changed `N = 2` to `N = 1` in my code without changing anything else and did a single-hop coinswap
    the coinswap seemed to work perfectly, i looked at the wallet-balance to make sure

    @@ -615,7 +615,7 @@ fixed by simply reversing the order of the two if-statements
    created a multi-hop coinswap with 4 makers, it was done easily by changing a variable from 3 to 4


    # week-2021-1-18
    ## Week-2021-1-18
    currently working on fixing a bug where the second maker complains that the
    given contract scriptpubkey doesnt match the given contract transaction
    after two days of wading through hex strings i finally found the cause of the above crash bug
    @@ -657,7 +657,7 @@ did another 2-hop coinswap and carefully checked with wallet-balance that the ch
    as i expected


    # week-2021-1-11
    ## Week-2021-1-11
    finished writing the code for arbitrary multi-hop coinswaps, now have to iron out all the bugs and crashes

    trying to do a multi-hop coinswap on regtest, steadily working my way through crash after crash, bug after bug
    @@ -683,7 +683,7 @@ wrote a mailing list email to explain why its important:
    https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-January/018356.html


    # week-2021-1-4
    ## Week-2021-1-4
    still implementing multihop coinswaps with an arbitrary number of hops
    using rust's trait feature which i havent used before, so having some trouble
    figure it out, thanks again to ##rust on freenode
    @@ -702,7 +702,7 @@ this is hopefully the hardest part over, now just to give the hash preimage to e
    came up with a slightly better sequence for sending the hash preimage message to makers


    # week-2020-12-28
    ## Week-2020-12-28
    writing a bit of pseduocode to figure out the best way to recode multi-hop taker

    couldnt figure it out, i will try modifying the taker protocol to do a routed coinswap with 3 makers
    @@ -734,7 +734,7 @@ read the relevant section and found that the wormhole attack cant be used, for a
    3) the taker releases the hash preimage to every maker directly and simultaneously


    # week-2020-12-21
    ## Week-2020-12-21
    writing the sending and receiving of steps C and D in the protocol, which is very fiddly
    finished that, writing code to wait for maker2's funding transactions to be confirmed

    @@ -760,7 +760,7 @@ one thing missing from my code is the taker handling a coinswap between three ma
    taker's pubkeys are not involved at all, this only happens with a three-maker coinswap or above


    # week-2020-12-14
    ## Week-2020-12-14
    finished writing a readme for this early stage of the project
    currently using rustfmt on my code for the first time

    @@ -789,7 +789,7 @@ and then waits for confirmation of maker1's funding txes
    wrote the sending of the ProofOfFunding message to maker2


    # week-2020-12-7
    ## Week-2020-12-7
    the bug i stopped at last week was due to the wallet attempting to spend a coin on a 2of2 multisig
    i hadnt implemented that yet, now is a good time so since theres many 2of2 multisig coins building
    up in the regtest wallet
    @@ -822,7 +822,7 @@ quite a few people contacted me about working on coinswap so i think its time to
    even if its nowhere near finished
    currently writing the README and setting up an IRC channel

    # week-2020-11-30
    ## Week-2020-11-30
    continuing to code multi-tx coinswap

    after a couple of days, the code for multi-tx is done, and it compiles
    @@ -850,7 +850,7 @@ its a simple algorithm and theres a lot of scope for improving the building of t
    run into a bug, something in the wallet about obtaining UTXOs to spend


    # week-2020-11-23
    ## Week-2020-11-23
    working on initial sync of core wallet including coinswap addresses, not just the xpubs
    taking me longer than i thought, rust's borrow checker is slowing me down
    figured out the borrow checker thing
    @@ -878,7 +878,7 @@ this is not a big first, because waxwing's coinswap experiment from 2017 also cr
    now to code multi-tx coinswaps
    essentially involves replacing a lot of items with vectors of those items

    # week-2020-11-16
    ## Week-2020-11-16
    now the basic coinswap code is written im actually trying it out on regtest to get it to actually produce coinswaps
    fixed a couple of simple bugs as i go through the coinswap protocol

    @@ -898,7 +898,7 @@ i.e. created a coinswap on regtest(!)

    edited wallet code to sync and display UTXOs which came from a coinswap for which we have both privkeys

    # week-2020-11-9
    ## Week-2020-11-9
    working on handling the signatures which the maker receives from the taker
    that requires moving around a bunch of code so that the signatures can be correctly stored in the wallet
    fundamentally this is happening because the maker code needs to store information about
    @@ -914,7 +914,7 @@ finished handover over preimages and privkeys
    now to actually try out all this, up til now ive only been checking it with the rust compiler
    also need to add loads of println!() to track whats going on

    # week-2020-11-2
    ## Week-2020-11-2
    added the `1 OP_CSV OP_DROP` condition to the contract script to avoid transaction pinning

    finished the proof-of-funding message verification, now coding the messages where the maker
    @@ -932,7 +932,7 @@ did that
    finished coding the reply to the proof-of-funding message, which is called send-sender-and-receiver-contract-txes


    # week-2020-10-26
    ## Week-2020-10-26
    modifying the contract redeemscript i was planning to use, to fix the oversized preimage attack
    https://lists.linuxfoundation.org/pipermail/lightning-dev/2016-May/000529
    and testing the solution a little bit
    @@ -945,7 +945,7 @@ this bug in rust-bitcoin https://github.com/rust-bitcoin/rust-bitcoincore-rpc/is
    working on the proof-of-funding message, which is a message sent when a funding transaction has confirmed
    and therefore proves to the other party that the whole exchange of messages isnt a DOS

    # week-2020-10-19
    ## Week-2020-10-19
    added print statements to bitcoin core, and used them to confirm that the sighashes of
    the two transactions (one which works, one which doesnt work) are the same
    i fed the sighash printed by bitcoincore into my rust code, then the resulting signature
    @@ -965,7 +965,7 @@ started modifying wallet code so that the same full node can handle multiple ins
    for example multiple makers and one taker, which is needed for testing


    # week-2020-10-12
    ## Week-2020-10-12
    continuing to write the networking and protocol code
    fighting with rust's borrow checker a little bit, i slightly rewrote parts of
    the earlier wallet code in order to remove some lifetime compile errors
    @@ -1000,7 +1000,7 @@ having some trouble with it, managed to successfully sign exactly the same trans
    so now im just carefully printing going through the tx byte-by-byte figuring out why the other code fails
    tried to use a debugger to step into the library and figure how whats different, but couldnt get it to work

    # week-2020-10-5
    ## Week-2020-10-5
    created the boilerplate code for maker and taker networking with tokio
    am able to add new network messages now fairly easily
    the code requests and serves up coinswap offers
    @@ -1009,7 +1009,7 @@ created the boilerplate code for maker and taker networking with tokio
    using serde enum representations for the messages: https://serde.rs/enum-representations.html
    this really helps because we can use the compiler for extra type checking and readability

    # week-2020-9-28
    ## Week-2020-9-28
    spent most of the time recovering from my operation, but still did some work when i was able to

    finished first draft of fixes to protocol design
    @@ -1021,14 +1021,14 @@ then edge-cases and attacks can be more easily found

    now coding the networking code for the final coinswap app

    # week-2020-9-21
    ## Week-2020-9-21
    helped someone who messaged me twitter debug their electrum personal server installation

    wrote a full design for a two-party coinswap which contains all those fixes, most notably collateral payments

    going to the hospital for an operation, so most likely wont work for the rest of the week

    # week-2020-9-14
    ## Week-2020-9-14
    still coding what will eventually be the internal wallet
    ran into this issue https://github.com/rust-bitcoin/rust-bitcoincore-rpc/issues/136
    thankfully @shesek also wrote a workaround
    @@ -1042,12 +1042,12 @@ now have code which imports addresses and sync's a wallet, and supports seed phr
    now ill write a second version of the protocol design which fixes the issues found in review
    of the first one

    # week-2020-9-7
    ## Week-2020-9-7
    finished coding wallet generation and recovery, now coding wallet sync

    had medical issues and hospital visits this week so did a bit less work

    # week-2020-8-31
    ## Week-2020-8-31
    possibly made another breakthrough with fixing the vulnerability found by
    ZmnSCPxj, about riskless theft attempts, it involve having the outgoing side
    (e.g. alice in a simple alice-bob coinswap) be required to include her own
    @@ -1061,7 +1061,7 @@ read https://doc.rust-lang.org/cargo/index.html
    made a start on coding the actual coinswap application (finally)
    started coding the part which generates and recovers a new single-sig wallet

    # week 2020-8-24
    ## Week 2020-8-24
    made a short script which does the EC key tweaking from my detailed protocol design email
    so that peers can agree on public keys with one fewer round trip

    @@ -1091,7 +1091,7 @@ possibly made a breakthrough with fixing these vulnerabilities
    im considering having the two peers (alice and bob, say) know slightly different
    versions of the contract transactions

    # week 2020-8-17
    ## Week 2020-8-17
    still working on figuring out how to use rust-bitcoin to create and spend from 2of2 multisigs
    stuck a bit, might have to go through the transaction byte-by-byte

    @@ -1108,7 +1108,7 @@ and hashlock contract is known to both sides together
    successfully made a short script which creates and spends from a htlc contract with rust-bitcoin
    it is able to spend both by providing the hash preimage and by waiting for the timeout

    # week 2020-8-10
    ## Week 2020-8-10
    fixed up "protocol-design-final" and sent to the mailing list
    https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-August/018080.html

    @@ -1117,7 +1117,7 @@ https://twitter.com/blockdigest/status/1293275473938710535

    reading code and figuring out exactly how to create and spend from a 2of2 multisig address using rust-bitcoin

    # week 2020-8-3
    ## Week 2020-8-3
    continuing to work on the detailed design of the protocol

    came up with an attack on my earlier design which included miner fees
    @@ -1135,7 +1135,7 @@ now ill work on the final protocol design which includes every feature, and then
    finished first draft of document "protocol-design-final", so now need to read it closely again and
    eventually send it to the dev mailing list for review

    # week 2020-7-27
    ## Week 2020-7-27
    posted my review in the taproot PR in secp256k1
    https://github.com/bitcoin-core/secp256k1/pull/558

    @@ -1151,7 +1151,7 @@ while designing this i came across a possible problem i hadnt forseen
    after a lot of thinking and writing, i came up with a solution to it which should work
    the solution is based on using retaliation to make it not possible to DOS for free

    # week 2020-7-20
    ## Week 2020-7-20
    used rust-bitcoin and rust-wallet to sign a transaction

    worked much less this week due to medical issues
    @@ -1164,7 +1164,7 @@ squashed after lots of revisions from review.
    edit: 2020/9/11 merged finally! https://twitter.com/pwuille/status/1304504395384512512


    # week 2020-7-13
    ## Week 2020-7-13
    reading
    https://rust-lang.github.io/async-book

    @@ -1206,7 +1206,7 @@ managed to use the RPC library to obtain the best block hash from bitcoind
    the error message was not descriptive enough
    i decided to open an issue about it https://github.com/rust-bitcoin/rust-bitcoincore-rpc/issues/117

    # week 2020-7-6
    ## Week 2020-7-6
    continuing work on rust http server
    learning about tests, seperate modules, using cargo to run tests
    file and path handling in rust
    @@ -1221,7 +1221,7 @@ have the server creates an index page if a directory is GET requested, that page
    then will move onto implementing an async version of the server
    start with having two applications in the project, the second one for async

    # week 2020-6-29
    ## Week 2020-6-29
    finished the rust irc bot
    it features:
    * connects to a network and irc channel
    @@ -1252,7 +1252,7 @@ starting to code a http server
    seperate files and modules, one mod controlling the protocol parsing, so later it can be dropped into the async version
    two binary files, one for single-client other for async, might work

    # week 2020-6-22
    ## Week 2020-6-22
    still writing an irc bot in rust, learning a lot about string manipulation, and with rust's borrowing feature

    answered some issues on the EPS github
    @@ -1268,7 +1268,7 @@ still coding rust, learned a couple of things about ownership and lifetimes

    fixed joinmarket issue #610 and tested waxwing's PR #611 finding a bug

    # week 2020-6-15
    ## Week 2020-6-15
    still reading the rust book

    finished the rust book except the cargo chapter
    @@ -1285,7 +1285,7 @@ finished the skim reading

    started writing an irc bot in rust

    # week 2020-6-8
    ## Week 2020-6-8
    got a grant from the Human Rights Foundation

    gave interview with Alyssa Hertig who will write an article about CoinSwap on coindesk
    @@ -1302,7 +1302,7 @@ reviewed the python-bitcointx pull request on joinmarket

    set up a date for a podcast recording on the whatbitcoindid podcast

    # week 2020-6-1
    ## Week 2020-6-1
    still learning rust

    did the exercises in the rust book about collections (calculating averages)
    @@ -1317,7 +1317,7 @@ https://anchor.fm/tales-from-the-crypt/episodes/170-Chris-Belcher-ef8blj
    released electrum personal server 0.2.1


    # week 2020-5 25
    ## Week 2020-5-25
    published coinswap design document to the mailing list, and github gist

    started working on `announce-fidelity-bonds` branch which edits the joinmarket makers and takers to create and parse fidelity bonds announcements
  30. chris-belcher revised this gist Dec 8, 2021. 1 changed file with 80 additions and 80 deletions.
    160 changes: 80 additions & 80 deletions work-diary
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ Support this work with a donation: https://bitcoinprivacy.me/coinswap-donations
    (Note: I use the datetime format YYYY-MM-DD)


    = week-2021-11-29 =
    # week-2021-11-29
    still working a little bit less intensely due to overuse injury/RSI

    continued to work on the watchtower code
    @@ -26,7 +26,7 @@ now working on code for a watchtower client, which makers will use to tell watch
    their coinswaps, and also the code ill use to test the watchtower


    = week-2021-11-22 =
    # week-2021-11-22
    The large gap in my updating of this work diary is because my RSI injury
    got worse and I stopped working.

    @@ -50,25 +50,25 @@ I was able to carry on developing the watchtower code a little.
    pushed this commit:
    https://github.com/bitcoin-teleport/teleport-transactions/commit/cc401f0b9dab3e1eb3f95740ee505bdd2a34d6b3

    = week-2021-11-15 =
    = week-2021-11-8 =
    = week-2021-11-1 =
    = week-2021-10-25 =
    # week-2021-11-15
    # week-2021-11-8
    # week-2021-11-1
    # week-2021-10-25

    = week-2021-10-18 =
    # week-2021-10-18
    reviewed quickly an urgent bugfix for joinmarket

    released here
    https://github.com/JoinMarket-Org/joinmarket-clientserver/releases/tag/v0.9.3


    = week-2021-10-11 =
    # week-2021-10-11
    more discussion here https://github.com/bitcoin-teleport/teleport-transactions/issues/37#issuecomment-942386013

    iv had pretty bad RSI so ive been typing with one hand lately, ive ordered a better keyboard which is on the way


    = week-2021-10-4 =
    # week-2021-10-4
    pushed two commits to github:
    https://github.com/bitcoin-teleport/teleport-transactions/commit/e07b9ce906d1073f18bb0ec460bd79035039b543
    https://github.com/bitcoin-teleport/teleport-transactions/commit/b25f5d332106531cddd349d5c3b57c7b6f332480
    @@ -81,25 +81,25 @@ finished testing it, it seems great so i merged it
    https://github.com/bitcoin-teleport/teleport-transactions/pull/32


    = week-2021-9-27 =
    # week-2021-9-27
    continued coding where i left off
    committed code which broadcasts contract transactions
    now working on code to display live contract transactions to the user

    = week-2021-9-20 =
    # week-2021-9-20
    a sparrow wallet developer implemented my BIP about using relative locktimes for taproot spends
    https://github.com/sparrowwallet/sparrow/issues/161#issuecomment-925003231

    they also suggested an edit to the spec, which i merged


    = week-2021-9-13 =
    # week-2021-9-13
    on vacation

    = week-2021-9-6 =
    # week-2021-9-6
    on vacation

    = week-2021-8-30 =
    # week-2021-8-30
    its one month since fidelity bonds in joinmarket was released
    made a quick summary and explaination on the social medias

    @@ -108,7 +108,7 @@ https://twitter.com/chris_belcher_/status/1432696845017436166
    https://www.reddit.com/r/Bitcoin/comments/pf6kb2/developments_in_joinmarket_and_privacy_one_month/


    = week-2021-8-23 =
    # week-2021-8-23
    reviewed and merged https://github.com/bitcoin-teleport/teleport-transactions/pull/29

    some small cleanup changes and bugfixes
    @@ -124,7 +124,7 @@ it would broadcast the contract transactions and have the teleport wallet handle
    them (for example, by displaying them separately depending on whether the timeout has passed)


    = week-2021-8-16 =
    # week-2021-8-16
    still observing how the joinmarket fidelity bond ecosystem develops

    continued to review some PRs on the teleport github
    @@ -133,15 +133,15 @@ https://github.com/bitcoin-teleport/teleport-transactions/pull/29
    merged https://github.com/bitcoin-teleport/teleport-transactions/pull/33


    = week-2021-8-9 =
    # week-2021-8-9

    more talking to people about joinmarket fidelity bonds

    updated docs
    https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/982


    = week-2021-8-2 =
    # week-2021-8-2
    joinmarket with fidelity bonds is released
    https://github.com/JoinMarket-Org/joinmarket-clientserver/releases/tag/v0.9.0

    @@ -160,7 +160,7 @@ answered more questions about fidelity bonds in joinmarket
    many people had questions now that it is released


    = week-2021-7-26 =
    # week-2021-7-26
    working teleport/coinswap

    tried to figure out the best way to import contract_redeemscript addresses into core's wallet
    @@ -173,7 +173,7 @@ a maker ends up stalling
    tested and merged this pr https://github.com/bitcoin-teleport/teleport-transactions/pull/23


    = week-2021-7-19 =
    # week-2021-7-19
    merged the announce-fidelity-bonds branch into joinmarket(!)

    wrote pseudocode for the bip proposal for nsequence value setting
    @@ -191,7 +191,7 @@ wrote a big comment along with pseoducode
    https://github.com/bitcoin-teleport/teleport-transactions/pull/23#issuecomment-886058400


    = week-2021-7-12=
    # week-2021-7-12
    pushed three commits to teleport
    https://github.com/bitcoin-teleport/teleport-transactions/commit/ef4565c436f497fa65111a532bc3260a27e0e1b6
    https://github.com/bitcoin-teleport/teleport-transactions/commit/5741b6d2baa51b0d24e71f1361b53bd3c9f9b6de
    @@ -206,7 +206,7 @@ which speeds up the integration tests
    coded an edit to fidelity bond wallets in joinmarket that we decided was needed
    https://github.com/JoinMarket-Org/joinmarket-clientserver/commit/5178d0548182f2d8ef575edd532ae5650140d126

    = week-2021-7-5 =
    # week-2021-7-5
    finishing squish the commits to the joinmarket fidelity bonds PR
    this is the home stretch now
    now just doing some quick tests manually
    @@ -223,7 +223,7 @@ which will be necessary for adding watchtowers and reacting to stalls and misbeh
    from the other side


    = week-2021-6-28 =
    # week-2021-6-28
    discussion about my proposed bip
    https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-June/019147.html

    @@ -238,7 +238,7 @@ and then squishing all the commits ready for the final review

    squishing all the commits and made sure the tests all pass, it took ages

    = week-2021-6-21 =
    # week-2021-6-21
    finished adding error handling to maker_protocol.rs
    https://github.com/bitcoin-teleport/teleport-transactions/commit/c0e374f81f0d432f6acecf0e5e1733d4ada6f7ae

    @@ -250,7 +250,7 @@ https://github.com/bitcoin-teleport/teleport-transactions/issues/21
    read the code, thought a lot, and wrote notes about using the contract txes
    which can be used to recover money after a locktime or with a hash preimage

    = week-2021-6-14 =
    # week-2021-6-14
    working on adding proper error handling to teleport
    right now unwrap() is used everywhere, so if anything unexpected at all happens the app just crashes

    @@ -274,7 +274,7 @@ https://github.com/bitcoin-teleport/teleport-transactions/commit/3eb9ae95b2df5e6
    currently trying to add error handling to maker_protocol.rs but some issues around the tokio concurrency compile errors are causing headaches
    again created a cut-down version of my code to be able to show people in #rust who helped me figure it out

    = week-2021-6-7 =
    # week-2021-6-7
    a few more fixes to the announce fidelity bonds PR on joinmarket

    wrote a BIP proposal which will slightly improve privacy for off-chain protocols like coinswap and lightning
    @@ -288,7 +288,7 @@ https://github.com/spesmilo/electrum/pull/7330#issuecomment-859758732
    in either case, its a success from my point of view


    = week-2021-5-31 =
    # week-2021-5-31
    created this PR on the electrum github to improve privacy in a very
    specific situation: https://github.com/spesmilo/electrum/pull/7330

    @@ -305,7 +305,7 @@ fixed some of waxwing's review comments
    some edits of the docs, and one crash bug in wallet-tool's showutxos method


    = week-2021-5-24 =
    # week-2021-5-24
    fixed all the other review comments and uploaded the commits
    https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/872#issuecomment-849199986

    @@ -321,7 +321,7 @@ this will be needed also to implement the security part of coinswap, for example
    transactions and being ready to react if another party broadcasts them


    = week-2021-5-17 =
    # week-2021-5-17
    made all the edits to fidelity-bonds.md that the reviewers asked for

    reading the code to figure out how to fulfil waxwing's review comments
    @@ -332,7 +332,7 @@ client-daemon protocol used in joinmarket
    (just to clear up possible misunderstanding, the client-daemon protocol
    is different from the taker-maker protocol also used in joinmarket)

    = week-2021-5-10 =
    # week-2021-5-10
    discussed with waxwing and undeath about the fidelity bonds code, they had many questions

    wrote docs on the fidelity bond proof protocol https://github.com/JoinMarket-Org/JoinMarket-Docs/pull/4
    @@ -343,7 +343,7 @@ some more back and forth on the announce fidelity bonds PR and docs PR

    merged the docs PR

    = week-2021-5-3 =
    # week-2021-5-3
    finished one test which tests the de/serialization of the fidelity bond message
    sent from maker to taker
    added test which checks for duplicates
    @@ -367,7 +367,7 @@ opened the fidelity bonds PR, finally
    https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/872


    = week-2021-4-27 =
    # week-2021-4-27
    coded up a c++ version of the python script which calculates how much
    a sybil attacker would have to spend to attack a joinmarket which has
    fidelity bonds
    @@ -385,7 +385,7 @@ and its coming together nicely
    i think all the code i wanted for using fidelity bonds is now done
    i just need to come up with some tests and write those, then ill open a PR

    = week-2021-4-19 =
    # week-2021-4-19
    coded the fix to the year 2038 problem with fidelity bonds and merged it
    https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/857

    @@ -414,7 +414,7 @@ so would be nice to calculate up to N=24 while right now i have only up to N=12
    will need to quickly rewrite the sybil attack calculations code in c++ instead of python


    = week-2021-4-12 =
    # week-2021-4-12
    adding parsing of fidelity bonds to taker and orderbook watch
    stuck on some weird parts of the codebase

    @@ -431,15 +431,15 @@ see https://github.com/JoinMarket-Org/joinmarket-clientserver/issues/798
    i figured out a solution


    = week-2021-4-5 =
    # week-2021-4-5
    currently coding the wallet to choose the most-valuable fidelity bond and announcing it
    requires adding new RPC functions

    appeared on matt odell's Citadel Dispatch podcast/show with waxwing talking about bitcoin privacy
    https://podcasts.apple.com/us/podcast/tales-from-the-crypt-a-bitcoin-podcast/id1292381204?i=1000516047636


    = week-2021-3-29 =
    # week-2021-3-29
    testing fidelity bond announcing on regtest on my own irc server running locally
    there are weird wallet sync issues

    @@ -464,7 +464,7 @@ found some subtle mistakes in my document about the maths of fidelity bonds
    https://gist.github.com/chris-belcher/87ebbcbb639686057a389acb9ab3e25b
    corrected them

    = week-2021-3-22 =
    # week-2021-3-22
    reviewed this PR https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/837
    opened this one https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/838
    they are part of the process of finishing adding fidelity bonds to joinmarket
    @@ -476,7 +476,7 @@ figured out parts of the message passing between maker and taker
    figured out the signing and verifying parts mostly


    = week-2021-3-15 =
    # week-2021-3-15
    figuring out how to do the rest of the adding fidelity bonds to joinmarket
    i was working on this back in may 2020 and still have some code and
    notes, reading that and rebasing the code onto the current joinmarket
    @@ -487,7 +487,7 @@ spent time upgrade my xubuntu as it was reaching the end of life
    took a while but upgrade seemed to work fine


    = week-2021-3-8 =
    # week-2021-3-8
    worked on the web api rescan feature for EPS
    should be quick to code and useful to certain people

    @@ -506,7 +506,7 @@ still need to release a new version of electrum personal server to include
    the bugfixes and mempool feature i made


    = week-2021-3-1 =
    # week-2021-3-1
    while talking to an EPS user in the wild i came up with another possible solution to
    rescanning while in pruned mode:
    https://github.com/chris-belcher/electrum-personal-server/issues/85#issuecomment-788353541
    @@ -524,7 +524,7 @@ continued to take part in ##taproot-activation
    looks like this "speedy trial" idea could be the thing that brings everyone together


    = week-2021-2-22 =
    # week-2021-2-22
    merged a couple of open PRs for electrum personal server
    edited the README to deal with an issue someone opened
    some other fixes
    @@ -540,7 +540,7 @@ my earlier reddit thread was sticked so spent some time replying to people there
    https://www.reddit.com/r/Bitcoin/comments/lm6nmk/another_coinswap_milestone_multihop_coinswaps/


    = week-2021-2-15 =
    # week-2021-2-15
    participated in the taproot activation meeting on IRC

    created a mailing list post and reddit thread showing the multi-hop coinswap on testnet and
    @@ -550,11 +550,11 @@ https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-February/018426.htm
    doing some work on electrum personal server, there have been many bug reports built up over the last
    few months which would be nice to fix before going onto other stuff

    = week-2021-2-8 =
    # week-2021-2-8
    wrote the text for the mailing list and reddit threads, had writers block for a long time
    didnt do much else, felt a bit low energy

    = week-2021-2-1 =
    # week-2021-2-1
    now that multihop coinswap is done, im working on refactoring the code to make it readable
    because until now it was an unreadable mess

    @@ -583,7 +583,7 @@ how i look at coinswaps and how they work, the aim is to make it as easy as poss
    someone to understand the project


    = week-2021-1-25 =
    # week-2021-1-25
    changed `N = 2` to `N = 1` in my code without changing anything else and did a single-hop coinswap
    the coinswap seemed to work perfectly, i looked at the wallet-balance to make sure

    @@ -615,7 +615,7 @@ fixed by simply reversing the order of the two if-statements
    created a multi-hop coinswap with 4 makers, it was done easily by changing a variable from 3 to 4


    = week-2021-1-18 =
    # week-2021-1-18
    currently working on fixing a bug where the second maker complains that the
    given contract scriptpubkey doesnt match the given contract transaction
    after two days of wading through hex strings i finally found the cause of the above crash bug
    @@ -657,7 +657,7 @@ did another 2-hop coinswap and carefully checked with wallet-balance that the ch
    as i expected


    = week-2021-1-11 =
    # week-2021-1-11
    finished writing the code for arbitrary multi-hop coinswaps, now have to iron out all the bugs and crashes

    trying to do a multi-hop coinswap on regtest, steadily working my way through crash after crash, bug after bug
    @@ -683,7 +683,7 @@ wrote a mailing list email to explain why its important:
    https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-January/018356.html


    = week-2021-1-4 =
    # week-2021-1-4
    still implementing multihop coinswaps with an arbitrary number of hops
    using rust's trait feature which i havent used before, so having some trouble
    figure it out, thanks again to ##rust on freenode
    @@ -702,7 +702,7 @@ this is hopefully the hardest part over, now just to give the hash preimage to e
    came up with a slightly better sequence for sending the hash preimage message to makers


    = week-2020-12-28 =
    # week-2020-12-28
    writing a bit of pseduocode to figure out the best way to recode multi-hop taker

    couldnt figure it out, i will try modifying the taker protocol to do a routed coinswap with 3 makers
    @@ -734,7 +734,7 @@ read the relevant section and found that the wormhole attack cant be used, for a
    3) the taker releases the hash preimage to every maker directly and simultaneously


    = week-2020-12-21 =
    # week-2020-12-21
    writing the sending and receiving of steps C and D in the protocol, which is very fiddly
    finished that, writing code to wait for maker2's funding transactions to be confirmed

    @@ -760,7 +760,7 @@ one thing missing from my code is the taker handling a coinswap between three ma
    taker's pubkeys are not involved at all, this only happens with a three-maker coinswap or above


    = week-2020-12-14 =
    # week-2020-12-14
    finished writing a readme for this early stage of the project
    currently using rustfmt on my code for the first time

    @@ -789,7 +789,7 @@ and then waits for confirmation of maker1's funding txes
    wrote the sending of the ProofOfFunding message to maker2


    = week-2020-12-7 =
    # week-2020-12-7
    the bug i stopped at last week was due to the wallet attempting to spend a coin on a 2of2 multisig
    i hadnt implemented that yet, now is a good time so since theres many 2of2 multisig coins building
    up in the regtest wallet
    @@ -822,7 +822,7 @@ quite a few people contacted me about working on coinswap so i think its time to
    even if its nowhere near finished
    currently writing the README and setting up an IRC channel

    = week-2020-11-30 =
    # week-2020-11-30
    continuing to code multi-tx coinswap

    after a couple of days, the code for multi-tx is done, and it compiles
    @@ -850,7 +850,7 @@ its a simple algorithm and theres a lot of scope for improving the building of t
    run into a bug, something in the wallet about obtaining UTXOs to spend


    = week-2020-11-23 =
    # week-2020-11-23
    working on initial sync of core wallet including coinswap addresses, not just the xpubs
    taking me longer than i thought, rust's borrow checker is slowing me down
    figured out the borrow checker thing
    @@ -878,7 +878,7 @@ this is not a big first, because waxwing's coinswap experiment from 2017 also cr
    now to code multi-tx coinswaps
    essentially involves replacing a lot of items with vectors of those items

    = week-2020-11-16 =
    # week-2020-11-16
    now the basic coinswap code is written im actually trying it out on regtest to get it to actually produce coinswaps
    fixed a couple of simple bugs as i go through the coinswap protocol

    @@ -898,7 +898,7 @@ i.e. created a coinswap on regtest(!)

    edited wallet code to sync and display UTXOs which came from a coinswap for which we have both privkeys

    = week-2020-11-9 =
    # week-2020-11-9
    working on handling the signatures which the maker receives from the taker
    that requires moving around a bunch of code so that the signatures can be correctly stored in the wallet
    fundamentally this is happening because the maker code needs to store information about
    @@ -914,7 +914,7 @@ finished handover over preimages and privkeys
    now to actually try out all this, up til now ive only been checking it with the rust compiler
    also need to add loads of println!() to track whats going on

    = week-2020-11-2 =
    # week-2020-11-2
    added the `1 OP_CSV OP_DROP` condition to the contract script to avoid transaction pinning

    finished the proof-of-funding message verification, now coding the messages where the maker
    @@ -932,7 +932,7 @@ did that
    finished coding the reply to the proof-of-funding message, which is called send-sender-and-receiver-contract-txes


    = week-2020-10-26 =
    # week-2020-10-26
    modifying the contract redeemscript i was planning to use, to fix the oversized preimage attack
    https://lists.linuxfoundation.org/pipermail/lightning-dev/2016-May/000529
    and testing the solution a little bit
    @@ -945,7 +945,7 @@ this bug in rust-bitcoin https://github.com/rust-bitcoin/rust-bitcoincore-rpc/is
    working on the proof-of-funding message, which is a message sent when a funding transaction has confirmed
    and therefore proves to the other party that the whole exchange of messages isnt a DOS

    = week-2020-10-19 =
    # week-2020-10-19
    added print statements to bitcoin core, and used them to confirm that the sighashes of
    the two transactions (one which works, one which doesnt work) are the same
    i fed the sighash printed by bitcoincore into my rust code, then the resulting signature
    @@ -965,7 +965,7 @@ started modifying wallet code so that the same full node can handle multiple ins
    for example multiple makers and one taker, which is needed for testing


    = week-2020-10-12 =
    # week-2020-10-12
    continuing to write the networking and protocol code
    fighting with rust's borrow checker a little bit, i slightly rewrote parts of
    the earlier wallet code in order to remove some lifetime compile errors
    @@ -1000,7 +1000,7 @@ having some trouble with it, managed to successfully sign exactly the same trans
    so now im just carefully printing going through the tx byte-by-byte figuring out why the other code fails
    tried to use a debugger to step into the library and figure how whats different, but couldnt get it to work

    = week-2020-10-5 =
    # week-2020-10-5
    created the boilerplate code for maker and taker networking with tokio
    am able to add new network messages now fairly easily
    the code requests and serves up coinswap offers
    @@ -1009,7 +1009,7 @@ created the boilerplate code for maker and taker networking with tokio
    using serde enum representations for the messages: https://serde.rs/enum-representations.html
    this really helps because we can use the compiler for extra type checking and readability

    = week-2020-9-28 =
    # week-2020-9-28
    spent most of the time recovering from my operation, but still did some work when i was able to

    finished first draft of fixes to protocol design
    @@ -1021,14 +1021,14 @@ then edge-cases and attacks can be more easily found

    now coding the networking code for the final coinswap app

    = week-2020-9-21 =
    # week-2020-9-21
    helped someone who messaged me twitter debug their electrum personal server installation

    wrote a full design for a two-party coinswap which contains all those fixes, most notably collateral payments

    going to the hospital for an operation, so most likely wont work for the rest of the week

    = week-2020-9-14 =
    # week-2020-9-14
    still coding what will eventually be the internal wallet
    ran into this issue https://github.com/rust-bitcoin/rust-bitcoincore-rpc/issues/136
    thankfully @shesek also wrote a workaround
    @@ -1042,12 +1042,12 @@ now have code which imports addresses and sync's a wallet, and supports seed phr
    now ill write a second version of the protocol design which fixes the issues found in review
    of the first one

    = week-2020-9-7 =
    # week-2020-9-7
    finished coding wallet generation and recovery, now coding wallet sync

    had medical issues and hospital visits this week so did a bit less work

    = week-2020-8-31 =
    # week-2020-8-31
    possibly made another breakthrough with fixing the vulnerability found by
    ZmnSCPxj, about riskless theft attempts, it involve having the outgoing side
    (e.g. alice in a simple alice-bob coinswap) be required to include her own
    @@ -1061,7 +1061,7 @@ read https://doc.rust-lang.org/cargo/index.html
    made a start on coding the actual coinswap application (finally)
    started coding the part which generates and recovers a new single-sig wallet

    = week 2020-8-24 =
    # week 2020-8-24
    made a short script which does the EC key tweaking from my detailed protocol design email
    so that peers can agree on public keys with one fewer round trip

    @@ -1091,7 +1091,7 @@ possibly made a breakthrough with fixing these vulnerabilities
    im considering having the two peers (alice and bob, say) know slightly different
    versions of the contract transactions

    = week 2020-8-17 =
    # week 2020-8-17
    still working on figuring out how to use rust-bitcoin to create and spend from 2of2 multisigs
    stuck a bit, might have to go through the transaction byte-by-byte

    @@ -1108,7 +1108,7 @@ and hashlock contract is known to both sides together
    successfully made a short script which creates and spends from a htlc contract with rust-bitcoin
    it is able to spend both by providing the hash preimage and by waiting for the timeout

    = week 2020-8-10 =
    # week 2020-8-10
    fixed up "protocol-design-final" and sent to the mailing list
    https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-August/018080.html

    @@ -1117,7 +1117,7 @@ https://twitter.com/blockdigest/status/1293275473938710535

    reading code and figuring out exactly how to create and spend from a 2of2 multisig address using rust-bitcoin

    = week 2020-8-3 =
    # week 2020-8-3
    continuing to work on the detailed design of the protocol

    came up with an attack on my earlier design which included miner fees
    @@ -1135,7 +1135,7 @@ now ill work on the final protocol design which includes every feature, and then
    finished first draft of document "protocol-design-final", so now need to read it closely again and
    eventually send it to the dev mailing list for review

    = week 2020-7-27 =
    # week 2020-7-27
    posted my review in the taproot PR in secp256k1
    https://github.com/bitcoin-core/secp256k1/pull/558

    @@ -1151,7 +1151,7 @@ while designing this i came across a possible problem i hadnt forseen
    after a lot of thinking and writing, i came up with a solution to it which should work
    the solution is based on using retaliation to make it not possible to DOS for free

    = week 2020-7-20 =
    # week 2020-7-20
    used rust-bitcoin and rust-wallet to sign a transaction

    worked much less this week due to medical issues
    @@ -1164,7 +1164,7 @@ squashed after lots of revisions from review.
    edit: 2020/9/11 merged finally! https://twitter.com/pwuille/status/1304504395384512512


    = week 2020-7-13 =
    # week 2020-7-13
    reading
    https://rust-lang.github.io/async-book

    @@ -1206,7 +1206,7 @@ managed to use the RPC library to obtain the best block hash from bitcoind
    the error message was not descriptive enough
    i decided to open an issue about it https://github.com/rust-bitcoin/rust-bitcoincore-rpc/issues/117

    = week 2020-7-6 =
    # week 2020-7-6
    continuing work on rust http server
    learning about tests, seperate modules, using cargo to run tests
    file and path handling in rust
    @@ -1221,7 +1221,7 @@ have the server creates an index page if a directory is GET requested, that page
    then will move onto implementing an async version of the server
    start with having two applications in the project, the second one for async

    = week 2020-6-29 =
    # week 2020-6-29
    finished the rust irc bot
    it features:
    * connects to a network and irc channel
    @@ -1252,7 +1252,7 @@ starting to code a http server
    seperate files and modules, one mod controlling the protocol parsing, so later it can be dropped into the async version
    two binary files, one for single-client other for async, might work

    = week 2020-6-22 =
    # week 2020-6-22
    still writing an irc bot in rust, learning a lot about string manipulation, and with rust's borrowing feature

    answered some issues on the EPS github
    @@ -1268,7 +1268,7 @@ still coding rust, learned a couple of things about ownership and lifetimes

    fixed joinmarket issue #610 and tested waxwing's PR #611 finding a bug

    = week 2020-6-15 =
    # week 2020-6-15
    still reading the rust book

    finished the rust book except the cargo chapter
    @@ -1285,7 +1285,7 @@ finished the skim reading

    started writing an irc bot in rust

    = week 2020-6-8 =
    # week 2020-6-8
    got a grant from the Human Rights Foundation

    gave interview with Alyssa Hertig who will write an article about CoinSwap on coindesk
    @@ -1302,7 +1302,7 @@ reviewed the python-bitcointx pull request on joinmarket

    set up a date for a podcast recording on the whatbitcoindid podcast

    = week 2020-6-1 =
    # week 2020-6-1
    still learning rust

    did the exercises in the rust book about collections (calculating averages)
    @@ -1317,7 +1317,7 @@ https://anchor.fm/tales-from-the-crypt/episodes/170-Chris-Belcher-ef8blj
    released electrum personal server 0.2.1


    = week 2020-5 25=
    # week 2020-5 25
    published coinswap design document to the mailing list, and github gist

    started working on `announce-fidelity-bonds` branch which edits the joinmarket makers and takers to create and parse fidelity bonds announcements