Introduce minimum fees configured by machines#1827
Introduce minimum fees configured by machines#1827mergify[bot] merged 4 commits intoCodeChain-io:masterfrom
Conversation
2d5b4ed to
6bb3025
Compare
6bb3025 to
803b74b
Compare
majecty
left a comment
There was a problem hiding this comment.
Let's add an integration test with the scenario below:
- Node A's minimum fee for a pay transaction is 100CCC
- Node B's minimum fee for a pay transaction is 200CCC
- Node A creates a Block with a transaction whose fee is 140CCC.
- Node B verifies the block successfully.
c9def02 to
7bc179c
Compare
|
I implemented the integration test you commented. |
foriequal0
left a comment
There was a problem hiding this comment.
You've added codechain binary here: remove it from the repository. 811ab50
a9461e6 to
0cd8de2
Compare
Thank you, I removed it from the commit. |
| client_account: &AccountDetails, | ||
| ) -> Result<(), Error> { | ||
| if origin != TxOrigin::Local && tx.fee < self.minimal_fee { | ||
| let action_min_fee = self.minimum_fees.min_cost(&tx.action); |
There was a problem hiding this comment.
Why origin != TxOrigin::Local condition is dropped?
There was a problem hiding this comment.
Because I think that's the correct behavior. Some services let users send their transactions via RPC directly to the nodes. In this case, I think the mem pool minimum fees should be applied to such transactions.
There was a problem hiding this comment.
Oh. The spec is changed. okay.
There was a problem hiding this comment.
I think that we should remain the original behavior. RPC should not be open to the internet. We didn't consider any safety in RPC. All the people who want to send a transaction should have its own CodeChain instance.
There was a problem hiding this comment.
How about discussing this with other team members?
There was a problem hiding this comment.
Ok then, I'll summary it and make a conversation. Until now, the mem pool's minimal fee is always set to zero.
There was a problem hiding this comment.
I changed the behavior not to reject local transactions despite low fees.
majecty
left a comment
There was a problem hiding this comment.
IMO, local transaction should be mined if its fee is low.
5806f5e to
1dbc363
Compare
d697014 to
f510c01
Compare
It enables validators to customize fee thresholds for transactions to be included in their mempools.
f510c01 to
0defbce
Compare
0defbce to
5d51a5c
Compare
Transactions whose fees are below the minimum fees configured by the mem pool should be rejected.
5d51a5c to
faf9f22
Compare
The mem pool minimum fees should not affect to the block verifications.
faf9f22 to
74549e7
Compare
It resolves #1758
It enables validators to customize fee thresholds for transactions to be included in their mem pools.