Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

[Feature request] parity_setMinGasPrice #9125

Closed
phahulin opened this issue Jul 15, 2018 · 10 comments
Closed

[Feature request] parity_setMinGasPrice #9125

phahulin opened this issue Jul 15, 2018 · 10 comments
Labels
F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. M6-rpcapi 📣 RPC API. P5-sometimesoon 🌲 Issue is worth doing soon. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow.
Milestone

Comments

@phahulin
Copy link
Contributor

I'm running:

  • Which Parity version?: 1.11.6
  • Which operating system?: Linux
  • How installed?: via binaries
  • Are you fully synchronized?: yes
  • Which network are you connected to?: -
  • Did you try to restart the node?: yes

It looks like parity_setMinGasPrice and some other apis are deprecated now

https://github.com/paritytech/parity/blob/494eb4ab6b518278fe7bf029de35f4e6de58b464/rpc/src/v1/impls/parity_set.rs#L78-L91

Could someone clarify why they are deprecated and how can those values (gas price, transactions limit, gas limit) be dynamically updated now?

@phahulin
Copy link
Contributor Author

I'm mostly interested in using this for custom chain (not Foundation), to set gasprice depending on the current exchange price, so this is related to #9089

@Tbaut
Copy link
Contributor

Tbaut commented Jul 16, 2018

They are deprecated and not used anymore in v1.11 in favor of the following config:

    --tx-queue-mem-limit=[MB]
        Maximum amount of memory that can be used by the
        transaction queue. Setting this parameter to 0 disables
        limiting. (default: 4)

    --tx-queue-size=[LIMIT]
        Maximum amount of transactions in the queue (waiting to be
        included in next block). (default: 8192)

    --tx-queue-per-sender=[LIMIT]
        Maximum number of transactions per sender in the queue. By
        default it's 1% of the entire queue, but not less than 16.

    --tx-queue-gas=[LIMIT]
        Maximum amount of total gas for external transactions in
        the queue. LIMIT can be either an amount of gas or 'auto'
        or 'off'. 'auto' sets the limit to be 20x the current block
        gas limit. (default: off)

More info on the new Tx queue here https://wiki.parity.io/Transactions-Queue

@phahulin
Copy link
Contributor Author

@Tbaut these are configuration options. My question is about updating those values via api (especially gas price), without client restarts.

@Tbaut
Copy link
Contributor

Tbaut commented Jul 16, 2018

Could someone clarify why they are deprecated

Answered above

how can those values (gas price, transactions limit, gas limit) be dynamically updated now?

You can't fo it dynamically, it's a feature request :)

@Tbaut Tbaut added Z1-question 🙋‍♀️ Issue is a question. Closer should answer. M6-rpcapi 📣 RPC API. labels Jul 16, 2018
@Tbaut Tbaut added this to the 2.0 milestone Jul 16, 2018
@Tbaut
Copy link
Contributor

Tbaut commented Jul 16, 2018

Please modify the title accordingly.

@phahulin phahulin changed the title parity_setMinGasPrice is deprecated [Feature request] parity_setMinGasPrice Jul 16, 2018
@phahulin
Copy link
Contributor Author

@Tbaut OK, I updated the title, but is there any way to get more insight on why these api calls were deprecated? I mean - these methods were already there and then were removed on purpose. Maybe this feature request doesn't make sense in the new tx queue implementation? Maybe there's some other way to update the price now?

@Tbaut
Copy link
Contributor

Tbaut commented Jul 17, 2018

We completely changed the logic of the queue. The idea was to push the changes and test them, see how it works (pretty smooth so far) and then adapt to the needs. I believe there is no other way to change the gas price.

@tomusdrw can tell if this makes sense to build parity_setMinGasPrice for the new logic.

@tomusdrw
Copy link
Collaborator

The methods were deprecated cause they might interfere with internal changes done inside miner (like automatic min gas price based on USD rate).

Also it was a bit unclear whether those methods should apply for transactions already in the pool or not.

For the new quue, it's possible to have parity_setMinGasPrice and parity_setTxGasLimit back, but setMinGasPrice should either error or disable auto-min-gas-price calibration. The docs should also be really clear that it doesn't apply for the transactions that are already in the pool.

@phahulin
Copy link
Contributor Author

@tomusdrw thanks, I think it makes sense to error parity_setMinGasPrice if automatic calibration is used.
These seem to be unrelated "modes" of how gasprice value is obtained: either read from config and updatable via parity_setMinGasPrice OR obtained from external api

@5chdn 5chdn modified the milestones: 2.0, 2.1 Jul 17, 2018
@5chdn 5chdn modified the milestones: 2.1, 2.2 Sep 11, 2018
@5chdn 5chdn added P5-sometimesoon 🌲 Issue is worth doing soon. F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow. and removed Z1-question 🙋‍♀️ Issue is a question. Closer should answer. labels Sep 25, 2018
@5chdn 5chdn modified the milestones: 2.2, 2.3 Oct 29, 2018
@5chdn 5chdn modified the milestones: 2.3, 2.4 Jan 10, 2019
@5chdn 5chdn modified the milestones: 2.4, 2.5 Feb 21, 2019
@soc1c soc1c modified the milestones: 2.5, 2.6 Apr 2, 2019
@HCastano
Copy link
Contributor

Little late, but closed via #10294

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F3-annoyance 💩 The client behaves within expectations, however this “expected behaviour” itself is at issue. M6-rpcapi 📣 RPC API. P5-sometimesoon 🌲 Issue is worth doing soon. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow.
Projects
None yet
Development

No branches or pull requests

6 participants