Repository navigation
feat: increased withdrawal limits to flat 2000 from v22 - #6369
Merged
Merged
Conversation
|
clang format: --- src/evo/creditpool.cpp (before formatting)
+++ src/evo/creditpool.cpp (after formatting)
@@ -187,10 +187,11 @@
assert(currentLimit >= 0);
if (currentLimit > 0 || latelyUnlocked > 0 || locked > 0) {
- LogPrint(BCLog::CREDITPOOL, "CCreditPoolManager: asset unlock limits on height: %d locked: %d.%08d limit: %d.%08d unlocked-in-window: %d.%08d\n",
- block_index->nHeight, locked / COIN, locked % COIN,
- currentLimit / COIN, currentLimit % COIN,
- latelyUnlocked / COIN, latelyUnlocked % COIN);
+ LogPrint(BCLog::CREDITPOOL, /* Continued */
+ "CCreditPoolManager: asset unlock limits on height: %d locked: %d.%08d limit: %d.%08d "
+ "unlocked-in-window: %d.%08d\n",
+ block_index->nHeight, locked / COIN, locked % COIN, currentLimit / COIN, currentLimit % COIN,
+ latelyUnlocked / COIN, latelyUnlocked % COIN);
}
CCreditPool pool{locked, currentLimit, latelyUnlocked, indexes}; |
UdjinM6
reviewed
Oct 28, 2024
There was a problem hiding this comment.
All calls to LogPrintf() and LogPrint() should be terminated with \n
src/evo/creditpool.cpp: LogPrint(BCLog::CREDITPOOL,
Suggested change
| LogPrint(BCLog::CREDITPOOL, | |
| LogPrint(BCLog::CREDITPOOL, /* Continued */ |
Collaborator
Author
There was a problem hiding this comment.
can we disable clang-format explicitely for LogPrint somehow?
knst
force-pushed
the
v22-withdrawal-limit
branch
from
October 28, 2024 09:08
a30c094 to
a51ade5
Compare
UdjinM6
previously approved these changes
Oct 28, 2024
Collaborator
Author
|
Small optimizations are coming.... |
knst
force-pushed
the
v22-withdrawal-limit
branch
from
October 28, 2024 15:21
325b8a9 to
c97f5f5
Compare
It is impossible situation which will never happen.
But better to change it to exception for better error-prune implementation
in case someone will decide to change this code:
const auto quorums = qman.ScanQuorums(llmqType, pindexTip, quorums_to_scan);
if (bool isActive = std::any_of(quorums.begin(), quorums.end(), [&](const auto &q) { return q->qc->quorumHash == quorumHash; }); !isActive) {
return state.Invalid(TxValidationResult::TX_CONSENSUS, "bad-assetunlock-too-old-quorum");
}
...
const auto quorum = qman.GetQuorum(llmqType, quorumHash);
assert(quorum); <-- for sure exist because we just scanned quorums
UdjinM6
approved these changes
Oct 28, 2024
Member
|
Guix builds locally; gonna merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue being fixed or feature implemented
Limit 1000 seems a bit small at the moment, while limit 2000 is still safe enough.
What was done?
Withdrawals limits in pre-v22 are:
The fork
withdrawalsintroduces higher limit:How Has This Been Tested?
Updated functional test
feature_asset_locks.pyBreaking Changes
Limits of withdrawals are increased to 2000 dash. It changes consensus rules.
Checklist: