Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSK Mainet - Default gas price should match minimum gas price #301

Closed
fedejinich opened this issue Jun 28, 2019 · 10 comments
Closed

RSK Mainet - Default gas price should match minimum gas price #301

fedejinich opened this issue Jun 28, 2019 · 10 comments

Comments

@fedejinich
Copy link

Hi again!

We've been discussing with RSK team, and finally decided that default gas price should match minimum gas price.

In order to achive that, you can ask our node for minimum gas price, every time a user tries to send a transaction.

Important minimum gas price must be consumed from the best block (last block in the blockchain)

Here is how you can get minimum gas price using curl

> curl -X POST -H "Content-Type:application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":67}' https://public-node.rsk.co/
> {"jsonrpc":"2.0","id":67,"result":"0x16eb66"} // get best block number
> curl -X POST -H "Content-Type:application/json" --data '{ "jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x16eb66",true], "id": 67 }' https://public-node.rsk.co/
> { "jsonrpc": "2.0", "id": 67, "result": { "number": "0x16eb66", ..., "minimumGasPrice": "59240000" } }

There is an RSKIP where you can find more information about minimium gas price.

Bests,

Fede

@vbaranov
Copy link
Collaborator

vbaranov commented Jul 2, 2019

Hi @fedejinich. Is this correct, that for RSK testnet minimumGasPrice property is zero for all transactions? Does it mean that RSK testnet accepts 0-gas price transactions?

@fedejinich
Copy link
Author

Hi @fedejinich. Is this correct, that for RSK testnet minimumGasPrice property is zero for all transactions? Does it mean that RSK testnet accepts 0-gas price transactions?

actually in testnet gas price shouldn't be 0, in the ndoe there are some validations that prevents zero gas price tansactions. it should be the minium gas price posible (i.e. 1 gwei)

@vbaranov
Copy link
Collaborator

vbaranov commented Jul 4, 2019

Published

@vbaranov vbaranov closed this as completed Jul 4, 2019
@jonathansmirnoff
Copy link

jonathansmirnoff commented Jul 5, 2019

@vbaranov thanks you for your help. We find another issue. The minimum gas price for mainnet is wrong. It should be 0.06 gwei and it's smaller.

Screen Shot 2019-07-05 at 11 09 31

@vbaranov
Copy link
Collaborator

vbaranov commented Jul 8, 2019

@jonathansmirnoff seems the screenshot is from the previous version of the extension. Could you force update an extension? It should be 4.11.8 version in the info section.

Screenshot 2019-07-08 at 11 35 43

Screenshot 2019-07-08 at 11 35 56

@jonathansmirnoff
Copy link

@vbaranov thanks for your response. I reinstalled and checked the version of nifty, I have version 4.11.8 and I still have that issue.

@jonathansmirnoff
Copy link

@vbaranov we double checked it again and we found the issue. We think that it is set the gas price of testnet in mainnet network.

@vbaranov
Copy link
Collaborator

@jonathansmirnoff, it gets a gas price from the network you are connected to. I am not able to reproduce this issue. I still see what I posted in my screenshot. We get minimumGasPrice from the last block. And it equals every time to 0.05924 Gwei. Moreover, for the RSK testnet, this property is 0. That is why we return 1 gwei in case of RSK testnet. Could you guide me all the asteps to reproduce this problem?

@jonathansmirnoff
Copy link

@vbaranov yes sure.
1 - Install Nifty Wallet (remove first)
2 - Connect to RSK Mainnet Network
3 - Try to transfer RBTC to an account
Screen Shot 2019-07-12 at 17 06 04
4 - Check that the GasPrice is 0,000003758
Screen Shot 2019-07-12 at 17 02 44

@vbaranov
Copy link
Collaborator

@jonathansmirnoff, thanks for the details. I found the issue. Indeed, for some reasons it can get the gas price from blocks, which are from different chain you're connected to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants