Edited by PokeAcer, 31 May 2015 - 06:56 PM.
Krist - Minable currency that works across servers (paste updated)
#561
Posted 31 May 2015 - 06:41 PM
#562
Posted 31 May 2015 - 07:30 PM
#564
Posted 31 May 2015 - 07:56 PM
PokeAcer, on 31 May 2015 - 04:49 PM, said:
Yevano, on 31 May 2015 - 05:04 PM, said:
Mayushii, on 31 May 2015 - 04:45 PM, said:
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.
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
Posted 31 May 2015 - 08:02 PM
cossacksson, on 31 May 2015 - 07:56 PM, said:
PokeAcer, on 31 May 2015 - 04:49 PM, said:
Yevano, on 31 May 2015 - 05:04 PM, said:
Mayushii, on 31 May 2015 - 04:45 PM, said:
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.
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
Posted 31 May 2015 - 08:08 PM
Mayushii, on 31 May 2015 - 08:02 PM, said:
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.
Everything AFAIK.
Edited by InDieTasten, 31 May 2015 - 08:09 PM.
#567
#568
#569
Posted 31 May 2015 - 09:00 PM
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
Posted 31 May 2015 - 09:23 PM
Mayushii, on 31 May 2015 - 08:02 PM, said:
cossacksson, on 31 May 2015 - 07:56 PM, said:
PokeAcer, on 31 May 2015 - 04:49 PM, said:
Yevano, on 31 May 2015 - 05:04 PM, said:
Mayushii, on 31 May 2015 - 04:45 PM, said:
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.
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.
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
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
Yevano, on 08 March 2015 - 04:22 PM, said:
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
Posted 31 May 2015 - 10:24 PM
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
Posted 31 May 2015 - 11:28 PM
PokeAcer, on 31 May 2015 - 10:24 PM, said:
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
Posted 31 May 2015 - 11:32 PM
Mayushii, on 31 May 2015 - 11:28 PM, said:
PokeAcer, on 31 May 2015 - 10:24 PM, said:
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
Posted 01 June 2015 - 12:05 AM
Mayushii, on 31 May 2015 - 11:28 PM, said:
PokeAcer, on 31 May 2015 - 10:24 PM, said:
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
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
Posted 01 June 2015 - 12:17 AM
InDieTasten, on 01 June 2015 - 12:05 AM, said:
Mayushii, on 31 May 2015 - 11:28 PM, said:
PokeAcer, on 31 May 2015 - 10:24 PM, said:
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
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
Posted 01 June 2015 - 01:50 AM
InDieTasten, 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
Posted 01 June 2015 - 06:57 AM
#578
Posted 01 June 2015 - 08:27 AM
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*
Edited by Lion4ever, 01 June 2015 - 02:01 PM.
#579
Posted 01 June 2015 - 03:01 PM
Lion4ever, on 01 June 2015 - 08:27 AM, said:
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*
In some applications that'd be good - allow shops to work fully. You run wallet, exit wallet, it charges you, reboot pc.
#580
Posted 01 June 2015 - 08:18 PM
PokeAcer, on 01 June 2015 - 03:01 PM, said:
Lion4ever, on 01 June 2015 - 08:27 AM, said:
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*
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.
3 user(s) are reading this topic
0 members, 3 guests, 0 anonymous users











