Bitcoin Forum
November 08, 2024, 10:18:15 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 ... 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 [125]
  Print  
Author Topic: [ANN][GAP] Gapcoin - Prime Gap Search - New Math Algo - CPU / GPU - Zero Premine  (Read 287615 times)
sparkster
Full Member
***
Offline Offline

Activity: 128
Merit: 101


View Profile
September 24, 2024, 10:35:57 PM
Last edit: September 24, 2024, 11:52:14 PM by sparkster
 #2481

So with python2 and pyjsonrpc I can collect data about how many times blocks with each shift had been mined, but it works veeeeeery slow. Almost 8 minutes for 10000 blocks, so about 24 hours for the whole blockchain. And I don't know any better. First time in my life i'm writing something in python.

I also tried to use getblockhash only for block 0 and call hashvar = block_data["nextblockhash"] after that, but it's still 7 minutes for 10000 blocks, even though there are less calls to gapcoind in this case.

Code:
#!/usr/bin/env python
# coding: utf-8

import pyjsonrpc

http_client = pyjsonrpc.HttpClient(
    url = "http://localhost:31397",
    username = "username_here",
    password = "password_here"
)
blockcountvar = http_client.call("getblockcount")
shift_array = [0]*1024
current_block = 0
while current_block < blockcountvar:
    hashvar = http_client.call("getblockhash",current_block)
    block_data = http_client.call("getblock",hashvar)
    current_shift = block_data["shift"]
    shift_array[current_shift] += 1
    current_block += 1
for x in range (16,1024):
    print ("shift %d:" % (x))
    print shift_array[x]

#werks
   
DaCryptoRaccoon
Hero Member
*****
Offline Offline

Activity: 1241
Merit: 623


OGRaccoon


View Profile
September 25, 2024, 09:17:50 PM
 #2482

I think the project is dead at this point.

Everyone has either vanished or just given up with it. 

Sad as it was a really interesting project.

┏━━━━━━━━━━━━━━━━━┓
┃     𝔱𝔥𝔬𝔲 𝔰𝔥𝔞𝔩𝔱 𝔴𝔬𝔯ⱪ 𝔣𝔬𝔯 𝔶𝔬𝔲𝔯 𝔟𝔞𝔤𝔰       ┃
┃                ➤21/M                      ┃
┃ ███▓▓  ███▓▓  ███▓▓  ███▓▓┃
wizz13150
Member
**
Offline Offline

Activity: 72
Merit: 27

Tempus Narrabo


View Profile
September 30, 2024, 05:21:39 PM
Last edit: September 30, 2024, 05:35:42 PM by wizz13150
 #2483

but it's still 7 minutes for 10000 blocks    

Hey, i don't think you can improve this significantly.
I tried to read directly from the blocks, but failed lol. It's out of my skillset.

But here is a link of a raw dump as csv from block 1600000 (24 February 2022) to 2123698 (29 September 2024), if it helps :

https://mega.nz/file/hNBhlaRD#7W0rszV4EAJCu7KOyEFKVr6Rwd0IsCPNBR5uDIWpcNE

Dumped block example :

Code:
{
    "hash" : "8338ca5d603cb092a8801cae8de62d53c8bed5f71cc007acb84215fe2fea38d2",
    "confirmations" : 433198,
    "strippedsize" : 200,
    "size" : 200,
    "weight" : 800,
    "height" : 1600000,
    "version" : 2,
    "versionHex" : "00000002",
    "merkleroot" : "7b8b1cc25ecab74192845127ed82a45e596d67a29f4c31b2f8cf3a6f4fb69836",
    "tx" : [
        "7b8b1cc25ecab74192845127ed82a45e596d67a29f4c31b2f8cf3a6f4fb69836"
    ],
    "time" : 1645704890,
    "mediantime" : 1645704572,
    "nonce" : 101,
    "difficulty" : 21.90408874,
    "shift" : 64,
    "adder" : "2245420651",
    "gapstart" : "1094875564289667875541388914785213712361758890573529802407454521238655692173188869014596521191019",
    "gapend" : "1094875564289667875541388914785213712361758890573529802407454521238655692173188869014596521196119",
    "gaplen" : 5100,
    "merit" : 23.06243761,
    "chainwork" : "000000000000000000000000000000000000000000000000001b6d3752ba3300",
    "nTx" : 1,
    "previousblockhash" : "8aa9f6a6ffa389acfabd752104388e0035f7f2abd609fd9878698ccb75b9da26",
    "nextblockhash" : "89e5364c59072595ecb68a1572394e9172395f9a9b7bcb624bfbf8dabff3e34e"
}

I'm also dumping the blockchain to compare and submit to the Gap List used by mathematicians, on a regular basis.
For posterity, here is my Powershell code to Compare the dumped values to the Gap List :

Code:
# Script to compare gaps to the up-to-date PrimeGapList
# Comparison from a Dump formatted for Troisi
# ex: 24870 2022-03-14 Gapcoin 28.058336 8801393720369171138807534378484094148199678813285045428660226799169766010648198304648629482463204306059854541052756367705300199390163670465161859720297775763621878627880034299171594029366567540559025279446203633719720558636541192240085556163486233788883525676598009670804662649198274483578163346149528131010232947964561361460116860454085789818741262035884363732876225001181914637776561


# PrimeGapList and Files Path
$Path = "F:\Alex\"    # Path to edit
# Generate a timestamp for the file name (6 characters for hour, minute, second)
$timestamp = (Get-Date -Format "HHmmss")

# Set the file name with the timestamp to avoid overwriting previous files
$PotentialRecordsFile = "$Path\PotentialRecords_$timestamp.txt"

# Download and Get the Prime Gap List
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/primegap-list-project/prime-gap-list/master/allgaps.sql" -OutFile "$Path\LastPrimeGapList.txt"
$PrimeGapList = Get-Content "$Path\LastPrimeGapList.txt"

# Parse the PrimeGapList into a hashtable for faster lookups
$GapDictionary = @{}
foreach ($line in $PrimeGapList) {
    if ($line -match "VALUES\((\d+),") {
        $gapSize = $matches[1]
        $values = $line -replace "INSERT INTO gaps VALUES\(", "" -replace "\);", ""
        $fields = $values -split ","
        $GapDictionary[$gapSize] = $fields[7]  # Store Merit value in hashtable
    }
}

# Ask the user to input the number of lines to compare
$numberOfLines = Read-Host "Entrez le nombre de lignes à comparer"

# Get Dump to Compare based on user input
$ToCompare = Get-Content "$Path\Dump_Mersenne.csv" | Select-Object -Last $numberOfLines
#$ToCompare = Get-Content "$Path\Dump_Mersenne.csv" | Select-Object -last 50000

# Create the file with the timestamp in the name
Set-Content -Path $PotentialRecordsFile -Value "Potential Gapcoin Records"

$c = 1
$s = 1
$TotalLines = $ToCompare.count

# Initialize timing variables
$startTime = Get-Date
$recordCount = 0

# Look for each line to compare
foreach ($line in $ToCompare) {
    $fields = $line.Split(",")
    $GapSizetoCompare = $fields[0]
    $MerittoCompare = $fields[2]
    $Discoverer = $fields[3]
    $Date = $fields[4]
    $Digits = $fields[5]
    $Prime = $fields[6]

    # Reformat the date to 'YYYY-MM-DD'
    $FormattedDate = Get-Date $Date -Format "yyyy-MM-dd"

    # Get the merit from the dictionary
    if ($GapDictionary.ContainsKey($GapSizetoCompare)) {
        $Merit = $GapDictionary[$GapSizetoCompare]

        # Calculate progress and time remaining
        $elapsedTime = (Get-Date) - $startTime
        $blocksPerHour = $s / $elapsedTime.TotalHours
        $remainingBlocks = $TotalLines - $s
        $timeRemaining = [System.TimeSpan]::FromHours($remainingBlocks / $blocksPerHour)

        $progressInfo = "($s/$TotalLines, PRecords: $recordCount, Blocks/h: $([math]::Round($blocksPerHour, 0)), ETA: $([math]::Round($timeRemaining.TotalHours, 1)) hours)"

        # Compare, display in console, and write in file if potential records
        if ($MerittoCompare -gt $Merit) {
            $Diffe = $MerittoCompare - $Merit

            # Troisi format: GapSize YYYY-MM-DD Discoverer Merit Prime
            $TroisiRecord = "$GapSizetoCompare $FormattedDate $Discoverer $MerittoCompare $Prime"
            
            Write-Host "Le Gap $GapSizetoCompare est un Record potentiel : $TroisiRecord Diff:$Diffe Digits=$Digits $progressInfo" -ForegroundColor Green
            Write-Warning "$line"

            # Writing in Troisi format to the file
            $TroisiRecord | Add-Content $PotentialRecordsFile
            # " " | Add-Content $PotentialRecordsFile

            $c++
            $recordCount++
        }
    }
    $s++
} # End ForEach
pause

Then, it's submitted here for verification (It's here to put your name on a record) :
https://primegaps.cloudygo.com/


Anyway, the mined shift ratio won't significantly change from the available datas on the Gapcoin Project website, if it's what you're looking for.
I'm nearly the only one to mine at shift 1024, and the network hashrate is very low for 1-2 years now.
As mentionned before, the shifts 25, 32 and 64 are overmined at this point.
Any other (higher) shift have records to improve.
Of course, as Gapcoin is "randomly" searching for Prime Gaps, a miracle can still happens in any shift.

Come on Discord for faster answers, or to discuss.


The creator and the dev are dead, indeed.. The Gapcoin network is not.
We got some of the most OGs of the OGs interested in this project, in the past.
I'm still proud to be part of this.

Cheers ! 🥂

Wizz_^
sparkster
Full Member
***
Offline Offline

Activity: 128
Merit: 101


View Profile
October 03, 2024, 01:16:43 AM
Merited by wizz13150 (1)
 #2484

Quote

Thanks for this and for all other stuff you're doing. I did not check this thread until just now, so I made the table anyway, for myself. I copy-pasted the data manually, so there may be some slight errors.
https://docs.google.com/spreadsheets/d/1Phmuef-UlIDdqvkLD-o1ugHgtpQPfAfGK64d5OI4zlE
sparkster
Full Member
***
Offline Offline

Activity: 128
Merit: 101


View Profile
October 10, 2024, 09:59:16 AM
Last edit: October 11, 2024, 02:49:49 PM by sparkster
 #2485

Current supply on coingecko (17,634,537) and CMC (14,369,569) was not updated for a some time, because well, no any working blockchain explorer.
So I calculated it for the block 2120000 (we at ~2129300 now) and added this info to my table.
about 17 874 521 GAP at the block 2120000.

Finally I was able to launch Qt wallet on linux. Previously I used
gapcoin-0.16.3-aarch64-linux-gnu.tar.gz, because I thought it's the only release for desktop linux,
and gapcoind and gapcoin-cli worked just fine, but not Qt.
But now I had found
gapcoin-0.16.3-x86_64-linux-gnu.tar.gz
Now not only I have GUI wallet, but also the same python script calling the daemon works 4-5 times faster it seems
You can find releases here:
https://github.com/gapcoin-project/gapcoin-core/releases
And I have no slightest idea how to build it by myself.

It seems sometimes we have 3 nodes on satoshi9.2 connected.
I can connect to them from Windows machine but not from Linux machine.
But they all disappeared today from my nodes even from Windows machine.
Maybe it has something to do with me adding port=8334 to gapcoin.conf, but maybe not and it's just a coincidence.
Because I could not connect to them from Linux machine at all, I forwarded a port and connected my linux desktop node to my windows node.
I guess now anybody can try to connect to it too (not sure if it will work):
178.141.100.234:31398
EDIT: I removed this node from my linux machine, because with it mining continues even if there is no connections from outer nodes. I do not want forks.
Main alive node de-facto is still:
88.66.203.169

About Nvidia miner: it actually works fine, I just forgot to add -a nvidia to .sh
It seems I can launch multiple instances and they do different work, but I'm not sure about that.
If it's indeed so, then from rtx 3060 with decent multi-core CPU we can get at least 8M primes per second, probably even 10-12M and more.
But it seems it's not possible to mine any shift but 32 on GPU miner. -f parameter is ignored. If anybody know how to change prime shift in
GPU miner, please share this knowledge in this thread.
Even only working 16 or 64 shift will make mining much more fun.
On 32 shift we have the world record aka the biggest merit in the blockchain, no hope to overdid that.

I tried to build miner from source, CPU version no problem, it's compiled fine and works fine afterwards, but no luck with GPU version, probably because I tried to build CPU branch with GPU settings instead of GPU branch
(I've built some binary file for GPU eventually, but it's not working properly and file is different from released miner). Maybe I will try my luck with GPU branch later.

I think the only way for mining to survive is to somehow get some support from hobbyists, who will mine mostly just for sake of it. Even at 10 sat per GAP,
current daily profit from all mined coins is about $2 (0.6GAP*24b/hx24hx10sat). I can buy some from time to time, but it's basically a donation, I have no intention to sell them and I have no much hope that it will be ever possible to sell them later for profit (or even buy some goods, lol, it's a cryptocurrency after all).

Another thing is halvings. They are happen very fast. Honestly I have no idea how even Bitcoin itself will survive them. I prefer the Monero way with constant tail emission. Of course we have no coordination (and probably no skill to build a new wallet) to hard fork GAP for a constant 0.6 (current) or at least at 0.3 (next halving) per block. Primecoin way to go regarding block rewards is also much better in my opinion.

About "death of the coin". Question is: do we want such project to exist - not in a sense of cryptocurrency, but as a math distributed computing project? I think the answer is yes, so why to launch GAP-2 when we already have the original? As long as somebody mine it, as long as coin is more or less alive, we have the blockchain with all results and also a chance to improve them. If anything, we need somebody from Primecoin or Riecoin team to be interested to support the project. Maybe some old whale can send to somebody who can have some interest in GAP some tens/hundreds of thousands of GAP, so such hypothetical dev will have some incentive for price to rise.

Maybe I will try to make the rich list next, but of course, it is much harder task than shift/number of blocks/merit list and calculation of current supply, so I'm not sure that I'm capable of doing this.
wizz13150
Member
**
Offline Offline

Activity: 72
Merit: 27

Tempus Narrabo


View Profile
October 11, 2024, 10:24:46 AM
Last edit: October 11, 2024, 10:53:36 AM by wizz13150
 #2486

Hey,

Current supply on coingecko (17,634,537) and CMP (14,369,569) was not updated for a some time, because well, no any working blockchain explorer.
So I calculated it for the block 2120000 (we at ~2129300 now) and added this info to my table.
about 17 874 521 GAP at the block 2120000.

Yes, the last explorer is now gone since months as the subscription wasn't renew in time...
The last one online was @ https://chainz.cryptoid.info/gap/

It seems sometimes we have 3 nodes on satoshi9.2 connected.
I can connect to them from Windows machine but not from Linux machine.
But they all disappeared today from my nodes even from Windows machine.
Maybe it has something to do with me adding port=8334 to gapcoin.conf, but maybe not and it's just a coincidence.
Because I could not connect to them from Linux machine at all, I forwarded a port and connected my linux desktop node to my windows node.
I guess now anybody can try to connect to it too (not sure if it will work):
178.141.100.234:31398
EDIT: I removed this node from my linux machine, because with it mining continues even if there is no connections from outer nodes. I do not want forks.
Main alive node de-facto is still:
88.66.203.169

82.66.203.169 is mine, yep it's more or less the main one at this point (Not the more stable, ahah). I got the network unstuck in August with this one.
I did forward the port 31469 for this machine, for a better connectivity.
With this port (TCP/UDP) forwarded, you should reach ~12 peers. (I do)

About Nvidia miner: it actually works fine, I just forgot to add -a nvidia to .sh
It seems I can launch multiple instances and they do different work, but I'm not sure about that.
If it's indeed so, then from rtx 3060 with decent multi-core CPU we can get at least 8M primes per second, probably even 10-12M and more.
But it seems it's not possible to mine any shift but 32 on GPU miner. -f parameter is ignored. If anybody know how to change prime shift in
GPU miner, please share this knowledge in this thread.
Even only working 16 or 64 shift will make mining much more fun.
On 32 shift we have the world record aka the biggest merit in the blockchain, no hope to overdid that.

Good.
Indeed, the gpu miner is hardcoded on shift 32. I don't remember, but i wasn't able to edit this and compile at the time.
The Gapminers are very CPU intensive yes. Parts of the calculations are still running on the CPU and couldn't be moved to the GPU, as i know.
8MPPS is a very nice value for a 3060 tho. I think i got only 3, can't test rn.
Or you're running multiple instances of the miner on the same card ?! This may indeed increase the total as well, if the CPU allows it.

FYI: The GPU miner is basically the CPU miner, doing the same job but faster.
The CRT miner is using the Chinese Remainder Theorem.
This way, the miner can mine at higher shifts, less randomly. At first, the limit was 256, then 512, then 1024. To go higher would imply some security issues regarding the PoW.
All this to say : The limit where one miner is better than the other is around shift 128.
You will prefer to use the CRT miner above 128, and the CPU miner below.
There is also a big drop in performance between shift 64 and shift 65.

You can find some stuff here.
It's quite a mess ahah, and would need some explanation ofc. But you can find some additional informations about the Gapcoin and some of my tests.
Also, many messages got removed by the mods over time ........ But you should read the first 100 pages of this post, it's more technical and very interesting. Also with the original dev (not the creator).

I tried to build miner from source, CPU version no problem, it's compiled fine and works fine afterwards, but no luck with GPU version, probably because I tried to build CPU branch with GPU settings instead of GPU branch
(I've built some binary file for GPU eventually, but it's not working properly and file is different from released miner). Maybe I will try my luck with GPU branch later.

All the binaries will be harder to compile over time, unfortunately..

I think the only way for mining to survive is to somehow get some support from hobbyists, who will mine mostly just for sake of it. Even at 10 sat per GAP,
current daily profit from all mined coins is about $2 (0.6GAP*24b/hx24hx10sat). I can buy some from time to time, but it's basically a donation, I have no intention to sell them and I have no much hope that it will be ever possible to sell them later for profit (or even buy some goods, lol, it's a cryptocurrency after all).

Huh, it would be very cool in another context. But honestly, don't waste any money on the markets without a more global plan.
I injected something between 0.25 and 0.5 btc since 2018, it's probably why it's still not at 1 sat.
You'll just feed some greedy people without any interest in the Maths.

Another thing is halvings. They are happen very fast. Honestly I have no idea how even Bitcoin itself will survive them. I prefer the Monero way with constant tail emission. Of course we have no coordination (and probably no skill to build a new wallet) to hard fork GAP for a constant 0.6 (current) or at least at 0.3 (next halving) per block. Primecoin way to go regarding block rewards is also much better in my opinion.

Not much to say about this..
Nota Bene: The reward is also indexed on the difficulty (logarithmic).

About "death of the coin". Question is: do we want such project to exist - not in a sense of cryptocurrency, but as a math distributed computing project? I think the answer is yes, so why to launch GAP-2 when we already have it? As long as somebody mine it, as long as coin is more or less alive, we have the blockchain with all results and also a chance to improve them. If anything, we need somebody from Primecoin or Riecoin team to be interested to support the project. Maybe some old whale can send somebody who can have some interest in GAP some tens/hundreds of thousands of GAP, so such hypothetical dev will have some incentive for price to rise.

Huh. The last OG interested in the project was BitcoinFX. This guy literally responded to the welcome message of Satoshi on this forum.
The last Dev was M. Higgins.
And I was the last lambda guy interested as you seems to be in this project.
None have succeeded in this task to make the Gapcoin project attractive again…

Here is my gapcoin.conf main lines (windows) :
Code:
listen=1
server=1
daemon=1
port=31469
rpcport=31397
rpcallowip=127.0.0.1
rpcuser=rpcuser
rpcpassword=rpcpassword
maxconnections=24

Check out the About section of the QT, M. Higgins added a really cool story (;

Cheers ! 🥂

Wizz_^
Pages: « 1 ... 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 [125]
  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!