bitmap indices for logs - #1124
Merged
Merged
Conversation
AskAlexSharov
force-pushed
the
logs_index2
branch
from
September 21, 2020 03:26
f11dd23 to
249e344
Compare
AskAlexSharov
force-pushed
the
logs_index2
branch
from
September 23, 2020 05:07
e177850 to
e18ca45
Compare
AskAlexSharov
force-pushed
the
logs_index2
branch
from
September 24, 2020 08:18
33e09ee to
e2eade3
Compare
AskAlexSharov
force-pushed
the
logs_index2
branch
from
September 28, 2020 03:11
2f73981 to
bd58837
Compare
| begin = uint32(crit.FromBlock.Uint64()) | ||
| } | ||
| end := int64(latest) | ||
| end = uint32(latest) |
Contributor
There was a problem hiding this comment.
Why do you convert it to uint32 and then convert to uint64 a bit later?
| if addrBitmap == nil { | ||
| addrBitmap = m | ||
| } else { | ||
| addrBitmap = gocroaring.Or(addrBitmap, m) |
Contributor
There was a problem hiding this comment.
Why do you use Or here and FastOr in another place?
Collaborator
Author
There was a problem hiding this comment.
Or - accept 2 bitmaps, FastOr - many, for 2 it works same as Or. so, no real reason here.
| } | ||
|
|
||
| for _, blockNToMatch := range blockNumbers.ToArray() { | ||
| binary.BigEndian.PutUint32(blockNToMatchBytes, blockNToMatch) |
Contributor
There was a problem hiding this comment.
Do you think this needs to be removed?
Collaborator
Author
There was a problem hiding this comment.
Yes, removed
battlmonstr
pushed a commit
that referenced
this pull request
Sep 14, 2023
cffls
pushed a commit
to cffls/erigon
that referenced
this pull request
Sep 5, 2024
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.
addr -> bitmap(blockN)andtopic -> bitmap(blockN)allow make complicated queries with all-optional parameters: aka "give me logs of addres X and has topic B or has topic C and between blocks D and E"