blockscout / frontend

Front-end application for Blockscout
https://blockscout.com
GNU General Public License v3.0
146 stars 383 forks source link

Arbitrum support not working #2075

Open InoMurko opened 2 weeks ago

InoMurko commented 2 weeks ago

Description

Setting NEXT_PUBLIC_ROLLUP_TYPE: "arbitrum" prevents the startup of the application

🌀 Checking environment variables and their placeholders congruity...
👍 All good!

🌀 Validating ENV variables values...
🚨 ENVs validation failed with the following errors:
     NEXT_PUBLIC_ROLLUP_L2_WITHDRAWAL_URL cannot not be used if NEXT_PUBLIC_ROLLUP_TYPE is not defined

Link to the page

asdf

Steps to reproduce

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '...'
  4. See error

App version

v1.32.0

Browser

No response

Operating system

None

Additional information

No response

InoMurko commented 2 weeks ago

If I set it to ``` NEXT_PUBLIC_ROLLUP_TYPE: "optimistic"


it works
InoMurko commented 2 weeks ago
/app $ env | grep NEXT_PUBLIC_ROLLUP_TYPE
NEXT_PUBLIC_ROLLUP_TYPE=arbitrum

and removing NEXT_PUBLIC_ROLLUP_L2_WITHDRAWAL_URL works.

so the combination of these two variables breaks the application

NEXT_PUBLIC_ROLLUP_L2_WITHDRAWAL_URL="whatever"
NEXT_PUBLIC_ROLLUP_TYPE=arbitrum
isstuev commented 2 weeks ago

In the documentation here you can see that NEXT_PUBLIC_ROLLUP_L2_WITHDRAWAL_URL can be used only with 'optimistic' type of rollup. So you don't need NEXT_PUBLIC_ROLLUP_L2_WITHDRAWAL_URL variable for arbitrum L2 and can just remove it from your envs list

InoMurko commented 2 weeks ago

Actually, it says it is REQUIRED for optimistic rollup types, not that it is forbidden for Arbitrum support (or any other) should simply ignore this variable or print a warning because currently if it's set it prevents frontend app to start.

isstuev commented 2 weeks ago

I'm changing the error message, but we won't ignore unused variables, we're trying to keep a minimal variable list to minimize payload and prevent errors and misunderstandings