Jump to content




Krist - Minable currency that works across servers (paste updated)


  • You cannot reply to this topic
1697 replies to this topic

#561 PokeAcer

  • Members
  • 143 posts

Posted 31 May 2015 - 06:41 PM

EDIT: It's fine, got Java 8 on that computer now

Edited by PokeAcer, 31 May 2015 - 06:56 PM.


#562 PokeAcer

  • Members
  • 143 posts

Posted 31 May 2015 - 07:30 PM

Just got first payment of Krist from mining, woot!

#563 Pyuu

  • Members
  • 203 posts

Posted 31 May 2015 - 07:56 PM

View PostPokeAcer, on 31 May 2015 - 07:30 PM, said:

Just got first payment of Krist from mining, woot!

What hash rate are you at now?
I still haven't gotten anything from mining.

#564 3d6

  • Members
  • 336 posts

Posted 31 May 2015 - 07:56 PM

View PostPokeAcer, on 31 May 2015 - 04:49 PM, said:

How do you even get said nonce - also you might wan to change the name. Nonce in UK = paedophile (pedophile for the US)
https://en.wikipedia...tographic_nonce

View PostYevano, on 31 May 2015 - 05:04 PM, said:

View PostMayushii, on 31 May 2015 - 04:45 PM, said:

Can someone explain to me how mining really works?
I can't seem to figure out how on the PHP end Coss verifies nonces.
How do you verify a nonce to see if it's valid or not?
Example:
000000004c5fe190d8147191296bedb75af6aa66c20121fbca1ec21090dc9ed3
Nonce = 0y88i6d

But how do you verify this?

When you submit a solution you give the server your address and the nonce. The server already knows the value of the last block, so it just does the same operation you do on the miner to get the hash and compares it to the work value. Specifically, it takes the hash of the address concatenated with the last block and the nonce and uses only the least significant 6 bytes of that hash to compare against the work value.

Client sends: address=k3s72l1pfa, nonce=lolwhatanonce
Last block: 00000000a426
Work number: 65535
Server gets hash of k3s72l1pfa00000000a426lolwhatanonce -> f13240953d6d5db71639658451680d4fbff5916aa37d3826b6c3436cbcbaf92d
Server takes the least significant 6 bytes: 436cbcbaf92d
Decimal form: 74134301899053
74134301899053 > 65535, so the nonce is rejected and no payout occurs.
Most significant, least significant, that sure gets confusing sometimes.
All I know is, when I put it through hash('sha256',$hit) in PHP, I check the first twelve characters from left to right. I'm not sure if that's little or big endian.

#565 Pyuu

  • Members
  • 203 posts

Posted 31 May 2015 - 08:02 PM

View Postcossacksson, on 31 May 2015 - 07:56 PM, said:

View PostPokeAcer, on 31 May 2015 - 04:49 PM, said:

How do you even get said nonce - also you might wan to change the name. Nonce in UK = paedophile (pedophile for the US)
https://en.wikipedia...tographic_nonce

View PostYevano, on 31 May 2015 - 05:04 PM, said:

View PostMayushii, on 31 May 2015 - 04:45 PM, said:

Can someone explain to me how mining really works?
I can't seem to figure out how on the PHP end Coss verifies nonces.
How do you verify a nonce to see if it's valid or not?
Example:
000000004c5fe190d8147191296bedb75af6aa66c20121fbca1ec21090dc9ed3
Nonce = 0y88i6d

But how do you verify this?

When you submit a solution you give the server your address and the nonce. The server already knows the value of the last block, so it just does the same operation you do on the miner to get the hash and compares it to the work value. Specifically, it takes the hash of the address concatenated with the last block and the nonce and uses only the least significant 6 bytes of that hash to compare against the work value.

Client sends: address=k3s72l1pfa, nonce=lolwhatanonce
Last block: 00000000a426
Work number: 65535
Server gets hash of k3s72l1pfa00000000a426lolwhatanonce -> f13240953d6d5db71639658451680d4fbff5916aa37d3826b6c3436cbcbaf92d
Server takes the least significant 6 bytes: 436cbcbaf92d
Decimal form: 74134301899053
74134301899053 > 65535, so the nonce is rejected and no payout occurs.
Most significant, least significant, that sure gets confusing sometimes.
All I know is, when I put it through hash('sha256',$hit) in PHP, I check the first twelve characters from left to right. I'm not sure if that's little or big endian.

Can you show me the step by step process to see if this is correct (I grabbed this from the data.db file btw)
Block Hash: 00000000e98b74219196200c20034fb3a95866e5ff0dfb23dc8d8b18e9821c75
Address: kutlg1kzhz
Nonce: B1hqhr0nco
Difficulty: 65535

Because I can't seem to understand how you would get to the point where Nonce < 65535, even with the little tutorial that Yevano posted.

#566 InDieTasten

  • Members
  • 357 posts
  • LocationGermany

Posted 31 May 2015 - 08:08 PM

View PostMayushii, on 31 May 2015 - 08:02 PM, said:

Can you show me the step by step process to see if this is correct (I grabbed this from the data.db file btw)
Block Hash: 00000000e98b74219196200c20034fb3a95866e5ff0dfb23dc8d8b18e9821c75
Address: kutlg1kzhz
Nonce: B1hqhr0nco
Difficulty: 65535

Because I can't seem to understand how you would get to the point where Nonce < 65535, even with the little tutorial that Yevano posted.
The nonce is used, to have a parameter, that can be changed, so the hash value can alter. You would change the nonce until you find a configuration lastblock hash + your address + nonce, that has a lower value than the difficulty.

Everything AFAIK.

Edited by InDieTasten, 31 May 2015 - 08:09 PM.


#567 PokeAcer

  • Members
  • 143 posts

Posted 31 May 2015 - 08:33 PM

View PostMayushii, on 31 May 2015 - 07:56 PM, said:

View PostPokeAcer, on 31 May 2015 - 07:30 PM, said:

Just got first payment of Krist from mining, woot!

What hash rate are you at now?
I still haven't gotten anything from mining.
1.6MH/s - But remember sometimes your client just gets a block someone's almost done and finish it off. What's your address? I'll send you some ^~^

#568 Pyuu

  • Members
  • 203 posts

Posted 31 May 2015 - 08:46 PM

View PostPokeAcer, on 31 May 2015 - 08:33 PM, said:

View PostMayushii, on 31 May 2015 - 07:56 PM, said:

View PostPokeAcer, on 31 May 2015 - 07:30 PM, said:

Just got first payment of Krist from mining, woot!

What hash rate are you at now?
I still haven't gotten anything from mining.
1.6MH/s - But remember sometimes your client just gets a block someone's almost done and finish it off. What's your address? I'll send you some ^~^

kvlos9qtc7

#569 PokeAcer

  • Members
  • 143 posts

Posted 31 May 2015 - 09:00 PM

I made another block in an hr, so I gave you 43 (1 block atm)
EDIT - Try only 1 thread, then 2, etc.. and make sure your using x64 java8

Edited by PokeAcer, 31 May 2015 - 09:02 PM.


#570 3d6

  • Members
  • 336 posts

Posted 31 May 2015 - 09:23 PM

View PostMayushii, on 31 May 2015 - 08:02 PM, said:

View Postcossacksson, on 31 May 2015 - 07:56 PM, said:

View PostPokeAcer, on 31 May 2015 - 04:49 PM, said:

How do you even get said nonce - also you might wan to change the name. Nonce in UK = paedophile (pedophile for the US)
https://en.wikipedia...tographic_nonce

View PostYevano, on 31 May 2015 - 05:04 PM, said:

View PostMayushii, on 31 May 2015 - 04:45 PM, said:

Can someone explain to me how mining really works?
I can't seem to figure out how on the PHP end Coss verifies nonces.
How do you verify a nonce to see if it's valid or not?
Example:
000000004c5fe190d8147191296bedb75af6aa66c20121fbca1ec21090dc9ed3
Nonce = 0y88i6d

But how do you verify this?

When you submit a solution you give the server your address and the nonce. The server already knows the value of the last block, so it just does the same operation you do on the miner to get the hash and compares it to the work value. Specifically, it takes the hash of the address concatenated with the last block and the nonce and uses only the least significant 6 bytes of that hash to compare against the work value.

Client sends: address=k3s72l1pfa, nonce=lolwhatanonce
Last block: 00000000a426
Work number: 65535
Server gets hash of k3s72l1pfa00000000a426lolwhatanonce -> f13240953d6d5db71639658451680d4fbff5916aa37d3826b6c3436cbcbaf92d
Server takes the least significant 6 bytes: 436cbcbaf92d
Decimal form: 74134301899053
74134301899053 > 65535, so the nonce is rejected and no payout occurs.
Most significant, least significant, that sure gets confusing sometimes.
All I know is, when I put it through hash('sha256',$hit) in PHP, I check the first twelve characters from left to right. I'm not sure if that's little or big endian.

Can you show me the step by step process to see if this is correct (I grabbed this from the data.db file btw)
Block Hash: 00000000e98b74219196200c20034fb3a95866e5ff0dfb23dc8d8b18e9821c75
Address: kutlg1kzhz
Nonce: B1hqhr0nco
Difficulty: 65535

Because I can't seem to understand how you would get to the point where Nonce < 65535, even with the little tutorial that Yevano posted.
It's not the nonce that has to be less than the work number, it's tonumber(string.sub(sha256(address..lastblock..nonce),1,12),16)

I've never made a proper description, so here's a step-by-step example: Cue fun tutorial music

We start with a few important variables as defined below:
  • address - this is where the money goes
  • lastblock - the truncated hash of the previous block, downloaded from ?lastblock
  • work - the work number, downloaded from ?getwork
A block looks like this:
address..lastblock..nonce

The nonce is an arbitrary number that we increment over and over and over billions of times until the SHA256 hash of the block string is mathematically low enough.

When evaluating the validity of a block, we only look at the first twelve digits of the hash. Here is an example block attempt, with 123456 as the nonce:

kvlos9qtc70000000066ef123456

The SHA256 hash of that block is as follows:

98e9e55c03648e4466210d89fd9871016e956a6c427c291e90b9a26683fcad7e

But we only care about the first six bytes!:

98e9e55c0364

Now we convert this to a decimal number, and check if it's less than the work number.

if 168130342814564 < 65535 then return true else return false end

View PostYevano, on 08 March 2015 - 04:22 PM, said:

No, not even close.
We now try again with a different nonce (like 123457 or something), and continue trying different nonces until the block is valid.

When it is valid, the miner makes a ?submitblock call, and if nobody else got the block first, they'll get a subsidy of Krist, which is a combination of new never-before seen money and old money that was recently spent on domains. You can tell exactly how much the next block is estimated to be by adding the following two call returns together:

?getbaseblockvalue + ?namebonus

That's the jist of it. Blocks reference the previous blocks in the chain as proof that they were all solved in order, and so that it will be possible to verify all these solutions easily when we go P2P.

#571 PokeAcer

  • Members
  • 143 posts

Posted 31 May 2015 - 10:24 PM

Hey.
Imma thinking of getting Krist <-> my server currency exchange, I was wondering how much should I make the exchange rate?
If it's too low people will get krist too fast but if it's too high there's less bought. IK for a fact that in game 1 diamond = £200 igm on all unedited essentials-using bukkit/Cauldron servers, so how much krist should I set per £10 ingame?

#572 Pyuu

  • Members
  • 203 posts

Posted 31 May 2015 - 11:28 PM

View PostPokeAcer, on 31 May 2015 - 10:24 PM, said:

Hey.
Imma thinking of getting Krist <-> my server currency exchange, I was wondering how much should I make the exchange rate?
If it's too low people will get krist too fast but if it's too high there's less bought. IK for a fact that in game 1 diamond = £200 igm on all unedited essentials-using bukkit/Cauldron servers, so how much krist should I set per £10 ingame?

Exchange rates are very unstable atm since there is no proper services being offered in exchange for KST.
However, if you weigh it based on how much the richest guy has... I'd say 1 Diamond = ~1,000 KST,
however, if you weigh it based on how Hard it is to obtain kst through mining, I'd say 1 Diamond = ~ 300 KST

#573 PokeAcer

  • Members
  • 143 posts

Posted 31 May 2015 - 11:32 PM

View PostMayushii, on 31 May 2015 - 11:28 PM, said:

View PostPokeAcer, on 31 May 2015 - 10:24 PM, said:

Hey.
Imma thinking of getting Krist <-> my server currency exchange, I was wondering how much should I make the exchange rate?
If it's too low people will get krist too fast but if it's too high there's less bought. IK for a fact that in game 1 diamond = £200 igm on all unedited essentials-using bukkit/Cauldron servers, so how much krist should I set per £10 ingame?

Exchange rates are very unstable atm since there is no proper services being offered in exchange for KST.
However, if you weigh it based on how much the richest guy has... I'd say 1 Diamond = ~1,000 KST,
however, if you weigh it based on how Hard it is to obtain kst through mining, I'd say 1 Diamond = ~ 300 KST

Thx. When I make some more KST I'll send you some ^~^

#574 InDieTasten

  • Members
  • 357 posts
  • LocationGermany

Posted 01 June 2015 - 12:05 AM

View PostMayushii, on 31 May 2015 - 11:28 PM, said:

View PostPokeAcer, on 31 May 2015 - 10:24 PM, said:

Hey.
Imma thinking of getting Krist <-> my server currency exchange, I was wondering how much should I make the exchange rate?
If it's too low people will get krist too fast but if it's too high there's less bought. IK for a fact that in game 1 diamond = £200 igm on all unedited essentials-using bukkit/Cauldron servers, so how much krist should I set per £10 ingame?

Exchange rates are very unstable atm since there is no proper services being offered in exchange for KST.
However, if you weigh it based on how much the richest guy has... I'd say 1 Diamond = ~1,000 KST,
however, if you weigh it based on how Hard it is to obtain kst through mining, I'd say 1 Diamond = ~ 300 KST
Thats ridiculous! You can't set fix Krist amounts to other currencies like diamonds or essential money. Depending on the modpack allone, a diamond can be really easy or really hard to obtain. Based on that fact you need to weigh the amount of time versus that obtainability(either also time, or other resources that are being lost in that process). For a vanilla server running only computercraft, I would set 1 diamond = $80 = KST 20.
Why 20?
Well, the average player would be mining around 0.03 blocks/minute, making a total of 1.8 blocks/hour, making ~48.6 KST/hour.
So they could potentially buy 2 diamonds for every hour they mine. All these numbers are just being mean values I am making up in my head due to my experience, so these can be tuned either way.
The best way to solve this is by real market behaviour. If say a player with 50k KST comes on the server spending a lot of KST, the value of KST would drop, or in other perspective, the value of all other things that are not inflating will rise. This is done on most servers just automatically without the players even noticing it. They just look at the market, see how things are weighed and adapt.
The admin shop concept is working just like governments setting special rules and manipulating the market. Thats either good, when companies become really powerful over the market due to monopol positions, but can also be bad, as they often don't understand the dynamics of the market and think they need to fix stuff that would solve by itself. This is also the place lobbyism starts to kick in, handing out payments to politicians, so that they set the rules to their advantage.

Hope via this real-world comparison you now know, how you can adjust your currency balancing and what effects it will spawn.

#575 PokeAcer

  • Members
  • 143 posts

Posted 01 June 2015 - 12:17 AM

View PostInDieTasten, on 01 June 2015 - 12:05 AM, said:

View PostMayushii, on 31 May 2015 - 11:28 PM, said:

View PostPokeAcer, on 31 May 2015 - 10:24 PM, said:

Hey.
Imma thinking of getting Krist <-> my server currency exchange, I was wondering how much should I make the exchange rate?
If it's too low people will get krist too fast but if it's too high there's less bought. IK for a fact that in game 1 diamond = £200 igm on all unedited essentials-using bukkit/Cauldron servers, so how much krist should I set per £10 ingame?

Exchange rates are very unstable atm since there is no proper services being offered in exchange for KST.
However, if you weigh it based on how much the richest guy has... I'd say 1 Diamond = ~1,000 KST,
however, if you weigh it based on how Hard it is to obtain kst through mining, I'd say 1 Diamond = ~ 300 KST
Thats ridiculous! You can't set fix Krist amounts to other currencies like diamonds or essential money. Depending on the modpack allone, a diamond can be really easy or really hard to obtain. Based on that fact you need to weigh the amount of time versus that obtainability(either also time, or other resources that are being lost in that process). For a vanilla server running only computercraft, I would set 1 diamond = $80 = KST 20.
Why 20?
Well, the average player would be mining around 0.03 blocks/minute, making a total of 1.8 blocks/hour, making ~48.6 KST/hour.
So they could potentially buy 2 diamonds for every hour they mine. All these numbers are just being mean values I am making up in my head due to my experience, so these can be tuned either way.
The best way to solve this is by real market behaviour. If say a player with 50k KST comes on the server spending a lot of KST, the value of KST would drop, or in other perspective, the value of all other things that are not inflating will rise. This is done on most servers just automatically without the players even noticing it. They just look at the market, see how things are weighed and adapt.
The admin shop concept is working just like governments setting special rules and manipulating the market. Thats either good, when companies become really powerful over the market due to monopol positions, but can also be bad, as they often don't understand the dynamics of the market and think they need to fix stuff that would solve by itself. This is also the place lobbyism starts to kick in, handing out payments to politicians, so that they set the rules to their advantage.

Hope via this real-world comparison you now know, how you can adjust your currency balancing and what effects it will spawn.

I'm running Cauldron w/ CC, Thermal Expansion, Thermal Foundation, CoFH Core, OpenBlocks, OpenMods, Greg's SGCraft and MrCray's Furniture Mod..
Yh, Imma stick with £1.50 in game = 1kst... If I change it I change it. Imma do this all on a php/html script once I have time.

#576 Pyuu

  • Members
  • 203 posts

Posted 01 June 2015 - 01:50 AM

View PostInDieTasten, on 01 June 2015 - 12:05 AM, said:


Thats ridiculous! You can't set fix Krist amounts to other currencies like diamonds or essential money. Depending on the modpack allone, a diamond can be really easy or really hard to obtain. Based on that fact you need to weigh the amount of time versus that obtainability(either also time, or other resources that are being lost in that process). For a vanilla server running only computercraft, I would set 1 diamond = $80 = KST 20.
Why 20?
Well, the average player would be mining around 0.03 blocks/minute, making a total of 1.8 blocks/hour, making ~48.6 KST/hour.
So they could potentially buy 2 diamonds for every hour they mine. All these numbers are just being mean values I am making up in my head due to my experience, so these can be tuned either way.
The best way to solve this is by real market behaviour. If say a player with 50k KST comes on the server spending a lot of KST, the value of KST would drop, or in other perspective, the value of all other things that are not inflating will rise. This is done on most servers just automatically without the players even noticing it. They just look at the market, see how things are weighed and adapt.
The admin shop concept is working just like governments setting special rules and manipulating the market. Thats either good, when companies become really powerful over the market due to monopol positions, but can also be bad, as they often don't understand the dynamics of the market and think they need to fix stuff that would solve by itself. This is also the place lobbyism starts to kick in, handing out payments to politicians, so that they set the rules to their advantage.

Hope via this real-world comparison you now know, how you can adjust your currency balancing and what effects it will spawn.

The reason the value would be set high compared to your values is because there is a huge balance shift with people being so rich.
From my personal experience, obtaining Krist is pretty difficult, but then again, there are people with over 100k sitting around.

I get where you're coming from though.

#577 PokeAcer

  • Members
  • 143 posts

Posted 01 June 2015 - 06:57 AM

I ran my CPU miner last light, in morning went downstairs you could hear it screaming. I'd made 429 (spent 1 when testing api) so I just shut the miner on screen.

#578 Lion4ever

  • Members
  • 91 posts

Posted 01 June 2015 - 08:27 AM

Is it intended that most functions of the computercraft program remain in the environment after the program was closed?

This way any other program on the computer can transfer your money anywhere by calling wallet() and sending fake events (no password needed, because it was allready typed in).

An other way to steal money could be overwriting htttp.get(), but I dont know want to do about that.

To see which functions are not local you could use the local-checker *cough* shameless self promotion *cough* :D

Edited by Lion4ever, 01 June 2015 - 02:01 PM.


#579 PokeAcer

  • Members
  • 143 posts

Posted 01 June 2015 - 03:01 PM

View PostLion4ever, on 01 June 2015 - 08:27 AM, said:

Is it intended that most functions of the computercraft program remain in the environment after the program was closed?

This way any other program on the computer can transfer your money anywhere by calling wallet() and sending fake events (no password needed, because it was allready typed in).

An other way to steal money could be overwriting htttp.get(), but I dont know want to do about that.

To see which functions are not local you could use the local-checker *cough* shameless self promotion *cough* :D

In some applications that'd be good - allow shops to work fully. You run wallet, exit wallet, it charges you, reboot pc.

#580 3d6

  • Members
  • 336 posts

Posted 01 June 2015 - 08:18 PM

View PostPokeAcer, on 01 June 2015 - 03:01 PM, said:

View PostLion4ever, on 01 June 2015 - 08:27 AM, said:

Is it intended that most functions of the computercraft program remain in the environment after the program was closed?

This way any other program on the computer can transfer your money anywhere by calling wallet() and sending fake events (no password needed, because it was allready typed in).

An other way to steal money could be overwriting htttp.get(), but I dont know want to do about that.

To see which functions are not local you could use the local-checker *cough* shameless self promotion *cough* :D/>

In some applications that'd be good - allow shops to work fully. You run wallet, exit wallet, it charges you, reboot pc.

I guess, but it is still an accidental feature and probably has more bad consequences than good. This will be patched in release 12.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users