Bitcoin Forum
December 11, 2016, 10:24:44 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Aspects of ecommerce based on Bitcoin  (Read 1052 times)
carlos
Member
**
Offline Offline

Activity: 103


View Profile
August 09, 2011, 01:10:01 AM
 #1

I'm currently developing payment gateway and wonder what are experts opinions about architecture of the middleman system on top of bitcoind server wallet.

From the forum and available wiki I've figured at least two ways to handle separate merchants (or projects) using the same wallet file on server.

First: User has own bitcoin account and for each expected payment new address is created. Server listener then awaits the payment for this particular address and confirms the payment to the merchant. Payment is credited to user bitcoin account.

Second: Aside of own user bitcoin account we create also new unique account for each customer order. This way we can check only the balance of particular account and after balance is confirmed call the merchant's site. Then amount is moved from temporary order account to user's main account.

I wonder what are the bottlenecks and which way to go to handle thousands of users. What are the aspects of scaling handling the listener for the incoming payments. What are best and most efficient commands to use for checking it through bitcoind. Is there way to delete not used accounts to save space?

Thanks alot for any suggestions...

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481451884
Hero Member
*
Offline Offline

Posts: 1481451884

View Profile Personal Message (Offline)

Ignore
1481451884
Reply with quote  #2

1481451884
Report to moderator
1481451884
Hero Member
*
Offline Offline

Posts: 1481451884

View Profile Personal Message (Offline)

Ignore
1481451884
Reply with quote  #2

1481451884
Report to moderator
1481451884
Hero Member
*
Offline Offline

Posts: 1481451884

View Profile Personal Message (Offline)

Ignore
1481451884
Reply with quote  #2

1481451884
Report to moderator
carlos
Member
**
Offline Offline

Activity: 103


View Profile
August 09, 2011, 12:13:03 PM
 #2

Please mods, move it to development forum, thx...

2112
Legendary
*
Offline Offline

Activity: 1708



View Profile
August 09, 2011, 03:16:43 PM
 #3

Satoshi client a.k.a. bitcoin a.k.a. bitcoind is not designed to do what you are planning. The design will not change as a matter of policy of the "core development group". This is/was meant to be "peer to peer" project and it frowns on "middlemen" as a matter of ideology. Your long term hope is only in libbitcoin project.

Short term you can implement notification callbacks in the block and transaction verification code. You'll need to employ (or be) a competent C++ programmer.

Your worries about saving space are premature. In order to fully participate in the bitcoin economy you'll have to store the whole block chain. Maintaining additional index of interesting transactions will be a pittance in terms of disk space.

To better understand the mindset of this forum may I suggest that you go through the history of my posts (it is 3 pages now) and look into other posts on the threads I replied. I really tried to stick to the technical issues.

Good luck!

Please comment, critique, criticize or ridicule BIP 2112: https://bitcointalk.org/index.php?topic=54382.0
Long-term mining prognosis: https://bitcointalk.org/index.php?topic=91101.0
BitcoinNotify.com
Jr. Member
*
Offline Offline

Activity: 58


View Profile
August 09, 2011, 06:21:16 PM
 #4

I'm currently developing payment gateway and wonder what are experts opinions about architecture of the middleman system on top of bitcoind server wallet.

Your questions does not address the biggest concern here: security. It's extremely hard to properly secure wallet living on the server.
error
Hero Member
*****
Offline Offline

Activity: 574



View Profile
August 09, 2011, 07:15:21 PM
 #5

Right now you have two options for being notified of a transaction: this patch (requires wallet online) and blkmond (does not require online wallet, but isn't currently stable). I've been working on stabilizing blkmond for some time and hopefully it will be usable soon.

15UFyv6kfWgq83Pp3yhXPr8rknv9m6581W
BitcoinNotify.com
Jr. Member
*
Offline Offline

Activity: 58


View Profile
August 09, 2011, 07:28:41 PM
 #6

Right now you have two options for being notified of a transaction: this patch (requires wallet online) and blkmond (does not require online wallet, but isn't currently stable).

If we are speaking about transaction notifications, there is also a third option, perhaps the easiest one: https://bitcoinnotify.com

(does not require wallet online)
error
Hero Member
*****
Offline Offline

Activity: 574



View Profile
August 09, 2011, 07:36:53 PM
 #7

Right now you have two options for being notified of a transaction: this patch (requires wallet online) and blkmond (does not require online wallet, but isn't currently stable).

If we are speaking about transaction notifications, there is also a third option, perhaps the easiest one: https://bitcoinnotify.com

(does not require wallet online)

True. But your service is a third party service, something the OP doesn't seem interested in. I could be wrong though.

15UFyv6kfWgq83Pp3yhXPr8rknv9m6581W
carlos
Member
**
Offline Offline

Activity: 103


View Profile
August 09, 2011, 09:29:12 PM
 #8

Satoshi client a.k.a. bitcoin a.k.a. bitcoind is not designed to do what you are planning. The design will not change as a matter of policy of the "core development group". This is/was meant to be "peer to peer" project and it frowns on "middlemen" as a matter of ideology. Your long term hope is only in libbitcoin project.
I have come to conclusion that the middle-man is needed in current time because downloading the whole chain is not comfortable for the clients. And its clearly what e.g. mtgox.com, mybitcoin.com (Smiley ) bitomat.pl (Cheesy) do... so any service based on btc needs account management on their site (and this is what is my project about).
Quote
Your worries about saving space are premature. In order to fully participate in the bitcoin economy you'll have to store the whole block chain. Maintaining additional index of interesting transactions will be a pittance in terms of disk space.
I'm sure that bitcoind itself is very efficient in storing transactions and block chain... What I need is to check transaction statuses on incoming payments (confirmations are enough - or is there anything behind that I dont see?).
Quote
To better understand the mindset of this forum may I suggest that you go through the history of my posts (it is 3 pages now) and look into other posts on the threads I replied. I really tried to stick to the technical issues.

Good luck!
I'll dive into it, thanks for help...

carlos
Member
**
Offline Offline

Activity: 103


View Profile
August 09, 2011, 09:32:29 PM
 #9

I'm currently developing payment gateway and wonder what are experts opinions about architecture of the middleman system on top of bitcoind server wallet.

Your questions does not address the biggest concern here: security. It's extremely hard to properly secure wallet living on the server.

I have already implemented basic wallet service. All fine... Rest assured that my experiences are 12+ years with serverside scripting and our admin is *NIX guru with 10 years experience in IP networks and NIX security.

I'm not type of guy who would accidentaly delete wallet ... or let the password rest unencrypted on filesystem (as we have seen in past). we are prepared to build serious and robust solution... Just as we start the service, we'll invite bunch of hackers to audit the system.

Questions:

What is the best way to handle temporary accounts for incoming payments? is there currently way to delete account ?

What is the best way to listen for incoming transacions? already implemented bitoind functions or bitcoin patch?

carlos
Member
**
Offline Offline

Activity: 103


View Profile
August 09, 2011, 09:35:56 PM
 #10


If we are speaking about transaction notifications, there is also a third option, perhaps the easiest one: https://bitcoinnotify.com

Thanks, but we prefer to run our wallet on our own secured NIX based system.

blkmond is great but I like the patch for the bitcoind more Smiley and already have this installed on our system and works great...
The only thing that I need to recompile it when new versions come. I suggest this block notify option should be implemented in official bitcoind.

BitcoinNotify.com
Jr. Member
*
Offline Offline

Activity: 58


View Profile
August 09, 2011, 09:40:14 PM
 #11

Just as we start the service, we'll invite bunch of hackers to audit the system.

Great to hear you are really serious about security.

Quote from: carlos
Question: is there currently way to delete account ?

If you are referring to BitcoinNotify, sure there is. Seek in the profile settings.
carlos
Member
**
Offline Offline

Activity: 103


View Profile
August 09, 2011, 09:46:30 PM
 #12

Just as we start the service, we'll invite bunch of hackers to audit the system.

Great to hear you are really serious about security.

Quote from: carlos
Question: is there currently way to delete account ?

If you are referring to BitcoinNotify, sure there is. Seek in the profile settings.
Sorry I'm refering to local bitcoind server (wallet) and its official functions:
There are addresses in accounts and you can move addresses between accounts. But I haven't found way to delete account.

carlos
Member
**
Offline Offline

Activity: 103


View Profile
August 09, 2011, 09:57:33 PM
 #13

Short term you can implement notification callbacks in the block and transaction verification code. You'll need to employ (or be) a competent C++ programmer.
You mean to deploy independent c++ daemon to search through blocks for transaction statuses?
What improvement in efficiency should I expect compared to using bitcoind RPC?

2112
Legendary
*
Offline Offline

Activity: 1708



View Profile
August 10, 2011, 03:19:56 AM
 #14

What is the best way to handle temporary accounts for incoming payments? is there currently way to delete account ?
Accounts in bitcoind are fiction. They are essentially labels on transactions. The default label on the transaction is an empty string thus the default account has name "". Don't worry about deletion now. bitcoind currently doesn't handle properly transactions stalled in the "unconfirmed" state and requires manual fixups. Once this bug is fixed you can then worry about cleaning up stale accounts.

Please comment, critique, criticize or ridicule BIP 2112: https://bitcointalk.org/index.php?topic=54382.0
Long-term mining prognosis: https://bitcointalk.org/index.php?topic=91101.0
2112
Legendary
*
Offline Offline

Activity: 1708



View Profile
August 10, 2011, 04:22:07 AM
 #15

What improvement in efficiency should I expect compared to using bitcoind RPC?
JSON-RPC is a really bad choice for a real-time network protocol. Basically its use cannot be distinguished from a Distributed Denial of Service Attack.

Mt.Gox suffers from it: uses JSON-RPC for market information thus when there's more than about several hundreds of users their DDoS protection service kicks in and users cannot trade in real-time any more.

Here's a link to me trying to explain it to the MtGox users:

https://bitcointalk.org/index.php?topic=35357.msg439514#msg439514



Please comment, critique, criticize or ridicule BIP 2112: https://bitcointalk.org/index.php?topic=54382.0
Long-term mining prognosis: https://bitcointalk.org/index.php?topic=91101.0
carlos
Member
**
Offline Offline

Activity: 103


View Profile
August 10, 2011, 12:32:25 PM
 #16

Actually unavailability of Mt.Gox web UI could be solved without any change in their API. Its just that you take different security (and overuse/exploit) measures for each separately.

Please don't tell me that its not possible to limit request to API per IP or per time (and the API should be for registered users only). And if it is busy, it should not affect web UI responses.

Anyway back to original topic - separate c++ daemon looks like the way.

carlos
Member
**
Offline Offline

Activity: 103


View Profile
August 10, 2011, 12:39:40 PM
 #17

What is the best way to handle temporary accounts for incoming payments? is there currently way to delete account ?
Accounts in bitcoind are fiction. They are essentially labels on transactions. The default label on the transaction is an empty string thus the default account has name "". Don't worry about deletion now. bitcoind currently doesn't handle properly transactions stalled in the "unconfirmed" state and requires manual fixups. Once this bug is fixed you can then worry about cleaning up stale accounts.
OK. Don't you know if there have been any tests for speed of bitcoind json responses when there are large amounts of accounts/labels created or should I do tests myself?

2112
Legendary
*
Offline Offline

Activity: 1708



View Profile
August 11, 2011, 12:21:50 AM
 #18

Please don't tell me that its not possible to limit request to API per IP or per time (and the API should be for registered users only). And if it is busy, it should not affect web UI responses.
I guess you'll have to learn your own lessons when you get DDoS-ed for the first time, quite possibly by malfunctioning simple-minded software, not by intentional hackers.
Don't you know if there have been any tests for speed of bitcoind json responses when there are large amounts of accounts/labels created or should I do tests myself?
You'll have to do it yourselves. But be aware of the multithreaded patches by Joel Katz:

https://bitcointalk.org/index.php?topic=22585.0

Please comment, critique, criticize or ridicule BIP 2112: https://bitcointalk.org/index.php?topic=54382.0
Long-term mining prognosis: https://bitcointalk.org/index.php?topic=91101.0
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!