Bitcoin Forum
May 02, 2024, 05:00:57 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Extremely high bitcoind getblocktemplate latency  (Read 3538 times)
lenny_ (OP)
Legendary
*
Offline Offline

Activity: 1036
Merit: 1000


DARKNETMARKETS.COM


View Profile WWW
May 17, 2013, 01:08:45 AM
 #1

Hi guys,
I have priority issue with bitcoind latency and p2pool running with it. p2pool link: lenny.dnsd.me:9332

I have dedicated hardware for running bitcoind 24/7 node and p2pool with it. That's small server based on AMD APU A10 + SSD, was working nicely for months, till yesterday.

My bitcoind node is literally flooded by hoax transactions, like this:
https://blockchain.info/tx/7227c9d392166fdcd917f39da2def36bcf69b437d90e349d73a48952c0fbdd69
https://blockchain.info/tx/292d1d7ff7ece8eb67b4bf3c2f523736679c616fce8216bf37ac23edec6e0e03

1 single transaction, nice miner fee included (1.46 USD actually), but it have over two thousands outputs and 100 KB in size! It's like a fishhook, whoever will take it, will loose seconds of latency.

Bitcoind latency is at ~ 4s right now, for months it was at 0.3s. About 18 hours ago my latency went extremely high up to 7s and till then, network is under attack of these hoax transactions. Exactly same problem has been reported by my collegues at forum.bitcoin.pl. They showed be their stats and same latency issues (bitcoind latency at 3s or worse, like in my case).
Latency that high makes mining on my local p2pool node unprofitable.

My bitcoin.conf:
Code:
(...)
maxconnections=30
blockmaxsize=500000
mintxfee=0.00005

How to filter these transactions?  Shocked

DARKNET MARKETS >> https://DARKNETMARKETS.COM
1714669257
Hero Member
*
Offline Offline

Posts: 1714669257

View Profile Personal Message (Offline)

Ignore
1714669257
Reply with quote  #2

1714669257
Report to moderator
Activity + Trust + Earned Merit == The Most Recognized Users on Bitcointalk
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714669257
Hero Member
*
Offline Offline

Posts: 1714669257

View Profile Personal Message (Offline)

Ignore
1714669257
Reply with quote  #2

1714669257
Report to moderator
1714669257
Hero Member
*
Offline Offline

Posts: 1714669257

View Profile Personal Message (Offline)

Ignore
1714669257
Reply with quote  #2

1714669257
Report to moderator
1714669257
Hero Member
*
Offline Offline

Posts: 1714669257

View Profile Personal Message (Offline)

Ignore
1714669257
Reply with quote  #2

1714669257
Report to moderator
zvs
Legendary
*
Offline Offline

Activity: 1680
Merit: 1000


https://web.archive.org/web/*/nogleg.com


View Profile WWW
May 17, 2013, 02:59:09 AM
 #2

Hi guys,
I have priority issue with bitcoind latency and p2pool running with it. p2pool link: lenny.dnsd.me:9332

I have dedicated hardware for running bitcoind 24/7 node and p2pool with it. That's small server based on AMD APU A10 + SSD, was working nicely for months, till yesterday.

My bitcoind node is literally flooded by hoax transactions, like this:
https://blockchain.info/tx/7227c9d392166fdcd917f39da2def36bcf69b437d90e349d73a48952c0fbdd69
https://blockchain.info/tx/292d1d7ff7ece8eb67b4bf3c2f523736679c616fce8216bf37ac23edec6e0e03

1 single transaction, nice miner fee included (1.46 USD actually), but it have over two thousands outputs and 100 KB in size! It's like a fishhook, whoever will take it, will loose seconds of latency.

Bitcoind latency is at ~ 4s right now, for months it was at 0.3s. About 18 hours ago my latency went extremely high up to 7s and till then, network is under attack of these hoax transactions. Exactly same problem has been reported by my collegues at forum.bitcoin.pl. They showed be their stats and same latency issues (bitcoind latency at 3s or worse, like in my case).
Latency that high makes mining on my local p2pool node unprofitable.

My bitcoin.conf:
Code:
(...)
maxconnections=30
blockmaxsize=500000
mintxfee=0.00005

How to filter these transactions?  Shocked

blockmaxsize 500kb would limit transaction max size to 50kb, wouldnt it?  so those transactions wouldnt even be included in your block?

nm, it'd limit it to 100kb.

so those 100kb transactions i see would be included

you could lower your maxblocksize to something lower =p
Syke
Legendary
*
Offline Offline

Activity: 3878
Merit: 1193


View Profile
May 17, 2013, 05:42:23 AM
 #3

Wow, that is one very bad transaction.

Buy & Hold
Syke
Legendary
*
Offline Offline

Activity: 3878
Merit: 1193


View Profile
May 17, 2013, 04:32:48 PM
 #4

Code:
blockmaxsize=250000

I'm going to try this. I can't allow those monster transactions.

Buy & Hold
Mike Hearn
Legendary
*
expert
Offline Offline

Activity: 1526
Merit: 1129


View Profile
May 17, 2013, 05:02:50 PM
 #5

A quick hack would be to adjust this line:

static const unsigned int MAX_STANDARD_TX_SIZE = MAX_BLOCK_SIZE_GEN/5;

and increase the 5 to something bigger, like 15. This is less harmful than reducing the max block size.

However, the real fix is to profile bitcoind and find out where it's spending all its time. It shouldn't take multiple seconds to format a block, that implies poor algorithmic complexity in some part of CreateBlock (which wouldn't surprise me at all and someone probably already knows where the issues are). It'd be much better to find out what's going on there and just fix it.
wtogami
Sr. Member
****
Offline Offline

Activity: 263
Merit: 250



View Profile
May 17, 2013, 08:00:46 PM
 #6

Use bitcoin-0.8.2-rc1.  The dust protection will reject transactions like those you linked.

If you appreciate my work please consider making a small donation.
BTC:  1LkYiL3RaouKXTUhGcE84XLece31JjnLc3      LTC:  LYtrtYZsVSn5ymhPepcJMo4HnBeeXXVKW9
GPG: AEC1884398647C47413C1C3FB1179EB7347DC10D
Syke
Legendary
*
Offline Offline

Activity: 3878
Merit: 1193


View Profile
May 18, 2013, 05:53:16 AM
 #7

Use bitcoin-0.8.2-rc1.  The dust protection will reject transactions like those you linked.

8.2rc1 helps a little, but whatever transactions are still floating around are causing significant performance issues to gtblocktemplate.

Buy & Hold
furball
Full Member
***
Offline Offline

Activity: 172
Merit: 100



View Profile
May 18, 2013, 11:13:02 AM
 #8

Check out the p2pool thread (https://bitcointalk.org/index.php?topic=18313.0) for a great solution to this from user Prattler...worked for me.
Syke
Legendary
*
Offline Offline

Activity: 3878
Merit: 1193


View Profile
May 18, 2013, 10:43:33 PM
 #9

Check out the p2pool thread (https://bitcointalk.org/index.php?topic=18313.0) for a great solution to this from user Prattler...worked for me.

Yes, the settings suggested solved my performance issues.

Quote
blockmaxsize=250000 # default: 250000
blockprioritysize=27000 # default: 27000
mintxfee=0.0002 # default: 0.0001
minrelaytxfee=0.0002 # default: 0.0001

Buy & Hold
lenny_ (OP)
Legendary
*
Offline Offline

Activity: 1036
Merit: 1000


DARKNETMARKETS.COM


View Profile WWW
May 20, 2013, 05:26:59 AM
 #10

I compiled Bitcoin version v0.8.2rc1-2-gf7f9403-beta and changed settings in bitcoin.conf to these above. Will see how it goes.

DARKNET MARKETS >> https://DARKNETMARKETS.COM
Subo1977
Sr. Member
****
Offline Offline

Activity: 344
Merit: 250


Flixxo - Watch, Share, Earn!


View Profile
May 20, 2013, 09:35:56 AM
 #11

Check out the p2pool thread (https://bitcointalk.org/index.php?topic=18313.0) for a great solution to this from user Prattler...worked for me.

Yes, the settings suggested solved my performance issues.

Quote
blockmaxsize=250000 # default: 250000
blockprioritysize=27000 # default: 27000
mintxfee=0.0002 # default: 0.0001
minrelaytxfee=0.0002 # default: 0.0001

From 0.8.2 The fee values  must be in satoshi

X       ▄▄█████████▄▄
    ▄██▀▀         ▀▀██▄
  ▄██▀              ▀██▄
 ▄██     ██▄▄          ██▄
▄██      █████▄▄        ██▄
██       ████████▄▄      ██
██       ███████████▄    ██
██       ██████████▀     ██
▀██      ███████▀       ██▀
 ▀██     ████▀         ██▀
  ▀██▄   █▀          ▄██▀
    ▀██▄▄         ▄▄██▀
       ▀▀█████████▀▀
.flixxo    X▄████████████████████▄
██████████████████████
██████████████████████
████████████▀▀███████
█████▀████░░░░░░▄████
█████░░░░░░░░░░▄█████
█████▄░░░░░░░░░░██████
██████░░░░░░░░░███████
███████░░░░░░▄████████
████▄▄░░░░▄▄██████████
██████████████████████
██████████████████████
▀████████████████████▀
▄████████████████████▄
██████████████████████
█████████▀█▀██████████
██████▀▀▀▀▀████████
██████▄▄░░▄▄▄░░███████
████████░░███░░███████
████████░░░░░░▀███████
████████░░███▄░░██████
██████▀▀░░▀▀▀░░░██████
██████▄▄▄▄▄▄███████
█████████▄█▄██████████
██████████████████████
▀████████████████████▀
X[[]]X
Prattler
Full Member
***
Offline Offline

Activity: 192
Merit: 100


View Profile
May 20, 2013, 09:42:53 AM
 #12

Code:
blockmaxsize=250000 # default: 250000
blockprioritysize=27000 # default: 27000
mintxfee=0.0002 # default: 0.0001
minrelaytxfee=0.0002 # default: 0.0001
From 0.8.2 The fee values  must be in satoshi

You are incorrect. Money amounts need to be as floats in BTC.
Code:
    if (mapArgs.count("-minrelaytxfee"))
    {
        int64 n = 0;
        if (ParseMoney(mapArgs["-minrelaytxfee"], n) && n > 0)
            CTransaction::nMinRelayTxFee = n;
    }

ParseMoney parses strings, but only accepts float representations in BTC, like "0.0005". "50000" will get parsed as 50000 BTC.
See https://github.com/bitcoin/bitcoin/blob/master/src/util.cpp#L417. Will edit if someone corrects me.
lenny_ (OP)
Legendary
*
Offline Offline

Activity: 1036
Merit: 1000


DARKNETMARKETS.COM


View Profile WWW
May 27, 2013, 05:43:16 PM
 #13

Code:
Linux 3.2.0-4-amd64 x86_64 GNU/Linux
Description:    Debian GNU/Linux 7.0 (wheezy)
Current version: Bitcoin version v0.8.2rc3-2-g09e437b-beta

p2pool Bitcoind GetBlockTemplate Latency from last 24hours:
Code:
0.241s
I am using now default values in bitcoin.conf, no tweaking at all. Looks like new bitcoind version from git solved all issues Smiley

DARKNET MARKETS >> https://DARKNETMARKETS.COM
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1072
Merit: 1174


View Profile WWW
May 27, 2013, 10:40:43 PM
 #14

0.8.2rc2 and above have a patch that makes getblocktemplate significantly faster (I've seen a factor 10 in some cases).

I do Bitcoin stuff.
lenny_ (OP)
Legendary
*
Offline Offline

Activity: 1036
Merit: 1000


DARKNETMARKETS.COM


View Profile WWW
May 28, 2013, 12:10:32 PM
 #15

0.8.2rc2 and above have a patch that makes getblocktemplate significantly faster (I've seen a factor 10 in some cases).
That's true, like it was in my case. From couple of seconds it went down to 0.21s (24h avg), with default settings.

DARKNET MARKETS >> https://DARKNETMARKETS.COM
Pages: [1]
  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!