Bitcoin Forum
April 24, 2024, 06:52:07 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: [Electrum] Independent monitoring of running servers?  (Read 5814 times)
slush (OP)
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
September 24, 2012, 04:16:29 PM
Last edit: March 03, 2013, 01:40:46 PM by slush
 #1

Hello all,

weeks ago I knocked up simple script which crawl over all public electrum nodes, connect to them and periodically check if they're up to date with their blockchains:

http://pastebin.com/UsBWCU4n
(use easy_install twisted stratum to install dependencies)

Is there somebody interested in providing (public?) service which will:

a) Show current status of all known servers (up/down)
b) Send mail to electrum operator if his node crashed

It should be quite trivial for some pythonist by using my code, but I don't have free time to finalize it into some usable form.

Such service would be really useful, because electrum servers are sometimes crashing (you know, it's still beta software) and it may took some time to admin to realize that his node is down.

Edit 03.03.2013: http://electrum.be/

1713984727
Hero Member
*
Offline Offline

Posts: 1713984727

View Profile Personal Message (Offline)

Ignore
1713984727
Reply with quote  #2

1713984727
Report to moderator
1713984727
Hero Member
*
Offline Offline

Posts: 1713984727

View Profile Personal Message (Offline)

Ignore
1713984727
Reply with quote  #2

1713984727
Report to moderator
1713984727
Hero Member
*
Offline Offline

Posts: 1713984727

View Profile Personal Message (Offline)

Ignore
1713984727
Reply with quote  #2

1713984727
Report to moderator
Be very wary of relying on JavaScript for security on crypto sites. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713984727
Hero Member
*
Offline Offline

Posts: 1713984727

View Profile Personal Message (Offline)

Ignore
1713984727
Reply with quote  #2

1713984727
Report to moderator
1713984727
Hero Member
*
Offline Offline

Posts: 1713984727

View Profile Personal Message (Offline)

Ignore
1713984727
Reply with quote  #2

1713984727
Report to moderator
1713984727
Hero Member
*
Offline Offline

Posts: 1713984727

View Profile Personal Message (Offline)

Ignore
1713984727
Reply with quote  #2

1713984727
Report to moderator
Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
September 24, 2012, 04:20:02 PM
 #2

I would love to build this. I think it's really necessary since Electrum servers sometime lag behind, which can be quite annoying. This should be right up my alley to see I am a web-developer by day Smiley

Electrum: the convenience of a web wallet, without the risks | Bytesized Seedboxes BTC/LTC supported
slush (OP)
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
September 24, 2012, 04:24:35 PM
 #3

That code on pastebin uses Twisted library, which may twist someone's head for first look :-), but it should be really easy to hack that code to report broken server to database/logfile.

wabber
Member
**
Offline Offline

Activity: 85
Merit: 10


View Profile
September 24, 2012, 08:56:33 PM
 #4

I think it would also be useful if that was included in the electrum client. That way ppl could compare the blockchain length of the nodes directly in the server list.
slush (OP)
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
September 24, 2012, 09:00:56 PM
 #5

I think that patches are welcome Smiley.

Although the primary reason for all this is notifying server admins about issues on their servers.

marcus_of_augustus
Legendary
*
Offline Offline

Activity: 3920
Merit: 2348


Eadem mutata resurgo


View Profile
September 24, 2012, 11:35:32 PM
 #6

This seems like a good basis for a module in the client that does server 'auditing' and etc for more decentralisation of Electrum layer (e.g. choose m of n servers in some kind of multi-party server selection protocol)

BkkCoins
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1009


firstbits:1MinerQ


View Profile WWW
September 27, 2012, 01:10:04 AM
 #7

This seems like a good basis for a module in the client that does server 'auditing' and etc for more decentralisation of Electrum layer (e.g. choose m of n servers in some kind of multi-party server selection protocol)
If this is done it should be possible to be disabled by users. Connecting to many servers may represent information leakage for users who want to avoid disclosure that they are using Electrum. Right now users can choose who to connect to, and as far as we know there are no malicious servers. But perhaps later when it's difficult to monitor server authenticity someone could setup a server with the intent of logging who is using Electrum and at what IPs, and what addresses they subscribe. For security reasons users should control who they allow connection to.

marcus_of_augustus
Legendary
*
Offline Offline

Activity: 3920
Merit: 2348


Eadem mutata resurgo


View Profile
September 27, 2012, 02:31:02 AM
 #8

This seems like a good basis for a module in the client that does server 'auditing' and etc for more decentralisation of Electrum layer (e.g. choose m of n servers in some kind of multi-party server selection protocol)
If this is done it should be possible to be disabled by users. Connecting to many servers may represent information leakage for users who want to avoid disclosure that they are using Electrum. Right now users can choose who to connect to, and as far as we know there are no malicious servers. But perhaps later when it's difficult to monitor server authenticity someone could setup a server with the intent of logging who is using Electrum and at what IPs, and what addresses they subscribe. For security reasons users should control who they allow connection to.

I agree.

All good points. It's again that balance between dealing with a known authenticated entity who you trust with your info or dealing with many who you semi (or don't have to) trust ... something to keep a look out for further down the track for sure.

Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
September 27, 2012, 08:13:53 PM
 #9

Just a little update, I'm working on it but since time it's limited It's going slowly.

Here is a little W.I.P. screenie:


Electrum: the convenience of a web wallet, without the risks | Bytesized Seedboxes BTC/LTC supported
slush (OP)
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
September 27, 2012, 11:46:10 PM
 #10

Nice! Are you using my script internally or did you implement checks youself?

Deafboy
Hero Member
*****
Offline Offline

Activity: 482
Merit: 502



View Profile WWW
September 28, 2012, 12:00:52 AM
 #11

I love you guys! (not in a gay way Smiley )
I was thinking about something like this for a few weeks. I'm using Nagios for electrum and bitcoind monitoring, but tool like this is needed.
slush (OP)
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
September 28, 2012, 12:05:29 AM
 #12

I was thinking about something like this for a few weeks. I'm using Nagios for electrum and bitcoind monitoring, but tool like this is needed.

Can you publish these nagios scripts, please? I had quite sophisticated scripts for nagios for the pool, but I lost them during Linode issue and I still didn't find a time to set it up back, at least in some limited form :-/. Some template for Electrum monitoring would motivate me to set up nagios again...

Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
September 28, 2012, 07:32:25 AM
 #13

Nice! Are you using my script internally or did you implement checks youself?

Your script, I assessed the options but the quickest way to get this online was using your script. So that's what I decided on.

I have thought about how to subscribe yourself to notifications and decided on a single token signup kind of thing.

So if you want to get alerts about one of the servers you fill in your email address you would like to receive the notifications on. A email will be send with a confirmation token, once you click the link and fill in the confirmation token you will start receiving emails. Every alert email will have an "unsubscribe" link to stop getting alerts.

I think I like this over full user accounts since this is probably something you will only do once and then forget about it, creating a whole new account for yet an other website seems silly. Ideas?

Electrum: the convenience of a web wallet, without the risks | Bytesized Seedboxes BTC/LTC supported
slush (OP)
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
September 30, 2012, 07:59:09 PM
 #14

Yes, I think that confirmation tokens are fine for it.

Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
October 02, 2012, 09:50:34 PM
 #15

Ok! First prototype is online at Eyelectrum.herokuapp.com. You can subscribe to your own server, or others, and should receive one email once your server lags two blocks behind.

There is no check build in yet to see if a server is actually online. I will try to work that in over the next few days.

Electrum: the convenience of a web wallet, without the risks | Bytesized Seedboxes BTC/LTC supported
BkkCoins
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1009


firstbits:1MinerQ


View Profile WWW
October 02, 2012, 10:23:18 PM
 #16

Looks great! Just a small detail. On my Firefox 15.0.1/Ubuntu 11.04 combination the "online/lagging" indicator is cut off by the block # so that you cannot read it fully.


Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
October 03, 2012, 08:16:54 AM
 #17

Looks great! Just a small detail. On my Firefox 15.0.1/Ubuntu 11.04 combination the "online/lagging" indicator is cut off by the block # so that you cannot read it fully.



Ah thanks! I only check in Chrome :$, will fix it in the next update.

Electrum: the convenience of a web wallet, without the risks | Bytesized Seedboxes BTC/LTC supported
ThomasV
Moderator
Legendary
*
Offline Offline

Activity: 1896
Merit: 1353



View Profile WWW
October 03, 2012, 08:32:28 AM
 #18

Electrum servers can have a lag of 1 (or even two) blocks caused by propagation delays in the bitcoin network. This is normal, and I would not consider this as an issue.

For larger lags, the current "official" server code also makes sure that the server does not go online until it has caught up with the blockchain.
If this mechanism fails, I would rather try to work on fixing/improving it, rather than asking users to use a monitoring website.
I believe that it would be very bad for Electrum usability if we cannot solve this problem at the server level.

now, this monitoring website could be useful for something else: to measure the percentage of uptime of servers, and maybe their ping time. I think this would be useful.


Electrum: the convenience of a web wallet, without the risks
Tachikoma
Hero Member
*****
Offline Offline

Activity: 938
Merit: 1000



View Profile WWW
October 03, 2012, 08:52:54 AM
 #19

Keeping track of uptime / lagtime would be the next step. I agree that fixing the server code would be much better. Sadly at this moment nobody is doing it, and I don't have the expertise to do it. So in the meantime this is a viable solution.

Electrum: the convenience of a web wallet, without the risks | Bytesized Seedboxes BTC/LTC supported
slush (OP)
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
October 05, 2012, 04:45:30 PM
 #20

If this mechanism fails, I would rather try to work on fixing/improving it, rather than asking users to use a monitoring website.

Such monitoring is helpful mostly for server administrators than for end users. Server may fail not only because of bug in server code. For example my node went out of memory and stopped responding. I didn't have a monitoring and I didn't noticed it for a week.

Having easy server monitoring doesn't mean that we cannot improve server code itself. We definitely need both - stable server AND independent monitoring.

Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!