-
UkoeHB
who knows...
-
methylene[m]
I have a particular use-case that at first (and second) glance seems like it could be a bit clunky to implement with the [Wallet](
getmonero.org/resources/developer-guides/wallet-rpc.html) and [Daemon](
getmonero.org/resources/developer-guides/daemon-rpc.html) RPC APIs. Hopefully this is not... (full message at
libera.ems.host/_matrix/media/r0/do…cb14ad2cf1583b2c2b45804e4b631937281)
-
methylene[m]
Regarding the `create_account` bit, I'd be curious to know if anyone has been running wallets with 1000+ subaddresses, and if there are any actual or practical limitations to the number of subaddresses, and the performance impact of doing such a thing.
-
selsta
methylene[m]: having 1000+ subaddresses shouldn't be a problem
-
selsta
wallet RAM usage increases with subaddresses but sync time should stay constant
-
methylene[m]
selsta: And if we speak of 100K, 1M, 10M addresses?
-
selsta
Same. Higher RAM usage and constant sync time.
-
methylene[m]
Ok, that's certainly positive. Do you have an idea what the RAM requirements would be for every, say 1000 addresses?
-
selsta
I don't know exactly. But if your requirement is millions of subaddresses it shouldn't be a problem to run the wallet on a VPS with more than 2GB RAM :)
-
selsta
1000 addresses shouldn't be visible at all in RAM usage. If I remember correctly the default is 10000 subadddresses.
-
methylene[m]
Whatever the memory per address (within reason), RAM requirements scaling linearly with the number of simultaneously watched addresses seems very reasonable. My main concern remains pruning of unused addresses. Is there a way to tell a wallet to stop caring about a subaddress? I don't mind if the address still "exists" (the index will obviously not be reused, deterministic derivation and tralala), I just don't want it to expend RAM
-
methylene[m]
storing it, nor cycles watching for its transactions.
-
selsta
I don't think that exists currently.
-
methylene[m]
So, practically speaking, the most straightforward path seems to be using a single wallet and not worrying about it for now, and working on a patch for the wallet core to make it support sparse subaddresses. The other solutions of having a wallet pool sound clunky, plus opening and closing wallets seems to take a not-inconsiderable amount of time in my testing.
-
methylene[m]
I might convert the subaddress index to a `uint64_t` as well, while I'm at it ;)
-
methylene[m]
Sanity check: I should be modifying `src/wallet`, not `simplewallet1, yes?
-
methylene[m]
s/simplewallet1,/simplewallet`,/
-
selsta
methylene[m]: simplewallet is monero-wallet-cli program, wallet2 is the internal wallet implementation
-
selsta
simplewallet calls wallet2 functions
-
selsta
the account index is uint32_t and the subaddress index is also uint32_t
-
selsta
-
selsta
.merge+ 8190
-
xmr-pr
Added
-
euneauxhoo[m]
What can you say to the point of anonymity set for transactions being only 11. Why is that enough? Apparently the private version of ZCash has an anonymity set of ~500k
-
hocuspocusoutoff
can you trace some xmr trades for us to show that 11 isnt sufficient?
-
tusko
with Tryptich over 128 will be possibo
-
xmr-pr
EWIT521 opened issue #8204: How to simulate a TXID for multiple UTXO transaction
-
xmr-pr
-
xmr-pr
mj-xmr opened pull request #8205: Compil. time: cryptonote_core minus portable_storage header
-
xmr-pr
-
methylene[m]
selsta: Right, I see that it is currently a `uint32_t`. Also looks like it's already stored as a map some places internally, so I guess exposing an RPC method to delete keys out of that map would be possible, but ideally they would also not be loaded at all on wallet open. I guess this would require changing... (full message at
libera.ems.host/_matrix/media/r0/do…8e2bb157fe7e3a90dc5d945254198a51380)
-
methylene[m]
My hope is of course to find a way to make this change that doesn't break the `wallet2` api and all the other stuff that depends on it.
-
selsta
methylene[m]: it's two unit32_t indices
-
selsta
one account index and one subaddress index
-
methylene[m]
{account, subaddr_idx}?
-
methylene[m]
Aha, sure.
-
methylene[m]
Same principle applies though, in order to support sparse subaddresses, that would need to become a sparse list. Wouldn't really change much for wallets/users that don't care about removing subaddrs though, if serialized in a reasonable way.
-
methylene[m]
`m_subaddr_labels` *could* be changed to a `serializable_unordered_map<cryptonote::subaddress_index, crypto::public_key>`, but it's probably fine as is
-
methylene[m]
So the wallet cache already seems fine also, as far as tolerating deleting/sparse subaddresses. The keys file doesn't store `{account, subaddr}`, so we expect restoring from keys to require additional...help...as it already does. And if a cache file exists it looks like it will load that, sparse or otherwise... (full message at
libera.ems.host/_matrix/media/r0/do…a3f8cda8612170b98de2fa336663fba105f)
-
methylene[m]
Being careful about having `null` in `m_subaddr_labels`, I suppose, could make them all point to `static LABEL_EMPTY = ""`, don't think they get derefed unless the index exists in `m_subaddrs` though.
-
methylene[m]
This would obviously be great if it works, so as to not even break the existing cache format.
-
methylene[m]
selsta: Does this look like it's going to blow up all over the place?
-
bootlegbilly[m]
Hey everyone
-
bootlegbilly[m]
I'm having some issues with the wallet RPC atm and I'd like some help
-
bootlegbilly[m]
So i'm trying to just generate a monero subaddr, transfer money to that subaddr, and then send it back
-
bootlegbilly[m]
The first two things I'm able to do perfectly fine w 0 issue, but it's the sending ti back part that's giving me trouble
-
bootlegbilly[m]
When I just try to send back the exact amount i sent to the wallet, I get an error of "not enough money"
-
bootlegbilly[m]
Which I honestly completely don't understand, since at higher log levels when it says "available" and "tx amount" tx amount is lower
-
moneromooo
Enough left for the fee ?
-
methylene[m]
bootlegbilly: Fee + did you wait for the transaction to be confirmed?
-
bootlegbilly[m]
Current network fee is 0.000000004565 right?
-
bootlegbilly[m]
If so then yes
-
bootlegbilly[m]
Oh
-
bootlegbilly[m]
Thats the fee per byte
-
bootlegbilly[m]
Jesus lol
-
bootlegbilly[m]
Is there anyway of calculating the size of a transaction from just the amount??
-
bootlegbilly[m]
s/??/?/
-
methylene[m]
bootlegbilly: For your use case, just `sweep_*` rather than `transfer`.
-
bootlegbilly[m]
methylene I don't think I'm able to specify the amount I send with the sweep_* functions though
-
bootlegbilly[m]
Just from what i can tell from the docs
-
methylene[m]
bootlegbilly: True, that's the point. You said you wanted to "send it back", all of it being the implication.
-
bootlegbilly[m]
Oh that's very true, jaja
-
bootlegbilly[m]
What if I only wanted to send part of it back
-
methylene[m]
Then you would probably have enough for the fees :)
-
bootlegbilly[m]
Ty
-
bootlegbilly[m]
Hey so really quick
-
bootlegbilly[m]
Whats the difference between transfer and transfer_split
-
bootlegbilly[m]
Like ik the docs say that the transaction can be split if needed but does that make a difference at all?
-
bootlegbilly[m]
like will transfer_split succeed more often on a specific edge case?
-
moneromooo
There's a sweep_all call.
-
moneromooo
(which will send balance-fee)
-
selsta
methylene[m]: I'm not familiar with the subaddress code myself so can't really help
-
moneromooo
I don't *think* it'll break, but I'm not sure. The reason I think it will not break is that you can add a subaddress with an arbitrary index, and I'm not aware of anything this breaks. However, it's unlikely to be tested much.
-
moneromooo
In any case, it's theoretically possible to make it work, so any breakage is fixable.
-
moneromooo
Of course, you lose the ability to auto bump the pregenerated indices if you receive something on an address you dumped, but I think that's what you want anyway.
-
moneromooo
I also have an old patch that halves RAM requirements for subaddreses. Might be useful if RAM usage is your original issue for wanting to forget addresses.
-
moneromooo
bootlegbilly[m]: originally, transfer_split allows making more htan one tx per request, while transfer does not.
-
moneromooo
In simplewallet, transfer now runs transfer_split internally.
-
moneromooo
In RPC, I think it's still the old nomenclature, for compat reasons.
-
moneromooo
You should not need to use the transfer RPC, just transfer_split.
-
bootlegbilly[m]
moneromooo: Ty
-
UkoeHB
selsta: have you seen this failure before (node_server unit test)
github.com/monero-project/monero/runs/5414279246
-
selsta
UkoeHB: is it consistently reproducible?
-
selsta
I would force push and try again
-
UkoeHB
do you have a trick to force pushing? the only way I know is to modify the commit with a rebase
-
moneromooo
push -f
-
moneromooo
(Whether that triggers a github build though, no idea)
-
UkoeHB
Everything up-to-date
-
UkoeHB
This is what I get
-
selsta
git commit -S --amend --no-edit
-
selsta
git push -f
-
UkoeHB
selsta: thanks :)
-
xmr-pr
BebeSparkelSparkel opened issue #8206: unit_tests node_server.bind_same_p2p_port FAILED
-
xmr-pr
-
spirobel[m]
monero-javscript related question: are there any limitations or underlying assumptions about the monero wallet listeners that I dont know about?
-
-
-
moneromooo
AIUI javascript doesn't grok integers, so large amounts will lose precision.
-
spirobel[m]
I setup the listner in a redux-saga like this. But it seems like the onSyncProgress callback never happens even though I see in the network tab that the wallet is syncing with the server
-
spirobel[m]
s/server/daemon /
-
hocuspocusoutoff
if youre having JS problems with integers, make sure you go through and BigInt everything
-
spirobel[m]
hocuspocusoutoff: I dont think its related to integers. the problem is the listener callback does not get called.
-
-
spirobel[m]
I see in the network console something is happening but I dont get the callback from the listener
-
spirobel[m]
maybe woodser knows something I could try 😅🙂
-
selsta
UkoeHB: seems green now
-
woodser[m]
I haven't tried the yield/call syntax. are you able to do more conventional await monero_wallet.addListener(listener) ?
-
spirobel[m]
woodser[m]: yes I tried it too.
-
-
-
spirobel[m]
still the same result. I also added a onnewblock handler
-
spirobel[m]
but it seems like non of the handlers get called. Maybe this is related to webasm and isolation or somthing ...
-
spirobel[m]
s/somthing/something/
-
spirobel[m]
Can you point me somwhere in the monero-javascript codebase where I can dig?
-
spirobel[m]
s/somwhere/somewhere/
-
spirobel[m]
or maybe it is webworker related
-
woodser[m]
could it be that the wallet is already synced, perhaps a new wallet, and new blocks need to be added to the chain?
-
woodser[m]
-
woodser[m]
npm run test -- --grep "Scratchpad"
-
spirobel[m]
woodser[m]: ah okay true. maybe its working but the subconscious assumptions I had about it are wrong. I just created the wallet for testing purposes
-
woodser[m]
it only fires on initial sync (doesn't apply to new wallets) and when new blocks are added to the chain
-
-
spirobel[m]
woodser[m]: hm...maybe on stagenet there were no new blocks
-
spirobel[m]
yeah it makes sense. So I will just assume it works and implement the sending and receiving part of the UI and then see again if it works
-
spirobel[m]
thanks a lot for your help. Its easy to get stuck in the mud when assuming things that shouldnt be assumed haha
-
woodser[m]
np :)
-
Elijah[m]
Just wait 3 minutes when you can safely assume a block has been mined
-
Elijah[m]
Then you should see the onnewblock get called
-
spirobel[m]
Elijah[m]: is it also on stagenet?
-
Elijah[m]
Stagenet is just mainnet code wise just that xmr has no fiat value.
-
Elijah[m]
* just that the xmr has
-
spirobel[m]
hm..or maybe something is wrong with the daemon connection
-
UkoeHB
selsta: yep guess it's a rare bug or oom issue