Skip to content
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

Feat/miner filter mpool #236

Merged
merged 3 commits into from
Sep 26, 2019
Merged

Feat/miner filter mpool #236

merged 3 commits into from
Sep 26, 2019

Conversation

whyrusleeping
Copy link
Member

This should resolve the issue where miners break if they encounter a message that doesnt have enough funds.

I considered making the api just return the properly filtered messages, but opted to implement things without changing the API (do more with less!).

continue
}

if msg.Message.Nonce > inclNonces[from] {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be reverse? The way it's currently written it's only applying one message per origin per block (checked in pond).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, the next message needs to be exactly the next nonce. Youre right that we should also have one that makes sure its not less than, this check should probably be !=.

I'll write a test here to check the logic...

@magik6k
Copy link
Contributor

magik6k commented Sep 26, 2019

(We'll also probably need to do this check in pubsub validator, so it's harder to dos the network)

@whyrusleeping
Copy link
Member Author

relevant issue from go-filecoin: filecoin-project/venus#2500

We should fix this before opening things up otherwise our friend Peter will send a few terabytes of nastygram traffic at us :P

@whyrusleeping whyrusleeping merged commit ad10164 into master Sep 26, 2019
@whyrusleeping whyrusleeping deleted the feat/miner-filter-mpool branch September 26, 2019 21:27
nonsense pushed a commit that referenced this pull request Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants