hiero-ledger / hiero-ledger/hiero-consensus-node
Duplicate association charges same fee as successful association
- Dominant language
- Java
- Stars
- 406
- Forks
- 226
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 210
Description
### Description
Associating an account to the same token twice results in identical transaction fees for both the successful and unsuccessful transaction.
### Steps to reproduce
Created two accounts on testnet and created a fungible token with the first.
With the second account, I associated with the new token once (successful)
I then associated the same (second) account to the same token (failed with duplicate)
This is as expected, **however the fee charged for both the successful and failed transaction was the same**, I would have expected the second to be cheaper since no state change occurred.
Successful transaction
https://testnet.dragonglass.me/transactions/00265609461641819850122147892
Failed transaction
https://testnet.dragonglass.me/transactions/00265609461641819848360907851
### Additional context
_No response_
### Hedera network
testnet
### Version
v0.21
### Operating system
_No response_
Contributor guide
Research direction
Start by comparing the successful and failed association transactions linked in the issue, then trace the transaction-fee handling in the Java repository. No source file or test is named, so identify the association and duplicate-failure fee paths first. Done means a duplicate association is charged less when it makes no state change, with coverage for both transactions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- blockchain
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100