Transaction PriceLimit is only respected in the txpool (discussion) #281
-
Transaction PriceLimit is only respected in the txpoolDescriptionMore of a discussion point, but curious why only the pool respects the PriceLimit and not nodes receiving transactions directly. server --help returns:
For example, if you had a four node cluster, you could submit a transaction with price of 0 to node 1, which it wouldn't propogate to nodes 2,3,4 because of this line. https://github.com/0xPolygon/polygon-sdk/blob/develop/txpool/txpool.go#L512 Would it not make more sense to discard the transaction on node 1 as well, and reject at the RPC level? Your environment
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
@mrwillis Hi, if you want to make node1 discard the tx with lower price. You can give |
Beta Was this translation helpful? Give feedback.
-
Thanks @Kourin1996. Sorry documentation is a little confusing here. So If I set |
Beta Was this translation helpful? Give feedback.
-
@mrwillis Node can accept transactions from JSON-RPC/gRPC even though gas price is less than price limit. Only remote transactions, which come from gossip broadcasted transactions, are restricted by price limit as default. If you give But @zivkovicmilos opened new PR #244 and merged. It set default price limit to 0. So node will accept all transactions even though its gas price is 0 when you don't give |
Beta Was this translation helpful? Give feedback.
-
Hey @mrwillis, I'll open up a PR that gives a better understanding of how |
Beta Was this translation helpful? Give feedback.
-
Hey @mrwillis, I've added additional docs for the |
Beta Was this translation helpful? Give feedback.
Hey @mrwillis,
I've added additional docs for the
price-limit
flag. They should be merged out soon 👍0xPolygon/polygon-edge-docs#34