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

New message pool selection logic #2838

Merged
merged 26 commits into from
Aug 6, 2020
Merged

New message pool selection logic #2838

merged 26 commits into from
Aug 6, 2020

Conversation

vyzo
Copy link
Contributor

@vyzo vyzo commented Aug 5, 2020

As extensively discussed in the colo(s).

TBD:

  • update pruning logic
  • hook the miner to use this selection logic
  • unit tests!

@vyzo vyzo changed the base branch from master to next August 5, 2020 07:39
@vyzo vyzo marked this pull request as draft August 5, 2020 07:40
@vyzo vyzo force-pushed the feat/message-pool-selection branch from 4c3726a to 06a1368 Compare August 5, 2020 07:44
@lanzafame
Copy link
Contributor

@vyzo thank you for excellent comments 🙏 I could totally follow along

@vyzo vyzo force-pushed the feat/message-pool-selection branch from 7d0c411 to 6f660f7 Compare August 6, 2020 07:47
the default non-stable sort may reorder chains with the same gasPerf, which might change the order
of messages per nonce; facepalm.
Merge chains when gasPerf is non-descreasing (instead of increasing) to create maximal chains.
This also obviates the need for stable sort, as the chains are guaranteed to be in decreasing
order for the same actor.
api/api_full.go Outdated Show resolved Hide resolved
@vyzo vyzo marked this pull request as ready for review August 6, 2020 17:16
@@ -146,6 +146,9 @@ type FullNode interface {
// MpoolPending returns pending mempool messages.
MpoolPending(context.Context, types.TipSetKey) ([]*types.SignedMessage, error)

// MpoolSelect returns a list of pending messages for inclusion in the next block
MpoolSelect(context.Context, types.TipSetKey) ([]*types.SignedMessage, error)
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a list of 'priority addresses' to this API? And have it prioritize messages from those addresses, even if they arent necessarily the most profitable ones?

Copy link
Member

Choose a reason for hiding this comment

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

can be done as a followup, but i think its a pretty important thing to have

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, we can do that, but I was thinking of doing it in a subsequent pr after discussing it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agreed on importance, let's discuss on the colo -- I want to think about it a bit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we want a separate api call because we need to know priority addresses for pruning too -- we shouldn't prune messages from our miner etc.

@magik6k magik6k merged commit e54a87f into next Aug 6, 2020
@vyzo vyzo deleted the feat/message-pool-selection branch August 6, 2020 18:21
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.

None yet

6 participants