Hi,
As we known, the txpool does not accept the zero-gasprice tx from remote node, it can be protect the DDos attack( #1320 ) . but If we are in a private network, I think we can supply a flag (maybe --txpool.allowzerogasprice) to set gasprice to 0.
If you agree with my advice, I can add a PR for this. thanks :)
PS. some people don't know --miner.gasprice and --txpool.pricelimit must be settled to greater than 0, maybe we can add some description for this.
thanks :)
If you are in a private network, I suggest using POA and "--miner.gasprice 0" works fine.
If you are in a private network, I suggest using POA and "--miner.gasprice 0" works fine.
No, gasprice can not set to Zero for a remote tx even if you set the '--miner.gasprice' to Zero.
(Note here: remote tx.)
If you set gasprice to Zero, the tx just can be package by the Local node(where you send the tx to). If the local node can not miner and brocatcast the tx to other remote nodes, they will not accept the tx.
you can have a try or check the code(tx_pool.go/func validateTx).
If you are in a private network, I suggest using POA and "--miner.gasprice 0" works fine.
No, gasprice can not set to Zero for a remote tx even if you set the '--miner.gasprice' to Zero.
(Note here:remotetx.)
If you set gasprice to Zero, the tx just can be package by theLocal node(where you send the tx to). If thelocal nodecan not miner and brocatcast the tx to other remote nodes, they will not accept the tx.
you can have a try or check the code(tx_pool.go/func validateTx).
还真的是这样,多谢你的提醒。怪不得我这边大量的交易时,处理的这么慢。
If you are in a private network, I suggest using POA and "--miner.gasprice 0" works fine.
No, gasprice can not set to Zero for a remote tx even if you set the '--miner.gasprice' to Zero.
(Note here:remotetx.)
If you set gasprice to Zero, the tx just can be package by theLocal node(where you send the tx to). If thelocal nodecan not miner and brocatcast the tx to other remote nodes, they will not accept the tx.
you can have a try or check the code(tx_pool.go/func validateTx).还真的是这样,多谢你的提醒。怪不得我这边大量的交易时,处理的这么慢。
不客气 :)
The problem with 0 gas prices is that you need to run your entire network with that option. So unless every single node in your network is under your control, you won't be able to support this.
The problem with 0 gas prices is that you need to run your entire network with that option. So unless every single node in your network is under your control, you won't be able to support this.
yes, I think some people will have this requirement, such as #18082, they want to have a all controled privite network.
Do you think we can add the flag to allow the 0 gas price? If so, I can add some code and commit a PR for it.
thanks :)
If you want to, and it's got some good motivation, by all means open a PR. Though, I wouldn't want that option to litter the already quite extensive CLI options, but perhaps it could be an option that can be set via TOML exclusively (we have a few of those already)
Most helpful comment
yes, I think some people will have this requirement, such as #18082, they want to have a all controled privite network.
Do you think we can add the flag to allow the 0 gas price? If so, I can add some code and commit a PR for it.
thanks :)