Search content
Sort by

Showing 20 of 47 results by Perp
Post
Topic
Board Mining (Altcoins)
scrypt
by
Perp
on 04/10/2020, 07:04:50 UTC
Hello.
I'm asked on the different forums but no answer. Maybe here?

There in cgminer exist such code:

static uint8_t diff_to_bits(double diff)
{
   uint64_t diff64;
   uint8_t i;

   diff /= 0.9999847412109375;
   diff *= (double)2147483648.0;
   if (diff > 0x8000000000000000ULL)
      diff = 0x8000000000000000ULL;
   /* Convert it to an integer */
   diff64 = diff;
   for (i = 0; diff64; i++, diff64 >>= 1);

   return i;
}

static double bits_to_diff(uint8_t bits)
{
   double ret = 1.0;

   if (likely(bits > 32))
      ret *= 1ull << (bits - 32);
   else if (unlikely(bits < 32))
      ret /= 1ull << (32 - bits);
   return ret;
}

How to adapt this code for scrypt to calculate diff to bits and vice versa?

Thanks!
Post
Topic
Board Pools (Altcoins)
Re: [ANN] The First Litecoin PPS Pool (litecoinpool.org)
by
Perp
on 04/10/2020, 06:42:45 UTC
Hello.
I'm asked on the different forums but no answer. Maybe here?

There in cgminer exist such code:

static uint8_t diff_to_bits(double diff)
{
   uint64_t diff64;
   uint8_t i;

   diff /= 0.9999847412109375;
   diff *= (double)2147483648.0;
   if (diff > 0x8000000000000000ULL)
      diff = 0x8000000000000000ULL;
   /* Convert it to an integer */
   diff64 = diff;
   for (i = 0; diff64; i++, diff64 >>= 1);

   return i;
}

static double bits_to_diff(uint8_t bits)
{
   double ret = 1.0;

   if (likely(bits > 32))
      ret *= 1ull << (bits - 32);
   else if (unlikely(bits < 32))
      ret /= 1ull << (32 - bits);
   return ret;
}

How to adapt this code for scrypt to calculate diff to bits and vice versa?

Thanks!
Post
Topic
Board Announcements (Altcoins)
diff_to_bits and bits_to_diff
by
Perp
on 30/09/2020, 07:39:31 UTC
Hello there!
For bitcoin:
difficulty = first_block_target / current_target
Is it correct for LTC? If not - how to calculate it?


More
For BTC (first block bits=0x1d00ffff)
target=
0x00000000ffff0000000000000000000000000000000000000000000000000000

for LTC if follow same way (first block bits=0x1e0ffff0)
target=
0x00000ffff0000000000000000000000000000000000000000000000000000000

That's true?

Also there in cgminer presents such code (from BTC asic driver):

static uint8_t diff_to_bits(double diff)
{
   uint64_t diff64;
   uint8_t i;

   diff /= 0.9999847412109375;
   diff *= (double)2147483648.0;
   if (diff > 0x8000000000000000ULL)
      diff = 0x8000000000000000ULL;
   /* Convert it to an integer */
   diff64 = diff;
   for (i = 0; diff64; i++, diff64 >>= 1);

   return i;
}

static double bits_to_diff(uint8_t bits)
{
   double ret = 1.0;

   if (likely(bits > 32))
      ret *= 1ull << (bits - 32);
   else if (unlikely(bits < 32))
      ret /= 1ull << (32 - bits);
   return ret;
}
I think that need to alter this line for LTC:
diff *= (double)2147483648.0; but how?

So how to adapt this code for LTC?

I'm trying to ask on different forums but no answer.
Somebody please help.
Thanks!
Post
Topic
Board Работа
Topic OP
юсб драйвер
by
Perp
on 29/09/2020, 12:54:49 UTC
Требуется программист который сможет переписать юсб драйвер для асика.
Post
Topic
Board Кодеры
Re: diff_to_bits
by
Perp
on 25/09/2020, 15:13:28 UTC
Cпасибо!
Post
Topic
Board Кодеры
Re: diff_to_bits
by
Perp
on 25/09/2020, 09:26:12 UTC
Но ведь в лайте сложность считается по другому. в цгмайнере ведь:

   d64 = truediffone;
   if (opt_scrypt)
      d64 *= (double)65536;
   d64 /= diff;

Post
Topic
Board Кодеры
Re: diff_to_bits
by
Perp
on 24/09/2020, 22:50:10 UTC
Для лайта d64 *= (double)65536;

Никак не пойму, как пересчитать.
Post
Topic
Board Кодеры
Re: diff_to_bits
by
Perp
on 24/09/2020, 22:21:33 UTC
Да, всё кроме этого,поменял, но неправильно считает нонс,98% reject Sad
Post
Topic
Board Кодеры
Merits 1 from 1 user
Topic OP
diff_to_bits
by
Perp
on 24/09/2020, 20:35:36 UTC
⭐ Merited by klarki (1)
Помогите пожалуйста.

Как преобразовать этот код  для лайткоинa?

Для биткоина это выглядит так:

static uint8_t diff_to_bits(double diff)
{
   uint64_t diff64;
   uint8_t i;

   diff /= 0.9999847412109375;
   diff *= (double)2147483648.0;
   if (diff > 0x8000000000000000ULL)
      diff = 0x8000000000000000ULL;
   /* Convert it to an integer */
   diff64 = diff;
   for (i = 0; diff64; i++, diff64 >>= 1);

   return i;
}

static double bits_to_diff(uint8_t bits)
{
   double ret = 1.0;

   if (likely(bits > 16))
      ret *= 1ull << (bits - 16);
   else if (unlikely(bits < 16))
      ret /= 1ull << (16 - bits);
       applog(LOG_INFO, "ret=\n",ret);

   return ret;
}

Спасибо!
Post
Topic
Board Альтернативные криптовалюты
Re: Masternodecoin - DARK SEND & ЭКОНОМИКА МАСТЕРНОД. 4.1.0.0 - 17.09
by
Perp
on 18/11/2018, 11:49:35 UTC
@kassex

Послал Вам 1 MTNC,проверьте.
TxID
be8f778ea46589786634b3bc6e451d6c5568f388ca2487846abab343c0835c57

edit.

У меня в клиенте только сейчас подтверждаются транзакции от 14 15 числа. Думаю, что, как только все перейдут на цепочку от дева, всё будет в порядке.
Кстати, несколько раз перегружал клиента и делал repairwallet. Сейчас у меня всё OK.
P.S. Fucki*g recaptcha.
Post
Topic
Board Announcements (Altcoins)
Re: ▉ANN▉ MTNC ▉▉▉▉░ Masternodecoin ░▉▉▉ Multiple Privacy Center Platform
by
Perp
on 17/11/2018, 20:03:50 UTC
Guys!
I think that you have to say many thanks to @ideaupdater.
First of all he react very fast coz new checkpoints and right blockchain on github commit were updated very fast- in 17 hours!!!
Some coins do that things in weeks Sad
I'm also coder and have my very own coin and I can understand all the problems too.

So thank You @ideaupdater for your work.
Regards.
Post
Topic
Board Announcements (Altcoins)
Re: ▉ANN▉ MTNC ▉▉▉▉░ Masternodecoin ░▉▉▉ Multiple Privacy Center Platform
by
Perp
on 16/11/2018, 18:20:03 UTC
I was checking cryptopia - no coins in my account Sad
Looks like cryptopia for now in a wrong chain.
Post
Topic
Board Announcements (Altcoins)
Re: ▉ANN▉ MTNC ▉▉▉▉░ Masternodecoin ░▉▉▉ Multiple Privacy Center Platform
by
Perp
on 16/11/2018, 17:46:12 UTC
Yep, same chain. Last thing check if cryptopia there too Smiley
Post
Topic
Board Announcements (Altcoins)
Re: ▉ANN▉ MTNC ▉▉▉▉░ Masternodecoin ░▉▉▉ Multiple Privacy Center Platform
by
Perp
on 16/11/2018, 17:32:24 UTC
No, I was sending to cryptopia and can say that my transaction appears on explorer so it's right chain
Will check after 30 confirmations if funds arrived there.

Post your wallet here and I will send you 1 coins to check too.
Or PM me with wallet. We need first of all check chain.
Post
Topic
Board Announcements (Altcoins)
Re: ▉ANN▉ MTNC ▉▉▉▉░ Masternodecoin ░▉▉▉ Multiple Privacy Center Platform
by
Perp
on 16/11/2018, 17:25:21 UTC
We are on the same chain. OK will try to send some to cryptopia
Post
Topic
Board Announcements (Altcoins)
Re: ▉ANN▉ MTNC ▉▉▉▉░ Masternodecoin ░▉▉▉ Multiple Privacy Center Platform
by
Perp
on 16/11/2018, 17:22:11 UTC
Block number?
Post
Topic
Board Announcements (Altcoins)
Re: ▉ANN▉ MTNC ▉▉▉▉░ Masternodecoin ░▉▉▉ Multiple Privacy Center Platform
by
Perp
on 16/11/2018, 17:18:26 UTC
@kassex
Can you check chain too? Please past hash of any block. I want to compare.
Post
Topic
Board Announcements (Altcoins)
Re: ▉ANN▉ MTNC ▉▉▉▉░ Masternodecoin ░▉▉▉ Multiple Privacy Center Platform
by
Perp
on 16/11/2018, 17:09:33 UTC
@forexhercules
Can you please enter from debug console
getblockhash 578571

end past hash here? If it's equal my previous post likely we are at right chain.


@kassex
type from console repairwallet after reboot
Post
Topic
Board Announcements (Altcoins)
Re: ▉ANN▉ MTNC ▉▉▉▉░ Masternodecoin ░▉▉▉ Multiple Privacy Center Platform
by
Perp
on 16/11/2018, 16:27:58 UTC
I was compiling latest wallet from github with new checkpoints:
https://github.com/masternodecoin/masternodecoin/commit/f4e19a404643c36bf7df5c15768e8f2b4b432e9f

also using latest blockchain:
https://mega.nz/#F!BThmTQQS!sXY7k6-eERbpi_9fUJdpVg

Synchronized and staking too but if try to send some to cryptopia coins didn't arrived. Maybe cryptopia at wrong chain or what?

BTW can someone check chain?

18:32:51

getblockcount
18:32:51

578571

18:33:21
getblockhash 578571

18:33:21

d8ce204efe03c9657ef03938899c3a90abccb5cd8faaf5948d94c3840a189fbe


On explorer I seen another hash Sad
e5bf51148b5c5b3a5a1447db370b2626e315569202f94508234d4112132db047

Post
Topic
Board Announcements (Altcoins)
Re: ▉ANN▉ MTNC ▉▉▉▉░ Masternodecoin ░▉▉▉ Multiple Privacy Center Platform
by
Perp
on 15/11/2018, 15:05:05 UTC
@ideaupdater
Can you please upload right chain?
Definitely can't synchronize Sad
Thanks.