-
Notifications
You must be signed in to change notification settings - Fork 114
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
fix(exporter): memory leak and lock contentions #2034
Open
y0sher
wants to merge
48
commits into
stage
Choose a base branch
from
deploy/exporter-simplify-mtx
base: stage
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
c8c925c
don't allocate SeenSigners if not needed
nkryuchkov 9f703dd
use SignersBitMask as SeenSigners key
nkryuchkov 55c7525
store full data hash instead of full data
nkryuchkov 8fbb447
compress MessageCounts from 48 bytes to 1
nkryuchkov 5e15f09
fix file name
nkryuchkov 8a92a27
get rid of consensusID
nkryuchkov 9dc78fe
add comments for SeenSigners
nkryuchkov 331d490
use slice instead of map in consensusState
nkryuchkov a33c9bf
draft
olegshmuelov 4da54b8
revert concurrency
olegshmuelov 5711ac6
lint
olegshmuelov 1ae8380
fix panic message
nkryuchkov d36e736
lint fix
olegshmuelov 7e39964
improve naming
olegshmuelov 4d47d4d
refactor getting signer index in committee
nkryuchkov a658aaf
clarify ErrDuplicatedMessage
nkryuchkov 5dd47ea
fix linter
nkryuchkov 203b9be
get rid of panic
nkryuchkov 4d9e546
fix imports
nkryuchkov dc7f0d6
reduce amount of stored slots
nkryuchkov 66e970a
change RWMutex to Mutex
nkryuchkov 6dc13bc
rename states
nkryuchkov 91c43e1
use ttlcache for state
nkryuchkov 055ac8a
fix linter
nkryuchkov 6bb4f65
Merge branch 'stage' into msgvalidation-optimize-signer-state
nkryuchkov 24c78eb
Merge branch 'stage' into exporter-race-fix
olegshmuelov eac592a
exporter with jemalloc
moshe-blox 06411f7
remove jemalloc check
moshe-blox 49ed538
increase worker count
moshe-blox 875c9b7
revert worker count increase
moshe-blox a31ac82
Merge branch 'stage' into msgvalidation-optimize-signer-state
nkryuchkov 26c9bc1
fix issues after merging
nkryuchkov 49c44fd
udpate discard ratio; run until no err
anatolie-ssv 0a23a0d
Merge branch 'msgvalidation-optimize-signer-state' into exporter-with…
moshe-blox 37f9e53
Merge branch 'stage' into exporter-race-fix
y0sher fd7c764
imports and fmt
y0sher 6b92f1e
Merge branch 'exporter-race-fix' into exporter-with-jemalloc
moshe-blox 1cbbade
don't reopen database after migrations
moshe-blox b4a8e71
Merge branch 'fix/badger-quickgc-rate' into exporter-with-jemalloc
moshe-blox e4992fc
simple mtx usage
y0sher 127aa5e
simple mtx usage
y0sher aa29eb7
cr: RW mutex is not needed here.
y0sher 7995a8e
cr: remove unused code
y0sher 1b28899
remove mutexes in ValidatorState and OperatorState
nkryuchkov 550b344
cr: remove unused code
y0sher 0addd00
don't save or get participates with tx.
y0sher 93e78df
revert jemalloc
moshe-blox 439da52
readd jemalloc check
moshe-blox File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package validation | ||
|
||
import ( | ||
"github.com/attestantio/go-eth2-client/spec/phase0" | ||
spectypes "github.com/ssvlabs/ssv-spec/types" | ||
) | ||
|
||
type CommitteeInfo struct { | ||
committeeID spectypes.CommitteeID | ||
committee []spectypes.OperatorID | ||
signerIndices map[spectypes.OperatorID]int | ||
validatorIndices []phase0.ValidatorIndex | ||
} | ||
|
||
func newCommitteeInfo( | ||
committeeID spectypes.CommitteeID, | ||
operators []spectypes.OperatorID, | ||
validatorIndices []phase0.ValidatorIndex, | ||
) CommitteeInfo { | ||
signerIndices := make(map[spectypes.OperatorID]int) | ||
for i, operator := range operators { | ||
signerIndices[operator] = i | ||
} | ||
|
||
return CommitteeInfo{ | ||
committeeID: committeeID, | ||
committee: operators, | ||
signerIndices: signerIndices, | ||
validatorIndices: validatorIndices, | ||
} | ||
} | ||
|
||
// keeping the method for readability and the comment | ||
func (ci *CommitteeInfo) signerIndex(signer spectypes.OperatorID) int { | ||
return ci.signerIndices[signer] // existence must be checked by ErrSignerNotInCommittee | ||
} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
While at it - would be nice to add explaining comments about what
OperatorState
andValidatorState
are (eg. what'sstoredSlotCount
used for and why we have 1 signer per slot inOperatorState
)