-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mempool: completely handle fees and transferred balances within "detectWillFeeExceedBalance()" #6637
Conversation
return nil | ||
} | ||
|
||
if function != core.BuiltInFunctionMultiESDTNFTTransfer { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Superfluous (somehow)?
|
||
accumulatedNativeValue := big.NewInt(0) | ||
|
||
for _, transfer := range esdtTransfers.ESDTTransfers { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this add a negligible overhead? A lot of transactions are with MultiESDTNFTTransfer
can the entire method be parallelized?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good question, will benchmark ASAP 🙌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// NOTE: 20% is also due to the require() / assert() calls.
// 0.012993s (TestBenchmarkSelectionSession_GetTransferredValue/numTransactions_=_5_000)
// 0.024580s (TestBenchmarkSelectionSession_GetTransferredValue/numTransactions_=_10_000)
// 0.048808s (TestBenchmarkSelectionSession_GetTransferredValue/numTransactions_=_20_000)
Thus, if we select ~10k, about 20 milliseconds (a bit much) will be spent in GetTransferredValue()
. The selection duration is capped, though. There is still room for optimization.
We can move the call to GetTransferredValue()
to the moment the transaction is added to the pool (additions are concurrent, also).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MX-16211
The base branch was changed.
// 2. proposer will have those 3 transactions in its pools and will propose a block | ||
// 3. another node will be able to sync the proposed block (and request - receive) the 2 transactions that | ||
// will end up in the block (one valid and one invalid) | ||
// 4. the non-executable transaction will be removed from the proposer's pool | ||
// 4. the non-executable transaction will not be immediately removed from the proposer's pool. See MX-16200. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MX-16200
Reasoning behind the pull request
Proposed changes
Testing procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
feat
branch created?feat
branch merging, do all satellite projects have a proper tag insidego.mod
?