-
Notifications
You must be signed in to change notification settings - Fork 198
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
EN-7479: storer 2 elastic bug fixes #2249
Conversation
mapToRet := make(map[uint32][]indexer.ValidatorRatingInfo) | ||
|
||
eligible, waiting := rp.genesisNodesConfig.InitialNodesInfo() | ||
for shardId, nodesInShard := range eligible { |
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.
shardID
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.
done
}) | ||
} | ||
} | ||
for shardId, nodesInShard := range waiting { |
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.
shardID
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.
done
@@ -169,6 +184,30 @@ func (rp *ratingsProcessor) getValidatorsRatingFromLeaves(leaves map[string][]by | |||
return validatorsRatingInfo, nil | |||
} | |||
|
|||
func (rp *ratingsProcessor) getGenesisRating() map[uint32][]indexer.ValidatorRatingInfo { | |||
mapToRet := make(map[uint32][]indexer.ValidatorRatingInfo) |
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.
maybe you can renamed this variable
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.
done
if dp.startingEpoch == 0 { | ||
validatorsPubKeys, err := nodeCoordForShard.GetAllEligibleValidatorsPublicKeys(0) | ||
if err != nil || len(validatorsPubKeys) == 0 { | ||
log.Warn("cannot get all eligible validatorsPubKeys", "epoch", 0) |
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.
maybe you should add here continue ??
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.
yes, added
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.
add unit test for the found bugs
unit tests are in PR #2213 |
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.
comment below
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.
the chain ID can be read from the nodesetup.json and then mapped right inside the db folder, without changing the name inside the db folder to chainID, right?
also see DMs and attached logs and db for testing. 🙏
Fixed the following bugs:
GetMiniBlockHeadersHashes
for fetching all the miniblock hashes of a header, because in the previous version, not all the miniblocks were includedTesting procedure:
development
branch) withelastic search
on for some epochs (but limited to maximum 10k transactions/blocks/miniblocks so our comparison tool will work properly)elrond-go/cmd/storer2elastic
createdb/chainID
directory and merge dabatases from nodes in each shard (one node per shard). For a 2 shards + meta configuration, the directory should look like:blocks
->blocks2
-> this requires code changes)config.toml
from storer2elastic if needed (update elastic search credentials and URL)storer2elastic/config
place thenodesSetup.json
used when running the testnetelrond-go-tools
can be used which just needs to be set up with the elastic search instances URLs and indexes paths