10:56:21 i have read a little about randomx. 10:58:32 how can there be 2^256 possible programs that are run in the cisc architecture, and the verifying process of the nonce still be deterministic? 11:00:22 so every single miner runs a different program to mine, and then for verification he not only sends the nonce, but also the parameters that define his program? 11:04:44 in that case, there must be an aspect of randomx that makes it also impossible to use always the same program... that is awesome !? 11:22:53 "so every single miner runs a..." <- considering randomx is fundamentally a hash algo, the random program is surely determined by nonce. 11:23:54 hum, 11:24:40 and other parameters that randomx received of course. 11:24:59 so you are saying the output of randomx is a hash and a nonce? And the nonce fully determines the program used to mine? 11:25:45 Ehhh waht? 11:25:46 * Ehhh what? 11:26:21 ... 11:26:34 randomx is basically a hash algo, things like nonce and block data being hashed into a string. A random program execution is involved in the process of this hash. 11:26:58 for every input there must be a determined and expected output, otherwise it cannot be a proof-of-work algo, neither a hash algo 11:27:18 i am translating ztm v2... and i would like to include randomx in it. 11:27:51 regardless : 11:27:57 This of course requires designing a syntaxless programming language (or instruction set) in which all random bit strings represent valid programs. 11:28:26 exactly thats what does not make sense to me from the get go... 11:28:48 slave_blocker: What is confusing you? 11:28:58 hum, 11:29:12 lets say you and me are miners... 11:29:45 Determined string, determined program. But there is zillions variations. 11:30:04 s/is/are/ 11:30:51 you select a random program from the 2^256 possible ones. you mine the block with a nonce lets say 4 bytes long. then you find a block. 11:31:00 then you say hurra. 11:31:07 then you send block to me. 11:31:22 then i say what programm did you use? 11:31:45 the hash and the nonce alone are no good? 11:32:42 slave_blocker: determined by the nonce I use and the block data, you don't need to ask for that. 11:32:59 You can execute randomx with same data on your own to check it. 11:33:24 ok 11:34:03 but the nonce is just 4 bytes? 11:34:28 how can it represent a value and a programm at the same time? 11:34:30 what? 11:34:43 hey what programm did you use? 11:35:02 slave_blocker: the nonce get translated into a program. 11:35:03 answer: here take these 4 bytes and figure it out? 11:35:32 yes exactly 11:35:50 wöojrnvüoawrbvwrnbvqrn 11:36:05 Random program exec is not the only section of the RandomX by the way. 11:36:24 slave_blocker: "syntaxless instruction set" 11:36:49 Any possible value for your 4 byte can be translated in a program 11:37:02 s/in/to/ 11:37:35 wait but thats only 2^32... 11:37:44 where are the rest? 11:38:34 Remember, nonce is not the only data RandomX received, there is block data and hash from prev block. 11:39:03 hum, 11:39:10 I think you need to read what does pow do again. 11:39:19 s/pow/PoW/ 11:39:24 + 1 byte from the miner tx right? 11:41:13 struct block_header... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/d219e90e9d627f8b019876299f896b1fa2a25644) 11:42:46 Monero Block Template, don't worry about how many figures does randomx received 11:42:46 https://monero.stackexchange.com/questions/3958/what-is-the-format-of-a-block-in-the-monero-blockchain 11:46:00 i mean the miner has how many bits to construct his program? 11:46:58 32 bits from the nonce + 8 bits from the extra field in the rcttypenull? 11:47:16 i guess then the other ones are fixed. 11:47:29 thats brilliant :) 11:48:58 so there is a vector of 256 bits, 32 of wich are filled by the miner and the rest he does not control, so to say because they are hash values, that co-determine the nonce... 11:49:44 that co-determine that vector ... 11:50:47 ? 11:51:04 kinda of, yes 11:51:15 :) 11:51:25 thanks so much 11:51:57 im going to die a little less ignorant:) 11:52:27 "syntaxless instruction set" ? 11:53:39 so the program defined by these 256 bits is syntaxless? 11:53:53 what does that even mean ? 11:55:20 thats like saying :" unsorted phone book " 11:56:30 like... when you're programming, there are syntax right? x = y, brackets and things like that... RandomX used want to generate a "Abstract Syntax Tree" for random program exec, but that doesn't resist ASICs. So RandomX developed a method to transform digits into random programs, obviously no syntax in such digits. That's all 11:57:31 my fcitx service is broken again, need to reboot and back soon 11:57:43 k 12:01:14 My GNOME is alive again, any question just ask =) 12:01:34 holy shit so you are saying that every bit maps to an instruction... 12:02:20 not one bit one inst 12:02:32 but kinda similar 12:02:48 well, in my opinion syntaxless instruction set sounds very french, very creme de la creme... 12:03:00 WinslowEric[m]: otherwise there would be only two possible inst lol 12:03:54 no the bit at index i either maps at the instruction or not... 12:04:11 i would not have coined it syntaxless though... 12:04:16 however 12:04:41 the more interesting question to me if i have understood it correctly is... 12:04:45 slave_blocker: i know nothing about french so i didn't get it. But I think what you 12:06:19 under the set of definitions of randomx, yes every bit either maps to an instruction or it does not... if its a 1 it activates the instruction if its a 0 it does not? 12:06:31 * what you're thinking of is right 12:06:34 * i know nothing about french so i didn't get it. But I guess what you're thinking of is right 12:07:13 but then... 12:08:30 there is an infinite amount of possible definitions for randomx ? 12:09:35 in other words there are 2^256 possible programs for randomx. 12:10:23 ok next week someone comes along and defines that for the bit 202 -> to a diferent instruction, it gets audited by ostif and so... 12:10:31 do you get my point? 12:14:47 not exactly... 12:16:23 Although I didn't fully comprehend your words, translation is not mapping. 12:17:35 i mean the current implementation of randomx is just one out of infinitely many... 12:18:50 These strategies of searching for programs of particular properties deviate from the objectives of this proof of work, so they must be eliminated. This can be achieved by requiring a sequence of N random programs to be executed such that each program is generated from the output of the previous one. The output of the final program is then used as the result. 12:18:56 :| 12:19:40 so verification is not O(1) 12:19:54 its O(n) 12:20:50 holy shit 12:20:55 :) 12:22:49 w...what? 12:23:35 > These strategies of searching for programs of particular properties deviate from the objectives of this proof of work, so they must be eliminated. 12:23:35 [get completely confused] 12:24:20 verification is just simply compute the hash with same parameter to check if that hash does match, how could it be O(n) 12:24:42 there isn't even a "n" 12:28:22 slave_blocker read https://github.com/tevador/RandomX/blob/master/doc/specs.md and https://github.com/tevador/RandomX/blob/master/doc/design.md 12:28:29 there are 2^512 possible programs 12:28:35 not 2^256 12:29:13 also, define "n" in your "O(n)" estimation 12:29:32 verification is just simply calculating the same hash one time 12:31:26 if "n" is difficulty then verification is O(1) 12:47:50 the mapping of bits to instructions is somewhat arbitrary. a separate version of randomx could use a completely different mapping 12:50:02 well i mean that there is here this chain of programs, only the output of the n-th program counts. 12:50:23 so n refers to n programs in O(n) 12:51:32 right hyc, at least that was what i was meaning :) 12:51:40 what a rabbit hole ... 12:52:25 sech1 are there any other sources? i mean besides https://github.com/tevador/RandomX/blob/master/doc/specs.md and https://github.com/tevador/RandomX/blob/master/doc/design.md 12:52:27 ? 12:53:13 slave_blocker: I think I've got what you mean??? 12:53:47 like, if you want to verify block 114514, you'll have to verify all of the hashes previous step by step? 12:54:07 :| 12:54:12 That's the kernal of PoW, each block makes prev blocks stronger to alternations. 12:54:33 * That's the kernal of PoW, each block makes prev blocks more resisitent to malicious alternations. 12:56:00 another question, since each nonce defines a program... 12:56:18 is there some 2nd nonce that searches within that program? 12:57:07 or is it one hash per program? 12:57:24 slave_blocker: yes 12:57:41 ? 12:57:54 ? 12:58:26 is it one hash per program? 12:58:50 yes 12:58:58 wow 13:13:41 i tried to run xmrig in an old server like 100 nm... it just seg faulted... 13:14:06 I guess if the cpu does not have the instructions available it just crashes... 13:15:20 so these are like instructions from the opcodes of the cpu? So these are assembler programs? 13:20:36 Yes. If you go on a block explorer like xmrchain.net you can even look at the exact RandomX program that was executed within the winning hash for that block 13:21:45 The node generated the block template from all the transaction data etc, the miner gets the block template, adds in their own nonce, then throws all this data into the RandomX hashing algo 13:22:59 hum, 13:23:28 Inside the hashing algo, that input data gets hashes via Argon2 and used to generate a bunch of data, which then is interpreted by a "virtual machine" as if it were an assembler program 13:23:49 And then the output gets hashed again (iirc?) and that gived you the block hash for that specific nonce 13:24:13 If this final block hash meets the difficulty requirement, then that nonce is considered "valid" and the block is added to the chain 13:24:32 If it doesn't meet the difficulty, then the miner throws in a new nonce and starts over 13:24:32 but i guess if i really wanted, and was able to, could i not just replace the missing assembler instructions with other ones? That take the same input and produce the same output... 13:25:21 hum, 13:25:43 No, because the instructions you have to execute are determined by that first round of Argon2 hashing 13:26:04 what about that virtual machine... is it always the same or is it unique for each program? 13:26:13 Whose output, in turn, is deterministically based on the input (ie the block template + the miner's nonce) 13:26:26 The VM is always the same, and has a custom instruction set 13:26:42 Which you can find in the design docs they linked you above 13:26:56 yes... 13:27:47 For example: https://xmrchain.net/randomx/2577259 13:28:10 On the left you see the RandomX program, written in its custom instruction set 13:28:48 And on the right the corresponding x86 instructions, which is what it gets translated into when your actual physical cpu has to run it 13:31:38 The hash verification is always O(1), because all you have to do is take the block template + nonce given to you and verify that the final result matches the block hash that was sent to you 13:31:38 And all the operations are deterministic 13:33:30 ... 13:34:14 since this should not be called hashing but rather programming... 13:34:18 :) 13:35:27 say a cpu is hashing over and over sha256, thats bad enough i know. And is this not even worse on the hardware not only is the cpu working as hard as it can for one task... 13:36:23 But now it is running as hard as it can, and always distinctly ! 13:37:40 i guess divide is not used... 13:40:03 this is totally baffling and i guess this would be a total overkill to explain in all its minutia in ztm... 13:42:46 so if the nonce is 32 bits, i guess there are not 4 billion different opcode instructions in any cpu. How many diferent opcodes does randomx use ? 13:43:34 no sorry! 13:43:55 that was wrong... 13:44:09 How many diferent opcodes does randomx use ? 15:03:00 ... 15:06:45 why does random x use a vm at all? 15:12:20 to execute random generated program on things like x86 arm etc 15:31:18 oh so its cross platform. 15:31:55 is there a metamagik there too? 15:32:32 or just because of cross-platform?