Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Submitting a transaction with below minFee requirement gives txPool feePriority error #5712

Closed
mitsuaki-u opened this issue Aug 26, 2020 · 1 comment · Fixed by #5733
Closed

Comments

@mitsuaki-u
Copy link
Contributor

Expected behavior

When submitting a tx with insufficient fee, Insufficient transaction fee. Minimum required fee is: ${minimumRequiredFee.toString()} should be given.

Actual behavior

Gets error: Rejecting transaction due to failed minimum entrance fee priority requirement from txPool.

This is due to txPool check happening before token module check.

Steps to reproduce

Send tx with below min fee requirement.

Which version(s) does this affect? (Environment, OS, etc...)

5.0-

@shuse2
Copy link
Collaborator

shuse2 commented Aug 28, 2020

Possible solution

  • Update lisk-chain Transaction class validate function to accept minFeePerByte and baseFees as below and check minFee requirement there (or create validateTransaction function in chain instance, which maybe more feasible)
validate( {minFeePerByte: number, baseFees: [] })
  • Also add calculateMinFee = (txSize: number, minFeePerByte: number, baseFees: []) => bigint function in lisk-chain/utils/transaction.ts
  • Remove minFee validation from token module
  • Update usage of transaction.validate() in lisk-framework/processor

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants