Jump to content




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


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

#381 TrumpetMiner

  • Members
  • 33 posts

Posted 10 May 2015 - 08:19 PM

My Krist is kxbmupyo0d

Also I can't mine any for some reason.

Edited by TrumpetMiner, 11 May 2015 - 12:10 PM.


#382 3d6

  • Members
  • 336 posts

Posted 10 May 2015 - 08:23 PM

Wow, the block reward is at an all time high right now! Even after the halving! :D

Someone registered pornhub.kst... I wonder what they have planned :wacko:

 Atenefyr, on 10 May 2015 - 03:49 PM, said:

 cossacksson, on 09 May 2015 - 09:45 PM, said:

(KristWallet was my first CC program other than the original super-obsolete CCKristMiner, and I'm a lot better with ComputerCraft now, so a rewrite would be best)
I want to try out CCKristMiner out of curiousity, is there any way I can get the code of that?
Also, the KristScape thing is gonna be super cool :D
http://65.26.252.225...rist/kristminer
You'll have to update the server URL to reflect the current node, but it should still "work" (even if it never solves a block in a few years).

 Geforce Fan, on 10 May 2015 - 06:31 PM, said:

Snatched software.kst

perfect. Transfered to a more secure account too.

Question: Will sites be similar to real-world HTML? Might they be similar enough to render basic real-world HTML things?
The markup language used has entirely different syntax than HTML, but it may be possible to attempt to convert it.
Modern HTML is just so extensive that it would be pretty infeasible to try to replicate it. There just isn't enough drawing capability in CC.

Here is an example website source:
This is my site[BR]It is really [C:BLUE]cool[C:BLACK] and you should[BR]check out [A]http://sample.kst/ my other site[/A][BR][CENTER][HL:RED]and marvel in its glory[/CENTER][BR][NFP]0123456789abcdef 123456789abcdef0[/NFP]

That [NFP] thing is an image. ^_^

#383 biggest yikes

  • Members
  • 573 posts

Posted 10 May 2015 - 09:05 PM

 cossacksson, on 10 May 2015 - 08:23 PM, said:

 Atenefyr, on 10 May 2015 - 03:49 PM, said:

 cossacksson, on 09 May 2015 - 09:45 PM, said:

(KristWallet was my first CC program other than the original super-obsolete CCKristMiner, and I'm a lot better with ComputerCraft now, so a rewrite would be best)
I want to try out CCKristMiner out of curiousity, is there any way I can get the code of that?
Also, the KristScape thing is gonna be super cool :D
http://65.26.252.225...rist/kristminer
You'll have to update the server URL to reflect the current node, but it should still "work" (even if it never solves a block in a few years).
Error 404..

Edited by Atenefyr, 10 May 2015 - 09:06 PM.


#384 3d6

  • Members
  • 336 posts

Posted 10 May 2015 - 09:08 PM

 Atenefyr, on 10 May 2015 - 09:05 PM, said:

 cossacksson, on 10 May 2015 - 08:23 PM, said:

 Atenefyr, on 10 May 2015 - 03:49 PM, said:

 cossacksson, on 09 May 2015 - 09:45 PM, said:

(KristWallet was my first CC program other than the original super-obsolete CCKristMiner, and I'm a lot better with ComputerCraft now, so a rewrite would be best)
I want to try out CCKristMiner out of curiousity, is there any way I can get the code of that?
Also, the KristScape thing is gonna be super cool :D
http://65.26.252.225...rist/kristminer
You'll have to update the server URL to reflect the current node, but it should still "work" (even if it never solves a block in a few years).
Error 404..
Sorry missed a few characters http://65.26.252.225/quest/dia/oldkrist/kristminer

#385 biggest yikes

  • Members
  • 573 posts

Posted 10 May 2015 - 09:12 PM

 cossacksson, on 10 May 2015 - 09:08 PM, said:

-snip-
Sorry missed a few characters http://65.26.252.225/quest/dia/oldkrist/kristminer
pressing it still redirects to the /krist link, thanks though :P

Edited by Atenefyr, 10 May 2015 - 09:12 PM.


#386 3d6

  • Members
  • 336 posts

Posted 10 May 2015 - 09:13 PM

 Atenefyr, on 10 May 2015 - 09:12 PM, said:

 cossacksson, on 10 May 2015 - 09:08 PM, said:

-snip-
Sorry missed a few characters http://65.26.252.225/quest/dia/oldkrist/kristminer
pressing it still redirects to the /krist link, thanks though :P
Nevermind lol, here's the code
local MOD = 2^32
local MODM = MOD-1

local function memoize(f)
		local mt = {}
		local t = setmetatable({}, mt)
		function mt:__index(k)
				local v = f(k)
				t[k] = v
				return v
		end
		return t
end

local function make_bitop_uncached(t, m)
		local function bitop(a, B)/>/>
				local res,p = 0,1
				while a ~= 0 and b ~= 0 do
						local am, bm = a % m, b % m
						res = res + t[am][bm] * p
						a = (a - am) / m
						b = (b - bm) / m
						p = p*m
				end
				res = res + (a + B)/>/> * p
				return res
		end
		return bitop
end

local function make_bitop(t)
		local op1 = make_bitop_uncached(t,2^1)
		local op2 = memoize(function(a) return memoize(function(B)/>/> return op1(a, B)/>/> end) end)
		return make_bitop_uncached(op2, 2 ^ (t.n or 1))
end

local bxor1 = make_bitop({[0] = {[0] = 0,[1] = 1}, [1] = {[0] = 1, [1] = 0}, n = 4})

local function bxor(a, b, c, ...)
		local z = nil
		if b then
				a = a % MOD
				b = b % MOD
				z = bxor1(a, B)/>/>
				if c then z = bxor(z, c, ...) end
				return z
		elseif a then return a % MOD
		else return 0 end
end

local function band(a, b, c, ...)
		local z
		if b then
				a = a % MOD
				b = b % MOD
				z = ((a + B)/>/> - bxor1(a,B)/>/>) / 2
				if c then z = bit32_band(z, c, ...) end
				return z
		elseif a then return a % MOD
		else return MODM end
end

local function bnot(x) return (-1 - x) % MOD end

local function rshift1(a, disp)
		if disp < 0 then return lshift(a,-disp) end
		return math.floor(a % 2 ^ 32 / 2 ^ disp)
end

local function rshift(x, disp)
		if disp > 31 or disp < -31 then return 0 end
		return rshift1(x % MOD, disp)
end

local function lshift(a, disp)
		if disp < 0 then return rshift(a,-disp) end
		return (a * 2 ^ disp) % 2 ^ 32
end

local function rrotate(x, disp)
	x = x % MOD
	disp = disp % 32
	local low = band(x, 2 ^ disp - 1)
	return rshift(x, disp) + lshift(low, 32 - disp)
end

local k = {
		0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
		0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
		0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
		0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
		0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
		0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
		0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
		0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
		0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
		0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
		0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
		0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
		0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
		0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
		0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
		0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,
}

local function str2hexa(s)
		return (string.gsub(s, ".", function(c) return string.format("%02x", string.byte(c)) end))
end

local function num2s(l, n)
		local s = ""
		for i = 1, n do
				local rem = l % 256
				s = string.char(rem) .. s
				l = (l - rem) / 256
		end
		return s
end

local function s232num(s, i)
		local n = 0
		for i = i, i + 3 do n = n*256 + string.byte(s, i) end
		return n
end

local function preproc(msg, len)
		local extra = 64 - ((len + 9) % 64)
		len = num2s(8 * len, 8)
		msg = msg .. "\128" .. string.rep("\0", extra) .. len
		assert(#msg % 64 == 0)
		return msg
end

local function initH256(H)
		H[1] = 0x6a09e667
		H[2] = 0xbb67ae85
		H[3] = 0x3c6ef372
		H[4] = 0xa54ff53a
		H[5] = 0x510e527f
		H[6] = 0x9b05688c
		H[7] = 0x1f83d9ab
		H[8] = 0x5be0cd19
		return H
end

local function digestblock(msg, i, H)
		local w = {}
		for j = 1, 16 do w[j] = s232num(msg, i + (j - 1)*4) end
		for j = 17, 64 do
				local v = w[j - 15]
				local s0 = bxor(rrotate(v, 7), rrotate(v, 18), rshift(v, 3))
				v = w[j - 2]
				w[j] = w[j - 16] + s0 + w[j - 7] + bxor(rrotate(v, 17), rrotate(v, 19), rshift(v, 10))
		end

		local a, b, c, d, e, f, g, h = H[1], H[2], H[3], H[4], H[5], H[6], H[7], H[8]
		for i = 1, 64 do
				local s0 = bxor(rrotate(a, 2), rrotate(a, 13), rrotate(a, 22))
				local maj = bxor(band(a, B)/>/>, band(a, c), band(b, c))
				local t2 = s0 + maj
				local s1 = bxor(rrotate(e, 6), rrotate(e, 11), rrotate(e, 25))
				local ch = bxor (band(e, f), band(bnot(e), g))
				local t1 = h + s1 + ch + k[i] + w[i]
				h, g, f, e, d, c, b, a = g, f, e, d + t1, c, b, a, t1 + t2
		end

		H[1] = band(H[1] + a)
		H[2] = band(H[2] + B)/>/>
		H[3] = band(H[3] + c)
		H[4] = band(H[4] + d)
		H[5] = band(H[5] + e)
		H[6] = band(H[6] + f)
		H[7] = band(H[7] + g)
		H[8] = band(H[8] + h)
end

local function sha256(msg)
		msg = preproc(msg, #msg)
		local H = initH256({})
		for i = 1, #msg, 64 do digestblock(msg, i, H) end
		return str2hexa(num2s(H[1], 4) .. num2s(H[2], 4) .. num2s(H[3], 4) .. num2s(H[4], 4) ..
				num2s(H[5], 4) .. num2s(H[6], 4) .. num2s(H[7], 4) .. num2s(H[8], 4))
end
local args = {...}
local nonce = 0
local blocks = 0
local score = 400000000001
function recall()
term.clear()
term.setCursorPos(1,1)
print("Hashes this run: "..tostring(nonce))
print("Blocks this run: "..tostring(blocks))
target = tonumber(http.get("http://65.26.252.225/quest/dia/krist/index.php?getwork").readAll())
last = http.get("http://65.26.252.225/quest/dia/krist/index.php?lastblock").readAll()
print("Block quality needed: "..tostring(target))
print("Latest block hash: "..last)
end
while true do
repeat
  if nonce % 250 == 0 then recall() end
  nonce = nonce + 1
  sha256_hash = sha256(args[1]..last..tostring(nonce))
  score = string.sub(sha256_hash,0,12)
  score = tonumber(score, 16)
  sleep(0)
until score < target
term.clear()
term.setCursorPos(1,1)
blocks = blocks + 1
print("*** BLOCK! +50 KST! ***")
print(args[1]..last..tostring(nonce))
print(string.sub(sha256_hash,0,12))
status = http.get("http://65.26.252.225/quest/dia/krist/index.php?submitblock&address="..args[1].."&nonce="..tostring(nonce)).readAll()
end


#387 biggest yikes

  • Members
  • 573 posts

Posted 10 May 2015 - 09:37 PM

 cossacksson, on 10 May 2015 - 09:13 PM, said:

-snip-
who said I didn't get the code? :P

Edited by Atenefyr, 10 May 2015 - 09:37 PM.


#388 Geforce Fan

  • Members
  • 846 posts
  • LocationMissouri, United States, America, Earth, Solar System, Milky Way, Universe 42B, Life Street, Multiverse, 4th Dimension

Posted 11 May 2015 - 12:41 AM

Maybe a compatibility layer that detects if it's HTML, and if it is, convert < to [, and skip tags it doesn't understand?
Or, maybe some sort of comment line thing in HTML, so I could do something like this
<!-- [krist] [tagshere] [/krist] -->
That way I could have 1 website for both.
Also: how about a [script] that could allow Lua in the webpages?

Edit: I'm unable to retrieve a block in the miner.

Edited by Geforce Fan, 11 May 2015 - 12:48 AM.


#389 TrumpetMiner

  • Members
  • 33 posts

Posted 11 May 2015 - 02:16 AM

Using the miner linked in the topic and it always goes at a speed of 0 for me. How can I make it go? Please help.

#390 3d6

  • Members
  • 336 posts

Posted 11 May 2015 - 02:42 AM

 TrumpetMiner, on 11 May 2015 - 02:16 AM, said:

Using the miner linked in the topic and it always goes at a speed of 0 for me. How can I make it go? Please help.
Did you download the lib folder from the repository? Put it in the same place as the jar. That should fix it.

 Geforce Fan, on 11 May 2015 - 12:41 AM, said:

Maybe a compatibility layer that detects if it's HTML, and if it is, convert < to [, and skip tags it doesn't understand?
Or, maybe some sort of comment line thing in HTML, so I could do something like this
<!-- [krist] [tagshere] [/krist] -->
That way I could have 1 website for both.
Also: how about a [script] that could allow Lua in the webpages?

Edit: I'm unable to retrieve a block in the miner.
Well, you could use PHP to check the HTTP headers to see what browser it is. If it's KristScape, give it KSML or whatever it'll be called, and if it's not, give it HTML. Also worth noting is that the first line of the data the browser gets is used as the title and head of the page, and the actual contents follow.
I intend on including a [script] tag with limited capabilities - and it has to get permission from the user beforehand to get access to certain functions.

As for the block problem, there was a brief (about two minute) downtime on the API earlier today. That could be it.

 Atenefyr, on 10 May 2015 - 09:37 PM, said:

 cossacksson, on 10 May 2015 - 09:13 PM, said:

-snip-
who said I didn't get the code? :P
Oh :)

Edited by cossacksson, 11 May 2015 - 02:46 AM.


#391 sci4me

  • Members
  • 225 posts
  • LocationEarth

Posted 11 May 2015 - 03:04 AM

 cossacksson, on 10 May 2015 - 08:23 PM, said:

Someone registered pornhub.kst... I wonder what they have planned :wacko:

Hehe Yevano...

#392 TrumpetMiner

  • Members
  • 33 posts

Posted 11 May 2015 - 12:06 PM

 cossacksson, on 11 May 2015 - 02:42 AM, said:

 TrumpetMiner, on 11 May 2015 - 02:16 AM, said:

Using the miner linked in the topic and it always goes at a speed of 0 for me. How can I make it go? Please help.
Did you download the lib folder from the repository? Put it in the same place as the jar. That should fix it.

Thanks its working now.

Edited by TrumpetMiner, 11 May 2015 - 08:40 PM.


#393 TrumpetMiner

  • Members
  • 33 posts

Posted 11 May 2015 - 08:17 PM

Just had Grim's Miner on at 3 cores for 6 hours, still have 0 KST. WTF

My Adress: kxbmupyo0d

Update: 4 Blocks Mined, 0 KST Still Help!

Edited by TrumpetMiner, 11 May 2015 - 09:11 PM.


#394 biggest yikes

  • Members
  • 573 posts

Posted 11 May 2015 - 09:16 PM

 TrumpetMiner, on 11 May 2015 - 08:17 PM, said:

Just had Grim's Miner on at 3 cores for 6 hours, still have 0 KST. WTF

My Adress: kxbmupyo0d

Update: 4 Blocks Mined, 0 KST Still Help!
there are a lot of different reasons that could happen, how many mh/s?

#395 TrumpetMiner

  • Members
  • 33 posts

Posted 11 May 2015 - 10:46 PM

 Atenefyr, on 11 May 2015 - 09:16 PM, said:

 TrumpetMiner, on 11 May 2015 - 08:17 PM, said:

Just had Grim's Miner on at 3 cores for 6 hours, still have 0 KST. WTF

My Adress: kxbmupyo0d

Update: 4 Blocks Mined, 0 KST Still Help!
there are a lot of different reasons that could happen, how many mh/s?

If mh/s is the speed (Hashes/s) then right now its going up and down around 800k and 900k and I have 17 blocks mined.

Edited by TrumpetMiner, 11 May 2015 - 10:48 PM.


#396 biggest yikes

  • Members
  • 573 posts

Posted 11 May 2015 - 10:59 PM

 TrumpetMiner, on 11 May 2015 - 10:46 PM, said:

 Atenefyr, on 11 May 2015 - 09:16 PM, said:

 TrumpetMiner, on 11 May 2015 - 08:17 PM, said:

Just had Grim's Miner on at 3 cores for 6 hours, still have 0 KST. WTF

My Adress: kxbmupyo0d

Update: 4 Blocks Mined, 0 KST Still Help!
there are a lot of different reasons that could happen, how many mh/s?

If mh/s is the speed (Hashes/s) then right now its going up and down around 800k and 900k and I have 17 blocks mined.
Well, if you have 0 KST and you spelt your address right, then you don't have 17 blocks mined.
Also, mh/s means "Megahashes per second", or the hashes / 1,000,000, so you would have 0.9 mh/s.

#397 Tag365

  • Members
  • 109 posts

Posted 11 May 2015 - 11:03 PM

My address is k3hwptxviv

#398 TrumpetMiner

  • Members
  • 33 posts

Posted 11 May 2015 - 11:13 PM

 Atenefyr, on 11 May 2015 - 10:59 PM, said:

 TrumpetMiner, on 11 May 2015 - 10:46 PM, said:

 Atenefyr, on 11 May 2015 - 09:16 PM, said:

 TrumpetMiner, on 11 May 2015 - 08:17 PM, said:

Just had Grim's Miner on at 3 cores for 6 hours, still have 0 KST. WTF

My Adress: kxbmupyo0d

Update: 4 Blocks Mined, 0 KST Still Help!
there are a lot of different reasons that could happen, how many mh/s?

If mh/s is the speed (Hashes/s) then right now its going up and down around 800k and 900k and I have 17 blocks mined.
Well, if you have 0 KST and you spelt your address right, then you don't have 17 blocks mined.
Also, mh/s means "Megahashes per second", or the hashes / 1,000,000, so you would have 0.9 mh/s.
The Miner wasn't responding so I had to restart it, now I have 4 blocks mined and still 0 KST

Attached Thumbnails

  • Attached Image: Screenshot (2).png


#399 Lignum

  • Members
  • 558 posts

Posted 11 May 2015 - 11:17 PM

 TrumpetMiner, on 11 May 2015 - 11:13 PM, said:

The Miner wasn't responding so I had to restart it, now I have 4 blocks mined and still 0 KST

With 0.9MH/s you won't get anywhere. I'm afraid your PC just isn't powerful enough for mining.

EDIT: Just realised what you actually said, sorry. If you have 4 blocks mined and 0 KST then there's something wrong... I can't help you much with that but I know that that miner in particular can be quite quirky.

Edited by Lignum, 11 May 2015 - 11:19 PM.


#400 TrumpetMiner

  • Members
  • 33 posts

Posted 11 May 2015 - 11:19 PM

 Lignum, on 11 May 2015 - 11:17 PM, said:

 TrumpetMiner, on 11 May 2015 - 11:13 PM, said:

The Miner wasn't responding so I had to restart it, now I have 4 blocks mined and still 0 KST

With 0.9MH/s you won't get anywhere. I'm afraid your PC just isn't powerful enough for mining.
Well that sucks :( ...





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users