-
Notifications
You must be signed in to change notification settings - Fork 49
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: implement paymaster #582
Conversation
@@ -110,3 +110,12 @@ message LocalVirtualGroup { | |||
// Notice that the minimum unit of charge is 128K | |||
uint64 total_charge_size = 4; | |||
} | |||
|
|||
message BucketFlowRateLimit { |
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.
BucketFlowRateLimit
is just Int
. Why we need this instead of using Int
?
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.
we can add another fields
k.deleteBucketFlowRateLimitForDifferentBucketOwner(ctx, paymentAccount, bucketOwner, bucketName) | ||
|
||
// set the flow rate limit for the bucket for the current bucket owner | ||
err := k.setFlowRateLimit(ctx, bucket, paymentAccount, bucketName, rateLimit) |
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.
setFlowRateLimit
the function name seem not good, it is simliar to setBucketFlowRateLimit
, but it does a lot of things.
} | ||
|
||
internalBucketInfo := k.MustGetInternalBucketInfo(ctx, bucketInfo.Id) | ||
isRateLimited := k.isBucketRateLimited(ctx, bucketName) |
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.
it is very hard to understand isRateLimited
from the word.. any better wording?
if currentFlows != nil { | ||
flowList = append(flowList, *currentFlows) | ||
} | ||
|
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.
what is the motivation to change the code here?
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.
because the previous code don't allow empty currentFlows and previousFlows, but when we resume the bucket, the previousFlows is empty
Description
This pr will implements BEP bnb-chain/BEPs#362.
Rationale
Implement paymaster.
Example
n/a
Changes
Notable changes:
MsgSetBucketFlowRateLimit
Potential Impacts
CreatObject
,CreateBucket
and etc.