Bitcoin Forum
April 26, 2015, 05:12:54 PM *
News: Latest stable version of Bitcoin Core: 0.10.0 [Torrent]
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 »  All
  Print  
Author Topic: Electrum 1.8.1 Stuck on Block 251526  (Read 7505 times)
cryptocyprus
Sr. Member
****
Offline Offline

Activity: 308


View Profile WWW

Ignore
August 11, 2013, 01:38:28 PM
 #1

As per the title, no matter what server I reconnect to, it will not go past block 251526

I have tried all the servers
Deleted the contents of /appdata/Roaming/Electrum
Recovered the wallet using my seed & resynced

All to no avail, It will not let me send my balance out of the wallet giving the error -22

Any help is appreciated.
1430068374
Hero Member
*
Offline Offline

Posts: 1430068374

View Profile Personal Message (Offline)

Ignore
1430068374
Reply with quote  #2

1430068374
Report to moderator
coin palaceHot Slots and blackjack from Bender  click here
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1430068374
Hero Member
*
Offline Offline

Posts: 1430068374

View Profile Personal Message (Offline)

Ignore
1430068374
Reply with quote  #2

1430068374
Report to moderator
1430068374
Hero Member
*
Offline Offline

Posts: 1430068374

View Profile Personal Message (Offline)

Ignore
1430068374
Reply with quote  #2

1430068374
Report to moderator
1430068374
Hero Member
*
Offline Offline

Posts: 1430068374

View Profile Personal Message (Offline)

Ignore
1430068374
Reply with quote  #2

1430068374
Report to moderator
DigitalHermit
Full Member
***
Offline Offline

Activity: 150


Thank you! Thank you! ...


View Profile

Ignore
August 11, 2013, 05:18:34 PM
 #2

As per the title, no matter what server I reconnect to, it will not go past block 251526

I have tried all the servers
Deleted the contents of /appdata/Roaming/Electrum
Recovered the wallet using my seed & resynced

All to no avail, It will not let me send my balance out of the wallet giving the error -22

Any help is appreciated.

It is not your wallet that is the problem; The problem is on the Electrum Server(s)... this will need to be fixed in order to make Electrum clients functional again.

The exception we are seeing server-side is:
Code:
[11/08/2013-12:06:38] hist [('0000000000000050efb2e0ea17635fa1c2bd8da1e7864ecc0695f2565643989e', 251526, 0)]
Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 755, in run
    self.function(*self.args, **self.kwargs)
  File "/home/electrum/src/electrum-20130112/server/backends/bitcoind/blockchain_processor.py", line 67, in <lambda>
    threading.Timer(0, lambda: self.catch_up(sync=False)).start()
  File "/home/electrum/src/electrum-20130112/server/backends/bitcoind/blockchain_processor.py", line 675, in catch_up
    self.import_block(next_block, next_block_hash, self.height+1, sync)
  File "/home/electrum/src/electrum-20130112/server/backends/bitcoind/blockchain_processor.py", line 391, in import_block
    tx_hashes, txdict = self.deserialize_block(block)
  File "/home/electrum/src/electrum-20130112/server/backends/bitcoind/blockchain_processor.py", line 366, in deserialize_block
    tx = deserialize.parse_Transaction(vds, is_coinbase)
  File "/home/electrum/src/electrum-20130112/server/backends/bitcoind/deserialize.py", line 291, in parse_Transaction
    o = parse_TxOut(vds, i)
  File "/home/electrum/src/electrum-20130112/server/backends/bitcoind/deserialize.py", line 271, in parse_TxOut
    d['address'] = extract_public_key(scriptPubKey)
  File "/home/electrum/src/electrum-20130112/server/backends/bitcoind/deserialize.py", line 379, in extract_public_key
    decoded = [ x for x in script_GetOp(bytes) ]
  File "/home/electrum/src/electrum-20130112/server/backends/bitcoind/deserialize.py", line 335, in script_GetOp
    opcode |= ord(bytes[i])
IndexError: string index out of range

cryptocyprus
Sr. Member
****
Offline Offline

Activity: 308


View Profile WWW

Ignore
August 11, 2013, 05:42:59 PM
 #3

Thank you DigitalHermit, thought I would ask in here once I discovered a problem.
Hopefully it can be resolved quickly.
DigitalHermit
Full Member
***
Offline Offline

Activity: 150


Thank you! Thank you! ...


View Profile

Ignore
August 11, 2013, 06:18:31 PM
 #4

Code:
def script_GetOp(bytes):
  i = 0
  while i < len(bytes):
    vch = None
    opcode = ord(bytes[i])
    i += 1
    if opcode >= opcodes.OP_SINGLEBYTE_END:
      opcode <<= 8
      opcode |= ord(bytes[i])

Apparently there is an issue in script_GetOp(bytes) (deserialize.py) for this particular block that makes the electrum server code read off the end of the byte array when trying to read the operation. I don't know if this is an issue with the format of this specific block or with the python code. If it's an issue with the block format I'm surprised it has gone undetected this long - apparently bitcoind code permitted/accepted this block.
cryptocyprus
Sr. Member
****
Offline Offline

Activity: 308


View Profile WWW

Ignore
August 11, 2013, 06:32:36 PM
 #5

I am just surprised I hadn't read more people in the same situation.
Tuxavant
Hero Member
*****
Offline Offline

Activity: 756


Bitcoin Mayor of Las Vegas


View Profile WWW

Ignore
August 11, 2013, 07:08:56 PM
 #6

Checking in as this was starting to effect me and was wondering what's going on. Thanks OP.

Generation Bitcoin | G+ | FB | Bitcoins In Vegas | CoinBus.com | TOR Exit Operator 1MVTPATVCKBMfALRHJsXpHfKJu7GyL7nAc
CryptCard
Full Member
***
Offline Offline

Activity: 124



View Profile

Ignore
August 11, 2013, 07:35:48 PM
 #7

Is it possible to use the bitcoins at this moment? How long do you think does it take until this issues are fixxed?
cp1
Hero Member
*****
Offline Offline

Activity: 588


Stop using branwallets


View Profile

Ignore
August 11, 2013, 07:40:32 PM
 #8

Export your private key to another wallet client.

Guide to armory offline install on USB key:  https://bitcointalk.org/index.php?topic=241730.0
kangasbros
Hero Member
*****
Offline Offline

Activity: 809


View Profile

Ignore
August 11, 2013, 07:41:20 PM
 #9

Are their some servers already which have fixxed the problem? A lot of bitcoins are now on bitcoin addresses on which I have no access!
I need the bitcoins AT THIS MOMENT.

I guess with some code wizardy you can export the private keys to bitcoind or multibit.

CryptCard
Full Member
***
Offline Offline

Activity: 124



View Profile

Ignore
August 11, 2013, 07:43:17 PM
 #10

I didn't know that electrum is that awesome! Smiley

It takes some hours until I finished the download of the blockchain.
EagleTM
Jr. Member
*
Offline Offline

Activity: 46


View Profile

Ignore
August 11, 2013, 07:44:02 PM
 #11

Looks like we got caught off-guard on a Sunday. Rest assured we're working on getting this fixed asap. The coins are safe. Just seeing new tx and spending coins is not possible at this time.

To Server operators:

The dumps at http://electrum-foundry.no-ip.org/leveldb-dump/?C=M;O=D  generated this morning around midnight have a clean, uncorrupted database to use once we have a fix to get past offending block 251526.
See also http://electrum-foundry.no-ip.org/
DigitalHermit
Full Member
***
Offline Offline

Activity: 150


Thank you! Thank you! ...


View Profile

Ignore
August 11, 2013, 08:07:15 PM
 #12

I didn't know that electrum is that awesome! Smiley

It takes some hours until I finished the download of the blockchain.

You can create a wallet at blockchain.info and import the private keys from your electrum wallet if you need access to your funds immediately. Otherwise, sadly yes you will have to wait for a fix.
EagleTM
Jr. Member
*
Offline Offline

Activity: 46


View Profile

Ignore
August 11, 2013, 10:01:25 PM
 #13

Servers electrum.be and electrum.no-ip.org are fixed and up to date.

Thanks to DigitalHermit for the fix, which is pushed to electrum-server on github (https://github.com/spesmilo/electrum-server/). We're urging all server operators to apply the fix. If you want to make sure your server database has a correct block 251526 indexed please re-index from a backup (i.e. from the foundry linked above). We're still researching how unpatched servers handled 251526...
EagleTM
Jr. Member
*
Offline Offline

Activity: 46


View Profile

Ignore
August 11, 2013, 10:29:57 PM
 #14

I did some simple tests with tx from block 251526 and they are indexed just fine on a crashed server after the fix is applied. Unless the server throws "LevelDBError: Corruption" on startup as has been reported but might be unrelated it's sufficient to stop the server, pull git head and start the server.
stepkrav
Full Member
***
Offline Offline

Activity: 188



View Profile

Ignore
August 12, 2013, 12:19:18 AM
 #15

electrum.stepkrav.pw up n running.  Smiley
Jaxkr
Full Member
***
Offline Offline

Activity: 196



View Profile

Ignore
August 12, 2013, 03:53:10 AM
 #16

electrum.stepkrav.pw up n running.  Smiley
Thanks. Switched there, and everything's working! Smiley

yxt
Legendary
*
Offline Offline

Activity: 1358



View Profile WWW

Ignore
August 12, 2013, 09:19:05 AM
 #17

Thanks for the fast solution  Smiley

gmaxwell
Staff
Legendary
*
Offline Offline

Activity: 1442


View Profile

Ignore
August 12, 2013, 10:50:06 AM
 #18

Transaction ID: 77822fd6663c665104119cb7635352756dfc50da76a92d417ec1a12c518fad69 contains the patch for the second bug:

Code:
From a3a61fef43309b9fb23225df7910b03afc5465b9 Mon Sep 17 00:00:00 2001
From: Satoshi Nakamoto <satoshin@gmx.com>
Date: Mon, 12 Aug 2013 02:28:02 -0200
Subject: [PATCH] Remove (SINGLE|DOUBLE)BYTE

I removed this from Bitcoin in f1e1fb4bdef878c8fc1564fa418d44e7541a7e83
in Sept 7 2010, almost three years ago. Be warned that I have not
actually tested this patch.
---
 backends/bitcoind/deserialize.py |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/backends/bitcoind/deserialize.py b/backends/bitcoind/deserialize.py
index 6620583..89b9b1b 100644
--- a/backends/bitcoind/deserialize.py
+++ b/backends/bitcoind/deserialize.py
@@ -280,10 +280,8 @@ opcodes = Enumeration("Opcodes", [
     "OP_WITHIN", "OP_RIPEMD160", "OP_SHA1", "OP_SHA256", "OP_HASH160",
     "OP_HASH256", "OP_CODESEPARATOR", "OP_CHECKSIG", "OP_CHECKSIGVERIFY", "OP_CHECKMULTISIG",
     "OP_CHECKMULTISIGVERIFY",
-    ("OP_SINGLEBYTE_END", 0xF0),
-    ("OP_DOUBLEBYTE_BEGIN", 0xF000),
     "OP_PUBKEY", "OP_PUBKEYHASH",
-    ("OP_INVALIDOPCODE", 0xFFFF),
+    ("OP_INVALIDOPCODE", 0xFF),
 ])
 
 
@@ -293,10 +291,6 @@ def script_GetOp(bytes):
         vch = None
         opcode = ord(bytes[i])
         i += 1
-        if opcode >= opcodes.OP_SINGLEBYTE_END and i < len(bytes):
-            opcode <<= 8
-            opcode |= ord(bytes[i])
-            i += 1
 
         if opcode <= opcodes.OP_PUSHDATA4:
             nSize = opcode
--
1.7.9.4

I guess this was code monkey-copied from abe?  I suppose someone should go fix that too.
Aleksei Richards
Jr. Member
*
Offline Offline

Activity: 38



View Profile

Ignore
August 12, 2013, 01:16:27 PM
 #19

You can also use your electrum passphrase at carbon wallet. http://carbonwallet.com/

ThomasV
Legendary
*
Offline Offline

Activity: 1358



View Profile WWW

Ignore
August 12, 2013, 04:36:42 PM
 #20

Servers electrum.be and electrum.no-ip.org are fixed and up to date.

Thanks to DigitalHermit for the fix, which is pushed to electrum-server on github (https://github.com/spesmilo/electrum-server/). We're urging all server operators to apply the fix. If you want to make sure your server database has a correct block 251526 indexed please re-index from a backup (i.e. from the foundry linked above). We're still researching how unpatched servers handled 251526...

thank you guys for the quick fix!

Electrum: the convenience of a web wallet, without the risks
Pages: [1] 2 »  All
  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!