Pages:
Author

Topic: bitcoin core RPC compatible lite wallet proxy? - page 2. (Read 4547 times)

sr. member
Activity: 318
Merit: 251

Maybe he's talking about writing your own node or something, I don't know.  If that's the case, then yes, that's quite difficult when dealing with block reorgs, ensuring you get all txs and blocks from the P2P network without skipping a beat, ensure everything is valid, etc.

However, if you're willing to leverage Bitcoin Core, then everything is quite simple.
legendary
Activity: 1890
Merit: 1089
Ian Knowles - CIYAM Lead Developer
Or am I missing something here?

You are quite correct - I wouldn't pay much attention to the posts of the other person.
sr. member
Activity: 318
Merit: 251
Also the RPC paradigm isn't really well suited for this concept: the communication between blockchain server component and wallet component must be two-way not one-way request-response.

Huh?  It's somewhat two-way.  Not completely, but there are "walletnotify" and "blocknotify" config options available, and combine that with the "importaddress" function if you're not using the wallet.dat file, and it will instantly notify your software of a new tx that's assigned to one of your addresses and every new block.

As for block reorgs, that's quite simple too.  For example, say you set it for 4 confirmations required.  Every time a new block is generated, your software immediately fires, adds 1 confirmation to each tx, then looks up each unconfirmed tx that has 4 confirmations, and ensures it's still a valid tx.  If not, bitcoind will show the confirmations at -1, meaning block reorg so you abandon that tx.  If it's still valid and showing 4 confs within the blockchain though, then you confirm it in your system.

Or am I missing something here?
legendary
Activity: 2128
Merit: 1074
On my computer there is nothing about UTXO indexing in the original post.

I'm going to quote both posts until I see the clarification.

Those Electrum servers that couldn't keep up with the Bitcoin transaction stream during recent stress tests and were getting hours behind w.r.t. the live network?

Clearly you just don't know when to give up - you do realise that Electrum is not the only software that does UTXO indexing or do you not?

Maybe you should go and study indexing for a while before making more ridiculous posts.

Hint - check what the OP is asking about and stop going off on stupid tangents trying your best to show off some sort of technical knowledge that you clearly lack.

Is there a bitcoin core RPC compatible lite wallet available which proxies onto a full node for the data?

Use case: multiple merchant wallets, one blockchain, one API on one machine without having to duplicate the blockchain.

I have a full node running, which is great, but I need multiple wallets... Having lite wallet(s) which would get their data from my full node would be awesome and not have any of the trust issues a lite wallet would normally have.

I don't want to have to implement another RPC wrapper, so this needs to be compatible with the core RPC API.

Cheers, Paul.
sr. member
Activity: 318
Merit: 251
http://synala.com/

Would do the trick.  You can either setup multiple wallets with different BIP32 key pairs within one installation of Synala, or install it multiple times, and just enter the same RPC connection settings in each install.  Would require you to have one full node running, but you could run the multiple systems / wallets off that one node without problem.

Only thing is, during install it'll ask you to add lines to the bitcoin.conf file like:

Code:
walletnotify=/usr/bin/php /home/site1/public_html/synala/bitcoind/process_tx.php %s
blocknotify=/usr/bin/php home/site1/public_html/synala/bitcoind/process_block.php %s

You'll need to change those to run a bash script instead for the multiple sites.  So instead you would have for example:

Code:
walletnotify=/home/coind/process_tx.sh %s
blocknotify=/home/coind/process_block.sh %s

Then create the bash files with the appropriate PHP commands being run, one for each install.  So for example, /home/coind/process_tx.sh would contain:

Code:
#!/bin/sh
/usr/bin/php /home/site1/public_html/synala/bitcoind/process_tx.php ${1}
/usr/bin/php /home/site2/public_html/synala/bitcoind/process_tx.php ${1}
/usr/bin/php /home/site3/public_html/synala/bitcoind/process_tx.php ${1}

Hope that helps!

legendary
Activity: 1890
Merit: 1089
Ian Knowles - CIYAM Lead Developer
Those Electrum servers that couldn't keep up with the Bitcoin transaction stream during recent stress tests and were getting hours behind w.r.t. the live network?

Clearly you just don't know when to give up - you do realise that Electrum is not the only software that does UTXO indexing or do you not?

Maybe you should go and study indexing for a while before making more ridiculous posts.

Hint - check what the OP is asking about and stop going off on stupid tangents trying your best to show off some sort of technical knowledge that you clearly lack.
legendary
Activity: 2128
Merit: 1074
Indexing UTXOs by address is not complex at all - and is exactly what projects like Electrum already do (clearly you are not very aware).
Are you talking about that Electrum client that uses Stratum protocol (designed by slush) to talk to Electrum servers?

Those Electrum servers that couldn't keep up with the Bitcoin transaction stream during recent stress tests and were getting hours behind w.r.t. the live network?

Or are you talking about something else?
legendary
Activity: 1890
Merit: 1089
Ian Knowles - CIYAM Lead Developer
It is a complex project, I'm not aware of anything open source.

Indexing UTXOs by address is not complex at all - and is exactly what projects like Electrum already do (clearly you are not very aware).
legendary
Activity: 1890
Merit: 1089
Ian Knowles - CIYAM Lead Developer
I believe that bitcoin armory kind of does that. It used the bitcoin rpc to get all of its data, but I don't know whether you would consider that to be a lite wallet.

As it requires an enormous amount of RAM to even run (unless it has dramatically changed design recently) I certainly don't think you could ever classify it as a "lite wallet".
staff
Activity: 3458
Merit: 6793
Just writing some code
I believe that bitcoin armory kind of does that. It used the bitcoin rpc to get all of its data, but I don't know whether you would consider that to be a lite wallet.
legendary
Activity: 2128
Merit: 1074
It is a complex project, I'm not aware of anything open source.

Also the RPC paradigm isn't really well suited for this concept: the communication between blockchain server component and wallet component must be two-way not one-way request-response.

A producer-subscriber paradigm (like e.g. FIX protocol) is much better way to implement this, and once correctly implemented it nearly completely obviates the need for one-way RPC.

There were very buggy attempts to implement what you're asking by effectively replacing subscription pattern by a busy-wait loop with very frequent polling. But this was always ending with coding disaster that wouldn't handle chain reorganizations correctly.
legendary
Activity: 1890
Merit: 1089
Ian Knowles - CIYAM Lead Developer
Unfortunately the problem is UTXO indexing (by address) which is not done by Bitcoin Core (except for its own wallet).

Personally I think it's a pity this feature isn't added into Bitcoin Core as it makes sense for it to be able to provide this information (rather than having to add another server like Electrum on top of it).

I don't know what the core devs reason is for not implementing this (beyond it not being a high priority) and would actually help out if lack of developer time was the only issue (am guessing that it isn't though).
legendary
Activity: 1008
Merit: 1007
Is there a bitcoin core RPC compatible lite wallet available which proxies onto a full node for the data?

Use case: multiple merchant wallets, one blockchain, one API on one machine without having to duplicate the blockchain.

I have a full node running, which is great, but I need multiple wallets... Having lite wallet(s) which would get their data from my full node would be awesome and not have any of the trust issues a lite wallet would normally have.

I don't want to have to implement another RPC wrapper, so this needs to be compatible with the core RPC API.

Cheers, Paul.
Pages:
Jump to: