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

Enforcing fee payment on transactions #3075

Closed
grarco opened this issue Apr 12, 2024 · 1 comment · Fixed by #3294
Closed

Enforcing fee payment on transactions #3075

grarco opened this issue Apr 12, 2024 · 1 comment · Fixed by #3294
Labels
breaking: protocol bug Something isn't working gas

Comments

@grarco
Copy link
Contributor

grarco commented Apr 12, 2024

After merging #2627 the transactions are now executed in order without the need to split the wrappers from the wasm transactions which poses an issue when it comes to fee payment that wasn't there in the previous execution model. In process_proposal we verify that the signer of a tx has enough balance to pay the fees for that tx: unfortunately though, with the new logic, the fee payment executed by the wrapper txs are now interspersed with the execution of the wasm codes. These could be transactions modifying the balance of the fee payers of the next transactions, meaning that the result of the check performed in process_proposal isn't valid anymore.

A possible solution could be to somewhat mimic the previous execution model by first collecting all the fees due by the transactions in the block and only then execute the wasm codes. This though would require some major changes (once more) in the execution model.

@grarco grarco added bug Something isn't working gas breaking: protocol labels Apr 12, 2024
@grarco grarco added this to the Phase 1: mainnet genesis milestone Apr 12, 2024
@cwgoes
Copy link
Contributor

cwgoes commented Apr 20, 2024

Hmm - could we perhaps just simulate running the transactions in order when preparing the proposal, and drop any for which there is no longer enough balance?

grarco added a commit that referenced this issue May 22, 2024
@grarco grarco mentioned this issue May 22, 2024
2 tasks
grarco added a commit that referenced this issue May 22, 2024
grarco added a commit that referenced this issue May 24, 2024
tzemanovic added a commit that referenced this issue May 24, 2024
* origin/grarco/force-fee-payment:
  Fmt
  Changelog #3075
  Fixes typo
  Misc adjustments to v36
  Adds integration test for enforced fees
  Removes useless operations on wrapper transactions
  Removes useless check on tx type for reprot management
  Fixes unit tests
  Pass tx by reference in `apply_wrapper_tx`
  Removes unused wasm caches for wrapper execution
  Refactors the arguments of `dispatch_tx` for every tx type
  Cache wrapper transaction to avoid second deserialization
  Reorganizes arguments for tx execution
  Refactors tx execution of `finalize_block` into separate functions
  Fixes fee payment
tzemanovic added a commit that referenced this issue May 24, 2024
* origin/grarco/force-fee-payment:
  Fmt
  Changelog #3075
  Fixes typo
  Misc adjustments to v36
  Adds integration test for enforced fees
  Removes useless operations on wrapper transactions
  Removes useless check on tx type for reprot management
  Fixes unit tests
  Pass tx by reference in `apply_wrapper_tx`
  Removes unused wasm caches for wrapper execution
  Refactors the arguments of `dispatch_tx` for every tx type
  Cache wrapper transaction to avoid second deserialization
  Reorganizes arguments for tx execution
  Refactors tx execution of `finalize_block` into separate functions
  Fixes fee payment
brentstone added a commit that referenced this issue May 30, 2024
* origin/grarco/force-fee-payment:
  Fmt
  Changelog #3075
  Fixes typo
  Misc adjustments to v36
  Adds integration test for enforced fees
  Removes useless operations on wrapper transactions
  Removes useless check on tx type for reprot management
  Fixes unit tests
  Pass tx by reference in `apply_wrapper_tx`
  Removes unused wasm caches for wrapper execution
  Refactors the arguments of `dispatch_tx` for every tx type
  Cache wrapper transaction to avoid second deserialization
  Reorganizes arguments for tx execution
  Refactors tx execution of `finalize_block` into separate functions
  Fixes fee payment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking: protocol bug Something isn't working gas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants