Bitcoin Forum
June 26, 2024, 06:40:38 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: 2 Questions about 2 row of code . 0.01 BTC as reward to the first who explain.  (Read 986 times)
Terminator3018 (OP)
Member
**
Offline Offline

Activity: 107
Merit: 10


View Profile
February 14, 2014, 11:40:10 PM
Last edit: February 15, 2014, 09:16:51 AM by Terminator3018
 #1

[0.01 BTC as reward to the first who answer me with the explanation]
Hi,
What are the parts marked in red used for?

txNew.vin[0].scriptSig = CScript() << 0x0197d877 << CBigNum(4) << vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));

unsigned char pchMessageStart[4] = { 0x01, 0x97, 0xd8, 0x77 };

[Extra 0.005 BTC as reward if you answer to this too]
I'm also not sure what time should be used in this row :
block.nTime  = 1390586275;

I know that I should use the "epochtime" but when should I copy it? I mean from when?As soon as I start to launch my coin?
Thank you in advance
Best regards

Edit : Rewards increased.
roslinpl
Legendary
*
Offline Offline

Activity: 2212
Merit: 1199


View Profile WWW
February 14, 2014, 11:46:08 PM
 #2

Small bounty...

Those are ... refs to memory sectors? :-)
Terminator3018 (OP)
Member
**
Offline Offline

Activity: 107
Merit: 10


View Profile
February 15, 2014, 09:16:15 AM
 #3

I don't think so. Because for different source codes of different currencies there are different "numbers".
Terminator3018 (OP)
Member
**
Offline Offline

Activity: 107
Merit: 10


View Profile
February 15, 2014, 09:23:13 AM
 #4

Small bounty...

Those are ... refs to memory sectors? :-)

I just raised up the buonties Wink
Ix
Full Member
***
Offline Offline

Activity: 218
Merit: 128


View Profile
February 15, 2014, 09:23:41 AM
 #5

I don't know about the first one, but the second one is the magic bytes of the protocol for identification.
Terminator3018 (OP)
Member
**
Offline Offline

Activity: 107
Merit: 10


View Profile
February 15, 2014, 09:29:00 AM
 #6

I don't know about the first one, but the second one is the magic bytes of the protocol for identification.

Yeah , I know that but what should I write instead of them?What bytes should I use?
tgendev
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
February 15, 2014, 09:33:34 AM
 #7

A salt value is a random value.
Terminator3018 (OP)
Member
**
Offline Offline

Activity: 107
Merit: 10


View Profile
February 15, 2014, 09:37:05 AM
 #8

With "salt value" you mean the magic numbers?
djarot
Sr. Member
****
Offline Offline

Activity: 350
Merit: 254


View Profile
February 15, 2014, 10:16:44 AM
 #9

lemme try

Code:
unsigned char pchMessageStart[4] = { 0x01, 0x97, 0xd8, 0x77 }; 


0x01    The next opcode bytes is data to be pushed onto the stack
0x97    a b    out    Returns the remainder after dividing a by b. disabled.
0xd8    ??
0x77    Removes the second-to-top stack item.
Terminator3018 (OP)
Member
**
Offline Offline

Activity: 107
Merit: 10


View Profile
February 15, 2014, 12:56:45 PM
 #10

So , let's say I want to edit this crypto-currency and make my own. Should I put random numbers instead of these? Or should I leave this unchanged?
rat4
Full Member
***
Offline Offline

Activity: 323
Merit: 197


Two-way squared


View Profile WWW
February 15, 2014, 03:21:20 PM
 #11

unsigned char pchMessageStart[4] = { 0x01, 0x97, 0xd8, 0x77 };

It's magic identification number. You can leave this as is or choose new random one. Does not really matter.

I'm also not sure what time should be used in this row :
block.nTime  = 1390586275;

I know that I should use the "epochtime" but when should I copy it? I mean from when?As soon as I start to launch my coin?

It's timestamp of genesis (first) block. Put there timestamp of launch. (timestamp = epochtime)

Terminator3018 (OP)
Member
**
Offline Offline

Activity: 107
Merit: 10


View Profile
February 15, 2014, 03:41:37 PM
 #12

Please provide me your BTC address so I can send you part of the reward.
What about the first row?Do you have any clue of what is it used about or what should I change it with?
With the "timestamp of launch" you mean when I will update my thread containing the currency source code on github?

Thank you.
rat4
Full Member
***
Offline Offline

Activity: 323
Merit: 197


Two-way squared


View Profile WWW
February 15, 2014, 04:34:55 PM
Last edit: February 15, 2014, 05:32:03 PM by rat4
 #13

Quote
What about the first row?Do you have any clue of what is it used about or what should I change it with?

"txNew.vin[0].scriptSig = " can be anything; it isn't used. See https://en.bitcoin.it/wiki/Transactions#Generation

Quote
With the "timestamp of launch" you mean when I will update my thread containing the currency source code on github?

I mean start of mining.

My BTC address: 14T4i9rQmG7zufSgxLbcKhwwRG5VykyoYy
Thanks

Terminator3018 (OP)
Member
**
Offline Offline

Activity: 107
Merit: 10


View Profile
February 15, 2014, 07:15:39 PM
 #14

Bitcoins sent , please check.
Add me on skype if you want , I'll probably need more tips in the future.
Skype id : terminaattore

Thank you again.
rat4
Full Member
***
Offline Offline

Activity: 323
Merit: 197


Two-way squared


View Profile WWW
February 15, 2014, 08:04:37 PM
 #15

BTC are received. I don't use skype, feel free to send PM.

roslinpl
Legendary
*
Offline Offline

Activity: 2212
Merit: 1199


View Profile WWW
February 16, 2014, 12:26:07 AM
 #16

BTC are received. I don't use skype, feel free to send PM.

task done Smiley nice!
Congrats to a winner!
Pages: [1]
  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!