Bitcoin Forum
June 01, 2024, 11:33:38 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 ... 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 [451] 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 ... 570 »
9001  Bitcoin / Pools / Re: [2000 GH/s] EMC: No Fee/PPS/DGM/Dwolla Payout/SMS/Yubikey/GBT/Vardiff on: November 06, 2012, 01:50:17 AM
Just released the first version of cgminer to natively support GBT, version 2.9.0.

However, the block change performance of EMC on GBT is lacklustre:
https://bitcointalk.org/index.php?topic=108854.msg1317574#msg1317574
9002  Bitcoin / Mining software (miners) / Re: Cgminer compiling on windows - fail on: November 06, 2012, 01:48:26 AM
Ok, latest git 2.9.0 is compiling again Smiley
Smiley
9003  Bitcoin / Mining software (miners) / Re: CGMINER GPU FPGA overc monit fanspd RPC stratum linux/windows/osx/mip/r-pi 2.8.7 on: November 06, 2012, 01:22:47 AM
New version -> 2.9.1

Main thing in this new point release is support for the pooled GBT mining protocol. This is once again a large chunk of new code and carries with it the attendant risks of new instability so I'm leaving 2.8.7 up for download. The GBT implementation is my own from scratch, not using an existing implementation. luke-jr helped debug a few things to do with how the protocol worked since no one else seems to understand it.

Note that I have serious reservations about recommending GBT as significantly advantageous for the miner (in terms of performance) unlike stratum. See my post here as to why:
https://bitcointalk.org/index.php?topic=108854.msg1317574#msg1317574



Human readable changelog

Support for GBT mining protocol.
Minor stratum tweaks, bugfixes and improvements.


Full changelog

Version 2.9.1 - November 6, 2012

- Reset work flags to prevent GBT shares from being submitted as stratum ones
after switching.


Version 2.9.0 - November 6, 2012

- Add endian swap defines for where missing.
- Only retarget stratum shares to new pool diff if diff has dropped.
- Remove resetting of probed variable when detecting GBT.
- Count lost stratum share submits and increase message priority to warning.
- Only retrieve a new block template for GBT pools that are the current pool.
- Show which pool untracked share messages have come from.
- Add management for dead GBT pools.
- Count lost shares with stratum as submit stale lost.
- Discard record of stratum shares sent and report lost shares on disconnection
since they will never be reported back.
- Swab, don't just swap the bytes in the GBT target.
- Change status window message for GBT connected pools versus LP.
- Generate a gbt work item from longpoll when required to set new block and
message appropriately.
- Use existing pool submit_old bool from gbt data.
- Retrieve a new block template if more than 30 seconds has elapsed since the
last one to keep the data current and test the pool is still alive.
- Update GBT longpollid every time we request a new longpoll.
- Manage appropriate response codes for share submission with GBT.
- Allow the longpoll thread to start with GBT and only set the longpollid once.
- Correct last few components of GBT block generation courtesy of Luke-jr.
- Use correct length for offsetting extra nonce and remaining data.
- Flip all 80 bytes in the flip function which was wrongly named flip256 for its
purpose.
- Calculate midstate for gbt work and remove now unused variable.
- Use a standard function for flipping bytes.
- Insert the extra nonce and remaining data in the correct position in the
coinbase.
- Remove txn size debugging and enlarge gbt block string to prevent overflow.
- Remove varint display debugging.
- Build varint correctly for share submission and sleep 5 seconds before
retrying submit.
- Make gbt_coinbase large enough for submissions, swap bytes correctly to make a
header from GBT and encode the number of transactions in share submission.
- Store the fixed size entries as static variables in GBT in binary form,
byteswapping as is required.
- 32 bit hex encoded variables should be in LE with GBT.
- Target and prevblockhash need to be reversed from GBT variables.
- Construct block for submission when using GBT.
- Use same string for debug as for submission and make string larger to cope
with future GBT messages.
- Skip trying to decipher LP url if we have GBT support.
- Store all the transaction hashes in pool->txn_hashes instead of separating
txn0 and correct generation of merkle root, fixing memory overwrites.
- Hook into various places to generate GBT work where appropriate.
- Create extra work fields when generating GBT work.
- Generate header from correct hashing generation of the merkle root for GBT.
- Generate the merkle root for gbt work generation.
- Create a store of the transactions with GBT in the minimum size form required
to generate work items with a varied coinbase.
- Create a function that generates a GBT coinbase from the existing pool
variables.
- Extract and store the various variables GBT uses when decoding gbt work.
- Check for invalid json result in work_decode.
- Decode work in separate functions for getwork vs gbt.
- Check for the coinbase/append mutable in GBT support to decide whether to use
it or not.
- Add a gbt mutex within the pool struct for protecting the gbt values.
- Convert work decode function to prepare for decoding block templates.
- Check for GBT support on first probing the pool and convert to using the GBT
request as the rpc request for that pool.
- Make the rpc request used with getwork a pool variable to allow it to be
converted to/from gbt requests.
- Changes to build prototypes to support building on FreeBSD 9.1-RC2 amd64
- Free old stratum_work data before replacing it
- There is no need for addrinfo any more.
- server and client sockaddr_in are no longer used in struct pool.
- Merge pull request #322 from luke-jr/bugfix_stratum_tmpwork
- Set sshare id and swork_id within the sshare mutex to avoid multiple share
submits with the same id.
- Initialize temporary stratum work
9004  Bitcoin / Mining software (miners) / Re: CGMINER GPU FPGA overc monit fanspd RPC stratum linux/windows/osx/mip/r-pi 2.8.7 on: November 06, 2012, 12:35:14 AM
There are other complexities related to this when share difficulty is changed by the pool (that I think is bad in Stratum) but the basics are as I said above.

I'm thinking about the solution and I think that I found it. When the protocol change from current "drop all shares above the target since receiving this new difficulty" to "drop all shares abouve the target for all new jobs", will it solve our problem?

a) When pool want to force user to new difficulty, it will send set_difficutly and job with clean_jobs=True like now
b) When pool want to update difficulty lazily, he will just send set_difficulty, no new job is required. In would be the most common scenario and there's also no way how to "lose" shares.

It just need some minor change in cgminer. It will basically bound difficulty with the job as you wanted and leave the difficulty as separate message as I wanted. So it looks like win-win solution.

ckolivas, Eleuthria - hm?
Hmm... To work with the current stratum limitation, cgminer checks shares against the current stratum pool difficulty before trying to submit them. I can remove this code and then difficulty is tied to the work at the time it was generated up to how the pool does things entirely. I'm thinking I will check difficulty against the new difficulty only if difficulty has dropped and then leave it up to the pool to cope. While this may introduce more rejects with diff increases, at least there is no chance of work lost, and will work with your idea.

Tying difficulty with work entirely would still be much better.
9005  Bitcoin / Pools / Re: [3700 Gh/s] DeepBit.net PPS+Prop,instant payouts, we pay for INVALID BLOCKS too on: November 05, 2012, 10:40:40 PM
Hopefully this post should help you decide which protocol to choose:
https://bitcointalk.org/index.php?topic=108854.msg1317574#msg1317574
Well, I said "small chance", probability is pretty low.

BTW, isn't this post more about current implementations, not the protocols itself ?

Only partially because one uses push over an open persistent socket while the other is a delayed http response a la current longpoll. There is also the matter of the massive difference in the size of the data sent out which is always much bigger with gbt and transmitting a full transaction list unless the protocol gets extended in the future.
9006  Bitcoin / Pools / Re: [3700 Gh/s] DeepBit.net PPS+Prop,instant payouts, we pay for INVALID BLOCKS too on: November 05, 2012, 09:59:38 PM
Stratum?
Quite possibly.
There are also small chances of implementing "getblocktemplate".
Hopefully this post should help you decide which protocol to choose:
https://bitcointalk.org/index.php?topic=108854.msg1317574#msg1317574
9007  Bitcoin / Pools / Re: [ANN] Stratum mining protocol - ASIC ready on: November 05, 2012, 11:41:42 AM
Almost implemented the first working version of GBT within cgminer.

This sort of behaviour tells the story well though:

Code:
 [2012-11-05 22:28:08] Accepted 23c0ba9a Diff 7/1 GPU 2 pool 2
 [2012-11-05 22:28:08] Accepted 163ec800 Diff 11/1 GPU 0 pool 2
 [2012-11-05 22:28:13] Stratum from pool 3 detected new block
 [2012-11-05 22:28:13] Accepted 61bdf4a7 Diff 2/1 GPU 3 pool 2
 [2012-11-05 22:28:13] Stale share detected, submitting as user requested
 [2012-11-05 22:28:14] Accepted 00feebca Diff 257/1 GPU 1 pool 2
 [2012-11-05 22:28:19] Rejected 70b76eb2 Diff 2/1 GPU 1 pool 2 (stale-prevblk)
 [2012-11-05 22:28:19] Rejected 47b723ef Diff 3/1 GPU 3 pool 2 (stale-prevblk)
 [2012-11-05 22:28:20] Rejected 9644eef7 Diff 1/1 GPU 2 pool 2 (stale-prevblk)
 [2012-11-05 22:28:21] Rejected 4cafa99d Diff 3/1 GPU 1 pool 2 (stale-prevblk)
 [2012-11-05 22:28:22] Rejected 093dc4cd Diff 27/1 GPU 0 pool 2 (stale-prevblk)
 [2012-11-05 22:28:23] GBT LONGPOLL from pool 2 requested work restart
 [2012-11-05 22:28:24] Accepted 375a5178 Diff 4/1 GPU 1 pool 2
 [2012-11-05 22:28:25] Accepted 047206f4 Diff 57/1 GPU 3 pool 2
 [2012-11-05 22:28:25] GBT LONGPOLL from pool 2 requested work restart
 [2012-11-05 22:28:30] Accepted 72bee5f8 Diff 2/1 GPU 0 pool 2
 [2012-11-05 22:28:31] Accepted 8e63856d Diff 1/1 GPU 2 pool 2

Now pool 3 here is slush on stratum (ping time 335ms), while pool 2 is EMC on GBT (ping time 225ms).

Note how stratum picks up the block change and notifies me 10 seconds before GBT does. However, this is not the GBT pool simply learning of the block change later, because it starts rejecting my shares as being from the previous block before I even got the longpoll from the GBT pool. Then of course there's a second longpoll with the transactions, which is not an unusual practice.
9008  Bitcoin / Mining software (miners) / Re: Decentralized mining protocol standard: getblocktemplate (ASIC ready!) on: November 05, 2012, 11:36:18 AM
Almost implemented the first working version of GBT within cgminer.

This sort of behaviour tells the story well though:

Code:
 [2012-11-05 22:28:08] Accepted 23c0ba9a Diff 7/1 GPU 2 pool 2
 [2012-11-05 22:28:08] Accepted 163ec800 Diff 11/1 GPU 0 pool 2
 [2012-11-05 22:28:13] Stratum from pool 3 detected new block
 [2012-11-05 22:28:13] Accepted 61bdf4a7 Diff 2/1 GPU 3 pool 2
 [2012-11-05 22:28:13] Stale share detected, submitting as user requested
 [2012-11-05 22:28:14] Accepted 00feebca Diff 257/1 GPU 1 pool 2
 [2012-11-05 22:28:19] Rejected 70b76eb2 Diff 2/1 GPU 1 pool 2 (stale-prevblk)
 [2012-11-05 22:28:19] Rejected 47b723ef Diff 3/1 GPU 3 pool 2 (stale-prevblk)
 [2012-11-05 22:28:20] Rejected 9644eef7 Diff 1/1 GPU 2 pool 2 (stale-prevblk)
 [2012-11-05 22:28:21] Rejected 4cafa99d Diff 3/1 GPU 1 pool 2 (stale-prevblk)
 [2012-11-05 22:28:22] Rejected 093dc4cd Diff 27/1 GPU 0 pool 2 (stale-prevblk)
 [2012-11-05 22:28:23] GBT LONGPOLL from pool 2 requested work restart
 [2012-11-05 22:28:24] Accepted 375a5178 Diff 4/1 GPU 1 pool 2
 [2012-11-05 22:28:25] Accepted 047206f4 Diff 57/1 GPU 3 pool 2
 [2012-11-05 22:28:25] GBT LONGPOLL from pool 2 requested work restart
 [2012-11-05 22:28:30] Accepted 72bee5f8 Diff 2/1 GPU 0 pool 2
 [2012-11-05 22:28:31] Accepted 8e63856d Diff 1/1 GPU 2 pool 2

Now pool 3 here is slush on stratum (ping time 335ms), while pool 2 is EMC on GBT (ping time 225ms).

Note how stratum picks up the block change and notifies me 10 seconds before GBT does. However, this is not the GBT pool simply learning of the block change later, because it starts rejecting my shares as being from the previous block before I even got the longpoll from the GBT pool. Then of course there's a second longpoll with the transactions, which is not an unusual practice.

9009  Bitcoin / Mining software (miners) / Re: CGMINER GPU FPGA overc monit fanspd RPC stratum linux/windows/osx/mip/r-pi 2.8.7 on: November 05, 2012, 10:58:08 AM
I've been thinking why not hard code the --fix-protocol into 2.8.6+ since it seems to do the job very well. (and add a --no-fix-protocol option instead?)
Because Stratum will hopefully be the default mining protocol soon. Better to get the bugs out of the way now.
Right.

This answer doesn't make sense; in fact, counter intuitive.  Are you saying if every BTC pool switched to stratum, that NOBODY would need to use the --fix-protocol parameter anymore? Just curious.
So long as everything is working, yes. Long term the need for that option should even be removed, but it's still early days.
9010  Other / Off-topic / Re: BFL Requests Input on: November 04, 2012, 02:34:55 PM
Especially since you'll be shipping product in about 4 weeks.
Correction: 4-6 weeks.
9011  Bitcoin / Pools / Re: [400GH/s] p2pool: Decentralized, DoS-resistant, Hop-Proof pool on: November 03, 2012, 12:15:54 PM
The minirigs can work with small amounts of work updating fast enough for p2pool's requirements. With cgminer you can enable the feature --bfl-range which splits work up into smaller amounts making stales manageable, but reduces hashrate by 1%.
9012  Bitcoin / Mining software (miners) / Re: Decentralized mining protocol standard: getblocktemplate (ASIC ready!) on: November 02, 2012, 11:57:33 AM

I apologize, I missed that in all the noise.

I support your idea. Not sure if "suggested merkle root" is a typo. I'd suggest that on the wire this is a merkle branch that when combined with your generated coinbase tx gives you the merkle root for the block. You request work once, then send several times block header + coinbase. The server will know which txes / merkle tree this belongs to by looking at your work ID.

I believe you are right that the majority will not care to see or change the transactions, so it is a good optimization for the common case. Also, until pools support changing the transactions, it will be a good optimization in every case.


Thank you very much. Yes it was the concept rather than the details, and branch is a better term. I'm thinking the mining software can support both modes and be started in confirm transaction mode only if desired by the user.

EDIT: or alternatively, randomly inject requests for full transactions.
9013  Bitcoin / Mining software (miners) / Re: Decentralized mining protocol standard: getblocktemplate (ASIC ready!) on: November 02, 2012, 10:34:10 AM
ckolivas said "this is a technical discussion about the disadvantages of GBT". Unless the point is to destroy GBT I think a better way to view it is that this is a technical discussion about what GBT is today and how we can make it better tomorrow.

For the problem of using much of the bandwidth on transactions when some miners don't even care about seeing them:

I guess this could be improved by having the client include something in its capabilities list to tell the server it wishes to mine "blindly" without knowing about transactions. If both client and server has this capability then the server sends a merkle branch instead of a list of transactions.

I'm not sure its entirely clean that if the user wishes to see transactions the client would leave out this capability. It makes the capabilities more like options than an actual list of capabilities, but perhaps that's alright.

What do you think, Luke-Jr and others? It could get bandwidth usage down for users who don't care to see the transactions.
My goodness! Go back 3+ pages on this forum thread and you'll see that's what I was discussing with jgarzik. Yes I was trying to be productive and help find some useful pool mining mode for GBT. All it needs is a request in the protocol for branches.

...this may explain why I was so annoyed yesterday.

EDIT: https://bitcointalk.org/index.php?topic=108854.msg1286483#msg1286483
9014  Bitcoin / Pools / Re: [700 GH] Ozcoin Pooled Mining | DGM | PPS |Stratum testing underway on: November 02, 2012, 06:31:49 AM
CGMiner 2.8.7. I replaced "http://us.ozco.in:8331" with "stratum+tcp://us.ozco.in:3333" and it doesn't seem to be working. CGMiner is sluggish, and after ~45 minutes my Single was averaging ~400MH/s, but had a U: of ~2/min. Am I doing something wrong?
It's probably because of all of the server restarts over the past couple hours. It seems cgminer doesn't recover very well when a Stratum server goes down; it never fails over to the backup so it just sits waiting for ~3 minutes for the server to come back up.
It does fail over except under one circumstance: If the pool is still connected to cgminer, and is still sending cgminer work, but the pool is not successfully receiving shares. I will be addressing that soon. Any other situation, it does take longer to failover if the connection is not dropped cleanly as there is not always a reliable way of knowing the other end has stopped sending, but cgminer uses 90 seconds of silence from the server to assume that it has stopped responding since stratum mandates messages at least every 60 seconds. Try sticking it into debug mode from the display menu to see if it's still receiving messages. Without a backup however, all cgminer can do is regularly try and keep contact with the primary.
9015  Bitcoin / Pools / Re: [ANN] Stratum mining protocol - ASIC ready on: November 01, 2012, 11:32:56 PM
Just added that to my pools list and it totally messed up cgminer - Ozcoin is the only pool I use to have stratum.
I suspect it's my own doing, as I have a homebrew version of cgminer that I use.
Very strange failure though.
Added the pool through the API, then the API went off line for 30 seconds. thought cgminer crashed, but it came back.
Then the pool mined 457 shares and stopped
The 5s rolling average dropped to one BFL of the 6, but 6/6 devices were still reported. Hash rate on some BFLs dropped to 0, others were some fraction of one BFL.
I saved the config file through the API, then reset cgminer.
The first 2 BFLs where then reported sick, with garbled messages being returned in the comms (reporting 'USY').
The other BFLS were showing low, or no hash rates.
The pool I added was missing the 'stratum+tcp://' part when displayed through the API (when I added it via API the whole string was there).
Stopped cgminer, manually removed the pool from the conf. file, and restarted. Everything back to normal now.

I'm guessing there's some sort of buffer over-run going on somewhere.
Yeah it seems at the time ozcoin kept the connection open but its own buffer was full and was not accepting anything the miner was trying to send, delaying submission. There currently is a very long timeout for submission of data in cgminer and it probably queued up heaps of shares it was trying to submit in that time and overflowed. I will address that in the future. Even if the connection is open, cgminer will have to assume a pool is as good as dead if it's failing to accept data for some arbitrary period.
9016  Bitcoin / Mining software (miners) / Re: Decentralized mining protocol standard: getblocktemplate (ASIC ready!) on: November 01, 2012, 10:10:09 PM
When Luke was working on GBT and we were working on implementing a working vardiff, I had some concerns from a security standpoint.  The Stratum get_transactions also raises some red flags for me, can you address security/throttling measures in place to prevent get_transactions being used a DoS method to overload a pool?  Anything that leaves arbitrary data requests up to the client is an avenue for exploit and it is one of the reasons I have been so adamantly against user defined difficulties.  If I want to DoS your pool, I crank up a couple of 1.5 TH minirig, set my difficulty to 1 and ask for getworks.  

Same kind of problem with get_transactions:  I'm pissed at you, so I just request all the get_transactions you'll send me over and over and over.



Surely you could keep requesting get_works with a script, why would you need any hashing behind it?

As with the get_transactions, surely you'd just place a limit on requests poolside, and ignore those that seem unreasonable?
Since the point of get_transactions is simply to confirm the merkle branches, you only need to allow it once per stratum template push. All the stratum pools so far only push a new template every 30 seconds. Limiting get transaction requests to 1 for each template would only allow the miner to ask for it once every 30 seconds.

By the same token, GBT pools should limit how often users can ask for a template since that does send out all the transactions.
9017  Bitcoin / Mining software (miners) / Re: Decentralized mining protocol standard: getblocktemplate (ASIC ready!) on: November 01, 2012, 09:01:25 PM
Must I quote myself?
If every template request was this size and the miner used the customise coinbase option and chose transactions, they would be receiving 400kb for the block template and each share submitted would be 400kb unless they started withholding transactions.
That IS correct.

I was exploring the possible issues with implementation of GBT and got attacked as though I was trying to spread FUD about GBt. Nowhere did I imply this is what all miners would be doing.
9018  Bitcoin / Pools / Re: [700 GH] Ozcoin Pooled Mining | DGM | PPS |AU mining Temporary Fee Reduction on: November 01, 2012, 12:43:14 PM
Great stuff, don't forget to put a redirect in your regular getwork servers' headers.

HTTP hdr(x-stratum): stratum+tcp://us.ozco.in:3333
9019  Bitcoin / Mining software (miners) / Re: Decentralized mining protocol standard: getblocktemplate (ASIC ready!) on: November 01, 2012, 07:10:42 AM
And if you blame me for not paying attention at the right time earlier on when this protocol was developed well I'm terribly sorry for not keeping track of every goddamn fucking thing going on in the bitcoin world.

I will implement whatever the fuck this protocol ends up being one way or another.

Sorry for offering suggestions, I will now say no more on this.
9020  Bitcoin / Mining software (miners) / Re: Decentralized mining protocol standard: getblocktemplate (ASIC ready!) on: November 01, 2012, 07:08:04 AM
As usual many of the arguments are just not true, or misunderstood. "You have to send in all the transactions with every share. Think of all those bytes!" No, you don't.
Please read my quote. I did NOT say that.
Pages: « 1 ... 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 [451] 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 ... 570 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!