0

I am currently trying to create a custom public PoS testnet using the example found in the link: https://docs.prylabs.network/docs/advanced/proof-of-stake-devnet

My node (PC) is connected to a router, receiving a private IP address, and I have completed the port forwarding process to allow external connections.

port forwarding

However, MetaMask(which is executed from laptop's chrome browser. not connected with same router) still seems unable to find my RPC and does not recognize the chainID of my testnet.(Only 1 picture here but I tried all of the port 5222~5555) Could you let me know if there is a problem with my command syntax or configuration file?

  1. Is it impossible because my network is from private ip which is port forwarded?
  2. Did I miss something to connect with MetaMask?

genesis.config (except alloc because it's too long)

{
"config": {
    "chainId": 142536,
    "homesteadBlock": 0,
    "daoForkSupport": true,
    "eip150Block": 0,
    "eip155Block": 0,
    "eip158Block": 0,
    "byzantiumBlock": 0,
    "constantinopleBlock": 0,
    "petersburgBlock": 0,
    "istanbulBlock": 0,
    "muirGlacierBlock": 0,
    "berlinBlock": 0,
    "londonBlock": 0,
    "arrowGlacierBlock": 0,
    "grayGlacierBlock": 0,
    "shanghaiTime": 1705910791,
    "terminalTotalDifficulty": 0,
    "terminalTotalDifficultyPassed": true
},
"nonce": "0x0",
"timestamp": "0x65ae2207",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000123463a4b065722e99115d6c222f267d9cabb5240000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x1c9c380",
"difficulty": "0x1",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {},
"number": "0x0",
"gasUsed": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"baseFeePerGas": null,
"excessBlobGas": null,
"blobGasUsed": null 
}

geth command

./geth --networkid 142536 --http --http.api eth,net,web3 --http.addr "0.0.0.0" --http.corsdomain "192.168.0.8:8000" --http.vhosts "192.168.0.8:8001" --ws --ws.api eth,net,web3 --ws.addr "0.0.0.0" --authrpc.jwtsecret jwt.hex --datadir gethdata --nodiscover --syncmode full --allow-insecure-unlock --unlock 0x123463a4b065722e99115d6c222f267d9cabb524

beacon-chain command

./beacon-chain --datadir beacondata --min-sync-peers 0 --genesis-state genesis.ssz --bootstrap-node= --interop-eth1data-votes --chain-config-file config.yml --contract-deployment-block 0 --chain-id 142536 --accept-terms-of-use --jwt-secret jwt.hex --suggested-fee-recipient 0x123463a4B065722E99115D6c222f267d9cABb524 --minimum-peers-per-subnet 0 --enable-debug-rpc-endpoints --execution-endpoint gethdata/geth.ipc

validator command

./validator --datadir validatordata --accept-terms-of-use --interop-num-validators 64 --chain-config-file config.yml

1 Answer 1

0

I solved this problem it's because I use wrong geth command!!!

--http.corsdomain "192.168.0.8:8000" --http.vhosts "192.168.0.8:8001"

I totally misunderstood this options, I need to set these like this!

--http.corsdomain "*" --http.vhosts "*"

Now I can connect to my network with MetaMask!

1
  • I will accept my answer soon.... sorry for that. I need to wait for 2 days to accept...
    – Beginner-K
    Jan 22 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.