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

MpoolPushUntrusted API for gateway #3915

Merged
merged 4 commits into from Oct 2, 2020
Merged

MpoolPushUntrusted API for gateway #3915

merged 4 commits into from Oct 2, 2020

Conversation

vyzo
Copy link
Contributor

@vyzo vyzo commented Sep 18, 2020

Adds an mpool API for the gateway to push messages, PushUntrusted.
The difference with Push is that strict checks are enabled and in addition there are no nonce gaps
allowed and the number of pending messages for each actor is severely limited.

Hopefully this will make the gateway usable without much fear of spam.

mp.curTsLk.Unlock()

mp.lk.Lock()
if err := mp.addLocal(m, msgb); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

we don't still want to do addLocal do we?

Copy link
Contributor Author

@vyzo vyzo Sep 21, 2020

Choose a reason for hiding this comment

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

Well, I am ambivalent about this; if we don't the messages will be transient, ie they might disappear in the next prune.
We can certainly remove the addLocal incantation.

@@ -55,6 +55,7 @@ var baseFeeLowerBoundFactor = types.NewInt(10)
var baseFeeLowerBoundFactorConservative = types.NewInt(100)

var MaxActorPendingMessages = 1000
var MaxUntrustedActorPendingMessages = 10
Copy link
Contributor

Choose a reason for hiding this comment

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

  • Do we use that for messages coming from the messages pubsub?
  • If yes, that's likely way too low, many bigger miners have many more messages that that per tipset

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, we only use it for the gateway -- messages coming from pubsub use Add.

@magik6k magik6k merged commit a3a3df9 into master Oct 2, 2020
@magik6k magik6k deleted the feat/mpool-gateway-api branch October 2, 2020 21:30
@mostcute
Copy link

mostcute commented Oct 8, 2020

@vyzo Please tell me how to quickly access lotus gateway, such as client.NewGatewayRPC and GetGatewayAPI

@elmattic elmattic mentioned this pull request May 12, 2023
4 tasks
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

5 participants