-
Notifications
You must be signed in to change notification settings - Fork 119
Single trusted node blockchain interface #470
Comments
Third benefit: user experience with sync'ing is much better with bloom filters, much better than using "bitcoind -rescan" Fact is, if there's something Mike Hearn really thought about that was user experience. |
Here is some code I was playing with that could be helpful to anyone working on this https://gist.github.com/chris-belcher/493551782452ff7cf6336dec760e1f1e The p2p networking code should be somewhat modular so it can be reused for #503 and #55 (comment) |
This and #653 have the serious problem that they can't query the UTXO set, which is required to be a taker. In recv_txio() and add_signature() any arbitrary UTXO that the makers send must be queried for their script and amount. In make_commitment() only the UTXOs already in the taker's own wallet must be queried, if the joinmarket wallet kept track of UTXO confirmations then that code could be modified to use wallet.unspent instead of query_utxo_set(). To reduce this need for maintaining the UTXO set for the taker, we could modify the protocol so that the maker sends proof of the UTXO's value and script along with the UTXOs. This means these features can't be coded unless the protocol is modified first. |
As discussed on IRC, the maker could send the entire transaction hex, but that doesn't prove the UTXOs are unspent. Without that, a malicious maker could use it to DOS a taker who wouldn't even know which maker sent them a fake UTXO. |
One way to make "Single trusted node blockchain interface" work is to wait for bip151 and consequences to mature. A possible extension for after bip151 is a p2p version of estimatefee, we could ask for or implement a p2p version of query-utxo-set. Another way to make both of these features work is to wait for delayed txo commitments to mature. That would allow proofs to be made that a utxo really is unspent that the maker could send to the taker. |
This could be done by getting the user to specify a p2p address AND json rpc address. The p2p connection can quickly sync the wallet, and the json rpc connection to the full node can query the UTXO set (avoiding the need to do #682 with all its problems) and also json rpc can do estimatefee. |
Fleshing out this idea in more detail: #55 (comment)
The user would give a single ip address and host to JoinMarket that would connect to a network node controlled by the user and synchronize it's wallet using BitcoinJ-style bloom filters.
This would have the same security, privacy and trustless properties as running a full node on the same machine but would solve other problems too. Such as:
It is much easier to set up a network node than to set up something like an Electrum server, so I think this could increase the adoption of full-nodes-as-wallets.
Two problems/issues I can think of.
Needless to say, the bloom filter can have a very very low false positive rate, because bloom filters are useless for privacy anyway and it would just eat up bandwidth.
However a better alternative to all this may be to simply tunnel JSON-RPC over ssh or tor and get the same thing.
The text was updated successfully, but these errors were encountered: