Phala-Network / phat-offchain-rollup

Phat Contract Offchain Rollup implementation
Apache License 2.0
18 stars 13 forks source link

Unable to find target 2023-02-20 release and "RPC is not Ready" when using `latest` #26

Closed a-moreira closed 1 year ago

a-moreira commented 1 year ago

I'm trying to run the Phala stack inside phat via yarn devphase stack run and connect to Phat Contracts UI (https://phat.phala.network/) to it, but without success.

> yarn devphase stack run
yarn run v1.22.19
$ /home/arthurmoreira-t14/phat-offchain-rollup/phat/node_modules/.bin/devphase stack run
[StackBinaryDownloader] Preparing Phala stack release
[StackBinaryDownloader] Creating stack directory
  ✔️ Checking releases directory
  ✖️ Checking target release binaries
    → Unable to find target 2023-02-20 release
    Throwable: Unable to find target 2023-02-20 release
    Code: 1668572613089
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

If I change the stack version in devphase.config.ts to latest, I'm then able to run the stack, but still get some errors on the UI. For example, when connecting to the stack locally, I get: image

But it works if I point to PoC-5 testnet: image

I get the same behavior using a local instance of Phat Contracts UI (from https://github.com/Phala-Network/phat-contract-ui).

specs:

FaisalAl-Tameemi commented 1 year ago

Running into the same issue as described by @a-moreira.


For added context...

Running yarn devphase contract test also fails with the following log (Node version 16.20.0)

Screenshot from 2023-06-11 20-42-15

l00k commented 1 year ago

Here you can find list of available releases: https://github.com/Phala-Network/phala-blockchain/releases

First you need to ensure devphase and Phala binaries are compatible - it is ensured only for latest binaries and latest devphase. In diffrent case - for example older Phala binaries release (which IMO should not be used) you need to find older devphase which was working with it.

Tested with example 'nightly-2023-05-26' - works fine

@FaisalAl-Tameemi for your case I would need to know more details. IMO this is different case and you should create separate issue for it. For the first glance you've used to old Phala release

FaisalAl-Tameemi commented 1 year ago

@l00k ok thanks. created a separate issue.

P.S. I'm also using latest so thought it was relevant.

a-moreira commented 1 year ago

@l00k I can run the stack with nightly-2023-05-26 that you mentioned, but I still get the "RPC is not ready" errors when trying to deploy a contract on the Phat Contracts UI (both locally run and at https://phat.phala.network/) image

l00k commented 1 year ago

@a-moreira On local network default node port is 9944 and worker port is 8000. (Unless you changed it) image

FaisalAl-Tameemi commented 1 year ago

Hey folks, I was able to resolve this by changing devphase to @devphase/cli and @devphase/service along with updating the config file.

Here's a draft PR which does not include fixing the associated tests yet.

P.S. I think the timeouts set in the config might be too short for some machines. Extending that might help as well.