10:04:29 Hi. In the stratum mining protocol for xmrig, there is a "target" parameter. Is this calculated from the difficulty and then encoded to hex? 10:04:31 https://github.com/xmrig/xmrig-proxy/blob/master/doc/STRATUM.md#job 10:05:33 The difficulty is retrieved from getblocktemplate. So target should be 0xFF...FF (32 bytes) divided by difficulty? 10:06:19 i.e. for difficulty=1 target=ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ? 10:26:48 yes, but it uses 32-bit or 64-bit division to calculate the target 10:34:22 I'm doing it in Rust and I'm using BigUint from the num-bigint crate so I can do that kind of division 10:34:50 However when sending target=ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff to xmrig, I still get 'login error code: 5', which leads me to think something is wrong 10:37:02 I see in xmrig::Job::setTarget() there is size==4 else size==8, but I can't understand what the hex target input there should be 10:42:22 32 or 64 bit hex value 10:44:48 If you convert to hex yourself, be careful to not mess up endianness. 10:44:52 (or from hex) 10:45:41 I understand that, but what is unclear is where (and how) this 32/64-bit value comes from. 10:46:15 It doesn't seem to be the hex-encoded difficulty 10:46:19 IIRC it's the least significant bits of the value a hash must be below (or equal maybe) to be a valid pow. 10:46:38 The other bits are deemed to be 1. It's an optimization. 10:51:39 oh that seems to work 10:53:58 moneromooo: So what about endianness, is it known to be big or little? 11:03:48 Big endian. 256 will be 00..0100 in hex. 11:04:46 Thanks 22:11:29 Quick questions about wallet RPC... 22:11:29 1) is it possible to check individual sub address balance ? Another step further is checking individual outputs and their balances too 22:11:29 2)how to check which stealth address the xmr was sent to? This can be done by eliminating your change stealth but that only works for a 2 output txn.. 22:11:30 3) confused about sweep_single. 22:11:30 Why are multiple subaddress indices allowed if you're sweeping a single output. Same goes for below_amount... 22:12:34 Quick questions about wallet RPC... 22:12:34 1) is it possible to check individual sub address balance ? Another step further is checking individual outputs and their balances too 22:12:35 2)how to check which stealth address the xmr was sent to during a transfer? This can be done by eliminating your change stealth but that only works for a 2 output txn.. 22:12:35 3) confused about sweep_single. 22:12:36 Why are multiple subaddress indices allowed if you're sweeping a single output. Same goes for below_amount... 22:13:35 Quick questions about wallet RPC... 22:13:36 1) is it possible to check individual sub address balance ? Another step further is checking individual outputs and their balances too 22:13:36 2)how to check which stealth address the xmr was sent to during a transfer (per output)? This can be done by eliminating your change stealth but that only works for a 2 output txn.. 22:13:37 3) confused about sweep_single. 22:13:37 Why are multiple subaddress indices allowed if you're sweeping a single output. Same goes for below_amount... 22:14:34 1: Yes, see wallet2::balance_per_subaddress in src/wallet/wallet2.cpp 22:15:15 2: from the chain data, you can't. From your wallet cache, it's saved in m_dests in confirmed_transfer_details (wallet2.h) 22:15:38 3: you can have a tx with one input and several outputs 22:16:07 And please do not edit large text for trivial changes, the bridge just reposts the entire thing. 22:16:40 For 2: obviously, if you nuke your cache and later rescan the chain, that info will have gone 22:18:00 Ah, it wasn't trivial changes only. Dunno about 3 then. Maybe just because it uses the same worker function under the hood. 22:18:40 So the wallet RPC doesn't natively support #1 and #2?? 22:19:09 I dunno without having to look. 22:19:55 I looked. Looks like it does support it (get_balance). 22:20:03 (well, for 1) 22:20:22 Pretty sure you'd get 2 as well. 22:21:39 Looks like getmonero and monerodocs differ 22:21:40 I looked too, I'm not seeing destinations, so maybe it's not there. 22:23:00 Feel free to add destinations to get_transfers btw if it's useful to you. 22:23:48 If only I knew "how to code" 22:24:40 Well, you're posting in -dev. 22:25:11 This where all the answers are 22:27:54 Anyway it looks like getmonero docs is more up to date, the other site was entirely confusing