14:31:31 Raydar: it still "works" 14:57:40 I appreciate the response jtgrassie! I'm trying to test this with my rpc endpoint running on stagenet with "--fixed-difficulty 5000". 14:57:41 The daemon responds that the block does not have enough proof of work. Do you have an idea what the issue is? 14:57:41 I don't have much experience with blockchain dev in general, so I'm struggling a bit. 14:57:42 console output: 14:57:42 E  Block with id: <53c017e22cee7d690735366d67d46fbfa182b97b2731fe60979ae18479aec246> 14:57:43 E  for alternative chain, does not have enough proof of work: <0008d422f1b7ba9b946d794185bad669c02b570d5925486462589096fe3f9e87> 14:57:43 E  expected difficulty: 5000 14:57:44 E  mined block failed verification 14:59:17 I'm running the solo-block.py from your github and I've just modified the rpc url and wallet address so far. 14:59:49 https://github.com/jtgrassie/monero-powpy/blob/master/solo-block.py 15:00:02 The 000 at the start look suspiciously like something confusing little endian and big endian. 15:20:11 Thanks +moneromoo. Unfortunately I don't think I understand enough to figure out how to fix that myself yet though. 15:20:12 Along the way I finally just realized that I can use the rpc calc_pow method from the daemon to help validate hashes. 15:20:12 At this stage however I'm still struggling to understand how that works though. 15:20:13 Something simple like the solo-block.py would be perfect. I've tried picking in to the xmrig code, but that appears to be far beyond my current level . 15:21:37 Somewhere you're presumably converting a hash to/from binary/text. Double check that code. 15:22:11 Or checking whether a hash is below a target. 15:38:27 hash = pyrx.get_rx_hash(bin, seed_hash, height) 15:38:27 hex_hash = binascii.hexlify(hash) 15:38:28 ... 15:38:28 if base_diff / int(hex_hash, 16) >= diff: 15:38:29 ... 15:38:29 btb = binascii.hexlify(pack_nonce(btb, nonce)) 15:38:30     payload = { 15:38:30         'jsonrpc': '2.0', 15:38:31         'id': '0', 15:38:31         'method': 'submit_block', 15:38:32         'params': [btb.decode()] 15:38:32     } 15:38:33 I think this is where any binary/text converting takes place. is there anything obvious wrong there? 15:40:48 hexlify sounds like "converting a hash to/from binary/text". 15:41:45 I'm guessing it considers bytes, not multi byte values with an endianness. 15:43:07 The most significant byte of a hash is ((const uint8_t*)&hash)[31]. 15:43:43 If you dump as a bytestream, you'll have ((const uint8_t*)&hash)[0]. 15:43:55 So it looks like a plausible cause for your problem. 15:44:18 If you did not write that function, check whether it has a parameter to consider the value's endianness. 15:44:25 If not, write your own, or find another. 15:45:05 Or reverse hte hash bytes first, but that's just getting dodgy. 15:45:16 (and would have to be done all over the place) 15:47:36 Also, I don't know that API, but it looks like you might be converting a hash to hex text, then back to a hash ? Maybe using the original one will fix your problem, if it's hte same type. 15:50:22 Scratch that, it's python, it's probably lots of types you can't just cast even though it's the same thing underneath. 15:55:02 :D Thanks so much for trying to help. Although I barely can follow along. 15:55:03 I'm going to try anyway. 16:42:29 Raydar: "running on stagenet with "--fixed-difficulty" <- Thats why your block is rejected! 16:43:21 you're submitting a block at a lower difficulty than stagenet is currently demanding 16:45:10 "The daemon responds that the block does not have enough proof of work." <- It's even telling you so. 16:56:12 Sorry. I thought the daemon accepts lower difficulty blocks in this case and puts them in an alternate chain. 16:56:13 Testing on the same node I see the following successful block submission from xmrig. 16:56:13 I +++++ BLOCK SUCCESSFULLY ADDED 16:56:14 I id:   <8907dad539fd31dc811399df9fb40bd1c7d73df77e24db5c3e69294c30359ed7> 16:56:14 I PoW:  <3455f9465d83761b49ef61fde8743dfc4d7ebfa8c016460a0ceaf751f61f0300> 16:56:15 I HEIGHT 1328802, difficulty:   5000 16:56:15 Does this explain what I am doing wrong? 17:08:06 Blocks on an alt chain have to match the difficulty on their chain. 17:08:29 If you're using fixed difficulty, you obviously have to use the same fixed difficulty for all the parts of your setup. 17:08:46 FWIW, that block PoW looks better above. 00 at the end. 17:32:50 Hi, is an output ID it's global amount index?... (full message at ) 17:33:06 * Hi, is an output ID its global amount index?... (full message at ) 17:33:59 * Hi, is an output ID its global output index?... (full message at ) 17:35:23 someoneelse49549: "The subclass should return the hash of the transaction which created the output with the global index given, as well as its index in that transaction." 17:38:26 what is the global index? 17:40:35 the output's index in the global set of outputs 17:41:26 the ledger ^.^ 17:41:59 alright thank you 17:43:04 The global set of outputs of the same amount, coinbases in v2 txes being deemed to have 0 amount. 17:45:53 moneromooo: so in output_amounts table, all rct outputs are under the same 0 key. While pre-rct outputs can have a different amount key right? 17:46:37 Yes. 18:03:56 Also, I can't find the pull request on github that deprecated the txs table. Do you have an idea where I can find the discussion about it ? 18:08:59 The pruning patch IIRC. 18:47:34 I'm sorry to carry on about this. The fixed difficulty if correctly recognized by the demo miner from jtgrassie. It shows Target difficulty: 5000 in the console log. 18:47:35 I don't know why the daemon is accepting submissions from xmrig, but complaining about the proof of work from the demo miner. 18:47:35 They are both pointing to the same endpoint. As far as I can tell they are both using the submit_block method in the same way. What is the difference there? 20:09:09 Did you miss the thing about endianness ? 20:18:44 No, but I fear I don't really understand how to start with that. I thought jtgrassie was saying that the code from his github works as is and I was doing something wrong with the daemon settings. 20:34:49 Using the logic to calculate the hash difficulty from the solo-block.py, I've noticed that the script calculates a hash difficulty above 5000 for the hashes it submits (which are not accepted) 20:34:49 But when I use the same logic to calculate the difficulty from a hash that was accepted by the daemon, the calculated difficulty results in very low numbers (below 10 in my tests). 20:34:50 Here's my example distilled from the solo-block.py with the valid and invalid hashes: 20:34:50 import binascii 20:34:51 # invalid example rejected by monerod- calculated hash difficulty = 5571 20:34:51 #hash_str = "000bc35e8deda145ba1778918f96e2884caef790136a9f48812b6192724dbcc6" 20:34:52 # valid example accepted by monerod - calculated hash difficulty = 1 20:34:52 hash_str = "ee50e2a61515e0931fc6278b71936d28ac97561a032a831b1d865fd3f39b6351" 20:34:53 # Calculate the base difficulty (2^256 - 1) 20:34:53 base_diff = 2**256 - 1 20:34:54 # Convert the hash string to an integer (big-endian) 20:34:54 hash_int = int.from_bytes(binascii.unhexlify(hash_str), byteorder='big') 20:34:55 # Calculate the hash difficulty 20:34:55 hash_diff = base_diff / hash_int 20:34:56 print(f"Hash Difficulty: {hash_diff}")