Bitcoin Forum
April 16, 2014, 10:13:08 AM *
News: ♦♦ A bug in OpenSSL, used by Bitcoin-Qt/Bitcoin Core, could allow your bitcoins to be stolen. Immediately updating Bitcoin Core to 0.9.1 is required in some cases, especially if you're using 0.9.0. Download. More info.
The same bug also affected the forum. Changing your forum password is recommended.
 
   Home   Help Search Donate Login Register  
Pages: 1 [2]  All
  Print  
Author Topic: Electrum 1.8.1 Stuck on Block 251526  (Read 5152 times)
dserrano5
Staff
Hero Member
*****
Offline Offline

Activity: 686



View Profile

Ignore
August 12, 2013, 04:56:31 PM
 #21

What's this?

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.

More specifically:

Code:
From: Satoshi Nakamoto <satoshin@gmx.com>
Date: Mon, 12 Aug 2013 02:28:02 -0200

It's been several hours since this was posted and I don't see the entire net screaming "Satoshi is alive!!!" all around, so I guess I must be the only one drawing the wrong conclusion from those two lines. Someone willing to state that obvious thing that I fail to see?

PGP :: OTC :: Localbitcoins :: bitcoind -addnode=bk5ejfe56xakvtkk.onion
I prefer to be sent PGP-encrypted PMs :: Prefiero recibir MPs cifrados con PGP.
1397643188
Hero Member
*
Offline Offline

Posts: 1397643188

View Profile Personal Message (Offline)

Ignore
1397643188
Reply with quote  #2

1397643188
Report to moderator
1397643188
Hero Member
*
Offline Offline

Posts: 1397643188

View Profile Personal Message (Offline)

Ignore
1397643188
Reply with quote  #2

1397643188
Report to moderator
1397643188
Hero Member
*
Offline Offline

Posts: 1397643188

View Profile Personal Message (Offline)

Ignore
1397643188
Reply with quote  #2

1397643188
Report to moderator
180GH/s ANTMINER S1 Classical mining rig by the trustworthy vendor BITMAIN
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1397643188
Hero Member
*
Offline Offline

Posts: 1397643188

View Profile Personal Message (Offline)

Ignore
1397643188
Reply with quote  #2

1397643188
Report to moderator
1397643188
Hero Member
*
Offline Offline

Posts: 1397643188

View Profile Personal Message (Offline)

Ignore
1397643188
Reply with quote  #2

1397643188
Report to moderator
tigereye
Member
**
Offline Offline

Activity: 64



View Profile

Ignore
August 12, 2013, 06:39:23 PM
 #22

I can write an email with "From: Satoshi Nakamoto <satoshin@gmx.com>" in the header too, and embed it in the blockchain.

What would you like your letter from Satoshi to say?

If my posts have helped, consider leaving a tip! 1AE5e56ivvaGMJJmLrZoLgiZXPx93CddyA
cryptasm
Sr. Member
****
Offline Offline

Activity: 266



View Profile

Ignore
August 12, 2013, 07:16:53 PM
 #23

Can't send anything from my electrum wallet, tried using electrum.be and electrum.no-ip.org, no joy. Keep seeing that error -22 message. Any ideas what I can do? thanks

EDIT: All sorted now  Grin

Mahn
Full Member
***
Offline Offline

Activity: 136


View Profile

Ignore
August 12, 2013, 08:11:38 PM
 #24

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.

So, is this him? Anyone can write something with a header saying from "From: Satoshi Nakamoto <satoshin@gmx.com>", but I can't picture someone searching through the entire commits history of bitcoin to find the relevant commit that matches what he's talking about (f1e1fb4bdef878c8fc1564fa418d44e7541a7e83, which does indeed exist and it is a commit by Satoshi). Satoshi, if you are reading this, add your digital signature next time, even if you are trying to be extra cautious it can't possibly do much harm.

kayrice
Member
**
Offline Offline

Activity: 91


View Profile

Ignore
August 12, 2013, 08:22:16 PM
 #25

I think he did include a git signature:

a3a61fef43309b9fb23225df7910b03afc5465b9
Peter Todd
Hero Member
*****
Offline Offline

Activity: 728

aka retep


View Profile

Ignore
August 12, 2013, 08:53:18 PM
 #26

So, is this him? Anyone can write something with a header saying from "From: Satoshi Nakamoto <satoshin@gmx.com>", but I can't picture someone searching through the entire commits history of bitcoin to find the relevant commit that matches what he's talking about (f1e1fb4bdef878c8fc1564fa418d44e7541a7e83, which does indeed exist and it is a commit by Satoshi)

Note that I mentioned double-byte opcodes a few weeks ago on the forums; there's lots of people who know about this stuff and could have made that transaction.

I should also point out that the transaction appears to not only include a patch to fix Electrum, but at the same time also triggers the bug it patches. I think what happens is that the OP_INVALIDOPCODE triggers the broken double-wide code to advance a byte, ORing that byte with OP_INVALIDOPCODE << 8. Unfortunately that character is a PUSHDATA, which means that Electrum now processes the data as though it were opcodes. The next byte is 0x4e, or OP_PUSHDATA4, followed by the length of the data to be pushed, 0xffffffff=2^32 bytes. Of course there aren't 4GiB of data in the script, so it fails and Electrum gets stuck.

I think the OP_IF/OP_ENDIF was meant so that the transaction could be spent, but whomever did so forgot that PUSHDATA's > 520 bytes make a transaction invalid. Thus unless we change that limit - a hard-fork - the 15mBTC will be unspendable forever. (invalid opcodes are legal in an un-executed IF/ELSE/ENDIF branch, but oversized pushdata's are not)

I rather doubt that Satoshi would have made that mistake.  Wink

I think he did include a git signature:

a3a61fef43309b9fb23225df7910b03afc5465b9

That's just a reference to the previous commit ID the patch is meant to apply too. If you save that patch to a file you can apply it with git am patch.diff, it was probably created with git format-patch from the looks of it.

EagleTM
Jr. Member
*
Offline Offline

Activity: 45


View Profile

Ignore
August 12, 2013, 09:48:45 PM
 #27

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

Thx for posting this!
How is "second bug" meant? How do you read the patch? It's still the same issue? I guess I'm missing something?

Quote
I guess this was code monkey-copied from abe?  I suppose someone should go fix that too.

abe was fairly quick:

commit 2b721e1df441396d04cea8b34ebe7b77488ddf52
Author: John Tobey <John.Tobey...mail>
Date:   Mon Aug 12 13:44:39 2013 -0400

    Merge bitcointools upstream changes and update callers.


If I read the timestamp right that's less than 2 hours after the fix got included in the blockchain. That's rather quick and the change fixes other things with it. Too quick, but maybe he got a PM around the time it was accepted in the mempool at Eligius Smiley?
dashingriddler
Sr. Member
****
Offline Offline

Activity: 322


Bringing Bitcoin awareness to public!


View Profile WWW

Ignore
August 13, 2013, 04:40:06 PM
 #28

My Abe got struck at 251526. Updating of Abe from github resolved the issue and the scanning went ahead Smiley

EagleTM
Jr. Member
*
Offline Offline

Activity: 45


View Profile

Ignore
August 13, 2013, 05:11:43 PM
 #29

There appears to be a bug (regression) with servers not connected to IRC and Electrum > 1.7 . The client only shows the one server you're connected to, which is a problem if this is a server still stuck on 251526. It should show a list of built in servers.

To resolve this you manually have to enter one of the servers like:

electrum.be SSL 50002
electrum.no-ip.org SSL 50002
electrum.pdmc.net SSL 50002

sovereignlife
Newbie
*
Offline Offline

Activity: 2


View Profile WWW

Ignore
August 14, 2013, 12:46:59 AM
 #30

That was a really helpful post as I experienced this problem today when attempting to send out some BTC. The strange thing was on my first attempt the funds actually arrived, but didn't show up on my transaction history - and other attempts to send failed, as per above comments. Changing the server fixed the problem - so thanks!

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...
ksteve96
Full Member
***
Offline Offline

Activity: 127


View Profile

Ignore
August 14, 2013, 05:54:39 PM
 #31

I was wondering what was going on.  I'm connected to electrum.be now, but still not seeing a sent transaction in the blockchain, even unconfirmed.  Transaction shows in the electrum client as pending since about an hour ago.   I'm at 252,151 blocks right now.
tnkflx
Sr. Member
****
Offline Offline

Activity: 329


View Profile

Ignore
August 15, 2013, 08:30:22 AM
 #32

I was wondering what was going on.  I'm connected to electrum.be now, but still not seeing a sent transaction in the blockchain, even unconfirmed.  Transaction shows in the electrum client as pending since about an hour ago.   I'm at 252,151 blocks right now.

Do you have the transactiond id?

| Operating electrum.be |
ksteve96
Full Member
***
Offline Offline

Activity: 127


View Profile

Ignore
August 15, 2013, 08:28:10 PM
 #33

I was wondering what was going on.  I'm connected to electrum.be now, but still not seeing a sent transaction in the blockchain, even unconfirmed.  Transaction shows in the electrum client as pending since about an hour ago.   I'm at 252,151 blocks right now.

Do you have the transactiond id?

I went to bed and when I looked again that one finally was OK.  But I just sent 1 BTC somewhere else 20 minutes ago and it's not showing up in the chain yet.  A few other transactions were pretty slow yesterday too, but I can't get a fix on if it was electrum or the sender, or both.

As for todays transaction, I'll PM you the ID. 


Well, as I was writing that, there were 2 confirmations  I opened and closed the client during that time.  Now I'm just wondering about the delays in general, previously, transactions would generally show up in the blockchain almost immediately, although unconfirmed.  Been slower since the stuck block it seems.  I'll keep monitoring it.
gominoa
Newbie
*
Offline Offline

Activity: 17


View Profile

Ignore
September 30, 2013, 09:32:25 PM
 #34

This appears to be happening again. I cant send. TX rejected code -22.
Tachikoma
Hero Member
*****
Offline Offline

Activity: 742



View Profile WWW

Ignore
October 01, 2013, 08:46:37 AM
 #35

Try a different server and make sure you included enough fees.

Electrum: the convenience of a web wallet, without the risks | Bytesized Seedboxes BTC/LTC supported | Kojn: LTC/BTC Payment processor for merchants
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!