RPC refactoring: Access wallet using new GetWalletForJSONRPCRequest #8775
pull luke-jr wants to merge 9 commits into bitcoin:master from luke-jr:multiwallet_prefactor_rpc changing 11 files +600 −423-
luke-jr commented at 9:56 am on September 21, 2016: memberPart of the refactorings needed for basic multiwallet (#8694)
-
MarcoFalke added the label RPC/REST/ZMQ on Sep 21, 2016
-
MarcoFalke added the label Wallet on Sep 21, 2016
-
jonasschnelli commented at 1:07 pm on September 21, 2016: contributor
I don’t like the coupling and the
#ifdef ENABLE_WALLET
inrpc/server.cpp|.h
. I’d recommend to keep theCRPCRequestInfo
wallet-free.I think we should pack the request path (URI) into the
CRPCRequestInfo
and or informations about the authentication (in case we want to distinct wallets based on authentication). Then I think there should be a method inwallet.cpp
(or inrpcwallet.cpp
) that maps aCWallet *
pointer from a given URI, Auth-Info or the completeCRPCRequestInfo
instance.Instead of the
CWallet *& pwallet = reqinfo.wallet;
there could be then something likeCWallet *pwallet = CWallets::getWalletFromRequest(reqinfo)
-
jonasschnelli commented at 1:09 pm on September 21, 2016: contributorGeneral ConceptACK on a
CRPCRequestInfo
for the RPC table commands. Maybe it could also include theUniValue params
andfHelp
? -
in src/rpc/misc.cpp: in 041f4e06a6 outdated
69@@ -70,7 +70,8 @@ UniValue getinfo(const UniValue& params, bool fHelp) 70 ); 71 72 #ifdef ENABLE_WALLET 73- LOCK2(cs_main, pwalletMain ? &pwalletMain->cs_wallet : NULL); 74+ CWallet *& pwallet = reqinfo.wallet;
paveljanik commented at 4:17 pm on September 21, 2016:*&
?
luke-jr commented at 7:30 pm on September 21, 2016:Yes, pwallet is an alias to reqinfo.wallet which is of type CWallet*.luke-jr commented at 8:40 pm on September 21, 2016: memberI think we should pack the request path (URI) into the CRPCRequestInfo and or informations about the authentication (in case we want to distinct wallets based on authentication). Then I think there should be a method in wallet.cpp (or in rpcwallet.cpp) that maps a CWallet * pointer from a given URI, Auth-Info or the complete CRPCRequestInfo instance.
That sounds nice, but greatly complicates the implementation. :(
luke-jr force-pushed on Oct 18, 2016luke-jr force-pushed on Oct 18, 2016MarcoFalke commented at 3:16 pm on October 19, 2016: memberI think this can be closed after #8788?jonasschnelli commented at 3:28 pm on October 19, 2016: contributorClosing in favor of merged #8788jonasschnelli closed this on Oct 19, 2016
luke-jr referenced this in commit b65bb4ea27 on Oct 20, 2016luke-jr referenced this in commit cb370e3d67 on Oct 20, 2016luke-jr referenced this in commit 06e4c90e24 on Oct 20, 2016laanwj reopened this on Oct 25, 2016
luke-jr force-pushed on Oct 25, 2016luke-jr force-pushed on Oct 25, 2016luke-jr commented at 9:14 am on October 25, 2016: memberRebased and refactored based on @jonasschnelli ’s idea.laanwj commented at 11:18 am on October 25, 2016: memberMakes sense, utACK ab5ce98in src/rpc/misc.cpp: in ab5ce98587 outdated
25@@ -26,6 +26,8 @@ 26 27 using namespace std; 28 29+CWallet *GetWalletForJSONRPCRequest(const JSONRPCRequest&);
laanwj commented at 11:19 am on October 25, 2016:Not sure how this can pass the build w/--disable-wallet
, but this should be bracketed with#ifdef ENABLE_WALLET
luke-jr force-pushed on Nov 12, 2016luke-jr force-pushed on Nov 12, 2016luke-jr commented at 1:44 am on November 12, 2016: memberRebased and addressed nitluke-jr renamed this:
RPC refactoring: Never access wallet directly, only via new CRPCRequestInfo
RPC refactoring: Access wallet using new GetWalletForJSONRPCRequest
on Nov 12, 2016luke-jr force-pushed on Dec 29, 2016luke-jr referenced this in commit 41383dec86 on Dec 31, 2016instagibbs commented at 6:25 pm on January 4, 2017: memberutACK 7de55733c5690350c48ec94660b5be56fbb5eb39luke-jr force-pushed on Jan 5, 2017luke-jr commented at 10:53 pm on January 5, 2017: memberMinor change: Forward-declared CWallet even for non-wallet builds so it can be used in a pointer type, avoiding unnecessary casting.in src/rpc/rawtransaction.cpp: in e7f063cf8d outdated
34@@ -35,6 +35,11 @@ 35 36 using namespace std; 37 38+#ifdef ENABLE_WALLET 39+std::string HelpRequiringPassphrase(CWallet *);
TheBlueMatt commented at 5:10 pm on January 6, 2017:I’d kinda prefer we add another declaration outside of a header in an unrelated file…can we keep it in server.h and ifdef ENABLE_WALLET it?
luke-jr commented at 5:15 pm on January 6, 2017:I suppose we could. But then it’s more likely to get used in new code (which I think we want to discourage?)
TheBlueMatt commented at 5:17 pm on January 6, 2017:I’d think we can (and, more importantly, would) still nag people submitting PRs which add more uses of it outside of src/wallet/rpc*.in src/rpc/misc.cpp: in 5cc62b207e outdated
25@@ -26,6 +26,10 @@ 26 27 using namespace std; 28 29+#ifdef ENABLE_WALLET 30+CWallet *GetWalletForJSONRPCRequest(const JSONRPCRequest&);
TheBlueMatt commented at 5:18 pm on January 6, 2017:Here as well.in src/wallet/rpcdump.cpp: in 5cc62b207e outdated
28@@ -29,6 +29,7 @@ 29 30 using namespace std; 31 32+CWallet *GetWalletForJSONRPCRequest(const JSONRPCRequest&); 33 void EnsureWalletIsUnlocked(CWallet *); 34 bool EnsureWalletIsAvailable(CWallet *, bool avoidException);
TheBlueMatt commented at 5:30 pm on January 6, 2017:Can we move these to some rpc.h in src/wallet? Why are we declaring functions in another file from the definition if they’re both in src/wallet???in src/wallet/rpcwallet.cpp: in 5cc62b207e outdated
29@@ -30,6 +30,11 @@ using namespace std; 30 int64_t nWalletUnlockTime; 31 static CCriticalSection cs_nWalletUnlockTime; 32 33+CWallet *GetWalletForJSONRPCRequest(const JSONRPCRequest& request)
TheBlueMatt commented at 5:34 pm on January 6, 2017:Can you document this function somewhere (also probably move its definition to src/wallet/rpcwallet.h) - a few places in src/wallet assume it always returns non-NULL but this is not documented (I havent looked at the actual multi-wallet PR, but does this function then throw an RPC exception if you ask for a wallet that isnt loaded, or does it return NULL then)?luke-jr force-pushed on Jan 6, 2017luke-jr force-pushed on Jan 6, 2017gmaxwell commented at 3:18 pm on January 7, 2017: contributorSo in some cases in the RPC you get the wallet pointer from json but then the check if it’s available is far below. This is begging for someone to insert code that uses a potentially null pointer between to two and doesn’t notice because their function doesn’t get tested with a missing wallet. I would recommend moving the creation of that local pointer down to the point where you’re going to test it.
Alternatively or in addition, rename GetWalletForJSONRPCRequest to TryGetWalletForJSONRPCRequest and make GetWalletForJSONRPCRequest a wrapper for it that throws when it fails?
Other than this nit that perhaps getting the pointer and testing it are too separated in some cases, utACK.
luke-jr commented at 7:15 pm on January 7, 2017: memberI liked the TryGetWalletForJSONRPCRequest/GetWalletForJSONRPCRequest refactor idea, but I don’t see any clean way to do it without changing the
help
behaviours.So I moved the one case EnsureWalletIsAvailable was delayed up, and removed the blank line between them and GetWalletForJSONRPCRequest.
in src/wallet/rpcdump.cpp: in 6c25cf78a5 outdated
149@@ -153,8 +150,8 @@ UniValue importprivkey(const JSONRPCRequest& request) 150 return NullUniValue; 151 } 152 153-void ImportAddress(const CBitcoinAddress& address, const string& strLabel); 154-void ImportScript(const CScript& script, const string& strLabel, bool isRedeemScript) 155+void ImportAddress(CWallet*, const CBitcoinAddress& address, const string& strLabel); 156+void ImportScript(CWallet * const pwallet, const CScript& script, const string& strLabel, bool isRedeemScript)
TheBlueMatt commented at 9:49 pm on January 7, 2017:Note that there are a ton of uses of pwalletMain in ImportScript after the first commit (“RPC/Wallet: Pass CWallet as pointer to helper functions”) which are fixed in the next (“RPC: Do all wallet access through new GetWalletForJSONRPCRequest”) when they belong in the first.
ryanofsky commented at 7:07 pm on February 27, 2017:Note that there are a ton of uses of pwalletMain in ImportScript after the first commit (“RPC/Wallet: Pass CWallet as pointer to helper functions”) which are fixed in the next (“RPC: Do all wallet access through new GetWalletForJSONRPCRequest”) when they belong in the first.
I’m not seeing function signatures changes in c68b5a819282363282fa06724146494717882938
RPC: Do all wallet access through new GetWalletForJSONRPCRequest
so the two commits do seem distinct currently.in src/wallet/rpcwallet.cpp: in 6c25cf78a5 outdated
1128@@ -1126,7 +1129,7 @@ struct tallyitem 1129 } 1130 }; 1131 1132-UniValue ListReceived(const UniValue& params, bool fByAccounts) 1133+UniValue ListReceived(CWallet * const pwallet, const UniValue& params, bool fByAccounts)
TheBlueMatt commented at 10:16 pm on January 7, 2017:Note that there are a ton of uses of pwalletMain in ListReceived after the first commit (“RPC/Wallet: Pass CWallet as pointer to helper functions”) which are fixed in the next (“RPC: Do all wallet access through new GetWalletForJSONRPCRequest”) when they belong in the first.in src/wallet/rpcwallet.cpp: in 8bf69fde13 outdated
2015@@ -2019,9 +2016,8 @@ UniValue walletpassphrase(const JSONRPCRequest& request) 2016 pwallet->TopUpKeyPool(); 2017 2018 int64_t nSleepTime = request.params[1].get_int64(); 2019- LOCK(cs_nWalletUnlockTime); 2020- nWalletUnlockTime = GetTime() + nSleepTime; 2021- RPCRunLater("lockwallet", boost::bind(LockWallet, pwallet), nSleepTime); 2022+ pwallet->nRelockTime = GetTime() + nSleepTime; 2023+ RPCRunLater(strprintf("lockwallet_%u", uintptr_t(pwallet)), boost::bind(LockWallet, pwallet), nSleepTime);
TheBlueMatt commented at 11:01 pm on January 7, 2017:I super dont like the fact that the pointer to the wallet will end up in debug.log if you have debug=rpc enabled.
ryanofsky commented at 7:55 pm on February 27, 2017:I super dont like the fact that the pointer to the wallet will end up in debug.log if you have debug=rpc enabled.
Is fixed in later commit c42f3a5ac3235be127bd3a63454784c3d9a00b02
Wallet/RPC: Use filename rather than CWallet pointer, for lockwallet RPCRunLater job name
in src/wallet/rpcwallet.cpp: in ddc1c76d5b outdated
348@@ -340,8 +349,7 @@ UniValue getaddressesbyaccount(const JSONRPCRequest& request) 349 350 // Find all addresses that have the given account 351 UniValue ret(UniValue::VARR); 352- BOOST_FOREACH(const PAIRTYPE(CBitcoinAddress, CAddressBookData)& item, pwallet->mapAddressBook) 353- { 354+ for (const PAIRTYPE(CBitcoinAddress, CAddressBookData)& item : pwallet->mapAddressBook) {
TheBlueMatt commented at 11:07 pm on January 7, 2017:nit: I believe you can remove the PAIRTYPE and replace with std::pair since we’re not using BOOST_FOREACH now.in src/wallet/rpcwallet.cpp: in ddc1c76d5b outdated
1240@@ -1219,8 +1241,7 @@ UniValue ListReceived(CWallet * const pwallet, const UniValue& params, bool fByA 1241 // Reply 1242 UniValue ret(UniValue::VARR); 1243 map<string, tallyitem> mapAccountTally; 1244- BOOST_FOREACH(const PAIRTYPE(CBitcoinAddress, CAddressBookData)& item, pwallet->mapAddressBook) 1245- { 1246+ for (const PAIRTYPE(CBitcoinAddress, CAddressBookData)& item : pwallet->mapAddressBook) {
TheBlueMatt commented at 11:11 pm on January 7, 2017:nit: Here as well (no PAIRTYPE).in src/wallet/rpcwallet.cpp: in ddc1c76d5b outdated
1664@@ -1635,14 +1665,14 @@ UniValue listaccounts(const JSONRPCRequest& request) 1665 includeWatchonly = includeWatchonly | ISMINE_WATCH_ONLY; 1666 1667 map<string, CAmount> mapAccountBalances; 1668- BOOST_FOREACH(const PAIRTYPE(CTxDestination, CAddressBookData)& entry, pwallet->mapAddressBook) { 1669- if (IsMine(*pwallet, entry.first) & includeWatchonly) // This address belongs to me 1670+ for (const PAIRTYPE(CTxDestination, CAddressBookData)& entry : pwallet->mapAddressBook) {
TheBlueMatt commented at 11:12 pm on January 7, 2017:nit: Here as well (no PAIRTYPE).TheBlueMatt commented at 11:30 pm on January 7, 2017: memberPlease do not tag the 4th commit “Trivial”. We usually define trivial as doesnt touch any code.
As for the 6th commit: please do not do this. nothing in src/wallet is built when ENABLE_WALLET is off, so generally src/wallet/* should never be included outside of src/wallet/*
Aside from the (partial-revert) of “Move wallet RPC declarations to rpcwallet.h” and the printing of the raw pointers to debug log, this looks good to me at d9aff6e322fd4cdba8d338d304a627af46feb7eb.
luke-jr force-pushed on Jan 8, 2017luke-jr force-pushed on Jan 8, 2017luke-jr commented at 9:17 pm on January 8, 2017: memberMade changes requested by @TheBlueMatt, and rebased to resolve conflict. Also includes a quick sanity check that -wallet doesn’t include path separators.TheBlueMatt commented at 4:59 pm on January 9, 2017: memberWhile you’re at it, can you call SanitizeString (in addition to the “/\” check) on the wallet param?luke-jr force-pushed on Jan 9, 2017TheBlueMatt commented at 6:03 pm on January 9, 2017: memberutACK 7d1228bf7f1c398d9fcda6161e6aebfc5e5e3700gmaxwell commented at 10:12 pm on January 11, 2017: contributorNeeds rebase.luke-jr force-pushed on Jan 12, 2017gmaxwell commented at 6:34 am on January 12, 2017: contributorACK.fanquake commented at 1:04 pm on January 12, 2017: memberNeeds rebasing again.luke-jr force-pushed on Jan 12, 2017luke-jr commented at 4:57 pm on January 12, 2017: memberRebased yet again.gmaxwell commented at 4:48 am on January 15, 2017: contributorstill ACKluke-jr force-pushed on Feb 3, 2017luke-jr force-pushed on Feb 6, 2017in src/wallet/wallet.cpp: in 5093d41c66 outdated
3739@@ -3740,6 +3740,12 @@ bool CWallet::InitLoadWallet() 3740 3741 std::string walletFile = GetArg("-wallet", DEFAULT_WALLET_DAT);
BlockMechanic commented at 11:42 pm on February 16, 2017:Should this not be “count” i.e for multiple wallet files to be created ? Adding perhaps a for loop to iterate over required num of wallets?
luke-jr commented at 11:46 pm on February 16, 2017:No, because this PR is not multiwallet…luke-jr force-pushed on Feb 17, 2017luke-jr force-pushed on Feb 25, 2017luke-jr force-pushed on Feb 27, 2017luke-jr force-pushed on Feb 27, 2017luke-jr force-pushed on Feb 27, 2017luke-jr force-pushed on Feb 27, 2017luke-jr force-pushed on Feb 27, 2017luke-jr force-pushed on Feb 27, 2017luke-jr force-pushed on Feb 27, 2017luke-jr force-pushed on Feb 27, 2017luke-jr force-pushed on Feb 27, 2017in src/rpc/misc.cpp: in f757a41d79 outdated
111@@ -112,13 +112,17 @@ UniValue getinfo(const JSONRPCRequest& request) 112 class DescribeAddressVisitor : public boost::static_visitor<UniValue> 113 { 114 public: 115+ CWallet * const pwallet;
ryanofsky commented at 7:00 pm on February 27, 2017:Seems like this could be a pointer to a const CWallet. Same for some other cases. Would suggest usingconst CWallet*
instead ofCWallet*
where possible for more safety and clarity.in src/rpc/server.h: in f757a41d79 outdated
202+// Needed even with !ENABLE_WALLET, to pass (ignored) pointers around 203+class CWallet; 204+ 205+#ifdef ENABLE_WALLET 206+// New code should accessing the wallet should be under the ../wallet/ directory 207+std::string HelpRequiringPassphrase(CWallet *);
ryanofsky commented at 7:29 pm on February 27, 2017:Maybe squash commit 6033b43f8cfd612da436c73ff0508a00a8fb0dd5Move wallet RPC declarations to rpcwallet.h
into commit f757a41d7959f1ef5740c57b712fb3b89f233dcdRPC/Wallet: Pass CWallet as pointer to helper functions
, to just add to right place instead of adding and moving.luke-jr force-pushed on Feb 27, 2017in src/rpc/misc.cpp: in c68b5a8192 outdated
83@@ -82,9 +84,9 @@ UniValue getinfo(const JSONRPCRequest& request) 84 obj.push_back(Pair("version", CLIENT_VERSION)); 85 obj.push_back(Pair("protocolversion", PROTOCOL_VERSION)); 86 #ifdef ENABLE_WALLET 87- if (pwalletMain) { 88- obj.push_back(Pair("walletversion", pwalletMain->GetVersion())); 89- obj.push_back(Pair("balance", ValueFromAmount(pwalletMain->GetBalance()))); 90+ if (pwallet) {
ryanofsky commented at 7:50 pm on February 27, 2017:Note to reviewers: This commit (d77ad6d41666b4c41abe1ba3b63300df1903643eRPC: Do all wallet access through new GetWalletForJSONRPCRequest
) is trivial to review if you configure your diff tool to ignore the pwallet->pwalletmain renames (much shorter and no changed lines, only inserted).in src/wallet/rpcwallet.cpp: in 8a1a794ec0 outdated
2059@@ -2063,9 +2060,8 @@ UniValue walletpassphrase(const JSONRPCRequest& request) 2060 pwallet->TopUpKeyPool(); 2061 2062 int64_t nSleepTime = request.params[1].get_int64(); 2063- LOCK(cs_nWalletUnlockTime);
ryanofsky commented at 7:57 pm on February 27, 2017:Is the syncrhonization not needed anymore?in src/rpc/misc.cpp: in 09f3076769 outdated
100@@ -101,8 +101,9 @@ UniValue getinfo(const JSONRPCRequest& request) 101 obj.push_back(Pair("keypoololdest", pwallet->GetOldestKeyPoolTime())); 102 obj.push_back(Pair("keypoolsize", (int)pwallet->GetKeyPoolSize())); 103 } 104- if (pwallet && pwallet->IsCrypted()) 105+ if (pwallet && pwallet->IsCrypted()) {
ryanofsky commented at 7:59 pm on February 27, 2017:Commit 09f30767695fd585b68fa100d770c9a0a4209b51Reformat touched lines with C++11
looks fine, but it doesn’t appear that these changes have anything to do with C++11. Maybe clarify commit message.in src/rpc/misc.cpp: in 6033b43f8c outdated
234@@ -234,6 +235,9 @@ UniValue validateaddress(const JSONRPCRequest& request) 235 return ret; 236 } 237 238+// Needed even with !ENABLE_WALLET, to pass (ignored) pointers around 239+class CWallet;
ryanofsky commented at 8:21 pm on February 27, 2017:This doesn’t actually seem to be needed since CWallet is also forward declared in init.h, but maybe it is better to keep it.luke-jr force-pushed on Feb 27, 2017luke-jr force-pushed on Feb 27, 2017RPC/Wallet: Pass CWallet as pointer to helper functions eca550f250RPC: Do all wallet access through new GetWalletForJSONRPCRequest d77ad6d416Move nWalletUnlockTime to CWallet::nRelockTime, and name timed task unique per CWallet 2e518e313bReformat touched lines with C++11 bf8a04a165RPC: Pass on JSONRPCRequest metadata (URI/user/etc) for "help" method ad1573472eMove wallet RPC declarations to rpcwallet.h a4356328e0More tightly couple EnsureWalletIsAvailable with GetWalletForJSONRPCRequest where appropriate 86be48a77cWallet/RPC: Use filename rather than CWallet pointer, for lockwallet RPCRunLater job name
The job name is logged, and could pose as an information leak to someone attacking the process, helping them counteract ASLR protections
Wallet: Sanitise -wallet parameter d678771c66luke-jr force-pushed on Feb 27, 2017ryanofsky commented at 9:00 pm on February 27, 2017: memberutACK d678771c660c936a6222dd43a204cb2699100f3elaanwj assigned laanwj on Mar 2, 2017jonasschnelli commented at 7:28 pm on March 2, 2017: contributorGreat PR. I think we should get this in as soon as possible. utACK d678771c660c936a6222dd43a204cb2699100f3elaanwj commented at 12:38 pm on March 3, 2017: memberutACK d678771laanwj merged this on Mar 3, 2017laanwj closed this on Mar 3, 2017
laanwj referenced this in commit eb281842b7 on Mar 3, 2017fanquake moved this from the "In progress" to the "Done" column in a project
luke-jr referenced this in commit 5bd40ce055 on Mar 7, 2017luke-jr referenced this in commit e6aa16cac0 on Mar 7, 2017luke-jr referenced this in commit b7adec2da7 on Mar 7, 2017luke-jr referenced this in commit 212a0f5a99 on Mar 7, 2017luke-jr referenced this in commit 9283eaf97c on Mar 7, 2017luke-jr referenced this in commit 211520703c on Mar 7, 2017luke-jr referenced this in commit 7a5499c771 on Mar 7, 2017luke-jr referenced this in commit 94964a31c2 on Mar 7, 2017luke-jr referenced this in commit 6689b85688 on Mar 7, 2017PastaPastaPasta referenced this in commit 884279a6f7 on Dec 29, 2018PastaPastaPasta referenced this in commit 2d8a771801 on Dec 30, 2018PastaPastaPasta referenced this in commit 5c03749204 on Dec 30, 2018PastaPastaPasta referenced this in commit bf939b6eb3 on Dec 30, 2018PastaPastaPasta referenced this in commit 9cb360e773 on Dec 30, 2018PastaPastaPasta referenced this in commit 54ddffc6ec on Dec 30, 2018PastaPastaPasta referenced this in commit 5dd9946528 on Dec 30, 2018PastaPastaPasta referenced this in commit 6fff6754c4 on Dec 30, 2018PastaPastaPasta referenced this in commit 3d8aa0c15c on Dec 30, 2018PastaPastaPasta referenced this in commit 19aaaeaac5 on Dec 30, 2018PastaPastaPasta referenced this in commit ae6857e94e on Dec 30, 2018PastaPastaPasta referenced this in commit 8a291608a8 on Dec 30, 2018PastaPastaPasta referenced this in commit be0fc823e7 on Dec 30, 2018PastaPastaPasta referenced this in commit 7a206cf1cb on Dec 30, 2018PastaPastaPasta referenced this in commit 84626a9506 on Dec 30, 2018PastaPastaPasta referenced this in commit 2292143896 on Dec 31, 2018PastaPastaPasta referenced this in commit b0af0712a5 on Dec 31, 2018PastaPastaPasta referenced this in commit 8f310cac91 on Dec 31, 2018PastaPastaPasta referenced this in commit 461b559467 on Dec 31, 2018PastaPastaPasta referenced this in commit 1cae76176b on Dec 31, 2018PastaPastaPasta referenced this in commit 0459aba396 on Dec 31, 2018PastaPastaPasta referenced this in commit cccea88376 on Dec 31, 2018PastaPastaPasta referenced this in commit 279980e0bb on Dec 31, 2018PastaPastaPasta referenced this in commit 0ab1cac862 on Dec 31, 2018PastaPastaPasta referenced this in commit 5d1d4ed09a on Dec 31, 2018PastaPastaPasta referenced this in commit 477eef0a74 on Dec 31, 2018PastaPastaPasta referenced this in commit b8345b6f9e on Dec 31, 2018PastaPastaPasta referenced this in commit e82a91e873 on Dec 31, 2018PastaPastaPasta referenced this in commit c42b215296 on Dec 31, 2018PastaPastaPasta referenced this in commit 588b83fc8d on Dec 31, 2018PastaPastaPasta referenced this in commit b5a27985c6 on Jan 2, 2019PastaPastaPasta referenced this in commit 8408587316 on Jan 2, 2019PastaPastaPasta referenced this in commit f2f14e49bc on Jan 2, 2019PastaPastaPasta referenced this in commit 8d3008e220 on Jan 2, 2019PastaPastaPasta referenced this in commit 0b8cdbbfda on Jan 2, 2019PastaPastaPasta referenced this in commit b03711f3a9 on Jan 2, 2019PastaPastaPasta referenced this in commit b030576f7a on Jan 3, 2019PastaPastaPasta referenced this in commit eaa22e7ffe on Jan 3, 2019PastaPastaPasta referenced this in commit 03379e3b34 on Jan 3, 2019PastaPastaPasta referenced this in commit aa239eb134 on Jan 21, 2019PastaPastaPasta referenced this in commit 51f26b58c5 on Jan 21, 2019PastaPastaPasta referenced this in commit e0c8383b39 on Jan 21, 2019PastaPastaPasta referenced this in commit 96fcbf3420 on Jan 25, 2019PastaPastaPasta referenced this in commit d9ffe4e925 on Jan 25, 2019PastaPastaPasta referenced this in commit 7aeaa4bf87 on Jan 25, 2019PastaPastaPasta referenced this in commit 87af117811 on Jan 25, 2019PastaPastaPasta referenced this in commit c094d4bbe6 on Jan 25, 2019PastaPastaPasta referenced this in commit c70aa60792 on Jan 25, 2019adneerav commented at 7:39 am on February 5, 2019: noneHello @luke-jr ,
Is there any way where we can increase the number of wallets to be in loaded state at same time.As rightnow its like if I load wallet more than 100 or 150 daemon is getting crashed/stopped. I am trying to load/unload wallet dynamically using RPC.
What i tried is incraesing the
set_lk_max_lockers
to 400000 and also addedset_lg_regionmax 1048576
But still same things I am facing.Reflink for above setup : https://docs.oracle.com/cd/E17276_01/html/api_reference/C/set_lk_max_lockers_parameter.html https://bitcoin.stackexchange.com/a/70737
So is there any way or configuration or any changes which can increase and allow more number of wallets to be loaded ?
random-zebra referenced this in commit 096a0f9640 on May 17, 2021MarcoFalke locked this on Dec 16, 2021
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 12:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me