go-ethereum icon indicating copy to clipboard operation
go-ethereum copied to clipboard

About Estimate gas Fee Not Show using PoS

Open ekawibisono opened this issue 1 year ago • 1 comments

Hi, I want to ask. how to display estimate fee on metamask on my testnet network. here is the config running my node. my method is using POS

geth 	--datadir=/root/testnet/node-1 \
        --identity 'Node-1' \
		--syncmode 'full' \
		--port 40411 \
		--networkid 61254 \
		--http \
		--http.addr 0.0.0.0 \
		--http.corsdomain '*' \
		--http.port 8575 \
		--http.vhosts '*' \
		--http.api eth,txpool,debug,web3,net,personal,admin \
		--ws \
        --ws.addr 0.0.0.0 \
        --ws.port 8675 \
        --ws.origins '*' \
		--ws.api eth,txpool,debug,web3,net,personal \
		--authrpc.addr 0.0.0.0 \
		--authrpc.port 8551 \
		--authrpc.jwtsecret=/root/testnet/ethereum-generator-2.0.12/output/jwt/jwtsecret \
		--authrpc.vhosts '*' \
		--mine \
		--miner.gaslimit 30000000 \
    	--miner.gasprice 1000000000 \
    	--miner.recommit 2s \
		--miner.newpayload-timeout 2s \
    	--rpc.gascap 50000000 \
   		--rpc.txfeecap 1 \
    	--txpool.accountqueue 64 \
    	--txpool.accountslots 16 \
    	--txpool.globalqueue 1024 \
    	--txpool.globalslots 5120 \
    	--txpool.lifetime 0h10m0s \
    	--txpool.locals "0x5cC87420e35FC82097610C9b60cBEA63504869BD" \
    	--txpool.pricebump 10 \
    	--txpool.pricelimit 1 \
    	--txpool.rejournal 0h10m0s \
		--cache 1028 \
		--miner.etherbase "0x5cC87420e35FC82097610C9b60cBEA63504869BD" \
		--password /root/testnet/password.txt \
        --snapshot=false \
	    --cache.preimages \
        --crypto.kzg=gokzg \
		--verbosity 3

image

Using Geth : geth version 1.13.5-stable-916d6a44

Thanks

ekawibisono avatar Aug 22 '24 13:08 ekawibisono

It's a bit hard to figure out only looking at a screenshot whether there's something wrong with Geth or Metamask. You should try running an RPC call directly against to see if that call works or not, depending on that you'll be able to know which part is problematic.

One other thought that might happen, is if your chain is empty, there might not be any transactions to estimate the gas price based on, in which case I'm unsure what Geth returns and how Metamask handles that input. So there might be a few things at play and we should first know what Geth returns.

karalabe avatar Aug 28 '24 03:08 karalabe

It's a bit hard to figure out only looking at a screenshot whether there's something wrong with Geth or Metamask. You should try running an RPC call directly against to see if that call works or not, depending on that you'll be able to know which part is problematic.

One other thought that might happen, is if your chain is empty, there might not be any transactions to estimate the gas price based on, in which case I'm unsure what Geth returns and how Metamask handles that input. So there might be a few things at play and we should first know what Geth returns.

Is there something wrong with my miner.gasprice configuration? because I am running 2 nodes with the same miner.gasprice

ekawibisono avatar Aug 29 '24 03:08 ekawibisono

is if your chain is empty, there might not be any transactions to estimate the gas price based on

So, @ekawibisono, is the chain (mostly) empty, or has there been a lot of transactions on it?

holiman avatar Aug 29 '24 08:08 holiman

We don't know how MetaMask creates this fee overview. There are multiple possibilities:

  • if they are using eth_feeHistory, your chain may not have enough content (blocks) to create a meaningful overview. However, it should still show something.
  • if they are using an external service, you're out of luck because it won't support your test network.

Either way it's not a Geth issue.

fjl avatar Aug 29 '24 08:08 fjl