matthew412
Newbie
Offline
Activity: 21
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 20, 2014, 06:07:42 PM |
|
1) hold the reset button for a full 6 seconds before releasing. 2) It will now be at 192.168.1.99 (or 192.168.2.99) 3) Assuming your router is 192.168.1.1 - static IP ipv4 address: 192.168.1.99 ipv4 netmask: 255.255.255.0 gateway: 192.168.1.1 Broadcast : LEAVE THIS BLANK custom dns server: 8.8.8.8 Disable DHCP
4) if it still wont work, what are your pool details and post some screenshots
I tried holding the reset button for twice that long and then shutting it down, leaving it off for a while, then starting it back up. Then when I tried to set my IP to 192.168.1.99 or 192.168.2.99 and connect to it but it's not there. I doubt the router is 192.168.1.1-- This is a university network so everything is 130.160.XXX.XXX instead of 192.168 and I have no ability to administrate a router or anything like that. Are those settings in step 3 supposed to be for my computer or the miner? Ok, I think you might be misunderstanding something: you need to set the ip address of your pc to something different to 192.168.1.99 or it will conflict with the miner, if you set your PC to 192.169.1.99 they will never connect. I'm sure the miner will be 192.168.1.99, so you need to change the ipv4 of your PC to 192.168.1.2 and then connect to the miner by typing 192.168.1.99 in your browser. You'll then need to change the ipv4 address of your miner (WAN) to something like 130.160.[this must be the same as your university range].200, or try setting it to DHCP client for it to be automatically assigned an IP. Your problem is that your miner is on a different network to you uni and you need to get into the miner to change the WAN IP address so it can access the uni network... the easiest way to do that is log in to it with an ethernet cable, but your pc needs to be on the same network as the miner to do that i.e. 192.168.1.[whatever]. Thank you so much! It's finally mining. I was trying to connect to it with my computer at the same IP address, not just on the same subnet because that's what the guides told me to do, but I finally was able to connect to it, change it's IP to an unused one on my local network, and get it mining. Alright I said I'd send .01 BTC to whoever got it mining, and I appreciate everyone else who tried to help, but you did the job. What's one of your bitcoin addresses? You can PM it to me if you prefer.
|
|
|
|
oscer
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 20, 2014, 06:16:36 PM |
|
Anybody have problems with their AntMiner Just shutting itself off Randomly ??
sounds like a faulty or underpowered psu. Is your ant overclocked? and what is your psu that you are using for it? My First Unit was a 600 Watt one ... my Any is not Over clocked at all The new Power Supply is a Coolmax ZU-700B 700 Watt Have you tried putting a +5v load on it? I have that PSU (coolmax zu-700b) and it requires a +5v load to stay running. I connected an old CDROM drive to mine and it runs 24/7 just fine. Connected a CDROM drive to it and comes up mines for like 5 minutes and still shuts itself off ... I took the power supply from a Scrypt mining box we upgraded and it ran fine in there , Unless the ANT is defective then im like not so sure about shipping to China .
|
Xrnetworks.com Web Hosting
|
|
|
n4spd
Newbie
Offline
Activity: 11
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 20, 2014, 08:03:55 PM |
|
argh... paid on 2/16 and still unshipped status and no response to emails
(I ordered before change over to 2/28 shipping date).
so much for the slogan of 48 hour shipping and better than other vendors...
business is probably too good and busy, but at least answer emails from customers...
|
|
|
|
klondike_bar
Legendary
Offline
Activity: 2128
Merit: 1005
ASIC Wannabe
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 20, 2014, 10:47:05 PM |
|
1) hold the reset button for a full 6 seconds before releasing. 2) It will now be at 192.168.1.99 (or 192.168.2.99) 3) Assuming your router is 192.168.1.1 - static IP ipv4 address: 192.168.1.99 ipv4 netmask: 255.255.255.0 gateway: 192.168.1.1 Broadcast : LEAVE THIS BLANK custom dns server: 8.8.8.8 Disable DHCP
4) if it still wont work, what are your pool details and post some screenshots
I tried holding the reset button for twice that long and then shutting it down, leaving it off for a while, then starting it back up. Then when I tried to set my IP to 192.168.1.99 or 192.168.2.99 and connect to it but it's not there. I doubt the router is 192.168.1.1-- This is a university network so everything is 130.160.XXX.XXX instead of 192.168 and I have no ability to administrate a router or anything like that. Are those settings in step 3 supposed to be for my computer or the miner? Ok, I think you might be misunderstanding something: you need to set the ip address of your pc to something different to 192.168.1.99 or it will conflict with the miner, if you set your PC to 192.169.1.99 they will never connect. I'm sure the miner will be 192.168.1.99, so you need to change the ipv4 of your PC to 192.168.1.2 and then connect to the miner by typing 192.168.1.99 in your browser. You'll then need to change the ipv4 address of your miner (WAN) to something like 130.160.[this must be the same as your university range].200, or try setting it to DHCP client for it to be automatically assigned an IP. Your problem is that your miner is on a different network to you uni and you need to get into the miner to change the WAN IP address so it can access the uni network... the easiest way to do that is log in to it with an ethernet cable, but your pc needs to be on the same network as the miner to do that i.e. 192.168.1.[whatever]. Thank you so much! It's finally mining. I was trying to connect to it with my computer at the same IP address, not just on the same subnet because that's what the guides told me to do, but I finally was able to connect to it, change it's IP to an unused one on my local network, and get it mining. Alright I said I'd send .01 BTC to whoever got it mining, and I appreciate everyone else who tried to help, but you did the job. What's one of your bitcoin addresses? You can PM it to me if you prefer. 17ztqVKWEg1j25D3AoX87W66rYJApasPLK
|
|
|
|
oscer
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 21, 2014, 04:12:43 AM |
|
argh... paid on 2/16 and still unshipped status and no response to emails
(I ordered before change over to 2/28 shipping date).
so much for the slogan of 48 hour shipping and better than other vendors...
business is probably too good and busy, but at least answer emails from customers...
Do not worry takes them a few to ship but once they do its fast ... also they responded to me earlier about and issue i am having
|
Xrnetworks.com Web Hosting
|
|
|
joeofall
Newbie
Offline
Activity: 47
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 21, 2014, 06:50:33 AM |
|
hi all
i using AntMiner S1, after logging in the to web gui i had set the pool address and worker name...
question, i read that cgminder able to do like
MULTIPOOL
how can we do that ?
|
|
|
|
S4VV4S
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 21, 2014, 08:46:43 AM |
|
hi all
i using AntMiner S1, after logging in the to web gui i had set the pool address and worker name...
question, i read that cgminder able to do like
MULTIPOOL
how can we do that ?
Sign up to a multipool then put the pool details in your miner configuration ![Wink](https://bitcointalk.org/Smileys/default/wink.gif)
|
|
|
|
ldh37
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 116
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 21, 2014, 09:04:23 AM |
|
Anybody have problems with their AntMiner Just shutting itself off Randomly ??
sounds like a faulty or underpowered psu. Is your ant overclocked? and what is your psu that you are using for it? My First Unit was a 600 Watt one ... my Any is not Over clocked at all The new Power Supply is a Coolmax ZU-700B 700 Watt Have you tried putting a +5v load on it? I have that PSU (coolmax zu-700b) and it requires a +5v load to stay running. I connected an old CDROM drive to mine and it runs 24/7 just fine. Connected a CDROM drive to it and comes up mines for like 5 minutes and still shuts itself off ... I took the power supply from a Scrypt mining box we upgraded and it ran fine in there , Unless the ANT is defective then im like not so sure about shipping to China . It sure sounds like a PSU problem. In the Setup & Troubleshoot guide, scroll down to the Troubleshooting section and follow the steps in bullet point 3 to make sure the PSU is setup/connected correctly and to test each blade individually. If each blade runs fine by itself then it's a PSU issue according to the guide. https://bitcointalk.org/index.php?topic=344970.msg3696062#msg3696062
|
|
|
|
kano
Legendary
Offline
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 21, 2014, 01:52:11 PM |
|
... Connected a CDROM drive to it and comes up mines for like 5 minutes and still shuts itself off ... I took the power supply from a Scrypt mining box we upgraded and it ran fine in there , Unless the ANT is defective then im like not so sure about shipping to China .
Yes very much sounds like a PSU problem. ... exactly like I had the first (few) times I switched mine on until I used a better PSU
|
|
|
|
oscer
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 21, 2014, 03:45:09 PM |
|
Anybody have problems with their AntMiner Just shutting itself off Randomly ??
sounds like a faulty or underpowered psu. Is your ant overclocked? and what is your psu that you are using for it? My First Unit was a 600 Watt one ... my Any is not Over clocked at all The new Power Supply is a Coolmax ZU-700B 700 Watt Have you tried putting a +5v load on it? I have that PSU (coolmax zu-700b) and it requires a +5v load to stay running. I connected an old CDROM drive to mine and it runs 24/7 just fine. Connected a CDROM drive to it and comes up mines for like 5 minutes and still shuts itself off ... I took the power supply from a Scrypt mining box we upgraded and it ran fine in there , Unless the ANT is defective then im like not so sure about shipping to China . It sure sounds like a PSU problem. In the Setup & Troubleshoot guide, scroll down to the Troubleshooting section and follow the steps in bullet point 3 to make sure the PSU is setup/connected correctly and to test each blade individually. If each blade runs fine by itself then it's a PSU issue according to the guide. https://bitcointalk.org/index.php?topic=344970.msg3696062#msg3696062Well ... So i decided last night to try something and it seems to work at least for the last 12 hours , I hooked a mother board up to the power supply also .. and put it in bios , Now its staying on .. Weird but hopefully this works long term !
|
Xrnetworks.com Web Hosting
|
|
|
S4VV4S
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 21, 2014, 04:41:58 PM |
|
Anybody have problems with their AntMiner Just shutting itself off Randomly ??
sounds like a faulty or underpowered psu. Is your ant overclocked? and what is your psu that you are using for it? My First Unit was a 600 Watt one ... my Any is not Over clocked at all The new Power Supply is a Coolmax ZU-700B 700 Watt Have you tried putting a +5v load on it? I have that PSU (coolmax zu-700b) and it requires a +5v load to stay running. I connected an old CDROM drive to mine and it runs 24/7 just fine. Connected a CDROM drive to it and comes up mines for like 5 minutes and still shuts itself off ... I took the power supply from a Scrypt mining box we upgraded and it ran fine in there , Unless the ANT is defective then im like not so sure about shipping to China . It sure sounds like a PSU problem. In the Setup & Troubleshoot guide, scroll down to the Troubleshooting section and follow the steps in bullet point 3 to make sure the PSU is setup/connected correctly and to test each blade individually. If each blade runs fine by itself then it's a PSU issue according to the guide. https://bitcointalk.org/index.php?topic=344970.msg3696062#msg3696062Well ... So i decided last night to try something and it seems to work at least for the last 12 hours , I hooked a mother board up to the power supply also .. and put it in bios , Now its staying on .. Weird but hopefully this works long term ! ![Shocked](https://bitcointalk.org/Smileys/default/shocked.gif) Did you not do the jump wire trick?
|
|
|
|
|
ldh37
Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 116
Merit: 10
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 21, 2014, 08:02:28 PM |
|
I found any blocks with my Ants too. ![](https://ip.bitcointalk.org/?u=http%3A%2F%2Fs28.postimg.org%2Fseareqcn1%2FUnbenannt.png&t=665&c=ybluVDcIvRtGiw) But my Antminer No 3 (screenshot) have to much hw. I have same settings at all Ants but this one is brutal.. ![](https://ip.bitcointalk.org/?u=http%3A%2F%2Fs17.postimg.org%2F40sxqybfj%2FUnbenannt2.png&t=665&c=XD6V0fj_vxUwfw) I test 350MHz, 375MHz and 400MHz. All time same results. Is my Ant No 3 defect? He mines pretty well at pool. That doesn't look bad to me. it's only 0.78% HW errors. HW/[HW+DiffA+DiffR+DiffS]*100 17096/[17096+2132320+17200+35344]*100=0.776399208
|
|
|
|
klondike_bar
Legendary
Offline
Activity: 2128
Merit: 1005
ASIC Wannabe
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 21, 2014, 11:18:36 PM |
|
Anybody have problems with their AntMiner Just shutting itself off Randomly ??
sounds like a faulty or underpowered psu. Is your ant overclocked? and what is your psu that you are using for it? My First Unit was a 600 Watt one ... my Any is not Over clocked at all The new Power Supply is a Coolmax ZU-700B 700 Watt Have you tried putting a +5v load on it? I have that PSU (coolmax zu-700b) and it requires a +5v load to stay running. I connected an old CDROM drive to mine and it runs 24/7 just fine. Connected a CDROM drive to it and comes up mines for like 5 minutes and still shuts itself off ... I took the power supply from a Scrypt mining box we upgraded and it ran fine in there , Unless the ANT is defective then im like not so sure about shipping to China . It sure sounds like a PSU problem. In the Setup & Troubleshoot guide, scroll down to the Troubleshooting section and follow the steps in bullet point 3 to make sure the PSU is setup/connected correctly and to test each blade individually. If each blade runs fine by itself then it's a PSU issue according to the guide. https://bitcointalk.org/index.php?topic=344970.msg3696062#msg3696062Well ... So i decided last night to try something and it seems to work at least for the last 12 hours , I hooked a mother board up to the power supply also .. and put it in bios , Now its staying on .. Weird but hopefully this works long term ! ![Shocked](https://bitcointalk.org/Smileys/default/shocked.gif) Did you not do the jump wire trick? +1 ![Shocked](https://bitcointalk.org/Smileys/default/shocked.gif) all you need is a paperclip or other 0.5" wire to short the PS-ON function to have the powersupply operate without a mobo
|
|
|
|
kano
Legendary
Offline
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 22, 2014, 12:06:19 AM |
|
That doesn't look bad to me. it's only 0.78% HW errors. HW/[HW+DiffA+DiffR+DiffS]*100 17096/[17096+2132320+17200+35344]*100=0.776399208 Sigh - the issues of vendors screwing up cgminer ... The API summary includes the (correctly) calculated HW% and also the (correctly) calculated Reject% Pity they didn't put them on the screen there ... I wonder why? ... and just an FYI - the Reject% of the Ant is the highest of all my hardware ...
|
|
|
|
kano
Legendary
Offline
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 22, 2014, 12:14:01 AM Last edit: February 22, 2014, 12:47:55 AM by kano |
|
Here's Proof that the BITMAIN AntMiner S1 can find a block! ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FGE95dFg.jpg&t=665&c=H5NB2xJnnJ7Z1Q) Unfortunate for me, I was mining in a pool which doesn't give any extra reward (to normal someone else finding a block) for finding a block yourself. Anyhow, is there a way to see from the AntMiner itself which block this actually was? I haven't turned any extra-logging on aside what is enabled by BITMAIN as default. No The only way to know for certain is to have the cgminer log which will show the first 4 non zero bytes of the block hash next to the diff. These standalone devices don't like setting the logging (due to extreme space limitations of the cheap hardware that runs linux in them) Is there rounding error somewhere, or would 0x00...000FF....FFF / 6,023,087,568 not give you a narrow range for the block hash? It's not exact, but it might let you find the hash in a 3 day window. I stand corrected - indeed you can work out the block hash (I was wrong) If you calculate it accurately enough, you should be able to get enough of the start of the hash to match the block. However, it's not 0x00000000FF....FF I think it's 0x00000000FFFFFFFFFFFFFFFF00...00 (not 100% sure) Edit: meh, since I got a block recently I guess I should calculate it myself and see if I can work it out what is the correct one to use ... ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)
|
|
|
|
Xer0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 22, 2014, 01:27:21 AM |
|
order paid: 0012014022113121401489E4b5SU0607 confirmation?
|
|
|
|
kano
Legendary
Offline
Activity: 4592
Merit: 1851
Linux since 1997 RedHat 4
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 22, 2014, 02:05:06 AM |
|
Here's Proof that the BITMAIN AntMiner S1 can find a block! ![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fi.imgur.com%2FGE95dFg.jpg&t=665&c=H5NB2xJnnJ7Z1Q) Unfortunate for me, I was mining in a pool which doesn't give any extra reward (to normal someone else finding a block) for finding a block yourself. Anyhow, is there a way to see from the AntMiner itself which block this actually was? I haven't turned any extra-logging on aside what is enabled by BITMAIN as default. No The only way to know for certain is to have the cgminer log which will show the first 4 non zero bytes of the block hash next to the diff. These standalone devices don't like setting the logging (due to extreme space limitations of the cheap hardware that runs linux in them) Is there rounding error somewhere, or would 0x00...000FF....FFF / 6,023,087,568 not give you a narrow range for the block hash? It's not exact, but it might let you find the hash in a 3 day window. I stand corrected - indeed you can work out the block hash (I was wrong) If you calculate it accurately enough, you should be able to get enough of the start of the hash to match the block. However, it's not 0x00000000FF....FF I think it's 0x00000000FFFFFFFFFFFFFFFF00...00 (not 100% sure) Edit: meh, since I got a block recently I guess I should calculate it myself and see if I can work it out what is the correct one to use ... ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) OK sorted it out now ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) It's actually 0x00000000FFFF00...00 So I wrote some php using bcmath and another function I found on the net to accurately convert number bases ... And it came up with: 6023087568 -> b68bf5860d85f2a9528d572ef0820077d523f91b33e9cca2 Now looking at blocks over the last week starting with 0000b68b I found: 286662,0000000000000000b68bf585f10b1436ff7e6471e2e40d040f94eadc526f16c5,2, 4c071ba9dfb373bfc796a26b2514c7aeb13428c60ac034d96c7e37e9d66b1744,1392794888, 20140219082808UTC,549088256,19015f53,3129573174.52228737, 000000000000000050c45d24df1a0048f0f39d2d4e9f0598ca201f76fd980524 Which is almost certainly the block you found. Edit: and anyone wanting to do this themselves: You need PHP and PHP BCMath installed Here's hex.php: <?php # function basecvt($str, $frombase=10, $tobase=16) { $str = trim($str); if (intval($frombase) != 10) { $len = strlen($str); $q = 0; for ($i=0; $i<$len; $i++) { $r = base_convert($str[$i], $frombase, 10); $q = bcadd(bcmul($q, $frombase), $r); } } else $q = $str;
if (intval($tobase) != 10) { $s = ''; while (bccomp($q, '0', 0) > 0) { $r = intval(bcmod($q, $tobase)); $s = base_convert($r, 10, $tobase) . $s; $q = bcdiv($q, $tobase, 0); } } else $s = $q;
return $s; } # function bctrim($num0) { if (strpos($num0, '.') === false) return $num0; else return rtrim(rtrim($num0, '0'), '.'); } # $diff = $argv[1]; # bcscale(1000); # $d1_sp = '00000000 FFFF0000 00000000 00000000 00000000 00000000 00000000 00000000'; $d1_16 = str_replace(' ', '', $d1_sp); $d1_0 = basecvt($d1_16, 16, 10); $d1_10 = bctrim($d1_0); # $blk0 = bcdiv($d1_10, $diff); $blk10 = bctrim($blk0); $blk16 = basecvt($blk10, 10, 16); # echo "diff=$diff\n"; echo "d1_16=$d1_16\n"; echo "blk10=$blk10\n"; echo "blk16=$blk16\n"; # ?>
Then on linux you just: php hex.php 6023087568 and blk16 is your block hash (accurate to about 6 nibbles)
|
|
|
|
oscer
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 22, 2014, 02:45:36 AM |
|
Anybody have problems with their AntMiner Just shutting itself off Randomly ??
sounds like a faulty or underpowered psu. Is your ant overclocked? and what is your psu that you are using for it? My First Unit was a 600 Watt one ... my Any is not Over clocked at all The new Power Supply is a Coolmax ZU-700B 700 Watt Have you tried putting a +5v load on it? I have that PSU (coolmax zu-700b) and it requires a +5v load to stay running. I connected an old CDROM drive to mine and it runs 24/7 just fine. Connected a CDROM drive to it and comes up mines for like 5 minutes and still shuts itself off ... I took the power supply from a Scrypt mining box we upgraded and it ran fine in there , Unless the ANT is defective then im like not so sure about shipping to China . It sure sounds like a PSU problem. In the Setup & Troubleshoot guide, scroll down to the Troubleshooting section and follow the steps in bullet point 3 to make sure the PSU is setup/connected correctly and to test each blade individually. If each blade runs fine by itself then it's a PSU issue according to the guide. https://bitcointalk.org/index.php?topic=344970.msg3696062#msg3696062Well ... So i decided last night to try something and it seems to work at least for the last 12 hours , I hooked a mother board up to the power supply also .. and put it in bios , Now its staying on .. Weird but hopefully this works long term ! ![Shocked](https://bitcointalk.org/Smileys/default/shocked.gif) Did you not do the jump wire trick? I did indeed try the trick this power supply did not seem to like that , So i this way it works and the motherboard uses very little power !
|
Xrnetworks.com Web Hosting
|
|
|
MrTeal
Legendary
Offline
Activity: 1274
Merit: 1004
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
February 22, 2014, 03:17:30 AM |
|
OK sorted it out now ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) It's actually 0x00000000FFFF00...00 So I wrote some php using bcmath and another function I found on the net to accurately convert number bases ... And it came up with: 6023087568 -> b68bf5860d85f2a9528d572ef0820077d523f91b33e9cca2 Now looking at blocks over the last week starting with 0000b68b I found: 286662,0000000000000000b68bf585f10b1436ff7e6471e2e40d040f94eadc526f16c5,2, 4c071ba9dfb373bfc796a26b2514c7aeb13428c60ac034d96c7e37e9d66b1744,1392794888, 20140219082808UTC,549088256,19015f53,3129573174.52228737, 000000000000000050c45d24df1a0048f0f39d2d4e9f0598ca201f76fd980524 Which is almost certainly the block you found. Edit: and anyone wanting to do this themselves: You need PHP and PHP BCMath installed Here's hex.php: <?php # function basecvt($str, $frombase=10, $tobase=16) { $str = trim($str); if (intval($frombase) != 10) { $len = strlen($str); $q = 0; for ($i=0; $i<$len; $i++) { $r = base_convert($str[$i], $frombase, 10); $q = bcadd(bcmul($q, $frombase), $r); } } else $q = $str;
if (intval($tobase) != 10) { $s = ''; while (bccomp($q, '0', 0) > 0) { $r = intval(bcmod($q, $tobase)); $s = base_convert($r, 10, $tobase) . $s; $q = bcdiv($q, $tobase, 0); } } else $s = $q;
return $s; } # function bctrim($num0) { if (strpos($num0, '.') === false) return $num0; else return rtrim(rtrim($num0, '0'), '.'); } # $diff = $argv[1]; # bcscale(1000); # $d1_sp = '00000000 FFFF0000 00000000 00000000 00000000 00000000 00000000 00000000'; $d1_16 = str_replace(' ', '', $d1_sp); $d1_0 = basecvt($d1_16, 16, 10); $d1_10 = bctrim($d1_0); # $blk0 = bcdiv($d1_10, $diff); $blk10 = bctrim($blk0); $blk16 = basecvt($blk10, 10, 16); # echo "diff=$diff\n"; echo "d1_16=$d1_16\n"; echo "blk10=$blk10\n"; echo "blk16=$blk16\n"; # ?>
Then on linux you just: php hex.php 6023087568 and blk16 is your block hash (accurate to about 6 nibbles) Nice work, thanks Kano. You're a lot more dedicated than I; I just tossed it in Matlab, realized it wasn't going to work easily with 256 bit numbers, and moved on.
|
|
|
|
|