CodeChain-io / CodeChain-io/foundry
Introduce a minimum fee per byte
- Dominant language
- Rust
- Stars
- 36
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
CodeChain invalidates transactions whose fee is less than the minimum fee. The fee is charged for the network usage. We should set the minimum fee according to the transaction's CPU cost and Disk cost.
CodeChain requires a fixed fee for a Transfer transaction. A transfer transaction has multiple inputs and outputs. The transaction issuer should pay more fees if the size of the transaction is bigger.
I have one concern. There are two ways to apply the minimum fee: one is the consensus' minimum fee. CodeChain nodes will drop the transactions that have less than the consensus' minimum fee. The other one is each node's minimum fee. Each node can reject to propagate or to mine transactions that have small fees.
IMO, we should implement fee-per-byte minimum fees in both places.
Contributor guide
Research direction
No files, tests, or entry points are named. Start by tracing transaction fee validation and the node paths that reject, propagate, or mine transactions, then define how transaction size and CPU and disk costs determine minimum fees in both consensus validation and node policy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- blockchain
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100