second-state / SOLL

SOLL is a new compiler for generate Ewasm from solidity and yul. See a demo here: https://asciinema.org/a/ezJqNLicn5fya02zwu4VXIo8a
https://www.secondstate.io/
377 stars 23 forks source link

RPC does not work well. #119

Closed Kenun99 closed 2 years ago

Kenun99 commented 3 years ago

After I executed docker run -it secondstate/devchain:devchain attach http://devchain-ewasm.secondstate.io:8545, it seems that the RCP service at http://devchain-ewasm.secondstate.io:8545 is offline.

hydai commented 3 years ago

Hi @Kenun99 Thanks for trying our testnet. Because the devchain-ewasm is very old testnet (maybe two years ago). So we plan to upgrade it with the latest software. That's why it is shutdown.

And we will announce a branch new testnet RPC service in this Month. Once it launches, I will notify you. Thanks for your patience :-)

hydai commented 3 years ago

Hi @Kenun99

Our new ewasm runtime is deployed on ParaState network.

For the faucet: https://testnet.faucet.parastate.io:8001/faucet For the RPC gateway: https://rpc.parastate.io:8545

Please move forward to the new testnet, thanks.

If you have any question about the new testnet, please let me know, thanks.

tpmccallum commented 3 years ago

Hi @hydai Can we please look at the following error when starting devchain?

If we run

docker run -it secondstate/devchain:devchain attach https://rpc.parastate.io:8545

Then the following error is returned

Fatal: Failed to start the JavaScript console: api modules: Method not found

I think the solution is to add the following parameter when starting (restarting) the the RPC process on the rpc.parastate.io server.

--rpcvhosts=rpc.parastate.io
hydai commented 3 years ago

Hi @tpmccallum I think we should drop the secondstate/devchain image. This container uses devchain which is a modified geth client (with CyberMiles modifications). It will have some issues when connecting to the ethereum-compatible chain. Maybe you can try ethereum/client-go

tpmccallum commented 3 years ago

Hi @hydai Thanks! I tried using ethererum/client-go and found that the ParaState RPC endpoint is still restricting clients from running geth attach against it. Are we able to restart rpc.parastate whilst adding --rpcvhosts=rpc.parastate.io and also --rpc --rpcaddr 0.0.0.0 --rpcport 8545 Then I can try this again. Thank you.

hydai commented 3 years ago

Hi @tpmccallum I am not sure if our parastate has those options, but I will check it later. I also want to know what is the different between geth and web3.js. Because it has no problem when we use web3.js to interact with the parastate. However, it has lots of issues such as you mentioned above when we use geth.

tpmccallum commented 3 years ago

Hi @hydai Awesome, it would be great to see the available options.

Yeah so essentially, as you are aware, Geth is the Official Go implementation of the Ethereum protocol. There are also C++ and Python etc. These implementations get the actual node running/syncing.

We see that Web3 (comes in two flavours; Python and Javascript) and allows clients to talk to the aforementioned node[s] that are already running. For example DApps can query on-chain information and then create and sign transactions on behalf of web users etc.

I think that when we are trying to connect to ParaState via Docker (Linux command line) we are asking to connect a geth JavaScript console in the Linux command line. The "attach" subcommand attaches to the console to an already-running geth instance.

Can you please see if there is a flag called --geth in relation to starting the ParaState node? If the ParaState node was geth aware/compatible then perhaps this attach request would succeed.

I hope this helps. Thanks Tim

hydai commented 3 years ago

Great. The ParaState node is not from geth but from frontier which is the polkadot software stack. So it may need extra settings to make it compatible with geth. I will check these options.