Skip to content

Instantly share code, notes, and snippets.

View amitiuttarwar's full-sized avatar

Amiti Uttarwar amitiuttarwar

View GitHub Profile

Here is an overview of where I’ve been spending my time and energy in the bitcoin realm lately:

Engineering coach: scaling impact by supporting other contributors

I strongly believe that my highest impact work is mentoring other contributors to unleash their full potential within the bitcoin community. In addition to the intrinsic joy and satisfaction of helping others on their journey, it has been a meaningful way for me to scale my impact. Increasing my personal impact means multiplying the value of the resources that have been, and continue to be, invested in me.

Working in the bitcoin open-source world is hard. It is a gift to have autonomy in defining our direction of work, but it can sometimes feel overwhelming and isolating. The questions of “what should I be doing?” and “am I doing it well?” are not trivial to answer. In the role of engineering coach, I create space for contributors to answer these questions over a longer time horizon, which is especially relevant when projects occur over years

@amitiuttarwar
amitiuttarwar / rebroadcast filters
Last active January 2, 2020 22:08
How the filters interact to reduce the rebroadcast set.
Reducing noise in the rebroadcast set:
I think there are two ways these filters reduce the rebroadcast set
1. Caching min fee rate by itself —> mempool is emptying out, blocks are being mined & txn fees are decreasing. Time to rebroadcast, set is calculated & cache is applied.
Time 1: caching job runs, top block computed to include a, b, c
Mempool looks like: j i h g f e d | c b a
Time 2-4: txns come in
@amitiuttarwar
amitiuttarwar / backup_dotfiles.md
Created November 25, 2019 19:56
Managing dotfiles with work-trees.

Idea: make $HOME the git work-tree, with a bare repo in a dummy folder (.dotfiles). The git commands use .dotfiles as the git directory, and $HOME as the work directory.

Setup

  1. create "bare" repository
  • don't contain working tree aka copy of source files
  • store git revision history in root folder of repo instead of .git subfolder
mkdir $HOME/.dotfiles 
git init --bare $HOME/.dotfiles

Background: Currently, a node will only rebroadcast a transaction if it is the originating wallet. This is awful for privacy.

PR #16698 reworks the rebroadcast logic to significantly improve privacy.

Overview of changes

  • Instead of the wallet directly relaying transactions to peers, the wallet will submit unconfirmed txns to the node, and the node will apply logic to trigger txn rebroadcasts.
  • The node will apply rebroadcast conditions to all transactions.
  • The wallet will attempt to resubmit unconfirmed transactions to the node on a scheduled timer. This is only useful if the txn is dropped from the local mempool before it gets mined.
  • The mempool tracks locally submitted transactions (wallet & rpc) to ensure they are succesfully rebroadcast. Success is defined as receiving a GETDATA for the txn.
I propose reworking the rebroadcast logic to
1. Significantly improve privacy
2. Create a cleaner divide between wallet & node responsibilities
#### Conceptual changes
* Instead of the wallet directly relaying transactions to peers , the wallet will submit unconfirmed txns to the node, and the node will apply logic to trigger txn rebroadcasts.
* The node will not keep track of “my” transactions but instead apply rebroadcast conditions to _all_ transactions.
* The wallet will attempt to resubmit unconfirmed transactions to the node on a scheduled timer. This is to ensure the txn is not dropped from the local mempool.
New rebroadcast conditions:
* relies on `BlockAssembler::addPackageTxs` to identify top block of transactions based on current mempool. I’ll call this “top transactions”.