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

bug: ERR_LOW_FEE error shows when fee is higher than static fee setting #3712

Closed
e-m-s-y opened this issue May 19, 2020 · 2 comments
Closed
Assignees

Comments

@e-m-s-y
Copy link

e-m-s-y commented May 19, 2020

Expected Behavior

I would expect that a ERR_HIGH_FEE error would be shown.

Current Behavior

I'm working on a bridgechain and this chain has a static fee structure. I noticed that when you send a higher fee than the static fee the error ERR_LOW_FEE will be shown.

https://github.com/ArkEcosystem/core/blob/master/packages/core-transaction-pool/src/dynamic-fee.ts#L78-L96

https://github.com/ArkEcosystem/core/blob/master/packages/core-transaction-pool/src/processor.ts#L128-L133

Possible Solution

My idea is to add additional return parameters to the dynamicFeeMatcher function which tells you if the fee is either too low or too high. Then, according to these parameters you can decide which error to show.

https://github.com/ArkEcosystem/core/blob/master/packages/core-transaction-pool/src/dynamic-fee.ts#L99

Steps to Reproduce (for bugs)

curl --request POST --url https://api.radians.nl/api/transactions --header "content-type:application/json" --data "{\"transactions\":[{\"id\":\"06808c333e6ea6dbffb819d69545856a3aa04f17f2321033f4d5d8a670b55a9e\",\"signature\":\"0a079d2d5fea7fd4e865d2ac7266f3c289c1846f58905e382f9e654d072242adccef25d248798ea683ffc399a6b3099eef44f78f344e003abee73bf43b8da052\",\"version\":2,\"type\":0,\"fee\":\"2\",\"senderPublicKey\":\"038ea50f12c4c0eb1aa83a84a51744195794ccfb17783bd810ddb99d25e6dd3a69\",\"typeGroup\":1,\"nonce\":\"8\",\"amount\":\"1\",\"recipientId\":\"TGm4RA3hv49DmKWWpSPGFDHMmQmQNdqqZA\",\"expiration\":0}]}"

Your Environment

@ghost
Copy link

ghost commented May 19, 2020

Thanks for opening this issue! A maintainer will review this in the next few days and explicitly select labels so you know what's going on.

If no reviewer appears after a week, a reminder will be sent out.

@ghost
Copy link

ghost commented Jun 17, 2020

This issue has been closed. If you wish to re-open it please provide additional information.

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

No branches or pull requests

3 participants