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

Epic: Solving message sending/management painpoints #5869

Closed
5 of 7 tasks
raulk opened this issue Mar 24, 2021 · 5 comments · Fixed by #5822
Closed
5 of 7 tasks

Epic: Solving message sending/management painpoints #5869

raulk opened this issue Mar 24, 2021 · 5 comments · Fixed by #5822

Comments

@raulk
Copy link
Member

raulk commented Mar 24, 2021

This meta-issue collects reports related to message management footguns, as well as the work taking place to resolve those issues.

Context

Most of these issues have their origin in a few simple points:

  1. The base fee is a dynamically changing value and it directly determines whether pending messages will be included or not.
  2. The max gas fee cap is a statically configured value in Lotus configuration, and by default Lotus ships with a value that might be considered too low in a large number of cases.
  3. Messages from a given sender are ordered by nonce. A failure to include pending message 1 will prevent pending messages 2, 3, etc. from being included. This is the head-of-line blocking problem.

Related reports, issues, and feature requests

Solution

This is a summary of the solution being implemented:

  1. Introduce a node health check API to detect when the Lotus node is not in a healthy state and prevent message sending.
  2. Introduce an mpool-level healthcheck API to evaluate inclusion-ability of a give message, and to detect when pending messages from a given sender are stuck, and therefore new messages would be affected by head-of-line blocking.
  3. An interactive UI for message sending that outputs the check results (including errors), and allows the user to adjust the base fee dynamically, getting real-time feedback on message inclusion probability.
  4. Detection of whether TTY is interactive or non-interactive.
    • If interactive, the CLI will open the interactive mode automatically.
    • If non-interactive, the CLI will behave like it behaves today (just submit the message).
  5. Inversion of control so that all CLI operations that send messages (e.g. send, msig, deal making, etc.) call back to the UI for fee adjustment.
  6. Interactive message management UI to visualise all pending messages from a sender, getting healthcheck status, and opening the interactive message sending UI to enable replace-by-fee.
  7. CLI flag to override the max fee cap in non-interactive mode.
    • issue pending
  8. Enabling external signing (aka Bring Your Own Signature).

Technical notes

https://gist.github.com/raulk/368429797072295f339e0dbe67168098

NOTE: given that this project introduces JSON-RPC API changes (such that message-sending methods now return a message prototype instead of blindly sending the message -- this is to enable inversion of control), it depends on Lotus API versioning.

Work

@steven004
Copy link
Contributor

@raulk In Venus' implementation, we're having a separated mpool (or Messenger we called) service to support the features you listed.
And it is in progress, please see more in https://github.com/ipfs-force-community/venus-messager

I would think it would be best to have this service to be independent, and be able to support whatever implementations a miner is using, which just requires the well defined API. If you think it is fine, we can move Venus-Messager to filecoin-project and rename it to go-messenger, thus we do not need to redundant work.

@raulk
Copy link
Member Author

raulk commented Mar 29, 2021

@steven004 looks interesting. I briefly peeked at the code. Would you mind adding a few notes to the README on current functionality, and what's coming? Then we can coordinate. Is this a re-implementation of the lotus mpool?

@steven004
Copy link
Contributor

A draft of readme is added: https://github.com/ipfs-force-community/venus-messager/blob/main/README.md, which will be polished later.

@raulk
Copy link
Member Author

raulk commented Apr 1, 2021

Looping in @Kubuxu to evaluate what are the best next steps re: go-messenger / venus-messenger and s shared component.

@Fatman13
Copy link
Contributor

Fatman13 commented Apr 7, 2021

Hello, @raulk, venus is preparing a proposal regarding @steven004 's suggestion. Please feel free to chime in. Thank you! https://github.com/ipfs-force-community/venus-messager/issues/40

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 a pull request may close this issue.

3 participants