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

Unable to send 0 GWEI Gas Cost via Custom RPC Endpoint #10619

Open
christineRPM opened this issue Mar 10, 2021 · 6 comments
Open

Unable to send 0 GWEI Gas Cost via Custom RPC Endpoint #10619

christineRPM opened this issue Mar 10, 2021 · 6 comments
Labels
needs-information Needs additional information from the user who reported the issue

Comments

@christineRPM
Copy link

Describe the bug

Hello there! The SKALE Network does not have a gas cost for end-users, and Gas Price (GWEI) has always been set to 0. Recently, as of MetaMask version 9.1.1, dApp developers are now unable to use MetaMask to process transactions for their end-users; and now while using MetaMask to send a transaction, they are receiving the following error.

EthQuery - RPC Error - Error: [ethjs-query] while formatting outputs from RPC '{"value":{"code":-32603,"data":{"code":0,"data":null,"message":"Transaction gas price lower than current eth_gasPrice."}}}'

Steps to reproduce (REQUIRED)
Steps to reproduce the behavior, libraries used with version number, and/or any setup information to easily reproduce:

  1. Go to https://codesandbox.io/s/metamask-wallet-integration-skale-dev-docs-k77zj to get a SKALE Network custom RPC added to your list of MetaMask (version 9.1.1) Networks. Or alternatively, add the following Custom RPC Endpoint to your MetaMask
Endpoint: https://dev-testnet-v1-0.skalelabs.com
Chain ID: 344435
  1. Then go to https://faucet.skale.network to get SKALE Chain (sETH) in your wallet using https://dev-testnet-v1-0.skalelabs.com as your SKALE endpoint.
  2. Next open MetaMask and try to send sETH you just acquired from your wallet to another wallet.
  3. See error EthQuery - RPC Error - Error: [ethjs-query] while formatting outputs from RPC '{"value":{"code":-32603,"data":{"code":0,"data":null,"message":"Transaction gas price lower than current eth_gasPrice."}}}'

Expected behavior
The transaction has always been successful in MetaMask up to now, and the expected behavior is to receive a confirmed and successfully sent transaction.

Screenshots
metamask-skale-issue

Screen Shot 2021-03-10 at 6 10 09 AM

Browser details (please complete the following information):

  • OS: Mac OS
  • Browser: Chrome Version 88.0.4324.192 (Official Build) (x86_64)
  • MetaMask Version: 9.1.1
@jacobc-eth jacobc-eth added Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. type-bug and removed needs-triage labels Mar 16, 2021
@jacobc-eth
Copy link

Hi @christineRPM, could you clarify for us how Skale uses 0 gwei? We checked and it looks like Skale was using 1,000 gwei in this example (see screenshot)

Screenshot from 2021-03-16 12-36-55

@jacobc-eth jacobc-eth added needs-information Needs additional information from the user who reported the issue and removed Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. type-bug labels Mar 16, 2021
@Gudahtt
Copy link
Member

Gudahtt commented Mar 16, 2021

I was unable to find any reference to the string "Transaction gas price lower than current eth_gasPrice" in our codebase or in any dependencies. I suspect this error is coming from the network.

@christineRPM
Copy link
Author

christineRPM commented Mar 16, 2021

Hello @Gudahtt & @jacobcantele - thanks for looking into this. As a workaround, I've had our engineers temporarily add in 1000 GWEI. However , if you try adding in this SKALE endpoint that I did not have updated you will see the issue:

https://dev-testnet-v1-1.skalelabs.com
Chain ID: 344435

@brad-decker
Copy link
Contributor

still seeing that price set for https://dev-testnet-v1-1.skalelabs.com using https://inspector.open-rpc.org/ @christineRPM 🤔

@christineRPM
Copy link
Author

When you try using the MetaMask plugin - are you also not seeing an error? If you send me your wallet I can send you sETH to test or alternatively you can also get sETH from the faucet here: https://faucet.skale.network

Here is the error that I receive when switching using the custom RPC and then attempting to send sETH in the MEtaMask plugin.

metamask issue

@bschorchit
Copy link

Is this still an issue, @christineRPM ?

brad-decker added a commit that referenced this issue Sep 26, 2023
## **Description**
Our fork of ethjs-query has been namespaced to the `@metamask/`
namespace, and updated with mostly development only fixes. There is one
exception which is the reason for this pull request which is the removal
of a try/catch that was catching too broadly and wrapping legitimate
errors in a new Error object that claimed the issue was with the
formatting of the output. In most cases this is incorrect and results in
a wide swath of errors being lumped together inside of sentry. This
change will result in the real errors being surfaced, after which we can
decide where to prioritize efforts to resolve RPC issues.

This PR progresses, and is expected to change the stack trace for the
following issues:
#9317 
#10519 
#10619
#11488 
#11974 
#13395 
#14298 
#14365 
#15250 
#17073 
#17803 
#19697 
#20699 

We are closing these issues opened automatically by sentry-io which are
not fully resolved but should result in better errors and stack traces:

fixes #10552 
fixes #14660 
fixes #14676 
fixes #14730 
fixes #14801
fixes #15065 

## **Manual testing steps**
1. Attempt to reproduce any of the bugs listed, 17073 was the easiest to
reproduce for me. This involves getting test currency from the wemix
faucet as listed in the issue and initiating a transaction between two
accounts you own.
2. On develop you'll see an 'error formatting outputs' error text
similar to what is reported in the issue.
3. On this branch you'll get the original error, without the wrapped
'formatting' error. including a different stack trace.

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained:
  - [x] What problem this PR is solving.
  - [x] How this problem was solved.
  - [x] How reviewers can test my changes.
- [x] I’ve indicated what issue this PR is linked to: Fixes #???
- [x] I’ve included tests if applicable.
- [x] I’ve documented any added code.
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
- [x] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [x] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

---------

Co-authored-by: MetaMask Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-information Needs additional information from the user who reported the issue
Projects
None yet
Development

No branches or pull requests

5 participants