Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work or outdated. #1

Open
CryptoRescue opened this issue Feb 18, 2018 · 19 comments
Open

Doesn't work or outdated. #1

CryptoRescue opened this issue Feb 18, 2018 · 19 comments

Comments

@CryptoRescue
Copy link

Doesn't work or outdated.

python gen.py -a lyra2re
04ffff001d0104435468652054696d65732031382f4a616e2f323031382e20446f6e277420776f726b20666f72207765656b656e64732c20776f726b20666f72206f757220676f616c732e
Traceback (most recent call last):
File "gen.py", line 260, in
main()
File "gen.py", line 17, in main
tx = create_transaction(input_script, output_script,options)
File "gen.py", line 74, in create_transaction
transaction = Struct("transaction",
NameError: global name 'Struct' is not defined

That's when trying to generate the Lyra2re algo genesis block as a test.

@nasa8x
Copy link
Owner

nasa8x commented Feb 25, 2018

I do not know what's error. Because I tried and did not generate any errors.

04ffff001d0104435468652054696d65732031382f4a616e2f323031382e20446f6e277420776f726b20666f72207765656b656e64732c20776f726b20666f72206f757220676f616c732e
algorithm: lyra2re
merkle hash: 26f31a72cb4a7b97caeeb49a9177e40d71f09de7a04f0380f7889a8c2494973a
pszTimestamp: The Times 18/Jan/2018. Don't work for weekends, work for our goals.
pubkey: 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f
time: 1519486222
bits: 0x1e0ffff0
Searching for genesis hash...
genesis hash found!
nonce: 267811
genesis hash: 00000712f28a14716df6e00e5f14f33ef0945cf771cd25f63faefc606b577fa6
Nasas-MacBook-Pro:genesis-block nasa8x$ 04ffff001d0104435468652054696d65732031382f4a616e2f323031382e20446f6e277420776f726b20666f72207765656b656e64732c20776f726b20666f72206f757220676f616c732e

@marvic41
Copy link

marvic41 commented Feb 26, 2018

Hello,
I got this error
python gen.py -a quark -t 1517542208 -z "Don't work for weekends, work for our goals - 18/Jan/2018." -p "04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f" 04ffff001d01043a446f6e277420776f726b20666f72207765656b656e64732c20776f726b20666f72206f757220676f616c73202d2031382f4a616e2f323031382e Traceback (most recent call last): File "gen.py", line 261, in <module> main() File "gen.py", line 18, in main tx = create_transaction(input_script, output_script,options) File "gen.py", line 76, in create_transaction Bytes("version", 4), TypeError: __init__() takes exactly 2 arguments (3 given)
Installed python 2.7 and sudo pip install git+git://github.com/nasa8x/mixhash.git
How to create hash?

@rushiraj111
Copy link

I am getting same error:

python gen.py -a quark -t 1517542208 -z "Don't work for weekends, work for our goals - 18/Jan/2018." -p "04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f" 04ffff001d01043a446f6e277420776f726b20666f72207765656b656e64732c20776f726b20666f72206f757220676f616c73202d2031382f4a616e2f323031382e Traceback (most recent call last): File "gen.py", line 261, in main() File "gen.py", line 18, in main tx = create_transaction(input_script, output_script,options) File "gen.py", line 76, in create_transaction Bytes("version", 4), TypeError: init() takes exactly 2 arguments (3 given)

@Oxygencoin
Copy link

debian@debian:~/genesis-block$ python gen.py -a quark -t 1509408000 -z "start 10/31/2017 12:00am (UTC)" -p "04aee5271cc17e6477ed9ff5a6ac1a4fdd5ca3457b28f19c738ebc69a7d5c1de9fac19c226c76a9ea912228b9c0bfd127d28bd36ca7c3d20befe42185e09318d52"
04ffff001d0104257374617274206f787967656e2031302f33312f323031372031323a3030616d202855544329
algorithm: quark
merkle hash: 1a7c02fcc66b4891d8e0b2b84d2e7d186d6c5347f08e78dcd85faa241f0211a2
pszTimestamp: start oxygen 10/31/2017 12:00am (UTC)
pubkey: 04aee5271cc17e6477ed9ff5a6ac1a4fdd5ca3457b28f19c738ebc69a7d5c1de9fac19c226c76a9ea912228b9c0bfd127d28bd36ca7c3d20befe42185e09318d52
time: 1509408000
bits: 0x1e0ffff0
Searching for genesis hash...
Cannot run quark algorithm: module quark_hash not found

SOS!!!

@tofutim
Copy link

tofutim commented Mar 12, 2018

sudo pip install quark-hash

@phantanthanh1996
Copy link

Hello, i have get same error
~/genesis-block# python gen.py -a quark -t 1520906820 -z "Test with new coin" -p "04c10e83b2703ccf322f7dbd62dd5855ac7c10bd055814ce121ba32607d573b8810c02c0582aed05b4deb9c4b77b26d92428c61256cd42774babea0a073b2ed0c9"
Traceback (most recent call last):
File "gen.py", line 6, in
from construct import *
ImportError: No module named construct

Pls help me!

@rushiraj111
Copy link

@phantanthanh1996 install following deps:

sudo pip install construct
sudo pip install quark-hash

@rushiraj111
Copy link

@tofutim Working now 👍

@phantanthanh1996
Copy link

phantanthanh1996 commented Mar 13, 2018

python gen.py -a quark -t 1520906820 -z "Test with new coin" -p "04c10e83b2703ccf322f7dbd62dd5855ac7c10bd055814ce121ba32607d573b8810c02c0582aed05b4deb9c4b77b26d92428c61256cd42774babea0a073b2ed0c9"
04ffff001d010412546573742077697468206e657720636f696e
Traceback (most recent call last):
File "gen.py", line 261, in
main()
File "gen.py", line 18, in main
tx = create_transaction(input_script, output_script,options)
File "gen.py", line 76, in create_transaction
Bytes("version", 4),
TypeError: __ init __() takes exactly 2 arguments (3 given)
Hi, i am get new error.

@phantanthanh1996
Copy link

Hi rushiraj111, with version python do you use to generate?

@rushiraj111
Copy link

@phantanthanh1996 try this:

pip install construct==2.5.2

@marvic41
Copy link

only x11 is not working. Is code commented ?

@nasa8x
Copy link
Owner

nasa8x commented Mar 20, 2018

Try node.js version more algorithms: https://github.com/nasa8x/node-genesis-block

@SoraKohaku
Copy link

how about genesis for algo cryptonight?

@SoraKohaku
Copy link

SoraKohaku commented May 20, 2018 via email

@ghost
Copy link

ghost commented Jun 2, 2018

my Quark genesis block doesn't work for my coin, It just fails and I get assertion core dumped error.
used this script

DEBIAN COMMAND LINE

root@debian:~/genesis-block# python gen.py -a quark -z "30th April - Worx Birthday YAY!" –p "0460f3c0dc9030b06deecde1dcdf38a0c964fca7b91f3af4891bf6d4afd19e0ca8c49c4be32514cf9cfe7d7815ea881784165b8cc04e56cadce0dd457d75215c08" -t 1527929962
04ffff001d01041f3330746820417072696c202d20576f72782042697274686461792059415921
algorithm: quark
merkle hash: 78c4cba5e2fdae012174f57f89628040e661d0bede071374e2f7cf10aaecc6b6
pszTimestamp: 30th April - Worx Birthday YAY!
pubkey: 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f
time: 1527929962
bits: 0x1e0ffff0
Searching for genesis hash...
genesis hash found!imate: 12.2 h
nonce: 1203045
genesis hash: 000003d2d9c72c327df1b3b2b94cfc07c9e788082ff23e14f06c53ac78d7c757

WHEN STARTING WALLET DAEMON I GET THIS ERROR...

chainparams.cpp:139: CMainParams::CMainParams(): Assertion
`hashGenesisBlock ==
uint256("0x000003d2d9c72c327df1b3b2b94cfc07c9e788082ff23e14f06c53ac78d7c757")'
failed.
Aborted (core dumped)

DEBUG.LOG OUTPUT

2018-06-02 15:11:31 WORX version v1.1.0.0-bef8b40-dirty (2018-05-14
22:21:14 +0200)
2018-06-02 15:11:31 Using OpenSSL version OpenSSL 1.0.2g  1 Mar 2016
2018-06-02 15:11:31 Using BerkeleyDB version Berkeley DB 4.8.30:
(April  9, 2010)
2018-06-02 15:11:31 Default data directory /home/shannon/.worx
2018-06-02 15:11:31 Using data directory /home/shannon/.worx
2018-06-02 15:11:31 Using config file /home/shannon/.worx/worx.conf
2018-06-02 15:11:31 Using at most 125 connections (1024 file
descriptors available)
2018-06-02 15:11:31 Using 2 threads for script verification
2018-06-02 15:11:31 Binding RPC on address ::1 port 3301 (IPv4+IPv6 bind any: 0)
2018-06-02 15:11:31 Binding RPC on address 127.0.0.1 port 3301
(IPv4+IPv6 bind any: 0)
2018-06-02 15:11:31 Using wallet wallet.dat
2018-06-02 15:11:31 init message: Verifying wallet...
2018-06-02 15:11:31 CDBEnv::Open: LogDir=/home/shannon/.worx/database
ErrorFile=/home/shannon/.worx/db.log
2018-06-02 15:11:31 init message: Loading block index...
2018-06-02 15:11:31 Opening LevelDB in /home/shannon/.worx/blocks/index
2018-06-02 15:11:31 Opened LevelDB successfully
2018-06-02 15:11:31 Opening LevelDB in /home/shannon/.worx/chainstate
2018-06-02 15:11:31 Opened LevelDB successfully
2018-06-02 15:11:31 LoadBlockIndexDB: last block file = 0
2018-06-02 15:11:31 LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=0, size=0, heights=0...0, time=1970-01-01...1970-01-01)
2018-06-02 15:11:31 Checking all blk files are present...
2018-06-02 15:11:31 LoadBlockIndexDB: Last shutdown was prepared: false
2018-06-02 15:11:31 LoadBlockIndexDB(): transaction index enabled
2018-06-02 15:11:31 Initializing databases...
2018-06-02 15:11:31 Pre-allocating up to position 0x1000000 in blk00000.dat
2018-06-02 15:11:31 ERROR: CheckProofOfWork() : hash doesn't match nBits
2018-06-02 15:11:31 ERROR: CheckBlockHeader() : proof of work failed
2018-06-02 15:11:31 ERROR: CheckBlock() : CheckBlockHeader failed
2018-06-02 15:11:31 ERROR: ConnectTip() : ConnectBlock
000003d2d9c72c327df1b3b2b94cfc07c9e788082ff23e14f06c53ac78d7c757
failed

Rejected my hash? I have changed all these details in the chainparams.cpp and am getting these issues, why would this be happening? is there another file that has the genesis hash?

@nasa8x
Copy link
Owner

nasa8x commented Jun 2, 2018

Are you sure add right:
time: 1527929962
nonce: 1203045

@ghost
Copy link

ghost commented Jun 2, 2018

when generating the genesis hash it gives a different "pubkey" in the output should I change this for the genesis hash to work?

[have previously generated new keypairs prior to genesis block creation,]

via - "openssl ecparam -genkey -name secp256k1 –out main.pem" ect,ect...

@aboutboy
Copy link

somebody help me, tks:
lce@lce-VirtualBox:~/genesis-block$ python gen.py -a X11 -t 1517542208 -z "Don't work for weekends, work for our goals - 18/Jan/2018." -p "04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f"
Traceback (most recent call last):
File "gen.py", line 2, in
import mixhash
ImportError: No module named mixhash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants