06:24:04 Hey y’all I was joking earlier about Monero having it’s Y2K moment, but I think I actually found a future bug. LMDB uses a uint64_t to store the cumulative number of coins up to a given block height in mdb_block_info. That value is going to overflow in about 1.8 years. At that point, tx fee verification is undefined 06:26:36 The method interface that accesses that value is BlockchainDB::get_block_already_generated_coins and the Blockchain::check_fee method is used to allow/disallow transactions to enter the mempool so the network might come to a grinding halt when that happens 06:29:10 No, it's just a 64-bit value that gets capped to 2^64 - 1 06:29:29 it's used to calculate block reward, so values >= 2^64 are not needed 06:31:45 https://github.com/monero-project/monero/blob/master/src/cryptonote_core/blockchain.cpp#L4441 06:40:34 Thanks for the pointer :) 06:40:58 That’s a weird way to do it but I guess it works 06:41:13 That’s good to know 07:21:10 And it's less than a year until it reaches 2^64 - on June 6, 2024 by my calculations. 07:43:47 I was using coin gecko’s total supply number which I think is behind 08:00:28 Hello Guys 08:00:44 i hope you are doing well :) 08:01:30 Could someone tell me, why this simple call to monero daemon not works? its such a simple call, but the daemon does reply nothing... 08:01:32 {"jsonrpc":"2.0","id":0,"method":"get_block_header_by_height","params":{"height":912345}} 08:01:46 ,please 08:03:04 i m connecting via tcp socket 08:06:04 No one can tell you because you didn't tell anything about how exactly you send this simple call 08:06:25 hi sech 08:06:28 what software you use? What is the command line you use? Your OS? Where is the monerod running, locally or not? 08:06:31 monerod command line? 08:06:34 firewall settings? 08:06:44 curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_header_by_height","params":{"height":912345}}' -H 'Content-Type: application/json' 08:06:46 no i send it from code with tcpclient 08:06:56 this one 100% works if you run it on the same PC as monerod 08:07:11 yes , i run it on same machine 08:07:20 tcpclient? What is it? 08:07:37 .net c# 08:07:46 its a socket client 08:07:47 what programming language? Do you know it should be an HTTP request with this json? 08:07:59 no,i did not know 08:08:16 ok, then this is the issue 08:08:19 you took this json from https://www.getmonero.org/resources/developer-guides/daemon-rpc.html#get_block_header_by_height probably, and it shows curl as an example 08:08:21 thank you very much 08:08:23 curl does HTTP requests 08:08:41 i did not know, sech. thank you 08:10:09 I don't know much about C#, but it should have some standard way to send HTTP POST requests 08:16:05 yes 08:37:30 hmm. which type of method does curl use ? post or get , i tried both, everytime is the response empty, or i get 404 error 08:39:09 HTTP POST 08:39:19 "-d" in curl command line makes it a POST request 08:39:26 ok thx 08:40:08 even with httppost i get 404 08:43:07 the daemon binds 127.0.0.1:18081,but i m not able to find it 08:43:51 do you set URL = "/json_rpc" ? 08:44:28 nooo, really i have to ? 08:44:49 hmm, fck 08:44:53 i willtry 08:45:33 brb 08:47:55 same Problem 404..Id = 3, Status = RanToCompletion, Method = "{null}", Result = "StatusCode: 404 08:48:55 404 means you use wrong url 08:49:56 HTTP url must be "/json_rpc" in your request 08:50:14 just use wireshark and compare what curl sends and what you send 08:50:54 ok 08:51:23 ttp://127.0.0.1:18081/json_rpc 08:51:29 i use that 08:51:32 http 08:51:37 .... 08:52:15 or it has to be http://127.0.0.1:18081/json_rpc/ ? 08:59:17 url is "/json_rpc" 08:59:24 you connect to 127.0.0.1, port 18081 08:59:45 and then provide url "/json_rpc" and HTTP POST data will be the actual json request 09:00:21 okay, I see C# HttpClient needs fully qualified url 09:00:30 so yes, http://127.0.0.1:18081/json_rpc/ 09:01:31 https://stackoverflow.com/questions/6117101/posting-jsonobject-with-httpclient-from-web-api 09:03:16 thank you sech 09:43:12 interesting 09:43:29 even curl is unable to reach daemon : https://pastebin.com/6X2hn9DW 09:58:12 What's your monerod command line? 09:58:39 actually, you did get a response from monerod 09:58:46 "message": "Parse error" 09:59:00 you're running on Windows, right? 09:59:03 curl http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_header_by_height","params":{"height":912345}}' -H 'Content-Type: application/json' 09:59:05 yes 09:59:31 curl http://127.0.0.1:18081/json_rpc -d "{\"jsonrpc\":\"2.0\",\"id\":\"0\",\"method\":\"get_block_header_by_height\",\"params\":{\"height\":912345}}" -H "Content-Type: application/json" 09:59:36 this is for Windows 09:59:49 ohhh ok 10:00:38 you are right 10:00:57 daemon replies 10:01:01 with curl 10:01:53 hmm 10:21:12 sech 10:21:25 my code is working now, httcclient just sucks 10:21:48 i m using now webclient and it works like a charm..Thank you ! 10:40:49 till next time :) 16:30:57 hey 16:31:31 i m studying monero daemon rpc documentation 16:32:09 What is the pow hash please ? Is that the hash you have to run through randomx function ? 16:36:56 And where is the merkle tree? is it possible to to request merkle tree from daemon ? 16:38:46 Pascal123: You work with C#, right? Depending on what you want to do it would be much easier to use this library instead of firing off requests yourself: https://moneroecosystem.org/monero-csharp/ 16:39:15 hi rbrunner 16:39:26 oh ok, i did not know this exists 16:40:20 i would like to get the computed merkle tree from a block, is that possible ? 16:41:24 Not sure, maybe that's not available over the RPC interface, and you would have to read blocks yourself, in the style of a block explorer ... 16:41:36 im interested in writing a tiny pool software in c# 16:41:40 You sure you need that? 16:41:51 Ah, ok, then maybe, yes 16:41:54 education purposes 16:42:30 Yeah. Will certainly be interesting, but maybe quite a "steep learning curve". Maybe you have to look at existing pool software, in other languages 16:42:46 but i dont know how to get the merkle root of a block..i dont want to port existing c++ code 16:42:53 I guess much is not properly documented because so damn few people write pool software :) 16:43:05 hmm okey... 16:43:35 i would like to be able to generate mining blob manually 16:45:42 there is not much documentation on it, apart from wikipedia/bitcoinwiki pages and the code itself 16:46:38 but isnt the monero merkle different than the merkle tree of bitcoin? 16:47:06 it uses different base hashing function 16:47:28 but the structure is the same ? 16:47:49 yes 16:48:02 bitcoin uses sha256 and monero keccak, right ? 16:48:14 why monero use keccak ? 16:48:47 because it's more modern and secure than SHA-256 16:48:53 ah ok 16:49:20 keccak is basically SHA-3 16:49:31 https://en.wikipedia.org/wiki/SHA-3 16:49:38 well, i will try to implement it...thank you 16:50:45 could i use sha3,too ? is the result the same ? 16:58:41 No, parameters are a bit different 16:59:09 Monero uses earlier version with different parameters because it came out in 2014, and SHA-3 was finalized later 17:04:26 hmm ok 17:18:52 .merge+ 8903 8904 8905 8908 17:18:52 Added 19:50:32 One initial hash of merkle tree is computed by coinbase.. has monero a coinbase info, too or it is different? Coinbase = Coinb1 + ExtraNonce1 + ExtraNonce2 + Coinb2; 19:51:30 if monero does not have a coinbase info, could i use first transaction as initialization hash ? 22:19:29 good night guys