-
Notifications
You must be signed in to change notification settings - Fork 284
feat(fees): Add fee receiver #5333
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Lohachov Mykhailo <[email protected]>
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.
Looks like a step in the right direction
pub asset: AssetDefinitionId, | ||
} | ||
|
||
impl Default for FeesOptions { |
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.
I don't think that we can have this default. You should find a different approach IMO
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.
Changed so they are obtained from the environment variables.
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.
Does it matter if the environment variable FEES_ASSET
differs from peer to peer?
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.
This envis used only when building the executor and is the uploader's responsibility. It shouldn't be affected by individual peers' configurations.
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.
Well I'll be damned. This is not a bad solution at all
Signed-off-by: Lohachov Mykhailo <[email protected]>
Signed-off-by: Lohachov Mykhailo <[email protected]>
Signed-off-by: Lohachov Mykhailo <[email protected]>
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.
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.
I don't understand the question here. How would you do it otherwise? It's an executor that controls fees. Every tx will run through it and it will produce a fee deduction
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.
As mentioned in #5315 (comment), I now support using an executor and am questioning the necessity of customizing permission validations.
Would it not be sufficient to simply withhold permissions for modifying specific parameters, domains, accounts, and asset definitions?
pub asset: AssetDefinitionId, | ||
} | ||
|
||
impl Default for FeesOptions { |
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.
Does it matter if the environment variable FEES_ASSET
differs from peer to peer?
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.
I don't understand the question here. How would you do it otherwise? It's an executor that controls fees. Every tx will run through it and it will produce a fee deduction
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.
LGTM. If we are sure about the model when there is a single fee receiver in the network, this PR seems to do the job.
Signed-off-by: Lohachov Mykhailo <[email protected]>
Signed-off-by: Lohachov Mykhailo <[email protected]>
Signed-off-by: Lohachov Mykhailo <[email protected]>
Signed-off-by: Lohachov Mykhailo <[email protected]>
Signed-off-by: Lohachov Mykhailo <[email protected]>
// client.submit_all_blocking(upgrade_executor_isi(executor))?; | ||
for isi in upgrade_executor_isi(executor) { | ||
client.submit_blocking(isi)?; |
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.
I don't know for now why in the submit_all
case, the executor complains about a lack of fuel.
Signed-off-by: Lohachov Mykhailo <[email protected]>
Adds fee receiver options. New functionality can be access by upgrading the executor to
fees_executor
(See example in tests).Fees are read-only at this moment.
Default fees options are obtained from the environment variables and can be changed when building the executor.
Some missing features (will be added in this PR):