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

Dynamic channel creation fees #108

Open
filefilegoadmin opened this issue Apr 17, 2023 · 2 comments
Open

Dynamic channel creation fees #108

filefilegoadmin opened this issue Apr 17, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@filefilegoadmin
Copy link
Contributor

Currently, channel creation is set to be a fixed fee. The idea is to be able to adjust it by the validator nodes.

Things to have in mind:

  1. TXs containing channel creation payload are validated if they contain the right amount
  2. This means we need to keep track of the changed fees so we can apply them properly for a node that is syncing from the beginning to avoid failed validations.
@filefilegoadmin filefilegoadmin added the enhancement New feature or request label Apr 17, 2023
@filefilegoadmin
Copy link
Contributor Author

filefilegoadmin commented Apr 17, 2023

This can be done by saving the last fee in the db which then can be mutated from the tx that includes the changes from the validators. This way all the transactions that contain the channel operations, will be validated properly.

To conclude, a state for currentChannelFees must be defined with a default value, and each time its change this value is updated

@filefilegoadmin
Copy link
Contributor Author

Concerns:

Lets assume that Mempool contains 3 tx that create a channel, and the fee is "0x1", and before a new block is sealed the channel creation fees are altered by the validators, if the state of the channel fees is updated before the rest of the transactions have mutated the state, then we could have inconsistent state meaning that their transactions might be invalid.

One solution is to always add transactions that contain the channel fee changes at the end of the list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant