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.
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
send txs out #31
send txs out #31
Changes from all commits
3741073
c75b231
62915f4
b671ecf
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
To reuse the HTTP connection, you'll need to read the full body before closing: https://blog.cubieserver.de/2022/http-connection-reuse-in-go-clients/#:~:text=Client%20will%20only%20reuse%20connections,MaxConnsPerHost%20).
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.
that place receives duplicates, it should probably be sent at https://github.com/flashbots/mempool-dumpster/blob/main/collector/tx_processor.go#L174
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.
this place in code is after a bunch of operations including writing to a file and request to a node
also duplicates count over all sources but we send only for allowed sources so this can lead to a big loss of txs
I think its better for receiver to do filtering then.
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.
You are mistaken, the transactions are written to a file later, after deduplicating, inside the processTx function.
Your comment about loss of tx because filtering makes sense though. Would be good to add a comment about why this line of code is in this place.
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.
here where writing to a file https://github.com/flashbots/mempool-dumpster/blob/main/collector/tx_processor.go#L123 happens that I refer to
and its before deduplicating
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.
added comment 62915f4