DigitalHermit



Offline



Activity: 150

Merit: 100





Thank you! Thank you! ...







Full MemberActivity: 150Merit: 100Thank you! Thank you! ... Re: Electrum 1.8.1 Stuck on Block 251526 August 11, 2013, 05:18:34 PM #2 Quote from: cryptocyprus on August 11, 2013, 01:38:28 PM 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



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:

DigitalHermit



Offline



Activity: 150

Merit: 100





Thank you! Thank you! ...







Full MemberActivity: 150Merit: 100Thank you! Thank you! ... Re: Electrum 1.8.1 Stuck on Block 251526 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. 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.

EagleTM



Offline



Activity: 46

Merit: 0







NewbieActivity: 46Merit: 0 Re: Electrum 1.8.1 Stuck on Block 251526 August 11, 2013, 07:44:02 PM #11



To Server operators:



The dumps at

See also 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



Offline



Activity: 150

Merit: 100





Thank you! Thank you! ...







Full MemberActivity: 150Merit: 100Thank you! Thank you! ... Re: Electrum 1.8.1 Stuck on Block 251526 August 11, 2013, 08:07:15 PM #12 Quote from: CryptCard on August 11, 2013, 07:43:17 PM



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

I didn't know that electrum is that awesome!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. 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



Offline



Activity: 46

Merit: 0







NewbieActivity: 46Merit: 0 Re: Electrum 1.8.1 Stuck on Block 251526 August 11, 2013, 10:01:25 PM #13



Thanks to DigitalHermit for the fix, which is pushed to electrum-server on github ( 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



Offline



Activity: 46

Merit: 0







NewbieActivity: 46Merit: 0 Re: Electrum 1.8.1 Stuck on Block 251526 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.