How do I find out what getwork would have returned for an already mined block?

1

Since we have quite a few questions about mining I took the liberty of creating a tool that demonstrates how to get from the getwork to the actual hashes and testing them against the target.

Your question is simply the reverse direction of mining, so let's get started.

All parameters are taken from the actual block. This is a version 1 block so we start with the 01000000 (1 little endian). This is followed with the 32 byte prev_hash, again in little endian:

00000000000008a3a41b85b8b29ad444def299fee21793cd8b9e567eab02cd81

becomes

81cd02ab7e569e8bcd9317e2fe99f2de44d49ab2b8851ba4a308000000000000

same goes for the merkle root:

2b12fcf1b09288fcaff797d71e950e71ae42b91e8bdb2304758dfcffc2b620e3

becomes

e320b6c2fffc8d750423db8b1eb942ae710e951ed797f7affc8892b0f1fc122b

Next comes the timestamp. 1305998791 (4dd7f5c7 in big endian) is c7f5d74d in little endian. Then the bits (encoded difficulty) 440711666 is 1a44b9f2 in big endian and f2b9441a in little...

0 0
2

For Geth, in another terminal, attach to the Geth console, such as geth attach. This will allow you to keep your syncing node running, without restarting, and you will not see the noisy logs as you would if you simply ran "geth console" without other parameters.

In the console, run eth.syncing

> eth.syncing { currentBlock: 745600, highestBlock: 889152, startingBlock: 745553 }

You can then see where you are (currentBlock), and the block you still have to reach (highestBlock). (The difference between them is the number of blocks you have left remaining.)

You can run eth.syncing a few times to check your progress, and it will return false when done. You can then use eth.blockNumber and also compare with a blockchain explorer, as other answers here...

0 0
3

import pkg_resources
Unhandled Error
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 642, in run
runApp(config)
File "/usr/lib/python2.7/dist-packages/twisted/scripts/twistd.py", line 23, in runApp
_SomeApplicationRunner(config).run()
File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 376, in run
self.application = self.createOrGetApplication()
File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 441, in createOrGetApplication
application = getApplication(self.config, passphrase)
--- ---
File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 452, in getApplication
application = service.loadApplication(filename, style, passphrase)
File "/usr/lib/python2.7/dist-packages/twisted/application/service.py", line 405, in loadApplication
application = sob.loadValueFromFile(filename, 'application',...

0 0
4

I have a command button on a winform. So, if I have something like:

myButton.Click += MyHandler1; myButton.Click += MyHandler2; myButton.Click += MyHandler3;

How can I tell if any particular MyHandler has already been added to the Click event so it doesn't get added again somewhere else in my code?

I've read how you can use GetInvocationList() for your own event's information. But I get errors when trying to get the items for my command button using various combinations. It says,

"The event 'System.Windows.Forms.Control.Click' can only appear on the left hand side of += or -=."

What am I missing?

[Edit] - I'd like to accentuate this question that Ahmad pointed out. It's a kludge and should be easier IMHO, but it looks like it might just...

0 0
5

This question already has an answer here:

I think I'm being the victim of a bug here. Sometimes while I'm working (I still don't know why), my network traffic goes up to 200 KB/s and stays that way, even tough I'm not doing anything internet-related.

This sometimes happens to me with the CPU usage. When it does, I just run a top command to find out which process is responsible and then kill it. Problem is: I have no way of knowing which process is responsible for my high network usage. Both the resource monitor and the top command only tell me my total network usage, neither of them tells me process specific network info.

I've found questions here about monitoring total bandwidth usage, but, as I mentioned, that's not what I need. Is there another command I can use to find out which process is getting out of hand?

The command iftop gives results that disagree entirely with the information reported by System Monitor. While the latter claims there's high...

0 0
6
Q

uick question – What command I need to type to list all installed Perl modules on my Linux / UNIX system?


You need to use instmodsh (interactive inventory for installed Perl modules) command to find out what modules already installed on my system. instmodsh command provides an interactive shell type interface to query details of locally installed Perl modules. It is a little interface to ExtUtils::Installed to examine locally* installed modules, validate your packlists and even create a tarball from an installed module.

Task: List installed perl module

To display the list enter the following command:
$ instmodsh
Sample outputs:

Available commands are: l - List all installed modules m - Select a module q - Quit the program cmd?

At cmd? prompt type l to list all installed modules:
cmd? l
Sample outputs:

Installed modules are: Archive::Tar CPAN Class::Spiffy Compress::Zlib Cwd Digest::SHA IO::Zlib MIME::Lite...
0 0
7

There is no cross-distribution way. However:

Redhat and friends: Test for /etc/redhat-release, check contents Debian: Test for /etc/debian_version, check contents Mandriva and friends: Test for /etc/version, check contents Slackware: Test for /etc/slackware-version, check contents

Etc. Generally speaking, check for /etc/*-release and /etc/*-version.

Edit: Found an old (1+ years) bash script of mine lying around that I must have cobbled together over the years (it has an impressive CVS log going back 6 years.) It might not work properly anymore as-is and I can't be bothered to find installed distros to test against, but it should provide you with a good starting point. It works fine on CentOS, Fedora and Gentoo. gyaresu tested it successfully on Debian Lenny.

#!/bin/bash get_distribution_type() { local dtype # Assume unknown dtype="unknown" # First test against Fedora / RHEL / CentOS / generic Redhat derivative if [ -r /etc/rc.d/init.d/functions ];...
0 0
8

A Unity Coroutine is a C# generator. Every time you call yield in a generator you are "returning" a value. That's what they are intended to do, generate values. The problem isn't about returning values from a Coroutine, because you're doing that. The problem is getting access to those values that the Unity engine absorbs.

You do it by running the generator yourself instead of letting Unity do it, and exposing the yielded value using a public property.

Create a utility class for invoking coroutines...

public class CoroutineWithData { public Coroutine coroutine { get; private set; } public object result; private IEnumerator target; public CoroutineWithData(MonoBehaviour owner, IEnumerator target) { this.target = target; this.coroutine = owner.StartCoroutine(Run()); } private IEnumerator Run() { while(target.MoveNext()) { result = target.Current; yield return result; } } }

Put a yield at the end of your coroutine with...

0 0
9

Here's what I know:

Our domain admin account for a consultant was compromised. I have given them all the information I have about what happened so they can check their own systems and the systems of their other clients. As far as I know, we were the only ones that were breached.

One of the things that tipped me off to a problem was the fact that this account was logged on to one of our servers when I didn't think it should be.

Someone was actually logged in to a console (via RDP or other remote admin tool) and was poking around. I found in the event viewer where they uninstalled our backup software. I found a log file from a remote admin tool they were using that showed logins to other servers and a couple workstations. This log file contained multiple domain and device account usernames and passwords including the consultant's username and password, my domain admin account username and password, the NAS admin username and password, our default...

0 0
10

Welcome to

Etheres

the latest mining pool to hit the scene!


https://etheres.com

Yes some may say "oh no not another pool" or "why do we need another?" but Etheres is here to help provide another option for all Ethereum miners. There are a few larger pools that have rather high total hashrates, at times nearly reaching 50%+. So Etheres is here to provide another realiable, fast and secure option to all miners who wish to check us out.

Not only does Etheres provide another option, it also provides a fast, detailed and great looking portal for all miners to see what they want to see all in the same place! Some of the main features are listed below;

Anonymous Mining Real time PROP payout scheme Pay all Ethereum Rewards (Blocks, Uncles and Fees) Detailed Pool/Worker Statsitcs Accurate hashrate reporting/statistics Low 0% mining fee Payouts at min 0.2 ETH Payouts sent hourly

Etheres supports both eth-proxy and getwork, and has detailed...

0 0
11

here are some lines of a configuration file for stratum protocol:

parser.add_argument('-o', '--host', dest='host', type=str, default='198.20.177.17', help='Hostname of Stratum mining pool') parser.add_argument('-p', '--port', dest='port', type=int, default=8338, help='Port of Stratum mining pool') parser.add_argument('-sh', '--stratum-host', dest='stratum_host', type=str, default='198.20.177.17', help='On which network interface listen for stratum miners. Use "localhost" for listening on internal IP only.') parser.add_argument('-sp', '--stratum-port', dest='stratum_port', type=int, default=8344, help='Port on which port listen for stratum miners.') parser.add_argument('-oh', '--getwork-host', dest='getwork_host', type=str, default='198.20.177.17', help='On which network interface listen for getwork miners. Use "localhost" for listening on internal IP only.') parser.add_argument('-gp', '--getwork-port', dest='getwork_port', type=int, default=3334, help='Port on which...
0 0
12

Answer Yes littlefield ranch is in business and has had a peak year. www.littlefieldranch.com. From the website, it states: = Welcome to Littlefi

…eld Ranch: Your source for mail order steak = We at Littlefield Ranch promise to deliver you the highest quality, premium mail order steak at the most reasonable price. Each steak is hand selected, carefully trimmed and aged a minimum of 14 days. We guarantee that you will get consistent, USDA Prime steak every time, that is unparalleled in flavor, well-marbled and always tender. We are your best source to buy steaks online. We produce over 200,000 cattle a year for the finest Texas steaks you can get. Get your mail order steak fast and fresh with 2-day delivery. We make as easy as possible for you to buy steaks online. When you buy from Littlefield Ranch, you know you are getting the best quality mail order steak guaranteed. We offer USDA prime top sirloin, filet mignon, ribeyes, and strip steak. We also offer steak...
0 0