Bitcoin Forum
May 06, 2024, 03:21:33 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 »  All
  Print  
Author Topic: back to creating new alt coin  (Read 440 times)
mironkraft (OP)
Jr. Member
*
Offline Offline

Activity: 78
Merit: 4


View Profile
December 24, 2021, 05:53:57 PM
 #1

Hello there, I am back to the forum and I would like to achieve creating a coin, maybe based on bitcoin (now ver 22.0) or any other plataform

In the past I tried to make it based on 21.0 and stucked on the creation of the genesis block
(some of the posts where I asked help)
https://bitcointalk.org/index.php?topic=5319944.20
https://bitcointalk.org/index.php?topic=5320062.msg56435394#msg56435394

anyways this are not important

Anyone could help me to achieve creating a coin by myself? Or does anywhere were i can found a updated tutorial for it?
(I used linux to reach genesis block)

Thanks a lot, have a nice day!
The network tries to produce one block per 10 minutes. It does this by automatically adjusting how difficult it is to produce blocks.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1512
Merit: 7351


Farewell, Leo


View Profile
December 24, 2021, 06:37:05 PM
Merited by PawGo (1), JustAnOtherLoser (1)
 #2

Alright, so here's what you're going to do. Go on genesisgen on github, download genesis.c and build it. Once you have the executable, run name.exe <pubkey> <timestamp> <nBits>.

In <pubkey> you should add your public key in uncompressed format. In <timestamp> your message. In <nBits> the target. Leave it on 486604799 (1d00ffff) which is the lowest you can have with a difficulty of 1.

Once you mine the genesis block, the program will return you the coinbase script, the scriptPubKey, the merkle hash, the byteswapped merkle hash, the unix time, the nonce and finally the genesis block's hash.

1. Change the genesisOutputScript to your scriptPubKey from #L54.
2. Change genesis.hashMerkleRoot to the byteswapped merkle hash in #L114.
3. Change consensus.hashGenesisBlock to your block's hash in #L113.
4. Change the first two values from the CreateGenesisBlock function to the unix time and nonce respectively in #L111.
5. Build Bitcoin Core.

I've made a tutorial here: How to create your own altcoin (v0.20.1). It should be the same for the latest version of Bitcoin Core.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
mironkraft (OP)
Jr. Member
*
Offline Offline

Activity: 78
Merit: 4


View Profile
December 24, 2021, 09:57:06 PM
 #3

Alright, so here's what you're going to do. Go on genesisgen on github, download genesis.c and build it. Once you have the executable, run name.exe <pubkey> <timestamp> <nBits>.

In <pubkey> you should add your public key in uncompressed format. In <timestamp> your message. In <nBits> the target. Leave it on 486604799 (1d00ffff) which is the lowest you can have with a difficulty of 1.

Once you mine the genesis block, the program will return you the coinbase script, the scriptPubKey, the merkle hash, the byteswapped merkle hash, the unix time, the nonce and finally the genesis block's hash.

1. Change the genesisOutputScript to your scriptPubKey from #L54.
2. Change genesis.hashMerkleRoot to the byteswapped merkle hash in #L114.
3. Change consensus.hashGenesisBlock to your block's hash in #L113.
4. Change the first two values from the CreateGenesisBlock function to the unix time and nonce respectively in #L111.
5. Build Bitcoin Core.

I've made a tutorial here: How to create your own altcoin (v0.20.1). It should be the same for the latest version of Bitcoin Core.

Hi! Thanks for your time in advace

Building genesis in linux right? excuse me for asking maybe stupid things, between language and that I am a bit rusted..

I might start all over with your tutorial, since i worked on bitcoin 2.1 and now is 22.00

Ill keep informed in this post hows going

Thanks again!
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1512
Merit: 7351


Farewell, Leo


View Profile
December 25, 2021, 11:56:09 AM
 #4

Building genesis in linux right? excuse me for asking maybe stupid things, between language and that I am a bit rusted..
You can either build it in linux or windows. May I assume you're a Windows user? Just install gcc and run gcc genesis.c -o genesis.exe

I might start all over with your tutorial, since i worked on bitcoin 2.1 and now is 22.00
You mean 0.21, right?

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
mironkraft (OP)
Jr. Member
*
Offline Offline

Activity: 78
Merit: 4


View Profile
December 27, 2021, 12:05:36 AM
 #5

Building genesis in linux right? excuse me for asking maybe stupid things, between language and that I am a bit rusted..
You can either build it in linux or windows. May I assume you're a Windows user? Just install gcc and run gcc genesis.c -o genesis.exe

I might start all over with your tutorial, since i worked on bitcoin 2.1 and now is 22.00
You mean 0.21, right?

I usually use Windows (have windows virtualization for ubuntu) and i have workd even on backtrack distro old days

Yes, well I mean 21.0 after 22.0 update
mironkraft (OP)
Jr. Member
*
Offline Offline

Activity: 78
Merit: 4


View Profile
December 27, 2021, 02:35:22 AM
Merited by Kavelj22 (1)
 #6

First stuck

Hello there!

Well, I just started and im stucked at this point of your tutorial;

Quote
Now we will choose a different signature message in pchMessageStart of chainparams.cpp. This is a very important step, if it is not changed and you connect to a bitcoin node it will consider the bitcoin blockchain as the correct one. Do it like this:
Code:
pchMessageStart[0] = 0xf0;
pchMessageStart[1] = 0xb0;
pchMessageStart[2] = 0xb0;
pchMessageStart[3] = 0xd0;

Optional, but you can change the address prefix too. (1, 3, bc1)
Link of all prefixes: https://en.bitcoin.it/wiki/List_of_address_prefixes
In the base58Prefixes of chainparams.cpp I will show an example of the "X" prefix:
Code:
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,75);

First part, I have succesfully* done changing the 3 part where the pch message on the chainparams neded:

Code:
		pchMessageStart[0] = 0xf0;
pchMessageStart[1] = 0xb0;
pchMessageStart[2] = 0xb0;
pchMessageStart[3] = 0xd0;
        nDefaultPort = 17333;
        nPruneAfterHeight = 1000;
        m_assumed_blockchain_size = 40;
        m_assumed_chain_state_size = 2;

Code:
		pchMessageStart[0] = 0xf0;
pchMessageStart[1] = 0xb0;
pchMessageStart[2] = 0xb0;
pchMessageStart[3] = 0xd0;
        nDefaultPort = 17444;
        nPruneAfterHeight = args.GetBoolArg("-fastprune", false) ? 100 : 1000;
        m_assumed_blockchain_size = 0;
        m_assumed_chain_state_size = 0;

Code:
		pchMessageStart[0] = 0xf0;
pchMessageStart[1] = 0xb0;
pchMessageStart[2] = 0xb0;
pchMessageStart[3] = 0xd0;
        nDefaultPort = 17444;
        nPruneAfterHeight = args.GetBoolArg("-fastprune", false) ? 100 : 1000;
        m_assumed_blockchain_size = 0;
        m_assumed_chain_state_size = 0;


*It is really fine? as my point of view those 3 parts should have diferent prefixes, or i am wrong?



But, when I want to go to the step:  base58Prefixes

I stuck since I really don´t understand 100% this configuration and what should i do
(for me is important to know for what is this and how should I do fine)

Las time ive done it i followed this from another source:
Quote
Change address prefixes
Finally, let’s dive into the source code. Currently there are 3 standard address types in Bitcoin:
Pay to Pubkey Hash
Mainnet prefix “1”
Testnet/Regtest prefix “m or n”
Pay to Script Hash
Mainnet prefix “3”
Testnet/Regtest prefix “2”
Bech32 (Segwit)
Mainnet prefix “bc1”
Testnet prefix “tb1”
Regtest prefix “bcrt1”
Since these addresses are base58check encoded (except for bech32 which is it’s own custom encoding), we can set any prefix we want by using this helpful table of values found at https://en.bitcoin.it/wiki/List_of_address_prefixes. The source file containing these prefix settings is src/chainparams.cpp:
Code:
// Mainnet: Line 140
// ...
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,0);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5);
base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,128);
base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x88, 0xB2, 0x1E};
base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x88, 0xAD, 0xE4};
bech32_hrp = "bc";
// ...
// Testnet: Line 244
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);
base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,239);
base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x35, 0x87, 0xCF};
base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x35, 0x83, 0x94};
bech32_hrp = "tb";
// ...
// Regtest: Line 344
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);
base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,239);
base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x35, 0x87, 0xCF};
base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x35, 0x83, 0x94};
bech32_hrp = "bcrt";
...
We want our p2pkh addresses to start with the letter “K” on mainnet and “k” on testnet and regtest. Then we want p2psh addresses to start with “L” on mainnet and “t” on testnet and regtest. We’ll keep secret keys the same, but we’ll change the bech32 addresses to “lc”, “tl”, and “lcrt” for mainnet, testnet, and regtest respectively. Based on the values in the table linked above, our chainparams.cpp becomes:
Code:
// Mainnet: Line 140
// ...
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,45); // K
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,48); // L
// ...
bech32_hrp = "lc";
// ...
// Testnet: Line 244
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,107); // k
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,65);  // t
// ...
bech32_hrp = "tl";
// ...
// Regtest: Line 344
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,107); // k
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,65);  // t
// ...
bech32_hrp = "lcrt";
...
mironkraft (OP)
Jr. Member
*
Offline Offline

Activity: 78
Merit: 4


View Profile
December 28, 2021, 11:41:00 PM
 #7

Building genesis in linux right? excuse me for asking maybe stupid things, between language and that I am a bit rusted..
You can either build it in linux or windows. May I assume you're a Windows user? Just install gcc and run gcc genesis.c -o genesis.exe

I might start all over with your tutorial, since i worked on bitcoin 2.1 and now is 22.00
You mean 0.21, right?

Hi black hat!

Hope you dont mind I quote you, could you help me to check whats wrong in my move in the last post?

thanks a lot, and hope doesnt disturbs you

thnx
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1512
Merit: 7351


Farewell, Leo


View Profile
December 29, 2021, 08:16:41 AM
 #8

*It is really fine? as my point of view those 3 parts should have diferent prefixes, or i am wrong?
It seems fine to me. You've only changed the signature message and the port number, right?

I stuck since I really don´t understand 100% this configuration and what should i do
In my tutorial, I've added this as an example:
Code:
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,75);

The “75” defines that the addresses will start with the letter “X”. You do the exact thing for any prefix. Choose the leading symbol and replace the number with its decimal version.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
mironkraft (OP)
Jr. Member
*
Offline Offline

Activity: 78
Merit: 4


View Profile
December 29, 2021, 09:04:50 AM
 #9

*It is really fine? as my point of view those 3 parts should have diferent prefixes, or i am wrong?
It seems fine to me. You've only changed the signature message and the port number, right?

I stuck since I really don´t understand 100% this configuration and what should i do
In my tutorial, I've added this as an example:
Code:
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,75);

The “75” defines that the addresses will start with the letter “X”. You do the exact thing for any prefix. Choose the leading symbol and replace the number with its decimal version.

- 1 - Yes, signature and port number

- 2 - Ok, I understand that this makes the adress for each "user" / "direction"

How about if I leave it like that?

If not, I will choose 120   q   34

It should be like this right?:

ORIGINAL:
Code:

        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,0);
        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5);
        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,128);
        base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x88, 0xB2, 0x1E};
        base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x88, 0xAD, 0xE4};

        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);
        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);
        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,239);
        base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x35, 0x87, 0xCF};
        base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x35, 0x83, 0x94};


CHANGED:

Code:

        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(120,75);
        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5);
        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,128);
        base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x88, 0xB2, 0x1E};
        base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x88, 0xAD, 0xE4};

        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(120,75);
        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);
        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,239);
        base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x35, 0x87, 0xCF};
        base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x35, 0x83, 0x94};


Sorry if I dont understand clrearly, some technical english is kinda hard for me

Thanks in advance!
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1512
Merit: 7351


Farewell, Leo


View Profile
December 29, 2021, 09:08:20 AM
 #10

Code:
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(120,75);
It should be like this:
Code:
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,75);

Don't change the “1”, just the number next to it.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
mironkraft (OP)
Jr. Member
*
Offline Offline

Activity: 78
Merit: 4


View Profile
December 29, 2021, 09:39:37 AM
 #11

Code:
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(120,75);
It should be like this:
Code:
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,75);

Don't change the “1”, just the number next to it.

and what happens with the scrip_adress? shouldnt be changed? or its only pubkey?
I remember time ago that it needed to be changed
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1512
Merit: 7351


Farewell, Leo


View Profile
December 29, 2021, 09:50:10 AM
 #12

and what happens with the scrip_adress? shouldnt be changed? or its only pubkey?

Yes, you can change the SCRIPT_ADDRESS too in the same way.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
mironkraft (OP)
Jr. Member
*
Offline Offline

Activity: 78
Merit: 4


View Profile
December 29, 2021, 10:09:56 AM
 #13

and what happens with the scrip_adress? shouldnt be changed? or its only pubkey?

Yes, you can change the SCRIPT_ADDRESS too in the same way.

but what is the meaning of chainging it? I mean, if pubkey is something that people sees, for what is the script adress, what it is?

also, I only need to change the pubkey, not the script right?
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1512
Merit: 7351


Farewell, Leo


View Profile
December 29, 2021, 10:25:01 AM
 #14

The SCRIPT_ADDRESS stands for the P2SH addresses, those that start with 3. If you notice it, it has “5” in the decimal version:
Code:
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5);

And by going to the page I've linked it you can see the decimal prefixes and their leading symbols:


Change it to whatever you want. Same goes for SECRET_KEY & PUBKEY_ADDRESS.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
mironkraft (OP)
Jr. Member
*
Offline Offline

Activity: 78
Merit: 4


View Profile
December 29, 2021, 10:56:16 AM
 #15

The SCRIPT_ADDRESS stands for the P2SH addresses, those that start with 3. If you notice it, it has “5” in the decimal version:
Code:
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5);

And by going to the page I've linked it you can see the decimal prefixes and their leading symbols:


Change it to whatever you want. Same goes for SECRET_KEY & PUBKEY_ADDRESS.

oH! GREAT! understood!

I will leave it like this (question down also):

Line 140:
Code:
        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,45);
        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,48);
        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,128);
        base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x88, 0xB2, 0x1E};
        base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x88, 0xAD, 0xE4};

        bech32_hrp = "ac";

Line 244
Code:
        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,107);
        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,65);
        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,239);
        base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x35, 0x87, 0xCF};
        base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x35, 0x83, 0x94};

        bech32_hrp = "tb";

Line 369
Code:
        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,107);
        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,65);
        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,239);
        base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x35, 0x87, 0xCF};
        base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x35, 0x83, 0x94};

        bech32_hrp = "ta";

Line 466
Code:
        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,107);
        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,65);
        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1,239);
        base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x35, 0x87, 0xCF};
        base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x35, 0x83, 0x94};

        bech32_hrp = "acrt";


About the bech32_hrp code, shouldn´t be changed when you change the adresses?
Also, in line 244, if I have to change that bech32 code, I have done it right? or should be another letters?
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1512
Merit: 7351


Farewell, Leo


View Profile
December 29, 2021, 02:07:36 PM
 #16

About the bech32_hrp code, shouldn´t be changed when you change the adresses?
Why do you want so bad to change the prefixes? Have you tested to see if your altcoin is working? The prefix/styling is secondary.

Also, in line 244, if I have to change that bech32 code, I have done it right? or should be another letters?
It seems fine. I don't cross my arms that you just change that variable and the “bc” prefix becomes invalid.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
mironkraft (OP)
Jr. Member
*
Offline Offline

Activity: 78
Merit: 4


View Profile
December 29, 2021, 02:49:02 PM
 #17

About the bech32_hrp code, shouldn´t be changed when you change the adresses?
Why do you want so bad to change the prefixes? Have you tested to see if your altcoin is working? The prefix/styling is secondary.

Also, in line 244, if I have to change that bech32 code, I have done it right? or should be another letters?
It seems fine. I don't cross my arms that you just change that variable and the “bc” prefix becomes invalid.

1- so I can maintain them as the bitcoin original right? wanted to change to make it "unique"

I guess the best is to leave it like it was

2- sorry didnt understand fine your answer, never tested if the coin works
mironkraft (OP)
Jr. Member
*
Offline Offline

Activity: 78
Merit: 4


View Profile
December 29, 2021, 03:45:28 PM
Last edit: December 29, 2021, 04:21:47 PM by mironkraft
 #18

Well, I go further and ask also, on your tutorial, you say:

Quote
We have to set the difficulty equal with 1, since you will be the only miner at the beginning. At chainparams.cpp change nMinimumChainWork:

Code:
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000000000100010001");

I guess you mean to change every nMinimumChainWork to ("0x0000000000000000000000000000000000000000000000000000000100010001") on all the lines that we can found on the chainparams right?


Also, in the next step, when you say to delete vSeeds.emplace_back, you mean to delete complete lines from the chainparams?

Code:
        vSeeds.emplace_back("seed.XXXXcoin.sipa.be."); // Pieter Wuille, only supports x1, x5, x9, and xd
        vSeeds.emplace_back("dnsseed.bluematt.me."); // Matt Corallo, only supports x9
        vSeeds.emplace_back("dnsseed.XXXXcoin.dashjr.org."); // Luke Dashjr
        vSeeds.emplace_back("seed.XXXXcoinstats.com."); // Christian Decker, supports x1 - xf
        vSeeds.emplace_back("seed.XXXXcoin.jonasschnelli.ch."); // Jonas Schnelli, only supports x1, x5, x9, and xd
        vSeeds.emplace_back("seed.btc.petertodd.org."); // Peter Todd, only supports x1, x5, x9, and xd
        vSeeds.emplace_back("seed.XXXXcoin.sprovoost.nl."); // Sjors Provoost
        vSeeds.emplace_back("dnsseed.emzy.de."); // Stephan Oeste
        vSeeds.emplace_back("seed.XXXXcoin.wiz.biz."); // Jason Maurice


Thanks for your time!
mironkraft (OP)
Jr. Member
*
Offline Offline

Activity: 78
Merit: 4


View Profile
December 29, 2021, 05:28:47 PM
 #19

Well I followed my instinct and done everything

Right now, after going for the genesis block, I would like to ask some questions about the development:

1- Do we work on RPC and P2P ports on chainparams?
2- What about the seeds? Do they need to be chainged?
3- In coin distribution (max supply, block rewards, halving interval, block time, sieze, BIPs) are needed to be changed?
4- if the answer of 3 is YES, does it mean that I am making my own way to have own blockchain, meaning it as HARDFORK?
5- Doing my own Genesis block means also HardFork?
6- If bitcoin gets updated to 0.23 and my coin is 0.22, as softfork I can update the changes with the original bitcoin? and as HardFork I coulndt update right?




Right now, I want to do my own genesis block (I know that in your tutorial doesnt appears)

So, AFAIK I found information about;

Quote

Old tutorial found: https://medium.com/@jordan.baczuk/how-to-fork-bitcoin-part-2-59b9eddb49a4


For me, it keeps understanding that making my own Genesis Block is hardforking

Thanks for your time if you answer

BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1512
Merit: 7351


Farewell, Leo


View Profile
December 29, 2021, 06:04:26 PM
 #20

1- so I can maintain them as the bitcoin original right? wanted to change to make it "unique"
I'm sorry but I fail to understand what you're trying to mean here and because words matter in this subject, I'll have to ask you to repeat it in another way.

2- sorry didnt understand fine your answer, never tested if the coin works
You have to make it work first and then check for these secondary changes.

I guess you mean to change every nMinimumChainWork to ("0x0000000000000000000000000000000000000000000000000000000100010001") on all the lines that we can found on the chainparams right?
Yes. At least if testnet or signet matter in your altcoin.

Also, in the next step, when you say to delete vSeeds.emplace_back, you mean to delete complete lines from the chainparams?
Yes.

1- Do we work on RPC and P2P ports on chainparams?
What do you mean “we work”? Whenever you want to establish a connection you'll use those ports, yeah.

2- What about the seeds? Do they need to be chainged?
The seeds need to be removed. There's no point of having a seed from another block chain.

3- In coin distribution (max supply, block rewards, halving interval, block time, sieze, BIPs) are needed to be changed?
It's your decision. Leave them the same as bitcoin's if you don't care.

4- if the answer of 3 is YES, does it mean that I am making my own way to have own blockchain, meaning it as HARDFORK?
It's not a hard fork if you're building it from scratch. Remember that you start another block chain from 0. A hard fork happens within a certain block of the already existent chain.

5- Doing my own Genesis block means also HardFork?
No.

6- If bitcoin gets updated to 0.23 and my coin is 0.22, as softfork I can update the changes with the original bitcoin? and as HardFork I coulndt update right?
I guess you will be able to. You'll have to take 0.23's source code and rewrite the same values.

Right now, I want to do my own genesis block (I know that in your tutorial doesnt appears)
I've given you a link: https://github.com/liveblockchain/genesisgen

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Pages: [1] 2 3 »  All
  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!