Closed
Conversation
6911fa3 to
58da64d
Compare
Contributor
|
| Branch | 1991-incorrect-estimation-and-high-gas-costs-on-first-call-to-deposittopupdeposit |
| Testbed | self-hosted |
⚠️ WARNING: No Threshold found!Without a Threshold, no Alerts will ever be generated.
Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the--ci-only-thresholdsCLI flag.
Click to view all benchmark results
| Benchmark | Latency | milliseconds (ms) |
|---|---|---|
| process-empty/process-empty | 📈 view plot | 9.63 |
| produce-full/produce-full | 📈 view plot | 1,964.70 |
bfd580a to
a73922a
Compare
44900a5 to
575142b
Compare
3c8e9bd to
521ad2f
Compare
Contributor
Author
|
Migrated along with another solution to a single draft PR - #2226 |
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.
Work done by
updateLatestComputedEpoch()within functions called by delegators, iedepositTopUp(),unstake()andwithdraw()is expensive in some circumstances, ie when a deposit has occurred and one or more epochs passed since. This is because the new staker key is written to future committees.This work aims to remove costly writes to
_committee[]from the above functions and instead have all writes done indeposit(). To achieve this i've changed how_committeeworks slightly such that we only write to_committee[]if there are changes and do not copy data if data hasnt changed.Results
Before
deposit owner1: Gas used 410503
Rolling ahead 2 epochs
deposit owner2: Gas used 644369
Rolling ahead 1 epochs
1st top up owner 1: Gas used 179666
1st top up owner 2: Gas used 16149
Rolling ahead 2 epochs
2nd top up owner 1: Gas used 273779
2nd top up owner 2: Gas used 16158
After
deposit owner1: Gas used 334749
Rolling ahead 2 epochs
deposit owner2: Gas used 446585
Rolling ahead 1 epochs
1st top up owner 1: Gas used 14174
1st top up owner 2: Gas used 14174
Rolling ahead 2 epochs
2nd top up owner 1: Gas used 13987
2nd top up owner 2: Gas used 13990