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

Running Goerli network for testing on the main branch does not work #79

Closed
comverser opened this issue Mar 21, 2023 · 14 comments
Closed

Comments

@comverser
Copy link

comverser commented Mar 21, 2023

The same question has been posted on https://ethereum.stackexchange.com/questions/147811/run-the-safe-global-safe-infrastructure-service-for-a-sample-test.


My goal is to run the safe-infrastructure service for a sample test by following the Guide to run our services locally.

I believe I followed the instructions correctly on the main branch (or commit 476c42d) with the Georli chain, which is officially supported and should not have any compatibility or support issues.

However, the service isn’t working.

PROBLEM

Chrome DevTools Console
GET http://localhost:8000/cgw/v1/chains/5/safes/0x38b3aE5977220a8081De42a9045d8D2537e73871 404 (Not Found)
Chrome DevTools Headers
[General]
Request URL: http://localhost:8000/cgw/v1/chains/5/safes/0x38b3aE5977220a8081De42a9045d8D2537e73871
Request Method: GET
Status Code: 404 Not Found (from service worker)
Referrer Policy: strict-origin-when-cross-origin

[Response Headers]
access-control-allow-credentials: true
access-control-allow-headers: X-Requested-With, Content-Type, Authorization
access-control-allow-methods: POST, GET, OPTIONS
access-control-allow-origin: *
Connection: keep-alive
Content-Length: 26
Content-Type: application/json
Date: Wed, 22 Mar 2023 15:11:21 GMT
permissions-policy: interest-cohort=()
Server: nginx/1.23.3
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN

[Request Headers]
Provisional headers are shown
Learn more
Referer: http://localhost:8080/
sec-ch-ua: "Brave";v="111", "Not(A:Brand";v="8", "Chromium";v="111"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "macOS"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36

Chrome DevTools Response

{"code":42,"message":""}
Screenshot

image

REPRODUCE

Conditions

Step 1: setup your .env

REVERSE_PROXY_PORT=8000
REVERSE_PROXY_UI_PORT=8080

CFG_VERSION=latest
CGW_VERSION=latest
TXS_VERSION=latest
UI_VERSION=latest

RPC_NODE_URL=https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161

Step 2: Setup Django superusers

# Option #1 - Automated way
cd scripts
sh run_locally.sh

Step 3: Add your ChainInfo

Referred to the ChainInfo available in the official production information at https://safe-config.gnosis.io/api/v1/chains/

safe-infrastructure on  main
❯ curl -s http://localhost:8000/cfg/api/v1/chains/ | jq
{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "chainId": "5",
      "chainName": "Goerli",
      "shortName": "gor",
      "description": "Ethereum Testnet Görli",
      "l2": true,
      "rpcUri": {
        "authentication": "NO_AUTHENTICATION",
        "value": "https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161"
      },
      "safeAppsRpcUri": {
        "authentication": "NO_AUTHENTICATION",
        "value": "https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161"
      },
      "publicRpcUri": {
        "authentication": "NO_AUTHENTICATION",
        "value": "https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161"
      },
      "blockExplorerUriTemplate": {
        "address": "https://goerli.etherscan.io/address/{{address}}",
        "txHash": "https://goerli.etherscan.io/tx/{{txHash}}",
        "api": "https://api-goerli.etherscan.io/api?module={{module}}&action={{action}}&address={{address}}&apiKey={{apiKey}}"
      },
      "nativeCurrency": {
        "name": "Goerli Ether",
        "symbol": "GOR",
        "decimals": 18,
        "logoUri": "/media/chains/5/currency_logo.png"
      },
      "transactionService": "http://nginx:8000/txs",
      "vpcTransactionService": "http://nginx:8000/txs",
      "theme": {
        "textColor": "#ffffff",
        "backgroundColor": "#000000"
      },
      "gasPrice": [
        {
          "type": "fixed",
          "weiValue": "100000000000"
        }
      ],
      "ensRegistryAddress": "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
      "recommendedMasterCopyVersion": "1.3.0",
      "disabledWallets": [],
      "features": [
        "CONTRACT_INTERACTION",
        "DOMAIN_LOOKUP",
        "ERC1155",
        "ERC721",
        "SAFE_APPS",
        "SPENDING_LIMIT"
      ]
    }
  ]
}

Step 4: Add your webhooks

  • Url: http://nginx:8000/cgw/v1/chains/5/hooks/events
  • Authorization: Basic some_random_token

Safe Web App

1. Connect to http://localhost:8080/welcome using a browser

2. Select the Goerli chain from the dropdown menu in the top right corner

3. Connect MetaMask wallet

4.1. Click the + Create New Safe button

4.2. Select network and name your Safe -> Click the Next button

image

4.3 Owners and confirmations -> Click the Next button
image

4.4.1. Create new Safe -> Click the Next button: the Est. network fee is not being updated and is still showing the initial value of 0.001 GOR
image

4.4.2. Transaction
image

4.4.3. Error
image

@comverser comverser changed the title Network fee estimation is pending with an initial value of 0.001. Running Goerli network for testing on the main branch does not work Mar 22, 2023
@moisses89
Copy link
Member

I could see that your question was answered, could we close this issue? @comverser

@comverser
Copy link
Author

Please wait for a few days! Thanks in advance!

@moisses89
Copy link
Member

moisses89 commented Apr 12, 2023

@comverser Could you test it? :)

@comverser
Copy link
Author

@comverser Could you test it? :)

I am sorry that I couldn't test yet. Should I close it now and reopen it when I am ready?

@moisses89
Copy link
Member

No, ping me if you need something more.

@comverser
Copy link
Author

comverser commented Apr 16, 2023

@moisses89, the official Safe app takes less than three minutes to create a new Safe account. However, the app in my test environment did not complete the task even after three hours of testing and the periodic error messages with codes 42 and 1337 stopped appearing after about 15 minutes. Do you know why this is happening?

@moisses89
Copy link
Member

moisses89 commented Apr 18, 2023

@comverser at this point more information is needed.
If the cgw is showing 404 after long time maybe is because the transaction-service indexer is not working or your indexer is indexer from the beginning and is still far for this transactions.
Could you check on transaction service if safe information endpoint return anything? http://localhost:8000/txs/api/v1/safes/0x38b3aE5977220a8081De42a9045d8D2537e73871/
If yes, then the error is in the cgw, could you see in the docker logs for cgw container if there are any error?
If not, then we should take a look to the worker-indexer container logs, could you check if the container show any error in the logs?

@comverser
Copy link
Author

comverser commented Apr 20, 2023

@moisses89,

After waiting a bit longer, the issue resolved itself (@gzliudan helped me). It seems that the indexer had not yet reached these transactions, just as you mentioned.

Although I successfully created a new account, I wanted to be more confident and followed your suggestion to seek additional help.

I went to the address you specified and this is what I found.

http://15.164.180.140:8000/txs/api/v1/safes/0x38b3aE5977220a8081De42a9045d8D2537e73871/

image

And I looked at the log in Docker.

image

Did I overlook any issues or problems? Is everything correct?

@comverser
Copy link
Author

comverser commented Apr 20, 2023

@moisses89 (cc. @gzliudan),

After creating a Safe account, I ran into an error. Can you tell me what it means? Is it something to be concerned about?
image

@moisses89
Copy link
Member

http://15.164.180.140:8080/txs/api/v1/safes/0x38b3aE5977220a8081De42a9045d8D2537e73871/
I think that txs is in port 8000 right? 8080 is webpage.
The second error is maybe because there are no messages but seems that your safe is indexed.

@comverser
Copy link
Author

http://15.164.180.140:8080/txs/api/v1/safes/0x38b3aE5977220a8081De42a9045d8D2537e73871/
I think that txs is in port 8000 right? 8080 is webpage.
The second error is maybe because there are no messages but seems that your safe is indexed.

I made the changes you suggested! Please refer to the initial post.

@moisses89
Copy link
Member

@comverser the safe that you create was indexed and this was the goal of this issue. If you have other problem could you create another specific issue for that? We shouldn't mix issue s :)

@hapetherw
Copy link

Hello @moisses89 Could you please take a look into my issue?
It's similar to the above issue, I am still waiting for the response from anyone on the team.
#141
Thank you.

@hapetherw
Copy link

@moisses89 I read the answer you posted in StackExchange, but how do i access the admin panel of the Safe Transaction Service?
https://ethereum.stackexchange.com/questions/147811/run-the-safe-global-safe-infrastructure-service-for-a-sample-test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants