Pages:
Author

Topic: Electrum server discussion thread - page 19. (Read 61423 times)

legendary
Activity: 3920
Merit: 2348
Eadem mutata resurgo
July 13, 2012, 05:58:04 PM
#72

So I notice there are currently 6 servers the Electrum client is aware of ... just wondering if the servers can be made aware of other servers in the same way that the client is?
member
Activity: 85
Merit: 10
July 12, 2012, 09:54:26 AM
#71
I've set up an electrum server some time ago for me and my friends because we didn't want to download the blockchain. I've made it public now, it doesn't have a domain but the IP should show up in the server list: 176.9.206.164

donator
Activity: 289
Merit: 250
July 08, 2012, 02:28:18 AM
#70
Here's a note about running the electrum server on a 32-bit machine. The issue is that abe tries to mmap the blk000x.dat file, which may be too large to fit in 32-bit virtual memory. I use a patch for bitcoin that reduces the max size of each dat file to ~500MB:

Code:
diff -ur bitcoin-0.6.2_orig/src/main.cpp bitcoin-0.6.2/src/main.cpp
--- bitcoin-0.6.2_orig/src/main.cpp 2012-07-07 23:18:28.365376724 -0700
+++ bitcoin-0.6.2/src/main.cpp 2012-06-19 18:40:45.842931405 -0700
@@ -1865,7 +1865,7 @@
         if (fseek(file, 0, SEEK_END) != 0)
             return NULL;
         // FAT32 filesize max 4GB, fseek and ftell max 2GB, so we must stay under 2GB
-        if (ftell(file) < 0x7F000000 - MAX_SIZE)
+        if (ftell(file) < 0x1F000000 - MAX_SIZE)
         {
             nFileRet = nCurrentBlockFile;
             return file;

The idea for this patch comes from this post by John Tobey. The "right" way to do this may be to fix abe to only mmap the file partially, but until then, this little hack works.
sr. member
Activity: 476
Merit: 250
June 27, 2012, 04:37:15 PM
#69
vuce, i made an implementation of the server backend and created the server frontend so i can help you out. you should come to #electrum on Freenode.
Managed to figure it out, but I'll drop by if I have any more questions, thanks genjix!
legendary
Activity: 1232
Merit: 1076
June 27, 2012, 01:19:53 PM
#68
vuce, i made an implementation of the server backend and created the server frontend so i can help you out. you should come to #electrum on Freenode.
legendary
Activity: 1896
Merit: 1353
June 27, 2012, 01:10:48 PM
#67
Thomas, is there any specification for the server commands? I have trouble with some of the "methods" (namely "blockchain.address.subscribe"), but it might be due to me not understanding what it actually does. I've looked at the stratum protocol draft (I'm assuming electrum uses this or is at least based on it?) but it doesn't seem to have any real info either.

the specs are hosted on the bitcoinconsultancy wiki. that wiki is down atm. there is no ETA afaik
sr. member
Activity: 476
Merit: 250
June 27, 2012, 01:09:19 PM
#66
Thomas, is there any specification for the server commands? I have trouble with some of the "methods" (namely "blockchain.address.subscribe"), but it might be due to me not understanding what it actually does. I've looked at the stratum protocol draft (I'm assuming electrum uses this or is at least based on it?) but it doesn't seem to have any real info either.
legendary
Activity: 1896
Merit: 1353
June 26, 2012, 10:32:22 AM
#65
Can I ask you what kind of resources a electrum server uses or rather what kind of resources I should dedicate to it to have it running stable.

post scriptum:
 * make sure you use a 64-bit OS
 * the first time you import the blockchain in abe, stop bitcoind during the import, it will go much faster.
 * I do not currently use a SSD for ecdsa.org, but I would pick a VPS with SSD if I had to redo this
legendary
Activity: 1896
Merit: 1353
June 25, 2012, 02:15:27 AM
#64
Is there a way of getting "blockchain.address.get_history" from a certain block hash onwards only? I'd imagine downloading full history of some addresses with a lot of traffic might be somewhat resource-consuming.

Maybe something like:
Code:
{
  "id": 0,
  "method": "blockchain.address.get_history",
  "params": [
    "17Su3J2RWnm2WLqf8pfpgj4hFUf6MFH9SZ",
    "000000000000077b2195a0c9db6f4179cb98ef579f300943b3a69357ac9e2028"
  ]
}

With the block hash from subscribe this could be very useful.

yes, I am planning something like that.
get_status will be deprecated, and the client will send a hash of its current history
donator
Activity: 289
Merit: 250
June 25, 2012, 12:30:47 AM
#63
I'm now running a server as well to hopefully provide some redundancy for users.
hero member
Activity: 742
Merit: 500
June 25, 2012, 12:13:18 AM
#62
I should have another server up again soon.  I ran one for a little bit, but then Abe died and I haven't bothered since.
sr. member
Activity: 476
Merit: 250
June 24, 2012, 07:57:50 PM
#61
Is there a way of getting "blockchain.address.get_history" from a certain block hash onwards only? I'd imagine downloading full history of some addresses with a lot of traffic might be somewhat resource-consuming.

Maybe something like:
Code:
{
  "id": 0,
  "method": "blockchain.address.get_history",
  "params": [
    "17Su3J2RWnm2WLqf8pfpgj4hFUf6MFH9SZ",
    "000000000000077b2195a0c9db6f4179cb98ef579f300943b3a69357ac9e2028"
  ]
}

With the block hash from subscribe this could be very useful.
newbie
Activity: 44
Merit: 0
June 24, 2012, 12:15:44 AM
#60

I realize it's a bit of a hack, but do you see any practical drawbacks or issues in using tx_id fields for sorting transactions when their timestamp fields are equal? That seems to work well in addressing my UX concerns.

tx_id is not part of the protocol and should not be sent at all by the server.
it is a field that is only returned by abe-based servers, not servers using libbitcoin

D'oh! Story of my life.

It would really help if it were possible to recover those protocol docs (the link you posted on another thread is still down). What is libbitcoin? It seems like it might help to document the different kinds of servers, as well...
newbie
Activity: 11
Merit: 0
June 23, 2012, 09:40:32 PM
#59
If I am running bitcoind daemon and an Electrum server, do both programs download the block chain separately?

bitcoind downloads the blockchain, then Electrum server (with the help of Abe) reads it and puts it in an SQL database to make it easier to query.
sr. member
Activity: 294
Merit: 250
June 23, 2012, 09:16:26 PM
#58
If I am running bitcoind daemon and an Electrum server, do both programs download the block chain separately?
newbie
Activity: 11
Merit: 0
June 23, 2012, 06:34:49 PM
#57
Nevermind.  After accidentally trashing my db for the 10th time, I'm declaring the current solution of bitcoind+abe+electrum server [edit]annoying[/edit].  I'll come back when it's not a full time job just to get it to run.


Edit:
Sorry, I was very frustrated.  Now that I've calmed down, I'm going to try to help fix things instead of complaining Smiley
donator
Activity: 289
Merit: 250
June 23, 2012, 04:59:40 PM
#56

Code:
        current_id = self.safe_sql("""SELECT max(id) FROM tx_seq""");

If the table is indexed properly, it should be just as fast, too.  I'll try it on my node later and let you know how it works.


I tried that first but I got a tuple error of some kind. Let me know if you have more luck.

I can confirm that SELECT max(id) works for me on a MySQL server.
legendary
Activity: 1896
Merit: 1353
June 23, 2012, 08:38:29 AM
#55

...

What you are proposing is that Electrum servers store information that is not in the bitcoin blockchain.
There are more obvious uses to it than just sorting transactions. For example servers could store transaction labels.

This is beyond scope, at least for now.
It would involve an extra layer and infrastructure, and it would be a bad idea to mix such requests with the stratum commands.

That makes sense. Thanks for the thorough explanations.

I realize it's a bit of a hack, but do you see any practical drawbacks or issues in using tx_id fields for sorting transactions when their timestamp fields are equal? That seems to work well in addressing my UX concerns.

tx_id is not part of the protocol and should not be sent at all by the server.
it is a field that is only returned by abe-based servers, not servers using libbitcoin
newbie
Activity: 44
Merit: 0
June 23, 2012, 08:28:03 AM
#54

...

What you are proposing is that Electrum servers store information that is not in the bitcoin blockchain.
There are more obvious uses to it than just sorting transactions. For example servers could store transaction labels.

This is beyond scope, at least for now.
It would involve an extra layer and infrastructure, and it would be a bad idea to mix such requests with the stratum commands.

That makes sense. Thanks for the thorough explanations.

I realize it's a bit of a hack, but do you see any practical drawbacks or issues in using tx_id fields for sorting transactions when their timestamp fields are equal? That seems to work well in addressing my UX concerns.
legendary
Activity: 1896
Merit: 1353
June 23, 2012, 08:11:19 AM
#53

...

What you are proposing is that Electrum servers store information that is not in the bitcoin blockchain.
There are more obvious uses to it than just sorting transactions. For example servers could store transaction labels.

This is beyond scope, at least for now.
It would involve an extra layer and infrastructure, and it would be a bad idea to mix such requests with the stratum commands.

Pages:
Jump to: